diffbook-app 0.11.2-rc.30 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/client/assets/_-D61WWEwl.js +1 -0
  2. package/dist/client/assets/_-DhcWzlRc.js +1 -0
  3. package/dist/client/assets/{_bookSlug-u0e9P_Y2.js → _bookSlug-DOCVmM-G.js} +1 -1
  4. package/dist/client/assets/{abnfDiagram-VCTEODGH-D_OD9Wbf.js → abnfDiagram-VCTEODGH-BURBCmcK.js} +1 -1
  5. package/dist/client/assets/{angular-html-DzwcRooX.js → angular-html-CGRqAu6-.js} +1 -1
  6. package/dist/client/assets/{angular-ts-Dx2-XnOa.js → angular-ts-Ccd5leof.js} +1 -1
  7. package/dist/client/assets/{apl-D2Xwcy4I.js → apl-J-sWVwBx.js} +1 -1
  8. package/dist/client/assets/{architecture-7GRP2DOG-ClNltlrD.js → architecture-7GRP2DOG-5OR77WDw.js} +1 -1
  9. package/dist/client/assets/{architectureDiagram-5GKGNRK7-DDLYPEuB.js → architectureDiagram-5GKGNRK7-CXtvW-AC.js} +1 -1
  10. package/dist/client/assets/{astro-BWSk7yyn.js → astro-CNENZnOv.js} +1 -1
  11. package/dist/client/assets/{blade-DHPtZg5I.js → blade-CKxsgG-9.js} +1 -1
  12. package/dist/client/assets/{blockDiagram-I7D4REHJ-DCMQ3V1F.js → blockDiagram-I7D4REHJ-nBw1m4P4.js} +1 -1
  13. package/dist/client/assets/{book-links-CmtpwEQc.js → book-links-Bhfwq453.js} +1 -1
  14. package/dist/client/assets/{book-view-mbtDn0pb.js → book-view-DxRs3TTV.js} +3 -3
  15. package/dist/client/assets/{bundle-full-CXO0cOEH.js → bundle-full-BYQFJ3Ay.js} +3 -3
  16. package/dist/client/assets/{c-DuQuyzYf.js → c-BGsgiVKm.js} +1 -1
  17. package/dist/client/assets/{c4Diagram-7LVT6UL2-B26Xhn97.js → c4Diagram-7LVT6UL2-rdl9yb5_.js} +1 -1
  18. package/dist/client/assets/channel-DHRTUQj0.js +1 -0
  19. package/dist/client/assets/{chart-CHy6ZV-k.js → chart-z6GfQNID.js} +1 -1
  20. package/dist/client/assets/chunk-2Q5K7J3B-Bgzqlgcs.js +1 -0
  21. package/dist/client/assets/{chunk-5VM5RSS4-CfFkCz6S.js → chunk-5VM5RSS4-FDGoY8q5.js} +1 -1
  22. package/dist/client/assets/{chunk-F27PBJKO-1g8ALsZz.js → chunk-F27PBJKO-lZPA3_fn.js} +1 -1
  23. package/dist/client/assets/{chunk-IMKFNOWR-B5oVqrFd.js → chunk-IMKFNOWR-DhiORPin.js} +1 -1
  24. package/dist/client/assets/{chunk-JWPE2WC7-B-NnbkMC.js → chunk-JWPE2WC7-B4Gu6uxj.js} +1 -1
  25. package/dist/client/assets/{chunk-POPQ4Y6H-CKGhG5NN.js → chunk-POPQ4Y6H-D4rOCTgl.js} +1 -1
  26. package/dist/client/assets/{chunk-SHT3W25Y-BfEh-9g9.js → chunk-SHT3W25Y-4HHwADMf.js} +1 -1
  27. package/dist/client/assets/{chunk-SVP7TREG-CxAwfIsg.js → chunk-SVP7TREG-Dj2PEu6S.js} +1 -1
  28. package/dist/client/assets/{chunk-TICWLB2K-BUou3rnZ.js → chunk-TICWLB2K-DaBYB21P.js} +1 -1
  29. package/dist/client/assets/{chunk-XXDRQBXY-DQUggtcV.js → chunk-XXDRQBXY-KiArloEt.js} +1 -1
  30. package/dist/client/assets/classDiagram-ZZMXUADV-BmLX8vJO.js +1 -0
  31. package/dist/client/assets/classDiagram-v2-VYDZK3BY-BmLX8vJO.js +1 -0
  32. package/dist/client/assets/{cobol-3NXx49va.js → cobol-yUGSO8mB.js} +1 -1
  33. package/dist/client/assets/{code-block-CJwDdxO0.js → code-block-Bln0JBW1.js} +3 -3
  34. package/dist/client/assets/{coffee-kSiEQ56u.js → coffee-Jc0UP3bx.js} +1 -1
  35. package/dist/client/assets/{cose-bilkent-JH36ORCC-ml3oI9OU.js → cose-bilkent-JH36ORCC-Cc_pv-00.js} +1 -1
  36. package/dist/client/assets/{cpp-CPj-o5kS.js → cpp-BKDEI_Sc.js} +1 -1
  37. package/dist/client/assets/{crystal-DaHMXZop.js → crystal-BrcmY9tM.js} +1 -1
  38. package/dist/client/assets/{css-DjxN_Vgh.js → css-DT1HDvK7.js} +1 -1
  39. package/dist/client/assets/cynefin-OW5HDTMX-CryO6Od1.js +1 -0
  40. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-WyeW85Ix.js → cynefinDiagram-5FMLGOSQ-DFa30MvN.js} +1 -1
  41. package/dist/client/assets/{dagre-D3UYx9Bd.js → dagre-ADMNmKWJ.js} +1 -1
  42. package/dist/client/assets/{dagre-GXQ25YYZ-BBubgL7Z.js → dagre-GXQ25YYZ-DjGBQ--G.js} +1 -1
  43. package/dist/client/assets/{diagram-S7CK7UJ4-D414uEwk.js → diagram-S7CK7UJ4-Btw4_nZ3.js} +1 -1
  44. package/dist/client/assets/{diagram-UQ7AKVKN-3y08eMVL.js → diagram-UQ7AKVKN-BvnZ5lX0.js} +1 -1
  45. package/dist/client/assets/{diagram-VSXAHHWV-DOCWyEKy.js → diagram-VSXAHHWV-m08PMUJ7.js} +1 -1
  46. package/dist/client/assets/{diagram-VX7I27RA-DnkKu4gA.js → diagram-VX7I27RA-BK4GX23e.js} +1 -1
  47. package/dist/client/assets/{diagram-Z3DM3KII-DFaGPQUX.js → diagram-Z3DM3KII-Bn7xAtKB.js} +1 -1
  48. package/dist/client/assets/{dist-BR540SDA.js → dist-MuroZWSw.js} +1 -1
  49. package/dist/client/assets/{ebnfDiagram-PWID7BFC-BJ5p-hTn.js → ebnfDiagram-PWID7BFC-DTn1zrwG.js} +1 -1
  50. package/dist/client/assets/{edge-wrtyhL_4.js → edge-BywEr_Od.js} +1 -1
  51. package/dist/client/assets/{elixir-D8uaHQ9I.js → elixir-DCFV97uw.js} +1 -1
  52. package/dist/client/assets/{elm-Bz9KLFYo.js → elm-DqKhO8Yi.js} +1 -1
  53. package/dist/client/assets/{erDiagram-RLTQ6QDP-CPX7wzvY.js → erDiagram-RLTQ6QDP-CysR20wl.js} +1 -1
  54. package/dist/client/assets/{erb-Cu5OIGKG.js → erb-D-1jrANU.js} +1 -1
  55. package/dist/client/assets/{eventmodeling-NTZA5JFV-cVNS6Bq7.js → eventmodeling-NTZA5JFV-BMODU9S7.js} +1 -1
  56. package/dist/client/assets/flowDiagram-HODETNUW-BjSFGDqe.js +1 -0
  57. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-B4mss4iP.js → ganttDiagram-EL5Y4UJY-Djhgveiy.js} +1 -1
  58. package/dist/client/assets/{git-rebase-CqHWgDBN.js → git-rebase-cfCwi3Co.js} +1 -1
  59. package/dist/client/assets/gitGraph-4MIJSDKK-TpmnKUnB.js +1 -0
  60. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-CwhqQbG0.js → gitGraphDiagram-WWUBYQGX-BBvoJKKq.js} +1 -1
  61. package/dist/client/assets/{glimmer-js-B_mTdfMJ.js → glimmer-js-BOa1x5jZ.js} +1 -1
  62. package/dist/client/assets/{glimmer-ts-r-MoqMft.js → glimmer-ts-BADCQOtW.js} +1 -1
  63. package/dist/client/assets/{glsl-DXDLy-WP.js → glsl-CJwF6od1.js} +1 -1
  64. package/dist/client/assets/{graphql-BXL_azQ-.js → graphql-D60sr0o8.js} +1 -1
  65. package/dist/client/assets/{hack-crn1-cmo.js → hack-Dyj4NX3H.js} +1 -1
  66. package/dist/client/assets/{haml-eVHBqwSF.js → haml-BMtmxWor.js} +1 -1
  67. package/dist/client/assets/{handlebars-D6xU69PQ.js → handlebars-BL55N4J1.js} +1 -1
  68. package/dist/client/assets/{html-Lj6sUq_Q.js → html-9KLbboy9.js} +1 -1
  69. package/dist/client/assets/{html-derivative-DNdxuOzk.js → html-derivative-C0-JW0v4.js} +1 -1
  70. package/dist/client/assets/{http-BdLhU5UK.js → http-BZtc8rC2.js} +1 -1
  71. package/dist/client/assets/{hurl-B1wZgXxu.js → hurl-DLY2zDbW.js} +1 -1
  72. package/dist/client/assets/{index-C6Mc_m4A.js → index-cgJ1LsS0.js} +2 -2
  73. package/dist/client/assets/info-A6RAGUB7-1UmzJ6Yh.js +1 -0
  74. package/dist/client/assets/{infoDiagram-27XIBGKW-DtqxdpTI.js → infoDiagram-27XIBGKW-CSyIAEL0.js} +1 -1
  75. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-BPcQWyo2.js → ishikawaDiagram-5VMMS53U-CSHLlKWE.js} +1 -1
  76. package/dist/client/assets/{java-CYRVoAZ_.js → java-DZW_ICBi.js} +1 -1
  77. package/dist/client/assets/{javascript-BuaAczhl.js → javascript-BWvLJLNA.js} +1 -1
  78. package/dist/client/assets/{jinja-CTDE_Ev1.js → jinja-Ben2FnXj.js} +1 -1
  79. package/dist/client/assets/{jison-BtiqMSzE.js → jison-CMbJRuQ0.js} +1 -1
  80. package/dist/client/assets/{journeyDiagram-3NMN7TZE-Ce1ukpBU.js → journeyDiagram-3NMN7TZE-BfXAjpOK.js} +1 -1
  81. package/dist/client/assets/{json-CideWXO9.js → json-BvvciUfC.js} +1 -1
  82. package/dist/client/assets/{jsx-zt8U8sbH.js → jsx-yfKx2bOE.js} +1 -1
  83. package/dist/client/assets/{julia-DdR2g_t9.js → julia-DRSvnWPS.js} +1 -1
  84. package/dist/client/assets/{just-JhegFo3w.js → just-Du8ku1bO.js} +1 -1
  85. package/dist/client/assets/{kanban-definition-UXKFOSKX-CZF5qIUB.js → kanban-definition-UXKFOSKX-C86YlQnJ.js} +1 -1
  86. package/dist/client/assets/{latex-DIWlY3_E.js → latex-DHmG9FMo.js} +1 -1
  87. package/dist/client/assets/{liquid-DrrXvH2Z.js → liquid-BXJXswY3.js} +1 -1
  88. package/dist/client/assets/{lua-Do46vw8e.js → lua-BTpb7tBc.js} +1 -1
  89. package/dist/client/assets/{manim-CDbVAP2o.js → manim-DRinwbV-.js} +2 -2
  90. package/dist/client/assets/{marko-C1pSJOR-.js → marko-BnVs-3-0.js} +1 -1
  91. package/dist/client/assets/{mdc-BQZgPNt9.js → mdc-DoeT6sne.js} +1 -1
  92. package/dist/client/assets/{mdx-islands-client-CoQ9Yzh5.js → mdx-islands-client-CZZRD_Ds.js} +2 -2
  93. package/dist/client/assets/{mermaid-parser.core-5Bn_Qr-_.js → mermaid-parser.core-DMXrBfb8.js} +2 -2
  94. package/dist/client/assets/{mermaid.core-sYNYWYs_.js → mermaid.core-E2DVQTDU.js} +5 -5
  95. package/dist/client/assets/{mindmap-definition-YA3MSWOX-DHBO7Slo.js → mindmap-definition-YA3MSWOX-BLcMg5k1.js} +1 -1
  96. package/dist/client/assets/{nginx-DF-pdXSK.js → nginx-5S2WeDLn.js} +1 -1
  97. package/dist/client/assets/{nim-zOCo7slN.js → nim-BHcYH9Ta.js} +1 -1
  98. package/dist/client/assets/packet-AYTQ26CC-BEf4zGyI.js +1 -0
  99. package/dist/client/assets/{pegDiagram-XKGWAZYB-D75AEPkk.js → pegDiagram-XKGWAZYB-DMiFzvi3.js} +1 -1
  100. package/dist/client/assets/{perl-CAdDRakD.js → perl-D9nqyfuX.js} +1 -1
  101. package/dist/client/assets/{php-D1DZ202e.js → php-DFyU9gEo.js} +1 -1
  102. package/dist/client/assets/pie-WAS4IAKB-Dv_mQvf3.js +1 -0
  103. package/dist/client/assets/{pieDiagram-E7YTZNPT-CcGrpu1C.js → pieDiagram-E7YTZNPT-DWw3wsl8.js} +1 -1
  104. package/dist/client/assets/{pug-BYYvRASJ.js → pug-QYd69ZnC.js} +1 -1
  105. package/dist/client/assets/{qml-DLgF7sh2.js → qml-BFefOh7B.js} +1 -1
  106. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-CZKFEXVq.js → quadrantDiagram-AXDQQJYC-CLKBHXLE.js} +1 -1
  107. package/dist/client/assets/{r-DpkxXdVX.js → r-CPjbmNIe.js} +1 -1
  108. package/dist/client/assets/radar-RG4KPBEZ-DA6VuKhG.js +1 -0
  109. package/dist/client/assets/railroad-74A4TZTK-B71sByTl.js +1 -0
  110. package/dist/client/assets/{railroad-abnf-HS5TGJTU-Cl0qoGp2.js → railroad-abnf-HS5TGJTU-Bjc2t-2N.js} +1 -1
  111. package/dist/client/assets/{railroad-ebnf-LZEXJU2U-Cyl4xXzI.js → railroad-ebnf-LZEXJU2U-D61Nc8JN.js} +1 -1
  112. package/dist/client/assets/{railroad-peg-WCYAUIDC-C0Y-KBYJ.js → railroad-peg-WCYAUIDC-BM57DmTm.js} +1 -1
  113. package/dist/client/assets/{railroadDiagram-O6MQD6OU-BmD__O8g.js → railroadDiagram-O6MQD6OU-DY5a9gmr.js} +1 -1
  114. package/dist/client/assets/{razor-wmwGgKy1.js → razor-BlI3OaRi.js} +1 -1
  115. package/dist/client/assets/{regexp-C5x39rkn.js → regexp-DotCPcFy.js} +1 -1
  116. package/dist/client/assets/{requirementDiagram-BXWQKSXE-COeDAYl6.js → requirementDiagram-BXWQKSXE-CnRb59S8.js} +1 -1
  117. package/dist/client/assets/{routes-BGUf2sYC.js → routes-BkusNhax.js} +1 -1
  118. package/dist/client/assets/{rst-DxXg2W55.js → rst-QPAdnWYz.js} +1 -1
  119. package/dist/client/assets/{ruby-DNtA9zX8.js → ruby-BpHI9gf-.js} +1 -1
  120. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-D1rI_tYq.js → sankeyDiagram-P5KCCOFB-B7t7gwu0.js} +1 -1
  121. package/dist/client/assets/{sas-EJaJcf-6.js → sas-B5iDUyM2.js} +1 -1
  122. package/dist/client/assets/{scss-8rAKT-ke.js → scss-JwsJdiRm.js} +1 -1
  123. package/dist/client/assets/{search-DZn_wAQa.js → search-COOXisjD.js} +1 -1
  124. package/dist/client/assets/{search-FgpTjWpK.js → search-DqtfsAHI.js} +1 -1
  125. package/dist/client/assets/{search-static-DkaXaorc.js → search-static-BnLdpxF4.js} +1 -1
  126. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-CaHgySis.js → sequenceDiagram-WJ2MYXX4-CYxMNQwa.js} +1 -1
  127. package/dist/client/assets/{shellscript-DdLeqOcM.js → shellscript-DzQDd5VJ.js} +1 -1
  128. package/dist/client/assets/{shellsession-DKhgvQ4M.js → shellsession-Dm4Bwsfm.js} +1 -1
  129. package/dist/client/assets/{sizeCapture-INFHLROL-Bd4l40QU.js → sizeCapture-INFHLROL-st3aucsS.js} +1 -1
  130. package/dist/client/assets/{soy-BvhcO3PP.js → soy-DC-KbsgK.js} +1 -1
  131. package/dist/client/assets/{sql-CPrdrOMk.js → sql-ck8vD86N.js} +1 -1
  132. package/dist/client/assets/{stata-DqpetjKB.js → stata-B8pcg3bQ.js} +1 -1
  133. package/dist/client/assets/{stateDiagram-D77RDMKH-C42r4PVe.js → stateDiagram-D77RDMKH-BKSFDVyI.js} +1 -1
  134. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-B82qw-HI.js +1 -0
  135. package/dist/client/assets/{surrealql-MBZPiYVy.js → surrealql-DUQhgmsD.js} +1 -1
  136. package/dist/client/assets/{svelte-BxukE43t.js → svelte-DrUp7BYJ.js} +1 -1
  137. package/dist/client/assets/{swimlanes-42K2YHIH-DIGvKgoo.js → swimlanes-42K2YHIH-DlHP2guJ.js} +1 -1
  138. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-DlLAYSPx.js +8 -0
  139. package/dist/client/assets/{templ-Byx4xwKG.js → templ-C83XINgi.js} +1 -1
  140. package/dist/client/assets/{tex-Bz1mw_q-.js → tex-BzpsdCpH.js} +1 -1
  141. package/dist/client/assets/{timeline-definition-24CTP7MA-DPIDU0x5.js → timeline-definition-24CTP7MA-CDbUvSR1.js} +1 -1
  142. package/dist/client/assets/treeView-Q6P3EWNA-D1L7ZD2G.js +1 -0
  143. package/dist/client/assets/treemap-WGGIJYW6-CElKlcBs.js +1 -0
  144. package/dist/client/assets/{ts-tags-BBNYGBoq.js → ts-tags-BUF3r9sP.js} +1 -1
  145. package/dist/client/assets/{tsx-BNUMEy-p.js → tsx-BnISB5Pz.js} +1 -1
  146. package/dist/client/assets/{twig-D3QcNbc6.js → twig-bhJrQRqc.js} +1 -1
  147. package/dist/client/assets/{typescript-DrVm5hh5.js → typescript-DoobgrEI.js} +1 -1
  148. package/dist/client/assets/{unavailable-qQ2SryUk.js → unavailable-DgOjAtkq.js} +1 -1
  149. package/dist/client/assets/{vennDiagram-4TSXK5OY-DFTq-WF7.js → vennDiagram-4TSXK5OY-CM7PWHmM.js} +1 -1
  150. package/dist/client/assets/{vue-cZZHuzMP.js → vue-DqRrDXzN.js} +1 -1
  151. package/dist/client/assets/{vue-html-D-65KeX1.js → vue-html-Cgbkogyv.js} +1 -1
  152. package/dist/client/assets/{vue-vine-DuXohmAn.js → vue-vine-BtYkUzvX.js} +1 -1
  153. package/dist/client/assets/wardley-WFR3VGLG-BIR_Rnuh.js +1 -0
  154. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-DnUr1u-c.js → wardleyDiagram-VM6X3IG4-CTjeB9Un.js} +1 -1
  155. package/dist/client/assets/{xml-DGuXmGVc.js → xml-gFbqnCxm.js} +1 -1
  156. package/dist/client/assets/{xsl-CVthNgnt.js → xsl-DBCwA-9a.js} +1 -1
  157. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-DqMbelwm.js → xychartDiagram-S5SC5T6Z-BwIWb2MA.js} +1 -1
  158. package/dist/client/assets/{yaml-C4Znjb9S.js → yaml-h9DhnAAO.js} +1 -1
  159. package/dist/server/assets/{_-9Hh3JhOB.js → _-1SPilyc8.js} +1 -1
  160. package/dist/server/assets/{_-ho-3ksPN.js → _-dM-W4LlQ.js} +1 -1
  161. package/dist/server/assets/{_bookSlug-4SrxknVX.js → _bookSlug-C0kyTRI3.js} +1 -1
  162. package/dist/server/assets/{_tanstack-start-manifest_v-CC6bPf0Q.js → _tanstack-start-manifest_v-kKXPIOzd.js} +22 -22
  163. package/dist/server/assets/{book-Bq30mQXq.js → book-1ThQeiGx.js} +1 -1
  164. package/dist/server/assets/{router-C0lH26d_.js → router-u8cLpIpS.js} +6 -6
  165. package/dist/server/assets/{routes-ClgFFss0.js → routes-CLojsoNx.js} +2 -2
  166. package/dist/server/assets/{search-JWooEkUB.js → search-CEVMGa8v.js} +1 -1
  167. package/dist/server/assets/{search-uEVZFfFe.js → search-DJQnqTxt.js} +1 -1
  168. package/dist/server/server.js +8 -8
  169. package/package.json +3 -3
  170. package/dist/client/assets/_-DTdSoqkx.js +0 -1
  171. package/dist/client/assets/_-DfqnTmmO.js +0 -1
  172. package/dist/client/assets/channel-BxZFC8-g.js +0 -1
  173. package/dist/client/assets/chunk-2Q5K7J3B-PRKXgEbj.js +0 -1
  174. package/dist/client/assets/classDiagram-ZZMXUADV-DsFDcWi1.js +0 -1
  175. package/dist/client/assets/classDiagram-v2-VYDZK3BY-DsFDcWi1.js +0 -1
  176. package/dist/client/assets/cynefin-OW5HDTMX-DDfNtWd3.js +0 -1
  177. package/dist/client/assets/flowDiagram-HODETNUW-BOEjE2kK.js +0 -1
  178. package/dist/client/assets/gitGraph-4MIJSDKK-DOU8UBPg.js +0 -1
  179. package/dist/client/assets/info-A6RAGUB7-DatbH9W8.js +0 -1
  180. package/dist/client/assets/packet-AYTQ26CC-8NUGsMQB.js +0 -1
  181. package/dist/client/assets/pie-WAS4IAKB-DX04D08l.js +0 -1
  182. package/dist/client/assets/radar-RG4KPBEZ-BYR6aUA7.js +0 -1
  183. package/dist/client/assets/railroad-74A4TZTK-D81BRwYP.js +0 -1
  184. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-Dkk0emrL.js +0 -1
  185. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-Cwjux1KI.js +0 -8
  186. package/dist/client/assets/treeView-Q6P3EWNA-4YOIRs_y.js +0 -1
  187. package/dist/client/assets/treemap-WGGIJYW6-Bw5yn6ti.js +0 -1
  188. package/dist/client/assets/wardley-WFR3VGLG-kvANkmrv.js +0 -1
@@ -1,4 +1,4 @@
1
- import{_ as e,c as t,f as n,h as r,p as i,u as a}from"./index-C6Mc_m4A.js";var o=n(),s=e(i(),1);function c(...e){return t=>{let n=[],r=!1;for(let i of e)if(typeof i==`function`){let e=i(t);typeof e==`function`?(r=!0,n.push(e)):n.push(()=>i(null))}else i&&(i.current=t,n.push(()=>{i.current=null}));if(r)return()=>{for(let e of n)e()}}}function l(...e){return(0,s.useCallback)(c(...e),e)}function u(e){return e==null?[]:Array.isArray(e)?e:[e]}var d=e=>e[0],f=e=>e[e.length-1],p=(e,t)=>e.indexOf(t)!==-1,m=(e,...t)=>e.concat(t),h=(e,...t)=>e.filter(e=>!t.includes(e)),g=(e,t)=>e.filter((e,n)=>n!==t),_=e=>Array.from(new Set(e)),v=(e,t)=>p(e,t)?h(e,t):m(e,t);function y(e,t,n={}){let{step:r=1,loop:i=!0}=n,a=t+r,o=e.length,s=o-1;return t===-1?r>0?0:s:a<0?i?s:0:a>=o?i?0:t>o?o:t:a}function b(e,t,n={}){return e[y(e,t,n)]}function x(e,t,n={}){let{step:r=1,loop:i=!0}=n;return y(e,t,{step:-r,loop:i})}function S(e,t,n={}){return e[x(e,t,n)]}var C=e=>e?.constructor.name===`Array`,w=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!T(e[n],t[n]))return!1;return!0},T=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if(C(e)&&C(t))return w(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;if(Object.keys(e).length!==r)return!1;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!T(e[r],t[r]))return!1}return!0},E=e=>Array.isArray(e),D=e=>e===!0||e===!1,O=e=>typeof e==`object`&&!!e,ee=e=>O(e)&&!E(e),te=e=>typeof e==`number`&&!Number.isNaN(e),k=e=>typeof e==`string`,A=e=>typeof e==`function`,j=e=>e==null,M=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),N=e=>Object.prototype.toString.call(e),P=Function.prototype.toString,ne=P.call(Object),re=e=>{if(!O(e)||N(e)!=`[object Object]`||F(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=M(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&P.call(n)==ne},ie=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,ae=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,F=e=>ie(e)||ae(e),oe=(e,...t)=>(typeof e==`function`?e(...t):e)??void 0,se=e=>e(),ce=()=>{},I=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})},le=(()=>{let e=0;return()=>(e++,e.toString(36))})();function ue(e,t,...n){if(e in t){let r=t[e];return A(r)?r(...n):r}let r=Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw Error.captureStackTrace?.(r,ue),r}var{floor:de,abs:L,round:fe,min:pe,max:me,pow:he,sign:ge}=Math,_e=e=>Number.isNaN(e),ve=e=>_e(e)?0:e,ye=(e,t)=>(e%t+t)%t,be=(e,t)=>ve(e)>=t,xe=(e,t)=>ve(e)<=t,Se=(e,t,n)=>{let r=ve(e);return(t==null||r>=t)&&(n==null||r<=n)},Ce=(e,t,n)=>pe(me(ve(e),t),n),we=(e,t)=>typeof t==`number`?de(e*t+.5)/t:fe(e),Te=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},Ee=(e,t,n)=>{let r=t===`+`?e+n:e-n;if(e%1!=0||n%1!=0){let i=10**Math.max(Te(e),Te(n));e=Math.round(e*i),n=Math.round(n*i),r=t===`+`?e+n:e-n,r/=i}return r},De=(e,t)=>Ee(ve(e),`+`,t),Oe=(e,t)=>Ee(ve(e),`-`,t),R=e=>typeof e==`number`?`${e}px`:e;function ke(e){if(!re(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=ke(t))}return n}function Ae(e,t){let n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=t)}return n}function je(e,t){if(!t)return e;let n={...e},r=t;for(let e in r){let t=r[e];t!==void 0&&(n[e]=t)}return n}function Me(e,t=Object.is){let n={...e},r=new Set,i=e=>(r.add(e),()=>r.delete(e)),a=()=>{r.forEach(e=>e())};return{subscribe:i,get:e=>n[e],set:(e,r)=>{t(n[e],r)||(n[e]=r,a())},update:e=>{let r=!1;for(let i in e){let a=e[i];a!==void 0&&!t(n[i],a)&&(n[i]=a,r=!0)}r&&a()},snapshot:()=>({...n})}}function Ne(e){"@babel/helpers - typeof";return Ne=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ne(e)}function Pe(e,t){if(Ne(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(Ne(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Fe(e){var t=Pe(e,`string`);return Ne(t)==`symbol`?t:t+``}function Ie(e,t,n){return(t=Fe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Le(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function Re(e,t,n){Le(e,t),t.set(e,n)}function ze(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function Be(e,t){return e.get(ze(e,t))}var Ve=()=>performance.now(),He=new WeakMap,Ue=class{constructor(e){this.onTick=e,Ie(this,`frameId`,null),Ie(this,`pausedAtMs`,null),Ie(this,`context`,void 0),Ie(this,`cancelFrame`,()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),Ie(this,`setStartMs`,e=>{this.context.startMs=e}),Ie(this,`start`,()=>{if(this.frameId!==null)return;let e=Ve();this.pausedAtMs===null?this.context.startMs=e:(this.context.startMs+=e-this.pausedAtMs,this.pausedAtMs=null),this.frameId=requestAnimationFrame(Be(He,this))}),Ie(this,`pause`,()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=Ve())}),Ie(this,`stop`,()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),Re(this,He,e=>{this.context.now=e,this.context.deltaMs=e-this.context.startMs,this.onTick(this.context)===!1?this.stop():this.frameId=requestAnimationFrame(Be(He,this))}),this.context={now:0,startMs:Ve(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs===null?Ve()-this.context.startMs:this.pausedAtMs-this.context.startMs}};function We(e,t){let n=new Ue(({deltaMs:n})=>{if(n>=t)return e(),!1});return n.start(),()=>n.stop()}function Ge(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Ke(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function qe(e,t){if(e==null)throw Error(t())}function Je(e,t,n){let r=[];for(let n of t)e[n]??r.push(n);if(r.length>0)throw Error(`[zag-js${n?` > ${n}`:``}] missing required props: ${r.join(`, `)}`)}var Ye=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),Xe=(...e)=>Array.from(new Set(Ye(...e).split(/\s+/).filter(Boolean))).join(` `),Ze=/((?:--)?(?:\w+-?)+)\s*:\s*([\s\S]*)/,Qe=e=>{let t={},n=e=>{let n=Ze.exec(e);n&&(t[n[1]]=n[2])},r=0,i=0,a=``,o=!1;for(let t=0;t<e.length;t++){let s=e[t];o?s===`*`&&e[t+1]===`/`&&(o=!1,t++):a?(s===`\\`&&t++,s===a&&(a=``)):s===`\\`?t++:s===`/`&&e[t+1]===`*`?(o=!0,t++):s===`"`||s===`'`?a=s:s===`(`?i++:s===`)`&&i?i--:s===`;`&&!i&&(n(e.slice(r,t)),r=t+1)}return n(e.slice(r)),t},$e=(e,t)=>{if(k(e)){if(k(t))return`${e};${t}`;e=Qe(e)}else k(t)&&(t=Qe(t));return Object.assign({},e??{},t??{})};function z(...e){let t={};for(let n of e){if(!n)continue;for(let e in t)t[e]=e.startsWith(`on`)&&typeof t[e]==`function`&&typeof n[e]==`function`?I(n[e],t[e]):e===`className`||e===`class`?Ye(t[e],n[e]):e===`style`?$e(t[e],n[e]):e===`data-ownedby`?Xe(t[e],n[e]):n[e]===void 0?t[e]:n[e];for(let e in n)t[e]===void 0&&(t[e]=n[e]);let e=Object.getOwnPropertySymbols(n);for(let r of e)t[r]=n[r]}return t}function et(e,t,n){let r=[],i;return a=>{let o=e(a);return(o.length!==r.length||o.some((e,t)=>!T(r[t],e)))&&(r=o,i=t(o,a),n?.onChange?.(i)),i}}function tt(){let e=new Map;return{claim(t){let n=Symbol(t);return e.set(t,n),n},isReplaced(t,n){return e.get(t)!==n}}}var nt=`.`,rt=`#`,it=new WeakMap,at=new WeakMap;function ot(e){return e.join(nt)}function st(e){return e.includes(nt)}function ct(e){return e.startsWith(rt)}function lt(e){return e.startsWith(nt)}function ut(e){return ct(e)?e.slice(1):e}function dt(e,t){return e?`${e}${nt}${t}`:t}function ft(e){let t=new Map,n=new Map,r=(e,i)=>{t.set(e,i);let a=i.id;a&&(n.has(a)&&Ke(`[zag-js] Duplicate state id: "${a}"`),n.set(a,e));let o=i.states;if(o){qe(i.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),i.initial in o||Ke(`[zag-js] Compound state "${e}" has initial "${String(i.initial)}" which is not a child state`);for(let[t,n]of Object.entries(o)){if(!n)continue;let i=dt(e,t);r(i,n)}}};for(let[t,n]of Object.entries(e.states))n&&r(t,n);return{index:t,idIndex:n}}function pt(e){let t=it.get(e);if(t)return t;let{index:n,idIndex:r}=ft(e);return it.set(e,n),at.set(e,r),n}function mt(e,t){return pt(e),at.get(e)?.get(t)}function ht(e){return e?String(e).split(nt).filter(Boolean):[]}function gt(e,t){if(!t)return[];let n=pt(e),r=ht(t),i=[],a=[];for(let e of r){a.push(e);let t=ot(a),r=n.get(t);if(!r)break;i.push({path:t,state:r})}return i}function _t(e,t){let n=pt(e),r=ht(t);if(!r.length)return t;let i=[];for(let e of r){i.push(e);let r=ot(i);if(!n.has(r))return t}let a=ot(i),o=n.get(a);for(;o?.initial;){let e=`${a}${nt}${o.initial}`,t=n.get(e);if(!t)break;a=e,o=t}return a}function vt(e,t){return pt(e).has(t)}function yt(e,t,n){let r=String(t);if(ct(r)){let t=ut(r),n=mt(e,t);return qe(n,()=>`[zag-js] Unknown state id: "${t}"`),_t(e,n)}if(lt(r)&&n)return _t(e,dt(n,r.slice(1)));if(!st(r)&&n){let t=ht(n);for(let n=t.length-1;n>=1;n--){let i=dt(t.slice(0,n).join(nt),r);if(vt(e,i))return _t(e,i)}if(vt(e,r))return _t(e,r)}return _t(e,r)}function bt(e,t,n){let r=gt(e,t);for(let e=r.length-1;e>=0;e--){let t=r[e]?.state.on?.[n];if(t)return{transitions:t,source:r[e]?.path}}return{transitions:e.on?.[n],source:void 0}}function xt(e,t,n,r){let i=t?gt(e,t):[],a=gt(e,n),o=0;for(;o<i.length&&o<a.length&&i[o]?.path===a[o]?.path;)o+=1;let s=i.slice(o).reverse(),c=a.slice(o),l=i[i.length-1]?.path===a[a.length-1]?.path;return r&&l&&(s=i.slice().reverse(),c=a),{exiting:s,entering:c}}function St(e,t){return e?e===t||e.startsWith(`${t}${nt}`):!1}function Ct(e,t,n){return gt(e,t).some(e=>e.state.tags?.includes(n))}function wt(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function Tt(e){return pt(e),e}function Et(){return{guards:wt(),createMachine:e=>Tt(e),choose:e=>function({choose:t}){return t(e)?.actions}}}var Dt=function(e){return e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e}({}),Ot=`__init__`,kt=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]),At=(...e)=>t=>e.reduce((e,t)=>t(e),t),jt=()=>void 0,Mt=e=>typeof e==`object`&&!!e,Nt=0x7fffffff,B=e=>e?``:void 0,Pt=e=>e?`true`:void 0,Ft=/\\/g,It=/"/g,Lt=e=>globalThis.CSS?.escape?.(e)??e.replace(Ft,`\\\\`).replace(It,`\\"`),Rt=e=>`[data-ownedby~="${Lt(String(e))}"]`,zt=1,Bt=9,Vt=11,Ht=e=>Mt(e)&&e.nodeType===zt&&typeof e.nodeName==`string`,Ut=e=>Mt(e)&&e.nodeType===zt&&typeof e.nodeName==`string`,Wt=e=>Mt(e)&&e.nodeType===Bt,Gt=e=>Mt(e)&&e===e.window,Kt=e=>Ut(e)?e.localName||``:`#document`;function qt(e){return[`html`,`body`,`#document`].includes(Kt(e))}var Jt=e=>Mt(e)&&e.nodeType!==void 0,Yt=e=>Jt(e)&&e.nodeType===Vt&&`host`in e,Xt=e=>Ut(e)&&e.localName===`input`,Zt=e=>!!e?.matches(`a[href]`),Qt=e=>Ut(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function $t(e){return e?sn(e.getRootNode())===e:!1}var en=/(textarea|select)/;function tn(e){if(e==null||!Ut(e))return!1;try{return Xt(e)&&e.selectionStart!=null||en.test(e.localName)||e.isContentEditable||e.getAttribute(`contenteditable`)===`true`||e.getAttribute(`contenteditable`)===``}catch{return!1}}function nn(e,t){if(!e||!t||!Ut(e)||!Jt(t))return!1;if(Ut(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&Yt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}let r=t.ownerDocument?.defaultView?.frameElement;return r&&t.ownerDocument!==e.ownerDocument?nn(e,r):!1}function rn(e){return Wt(e)?e:Gt(e)?e.document:e?.ownerDocument??document}function an(e){return rn(e).documentElement}function on(e){return Yt(e)?on(e.host):Wt(e)?e.defaultView??window:Ut(e)?e.ownerDocument?.defaultView??window:window}function sn(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function cn(e,t){return!e||e===rn(e).body?!1:!t.some(t=>nn(t,e))}function ln(e){if(Kt(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Yt(e)&&e.host||an(e);return Yt(t)?t.host:t}function un(e){let t;try{if(t=e.getRootNode({composed:!0}),Wt(t)||Yt(t))return t}catch{}return e.ownerDocument??document}var dn=new WeakMap;function fn(e){return dn.has(e)||dn.set(e,on(e).getComputedStyle(e)),dn.get(e)}var pn=()=>typeof document<`u`;function mn(){return navigator.userAgentData?.platform??navigator.platform}function hn(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var gn=e=>pn()&&e.test(mn()),_n=e=>pn()&&e.test(hn()),vn=e=>pn()&&e.test(navigator.vendor),yn=/^iPhone/i,bn=/^iPad/i,xn=/^Mac/i,Sn=/apple/i,Cn=/Firefox/i,wn=/Chrome/i,Tn=/AppleWebKit/i,En=/Android/i,Dn=()=>pn()&&!!navigator.maxTouchPoints,On=()=>gn(yn),kn=()=>gn(bn)||Mn()&&navigator.maxTouchPoints>1,An=()=>On()||kn(),jn=()=>Mn()||An(),Mn=()=>gn(xn),Nn=()=>jn()&&vn(Sn),Pn=()=>_n(Cn),Fn=()=>_n(wn),In=()=>_n(Tn)&&!Fn(),Ln=()=>_n(En);function Rn(e){if(!e)return!1;try{return e.selectionStart===0&&e.selectionEnd===0}catch{return e.value===``}}function zn(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch{}}var Bn=new Set([`menu`,`listbox`,`dialog`,`grid`,`tree`,`region`,`application`]),Vn=e=>Bn.has(e),Hn=e=>e.getAttribute(`aria-controls`)?.split(` `)||[];function Un(e,t){let n=new Set,r=un(e),i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Hn(e);for(let e of a){if(!e||n.has(e))continue;n.add(e);let a=r.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;if(e&&Vn(e)&&!n&&(a===t||a.contains(t)||i(a)))return!0}}}return!1};return i(e)}function Wn(e,t){let n=un(e),r=new Set,i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Hn(e);for(let e of a){if(!e||r.has(e))continue;r.add(e);let a=n.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;e&&Bn.has(e)&&!n&&(t(a),i(a))}}}};i(e)}function Gn(e){let t=new Set;return Wn(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function Kn(e){let t=e.getAttribute(`role`);return!!(t&&Bn.has(t))}function qn(e){return e.hasAttribute(`aria-controls`)&&e.getAttribute(`aria-expanded`)===`true`}function Jn(e){return qn(e)?!0:!!e.querySelector?.(`[aria-controls][aria-expanded="true"]`)}function Yn(e){if(!e.id)return!1;let t=un(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&Kn(e))}function Xn(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function Zn(e){return Xn(e)?.[0]??e.target}function Qn(e){let t=e.currentTarget;if(!t||!t.matches(`a[href], button[type='submit'], input[type='submit']`))return!1;let n=e.button===1,r=tr(e);return n||r}function $n(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n===`a`||n===`button`&&t.type===`submit`||n===`input`&&t.type===`submit`:!1}function er(e){return ur(e).isComposing||e.keyCode===229}function tr(e){return Mn()?e.metaKey:e.ctrlKey}function nr(e){return e.pointerType===``&&e.isTrusted?!0:Ln()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var rr=e=>e.button===0,ir=e=>e.button===2||Mn()&&e.ctrlKey&&e.button===0,ar=e=>e.ctrlKey||e.altKey||e.metaKey,or=e=>`touches`in e&&e.touches.length>0,sr={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},cr={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function lr(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=sr[i]??i,n===`rtl`&&r===`horizontal`&&i in cr&&(i=cr[i]),i}function ur(e){return e.nativeEvent??e}var dr=new Set([`PageUp`,`PageDown`]),fr=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]);function pr(e){return dr.has(e.key)||e.shiftKey&&fr.has(e.key)?10:1}function mr(e,t){let{step:n,largeStep:r,smallStep:i}=t,a=fr.has(e.key);return i!=null&&e.altKey&&a?i:dr.has(e.key)||e.shiftKey&&a?r:n}function hr(e,t=`client`){let n=or(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var V=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}},gr=e=>{let t=Xn(e)?.[0]??e.target;return e.currentTarget===t};function _r(e,t){let{type:n=`HTMLInputElement`,property:r=`value`}=t,i=on(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,r)??{}}function vr(e){if(e.localName===`input`)return`HTMLInputElement`;if(e.localName===`textarea`)return`HTMLTextAreaElement`;if(e.localName===`select`)return`HTMLSelectElement`}function yr(e,t,n=`value`){if(!e)return;let r=vr(e);r&&_r(e,{type:r,property:n}).set?.call(e,t),e.setAttribute(n,t)}function br(e,t){e&&(_r(e,{type:`HTMLInputElement`,property:`checked`}).set?.call(e,t),t?e.setAttribute(`checked`,``):e.removeAttribute(`checked`))}function xr(e,t){let{value:n,bubbles:r=!0}=t;if(!e)return;let i=on(e);if(!(e instanceof i.HTMLInputElement))return;yr(e,`${n}`);let a=new i.Event(`input`,{bubbles:r});e.dispatchEvent(kr(a))}function Sr(e,t){let{checked:n,bubbles:r=!0}=t;if(!e)return;let i=on(e);if(!(e instanceof i.HTMLInputElement))return;br(e,n);let a=new i.Event(`click`,{bubbles:r});e.dispatchEvent(kr(a))}function Cr(e){return e.matches(`textarea, input, select, button`)}function wr(e,t){if(!e)return;let n=Cr(e)?e.form:e.closest(`form`),r=e=>{e.defaultPrevented||t()};return n?.addEventListener(`reset`,r,{passive:!0}),()=>n?.removeEventListener(`reset`,r)}function Tr(e,t){let n=e?.closest(`fieldset`);if(!n)return;t(n.disabled);let r=new(on(n)).MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:[`disabled`]}),()=>r.disconnect()}function Er(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:r}=t,i=[wr(e,r),Tr(e,n)];return()=>i.forEach(e=>e?.())}var Dr=Symbol.for(`zag.changeEvent`);function Or(e){return Object.prototype.hasOwnProperty.call(e,Dr)}function kr(e){return Or(e)||Object.defineProperty(e,Dr,{value:!0}),e}var Ar=e=>Ut(e)&&e.tagName===`IFRAME`,jr=/^(audio|video|details)$/;function Mr(e){let t=e.getAttribute(`tabindex`);return t?parseInt(t,10):NaN}var Nr=e=>!Number.isNaN(Mr(e)),Pr=e=>Mr(e)<0;function Fr(e){return Xt(e)&&e.type===`radio`}function Ir(e){if(!Fr(e)||!e.name||e.checked)return!0;let t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter(t=>t.form===e.form&&Vr(t)),i=r.find(e=>e.checked);return i?i===e:r[0]===e}function Lr(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function Rr(e,t,n){let r=[...e],i=[...e],a=new Set,o=new Map;e.forEach((e,t)=>o.set(e,t));let s=0;for(;s<i.length;){let e=i[s++];if(!e||a.has(e))continue;a.add(e);let c=Lr(e,t);if(c){let t=Array.from(c.querySelectorAll(zr)).filter(n),a=o.get(e);if(a!==void 0){let e=a+1;r.splice(e,0,...t),t.forEach((t,n)=>{o.set(t,e+n)});for(let n=e+t.length;n<r.length;n++)o.set(r[n],n)}else{let e=r.length;r.push(...t),t.forEach((t,n)=>{o.set(t,e+n)})}i.push(...t)}}return r}var zr=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`,Br=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(zr));(n==1||n==`if-empty`&&i.length===0)&&Ut(e)&&Vr(e)&&i.unshift(e);let a=[];for(let e of i)if(Vr(e)){if(Ar(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...Br(t,{getShadowRoot:r}))}else a.push(e)}return r?Rr(a,r,Vr):a};function Vr(e){return!Ut(e)||e.closest(`[inert]`)?!1:e.matches(zr)&&Qt(e)}function Hr(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(zr));n&&Ur(e)&&i.unshift(e);let a=[];for(let e of i)if(Ur(e)){if(Ar(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...Hr(t,{getShadowRoot:r}))}else a.push(e)}if(r){let e=Rr(a,r,Ur);return!e.length&&n?i:e}return!a.length&&n?i:a}function Ur(e){return Ut(e)&&e.tabIndex>0?!0:!Vr(e)||Pr(e)?!1:Ir(e)}function Wr(e,t={}){let n=Hr(e,t);return[n[0]||null,n[n.length-1]||null]}function Gr(e){return e.tabIndex<0&&(jr.test(e.localName)||tn(e))&&!Nr(e)?0:e.tabIndex}function Kr(e){let{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return!1;let a=typeof n==`function`?n():n;return a!==!1&&(a||=t?.matches(`[data-autofocus],[autofocus]`)?t:t?.querySelector(`[data-autofocus],[autofocus]`),a||=Hr(t).filter(e=>!r||r(e)).find(e=>!e.hasAttribute(`data-no-autofocus`)),a||t||void 0)}function qr(e){let t=e.currentTarget;if(!t)return!1;let[n,r]=Wr(t);return!($t(n)&&e.shiftKey||$t(r)&&!e.shiftKey||!n&&!r)}function Jr(e){"@babel/helpers - typeof";return Jr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Jr(e)}function Yr(e,t){if(Jr(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(Jr(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Xr(e){var t=Yr(e,`string`);return Jr(t)==`symbol`?t:t+``}function Zr(e,t,n){return(t=Xr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qr=class e{constructor(){Zr(this,`id`,null),Zr(this,`fn_cleanup`,void 0),Zr(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function H(e){let t=Qr.create();return t.request(e),t.cleanup}function $r(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function ei(e,t,n){let r=H(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{r(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),r}var ti=new WeakMap;function ni(e){let t={childList:!!e.childList,subtree:!!e.subtree,attributes:e.attributes??(e.attributeOldValue!==void 0||e.attributeFilter!==void 0),characterData:e.characterData??e.characterDataOldValue!==void 0,attributeOldValue:!!e.attributeOldValue,characterDataOldValue:!!e.characterDataOldValue};return e.attributeFilter!==void 0&&(t.attributeFilter=[...new Set(e.attributeFilter)].sort()),t}function ri(e){let t=ni(e),n=JSON.stringify(t);return{observe(e,r){let i=on(e);if(typeof i.MutationObserver!=`function`)return jt;let a=ti.get(e)??new Map,o=a.get(n);if(!o){let r=new Set,s=new i.MutationObserver(e=>{for(let t of[...r])if(r.has(t))try{t(e)}catch(e){i.queueMicrotask(()=>{throw e})}});s.observe(e,t),o={observer:s,listeners:r},a.set(n,o),ti.set(e,a)}let s=e=>r(e);return o.listeners.add(s),()=>{!o.listeners.delete(s)||o.listeners.size>0||(o.observer.disconnect(),a.delete(n),a.size===0&&ti.delete(e))}}}}function ii(e,t){if(!e)return;let{attributes:n,callback:r}=t,i=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)t.type===`attributes`&&t.attributeName&&n.includes(t.attributeName)&&r(t)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function ai(e,t){let{defer:n}=t,r=n?H:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(ii(n,t))})),()=>{i.forEach(e=>e?.())}}function oi(e,t){let{callback:n}=t;if(!e)return;let r=new(e.ownerDocument.defaultView||window).MutationObserver(n);return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()}function si(e,t){let{defer:n}=t,r=n?H:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(oi(n,t))})),()=>{i.forEach(e=>e?.())}}function ci(e,t,n={}){if(!t)return null;let{orientation:r=`both`,loop:i=!0,dir:a=`ltr`,key:o}=n;if(!e.length||!o)return null;let s=o===`ArrowUp`||o===`ArrowDown`,c=o===`ArrowLeft`||o===`ArrowRight`;if(!s&&!c&&o!==`Home`&&o!==`End`||r===`vertical`&&c||r===`horizontal`&&s)return null;if(o===`Home`)return e[0]||null;if(o===`End`)return e[e.length-1]||null;let l=e.indexOf(t);if(l===-1)return null;let u;return u=r===`both`?o===`ArrowDown`||(a===`ltr`?o===`ArrowRight`:o===`ArrowLeft`):s?o===`ArrowDown`:a===`ltr`?o===`ArrowRight`:o===`ArrowLeft`,e[u?i?(l+1)%e.length:Math.min(l+1,e.length-1):i?(l-1+e.length)%e.length:Math.max(0,l-1)]||null}function li(e){return{metaKey:!!e?.metaKey,ctrlKey:!!e?.ctrlKey,shiftKey:!!e?.shiftKey,altKey:!!e?.altKey}}function ui(e){return e.metaKey||e.ctrlKey||e.shiftKey||e.altKey}function di(e,t){let n=li(t),r=ui(n),i=()=>{let t=on(e);r&&In()&&Mn()&&!kn()?e.dispatchEvent(new t.KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,...n})):e.dispatchEvent(new t.MouseEvent(`click`,n))};Pn()?ei(e,`keyup`,i):queueMicrotask(i)}function fi(e){let t=ln(e);return qt(t)?rn(t).body:Ut(t)&&gi(t)?t:fi(t)}function pi(e,t=[]){let n=fi(e),r=n===e.ownerDocument.body,i=on(n);return r?t.concat(i,i.visualViewport||[],gi(n)?n:[]):t.concat(n,pi(n,[]))}var mi=/auto|scroll|overlay|hidden|clip/,hi=new Set([`inline`,`contents`]);function gi(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=on(e).getComputedStyle(e);return mi.test(t+r+n)&&!hi.has(i)}function _i(e,t){let n=e.body,r=`pointerLockElement`in e||`mozPointerLockElement`in e,i=()=>!!e.pointerLockElement;function a(){t?.(i())}function o(n){i()&&t?.(!1),console.error(`PointerLock error occurred:`,n),e.exitPointerLock()}if(!r)return;try{n.requestPointerLock()}catch{}let s=[V(e,`pointerlockchange`,a,!1),V(e,`pointerlockerror`,o,!1)];return()=>{s.forEach(e=>e()),e.exitPointerLock()}}var vi=`default`,yi=``,bi=new WeakMap;function xi(e={}){let{target:t,doc:n}=e,r=n??document,i=r.documentElement;return An()?(vi==="default"&&(yi=i.style.webkitUserSelect,i.style.webkitUserSelect=`none`),vi=`disabled`):t&&(bi.set(t,t.style.userSelect),t.style.userSelect=`none`),()=>Si({target:t,doc:r})}function Si(e={}){let{target:t,doc:n}=e,r=(n??document).documentElement;if(An()){if(vi!==`disabled`)return;vi=`restoring`,setTimeout(()=>{$r(()=>{vi===`restoring`&&(r.style.webkitUserSelect===`none`&&(r.style.webkitUserSelect=yi||``),yi=``,vi=`default`)})},300)}else if(t&&bi.has(t)){let e=bi.get(t);t.style.userSelect===`none`&&(t.style.userSelect=e??``),t.getAttribute(`style`)===``&&t.removeAttribute(`style`),bi.delete(t)}}function Ci(e={}){let{defer:t,target:n,...r}=e,i=t?H:e=>e(),a=[];return a.push(i(()=>{let e=typeof n==`function`?n():n;a.push(xi({...r,target:e}))})),()=>{a.forEach(e=>e?.())}}function wi(e,t){let{onPointerMove:n,onPointerUp:r}=t,i=e=>{let t=hr(e);Math.sqrt(t.x**2+t.y**2)<(e.pointerType===`touch`?10:5)||(e.pointerType===`mouse`&&e.buttons===0?a(e):n({point:t,event:e}))},a=e=>{let t=hr(e);r({point:t,event:e})},o=[V(e,`pointermove`,i,!1),V(e,`pointerup`,a,!1),V(e,`pointercancel`,a,!1),V(e,`contextmenu`,a,!1),Ci({doc:e})];return()=>{o.forEach(e=>e())}}function Ti(e){let{pointerNode:t,keyboardNode:n=t,onPress:r,onPressStart:i,onPressEnd:a,isValidKey:o=e=>e.key===`Enter`}=e;if(!t)return jt;let s=on(t),c=jt,l=jt,u=jt,d=e=>({point:hr(e),event:e});function f(e){i?.(d(e))}function p(e){a?.(d(e))}c=At(V(t,`pointerdown`,e=>{l(),l=At(V(s,`pointerup`,e=>{let n=Zn(e);nn(t,n)?r?.(d(e)):a?.(d(e))},{passive:!r,once:!0}),V(s,`pointercancel`,p,{passive:!a,once:!0})),$t(n)&&e.pointerType===`mouse`&&e.preventDefault(),f(e)},{passive:!i}),V(n,`focus`,m));function m(){u=At(V(n,`keydown`,e=>{o(e)&&(l(),l=V(n,`keyup`,e=>{if(!o(e))return;let t=new s.PointerEvent(`pointerup`),n=d(t);r?.(n),a?.(n)}),f(new s.PointerEvent(`pointerdown`)))}),V(n,`blur`,()=>{p(new s.PointerEvent(`pointercancel`))}))}return()=>{c(),l(),u()}}function Ei(e){return e==null?null:typeof e==`function`?e():e}function Di(e,t,n){if(!t)return null;let r=Hr(e.ownerDocument.body,{getShadowRoot:n}),i=r.indexOf(t);if(i===-1)return null;for(let t=i+1;t<r.length;t++){let n=r[t];if(!nn(e,n))return n}return null}function Oi(e,t={}){let{triggerElement:n,onFocus:r,onFocusEnter:i,getShadowRoot:a}=t,o=(Ei(e)??Ei(n))?.ownerDocument||document;function s(t){if(t.key!==`Tab`)return;let o=Ei(e),s=Ei(n);if(!o)return;let[c,l]=Wr(o,{includeContainer:!0,getShadowRoot:a}),u=!c&&!l,d=null;t.shiftKey&&($t(c)||u)?d=s:!t.shiftKey&&$t(s)?(i?.(),d=c):!t.shiftKey&&($t(l)||u)?d=Di(o,s,a):t.shiftKey&&$t(Di(o,s,a))&&(i?.(),d=l),d&&(t.preventDefault(),typeof r==`function`?r(d):d.focus())}return V(o,`keydown`,s,!0)}function ki(e,t){let{defer:n,...r}=t,i=n?H:e=>e(),a=[];return a.push(i(()=>{a.push(Oi(e,r))})),()=>{a.forEach(e=>e?.())}}function Ai(e,t){return Array.from(e?.querySelectorAll(t)??[])}function ji(e,t){return e?.querySelector(t)??null}var Mi=e=>e.id;function Ni(e,t,n=Mi){return e.find(e=>n(e)===t)}function Pi(e,t,n=Mi){let r=Ni(e,t,n);return r?e.indexOf(r):-1}function Fi(e,t,n=!0){let r=Pi(e,t);return r=n?(r+1)%e.length:Math.min(r+1,e.length-1),e[r]}function Ii(e,t,n=!0){let r=Pi(e,t);return r===-1?n?e[e.length-1]:null:(r=n?(r-1+e.length)%e.length:Math.max(0,r-1),e[r])}var Li=ri({childList:!0,subtree:!0});function Ri(e){let{getContainerEl:t,getRootNode:n,parts:r,onChange:i}=e,a=Object.keys(r),o,s=()=>{let e={};for(let t of a)e[t]=!!r[t]();o&&a.every(t=>o[t]===e[t])||(o=e,i(e))},c,l=()=>{let e=t();return e?(c?.(),s(),c=Li.observe(e,s),!0):!1},u=H(()=>{if(l())return;s();let e=n?.();e&&(c=Li.observe(e,l))});return()=>{u(),c?.()}}function zi(e){let t=new WeakMap,n,r=new WeakMap,i=e=>n||(n=new e.ResizeObserver(e=>{for(let n of e){r.set(n.target,n);let e=t.get(n.target);if(e)for(let t of e)t(n)}}),n);return{observe:(n,r)=>{let a=on(n);if(typeof a.ResizeObserver!=`function`)return jt;let o=t.get(n)||new Set;return o.add(r),t.set(n,o),i(a).observe(n,e),()=>{let e=t.get(n);e&&(e.delete(r),e.size===0&&(t.delete(n),i(a).unobserve(n)))}},unobserve:e=>{t.delete(e),n?.unobserve(e)}}}var Bi=zi({box:`border-box`}),Vi=0,Hi=class e{constructor(){Zr(this,`id`,Vi),Zr(this,`clear`,()=>{this.id!==Vi&&(clearTimeout(this.id),this.id=Vi)})}static create(){return new e}start(e,t){this.clear(),this.id=setTimeout(()=>{this.id=Vi,t()},e)}isStarted(){return this.id!==Vi}};function Ui(e,t){let{rootEl:n}=t||{};if(!e||!n||!n.contains(e))return null;let r=on(n),i=n.getBoundingClientRect(),a=e.getBoundingClientRect(),o=r.getComputedStyle(n),s=r.getComputedStyle(e),c=n.offsetWidth?i.width/n.offsetWidth:1,l=n.offsetHeight?i.height/n.offsetHeight:1,{clientTop:u,clientLeft:d,clientWidth:f,clientHeight:p}=n,m=Gi(u+Ji(o.scrollPaddingTop,p),u+p-Ji(o.scrollPaddingBottom,p),(a.top-i.top)/l-qi(s.scrollMarginTop),(a.bottom-i.top)/l+qi(s.scrollMarginBottom)),h=Gi(d+Ji(o.scrollPaddingLeft,f),d+f-Ji(o.scrollPaddingRight,f),(a.left-i.left)/c-qi(s.scrollMarginLeft),(a.right-i.left)/c+qi(s.scrollMarginRight));return h===0&&m===0?null:{top:n.scrollTop+m,left:n.scrollLeft+h}}function Wi(e,t){let{rootEl:n}=t||{},r=Ui(e,{rootEl:n});if(!n||!r)return!1;let i=t?.behavior;return i===`smooth`&&Ki(n)&&(i=`instant`),n.scrollTo({...r,...i&&{behavior:i}}),!0}function Gi(e,t,n,r){if(n<e&&r>t)return 0;let i=r-n>t-e;return n<e?i?r-t:n-e:r>t?i?n-e:r-t:0}var Ki=e=>!!on(e).matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,qi=e=>{let t=Number.parseFloat(e);return Number.isNaN(t)?0:t},Ji=(e,t)=>{let n=qi(e);return e.trim().endsWith(`%`)?n*t/100:n},Yi,Xi=()=>Yi??=new Intl.Collator(void 0,{usage:`search`,sensitivity:`base`}),Zi=e=>e.normalize(`NFC`).trim(),Qi=e=>Zi(e.dataset?.valuetext??e.textContent??``),$i=(e,t)=>{let n=t.normalize(`NFC`);return Xi().compare(e.slice(0,n.length),n)===0};function ea(e,t,n,r=Mi){let i=n?Pi(e,n,r):-1,a=n?kt(e,i):e;return t.length===1&&(a=a.filter(e=>r(e)!==n)),a.find(e=>$i(Qi(e),t))}function ta(e,t,n){let r=e.getAttribute(t),i=r!=null;return r===n?jt:(e.setAttribute(t,n),()=>{i?e.setAttribute(t,r):e.removeAttribute(t)})}function na(e,t){if(!e)return jt;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return ia(n,t)?jt:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)})}function ra(e,t,n){if(!e)return jt;let r=e.style.getPropertyValue(t);return r===n?jt:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute(`style`)})}function ia(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function aa(e,t){let{state:n,activeId:r,key:i,timeout:a=350,itemToId:o}=t,s=n.keysSoFar+i,c=s.length>1&&Array.from(s).every(e=>e===s[0])?s[0]:s,l=ea(e.slice(),c,r,o);function u(){clearTimeout(n.timer),n.timer=-1}function d(e){n.keysSoFar=e,u(),e!==``&&(n.timer=+setTimeout(()=>{d(``),u()},a))}return d(s),l}var oa=Object.assign(aa,{defaultOptions:{keysSoFar:``,timer:-1},isValidEvent:sa});function sa(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var ca={border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`};function la(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(new DOMException(`Promise aborted`,`AbortError`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function ua(e,t){let{timeout:n,rootNode:r}=t,i=on(r),a=rn(r),o=new i.AbortController,s,c=la(new Promise(t=>{let n=e();n?t(n):(s=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(s?.disconnect(),t(n))}),s.observe(a.body,{childList:!0,subtree:!0}))}),o,n),l=()=>s?.disconnect();return c[0].then(l,l),c}var da=ri({childList:!0,subtree:!0});function fa(e,t,n={}){let{defer:r,onMissing:i,getRootNode:a}=n,o=()=>typeof e==`function`?e():e,s=[],c=e=>{if(!e)return i?.();s.push(t(e))};if(!r)c(o());else{let e=!1;s.push(()=>{e=!0}),queueMicrotask(()=>{if(e)return;let t=o();if(t){c(t);return}let n=!1,r=t=>{e||n||(n=!0,l(),u(),c(t))},i=a?.(),l=i?da.observe(i,()=>{let e=o();e&&r(e)}):jt,u=H(()=>r(o()));s.push(l,u)})}return()=>{s.forEach(e=>e?.())}}function pa(e){let t=()=>e.getRootNode?.()??document,n=()=>rn(t()),r=()=>n().defaultView??window,i=()=>sn(t()),a=e=>t().getElementById(e);return{...e,getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:$t,getById:a}}function ma(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ha=Symbol.for(`react.lazy`);function ga(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ha}function _a(e){if((0,s.isValidElement)(e))return e;if(ga(e))return s.Children.toArray(e).find(s.isValidElement)}var va=e=>{let t=(0,s.memo)((0,s.forwardRef)((t,n)=>{let{asChild:r,children:i,...a}=t,o=r?_a(i):void 0,c=o?ma(o):void 0,u=l(n,c);return r?o?(0,s.cloneElement)(o,{...z(a,o.props),ref:n?u:c}):null:(0,s.createElement)(e,{...a,ref:n},i)}));return t.displayName=e.displayName||e.name,t},U=(()=>{let e=new Map;return new Proxy(va,{apply(e,t,n){return va(n[0])},get(t,n){let r=n;return e.has(r)||e.set(r,va(r)),e.get(r)}})})();function ya(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function W(e={}){let{name:t,strict:n=!0,hookName:r=`useContext`,providerName:i=`Provider`,errorMessage:a,defaultValue:o}=e,c=(0,s.createContext)(o);c.displayName=t;function l(){let e=(0,s.useContext)(c);if(!e&&n){let e=Error(a??ya(r,i));throw e.name=`ContextError`,M(Error,`captureStackTrace`)&&A(Error.captureStackTrace)&&Error.captureStackTrace(e,l),e}return e}return[c.Provider,l,c]}var[ba,xa]=W({name:`PopoverContext`,hookName:`usePopoverContext`,providerName:`<PopoverProvider />`}),Sa=globalThis.document===void 0?s.useEffect:s.useLayoutEffect;function Ca(e){let t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r]=(0,s.useState)(t),[i,a]=(0,s.useState)(r),c=e().value!==void 0,l=(0,s.useRef)(i);l.current=c?e().value:i;let u=(0,s.useRef)(l.current);Sa(()=>{u.current=l.current},[i,e().value]);let d=t=>{let r=u.current,i=A(t)?t(r):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:i,prev:r}),c||a(i),n(i,r)||e().onChange?.(i,r)};function f(){return c?e().value:i}return{initial:r,ref:l,get:f,set(t){(e().sync?o.flushSync:se)(()=>d(t))},invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}Ca.cleanup=e=>{(0,s.useEffect)(()=>e,[])},Ca.ref=e=>{let t=(0,s.useRef)(e);return{get:()=>t.current,set:e=>{t.current=e}}};function wa(e){let t=(0,s.useRef)(void 0);return t.current===void 0&&(t.current=e()),t.current}function Ta(e){let t=(0,s.useRef)(e);return t.current=e,(0,s.useMemo)(()=>((...e)=>t.current(...e)),[])}function Ea(e){let t=(0,s.useRef)(e);return wa(()=>({get(e){return t.current[e]},set(e,n){t.current[e]=n}}))}var Da=(e,t)=>{let n=(e??[]).map(e=>typeof e==`function`?e():e),r=(0,s.useRef)(n);(0,s.useEffect)(()=>{let e=r.current;if(r.current=n,e.length!==n.length||n.some((t,n)=>!Object.is(t,e[n])))return t()},n)};function Oa(e,t={}){let n=(0,s.useMemo)(()=>{let{id:e,ids:n,getRootNode:r}=t;return pa({id:e,ids:n,getRootNode:r})},[t]),r=(...t)=>{e.debug&&console.log(...t)},i=Aa(e.props?.({props:ke(t),scope:n})??t),a=ka(e.context?.({prop:i,bindable:Ca,scope:n,flush:ja,getContext(){return c},getComputed(){return b},getRefs(){return g},getEvent(){return m()}})),c=wa(()=>({get(e){return a.current?.[e].ref.current},set(e,t){a.current?.[e].set(t)},initial(e){return a.current?.[e].initial},hash(e){let t=a.current?.[e].get();return a.current?.[e].hash(t)}})),l=(0,s.useRef)(new Map),d=(0,s.useRef)(null),f=(0,s.useRef)(null),p=(0,s.useRef)({type:``}),m=()=>({...p.current,current(){return p.current},previous(){return f.current}}),h=()=>({...E,matches(...e){return e.some(e=>St(E.ref.current,e))},hasTag(t){return Ct(e,E.ref.current,t)}}),g=Ea(e.refs?.({prop:i,context:c})??{}),_=Ta(t=>{if(O.current!==Dt.Started)return;f.current=p.current,p.current=t;let n=j(),{transitions:i,source:a}=bt(e,n,t.type),s=T(i);if(!s)return;d.current=s;let c=yt(e,s.target??n,a);r(`transition`,t.type,s.target||n,`(${s.actions})`),c===n?s.reenter?E.invoke(n,n):S(s.actions??[]):(0,o.flushSync)(()=>E.set(c))}),v=wa(tt),y=Ta(e=>{let t=e.replaces,n=t?v.claim(t):void 0;queueMicrotask(()=>{t&&n&&v.isReplaced(t,n)||_(e)})}),b=Ta(t=>(qe(e.computed,()=>`[zag-js] No computed object found on machine`),(0,e.computed[t])({context:c,event:m(),prop:i,refs:g,scope:n,computed:b}))),x=()=>({state:h(),context:c,event:m(),prop:i,send:y,action:S,guard:C,track:Da,refs:g,computed:b,flush:ja,scope:n,choose:T}),S=t=>{let n=A(t)?t(x()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||Ge(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(x())},C=t=>{if(A(t))return t(x());let n=e.implementations?.guards?.[t];return n||Ge(`[zag-js] No implementation found for guard "${JSON.stringify(t)}"`),n?.(x())},w=t=>{let n=A(t)?t(x()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||Ge(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(x());t&&i.push(t)}return()=>i.forEach(e=>e?.())},T=e=>u(e).find(e=>{let t=!e.guard;return k(e.guard)?t=!!C(e.guard):A(e.guard)&&(t=e.guard(x())),t}),E=Ca(()=>({defaultValue:yt(e,e.initialState({prop:i})),onChange(t,n){let{exiting:r,entering:i}=xt(e,n,t,d.current?.reenter);if(r.forEach(e=>{l.current.get(e.path)?.(),l.current.delete(e.path)}),r.forEach(e=>{S(e.state?.exit)}),S(d.current?.actions),i.forEach(e=>{let t=w(e.state?.effects);if(t){let n=l.current.get(e.path);l.current.set(e.path,n?I(n,t):t)}}),n===`__init__`){S(e.entry);let t=w(e.effects);if(t){let e=l.current.get(Ot);l.current.set(Ot,e?I(e,t):t)}}i.forEach(e=>{S(e.state?.entry)})}})),D=(0,s.useRef)(void 0),O=(0,s.useRef)(Dt.NotStarted),ee=(0,s.useRef)(!1),te=Ta(()=>O.current);Sa(()=>{ee.current=!0;let t=!1;queueMicrotask(()=>{if(!ee.current)return;t=!0;let e=O.current===Dt.Started;O.current=Dt.Started,r(e?`rehydrating...`:`initializing...`);let n=D.current??E.initial;E.invoke(n,e?E.get():Ot)});let n=l.current;return()=>{ee.current=!1;let i=j();r(`unmounting...`),D.current=i,O.current=Dt.Stopped,n.forEach(e=>e?.()),l.current=new Map,d.current=null,queueMicrotask(()=>{t&&(S(e.exit),O.current=Dt.Stopped)})}},[]);let j=()=>`ref`in E?E.ref.current:E.get();return e.watch?.(x()),{state:h(),send:y,context:c,prop:i,scope:n,refs:g,computed:b,event:m(),getStatus:te}}function ka(e){let t=(0,s.useRef)(e);return t.current=e,t}function Aa(e){let t=ka(e);return Ta(function(e){return t.current[e]})}function ja(e){queueMicrotask(()=>{(0,o.flushSync)(()=>e())})}function Ma(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}var Na=Ma(e=>e),G=a(),Pa=(0,s.forwardRef)((e,t)=>{let n=z(xa().getAnchorProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Pa.displayName=`PopoverAnchor`;var Fa=(0,s.forwardRef)((e,t)=>{let n=z(xa().getArrowProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Fa.displayName=`PopoverArrow`;var Ia=(0,s.forwardRef)((e,t)=>{let n=z(xa().getArrowTipProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Ia.displayName=`PopoverArrowTip`;var La=(0,s.forwardRef)((e,t)=>{let n=z(xa().getCloseTriggerProps(),e);return(0,G.jsx)(U.button,{...n,ref:t})});La.displayName=`PopoverCloseTrigger`;var Ra=(e=>Reflect.get(e,`Activity`))(s),za=Ra!==void 0,Ba=e=>{let{presence:t,children:n}=e;return t.unmounted?null:t.hideMode===`activity`&&Ra?(0,G.jsx)(Ra,{mode:t.present?`visible`:`hidden`,children:n}):n},[Va,Ha]=W({name:`PresenceContext`,hookName:`usePresenceContext`,providerName:`<PresenceProvider />`}),Ua=(0,s.forwardRef)((e,t)=>{let n=xa(),r=Ha(),i=z(n.getContentProps(),r.getPresenceProps(),e),a=l(r.ref,t);return(0,G.jsx)(Ba,{presence:r,children:(0,G.jsx)(U.div,{...i,ref:a})})});Ua.displayName=`PopoverContent`;var Wa=(0,s.forwardRef)((e,t)=>{let n=z(xa().getDescriptionProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Wa.displayName=`PopoverDescription`;var Ga=(0,s.forwardRef)((e,t)=>{let n=z(xa().getIndicatorProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Ga.displayName=`PopoverIndicator`;var Ka=(0,s.forwardRef)((e,t)=>{let n=xa(),r=Ha(),i=z(n.getPositionerProps(),e);return r.unmounted?null:(0,G.jsx)(U.div,{...i,ref:t})});Ka.displayName=`PopoverPositioner`;function qa(e,t={}){let{sync:n=!1}=t,r=Ja(e);return(0,s.useCallback)((...e)=>n?queueMicrotask(()=>r.current?.(...e)):r.current?.(...e),[n,r])}function Ja(e){let t=(0,s.useRef)(e);return t.current=e,t}function Ya(e,t){let{state:n,send:r,context:i}=e,a=n.matches(`mounted`,`unmountSuspended`);return{skip:!i.get(`initial`),present:a,setNode(e){e&&r({type:`NODE.SET`,node:e})},unmount(){r({type:`UNMOUNT`})}}}var Xa=Tt({props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e(`present`)?`mounted`:`unmounted`},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:[`cleanupNode`],watch({track:e,prop:t,send:n}){e([()=>t(`present`)],()=>{n({type:`PRESENCE.CHANGED`})})},on:{"NODE.SET":{actions:[`setupNode`]},"PRESENCE.CHANGED":{actions:[`setInitial`,`syncPresence`]}},states:{mounted:{effects:[`trackEnterAnimation`],on:{UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]},"UNMOUNT.SUSPEND":{target:`unmountSuspended`}}},unmountSuspended:{effects:[`trackExitAnimation`],on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]},UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]}}},unmounted:{on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get(`initial`)||queueMicrotask(()=>{e.set(`initial`,!0)})},invokeOnExitComplete:({prop:e,refs:t})=>{e(`onExitComplete`)?.();let n=t.get(`node`);if(!n)return;let r=new(on(n)).CustomEvent(`exitcomplete`,{bubbles:!1});n.dispatchEvent(r)},setupNode:({refs:e,event:t})=>{e.get(`node`)!==t.node&&(e.set(`node`,t.node),e.set(`styles`,fn(t.node)))},cleanupNode:({refs:e})=>{e.set(`node`,null),e.set(`styles`,null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{let i=r(`present`);if(i)return n({type:`MOUNT`,src:`presence.changed`});let a=t.get(`node`);if(!i&&a?.ownerDocument.visibilityState===`hidden`)return n({type:`UNMOUNT`,src:`visibilitychange`});H(()=>{if(r(`present`))return;let i=Za(t.get(`styles`));e.set(`unmountAnimationName`,i),i===`none`||i===e.get(`prevAnimationName`)||t.get(`styles`)?.display===`none`||t.get(`styles`)?.animationDuration===`0s`||!$a(t.get(`node`),i)?n({type:`UNMOUNT`,src:`presence.changed`}):n({type:`UNMOUNT.SUSPEND`})})},setPrevAnimationName:({context:e,refs:t})=>{H(()=>{e.set(`prevAnimationName`,Za(t.get(`styles`)))})},clearPrevAnimationName:({context:e})=>{e.set(`prevAnimationName`,null)}},effects:{trackEnterAnimation:({context:e,refs:t,prop:n})=>{if(!n(`onEnterComplete`)||!e.get(`initial`))return;let r,i=()=>{r=H(()=>{let e=t.get(`node`);if(!e||!e.isConnected){i();return}let r=fn(e);if(Za(r)===`none`||r.display===`none`||r.animationDuration===`0s`){n(`onEnterComplete`)?.();return}let a=t=>{Zn(t)===e&&n(`present`)&&(e.removeEventListener(`animationend`,a),n(`onEnterComplete`)?.())};return e.addEventListener(`animationend`,a),()=>{e.removeEventListener(`animationend`,a)}})};return i(),()=>r?.()},trackExitAnimation:({context:e,refs:t,send:n,prop:r})=>{let i=t.get(`node`);if(!i)return;let a=n=>{(n.composedPath?.()?.[0]??n.target)===i&&e.set(`prevAnimationName`,Za(t.get(`styles`)))},o=a=>{let o=Za(t.get(`styles`));Zn(a)===i&&o===e.get(`unmountAnimationName`)&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationend`})},s=e=>{Zn(e)===i&&!r(`present`)&&!Qa(i)&&n({type:`UNMOUNT`,src:`animationcancel`})};i.addEventListener(`animationstart`,a),i.addEventListener(`animationcancel`,s),i.addEventListener(`animationend`,o);let c=na(i,{animationFillMode:`forwards`});return()=>{i.removeEventListener(`animationstart`,a),i.removeEventListener(`animationcancel`,s),i.removeEventListener(`animationend`,o),$r(()=>c())}}}}});function Za(e){return e?.animationName||`none`}function Qa(e){return typeof e.getAnimations==`function`&&e.getAnimations().some(e=>`animationName`in e&&e.playState===`running`)}function $a(e,t){if(!e||typeof e.getAnimations!=`function`)return!0;let n=t.split(`,`).map(e=>e.trim());return e.getAnimations().some(e=>{let t=e.animationName;return e.playState===`running`&&(t==null||n.includes(t))})}var eo=(e={})=>{let{lazyMount:t,unmountOnExit:n,hideMode:r=`display-none`,present:i,skipAnimationOnMount:a=!1,...o}=e,c=(0,s.useRef)(!1),l=Ya(Oa(Xa,{...o,present:i,onEnterComplete:qa(e.onEnterComplete),onExitComplete:qa(e.onExitComplete)}),Na);l.present&&(c.current=!0);let u=!l.present&&!c.current&&t||n&&!l.present&&c.current,d=r===`activity`&&za?`activity`:`display-none`;return{ref:l.setNode,getPresenceProps:()=>({"data-state":l.skip&&a?void 0:i?`open`:`closed`,hidden:d!==`activity`&&!l.present}),present:l.present,unmounted:u,hideMode:d}},K=()=>(e,t)=>t.reduce((e,t)=>{let[n,r]=e,i=t;return r[i]!==void 0&&(n[i]=r[i]),delete r[i],[n,r]},[{},{...e}]),to=e=>K()(e,[`hideMode`,`immediate`,`lazyMount`,`onEnterComplete`,`onExitComplete`,`present`,`skipAnimationOnMount`,`unmountOnExit`]),[no,ro]=W({name:`EnvironmentContext`,hookName:`useEnvironmentContext`,providerName:`<EnvironmentProvider />`,strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[io,ao]=W({name:`LocaleContext`,hookName:`useLocaleContext`,providerName:`<LocaleProvider />`,strict:!1,defaultValue:{dir:`ltr`,locale:`en-US`}}),oo=(e,t=[])=>({parts:(...n)=>{if(co(t))return oo(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>oo(e,[...t,...n]),omit:(...n)=>oo(e,t.filter(e=>!n.includes(e))),rename:e=>oo(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${so(e)}"][data-part="${so(n)}"]`,`& [data-scope="${so(e)}"][data-part="${so(n)}"]`].join(`, `),attrs:{"data-scope":so(e),"data-part":so(n)}}}),{})}),so=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),co=e=>e.length===0,lo=oo(`popover`).parts(`arrow`,`arrowTip`,`anchor`,`trigger`,`indicator`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),uo=[`top`,`right`,`bottom`,`left`],fo=Math.min,po=Math.max,mo=Math.round,ho=Math.floor,go=e=>({x:e,y:e}),_o={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function vo(e,t,n){return po(e,fo(t,n))}function yo(e,t){return typeof e==`function`?e(t):e}function bo(e){return e.split(`-`)[0]}function xo(e){return e.split(`-`)[1]}function So(e){return e===`x`?`y`:`x`}function Co(e){return e===`y`?`height`:`width`}function wo(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function To(e){return So(wo(e))}function Eo(e,t,n){n===void 0&&(n=!1);let r=xo(e),i=To(e),a=Co(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Fo(o)),[o,Fo(o)]}function Do(e){let t=Fo(e);return[Oo(e),t,Oo(t)]}function Oo(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ko=[`left`,`right`],Ao=[`right`,`left`],jo=[`top`,`bottom`],Mo=[`bottom`,`top`];function No(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ao:ko:t?ko:Ao;case`left`:case`right`:return t?jo:Mo;default:return[]}}function Po(e,t,n,r){let i=xo(e),a=No(bo(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Oo)))),a}function Fo(e){let t=bo(e);return _o[t]+e.slice(t.length)}function Io(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Lo(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Io(e)}function Ro(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function zo(e,t,n){let{reference:r,floating:i}=e,a=wo(t),o=To(t),s=Co(o),c=bo(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=xo(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Bo(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=yo(t,e),p=Lo(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ro(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Ro(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Vo=50,Ho=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Bo},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=zo(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Vo&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=zo(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Uo=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=yo(e,t)||{};if(l==null)return{};let d=Lo(u),f={x:n,y:r},p=To(i),m=Co(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=fo(d[_],T),D=fo(d[v],T),O=C-h[m]-D,ee=C/2-h[m]/2+w,te=vo(E,ee,O),k=!c.arrow&&xo(i)!=null&&ee!==te&&a.reference[m]/2-(ee<E?E:D)-h[m]/2<0,A=k?ee<E?ee-E:ee-O:0;return{[p]:f[p]+A,data:{[p]:te,centerOffset:ee-te-A,...k&&{alignmentOffset:A}},reset:k}}}),Wo=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=yo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=bo(r),_=wo(o),v=bo(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Fo(o)]:Do(o)),x=p!==`none`;!d&&x&&b.push(...Po(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Eo(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===wo(t)||T.every(e=>wo(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=wo(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Go(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ko(e){return uo.some(t=>e[t]>=0)}var qo=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=yo(e,t);switch(i){case`referenceHidden`:{let e=Go(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ko(e)}}}case`escaped`:{let e=Go(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ko(e)}}}default:return{}}}}},Jo=new Set([`left`,`top`]);async function Yo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=bo(n),s=xo(n),c=wo(n)===`y`,l=Jo.has(o)?-1:1,u=a&&c?-1:1,d=yo(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Xo=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Yo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Zo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=yo(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=wo(i),p=So(f),m=u[p],h=u[f],g=(e,t)=>vo(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Qo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=yo(e,t),u={x:n,y:r},d=wo(i),f=So(d),p=u[f],m=u[d],h=yo(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Jo.has(bo(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},$o=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=yo(e,t),c=await i.detectOverflow(t,s),l=bo(n),u=xo(n),d=wo(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=fo(p-c[m],g),y=fo(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*po(c.left,c.right):S=p-2*po(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function es(){return typeof window<`u`}function ts(e){return is(e)?(e.nodeName||``).toLowerCase():`#document`}function ns(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rs(e){return((is(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function is(e){return es()?e instanceof Node||e instanceof ns(e).Node:!1}function as(e){return es()?e instanceof Element||e instanceof ns(e).Element:!1}function os(e){return es()?e instanceof HTMLElement||e instanceof ns(e).HTMLElement:!1}function ss(e){return!es()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ns(e).ShadowRoot}function cs(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ys(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ls(e){return/^(table|td|th)$/.test(ts(e))}function us(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ds=/transform|translate|scale|rotate|perspective|filter/,fs=/paint|layout|strict|content/,ps=e=>!!e&&e!==`none`,ms;function hs(e){let t=as(e)?ys(e):e;return ps(t.transform)||ps(t.translate)||ps(t.scale)||ps(t.rotate)||ps(t.perspective)||!_s()&&(ps(t.backdropFilter)||ps(t.filter))||ds.test(t.willChange||``)||fs.test(t.contain||``)}function gs(e){let t=xs(e);for(;os(t)&&!vs(t);){if(hs(t))return t;if(us(t))return null;t=xs(t)}return null}function _s(){return ms??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ms}function vs(e){return/^(html|body|#document)$/.test(ts(e))}function ys(e){return ns(e).getComputedStyle(e)}function bs(e){return as(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xs(e){if(ts(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ss(e)&&e.host||rs(e);return ss(t)?t.host:t}function Ss(e){let t=xs(e);return vs(t)?(e.ownerDocument||e).body:os(t)&&cs(t)?t:Ss(t)}function Cs(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ss(e),i=r===e.ownerDocument?.body,a=ns(r);if(i){let e=ws(a);return t.concat(a,a.visualViewport||[],cs(r)?r:[],e&&n?Cs(e):[])}return t.concat(r,Cs(r,[],n))}function ws(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ts(e){let t=ys(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=os(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=mo(n)!==a||mo(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Es(e){return as(e)?e:e.contextElement}function Ds(e){let t=Es(e);if(!os(t))return go(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ts(t),o=(a?mo(n.width):n.width)/r,s=(a?mo(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Os=go(0);function ks(e){let t=ns(e);return!_s()||!t.visualViewport?Os:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function As(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ns(e)}function js(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Es(e),o=go(1);t&&(r?as(r)&&(o=Ds(r)):o=Ds(e));let s=As(a,n,r)?ks(a):go(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=ns(a),t=as(r)?ns(r):r,n=e,i=ws(n);for(;i&&t!==n;){let e=Ds(i),t=i.getBoundingClientRect(),r=ys(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ns(i),i=ws(n)}}return Ro({width:u,height:d,x:c,y:l})}function Ms(e,t){let n=bs(e).scrollLeft;return t?t.left+n:js(rs(e)).left+n}function Ns(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ms(e,n),y:n.top+t.scrollTop}}function Ps(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=rs(r),s=t?us(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=go(1),u=go(0),d=os(r);if((d||!a)&&((ts(r)!==`body`||cs(o))&&(c=bs(r)),d)){let e=js(r);l=Ds(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ns(o,c):go(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Fs(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Is(e){let t=bs(e),n=e.ownerDocument.body,r=po(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=po(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ms(e),o=-t.scrollTop;return ys(n).direction===`rtl`&&(a+=po(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Ls=25;function Rs(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=ns(e),a=rs(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!_s()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ms(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Ls&&(s-=o)}return{width:s,height:c,x:l,y:u}}function zs(e,t){let n=js(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ds(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Bs(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Rs(e,n,t);else if(t===`document`)r=Is(rs(e));else if(as(t))r=zs(t,n);else{let n=ks(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ro(r)}function Vs(e,t){let n=t.get(e);if(n)return n;let r=Cs(e,[],!1).filter(e=>as(e)&&ts(e)!==`body`),i=null,a=ys(e).position===`fixed`,o=a?xs(e):e;for(;as(o)&&!vs(o);){let e=ys(o),t=hs(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=xs(o)}return t.set(e,r),r}function Hs(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?us(t)?[]:Vs(t,this._c):[].concat(n),r],o=Bs(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Bs(t,a[e],i);s=po(n.top,s),c=fo(n.right,c),l=fo(n.bottom,l),u=po(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Us(e){let{width:t,height:n}=Ts(e);return{width:t,height:n}}function Ws(e,t,n){let r=os(t),i=rs(t),a=n===`fixed`,o=js(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=go(0);if((r||!a)&&((ts(t)!==`body`||cs(i))&&(s=bs(t)),r)){let e=js(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ms(i));let l=i&&!r&&!a?Ns(i,s):go(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Gs(e){return ys(e).position===`static`}function Ks(e,t){if(!os(e)||ys(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return rs(e)===n&&(n=n.ownerDocument.body),n}function qs(e,t){let n=ns(e);if(us(e))return n;if(!os(e)){let t=xs(e);for(;t&&!vs(t);){if(as(t)&&!Gs(t))return t;t=xs(t)}return n}let r=Ks(e,t);for(;r&&ls(r)&&Gs(r);)r=Ks(r,t);return r&&vs(r)&&Gs(r)&&!hs(r)?n:r||gs(e)||n}var Js=async function(e){let t=this.getOffsetParent||qs,n=await(0,this.getDimensions)(e.floating);return{reference:Ws(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ys(e){return ys(e).direction===`rtl`}var Xs={convertOffsetParentRelativeRectToViewportRelativeRect:Ps,getDocumentElement:rs,getClippingRect:Hs,getOffsetParent:qs,getElementRects:Js,getClientRects:Fs,getDimensions:Us,getScale:Ds,isElement:as,isRTL:Ys};function Zs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Qs(e,t,n){let r=null,i,a=rs(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=ho(d),h=ho(a.clientWidth-(u+f)),g=ho(a.clientHeight-(d+p)),_=ho(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:po(0,fo(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Zs(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=ns(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function $s(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Es(e),u=i||a?[...l?Cs(l):[],...t?Cs(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Qs(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?js(e):null;c&&g();function g(){let t=js(e);h&&!Zs(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ec=Xo,tc=Zo,nc=Wo,rc=$o,ic=qo,ac=Uo,oc=Qo,sc=(e,t,n)=>{let r=new Map,i=n??{},a={...Xs,...i.platform,_c:r};return Ho(e,t,{...i,platform:a})};function cc(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function lc(e){if(!e)return cc();let{x:t,y:n,width:r,height:i}=e;return cc(t,n,r,i)}function uc(e,t){return{contextElement:Ut(e)?e:e?.contextElement,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?lc(r):n.getBoundingClientRect()}}}var dc=e=>({variable:e,reference:`var(${e})`}),fc={arrowSize:dc(`--arrow-size`),arrowSizeHalf:dc(`--arrow-size-half`),arrowBg:dc(`--arrow-background`),transformOrigin:dc(`--transform-origin`),arrowOffset:dc(`--arrow-offset`)},pc=e=>e===`top`||e===`bottom`?`y`:`x`;function mc(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=pc(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,w=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(fc.transformOrigin.variable,w?C:S),{data:{transformOrigin:w?C:S}}}}}var hc={name:`rects`,fn({rects:e}){return{data:e}}},gc=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${fc.arrowOffset.reference})`}),{}}}};function _c(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}function vc(e){return e.split(`-`)[0]}var yc={strategy:`absolute`,placement:`bottom`,listeners:!0,restoreStyles:!1,applyStyles:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function bc(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function xc(e,t){return e!=null&&Math.abs(e-t)<.5}function Sc(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function Cc(e,t,n){return ac({element:e||t.createElement(`div`),padding:n.arrowPadding})}function wc(e,t){if(!j(t.offset??t.gutter))return ec(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=_c(n),s=o?void 0:t.shift;return ke({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function Tc(e){if(e.flip)return nc(()=>{let t=Sc(e.boundary);return{...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}})}function Ec(e){if(e.slide||e.overlap)return tc(()=>{let t=Sc(e.boundary);return{...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:oc()}})}function Dc(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,i;return rc(()=>{let a=Sc(e.boundary);return{padding:e.overflowPadding,...a?{boundary:a}:void 0,apply({elements:e,rects:a,availableHeight:o,availableWidth:s}){let c=e.floating,l=Math.round(a.reference.width),u=Math.round(a.reference.height);s=Math.floor(s),o=Math.floor(o),xc(t,l)||(c.style.setProperty(`--reference-width`,`${l}px`),t=l),xc(n,u)||(c.style.setProperty(`--reference-height`,`${u}px`),n=u),xc(r,s)||(c.style.setProperty(`--available-width`,`${s}px`),r=s),xc(i,o)||(c.style.setProperty(`--available-height`,`${o}px`),i=o)}}})}function Oc(e){if(e.hideWhenDetached)return ic(()=>({strategy:`referenceHidden`,boundary:Sc(e.boundary)??`clippingAncestors`}))}function kc(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}var Ac=[`transform`,`visibility`,`pointer-events`,`--x`,`--y`,`--z-index`,`z-index`,`--reference-width`,`--reference-height`,`--available-width`,`--available-height`,`--transform-origin`],jc=[`top`,`right`,`bottom`,`left`],Mc=new WeakSet;function Nc(e,t){let n=e.style.getPropertyValue(`z-index`),r=Mc.has(e),i=r&&n===`var(--z-index)`;r&&!i&&Mc.delete(e);let a=fn(t).zIndex;a===`auto`?i&&(e.style.removeProperty(`z-index`),Mc.delete(e)):(!n||i)&&(e.style.setProperty(`--z-index`,a),e.style.setProperty(`z-index`,`var(--z-index)`),Mc.add(e))}function Pc(e,t){if(!e)return ce;let n=new Map(t.map(t=>[t,e.style.getPropertyValue(t)]));return()=>{n.forEach((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)}),e.style.length===0&&e.removeAttribute(`style`)}}function Fc(e){return e==null?null:Ut(e)?e:typeof e==`object`&&e&&`contextElement`in e&&e.contextElement?e.contextElement:e}function Ic(e,t,n={}){let r=()=>(typeof t==`function`?t():t)??null,i=()=>{let t=typeof e==`function`?e():e;return n.getAnchorElement?.()??t},a=()=>{let e=i();return!e&&!n.getAnchorRect?null:uc(e,n.getAnchorRect)},o=Object.assign({},yc,n),s=[],c=null,l,u;function d(e){if(l?.(),u?.(),c=e,o.restoreStyles){let t=Pc(e,Ac);l=()=>{t(),Mc.delete(e)}}else l=void 0;let t=e.querySelector(`[data-part=arrow]`);u=o.restoreStyles?Pc(t,jc):void 0,s=[wc(t,o),Tc(o),Ec(o),Cc(t,e.ownerDocument,o),gc(t),mc({gutter:o.gutter,offset:o.offset,overlap:o.overlap},t),Dc(o),Oc(o),hc]}let{placement:f,strategy:p,onComplete:m,onPositioned:h}=o,g,_,v=!1,y,b,x=ce,S=kc(o.listeners);function C(){if(!o.listeners)return;let e=i(),t=a(),n=r();t&&n&&(Fc(e)!==Fc(y)||n!==b)&&(x(),y=e,b=n,x=$s(t,n,T,S))}async function w(){C();let e=r();if(!e)return;e!==c&&(d(e),v=!1);let t=a();if(!t)return;let n=await sc(t,e,{placement:f,middleware:s,strategy:p}),i=on(e),l=bc(i,n.x),u=bc(i,n.y);if(m?.({...n,x:l,y:u}),o.applyStyles!==!1&&(xc(g,l)||(e.style.setProperty(`--x`,`${l}px`),g=l),xc(_,u)||(e.style.setProperty(`--y`,`${u}px`),_=u),o.hideWhenDetached&&(n.middlewareData.hide?.referenceHidden?(e.style.setProperty(`visibility`,`hidden`),e.style.setProperty(`pointer-events`,`none`)):(e.style.removeProperty(`visibility`),e.style.removeProperty(`pointer-events`))),!v)){let t=e.firstElementChild;t&&(Nc(e,t),v=!0)}}async function T(){n.updatePosition?(await n.updatePosition({updatePosition:w,floatingElement:r()}),h?.({placed:!0})):await w()}return T(),()=>{x(),u?.(),l?.(),h?.({placed:!1})}}function Lc(e,t,n={}){let{defer:r,...i}=n,a=r?H:e=>e(),o=[];return o.push(a(()=>{o.push(Ic(e,t,i))})),()=>{o.forEach(e=>e?.())}}var Rc={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function zc(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`,applyStyles:a=!0}=e;return{arrow:{position:`absolute`,width:fc.arrowSize.reference,height:fc.arrowSize.reference,[fc.arrowSizeHalf.variable]:`calc(${fc.arrowSize.reference} / 2)`,[fc.arrowOffset.variable]:`calc(${fc.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?Rc[t.split(`-`)[0]]:void 0,background:fc.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`var(--reference-width)`:void 0,maxWidth:r?`var(--available-width)`:void 0,maxHeight:r?`var(--available-height)`:void 0,pointerEvents:t?void 0:`none`,top:`0px`,left:`0px`,transform:t?`translate3d(var(--x, 0), var(--y, -100vh), 0)`:`translate3d(0, -100vh, 0)`,zIndex:a===!1?`var(--z-index)`:void 0}}}var Bc=e=>e.ids?.anchor??`popover:${e.id}:anchor`,Vc=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`popover:${e.id}:trigger:${t}`:`popover:${e.id}:trigger`:A(n)?n(t):n},Hc=e=>e.ids?.content??`popover:${e.id}:content`,Uc=e=>e.ids?.positioner??`popover:${e.id}:popper`,Wc=e=>e.ids?.arrow??`popover:${e.id}:arrow`,Gc=e=>e.ids?.title??`popover:${e.id}:title`,Kc=e=>e.ids?.description??`popover:${e.id}:desc`,qc=e=>e.ids?.closeTrigger??`popover:${e.id}:close`,Jc=e=>e.getById(Bc(e)),Yc=e=>e.getById(Vc(e)),Xc=e=>Ai(e.getRootNode(),`[data-scope="popover"][data-part="trigger"]${Rt(e.id)}`),Zc=(e,t)=>t==null?Yc(e)??Xc(e)[0]:e.getById(Vc(e,t)),Qc=e=>e.getById(Hc(e)),$c=e=>e.getById(Uc(e)),el=e=>e.getById(Gc(e)),tl=e=>e.getById(Kc(e)),nl={closeTriggerLabel:`close`};function rl(e,t){let{state:n,context:r,send:i,computed:a,prop:o,scope:s}=e,c=je(nl,o(`translations`)),l=n.matches(`open`),u=r.get(`currentPlacement`),d=u?vc(u):void 0,f=a(`currentPortalled`),p=r.get(`renderedElements`),m=r.get(`triggerValue`),h=zc({...o(`positioning`),placement:u});return{portalled:f,open:l,setOpen(e){i({type:e?`OPEN`:`CLOSE`,replaces:`open`})},triggerValue:m,setTriggerValue(e){i({type:`TRIGGER_VALUE.SET`,value:e})},reposition(e={}){i({type:`POSITIONING.SET`,options:e})},getArrowProps(){return t.element({id:Wc(s),...lo.arrow.attrs,dir:o(`dir`),style:h.arrow})},getArrowTipProps(){return t.element({...lo.arrowTip.attrs,dir:o(`dir`),style:h.arrowTip})},getAnchorProps(){return t.element({...lo.anchor.attrs,dir:o(`dir`),id:Bc(s)})},getTriggerProps(e={}){let{value:n}=e,r=n!=null&&m===n;return t.button({...lo.trigger.attrs,dir:o(`dir`),type:`button`,"data-placement":u,"data-side":d,id:Vc(s,n),"data-ownedby":s.id,"data-value":n,"data-current":B(r),"aria-haspopup":`dialog`,"aria-expanded":n==null?l:l&&r,"data-state":l?`open`:`closed`,"aria-controls":Hc(s),onPointerDown(e){rr(e)&&Nn()&&e.currentTarget.focus()},onClick(e){e.defaultPrevented||i({type:l&&n!=null&&!r?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})},onBlur(e){i({type:`TRIGGER_BLUR`,target:e.relatedTarget})}})},getIndicatorProps(){return t.element({...lo.indicator.attrs,dir:o(`dir`),"data-state":l?`open`:`closed`})},getPositionerProps(){return t.element({id:Uc(s),...lo.positioner.attrs,dir:o(`dir`),style:h.floating})},getContentProps(){return t.element({...lo.content.attrs,dir:o(`dir`),id:Hc(s),tabIndex:-1,role:`dialog`,"aria-modal":Pt(o(`modal`)),hidden:!l,"data-state":l?`open`:`closed`,"data-expanded":B(l),"aria-labelledby":p.title?Gc(s):void 0,"aria-describedby":p.description?Kc(s):void 0,"data-placement":u,"data-side":d})},getTitleProps(){return t.element({...lo.title.attrs,id:Gc(s),dir:o(`dir`)})},getDescriptionProps(){return t.element({...lo.description.attrs,id:Kc(s),dir:o(`dir`)})},getCloseTriggerProps(){return t.button({...lo.closeTrigger.attrs,dir:o(`dir`),id:qc(s),type:`button`,"aria-label":c.closeTriggerLabel,onClick(e){e.defaultPrevented||(e.stopPropagation(),i({type:`CLOSE`}))}})}}}var il=new WeakMap,al=new WeakMap,ol={},sl=0,cl=e=>e&&(e.host||cl(e.parentNode)),ll=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=cl(t);return n&&e.contains(n)?n:(console.error(`[zag-js > ariaHidden] target`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(e=>!!e),ul=new Set([`script`,`output`,`status`,`next-route-announcer`]),dl=e=>ul.has(e.localName)||e.role===`status`||e.hasAttribute(`aria-live`)?!0:e.matches(`[data-live-announcer]`),fl=(e,t)=>{var n;let{parentNode:r,markerName:i,attribute:a,followControlledElements:o=!0}=t,s=a===`aria-hidden`?`true`:``,c=e.filter(e=>r.contains(e));if(!c.length)return()=>{};(n=ol)[i]||(n[i]=new WeakMap);let l=ol[i],u=[],d=new Set,f=new Set(c),p=e=>{e&&!d.has(e)&&(d.add(e),p(e.parentNode))};c.forEach(e=>{p(e),o&&Ut(e)&&Wn(e,e=>{p(e),f.add(e)})});let m=e=>{e&&!f.has(e)&&Array.prototype.forEach.call(e.children,e=>{if(d.has(e))m(e);else try{if(dl(e))return;let t=a===`aria-hidden`?e.getAttribute(a)===`true`:e.hasAttribute(a),n=(il.get(e)||0)+1,r=(l.get(e)||0)+1;il.set(e,n),l.set(e,r),u.push(e),n===1&&t&&al.set(e,!0),r===1&&e.setAttribute(i,``),t||e.setAttribute(a,s)}catch(t){console.error(`[zag-js > ariaHidden] cannot operate on `,e,t)}})};return m(r),d.clear(),sl++,()=>{u.forEach(e=>{let t=il.get(e)-1,n=l.get(e)-1;il.set(e,t),l.set(e,n),t||(al.has(e)||e.removeAttribute(a),al.delete(e)),n||e.removeAttribute(i)}),sl--,sl||(il=new WeakMap,al=new WeakMap,ol={})}};function pl(){let e=[];return{add(t){e[e.length-1]?.pause(),e.push(t),t.resume()},remove(t){let n=e.indexOf(t);if(n===-1)return;let r=n===e.length-1;e.splice(n,1),r&&(t.pause(),e[e.length-1]?.resume())}}}var ml=new WeakMap,hl=e=>{let t=ml.get(e);return t||(t=pl(),ml.set(e,t)),t},gl=(e,t)=>{let{parentNode:n,attribute:r,followControlledElements:i=!0}=t,a=ll(n,Array.isArray(e)?e:[e]);if(!a.length)return()=>{};let o=r===`aria-hidden`?`[aria-hidden="true"]`:`[inert]`,s,c,l=()=>{let e=s;s=fl(a,t),e?.()},u=()=>{s?.(),s=void 0},d={pause(){c?.disconnect(),c=void 0,u()},resume(){l(),i&&(c=new(on(n)).MutationObserver(e=>{e.some(({target:e})=>Ht(e)&&!e.closest(o))&&l()}),c.observe(n,{attributes:!0,attributeFilter:[`aria-expanded`],subtree:!0}))}},f=hl(n.ownerDocument);return f.add(d),()=>f.remove(d)},_l=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,vl=(e,t=_l(e),n=`data-aria-hidden`,r=!0)=>{if(t)return gl(e,{parentNode:t,markerName:n,attribute:`aria-hidden`,followControlledElements:r})},yl=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function bl(e,t={}){let{defer:n=!0}=t,r=n?yl:e=>e(),i=[];return i.push(r(()=>{let t=(typeof e==`function`?e():e).filter(Boolean);t.length!==0&&i.push(vl(t))})),()=>{i.forEach(e=>e?.())}}function xl(e){let t={each(t){for(let n=0;n<e.frames?.length;n+=1){let r=e.frames[n];r&&t(r)}},addEventListener(e,n,r){return t.each(t=>{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function Sl(e){let t=e.frameElement==null?null:e.parent.document;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var Cl=`pointerdown.outside`,wl=`focus.outside`;function Tl(e){for(let t of e)if(Ut(t)&&Vr(t))return!0;return!1}var El=e=>`clientY`in e;function Dl(e,t){if(!El(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function Ol(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function kl(e,t){if(!t||!El(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return Ol({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function Al(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o,followControlledElements:s=!0}=t;if(!e)return;let c=rn(e),l=on(e),u=xl(l),d=Sl(l);function f(t,r){if(!Ut(r)||!r.isConnected||nn(e,r)||Dl(e,t)||s&&Un(e,r))return!1;let i=c.querySelector(`[aria-controls="${e.id}"]`);return i&&kl(t,fi(i))||kl(t,fi(e))?!1:!n?.(r)}let p=new Set,m=Yt(e?.getRootNode()),h=!1;function g(t){h=!0;let n=()=>{h=!1};c.addEventListener(`pointerup`,n,{once:!0}),l.addEventListener(`pointerup`,n,{once:!0});function r(n){let r=o&&!Dn()?H:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=m?c[0]:Zn(t);if(e&&f(t,n)){if(i||a){let t=I(i,a);e.addEventListener(Cl,t,{once:!0})}Ml(e,Cl,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:ir(s),focusable:Tl(c),target:n}})}})}t.pointerType===`touch`?(p.forEach(e=>e()),p.add(V(c,`click`,r,{once:!0})),p.add(d.addEventListener(`click`,r,{once:!0})),p.add(u.addEventListener(`click`,r,{once:!0}))):r()}let _=new Set,v=setTimeout(()=>{_.add(V(c,`pointerdown`,g,!0)),_.add(d.addEventListener(`pointerdown`,g,!0)),_.add(u.addEventListener(`pointerdown`,g,!0))},0),y=Qr.create();function b(t){h||(o?e=>y.request(e):e=>e())(()=>{let n=t?.composedPath?.()??[t?.target],i=m?n[0]:Zn(t);if(e&&f(t,i)){if(r||a){let t=I(r,a);e.addEventListener(wl,t,{once:!0})}Ml(e,wl,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:Vr(i),target:i}})}})}return Dn()||(_.add(V(c,`focusin`,b,!0)),_.add(d.addEventListener(`focusin`,b,!0)),_.add(u.addEventListener(`focusin`,b,!0))),()=>{clearTimeout(v),y.cancel(),p.forEach(e=>e()),_.forEach(e=>e())}}function jl(e,t){let{defer:n}=t,r=n?H:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(Al(n,t))})),()=>{i.forEach(e=>e?.())}}function Ml(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function Nl(e,t){return V(rn(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var Pl=`layer:request-dismiss`,Fl={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){let t=new Set([e]);return this.layers.slice(this.indexOf(e)+1).filter(e=>!e.parent||!t.has(e.parent)?!1:(t.add(e.node),!0))},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){return this.indexOf(e)===-1?[]:this.getNestedLayers(e).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.layers[this.indexOf(e)]?.parent;for(;n;){let e=this.layers[this.indexOf(n)];if(e?.type===t)return e;n=e?.parent}},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>nn(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>nn(t,e))},add(e){let t=this.indexOf(e.node);t===-1?(e.parent=this.getParentNode(e),this.layers.push(e)):(e.parent=this.layers[t].parent,this.layers[t]=e),this.syncLayers()},getParentNode(e){let t=e.origins?.filter(e=>e?.isConnected);return t?.length?[...this.layers].reverse().find(({node:e})=>t.some(t=>nn(e,t)))?.node:this.layers[this.count()-1]?.node},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);if(t<0)return;let n=this.layers[t];n.styleTargets?.forEach(e=>{let t=e();t&&Ll(t)}),this.recentlyRemoved.add(e),$r(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>Fl.dismiss(t.node,e)),this.layers.forEach(t=>{t.parent===e&&(t.parent=n.parent)}),this.layers.splice(t,1),this.syncLayers()},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{Il(e,t,e.node),e.styleTargets?.forEach(n=>{let r=n();if(!r||r===e.node)return;Il(e,t,r);let{zIndex:i}=fn(e.node);r.style.setProperty(`--z-index`,i)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];zl(e,Pl,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),Rl(e,Pl,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function Il(e,t,n){n.style.setProperty(`--layer-index`,`${t}`),n.removeAttribute(`data-nested`),n.removeAttribute(`data-has-nested`),Fl.getParentLayerOfType(e.node,e.type)&&n.setAttribute(`data-nested`,e.type);let r=Fl.countNestedLayersOfType(e.node,e.type);r>0&&n.setAttribute(`data-has-nested`,e.type),n.style.setProperty(`--nested-layer-count`,`${r}`)}function Ll(e){e.style.removeProperty(`--layer-index`),e.style.removeProperty(`--nested-layer-count`),e.removeAttribute(`data-nested`),e.removeAttribute(`data-has-nested`)}function Rl(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function zl(e,t,n){e.addEventListener(t,n,{once:!0})}var Bl=new WeakMap,Vl=new WeakMap;function Hl(e){return Fl.isBelowPointerBlockingLayer(e)?`none`:`auto`}function Ul(e){let t=Hl(e);e.style.pointerEvents!==t&&(e.style.pointerEvents=t)}function Wl(e){if(Vl.has(e))return;let t=on(e);if(t.MutationObserver===void 0)return;let n=new t.MutationObserver(()=>{Vl.has(e)&&Ul(e)});n.observe(e,{attributes:!0,attributeFilter:[`style`]}),Vl.set(e,n)}function Gl(){Fl.layers.forEach(({node:e})=>{Ul(e),Wl(e)})}function Kl(e){let t=Vl.get(e);t&&(t.disconnect(),Vl.delete(e)),e.style.pointerEvents=``}function ql(e,t){let n=rn(e),r=[];return Fl.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(Bl.set(n.body,n.body.style.pointerEvents),queueMicrotask(()=>{let e=n.body;e&&(e.style.pointerEvents=`none`,e.setAttribute(`data-inert`,``))})),t?.forEach(e=>{let[t,n]=ua(()=>{let t=e();return Ut(t)?t:null},{timeout:1e3});t.then(e=>r.push(na(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{Fl.hasPointerBlockingLayer()||(queueMicrotask(()=>{let e=n.body;if(!e)return;let t=Bl.get(e);t!==void 0&&(e.style.pointerEvents=t,Bl.delete(e)),e.removeAttribute(`data-inert`),e.style.length===0&&e.removeAttribute(`style`)}),r.forEach(e=>e()))}}function Jl(e,t){let{onDismiss:n,onRequestDismiss:r,pointerBlocking:i,exclude:a,debug:o,type:s=`dialog`,layerStyleTargets:c}=t,l=()=>{let e=typeof a==`function`?a():a;return Array.isArray(e)?e:[e]},u=l().filter(Boolean),d={dismiss:n,origins:u.length?[e,...u]:void 0,node:e,type:s,pointerBlocking:i,requestDismiss:r,styleTargets:c};Fl.add(d),Gl();function f(r){let i=Zn(r.detail.originalEvent);Fl.isBelowPointerBlockingLayer(e)||Fl.isInBranch(i)||(t.onPointerDownOutside?.(r),t.onInteractOutside?.(r),r.defaultPrevented||(o&&console.log(`onPointerDownOutside:`,r.detail.originalEvent),n?.(r)))}function p(e){let r=Zn(e.detail.originalEvent);Fl.isInBranch(r)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),e.defaultPrevented||(o&&console.log(`onFocusOutside:`,e.detail.originalEvent),n?.(e)))}function m(r){Fl.isTopMost(e)&&(t.onEscapeKeyDown?.(r),!r.defaultPrevented&&n&&(r.preventDefault(),n(r)))}function h(n){let r=l(),i=t.persistentElements?.map(e=>e()).filter(Ut);return i&&r.push(...i),r.some(e=>nn(e,n))||Fl.isInNestedLayer(e,n)}let g=[i?ql(e,t.persistentElements):void 0,Nl(e,m),jl(e,{exclude:h,onFocusOutside:p,onPointerDownOutside:f,defer:t.defer})];return()=>{Fl.remove(e),Gl(),Kl(e),g.forEach(e=>e?.())}}function Yl(e,t){let{warnOnMissingNode:n=!0}=t;return fa(e,e=>Jl(e,t),{defer:t.defer,getRootNode:t.getRootNode,onMissing:n?()=>Ge("[@zag-js/dismissable] node is `null` or `undefined`"):void 0})}function Xl(e,t={}){return fa(e,e=>(Fl.addBranch(e),()=>{Fl.removeBranch(e)}),{defer:t.defer,getRootNode:t.getRootNode,onMissing:()=>Ge("[@zag-js/dismissable] branch node is `null` or `undefined`")})}function Zl(e){"@babel/helpers - typeof";return Zl=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Zl(e)}function Ql(e,t){if(Zl(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(Zl(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $l(e){var t=Ql(e,`string`);return Zl(t)==`symbol`?t:t+``}function eu(e,t,n){return(t=$l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tu={activateTrap(e,t){if(e.length>0){let n=e[e.length-1];n!==t&&n.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},nu=[],ru=class{addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{Gn(e).forEach(e=>{this.addPortalContainer(e)})})}get active(){return this.state.active}get paused(){return this.state.paused}constructor(e,t){eu(this,`trapStack`,void 0),eu(this,`config`,void 0),eu(this,`doc`,void 0),eu(this,`state`,{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),eu(this,`lastInteractionType`,`keyboard`),eu(this,`portalContainers`,new Set),eu(this,`listenerCleanups`,[]),eu(this,`handleFocus`,e=>{let t=Zn(e),n=this.findContainerIndex(t,e)>=0;if(n||Wt(t))n&&(this.state.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();let t,n=!0;if(this.state.mostRecentlyFocusedNode){if(Gr(this.state.mostRecentlyFocusedNode)>0){let e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){let e=r.findIndex(e=>e===this.state.mostRecentlyFocusedNode);e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some(e=>e.tabbableNodes.some(e=>Gr(e)>0))||(n=!1)}else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),eu(this,`handlePointerDown`,e=>{this.lastInteractionType=`pointer`;let t=Zn(e);this.findContainerIndex(t,e)>=0||(cu(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):cu(this.config.allowOutsideClick,e)||e.preventDefault())}),eu(this,`handleClick`,e=>{let t=Zn(e);this.findContainerIndex(t,e)>=0||cu(this.config.clickOutsideDeactivates,e)||cu(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}),eu(this,`handleTabKey`,e=>{if(this.lastInteractionType=`keyboard`,this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;let t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;au(e)&&e.preventDefault(),this.tryFocus(n)}}),eu(this,`handleEscapeKey`,e=>{lu(e)&&cu(this.config.escapeDeactivates,e)!==!1&&(e.preventDefault(),this.deactivate())}),eu(this,`_mutationObserver`,void 0),eu(this,`setupMutationObserver`,()=>{let e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver(e=>{e.some(e=>Array.from(e.removedNodes).some(e=>e===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),e.some(e=>e.type===`attributes`&&(e.attributeName===`aria-controls`||e.attributeName===`aria-expanded`)||e.type===`childList`&&e.addedNodes.length>0&&Array.from(e.addedNodes).some(e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e;return Jn(t)?!0:t.id&&!this.state.containers.some(e=>e.contains(t))?Yn(t):!1}))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),eu(this,`updateObservedNodes`,()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(e=>{this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}),this.portalContainers.forEach(e=>{this.observePortalContainer(e)}))}),eu(this,`getInitialFocusNode`,()=>{let e=this.getNodeForOption(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!Vr(e)){let t=sn(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{let t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption(`fallbackFocus`)}}else e===null&&(e=this.getNodeForOption(`fallbackFocus`));if(!e||(e.isConnected||(e=this.getNodeForOption(`fallbackFocus`)),!e||!e.isConnected))throw Error(`Your focus-trap needs to have at least one focusable element`);return e}),eu(this,`tryFocus`,(e,t)=>{e!==!1&&e!==sn(this.doc)&&(!e||!e.focus?this.tryFocus(this.getInitialFocusNode()):(e.focus({preventScroll:!!this.config.preventScroll,...t}),this.state.mostRecentlyFocusedNode=e,du(e)&&e.select()))}),eu(this,`deactivate`,e=>{if(!this.state.active)return this;let t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),tu.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let n=this.getOption(t,`onDeactivate`),r=this.getOption(t,`onPostDeactivate`),i=this.getOption(t,`checkCanReturnFocus`),a=this.getOption(t,`returnFocus`,`returnFocusOnDeactivate`);n?.();let o=()=>{uu(()=>{if(a&&this.isSafeToOverrideFocus()){let e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation),t=this.lastInteractionType===`keyboard`?{focusVisible:!0}:void 0;this.tryFocus(e,t)}r?.()})};return a&&i?(i(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(o,o),this):(o(),this)}),eu(this,`pause`,e=>{if(this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onPause`),n=this.getOption(e,`onPostPause`);return this.state.paused=!0,t?.(),this.removeListeners(),this.updateObservedNodes(),n?.(),this}),eu(this,`unpause`,e=>{if(!this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onUnpause`),n=this.getOption(e,`onPostUnpause`);this.state.paused=!1,t?.();try{this.updateTabbableNodes()}catch{}this.attachListeners();try{this.commitInitialFocus()}catch{}return this.updateObservedNodes(),n?.(),this}),eu(this,`updateContainerElements`,e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),eu(this,`getReturnFocusNode`,e=>{let t=this.getNodeForOption(`setReturnFocus`,{params:[e]});return t||t!==!1&&e}),eu(this,`getOption`,(e,t,n)=>e&&e[t]!==void 0?e[t]:this.config[n||t]),eu(this,`getNodeForOption`,(e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if(typeof r==`function`&&(r=r(...n)),r===!0&&(r=void 0),!r){if(r===void 0||r===!1)return r;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let i=r;if(typeof r==`string`){try{i=this.doc.querySelector(r)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!i&&!t)throw Error(`\`${e}\` as selector refers to no known node`)}return i}),eu(this,`findNextNavNode`,e=>{let{event:t,isBackward:n=!1}=e,r=e.target||Zn(t);this.updateTabbableNodes();let i=null;if(this.state.tabbableGroups.length>0){let e=this.findContainerIndex(r,t),a=e>=0?this.state.containerGroups[e]:void 0;if(e<0)i=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex(({firstTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||Vr(r)&&!Ur(r)&&!a?.nextTabbableNode(r,!1))&&(n=e),n>=0){let e=n===0?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];i=Gr(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else au(t)||(i=a?.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex(({lastTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||Vr(r)&&!Ur(r)&&!a?.nextTabbableNode(r))&&(n=e),n>=0){let e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];i=Gr(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else au(t)||(i=a?.nextTabbableNode(r))}}else i=this.getNodeForOption(`fallbackFocus`);return i}),this.trapStack=t.trapStack||nu;let n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:ou,isKeyBackward:su,...t};this.doc=n.document||rn(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}findContainerIndex(e,t){let n=typeof t?.composedPath==`function`?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:i})=>r.contains(e)||n?.includes(r)||i.find(t=>t===e)||this.isControlledElement(r,e)||this.isPersistentElement(e,t))}isControlledElement(e,t){return this.config.followControlledElements?Un(e,t):!1}isPersistentElement(e,t){let n=this.config.persistentElements;if(!n||n.length===0)return!1;let r=typeof t?.composedPath==`function`?t.composedPath():void 0;return n.some(t=>{let n=t();return nn(n,e)||n!=null&&r?.includes(n)})}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=Hr(e,{getShadowRoot:this.config.getShadowRoot}),n=Br(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],i=t[t.length-1],a=r,o=i,s=!1;for(let e=0;e<t.length;e++)if(Gr(t[e])>0){s=!0;break}function c(e,r=!0){let i=t.indexOf(e);if(i>=0)return t[i+(r?1:-1)];let a=n.indexOf(e);if(!(a<0)){if(r){for(let e=a+1;e<n.length;e++)if(Ur(n[e]))return n[e]}else for(let e=a-1;e>=0;e--)if(Ur(n[e]))return n[e]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:a,lastDomTabbableNode:o,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)}attachListeners(){if(this.state.active)return tu.activateTrap(this.trapStack,this),this.listenerCleanups.push(V(this.doc,`focusin`,this.handleFocus,!0),V(this.doc,`mousedown`,this.handlePointerDown,{capture:!0,passive:!1}),V(this.doc,`touchstart`,this.handlePointerDown,{capture:!0,passive:!1}),V(this.doc,`click`,this.handleClick,{capture:!0,passive:!1}),V(this.doc,`keydown`,this.handleTabKey,{capture:!0,passive:!1}),V(this.doc,`keydown`,this.handleEscapeKey)),this}commitInitialFocus(){return this.state.delayInitialFocusTimer=this.config.delayInitialFocus?uu(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this}addListeners(){if(this.state.active)return this.attachListeners(),this.commitInitialFocus(),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}containsElement(e){return this.state.containers.some(t=>nn(t,e))}isSafeToOverrideFocus(){let e=sn(this.doc);return!e||e===this.doc.body||this.containsElement(e)?!0:this.trapStack.some(t=>t!==this&&t.containsElement(e))}activate(e){if(this.state.active)return this;let t=this.getOption(e,`onActivate`),n=this.getOption(e,`onPostActivate`),r=this.getOption(e,`checkCanFocusTrap`);r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=sn(this.doc),t?.();let i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},iu=e=>e?.type===`keydown`,au=e=>iu(e)&&e?.key===`Tab`,ou=e=>iu(e)&&e.key===`Tab`&&!e?.shiftKey,su=e=>iu(e)&&e.key===`Tab`&&e?.shiftKey,cu=(e,...t)=>typeof e==`function`?e(...t):e,lu=e=>!e.isComposing&&e.key===`Escape`,uu=e=>setTimeout(e,0),du=e=>e.localName===`input`&&`select`in e&&typeof e.select==`function`;function fu(e,t={}){let n,r=H(()=>{let r=(Array.isArray(e)?e:[e]).map(e=>typeof e==`function`?e():e).filter(e=>e!=null);if(r.length===0)return;let i=r[0];n=new ru(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:rn(i)});try{n.activate()}catch{}});return function(){n?.deactivate(),r()}}var pu=`data-scroll-lock`,mu=new WeakMap;function hu(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?`paddingLeft`:`paddingRight`}function gu(e){let t=fn(e)?.scrollbarGutter;return t===`stable`||t?.startsWith(`stable `)===!0}function _u(e){let{documentElement:t,body:n}=e;return gi(t)?t:n}function vu(e){let t=e.defaultView??window,{documentElement:n,body:r}=e,i=_u(e),a=gu(n)||gu(r),o=t.innerWidth-n.clientWidth;r.setAttribute(pu,``);let s=()=>ra(n,`--scrollbar-width`,`${o}px`),c=hu(n),l=[s(),An()?(()=>{let{scrollX:e,scrollY:n,visualViewport:i}=t,s=i?.offsetLeft??0,l=i?.offsetTop??0,u={position:`fixed`,overflow:`hidden`,top:`${-(n-Math.floor(l))}px`,left:`${-(e-Math.floor(s))}px`,right:`0`};!a&&o>0&&(u[c]=`${o}px`);let d=na(r,u);return()=>{d?.(),t.scrollTo({left:e,top:n,behavior:`instant`})}})():(()=>{let e={overflow:`hidden`};return!a&&o>0&&(e[c]=`${o}px`),na(i,e)})()];return()=>{l.forEach(e=>e?.()),r.removeAttribute(pu)}}function yu(e){let t=e??document,n=mu.get(t);n||(n={count:0,cleanup:vu(t)},mu.set(t,n)),n.count++;let r=n,i=!1;return()=>{i||(i=!0,r.count--,r.count===0&&(r.cleanup(),mu.delete(t)))}}var bu=Tt({props({props:e}){return{closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0,restoreFocus:!0,...e,positioning:{placement:`bottom`,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:Zc(n,e)})}}))}},computed:{currentPortalled:({prop:e})=>!!e(`modal`)||!!e(`portalled`)},watch({track:e,prop:t,action:n}){e([()=>t(`open`)],()=>{n([`toggleVisibility`])})},entry:[`checkRenderedElements`],on:{"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`,`reposition`]}},states:{closed:{on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setInitialFocus`]},TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`,`setInitialFocus`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`,`setInitialFocus`]}]}},open:{effects:[`trackRenderedElements`,`trapFocus`,`preventScroll`,`hideContentBelow`,`trackDismissableElement`,`trackPositioning`,`proxyTabFocus`],on:{"CONTROLLED.CLOSE":{target:`closed`,actions:[`setFinalFocus`]},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`,`setFinalFocus`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackRenderedElements({context:e,scope:t}){return Ri({getContainerEl:()=>Qc(t),getRootNode:()=>t.getRootNode(),parts:{title:()=>el(t),description:()=>tl(t)},onChange:t=>e.set(`renderedElements`,t)})},trackPositioning({context:e,prop:t,scope:n}){e.set(`currentPlacement`,t(`positioning`).placement);let r=Jc(n);return Lc(()=>r??Zc(n,e.get(`triggerValue`)),()=>$c(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},trackDismissableElement({send:e,prop:t,scope:n}){let r=()=>Qc(n),i=!0;return Yl(r,{type:`popover`,pointerBlocking:t(`modal`),exclude:[Yc(n),...Xc(n)].filter(Boolean),defer:!0,getRootNode:n.getRootNode,layerStyleTargets:[()=>$c(n)],onEscapeKeyDown(e){t(`onEscapeKeyDown`)?.(e),t(`closeOnEscape`)||e.preventDefault()},onInteractOutside(e){t(`onInteractOutside`)?.(e),e.defaultPrevented||(i=!(e.detail.focusable||e.detail.contextmenu),t(`closeOnInteractOutside`)||e.preventDefault())},onPointerDownOutside:t(`onPointerDownOutside`),onFocusOutside:t(`onFocusOutside`),persistentElements:t(`persistentElements`),onRequestDismiss:t(`onRequestDismiss`),onDismiss(t){e({type:`CLOSE`,src:`interact-outside`,restoreFocus:i,focusVisible:t?.type===`keydown`})}})},proxyTabFocus({prop:e,scope:t,context:n}){return e(`modal`)||!e(`portalled`)?void 0:ki(()=>Qc(t),{triggerElement:Zc(t,n.get(`triggerValue`)),defer:!0,getShadowRoot:!0,onFocus(e){e.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t,context:n}){return e(`modal`)?bl(()=>[Qc(t),Zc(t,n.get(`triggerValue`))],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e(`modal`))return yu(t.getDoc())},trapFocus({prop:e,scope:t,context:n}){return e(`modal`)?fu(()=>Qc(t),{preventScroll:!0,returnFocusOnDeactivate:!!e(`restoreFocus`),initialFocus:()=>Kr({root:Qc(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)}),setReturnFocus:r=>{let i=e(`finalFocusEl`)?.();if(i)return i;let a=n.get(`triggerValue`);if(a){let e=Zc(t,a);if(e)return e}return Xc(t)[0]||r},getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){let i=Jc(n);Lc(()=>i??Zc(n,r.get(`triggerValue`)),()=>$c(n),{...t(`positioning`),...e.options,defer:!0,listeners:!1,onComplete(e){r.set(`currentPlacement`,e.placement)}})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},checkRenderedElements({context:e,scope:t}){H(()=>{e.set(`renderedElements`,{title:!!el(t),description:!!tl(t)})})},setInitialFocus({prop:e,scope:t}){e(`modal`)||H(()=>{let n=Kr({root:Qc(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)});n&&n.focus({preventScroll:!0})})},setFinalFocus({event:e,prop:t,scope:n,context:r}){let i=e.restoreFocus??e.previousEvent?.restoreFocus;if(i!=null&&!i||!t(`restoreFocus`))return;let a=xu(e);H(()=>{let e=t(`finalFocusEl`)?.();e?e.focus(a):Zc(n,r.get(`triggerValue`))?.focus(a)})},invokeOnOpen({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})}}}});function xu(e){return e.focusVisible??e.previousEvent?.focusVisible?{preventScroll:!0,focusVisible:!0}:{preventScroll:!0}}var Su=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro(),{dir:r}=ao();return rl(Oa(bu,{id:t,dir:r,getRootNode:n,...e}),Na)},Cu=e=>{let[t,{children:n,...r}]=to(e),i=Su(r),a=eo(z({present:i.open},t));return(0,G.jsx)(ba,{value:i,children:(0,G.jsx)(Va,{value:a,children:n})})},wu=e=>{let[t,{value:n,children:r}]=to(e),i=eo(z({present:n.open},t));return(0,G.jsx)(ba,{value:n,children:(0,G.jsx)(Va,{value:i,children:r})})},Tu=(0,s.forwardRef)((e,t)=>{let n=z(xa().getTitleProps(),e);return(0,G.jsx)(U.h2,{...n,ref:t})});Tu.displayName=`PopoverTitle`;var Eu=K(),Du=(0,s.forwardRef)((e,t)=>{let[n,r]=Eu(e,[`value`]),i=xa(),a=Ha(),o=i.getTriggerProps(n),s=z({...o,"aria-controls":a.unmounted?void 0:o[`aria-controls`]},r);return(0,G.jsx)(U.button,{...s,ref:t})});Du.displayName=`PopoverTrigger`;var Ou=Object.defineProperty,ku=(e,t)=>{let n={};for(var r in e)Ou(n,r,{get:e[r],enumerable:!0});return t||Ou(n,Symbol.toStringTag,{value:`Module`}),n},Au=e=>{let{children:t,disabled:n}=e,[r,i]=(0,s.useState)(e.container?.current),a=(0,s.useSyncExternalStore)(Mu,()=>!1,()=>!0),{getRootNode:c}=ro();if((0,s.useEffect)(()=>{i(()=>e.container?.current)},[e.container]),a||n)return(0,G.jsx)(G.Fragment,{children:t});let l=r??ju(c);return(0,G.jsx)(G.Fragment,{children:s.Children.map(t,e=>(0,o.createPortal)(e,l))})},ju=e=>{let t=e?.(),n=t.getRootNode();return Yt(n)?n:rn(t).body},Mu=()=>()=>{},Nu=`CapsLock.ContextMenu.Convert.KanaMode.NonConvert.Help.Insert.NumLock.Fn.FnLock.PrintScreen.ScrollLock.Pause.BrowserBack.BrowserFavorites.BrowserForward.BrowserHome.BrowserRefresh.BrowserSearch.BrowserStop.Eject.LaunchMail.MediaPlayPause.MediaStop.MediaTrackNext.MediaTrackPrevious.Power.AudioVolumeDown.AudioVolumeMute.AudioVolumeUp.WakeUp.Hyper.Super.Again.Copy.Cut.Find.Open.Paste.Props.Select.Undo.Hiragana.Katakana`.split(`.`),Pu=[`Clear`,`Cancel`,`Standby`,`LaunchApplication1`,`LaunchApplication2`,`LaunchMediaPlayer`,`HangulMode`,`HanjaMode`,`Zenkaku`,`Hankaku`,`ZenkakuHankaku`],Fu=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`],Iu=[`Enter`,`Escape`,`Space`,`Tab`,`Backspace`,`Delete`],Lu=[`Control`,`Alt`,`Shift`,`Meta`],Ru=new Set(Lu),zu={Control:`Control`,Ctrl:`Control`,control:`Control`,ctrl:`Control`,Shift:`Shift`,shift:`Shift`,Alt:`Alt`,Option:`Alt`,alt:`Alt`,option:`Alt`,Command:`Meta`,Cmd:`Meta`,Meta:`Meta`,command:`Meta`,cmd:`Meta`,meta:`Meta`,OS:`Meta`,os:`Meta`,Win:`Meta`,win:`Meta`,CommandOrControl:`Mod`,Mod:`Mod`,commandorcontrol:`Mod`,mod:`Mod`},Bu=new Set(`ABCDEFGHIJKLMNOPQRSTUVWXYZ`),Vu=new Set(`0123456789`),Hu=new Set(Array.from({length:24},(e,t)=>`F${t+1}`)),Uu=new Set(Fu),Wu=new Set(Iu),Gu=new Set(`/[]\\=-,.;\`'+?!@#$%^&*()_{}|:"<>~`),Ku={Backquote:"`",Backslash:`\\`,BracketLeft:`[`,BracketRight:`]`,Comma:`,`,Equal:`=`,Minus:`-`,Period:`.`,Quote:`'`,Semicolon:`;`,Slash:`/`};function qu(...e){return new Set(e.flatMap(e=>[...e]))}var Ju=qu(Bu,Vu,Hu,Uu,Wu,Gu,Nu,Pu);function Yu(e){return/^\p{Letter}$/u.test(e)}function Xu(e){if(!e)return``;if(Yu(e)){let t=e.toUpperCase();return t.length===1?t:e}return e===` `?`Space`:e}var Zu={Control:`⌃`,Alt:`⌥`,Shift:`⇧`,Meta:`⌘`,Mod:`⌘`},Qu={Control:`Control`,Alt:`Option`,Shift:`Shift`,Meta:`Cmd`,Mod:`Cmd`},$u={Control:`Ctrl`,Alt:`Alt`,Shift:`Shift`,Meta:`Win`,Mod:`Ctrl`},ed={...$u,Meta:`Super`},td={"`":`Backquote`,"\\":`Backslash`,"[":`Left Bracket`,"]":`Right Bracket`,",":`Comma`,"=":`Equal`,"-":`Minus`,".":`Period`,";":`Semicolon`},nd={ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`,Enter:`↵`,Escape:`Esc`,Backspace:`⌫`,Delete:`⌦`,Tab:`⇥`,Space:`␣`},rd=/^(?:Node\.js\/|Deno\/|Bun\/|Cloudflare-Workers)/;function id(){return typeof navigator>`u`||rd.test(String(navigator.userAgent))}function ad(e){let t=``,n=e;if(n==null){if(id())return`linux`;t=navigator.platform?.toLowerCase()??``,n=navigator.userAgent??``}return n=n.toLowerCase(),t.includes(`mac`)||n.includes(`mac`)?`mac`:t.includes(`win`)||n.includes(`win`)?`windows`:`linux`}function od(e,t=ad()){return e===`Mod`?t===`mac`?`Meta`:`Control`:e}function sd(e,t){let n=!1;try{n=t!==`mac`&&typeof e.getModifierState==`function`&&e.getModifierState(`AltGraph`)}catch{}let r=(e.key||``).normalize(`NFC`),i=Xu(r),a=t===`windows`&&n&&!ld({key:i,altGraph:n});return{key:i,code:e.code||``,ctrl:a||!!e.ctrlKey,shift:!!e.shiftKey,alt:a||!!e.altKey,meta:!!e.metaKey,altGraph:n&&!a,location:e.location,isComposing:!!e.isComposing||e.keyCode===229||r===`Process`||r===`Unidentified`}}function cd(e){if(/^Key[A-Z]$/i.test(e))return e.slice(3).toUpperCase();if(/^Digit[0-9]$/i.test(e))return e.slice(5);if(/^Numpad[0-9]$/i.test(e))return e.slice(6);if(Object.hasOwn(Ku,e))return Ku[e];let t={NumpadAdd:`+`,NumpadSubtract:`-`,NumpadMultiply:`*`,NumpadDivide:`/`,NumpadDecimal:`.`,NumpadEnter:`Enter`,Space:`Space`};return Object.hasOwn(t,e)?t[e]:void 0}function ld(e){return e.altGraph?e.key===`Dead`||ud(e.key)&&!/^[A-Za-z0-9]$/.test(e.key):!1}function ud(e){return e!==``&&Array.from(e).length===1}function dd(e){let t=e.toLowerCase();return Object.hasOwn(zu,t)?zu[t]:void 0}function fd(e){return/^[A-Za-z][A-Za-z0-9]*$/.test(e)}function pd(e){return e.startsWith(`[`)&&e.endsWith(`]`)&&fd(e.slice(1,-1))?e.slice(1,-1):void 0}function md(e){if(!e.endsWith(`+`))return e.split(`+`);let t=e.slice(0,-1).split(`+`);return t.at(-1)===``&&t.pop(),t.push(`+`),t}function hd(e){return/^[A-Za-z]$/.test(e)}function gd(e){return/^\p{Script_Extensions=Latin}$/u.test(e)}var _d;function vd(e,t){return e===t?!0:/^\p{Letter}$/u.test(e)&&/^\p{Letter}$/u.test(t)?(_d??=new Intl.Collator(void 0,{sensitivity:`accent`}),_d.compare(e,t)===0):!1}function yd(e){if(/^\[.*\]$/s.test(e.trim()))throw Error(`Logical key must not contain a bracketed physical code. Use the code field instead.`)}function bd(e){return/^(?:.|F(?:[1-9]|1\d|2[0-4])|[A-Z][a-z][A-Za-z\d]*)$/su.test(e)}function xd(e,t,n,r,i){let a={Control:t,Alt:r,Shift:n,Meta:i};return{...e,ctrl:t,shift:n,alt:r,meta:i,modifiers:Lu.filter(e=>a[e])}}function Sd(e){return Array.isArray(e)}function Cd(e){return Sd(e)&&e.length===1?e[0]:e}function wd(e,t){let n=md(e),r=new Set,i=``;for(let e=0;e<n.length;e++){let a=n[e].trim();if(e===n.length-1)i=Xu(a);else{let e=dd(a);if(e){let n=od(e,t);r.add(n)}else n.length===1&&(i=Xu(a))}}!i&&n.length>0&&(i=Xu(n[n.length-1].trim()));let a=pd(i);return xd(a===void 0?{key:i}:{code:a},r.has(`Control`),r.has(`Shift`),r.has(`Alt`),r.has(`Meta`))}function Td(e,t){e.code===void 0&&yd(e.key);let n=e.ctrl??!1,r=e.shift??!1,i=e.alt??!1,a=e.meta??!1;return e.mod&&(od(`Mod`,t)===`Control`?n=!0:a=!0),xd(e.code===void 0?{key:Xu(e.key)}:{code:e.code},n,r,i,a)}function Ed(e,t){return typeof e==`string`?wd(e,t):Td(e,t)}function Dd(e,t){e.code===void 0&&yd(e.key);let n=t===`mac`?e.meta&&!e.ctrl:e.ctrl&&!e.meta,r=[];if(n)r.push(`Mod`),e.alt&&r.push(`Alt`),e.shift&&r.push(`Shift`);else for(let t of Lu)e.modifiers.includes(t)&&r.push(t);return r.push(e.code===void 0?Xu(e.key):`[${e.code}]`),r.join(`+`)}function Od(e,t=ad()){return Array.isArray(e)?e.map(e=>Ed(e,t)):Ed(e,t)}function kd(e,t=ad()){if(Array.isArray(e)){let n=e.map(e=>Dd(Ed(e,t),t));return n.length===1?n[0]:n}return Dd(Ed(e,t),t)}function Ad(e){return dd(e)!==void 0}function jd(e,t){let n=sd(e,t),r=!n.altGraph&&n.ctrl,i=!n.altGraph&&n.alt,a=n.shift;return xd({key:n.key},r,a,i,n.meta)}function Md(e,t=ad()){let n=typeof e==`string`?wd(e,t):e;return n.code===void 0?!Ad(n.key)&&n.key.length>0:n.code.length>0&&!/^(Control|Shift|Alt|Meta)(Left|Right)$/.test(n.code)}function Nd(e){return Array.isArray(e)?e.map(e=>Pd(e)):Pd(e)}function Pd(e){e.code===void 0&&yd(e.key);let t=[];for(let n of Lu)e.modifiers.includes(n)&&t.push(n);return t.push(e.code===void 0?e.key:`[${e.code}]`),t.join(`+`)}function Fd(e,t={}){if(Array.isArray(e)){let n=e.map(e=>zd(e,t));return t.parts?n:n.map(e=>e.join(Rd(t))).join(t.sequenceSeparator??` `)}let n=zd(e,t);return t.parts?n:n.join(Rd(t))}function Id(){return ad()}function Ld(e){let t=e.useSymbols??!0;return typeof t==`boolean`?t:t.modifiers??!0}function Rd(e){let t=e.platform??Id();return e.separatorToken??(t===`mac`&&Ld(e)?` `:`+`)}function zd(e,t){let n=t.platform??Id(),r=t.useSymbols??!0,i=Ld(t),a=typeof r==`boolean`?r:r.keys??!0,o=md(kd(e,n));if(n===`mac`){let e=e=>{let t=Lu.indexOf(e===`Mod`?`Meta`:e);return t===-1?Lu.length:t};o.sort((t,n)=>e(t)-e(n))}return o.map(e=>Vd(e,n,i,a,t))}function Bd(e,t){return e&&Object.hasOwn(e,t)?e[t]:void 0}function Vd(e,t,n,r,i){let a=dd(e);if(a)return t===`mac`?n?Zu[a]:Qu[a]:t===`windows`?$u[a]:ed[a];let o=pd(e),s=Bd(i.keyLabels,o??e);if(s!==void 0)return s;let c=o?.startsWith(`Numpad`)??!1,l=o??e,u=o?i.layoutMap?.get(o):void 0;u?l=Xu(u):o&&(l=c?o.slice(6):cd(o)??o);let d=Bd(r?nd:td,l)??l;return c?`Numpad ${d.replace(/([a-z])([A-Z])/g,`$1 $2`)}`:d}function Hd(e){if(typeof e!=`string`){if(e.length===0)return{valid:!1,warnings:[],errors:[`Sequence cannot be empty`]};if(e.length===1)return Ud(e[0]);let t=e.map(Ud),n=e=>t.flatMap((t,n)=>t[e].map(e=>`Step ${n+1}: ${e}`));return{valid:t.every(e=>e.valid),warnings:n(`warnings`),errors:n(`errors`)}}return Ud(e)}function Ud(e){let t=[],n=[];if(!e||e.trim()===``)return{valid:!1,warnings:[],errors:[`Hotkey cannot be empty`]};let r=md(e).map(e=>e.trim());if(r.length===0||r.some(e=>e===``))return{valid:!1,warnings:[],errors:[`Invalid hotkey format: empty parts detected`]};let i=r.slice(0,-1),a=r[r.length-1];for(let e of i)dd(e)||n.push(`Unknown modifier: '${e}'`);return a.length>1&&(a.startsWith(`[`)||a.endsWith(`]`))&&pd(a)===void 0&&n.push(`Invalid physical key: use a bracketed KeyboardEvent.code, such as [KeyS]`),pd(a)===void 0&&!bd(a)&&t.push(`Unknown key: '${a}'. Key names are case-sensitive, such as 'Escape' and 'F1'.`),{valid:n.length===0,warnings:t,errors:n}}function Wd(e){let t=Hd(e);if(!t.valid)throw Error(`Invalid hotkey '${String(e)}': ${t.errors.join(`, `)}`)}function Gd(e){return Hd(e).valid}function Kd(e,t,n=ad()){let r=typeof t==`string`?Od(t,n):t,i=sd(e,n),a={matched:!1,score:0};if(i.isComposing||i.altGraph&&(r.ctrl||r.alt)||i.altGraph&&!ld(i))return a;if(r.code!==void 0)return i.altGraph||!Jd(i,r,!1)?a:i.code===r.code?l(`code`,3):a;let o=vd(i.key,r.key),s=o&&ud(i.key)&&!/^\p{Letter}$/u.test(i.key)&&!r.shift;if(o&&Jd(i,r,s))return l(`key`,s?2:3);if(!qd(i)||i.altGraph||!Jd(i,r,!1))return a;let c=cd(i.code);return c!==void 0&&vd(c,r.key)?l(`fallback`,1):a;function l(e,t){return{matched:!0,score:t,source:e,identity:{key:i.key,code:i.code}}}}function qd({key:e,code:t,ctrl:n,meta:r,shift:i,alt:a}){return e!==`Dead`&&!ud(e)?!1:t.startsWith(`Digit`)?!0:hd(e)?!1:/^[!-~]$/.test(e)?i:!gd(e)||a?!0:(n||r)&&!t.startsWith(`Key`)}function Jd(e,t,n){let r=!e.altGraph&&e.ctrl,i=!e.altGraph&&e.alt;return r!==t.ctrl||i!==t.alt||e.meta!==t.meta?!1:e.shift===t.shift||n&&e.shift}function Yd(e,t){return e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift&&e.meta===t.meta&&(e.code!==void 0||t.code!==void 0?e.code===t.code:vd(e.key,t.key))}var Xd=`global`,Zd={capture:!1,preventDefault:!0,stopPropagation:!0,eventType:`keydown`,enabled:!0,ignoreInputs:`auto`,conflictBehavior:`warn`,scope:Xd};function Qd(...e){let t={};for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];r!==void 0&&(t[e]=r)}return t}function $d(e,t){return{...t,...Qd(e,t)}}function ef(e){return!!(e.code||e.key)}function tf(e){return!(e.ctrl||e.meta||e.key===`Escape`||e.code===`Escape`)}function nf(e,t,n,r){if(n!==`allow`&&n!==`warn`){if(n===`error`)throw Error(`'${t}' is already registered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to allow multiple registrations.`);r(e)}}function rf(e,t){let n=e,r=t,i=Object.keys(n);return i.length===Object.keys(r).length&&i.every(e=>e===`meta`&&n[e]&&r[e]?rf(n[e],r[e]):Object.is(n[e],r[e]))}function af(e,t,n=ad()){let r=typeof t==`string`?Od(t,n):t;return ef(r)?Kd(e,r,n).matched:!1}function of(e,t,n={}){let{preventDefault:r=!0,stopPropagation:i=!0,platform:a}=n,o=a??ad(),s=typeof e==`string`?e:Nd(e),c=typeof e==`string`?Od(e,o):e,l={kind:`chord`,hotkey:s,parsedChord:c};return e=>{af(e,c,o)&&(r&&e.preventDefault(),i&&e.stopPropagation(),t(e,l))}}function sf(e,t={}){let{preventDefault:n=!0,stopPropagation:r=!0,platform:i}=t,a=i??ad(),o=Object.entries(e).filter(e=>!!e[1]).map(([e,t])=>{let n=Od(e,a);return{parsed:n,handler:t,context:{kind:`chord`,hotkey:e,parsedChord:n}}});return e=>{for(let{parsed:t,handler:i,context:s}of o)if(af(e,t,a)){n&&e.preventDefault(),r&&e.stopPropagation(),i(e,s);return}}}function cf(e,t,n=ad()){let r=Sd(e)?e:[e],i=Sd(t)?t:[t];return r.length===i.length&&r.every((e,t)=>Yd(Od(e,n),Od(i[t],n)))}var lf=1e3;function uf(e,t={}){let n=t.platform??ad(),r=t.timeout??1e3,i=Od(e,n),a=0,o=0;return{match(e){if(e.type===`keydown`&&e.repeat||sd(e,n).isComposing||Ad(Xu(e.key)))return!1;let t=Date.now();a>0&&t-o>r&&(a=0);let s=i[a];if(!s)return!1;if(af(e,s,n)){if(o=t,a++,a>=i.length)return a=0,!0}else a>0&&(af(e,i[0],n)?(a=1,o=t):a=0);return!1},reset(){a=0,o=0},getProgress(){return a}}}function df(e,t,n={}){if(!e||t.includes(`AltGraph`))return!1;let r=[...new Set(t.map(Xu).filter(e=>Ru.has(e)))],i=Sd(e)?e[0]:e;if(i===void 0)return!1;let{modifiers:a}=Od(i,n.platform);return r.length>0&&r.every(e=>a.includes(e))&&(!n.exact||r.length===a.length)}function ff(e){return e?.nodeType===1}function pf(e){return`document`in e||e.nodeType===9}function mf(e){return`document`in e?e.document:e.ownerDocument??e}function hf(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function gf(e){return e.assignedSlot??e.parentNode??(e.host||null)}function _f(e){if(pf(e))return!0;for(let t=hf(e.ownerDocument);t;t=gf(t))if(t===e)return!0;return!1}var vf=[`ArrowUp`,`ArrowDown`],yf=[`ArrowLeft`,`ArrowRight`],bf=[`Enter`],xf=[`Space`],Sf=[`Enter`,`Space`],Cf=`typeahead`,wf=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`Enter`,`Space`,Cf],Tf=[`ArrowUp`,`ArrowDown`,`Home`,`End`,`Enter`,`Space`,Cf],Ef=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`,`Enter`,`Space`],Df=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Space`],Of=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`],kf=[`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`],Af=[`ArrowLeft`,`ArrowRight`,`Home`,`End`],jf={button:Sf,submit:Sf,reset:Sf,image:Sf,color:Sf,file:Sf,checkbox:xf,radio:Df,range:Of};function Mf(e){return e.getAttribute(`role`)?.trim().split(/\s+/)[0]}function Nf(e){if(!ff(e))return!1;switch(e.localName){case`input`:{let t=e;return!jf[t.type]&&!t.readOnly}case`textarea`:return!e.readOnly;case`select`:return!0}let t=Mf(e);return t===`textbox`||t===`searchbox`||e.isContentEditable}function Pf(e){return e.localName.includes(`-`)?e.constructor.formAssociated===!0?!e.hasAttribute(`role`):!e.hasAttribute(`tabindex`):!1}function Ff(e){let t=e.getAttribute(`aria-orientation`);switch(Mf(e)){case`button`:case`tab`:case`option`:case`treeitem`:case`menuitem`:case`menuitemcheckbox`:case`menuitemradio`:return Sf;case`link`:return bf;case`checkbox`:case`switch`:case`radio`:return xf;case`menu`:case`menubar`:case`tree`:return wf;case`listbox`:return[...t===`horizontal`?yf:vf,`Home`,`End`,`Enter`,`Space`,Cf];case`combobox`:return Tf;case`tablist`:return[...t===`vertical`?vf:yf,`Home`,`End`,`Enter`,`Space`];case`toolbar`:return[...t===`vertical`?vf:yf,`Home`,`End`];case`grid`:case`treegrid`:return Ef;case`radiogroup`:return Df;case`slider`:return Of;case`spinbutton`:return kf}switch(e.localName){case`button`:case`summary`:return Sf;case`input`:return jf[e.type]??Af;case`textarea`:return Of;case`a`:case`area`:return e.hasAttribute(`href`)?bf:[]}return[]}function If(e,t,n){if(t.ctrlKey||t.metaKey||t.altKey)return!1;let r=Ff(e);return n===`Enter`||n===`Space`?!t.shiftKey&&r.includes(n):r.includes(n)||r.includes(Cf)&&/^.$/u.test(t.key)}function Lf(e,t,n){let r=hf(t),i=[];for(let e=r;e;e=gf(e))ff(e)&&i.push(e);let a=e.composedPath()[0];ff(a)&&!i.includes(a)&&(i=e.composedPath().filter(ff));let o=i.findIndex(e=>n(e)||e===r&&Pf(e));return{elements:i,index:o}}function Rf({elements:e,index:t},n){return t>=0&&(pf(n)||t<e.indexOf(n))}var zf=new WeakMap;function Bf(e,t){let n=zf.get(e);if(!n){let r=Xu(e.key);n=Lf(e,mf(t),t=>Nf(t)||If(t,e,r)),zf.set(e,n)}return Rf(n,t)}function Vf(e,t){return Rf(Lf(e,mf(t),Nf),t)}var Hf=new Set;function Uf(e){for(let t of e)Hf.add(t);for(let e of Hf)Hf.delete(e),e()}function Wf(e){let t=e,n=new Set;return{get state(){return t},get:()=>t,setState(e){let r=e(t);Object.is(t,r)||(t=r,Uf(n))},subscribe(e){let r=()=>{typeof e==`function`?e(t):e.next?.(t)};return n.add(r),{unsubscribe(){n.delete(r),Hf.delete(r)}}}}}var Gf=class{dispatch;#e=new Map;#t=new WeakMap;constructor(e){this.dispatch=e}add(e,t,n){if(typeof document>`u`)return;let r=this.#e.get(e)??new Map,i=r.get(t);if(!i){let n=new Set,a=r=>i=>{let a=i,o=this.#t.get(a),s=!o||o.groups.has(n);(!o||s)&&(o={ids:new Set,groups:new Set},this.#t.set(a,o)),o.groups.add(n);let c=new Set;for(let e of n)o.ids.has(e)||(o.ids.add(e),c.add(e));this.dispatch(a,e,r,t,c,s)};i={ids:n,keydown:a(`keydown`),keyup:a(`keyup`)},e.addEventListener(`keydown`,i.keydown,t),e.addEventListener(`keyup`,i.keyup,t),r.set(t,i),this.#e.set(e,r)}i.ids.add(n)}remove(e,t,n){let r=this.#e.get(e),i=r?.get(t);i&&(i.ids.delete(n),i.ids.size===0&&(e.removeEventListener(`keydown`,i.keydown,t),e.removeEventListener(`keyup`,i.keyup,t),r.delete(t),r.size===0&&this.#e.delete(e)))}destroy(){for(let[e,t]of this.#e)for(let[n,r]of t)e.removeEventListener(`keydown`,r.keydown,n),e.removeEventListener(`keyup`,r.keyup,n);this.#e.clear(),this.#t=new WeakMap}},Kf={current:null},qf=new Set,Jf=new WeakSet,Yf=new Map,Xf=!1,Zf=e=>e.code||`key:${e.key}`;function Qf(e){if(Yf.delete(Zf(e))&&Jf.add(e),Ru.has(Xu(e.key)))for(let[e,t]of Yf)Ru.has(t)||Yf.delete(e);ep()}function $f(){Yf.clear(),ep()}function ep(){Xf&&qf.size===0&&Yf.size===0&&(document.removeEventListener(`keyup`,Qf,!0),window.removeEventListener(`blur`,$f),Xf=!1)}function tp(e){qf.add(e),!Xf&&typeof document<`u`&&(document.addEventListener(`keyup`,Qf,!0),window.addEventListener(`blur`,$f),Xf=!0)}function np(e){qf.delete(e),ep()}function rp(e){Jf.add(e),Yf.set(Zf(e),Xu(e.key))}function ip(e){return qf.size>0||Jf.has(e)||Yf.has(Zf(e))}function ap(e,t){return e.enabled===!1?`disabled`:t?.isScopeActive(e.scope)===!1?`suspended`:`active`}function op(e){let t={id:e.id,status:ap(e.options,Kf.current),target:e.target,triggerCount:e.triggerCount,hasFired:e.hasFired};if(e.kind===`chord`)return{...t,kind:`chord`,hotkey:e.hotkey,parsedChord:e.parsedChord,options:e.options};let n=e.parsedSequence.length,r=e.currentIndex>0&&e.currentIndex<n;return{...t,kind:`sequence`,hotkey:e.hotkey,parsedSequence:e.parsedSequence,options:e.options,matchedStepCount:r?e.currentIndex:0,partialMatchLastKeyTime:r?e.lastKeyTime:0}}var sp=0;function cp(e,t){return typeof e==`string`?e:Nd(t)}function lp(){return`hotkey_${++sp}`}function up(e){let t=e;return{id:lp(),unregister:()=>{},get callback(){return t},set callback(e){t=e},setOptions:()=>{},get isActive(){return!1}}}function dp(e){return{...Zd,...e===`sequence`?{timeout:lf}:{requireReset:!1}}}function fp(e,t){if(e===`chord`){let{timeout:e,...n}=t;return n}let{requireReset:n,...r}=t;return r}function pp(e){return e.kind===`chord`?[e.parsedChord]:e.parsedSequence}function mp(e){let{ignoreInputs:t=`auto`}=e.options;return t===`auto`?tf(pp(e)[0]):t}function hp(e,t){return e.length===t.length&&e.every((e,n)=>Yd(e,t[n]))}function gp(e){return Sd(e)?e.join(` `):e}var _p=class e{registrations=Wf(new Map);appHotkeys=Wf(null);scopes=Wf({active:[],exclusive:null,allowed:[],suspended:[]});#e;#t=new Set;#n=0;#r=[];#i=null;#a=new Gf((...e)=>this.#y(...e));#o=new WeakMap;#s=new Set;#c=new Map;constructor(){this.#e=ad()}static getInstance(){return Kf.current??=new e}static resetInstance(){Kf.current?.destroy(),Kf.current=null}activateScope(e,t={}){if(e===`global`)return()=>{};let{exclusive:n}=t,r=n?n===!0?[]:n.allow:null,i={scope:e,parent:t.parent??`global`,allow:r,order:++this.#n};return this.#t.add(i),this.#u(),()=>{this.#t.delete(i)&&this.#u()}}isScopeActive(e=Xd){return this.#i?this.#i.has(e):e===`global`||this.#r.includes(e)}#l(e=Xd){return this.#r.indexOf(e)+1}#u(){let e=new Map,t=new Map;for(let n of this.#t)e.set(n.scope,n.parent),t.set(n.scope,Math.max(t.get(n.scope)??0,n.order));let n=t=>{let n=0,r=new Set;for(let i=e.get(t);i!==void 0&&!r.has(i);i=e.get(i))r.add(i),n++;return n},r=new Map;for(let[n,i]of t){let a=new Set;for(let o=n;o!==void 0&&!a.has(o);o=e.get(o)){a.add(o);let e=t.get(o);e!==void 0&&r.set(o,Math.min(r.get(o)??e,i))}}let i=(e,i)=>r.get(e)-r.get(i)||n(e)-n(i)||t.get(e)-t.get(i);this.#r=[...t.keys()].sort(i);let a=[...this.#t].filter(e=>e.allow).sort((e,t)=>i(e.scope,t.scope)||e.order-t.order).pop(),o=[Xd,...this.#r],s=[];if(this.#i=null,a?.allow){let{allow:t}=a,n=t=>{let n=new Set;for(let r=t;r!==void 0&&!n.has(r);r=e.get(r)){if(r===a.scope)return!0;n.add(r)}return!1};s=o.filter(e=>!n(e)&&t.includes(e)),this.#i=new Set([...o.filter(n),...s])}let c=this.#i;this.scopes.setState(()=>({active:this.#r,exclusive:a?.scope??null,allowed:s,suspended:c?o.filter(e=>!c.has(e)):[]})),this.#p()}#d(e){return ap(e.options,this)===`active`}#f(e,t){let n=e.composedPath();for(let r of this.registrations.state.values())if(!(!this.#d(r)||r.options.eventType!==t||!n.includes(r.target)||mp(r)&&Bf(e,r.target))&&(r.kind===`chord`?[r.parsedChord]:[r.parsedSequence[r.currentIndex],r.parsedSequence[0]]).some(t=>Kd(e,t,r.options.platform).matched))return!0;return!1}#p(){this.registrations.setState(e=>new Map(e))}register(e,t,n={}){let r=Cd(e);if(r==null||Sd(r)&&r.length===0||typeof document>`u`&&!n.target)return up(t);let i=lp(),a=n.platform??this.#e,o=n.target??document,s=Sd(r),c=s?`sequence`:`chord`,l={id:i,callback:t,options:{...dp(c),...fp(c,Qd(n)),platform:a},target:o,triggerCount:0,hasFired:!1},u;if(s){let e=Od(r,a);u={...l,kind:`sequence`,hotkey:r.map((t,n)=>cp(t,e[n])),parsedSequence:e,currentIndex:0,lastKeyTime:0}}else{let e=Od(r,a);u={...l,kind:`chord`,hotkey:cp(r,e),parsedChord:e}}if(!(u.kind===`sequence`?u.parsedSequence:[u.parsedChord]).every(ef))return up(t);let d=this.#D(u);d&&nf(d.id,gp(u.hotkey),n.conflictBehavior??`warn`,e=>this.#m(e)),this.#a.add(o,!!u.options.capture,i),this.registrations.setState(e=>new Map(e).set(i,u));let f=this;return{get id(){return i},unregister:()=>{f.#m(i)},get callback(){return f.registrations.state.get(i)?.callback??t},set callback(e){let t=f.registrations.state.get(i);t&&(t.callback=e)},setOptions:e=>{f.registrations.setState(t=>{let n=t.get(i);if(!n)return t;let r={...dp(n.kind),platform:n.options.platform},a={...n.options},o=Object.entries(fp(n.kind,e));for(let[e,t]of o)t===void 0?e in r?a[e]=r[e]:delete a[e]:a[e]=t;if(rf(n.options,a))return t;let s=!!n.options.capture;return s!==!!a.capture&&(f.#a.remove(n.target,s,i),f.#a.add(n.target,!!a.capture,i)),new Map(t).set(i,{...n,options:a})})},get isActive(){return f.registrations.state.has(i)}}}#m(e){let t=this.registrations.state.get(e);if(!t)return;let n=t.target;this.registrations.setState(t=>{let n=new Map(t);return n.delete(e),n}),this.#a.remove(n,!!t.options.capture,e),this.#g(e)}#h(e,t){this.#g(e),this.#c.set(e,setTimeout(()=>{this.#c.delete(e);let t=this.registrations.state.get(e);if(t?.kind!==`sequence`||t.currentIndex===0)return;let n=t.options.timeout??1e3,r=t.lastKeyTime+n-Date.now();r>=0?this.#h(e,r+1):(t.currentIndex=0,t.lastKeyTime=0,this.#p())},t))}#g(e){let t=this.#c.get(e);t!==void 0&&(clearTimeout(t),this.#c.delete(e))}#_(e,t,n){let r=[];for(let i of e){let e=this.registrations.state.get(i);e?.kind===n&&!!e.options.capture===t&&r.push(e)}return r}#v(e,t){let n=this.registrations.state.get(e.id);return n&&!!n.options.capture===t?n:void 0}#y(e,t,n,r,i,a){a&&this.#o.set(e,this.#x(e,n)),this.#b(e,t,n,r,this.#_(i,r,`chord`)),this.#C(e,t,n,r,this.#_(i,r,`sequence`))}#b(e,t,n,r,i){if(n===`keyup`)for(let t of i)t.hasFired&&this.#O(t,e)&&(t.hasFired=!1,t.activeMatch=void 0);if(ip(e)||this.#o.get(e))return;let a=new Map,o=0,s=!1;for(let r of i){let i=this.#d(r);if(!i&&r.options.preventDefault!==`always`||r.options.eventType!==n||mp(r)&&Bf(e,t))continue;let c=Kd(e,r.parsedChord,r.options.platform);c.matched&&(i?(a.set(r.id,c),o=Math.max(o,c.score)):s=!0)}s&&a.size===0&&!this.#f(e,n)&&e.preventDefault();let c=-1;for(let e of i)a.get(e.id)?.score===o&&(c=Math.max(c,this.#l(e.options.scope)));for(let t of i){let i=a.get(t.id);if(!i?.matched||i.score!==o||this.#l(t.options.scope)!==c)continue;let s=this.#v(t,r);s&&(this.#w(s,e),n===`keyup`?this.#T(s,e):s.options.requireReset&&s.hasFired&&e.repeat||(s.options.requireReset&&(s.hasFired=!0,s.activeMatch=i.identity),this.#T(s,e)))}}#x(e,t){let n=e.code||Xu(e.key);if(t===`keyup`){let r=this.#s.delete(n);return this.#S(e,t)||r}if(e.repeat)return this.#s.has(n);let r=this.#S(e,t);return r?this.#s.add(n):this.#s.delete(n),r}#S(e,t){if(ip(e)||sd(e).isComposing||Ad(Xu(e.key)))return!1;let n=e.composedPath(),r=Date.now();for(let i of this.registrations.state.values()){if(i.kind!==`sequence`||i.currentIndex===0||!this.#d(i)||i.options.eventType!==t||r-i.lastKeyTime>(i.options.timeout??1e3))continue;let a=i.target;if(n.includes(pf(a)?mf(a):a)&&!(mp(i)&&Bf(e,a))&&Kd(e,i.parsedSequence[i.currentIndex],i.options.platform).matched)return!0}return!1}#C(e,t,n,r,i){if(i.length===0)return;if(ip(e)){let e=!1;for(let t of i)t.currentIndex>0&&(t.currentIndex=0,this.#g(t.id),e=!0);e&&this.#p();return}if(e.type===`keydown`&&e.repeat||sd(e).isComposing||Ad(Xu(e.key)))return;let a=Date.now(),o=!1,s=new Map,c=0;for(let r of i){if(!this.#d(r)||mp(r)&&Bf(e,t)||r.options.eventType!==n)continue;let i=r.options.timeout??1e3;r.currentIndex>0&&a-r.lastKeyTime>i&&(r.currentIndex=0,o=!0);let l=r.parsedSequence[r.currentIndex];if(!l)continue;let u=Kd(e,l,r.options.platform),d=r.currentIndex+1;!u.matched&&r.currentIndex>0&&(u=Kd(e,r.parsedSequence[0],r.options.platform),d=1),s.set(r.id,{score:u.score,nextIndex:d}),c=Math.max(c,u.score)}let l=[];for(let t of i){let n=s.get(t.id);n&&(n.score>0&&n.score===c?(t.lastKeyTime=a,t.currentIndex=n.nextIndex,o=!0,t.currentIndex>=t.parsedSequence.length?(this.#w(t,e),t.currentIndex=0,l.push(t)):t.options.preventDefault&&e.preventDefault()):t.currentIndex>0&&(t.currentIndex=0,o=!0))}for(let e of i)if(s.has(e.id)){if(e.currentIndex>0){let t=e.options.timeout??1e3;this.#h(e.id,t+1)}else this.#g(e.id)}o&&l.length===0&&this.#p();for(let t of l){let n=this.#v(t,r);n&&this.#T(n,e)}}#w(e,t){e.options.preventDefault&&t.preventDefault(),e.options.stopPropagation&&t.stopPropagation()}#T(e,t,n=this.#E(e)){e.triggerCount++,e.kind===`sequence`&&(e.hasFired=!0),this.#p(),e.callback(t,n)}#E(e){return e.kind===`chord`?{kind:`chord`,hotkey:e.hotkey,parsedChord:e.parsedChord}:{kind:`sequence`,hotkey:e.hotkey,parsedSequence:e.parsedSequence}}#D(e){let t=pp(e);for(let n of this.registrations.state.values())if(n.target===e.target&&n.options.scope===e.options.scope&&n.options.eventType===e.options.eventType&&hp(pp(n),t))return n;return null}#O(e,t){let n=e.parsedChord,r=Xu(t.key);return e.activeMatch?.code&&t.code===e.activeMatch.code?!0:(n.code===void 0?vd(r,n.key):t.code===n.code)||n.modifiers.includes(r)}resetSequenceProgress(){for(let e of this.registrations.state.values())e.kind===`sequence`&&(e.currentIndex=0,e.lastKeyTime=0);for(let e of this.#c.values())clearTimeout(e);this.#c.clear(),this.#p()}getRegistrationCount(){return this.registrations.state.size}isRegistered(e,t){for(let n of this.registrations.state.values())if(cf(n.hotkey,e,n.options.platform)&&(t===void 0||n.target===t))return!0;return!1}hasActiveRegistration(e){if(!e)return!1;let t=typeof e==`object`&&`~appHotkey`in e?e.id:void 0;for(let n of this.registrations.state.values())if(this.#d(n)&&_f(n.target)&&(t===void 0?cf(n.hotkey,e,n.options.platform):n.options.appHotkeyId===t))return!0;return!1}destroy(){for(let e of this.#c.values())clearTimeout(e);this.#c.clear(),this.#a.destroy(),this.registrations.setState(()=>new Map),this.appHotkeys.setState(()=>null)}};function vp(){return _p.getInstance()}function yp(e,t){return e===t?!0:mf(e)===mf(t)?!(`contains`in e)||!(`contains`in t)||e.contains(t)||t.contains(e):!1}function bp(e,t={}){let n=Sd(e)?e:[e];if(n.length===0)return[];let r=t.platform??ad(),i=n.map(e=>Od(e,r)),a=t.target??(typeof document>`u`?void 0:document),o=[],s=(e,n)=>!t.includeDisabled&&e.options.enabled===!1||(e.options.eventType??`keydown`)!==(t.eventType??`keydown`)||t.excludeIds?.includes(e.id)||t.exclude?.(e)||t.scope!==`all`&&a&&!yp(a,e.target)?!1:i.slice(0,Math.min(i.length,n.length)).every((i,a)=>{let o=Od(n[a],e.options.platform),s=t.events?.[a];return Yd(i,o)||s!==void 0&&af(s,i,r)&&af(s,o,e.options.platform)}),c=Kf.current?.registrations.state.values()??[];for(let e of c){let t=op(e);s(t,t.kind===`sequence`?t.hotkey:[t.hotkey])&&o.push({registration:t})}return o}var xp;function Sp(e){xp=e}function Cp(e,t){if(!xp)throw Error(`[hotkeys] App hotkeys must come from defineAppHotkeys.`);return xp(e,t)}function wp(e){Sp((e,t)=>new Lp(e,t));let t={};for(let[n,r]of Object.entries(e)){let e=r.hotkey===null?null:Cd(r.hotkey);t[n]={"~appHotkey":!0,id:n,hotkey:e,defaultHotkey:e,meta:r.meta,scope:r.scope,options:r.options}}return t}function Tp(e){return typeof e==`object`&&!!e&&e[`~appHotkey`]===!0}function Ep(e,t,n){return e===null||t===null?e===t:cf(e,t,n)}function Dp(e,t=ad()){return!Ep(e.hotkey,e.defaultHotkey,t)}function Op(e){return e===null?null:(typeof e==`string`||Array.isArray(e)&&e.every(e=>typeof e==`string`))&&Hd(e).valid?Cd(e):void 0}function kp(e,t){let n=t,r={};for(let[t,i]of Object.entries(e)){let e=n[t]===void 0?i.defaultHotkey:n[t];r[t]=e===i.hotkey?i:{...i,hotkey:e}}return r}function Ap(e,t){let n={};if(typeof t!=`object`||!t)return n;for(let[r,i]of Object.entries(t)){if(i===void 0||!Object.hasOwn(e,r))continue;let t=Op(i);t!==void 0&&(n[r]=t)}return n}function jp(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>Object.is(e,t[n]));if(typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.hasOwn(t,n)&&jp(e[n],t[n]))}function Mp(e){if(typeof e!=`object`||!e)return e;let t={};for(let[n,r]of Object.entries(e))t[n]=Array.isArray(r)?[...r]:r;return t}function Np(e,t){return jp(e===void 0?{}:e,t===void 0?{}:t)}function Pp(e,t,n){let r=Object.keys(e);return r.length===Object.keys(t).length&&r.every(r=>Object.hasOwn(t,r)&&Ep(e[r]??null,t[r]??null,n))}function Fp(e,t){let n=e.scope??`global`,r=t.scope??`global`;return n===`global`||r===`global`||n===r}function Ip(e,t,n){let r=Sd(e)?e:[e],i=Sd(t)?t:[t],a=Math.min(r.length,i.length);for(let e=0;e<a;e++)if(!cf(r[e],i[e],n))return!1;return!0}var Lp=class{store;#e;#t;#n;constructor(e,t={}){this.#e=e,this.#t=t,this.#n=Mp(t.customHotkeys);let n=Ap(e,t.customHotkeys);this.store=Wf({appHotkeys:kp(e,n),customHotkeys:n})}get#r(){return this.#t.platform??ad()}get appHotkeys(){return this.store.state.appHotkeys}get customHotkeys(){return this.store.state.customHotkeys}setOptions(e){let{customHotkeys:t,...n}=e;if(this.#t={...this.#t,...n},t===void 0||Np(t,this.#n))return;this.#n=Mp(t);let r=Ap(this.#e,t);Pp(r,this.store.state.customHotkeys,this.#r)||this.store.setState(()=>({appHotkeys:kp(this.#e,r),customHotkeys:r}))}setAppHotkeys(e){if(e===this.#e)return;this.#e=e;let t=Ap(e,this.store.state.customHotkeys);this.store.setState(()=>({appHotkeys:kp(e,t),customHotkeys:t}))}get(e){let{appHotkeys:t}=this.store.state;return Object.hasOwn(t,e)?t[e]:void 0}findConflicts(e,t){let n=this.get(e);if(!n)return[];let r=Cd(t);return Object.values(this.store.state.appHotkeys).filter(t=>t.id!==e&&t.hotkey!==null&&Fp(n,t)&&Ip(r,t.hotkey,this.#r))}setCustomHotkey(e,t){let n=this.get(e);if(!n)return[];let r=t===null?null:Cd(t);if(r!==null){let t=this.findConflicts(e,r);if(t.length>0)return t}let{[e]:i,...a}=this.store.state.customHotkeys;return this.#i(Ep(r,n.defaultHotkey,this.#r)?a:{...a,[e]:r}),[]}resetCustomHotkey(e){let{[e]:t,...n}=this.store.state.customHotkeys;this.#i(n)}resetCustomHotkeys(){this.#i({})}#i(e){this.store.setState(()=>({appHotkeys:kp(this.#e,e),customHotkeys:e})),this.#t.onCustomHotkeysChange?.(e)}getList(e){let t=new Map;for(let n of e){let e=n.options.appHotkeyId;if(e===void 0)continue;let r=t.get(e);r?r.push(n):t.set(e,[n])}return Object.values(this.store.state.appHotkeys).map(e=>{let n=t.get(e.id)??[],r=e=>n.some(t=>t.status===e);return{appHotkey:e,status:e.hotkey===null?`unbound`:n.length===0?`inactive`:r(`active`)?`active`:r(`suspended`)?`suspended`:`disabled`,isCustom:Dp(e,this.#r),registrations:n}})}};function Rp(e,t){return t?.get(e.id)??e}function zp(e){return{...e.options,...e.scope!==void 0&&{scope:e.scope},meta:e.meta,appHotkeyId:e.id}}function Bp(e){let t=vp();return t.appHotkeys.setState(()=>e),()=>{t.appHotkeys.state===e&&t.appHotkeys.setState(()=>null)}}function Vp(e,t={}){let n=new Lp(e,t);return{store:n,dispose:Bp(n)}}function Hp(){return{heldKeys:[],heldCodes:{}}}var Up=class e{static#e=null;store=Wf(Hp());#t=new Map;#n=[];constructor(){this.#r()}static getInstance(){return e.#e||=new e,e.#e}static resetInstance(){e.#e&&=(e.#e.destroy(),null)}#r(){if(typeof document>`u`)return;let e=e=>{let t=this.#i(e),n=Xu(e.key),r=e.code||`key:${n}`;this.#t.has(r)||(this.#t.set(r,{key:n,code:e.code}),t=!0),t&&this.#o()},t=e=>{let t=Xu(e.key),n=e.code||`key:${t}`;if(this.#t.delete(n),!e.code)for(let[e,n]of this.#t)n.key===t&&this.#t.delete(e);this.#i(e),Ru.has(t)&&this.#a(),this.#o()},n=e=>{if(e.defaultPrevented||!e.isTrusted)return;let t=this.#i(e);(this.#a()||t)&&this.#o()},r=e=>{this.#i(e)&&this.#o()},i=()=>{this.#t.size>0&&(this.#t.clear(),this.#o())};this.#n=[[`keydown`,e,!0],[`keyup`,t,!0],[`mousemove`,r,!0],[`mousedown`,r,!0],[`blur`,i,!1],[`contextmenu`,n,!1],[`visibilitychange`,()=>document.hidden&&i(),!1]];for(let[e,t,n]of this.#n)window.addEventListener(e,t,n)}#i(e){if(!e.isTrusted)return!1;let t=!1;for(let[n,r]of this.#t)(r.key===`Control`&&!e.ctrlKey||r.key===`Alt`&&!e.altKey||r.key===`Shift`&&!e.shiftKey||r.key===`Meta`&&!e.metaKey)&&(this.#t.delete(n),t=!0);return t}#a(){let e=!1;for(let[t,n]of this.#t)Ru.has(n.key)||(this.#t.delete(t),e=!0);return e}#o(){let e=Array.from(new Set(Array.from(this.#t.values(),e=>e.key))),t=Object.fromEntries(Array.from(this.#t.values(),e=>[e.key,e.code]));this.store.setState(()=>({heldKeys:e,heldCodes:t}))}#s(){for(let[e,t,n]of this.#n)window.removeEventListener(e,t,n);this.#n=[]}getHeldKeys(){return this.store.state.heldKeys}isKeyHeld(e){let t=Xu(e);return Array.from(this.#t.values()).some(e=>e.key===t)}isAnyKeyHeld(e){return e.some(e=>this.isKeyHeld(e))}areAllKeysHeld(e){return e.every(e=>this.isKeyHeld(e))}destroy(){this.#s(),this.#t.clear(),this.store.setState(()=>Hp())}};function Wp(){return Up.getInstance()}function Gp(e,t,n=`code`){let r=sd(e,t);if(r.isComposing||Ad(Xu(e.key))||e.key===`AltGraph`||n===`code`&&(!qp(e)||r.altGraph))return null;let i=jd(e,t);if(n===`code`){let{key:n,code:r,...a}=i;return kd({...a,code:e.code},t)}return i.key?kd(i,t):null}function Kp(e,t){if(t.recordBy!==`key`){if(sd(e,t.platform).altGraph)return{reason:`alt-graph`,message:`AltGraph character entry cannot be recorded as a physical shortcut. Use key mode for characters.`};if(!qp(e))return{reason:`missing-code`,message:`This event has no usable physical key code.`}}}function qp(e){return fd(e.code)&&e.code!==`Unidentified`}var Jp={isRecording:!1,steps:[],recordedHotkey:null},Yp=class{store=Wf(Jp);#e=null;#t;#n={};#r;#i=[];#a=null;get#o(){return{...typeof this.#t==`function`?this.#t():this.#t,...this.#n}}get#s(){return Math.max(1,this.#o.maxSteps??1)}constructor(e){this.#t=e,this.#r=ad()}setOptions(e){this.#n={...this.#n,...e}}#c(){this.#a!==null&&(clearTimeout(this.#a),this.#a=null)}#l(){this.#c();let e=this.#s>1?this.#o.idleTimeoutMs:void 0;e===void 0||e<=0||this.store.state.steps.length===0||(this.#a=setTimeout(()=>{this.#a=null,this.#e&&this.store.state.steps.length>=1&&this.commit()},e))}start(){if(this.#e||typeof document>`u`)return;this.#c(),this.#i=[],tp(this),this.store.setState(()=>({...Jp,isRecording:!0}));let e=e=>{if(!this.#e||this.#o.ignoreInputs!==!1&&e.key!==`Escape`&&Vf(e,document))return;let t=this.#o.platform??this.#r,n=sd(e,t);if(n.isComposing||(rp(e),e.preventDefault(),e.stopPropagation(),e.repeat))return;if(e.key===`Escape`){this.cancel();return}let r=!n.ctrl&&!n.shift&&!n.alt&&!n.meta&&!n.altGraph,i=this.#s>1;if((e.key===`Backspace`||e.key===`Delete`)&&r){if(this.store.state.steps.length===0){this.stop(),this.#o.onClear?.();return}this.#i.pop(),this.store.setState(e=>({...e,steps:e.steps.slice(0,-1)})),this.store.state.steps.length===0?this.#c():this.#l();return}let a=this.#o;if(i&&a.commitKeys!==`none`&&e.key===`Enter`&&r){this.store.state.steps.length>=1&&this.commit();return}if(Ad(e.key)||e.key===`AltGraph`)return;let o=Kp(e,{...a,platform:t});if(o){a.onReject?.(o);return}let s=Gp(e,t,a.recordBy);s!==null&&(md(s).some(e=>!e.trim())?a.onReject?.({reason:`invalid`,message:`Whitespace keys cannot be recorded`,hotkey:s}):(this.#i.push(e),this.store.setState(e=>({...e,steps:[...e.steps,s]})),this.store.state.steps.length>=this.#s?this.commit():this.#l()))};this.#e=e,this.#d(e)}commit(){let e=this.store.state.steps;if(e.length<1)return;let t=this.#o,n=t.platform??this.#r,r=Cd(e),i=this.#s===1;this.#c();let a=e=>{i&&(this.#i=[],this.store.setState(e=>({...e,steps:[]}))),t.onReject?.(e)},o=Od(e,n),s=e.length===1?{kind:`chord`,event:this.#i[this.#i.length-1],parsedChord:o[0]}:{kind:`sequence`,events:[...this.#i],parsedSequence:o},c=t.validate?.(r,s);if(c!==void 0&&c!==!0)a({reason:`validation`,message:typeof c==`string`?c:`This ${i?`shortcut`:`sequence`} is not allowed.`,hotkey:r});else{if(t.detectConflicts){let e=bp(r,{...typeof t.detectConflicts==`object`?t.detectConflicts:{},platform:n,events:this.#i});if(e.length){a({reason:`conflict`,message:`This ${i?`shortcut`:`sequence`} conflicts with a registered hotkey.`,hotkey:r,conflicts:e});return}}this.#u(r),t.onRecord(r)}}#u(e){np(this),this.#i=[],this.#c(),this.#e&&=(this.#f(this.#e),null),this.store.setState(()=>({...Jp,recordedHotkey:e}))}stop(){this.#u(null)}cancel(){this.#u(null),this.#o.onCancel?.()}#d(e){typeof document<`u`&&document.addEventListener(`keydown`,e,!0)}#f(e){typeof document<`u`&&document.removeEventListener(`keydown`,e,!0)}destroy(){this.#u(null)}},Xp=r({ALL_KEYS:()=>Ju,AppHotkeysStore:()=>Lp,DEFAULT_SEQUENCE_TIMEOUT:()=>lf,EDITING_KEYS:()=>Wu,FUNCTION_KEYS:()=>Hu,HotkeyManager:()=>_p,HotkeyRecorder:()=>Yp,KEY_DISPLAY_SYMBOLS:()=>nd,KeyStateTracker:()=>Up,LETTER_KEYS:()=>Bu,LINUX_MODIFIER_LABELS:()=>ed,MAC_MODIFIER_LABELS:()=>Qu,MAC_MODIFIER_SYMBOLS:()=>Zu,MODIFIER_ALIASES:()=>zu,MODIFIER_KEYS:()=>Ru,MODIFIER_ORDER:()=>Lu,NAVIGATION_KEYS:()=>Uu,NUMBER_KEYS:()=>Vu,PUNCTUATION_CODE_MAP:()=>Ku,PUNCTUATION_KEYS:()=>Gu,PUNCTUATION_KEY_DISPLAY_LABELS:()=>td,WINDOWS_MODIFIER_LABELS:()=>$u,areHotkeysEqual:()=>cf,assertValidHotkey:()=>Wd,checkHotkey:()=>Gd,createAppHotkeysStore:()=>Cp,createHotkeyChordHandler:()=>of,createMultiHotkeyChordHandler:()=>sf,createSequenceMatcher:()=>uf,defineAppHotkeys:()=>wp,detectPlatform:()=>ad,findHotkeyConflicts:()=>bp,formatForDisplay:()=>Fd,formatHotkey:()=>Nd,getAppHotkeyRegistrationOptions:()=>zp,getHotkeyManager:()=>vp,getKeyStateTracker:()=>Wp,hasNonModifierKey:()=>Md,isAppHotkey:()=>Tp,isCustomHotkey:()=>Dp,isHotkeySequence:()=>Sd,isModifierKey:()=>Ad,isSingleLetterKey:()=>Yu,matchesHeldModifiers:()=>df,matchesKeyboardEvent:()=>af,normalizeHotkey:()=>kd,normalizeKeyName:()=>Xu,parseHotkey:()=>Od,parseKeyboardEvent:()=>jd,provideAppHotkeys:()=>Vp,publishAppHotkeysStore:()=>Bp,resolveAppHotkey:()=>Rp,resolveModifier:()=>od,simplifyHotkey:()=>Cd,toHotkeyRegistrationView:()=>op,validateHotkey:()=>Hd}),Zp=Object.defineProperty,Qp=(e,t,n)=>t in e?Zp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q=(e,t,n)=>Qp(e,typeof t==`symbol`?t:t+``,n),$p=e=>e?.constructor.name===`Array`,em=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!tm(e[n],t[n]))return!1;return!0},tm=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if($p(e)&&$p(t))return em(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!tm(e[r],t[r]))return!1}return!0},nm=e=>Array.isArray(e),rm=e=>typeof e==`object`&&!!e,im=e=>rm(e)&&!nm(e),am=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Function.prototype.toString.call(Object);function om(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function sm(e,t,n){for(let r=0;r<t.length;r++)e=n.getChildren(e,t.slice(r+1))[t[r]];return e}function cm(e){let t=um(e),n=[],r=new Set;for(let e of t){let t=e.join();r.has(t)||(r.add(t),n.push(e))}return n}function lm(e,t){for(let n=0;n<Math.min(e.length,t.length);n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return e.length-t.length}function um(e){return e.sort(lm)}function dm(e,t){let n;return Mm(e,{...t,onEnter:(e,r)=>{if(t.predicate(e,r))return n=e,`stop`}}),n}function fm(e,t){let n=[];return Mm(e,{onEnter:(e,r)=>{t.predicate(e,r)&&n.push(e)},getChildren:t.getChildren}),n}function pm(e,t){let n;return Mm(e,{onEnter:(e,r)=>{if(t.predicate(e,r))return n=[...r],`stop`},getChildren:t.getChildren}),n}function mm(e,t){let n=t.initialResult;return Mm(e,{...t,onEnter:(e,r)=>{n=t.nextResult(n,e,r)}}),n}function hm(e,t){return mm(e,{...t,initialResult:[],nextResult:(e,n,r)=>(e.push(...t.transform(n,r)),e)})}function gm(e,t){let{predicate:n,create:r,getChildren:i}=t,a=(e,t)=>{let o=i(e,t),s=[];o.forEach((e,n)=>{let r=[...t,n],i=a(e,r);i&&s.push(i)});let c=t.length===0,l=n(e,t),u=s.length>0;return c||l||u?r(e,s,t):null};return a(e,[])||r(e,[],[])}function _m(e,t){let n=[],r=0,i=new Map,a=new Map;return Mm(e,{getChildren:t.getChildren,onEnter:(e,o)=>{i.has(e)||i.set(e,r++);let s=t.getChildren(e,o);s.forEach(t=>{a.has(t)||a.set(t,e),i.has(t)||i.set(t,r++)});let c=s.length>0?s.map(e=>i.get(e)):void 0,l=a.get(e),u=l?i.get(l):void 0,d=i.get(e);n.push({...e,_children:c,_parent:u,_index:d})}}),n}function vm(e,t){return{type:`insert`,index:e,nodes:t}}function ym(e){return{type:`remove`,indexes:e}}function bm(){return{type:`replace`}}function xm(e){return[e.slice(0,-1),e[e.length-1]]}function Sm(e,t,n=new Map){let[r,i]=xm(e);for(let e=r.length-1;e>=0;e--){let t=r.slice(0,e).join();n.get(t)?.type!==`remove`&&n.set(t,bm())}let a=n.get(r.join());return a?.type===`remove`?n.set(r.join(),{type:`removeThenInsert`,removeIndexes:a.indexes,insertIndex:i,insertNodes:t}):n.set(r.join(),vm(i,t)),n}function Cm(e){let t=new Map,n=new Map;for(let t of e){let e=t.slice(0,-1).join(),r=n.get(e)??[];r.push(t[t.length-1]),n.set(e,r.sort((e,t)=>e-t))}for(let n of e)for(let e=n.length-2;e>=0;e--){let r=n.slice(0,e).join();t.has(r)||t.set(r,bm())}for(let[e,r]of n)t.set(e,ym(r));return t}function wm(e,t){let n=new Map,[r,i]=xm(e);for(let e=r.length-1;e>=0;e--){let t=r.slice(0,e).join();n.set(t,bm())}return n.set(r.join(),{type:`removeThenInsert`,removeIndexes:[i],insertIndex:i,insertNodes:[t]}),n}function Tm(e,t,n){return Dm(e,{...n,getChildren:(e,r)=>{let i=r.join();switch(t.get(i)?.type){case`replace`:case`remove`:case`removeThenInsert`:case`insert`:return n.getChildren(e,r);default:return[]}},transform:(e,r,i)=>{let a=i.join(),o=t.get(a);switch(o?.type){case`remove`:return n.create(e,r.filter((e,t)=>!o.indexes.includes(t)),i);case`removeThenInsert`:let t=r.filter((e,t)=>!o.removeIndexes.includes(t)),a=o.removeIndexes.reduce((e,t)=>t<e?e-1:e,o.insertIndex);return n.create(e,Em(t,a,0,...o.insertNodes),i);case`insert`:return n.create(e,Em(r,o.index,0,...o.nodes),i);case`replace`:return n.create(e,r,i);default:return e}}})}function Em(e,t,n,...r){return[...e.slice(0,t),...r,...e.slice(t+n)]}function Dm(e,t){let n={};return Mm(e,{...t,onLeave:(e,r)=>{let i=[0,...r],a=i.join(),o=t.transform(e,n[a]??[],r),s=i.slice(0,-1).join(),c=n[s]??[];c.push(o),n[s]=c}}),n[``][0]}function Om(e,t){let{nodes:n,at:r}=t;if(r.length===0)throw Error(`Can't insert nodes at the root`);return Tm(e,Sm(r,n),t)}function km(e,t){return t.at.length===0?t.node:Tm(e,wm(t.at,t.node),t)}function Am(e,t){if(t.indexPaths.length===0)return e;for(let e of t.indexPaths)if(e.length===0)throw Error(`Can't remove the root node`);return Tm(e,Cm(t.indexPaths),t)}function jm(e,t){if(t.indexPaths.length===0)return e;for(let e of t.indexPaths)if(e.length===0)throw Error(`Can't move the root node`);if(t.to.length===0)throw Error(`Can't move nodes to the root`);let n=cm(t.indexPaths),r=n.map(n=>sm(e,n,t));return Tm(e,Sm(t.to,r,Cm(n)),t)}function Mm(e,t){let{onEnter:n,onLeave:r,getChildren:i}=t,a=[],o=[{node:e}],s=t.reuseIndexPath?()=>a:()=>a.slice();for(;o.length>0;){let e=o[o.length-1];if(e.state===void 0){let t=n?.(e.node,s());if(t===`stop`)return;e.state=t===`skip`?-1:0}let t=e.children||i(e.node,s());if(e.children||=t,e.state!==-1){if(e.state<t.length){let n=e.state;a.push(n),o.push({node:t[n]}),e.state=n+1;continue}if(r?.(e.node,s())===`stop`)return}a.pop(),o.pop()}}var Nm=class e{constructor(t){q(this,`options`,t),q(this,`rootNode`),q(this,`isEqual`,e=>tm(this.rootNode,e.rootNode)),q(this,`getNodeChildren`,e=>this.options.nodeToChildren?.(e)??Pm.nodeToChildren(e)??[]),q(this,`resolveIndexPath`,e=>typeof e==`string`?this.getIndexPath(e):e),q(this,`resolveNode`,e=>{let t=this.resolveIndexPath(e);return t?this.at(t):void 0}),q(this,`getNodeChildrenCount`,e=>this.options.nodeToChildrenCount?.(e)??Pm.nodeToChildrenCount(e)),q(this,`getNodeValue`,e=>this.options.nodeToValue?.(e)??Pm.nodeToValue(e)),q(this,`getNodeDisabled`,e=>this.options.isNodeDisabled?.(e)??Pm.isNodeDisabled(e)),q(this,`stringify`,e=>{let t=this.findNode(e);return t?this.stringifyNode(t):null}),q(this,`stringifyNode`,e=>this.options.nodeToString?.(e)??Pm.nodeToString(e)),q(this,`getFirstNode`,(e=this.rootNode,t={})=>{let n;return Mm(e,{getChildren:this.getNodeChildren,onEnter:(r,i)=>{if(!this.isSameNode(r,e)){if(t.skip?.({value:this.getNodeValue(r),node:r,indexPath:i}))return`skip`;if(!n&&i.length>0&&!this.getNodeDisabled(r))return n=r,`stop`}}}),n}),q(this,`getLastNode`,(e=this.rootNode,t={})=>{let n;return Mm(e,{getChildren:this.getNodeChildren,onEnter:(r,i)=>{if(!this.isSameNode(r,e)){if(t.skip?.({value:this.getNodeValue(r),node:r,indexPath:i}))return`skip`;i.length>0&&!this.getNodeDisabled(r)&&(n=r)}}}),n}),q(this,`at`,e=>sm(this.rootNode,e,{getChildren:this.getNodeChildren})),q(this,`findNode`,(e,t=this.rootNode)=>dm(t,{getChildren:this.getNodeChildren,predicate:t=>this.getNodeValue(t)===e})),q(this,`findNodes`,(e,t=this.rootNode)=>{let n=new Set(e.filter(e=>e!=null));return fm(t,{getChildren:this.getNodeChildren,predicate:e=>n.has(this.getNodeValue(e))})}),q(this,`sort`,e=>e.reduce((e,t)=>{let n=this.getIndexPath(t);return n&&e.push({value:t,indexPath:n}),e},[]).sort((e,t)=>lm(e.indexPath,t.indexPath)).map(({value:e})=>e)),q(this,`getValue`,e=>{let t=this.at(e);return t?this.getNodeValue(t):void 0}),q(this,`getValuePath`,e=>{if(!e)return[];let t=[],n=[...e];for(;n.length>0;){let e=this.at(n);e&&t.unshift(this.getNodeValue(e)),n.pop()}return t}),q(this,`getDepth`,e=>pm(this.rootNode,{getChildren:this.getNodeChildren,predicate:t=>this.getNodeValue(t)===e})?.length??0),q(this,`isSameNode`,(e,t)=>this.getNodeValue(e)===this.getNodeValue(t)),q(this,`isRootNode`,e=>this.isSameNode(e,this.rootNode)),q(this,`contains`,(e,t)=>!e||!t?!1:t.slice(0,e.length).every((n,r)=>e[r]===t[r])),q(this,`getNextNode`,(e,t={})=>{let n=!1,r;return Mm(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(i,a)=>{if(this.isRootNode(i))return;let o=this.getNodeValue(i);if(t.skip?.({value:o,node:i,indexPath:a}))return o===e&&(n=!0),`skip`;if(n&&!this.getNodeDisabled(i))return r=i,`stop`;o===e&&(n=!0)}}),r}),q(this,`getPreviousNode`,(e,t={})=>{let n,r=!1;return Mm(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(i,a)=>{if(this.isRootNode(i))return;let o=this.getNodeValue(i);if(t.skip?.({value:o,node:i,indexPath:a}))return`skip`;if(o===e)return r=!0,`stop`;this.getNodeDisabled(i)||(n=i)}}),r?n:void 0}),q(this,`getParentNodes`,e=>{let t=this.resolveIndexPath(e)?.slice();if(!t)return[];let n=[];for(;t.length>0;){t.pop();let e=this.at(t);e&&!this.isRootNode(e)&&n.unshift(e)}return n}),q(this,`getDescendantNodes`,(e,t)=>{let n=this.resolveNode(e);if(!n)return[];let r=[];return Mm(n,{getChildren:this.getNodeChildren,onEnter:(e,n)=>{n.length!==0&&(t?.withBranch||!this.isBranchNode(e))&&r.push(e)}}),r}),q(this,`getDescendantValues`,(e,t)=>this.getDescendantNodes(e,t).map(e=>this.getNodeValue(e))),q(this,`getParentIndexPath`,e=>e.slice(0,-1)),q(this,`getParentNode`,e=>{let t=this.resolveIndexPath(e);return t?this.at(this.getParentIndexPath(t)):void 0}),q(this,`visit`,e=>{let{skip:t,...n}=e;Mm(this.rootNode,{...n,getChildren:this.getNodeChildren,onEnter:(e,r)=>{if(!this.isRootNode(e))return t?.({value:this.getNodeValue(e),node:e,indexPath:r})?`skip`:n.onEnter?.(e,r)}})}),q(this,`getPreviousSibling`,e=>{let t=this.getParentNode(e);if(!t)return;let n=this.getNodeChildren(t),r=e[e.length-1];for(;--r>=0;){let e=n[r];if(!this.getNodeDisabled(e))return e}}),q(this,`getNextSibling`,e=>{let t=this.getParentNode(e);if(!t)return;let n=this.getNodeChildren(t),r=e[e.length-1];for(;++r<n.length;){let e=n[r];if(!this.getNodeDisabled(e))return e}}),q(this,`getSiblingNodes`,e=>{let t=this.getParentNode(e);return t?this.getNodeChildren(t):[]}),q(this,`getValues`,(e=this.rootNode)=>hm(e,{getChildren:this.getNodeChildren,transform:e=>[this.getNodeValue(e)]}).slice(1)),q(this,`isValidDepth`,(e,t)=>t==null?!0:typeof t==`function`?t(e.length):e.length===t),q(this,`isBranchNode`,e=>this.getNodeChildren(e).length>0||this.getNodeChildrenCount(e)!=null),q(this,`getBranchValues`,(e=this.rootNode,t={})=>{let n=[];return Mm(e,{getChildren:this.getNodeChildren,onEnter:(e,r)=>{if(r.length===0)return;let i=this.getNodeValue(e);if(t.skip?.({value:i,node:e,indexPath:r}))return`skip`;this.isBranchNode(e)&&this.isValidDepth(r,t.depth)&&n.push(this.getNodeValue(e))}}),n}),q(this,`flatten`,(e=this.rootNode)=>_m(e,{getChildren:this.getNodeChildren})),q(this,`_create`,(e,t)=>this.getNodeChildren(e).length>0||t.length>0?{...e,children:t}:{...e}),q(this,`_insert`,(e,t,n)=>this.copy(Om(e,{at:t,nodes:n,getChildren:this.getNodeChildren,create:this._create}))),q(this,`copy`,t=>new e({...this.options,rootNode:t})),q(this,`_replace`,(e,t,n)=>this.copy(km(e,{at:t,node:n,getChildren:this.getNodeChildren,create:this._create}))),q(this,`_move`,(e,t,n)=>this.copy(jm(e,{indexPaths:t,to:n,getChildren:this.getNodeChildren,create:this._create}))),q(this,`_remove`,(e,t)=>this.copy(Am(e,{indexPaths:t,getChildren:this.getNodeChildren,create:this._create}))),q(this,`replace`,(e,t)=>this._replace(this.rootNode,e,t)),q(this,`remove`,e=>this._remove(this.rootNode,e)),q(this,`insertBefore`,(e,t)=>this.getParentNode(e)?this._insert(this.rootNode,e,t):void 0),q(this,`insertAfter`,(e,t)=>{if(!this.getParentNode(e))return;let n=[...e.slice(0,-1),e[e.length-1]+1];return this._insert(this.rootNode,n,t)}),q(this,`move`,(e,t)=>this._move(this.rootNode,e,t)),q(this,`filter`,e=>{let t=gm(this.rootNode,{predicate:e,getChildren:this.getNodeChildren,create:this._create});return this.copy(t)}),q(this,`toJSON`,()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}getIndexPath(e){if(Array.isArray(e)){if(e.length===0)return[];let t=[],n=this.getNodeChildren(this.rootNode);for(let r=0;r<e.length;r++){let i=e[r],a=n.findIndex(e=>this.getNodeValue(e)===i);if(a===-1)break;if(t.push(a),r<e.length-1){let e=n[a];n=this.getNodeChildren(e)}}return t}return pm(this.rootNode,{getChildren:this.getNodeChildren,predicate:t=>this.getNodeValue(t)===e})}},Pm={nodeToValue(e){return typeof e==`string`?e:im(e)&&am(e,`value`)?e.value:``},nodeToString(e){return typeof e==`string`?e:im(e)&&am(e,`label`)?e.label:Pm.nodeToValue(e)},isNodeDisabled(e){return im(e)&&am(e,`disabled`)?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(im(e)&&am(e,`childrenCount`))return e.childrenCount}};function Fm(e){let t=new Map;return function(n,r){let i=n+(r?Object.entries(r).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(t.has(i))return t.get(i);let a=new e(n,r);return t.set(i,a),a}}var Im=Fm(Intl.Collator);function Lm(e){let{locale:t,...n}=e||{},r=Im(t||`en-US`,{usage:`search`,...n});function i(e){return e=e.normalize(`NFC`),r.resolvedOptions().ignorePunctuation&&(e=e.replace(/\p{P}/gu,``)),e}function a(e,t){return t.length===0||(e=i(e),t=i(t),r.compare(e.slice(0,t.length),t)===0)}function o(e,t){return t.length===0||(e=i(e),t=i(t),r.compare(e.slice(-t.length),t)===0)}function s(e,t){if(t.length===0)return!0;e=i(e),t=i(t);let n=0,a=t.length;for(;n+a<=e.length;n++){let i=e.slice(n,n+a);if(r.compare(t,i)===0)return!0}return!1}return{startsWith:a,endsWith:o,contains:s}}var Rm=Object.defineProperty,zm=(e,t,n)=>t in e?Rm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bm=(e,t,n)=>zm(e,typeof t==`symbol`?t:t+``,n),Vm=e=>typeof e==`object`&&!!e,Hm=1,Um=9,Wm=11,Gm=e=>Vm(e)&&e.nodeType===Hm&&typeof e.nodeName==`string`,Km=e=>Vm(e)&&e.nodeType===Um,qm=e=>Vm(e)&&e===e.window,Jm=e=>Vm(e)&&e.constructor.name===`VisualViewport`,Ym=e=>Vm(e)&&e.nodeType!==void 0,Xm=e=>Ym(e)&&e.nodeType===Wm&&`host`in e,Zm=e=>Gm(e)&&e.localName===`input`,Qm=e=>Gm(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1,$m=/(textarea|select)/;function eh(e){if(e==null||!Gm(e))return!1;try{return Zm(e)&&e.selectionStart!=null||$m.test(e.localName)||e.isContentEditable||e.getAttribute(`contenteditable`)===`true`||e.getAttribute(`contenteditable`)===``}catch{return!1}}function th(e,t){if(!e||!t||!Gm(e)||!Ym(t))return!1;if(Gm(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&Xm(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function nh(e){return Km(e)?e:qm(e)?e.document:e?.ownerDocument??document}function rh(e){return Xm(e)?rh(e.host):Km(e)?e.defaultView??window:Gm(e)?e.ownerDocument?.defaultView??window:window}function ih(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}var ah=new WeakMap;function oh(e){return ah.has(e)||ah.set(e,rh(e).getComputedStyle(e)),ah.get(e)}var sh=()=>typeof document<`u`;function ch(){return navigator.userAgentData?.platform??navigator.platform}function lh(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var uh=e=>sh()&&e.test(ch()),dh=e=>sh()&&e.test(lh()),fh=()=>uh(/^Mac/i),ph=()=>dh(/Android/i);function mh(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function hh(e){return mh(e)?.[0]??e.target}function gh(e){return e.pointerType===``&&e.isTrusted?!0:ph()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var _h=e=>Gm(e)&&e.tagName===`IFRAME`;function vh(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function yh(e,t,n){let r=[...e],i=[...e],a=new Set,o=new Map;e.forEach((e,t)=>o.set(e,t));let s=0;for(;s<i.length;){let e=i[s++];if(!e||a.has(e))continue;a.add(e);let c=vh(e,t);if(c){let t=Array.from(c.querySelectorAll(bh)).filter(n),a=o.get(e);if(a!==void 0){let e=a+1;r.splice(e,0,...t),t.forEach((t,n)=>{o.set(t,e+n)});for(let n=e+t.length;n<r.length;n++)o.set(r[n],n)}else{let e=r.length;r.push(...t),t.forEach((t,n)=>{o.set(t,e+n)})}i.push(...t)}}return r}var bh=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`,xh=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(bh));(n==1||n==`if-empty`&&i.length===0)&&Gm(e)&&Sh(e)&&i.unshift(e);let a=[];for(let e of i)if(Sh(e)){if(_h(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...xh(t,{getShadowRoot:r}))}else a.push(e)}return r?yh(a,r,Sh):a};function Sh(e){return!Gm(e)||e.closest(`[inert]`)?!1:e.matches(bh)&&Qm(e)}var Ch=class e{constructor(){Bm(this,`id`,null),Bm(this,`fn_cleanup`),Bm(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function wh(e){let t=Ch.create();return t.request(e),t.cleanup}function Th(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}var Eh=e=>Gm(e)?e.getBoundingClientRect():Jm(e)?{top:0,left:0,bottom:e.height,right:e.width}:{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth};function Dh(e,t){if(!Gm(e))return!0;let n=Eh(t),r=e.getBoundingClientRect();return r.top>=n.top&&r.left>=n.left&&r.bottom<=n.bottom&&r.right<=n.right}function Oh(e,t,n={}){let{defer:r,onMissing:i}=n,a=()=>typeof e==`function`?e():e,o=[],s=e=>{if(!e)return i?.();o.push(t(e))},c=a();if(!r||c)s(c);else{let e=!1;o.push(()=>{e=!0}),queueMicrotask(()=>{if(e)return;let t=a();t?s(t):o.push(wh(()=>{e||s(a())}))})}return()=>{o.forEach(e=>e?.())}}var kh=`__live-region__`,Ah=`__live-region-debug__`,jh=`position:fixed;inset-inline:0;bottom:0;z-index:2147483647;padding:12px 16px;background:black;color:white;font-size:14px;line-height:20px;text-align:center;pointer-events:none;`;function Mh(e={}){let{level:t=`polite`,document:n=document,root:r,delay:i=0,debug:a=!1}=e,o=n.defaultView??window,s=r??n.body;function c(){if(!a)return;let e=n.getElementById(Ah);return e||(e=n.createElement(`div`),e.id=Ah,e.dataset.liveAnnouncerDebug=`true`,e.setAttribute(`aria-hidden`,`true`),e.style.cssText=jh,s.appendChild(e),e)}function l(e,r){n.getElementById(kh)?.remove(),r??=i;let a=n.createElement(`span`);a.id=kh,a.dataset.liveAnnouncer=`true`;let l=t===`assertive`?`alert`:`status`;a.setAttribute(`aria-live`,t),a.setAttribute(`role`,l),Object.assign(a.style,{border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}),s.appendChild(a),o.setTimeout(()=>{if(!a.isConnected)return;a.textContent=e;let t=c();t&&(t.textContent=e)},r)}function u(){n.getElementById(kh)?.remove(),n.getElementById(Ah)?.remove()}return{announce:l,destroy:u,toJSON(){return kh}}}var Nh={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&&(Nh[n]=e)}}var Ph={a:[7844,7863],e:[7870,7879],o:[7888,7907],u:[7912,7921]};for(let e of Object.keys(Ph)){let t=e.toUpperCase();for(let n=Ph[e][0];n<=Ph[e][1];++n)Nh[n]=n%2==0?t:e}function Fh(e){if(e<192||e>8580)return e;let t=Nh[e];return t===void 0?e:t.codePointAt(0)}function Ih(e){return e}function Lh(e){return e}function Rh(e,t){return e>t?e:t}var zh=e=>e.split(``).map(e=>e.codePointAt(0)),Bh=new Set(` \f
1
+ import{_ as e,c as t,f as n,h as r,p as i,u as a}from"./index-cgJ1LsS0.js";var o=n(),s=e(i(),1);function c(...e){return t=>{let n=[],r=!1;for(let i of e)if(typeof i==`function`){let e=i(t);typeof e==`function`?(r=!0,n.push(e)):n.push(()=>i(null))}else i&&(i.current=t,n.push(()=>{i.current=null}));if(r)return()=>{for(let e of n)e()}}}function l(...e){return(0,s.useCallback)(c(...e),e)}function u(e){return e==null?[]:Array.isArray(e)?e:[e]}var d=e=>e[0],f=e=>e[e.length-1],p=(e,t)=>e.indexOf(t)!==-1,m=(e,...t)=>e.concat(t),h=(e,...t)=>e.filter(e=>!t.includes(e)),g=(e,t)=>e.filter((e,n)=>n!==t),_=e=>Array.from(new Set(e)),v=(e,t)=>p(e,t)?h(e,t):m(e,t);function y(e,t,n={}){let{step:r=1,loop:i=!0}=n,a=t+r,o=e.length,s=o-1;return t===-1?r>0?0:s:a<0?i?s:0:a>=o?i?0:t>o?o:t:a}function b(e,t,n={}){return e[y(e,t,n)]}function x(e,t,n={}){let{step:r=1,loop:i=!0}=n;return y(e,t,{step:-r,loop:i})}function S(e,t,n={}){return e[x(e,t,n)]}var C=e=>e?.constructor.name===`Array`,w=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!T(e[n],t[n]))return!1;return!0},T=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if(C(e)&&C(t))return w(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;if(Object.keys(e).length!==r)return!1;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!T(e[r],t[r]))return!1}return!0},E=e=>Array.isArray(e),D=e=>e===!0||e===!1,O=e=>typeof e==`object`&&!!e,ee=e=>O(e)&&!E(e),te=e=>typeof e==`number`&&!Number.isNaN(e),k=e=>typeof e==`string`,A=e=>typeof e==`function`,j=e=>e==null,M=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),N=e=>Object.prototype.toString.call(e),P=Function.prototype.toString,ne=P.call(Object),re=e=>{if(!O(e)||N(e)!=`[object Object]`||F(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=M(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&P.call(n)==ne},ie=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,ae=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,F=e=>ie(e)||ae(e),oe=(e,...t)=>(typeof e==`function`?e(...t):e)??void 0,se=e=>e(),ce=()=>{},I=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})},le=(()=>{let e=0;return()=>(e++,e.toString(36))})();function ue(e,t,...n){if(e in t){let r=t[e];return A(r)?r(...n):r}let r=Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw Error.captureStackTrace?.(r,ue),r}var{floor:de,abs:L,round:fe,min:pe,max:me,pow:he,sign:ge}=Math,_e=e=>Number.isNaN(e),ve=e=>_e(e)?0:e,ye=(e,t)=>(e%t+t)%t,be=(e,t)=>ve(e)>=t,xe=(e,t)=>ve(e)<=t,Se=(e,t,n)=>{let r=ve(e);return(t==null||r>=t)&&(n==null||r<=n)},Ce=(e,t,n)=>pe(me(ve(e),t),n),we=(e,t)=>typeof t==`number`?de(e*t+.5)/t:fe(e),Te=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},Ee=(e,t,n)=>{let r=t===`+`?e+n:e-n;if(e%1!=0||n%1!=0){let i=10**Math.max(Te(e),Te(n));e=Math.round(e*i),n=Math.round(n*i),r=t===`+`?e+n:e-n,r/=i}return r},De=(e,t)=>Ee(ve(e),`+`,t),Oe=(e,t)=>Ee(ve(e),`-`,t),R=e=>typeof e==`number`?`${e}px`:e;function ke(e){if(!re(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=ke(t))}return n}function Ae(e,t){let n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=t)}return n}function je(e,t){if(!t)return e;let n={...e},r=t;for(let e in r){let t=r[e];t!==void 0&&(n[e]=t)}return n}function Me(e,t=Object.is){let n={...e},r=new Set,i=e=>(r.add(e),()=>r.delete(e)),a=()=>{r.forEach(e=>e())};return{subscribe:i,get:e=>n[e],set:(e,r)=>{t(n[e],r)||(n[e]=r,a())},update:e=>{let r=!1;for(let i in e){let a=e[i];a!==void 0&&!t(n[i],a)&&(n[i]=a,r=!0)}r&&a()},snapshot:()=>({...n})}}function Ne(e){"@babel/helpers - typeof";return Ne=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ne(e)}function Pe(e,t){if(Ne(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(Ne(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Fe(e){var t=Pe(e,`string`);return Ne(t)==`symbol`?t:t+``}function Ie(e,t,n){return(t=Fe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Le(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function Re(e,t,n){Le(e,t),t.set(e,n)}function ze(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function Be(e,t){return e.get(ze(e,t))}var Ve=()=>performance.now(),He=new WeakMap,Ue=class{constructor(e){this.onTick=e,Ie(this,`frameId`,null),Ie(this,`pausedAtMs`,null),Ie(this,`context`,void 0),Ie(this,`cancelFrame`,()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),Ie(this,`setStartMs`,e=>{this.context.startMs=e}),Ie(this,`start`,()=>{if(this.frameId!==null)return;let e=Ve();this.pausedAtMs===null?this.context.startMs=e:(this.context.startMs+=e-this.pausedAtMs,this.pausedAtMs=null),this.frameId=requestAnimationFrame(Be(He,this))}),Ie(this,`pause`,()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=Ve())}),Ie(this,`stop`,()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),Re(this,He,e=>{this.context.now=e,this.context.deltaMs=e-this.context.startMs,this.onTick(this.context)===!1?this.stop():this.frameId=requestAnimationFrame(Be(He,this))}),this.context={now:0,startMs:Ve(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs===null?Ve()-this.context.startMs:this.pausedAtMs-this.context.startMs}};function We(e,t){let n=new Ue(({deltaMs:n})=>{if(n>=t)return e(),!1});return n.start(),()=>n.stop()}function Ge(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Ke(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function qe(e,t){if(e==null)throw Error(t())}function Je(e,t,n){let r=[];for(let n of t)e[n]??r.push(n);if(r.length>0)throw Error(`[zag-js${n?` > ${n}`:``}] missing required props: ${r.join(`, `)}`)}var Ye=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),Xe=(...e)=>Array.from(new Set(Ye(...e).split(/\s+/).filter(Boolean))).join(` `),Ze=/((?:--)?(?:\w+-?)+)\s*:\s*([\s\S]*)/,Qe=e=>{let t={},n=e=>{let n=Ze.exec(e);n&&(t[n[1]]=n[2])},r=0,i=0,a=``,o=!1;for(let t=0;t<e.length;t++){let s=e[t];o?s===`*`&&e[t+1]===`/`&&(o=!1,t++):a?(s===`\\`&&t++,s===a&&(a=``)):s===`\\`?t++:s===`/`&&e[t+1]===`*`?(o=!0,t++):s===`"`||s===`'`?a=s:s===`(`?i++:s===`)`&&i?i--:s===`;`&&!i&&(n(e.slice(r,t)),r=t+1)}return n(e.slice(r)),t},$e=(e,t)=>{if(k(e)){if(k(t))return`${e};${t}`;e=Qe(e)}else k(t)&&(t=Qe(t));return Object.assign({},e??{},t??{})};function z(...e){let t={};for(let n of e){if(!n)continue;for(let e in t)t[e]=e.startsWith(`on`)&&typeof t[e]==`function`&&typeof n[e]==`function`?I(n[e],t[e]):e===`className`||e===`class`?Ye(t[e],n[e]):e===`style`?$e(t[e],n[e]):e===`data-ownedby`?Xe(t[e],n[e]):n[e]===void 0?t[e]:n[e];for(let e in n)t[e]===void 0&&(t[e]=n[e]);let e=Object.getOwnPropertySymbols(n);for(let r of e)t[r]=n[r]}return t}function et(e,t,n){let r=[],i;return a=>{let o=e(a);return(o.length!==r.length||o.some((e,t)=>!T(r[t],e)))&&(r=o,i=t(o,a),n?.onChange?.(i)),i}}function tt(){let e=new Map;return{claim(t){let n=Symbol(t);return e.set(t,n),n},isReplaced(t,n){return e.get(t)!==n}}}var nt=`.`,rt=`#`,it=new WeakMap,at=new WeakMap;function ot(e){return e.join(nt)}function st(e){return e.includes(nt)}function ct(e){return e.startsWith(rt)}function lt(e){return e.startsWith(nt)}function ut(e){return ct(e)?e.slice(1):e}function dt(e,t){return e?`${e}${nt}${t}`:t}function ft(e){let t=new Map,n=new Map,r=(e,i)=>{t.set(e,i);let a=i.id;a&&(n.has(a)&&Ke(`[zag-js] Duplicate state id: "${a}"`),n.set(a,e));let o=i.states;if(o){qe(i.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),i.initial in o||Ke(`[zag-js] Compound state "${e}" has initial "${String(i.initial)}" which is not a child state`);for(let[t,n]of Object.entries(o)){if(!n)continue;let i=dt(e,t);r(i,n)}}};for(let[t,n]of Object.entries(e.states))n&&r(t,n);return{index:t,idIndex:n}}function pt(e){let t=it.get(e);if(t)return t;let{index:n,idIndex:r}=ft(e);return it.set(e,n),at.set(e,r),n}function mt(e,t){return pt(e),at.get(e)?.get(t)}function ht(e){return e?String(e).split(nt).filter(Boolean):[]}function gt(e,t){if(!t)return[];let n=pt(e),r=ht(t),i=[],a=[];for(let e of r){a.push(e);let t=ot(a),r=n.get(t);if(!r)break;i.push({path:t,state:r})}return i}function _t(e,t){let n=pt(e),r=ht(t);if(!r.length)return t;let i=[];for(let e of r){i.push(e);let r=ot(i);if(!n.has(r))return t}let a=ot(i),o=n.get(a);for(;o?.initial;){let e=`${a}${nt}${o.initial}`,t=n.get(e);if(!t)break;a=e,o=t}return a}function vt(e,t){return pt(e).has(t)}function yt(e,t,n){let r=String(t);if(ct(r)){let t=ut(r),n=mt(e,t);return qe(n,()=>`[zag-js] Unknown state id: "${t}"`),_t(e,n)}if(lt(r)&&n)return _t(e,dt(n,r.slice(1)));if(!st(r)&&n){let t=ht(n);for(let n=t.length-1;n>=1;n--){let i=dt(t.slice(0,n).join(nt),r);if(vt(e,i))return _t(e,i)}if(vt(e,r))return _t(e,r)}return _t(e,r)}function bt(e,t,n){let r=gt(e,t);for(let e=r.length-1;e>=0;e--){let t=r[e]?.state.on?.[n];if(t)return{transitions:t,source:r[e]?.path}}return{transitions:e.on?.[n],source:void 0}}function xt(e,t,n,r){let i=t?gt(e,t):[],a=gt(e,n),o=0;for(;o<i.length&&o<a.length&&i[o]?.path===a[o]?.path;)o+=1;let s=i.slice(o).reverse(),c=a.slice(o),l=i[i.length-1]?.path===a[a.length-1]?.path;return r&&l&&(s=i.slice().reverse(),c=a),{exiting:s,entering:c}}function St(e,t){return e?e===t||e.startsWith(`${t}${nt}`):!1}function Ct(e,t,n){return gt(e,t).some(e=>e.state.tags?.includes(n))}function wt(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function Tt(e){return pt(e),e}function Et(){return{guards:wt(),createMachine:e=>Tt(e),choose:e=>function({choose:t}){return t(e)?.actions}}}var Dt=function(e){return e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e}({}),Ot=`__init__`,kt=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]),At=(...e)=>t=>e.reduce((e,t)=>t(e),t),jt=()=>void 0,Mt=e=>typeof e==`object`&&!!e,Nt=0x7fffffff,B=e=>e?``:void 0,Pt=e=>e?`true`:void 0,Ft=/\\/g,It=/"/g,Lt=e=>globalThis.CSS?.escape?.(e)??e.replace(Ft,`\\\\`).replace(It,`\\"`),Rt=e=>`[data-ownedby~="${Lt(String(e))}"]`,zt=1,Bt=9,Vt=11,Ht=e=>Mt(e)&&e.nodeType===zt&&typeof e.nodeName==`string`,Ut=e=>Mt(e)&&e.nodeType===zt&&typeof e.nodeName==`string`,Wt=e=>Mt(e)&&e.nodeType===Bt,Gt=e=>Mt(e)&&e===e.window,Kt=e=>Ut(e)?e.localName||``:`#document`;function qt(e){return[`html`,`body`,`#document`].includes(Kt(e))}var Jt=e=>Mt(e)&&e.nodeType!==void 0,Yt=e=>Jt(e)&&e.nodeType===Vt&&`host`in e,Xt=e=>Ut(e)&&e.localName===`input`,Zt=e=>!!e?.matches(`a[href]`),Qt=e=>Ut(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function $t(e){return e?sn(e.getRootNode())===e:!1}var en=/(textarea|select)/;function tn(e){if(e==null||!Ut(e))return!1;try{return Xt(e)&&e.selectionStart!=null||en.test(e.localName)||e.isContentEditable||e.getAttribute(`contenteditable`)===`true`||e.getAttribute(`contenteditable`)===``}catch{return!1}}function nn(e,t){if(!e||!t||!Ut(e)||!Jt(t))return!1;if(Ut(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&Yt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}let r=t.ownerDocument?.defaultView?.frameElement;return r&&t.ownerDocument!==e.ownerDocument?nn(e,r):!1}function rn(e){return Wt(e)?e:Gt(e)?e.document:e?.ownerDocument??document}function an(e){return rn(e).documentElement}function on(e){return Yt(e)?on(e.host):Wt(e)?e.defaultView??window:Ut(e)?e.ownerDocument?.defaultView??window:window}function sn(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function cn(e,t){return!e||e===rn(e).body?!1:!t.some(t=>nn(t,e))}function ln(e){if(Kt(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Yt(e)&&e.host||an(e);return Yt(t)?t.host:t}function un(e){let t;try{if(t=e.getRootNode({composed:!0}),Wt(t)||Yt(t))return t}catch{}return e.ownerDocument??document}var dn=new WeakMap;function fn(e){return dn.has(e)||dn.set(e,on(e).getComputedStyle(e)),dn.get(e)}var pn=()=>typeof document<`u`;function mn(){return navigator.userAgentData?.platform??navigator.platform}function hn(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var gn=e=>pn()&&e.test(mn()),_n=e=>pn()&&e.test(hn()),vn=e=>pn()&&e.test(navigator.vendor),yn=/^iPhone/i,bn=/^iPad/i,xn=/^Mac/i,Sn=/apple/i,Cn=/Firefox/i,wn=/Chrome/i,Tn=/AppleWebKit/i,En=/Android/i,Dn=()=>pn()&&!!navigator.maxTouchPoints,On=()=>gn(yn),kn=()=>gn(bn)||Mn()&&navigator.maxTouchPoints>1,An=()=>On()||kn(),jn=()=>Mn()||An(),Mn=()=>gn(xn),Nn=()=>jn()&&vn(Sn),Pn=()=>_n(Cn),Fn=()=>_n(wn),In=()=>_n(Tn)&&!Fn(),Ln=()=>_n(En);function Rn(e){if(!e)return!1;try{return e.selectionStart===0&&e.selectionEnd===0}catch{return e.value===``}}function zn(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch{}}var Bn=new Set([`menu`,`listbox`,`dialog`,`grid`,`tree`,`region`,`application`]),Vn=e=>Bn.has(e),Hn=e=>e.getAttribute(`aria-controls`)?.split(` `)||[];function Un(e,t){let n=new Set,r=un(e),i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Hn(e);for(let e of a){if(!e||n.has(e))continue;n.add(e);let a=r.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;if(e&&Vn(e)&&!n&&(a===t||a.contains(t)||i(a)))return!0}}}return!1};return i(e)}function Wn(e,t){let n=un(e),r=new Set,i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Hn(e);for(let e of a){if(!e||r.has(e))continue;r.add(e);let a=n.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;e&&Bn.has(e)&&!n&&(t(a),i(a))}}}};i(e)}function Gn(e){let t=new Set;return Wn(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function Kn(e){let t=e.getAttribute(`role`);return!!(t&&Bn.has(t))}function qn(e){return e.hasAttribute(`aria-controls`)&&e.getAttribute(`aria-expanded`)===`true`}function Jn(e){return qn(e)?!0:!!e.querySelector?.(`[aria-controls][aria-expanded="true"]`)}function Yn(e){if(!e.id)return!1;let t=un(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&Kn(e))}function Xn(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function Zn(e){return Xn(e)?.[0]??e.target}function Qn(e){let t=e.currentTarget;if(!t||!t.matches(`a[href], button[type='submit'], input[type='submit']`))return!1;let n=e.button===1,r=tr(e);return n||r}function $n(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n===`a`||n===`button`&&t.type===`submit`||n===`input`&&t.type===`submit`:!1}function er(e){return ur(e).isComposing||e.keyCode===229}function tr(e){return Mn()?e.metaKey:e.ctrlKey}function nr(e){return e.pointerType===``&&e.isTrusted?!0:Ln()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var rr=e=>e.button===0,ir=e=>e.button===2||Mn()&&e.ctrlKey&&e.button===0,ar=e=>e.ctrlKey||e.altKey||e.metaKey,or=e=>`touches`in e&&e.touches.length>0,sr={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},cr={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function lr(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=sr[i]??i,n===`rtl`&&r===`horizontal`&&i in cr&&(i=cr[i]),i}function ur(e){return e.nativeEvent??e}var dr=new Set([`PageUp`,`PageDown`]),fr=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]);function pr(e){return dr.has(e.key)||e.shiftKey&&fr.has(e.key)?10:1}function mr(e,t){let{step:n,largeStep:r,smallStep:i}=t,a=fr.has(e.key);return i!=null&&e.altKey&&a?i:dr.has(e.key)||e.shiftKey&&a?r:n}function hr(e,t=`client`){let n=or(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var V=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}},gr=e=>{let t=Xn(e)?.[0]??e.target;return e.currentTarget===t};function _r(e,t){let{type:n=`HTMLInputElement`,property:r=`value`}=t,i=on(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,r)??{}}function vr(e){if(e.localName===`input`)return`HTMLInputElement`;if(e.localName===`textarea`)return`HTMLTextAreaElement`;if(e.localName===`select`)return`HTMLSelectElement`}function yr(e,t,n=`value`){if(!e)return;let r=vr(e);r&&_r(e,{type:r,property:n}).set?.call(e,t),e.setAttribute(n,t)}function br(e,t){e&&(_r(e,{type:`HTMLInputElement`,property:`checked`}).set?.call(e,t),t?e.setAttribute(`checked`,``):e.removeAttribute(`checked`))}function xr(e,t){let{value:n,bubbles:r=!0}=t;if(!e)return;let i=on(e);if(!(e instanceof i.HTMLInputElement))return;yr(e,`${n}`);let a=new i.Event(`input`,{bubbles:r});e.dispatchEvent(kr(a))}function Sr(e,t){let{checked:n,bubbles:r=!0}=t;if(!e)return;let i=on(e);if(!(e instanceof i.HTMLInputElement))return;br(e,n);let a=new i.Event(`click`,{bubbles:r});e.dispatchEvent(kr(a))}function Cr(e){return e.matches(`textarea, input, select, button`)}function wr(e,t){if(!e)return;let n=Cr(e)?e.form:e.closest(`form`),r=e=>{e.defaultPrevented||t()};return n?.addEventListener(`reset`,r,{passive:!0}),()=>n?.removeEventListener(`reset`,r)}function Tr(e,t){let n=e?.closest(`fieldset`);if(!n)return;t(n.disabled);let r=new(on(n)).MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:[`disabled`]}),()=>r.disconnect()}function Er(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:r}=t,i=[wr(e,r),Tr(e,n)];return()=>i.forEach(e=>e?.())}var Dr=Symbol.for(`zag.changeEvent`);function Or(e){return Object.prototype.hasOwnProperty.call(e,Dr)}function kr(e){return Or(e)||Object.defineProperty(e,Dr,{value:!0}),e}var Ar=e=>Ut(e)&&e.tagName===`IFRAME`,jr=/^(audio|video|details)$/;function Mr(e){let t=e.getAttribute(`tabindex`);return t?parseInt(t,10):NaN}var Nr=e=>!Number.isNaN(Mr(e)),Pr=e=>Mr(e)<0;function Fr(e){return Xt(e)&&e.type===`radio`}function Ir(e){if(!Fr(e)||!e.name||e.checked)return!0;let t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter(t=>t.form===e.form&&Vr(t)),i=r.find(e=>e.checked);return i?i===e:r[0]===e}function Lr(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function Rr(e,t,n){let r=[...e],i=[...e],a=new Set,o=new Map;e.forEach((e,t)=>o.set(e,t));let s=0;for(;s<i.length;){let e=i[s++];if(!e||a.has(e))continue;a.add(e);let c=Lr(e,t);if(c){let t=Array.from(c.querySelectorAll(zr)).filter(n),a=o.get(e);if(a!==void 0){let e=a+1;r.splice(e,0,...t),t.forEach((t,n)=>{o.set(t,e+n)});for(let n=e+t.length;n<r.length;n++)o.set(r[n],n)}else{let e=r.length;r.push(...t),t.forEach((t,n)=>{o.set(t,e+n)})}i.push(...t)}}return r}var zr=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`,Br=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(zr));(n==1||n==`if-empty`&&i.length===0)&&Ut(e)&&Vr(e)&&i.unshift(e);let a=[];for(let e of i)if(Vr(e)){if(Ar(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...Br(t,{getShadowRoot:r}))}else a.push(e)}return r?Rr(a,r,Vr):a};function Vr(e){return!Ut(e)||e.closest(`[inert]`)?!1:e.matches(zr)&&Qt(e)}function Hr(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(zr));n&&Ur(e)&&i.unshift(e);let a=[];for(let e of i)if(Ur(e)){if(Ar(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...Hr(t,{getShadowRoot:r}))}else a.push(e)}if(r){let e=Rr(a,r,Ur);return!e.length&&n?i:e}return!a.length&&n?i:a}function Ur(e){return Ut(e)&&e.tabIndex>0?!0:!Vr(e)||Pr(e)?!1:Ir(e)}function Wr(e,t={}){let n=Hr(e,t);return[n[0]||null,n[n.length-1]||null]}function Gr(e){return e.tabIndex<0&&(jr.test(e.localName)||tn(e))&&!Nr(e)?0:e.tabIndex}function Kr(e){let{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return!1;let a=typeof n==`function`?n():n;return a!==!1&&(a||=t?.matches(`[data-autofocus],[autofocus]`)?t:t?.querySelector(`[data-autofocus],[autofocus]`),a||=Hr(t).filter(e=>!r||r(e)).find(e=>!e.hasAttribute(`data-no-autofocus`)),a||t||void 0)}function qr(e){let t=e.currentTarget;if(!t)return!1;let[n,r]=Wr(t);return!($t(n)&&e.shiftKey||$t(r)&&!e.shiftKey||!n&&!r)}function Jr(e){"@babel/helpers - typeof";return Jr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Jr(e)}function Yr(e,t){if(Jr(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(Jr(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Xr(e){var t=Yr(e,`string`);return Jr(t)==`symbol`?t:t+``}function Zr(e,t,n){return(t=Xr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qr=class e{constructor(){Zr(this,`id`,null),Zr(this,`fn_cleanup`,void 0),Zr(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function H(e){let t=Qr.create();return t.request(e),t.cleanup}function $r(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function ei(e,t,n){let r=H(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{r(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),r}var ti=new WeakMap;function ni(e){let t={childList:!!e.childList,subtree:!!e.subtree,attributes:e.attributes??(e.attributeOldValue!==void 0||e.attributeFilter!==void 0),characterData:e.characterData??e.characterDataOldValue!==void 0,attributeOldValue:!!e.attributeOldValue,characterDataOldValue:!!e.characterDataOldValue};return e.attributeFilter!==void 0&&(t.attributeFilter=[...new Set(e.attributeFilter)].sort()),t}function ri(e){let t=ni(e),n=JSON.stringify(t);return{observe(e,r){let i=on(e);if(typeof i.MutationObserver!=`function`)return jt;let a=ti.get(e)??new Map,o=a.get(n);if(!o){let r=new Set,s=new i.MutationObserver(e=>{for(let t of[...r])if(r.has(t))try{t(e)}catch(e){i.queueMicrotask(()=>{throw e})}});s.observe(e,t),o={observer:s,listeners:r},a.set(n,o),ti.set(e,a)}let s=e=>r(e);return o.listeners.add(s),()=>{!o.listeners.delete(s)||o.listeners.size>0||(o.observer.disconnect(),a.delete(n),a.size===0&&ti.delete(e))}}}}function ii(e,t){if(!e)return;let{attributes:n,callback:r}=t,i=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)t.type===`attributes`&&t.attributeName&&n.includes(t.attributeName)&&r(t)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function ai(e,t){let{defer:n}=t,r=n?H:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(ii(n,t))})),()=>{i.forEach(e=>e?.())}}function oi(e,t){let{callback:n}=t;if(!e)return;let r=new(e.ownerDocument.defaultView||window).MutationObserver(n);return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()}function si(e,t){let{defer:n}=t,r=n?H:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(oi(n,t))})),()=>{i.forEach(e=>e?.())}}function ci(e,t,n={}){if(!t)return null;let{orientation:r=`both`,loop:i=!0,dir:a=`ltr`,key:o}=n;if(!e.length||!o)return null;let s=o===`ArrowUp`||o===`ArrowDown`,c=o===`ArrowLeft`||o===`ArrowRight`;if(!s&&!c&&o!==`Home`&&o!==`End`||r===`vertical`&&c||r===`horizontal`&&s)return null;if(o===`Home`)return e[0]||null;if(o===`End`)return e[e.length-1]||null;let l=e.indexOf(t);if(l===-1)return null;let u;return u=r===`both`?o===`ArrowDown`||(a===`ltr`?o===`ArrowRight`:o===`ArrowLeft`):s?o===`ArrowDown`:a===`ltr`?o===`ArrowRight`:o===`ArrowLeft`,e[u?i?(l+1)%e.length:Math.min(l+1,e.length-1):i?(l-1+e.length)%e.length:Math.max(0,l-1)]||null}function li(e){return{metaKey:!!e?.metaKey,ctrlKey:!!e?.ctrlKey,shiftKey:!!e?.shiftKey,altKey:!!e?.altKey}}function ui(e){return e.metaKey||e.ctrlKey||e.shiftKey||e.altKey}function di(e,t){let n=li(t),r=ui(n),i=()=>{let t=on(e);r&&In()&&Mn()&&!kn()?e.dispatchEvent(new t.KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,...n})):e.dispatchEvent(new t.MouseEvent(`click`,n))};Pn()?ei(e,`keyup`,i):queueMicrotask(i)}function fi(e){let t=ln(e);return qt(t)?rn(t).body:Ut(t)&&gi(t)?t:fi(t)}function pi(e,t=[]){let n=fi(e),r=n===e.ownerDocument.body,i=on(n);return r?t.concat(i,i.visualViewport||[],gi(n)?n:[]):t.concat(n,pi(n,[]))}var mi=/auto|scroll|overlay|hidden|clip/,hi=new Set([`inline`,`contents`]);function gi(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=on(e).getComputedStyle(e);return mi.test(t+r+n)&&!hi.has(i)}function _i(e,t){let n=e.body,r=`pointerLockElement`in e||`mozPointerLockElement`in e,i=()=>!!e.pointerLockElement;function a(){t?.(i())}function o(n){i()&&t?.(!1),console.error(`PointerLock error occurred:`,n),e.exitPointerLock()}if(!r)return;try{n.requestPointerLock()}catch{}let s=[V(e,`pointerlockchange`,a,!1),V(e,`pointerlockerror`,o,!1)];return()=>{s.forEach(e=>e()),e.exitPointerLock()}}var vi=`default`,yi=``,bi=new WeakMap;function xi(e={}){let{target:t,doc:n}=e,r=n??document,i=r.documentElement;return An()?(vi==="default"&&(yi=i.style.webkitUserSelect,i.style.webkitUserSelect=`none`),vi=`disabled`):t&&(bi.set(t,t.style.userSelect),t.style.userSelect=`none`),()=>Si({target:t,doc:r})}function Si(e={}){let{target:t,doc:n}=e,r=(n??document).documentElement;if(An()){if(vi!==`disabled`)return;vi=`restoring`,setTimeout(()=>{$r(()=>{vi===`restoring`&&(r.style.webkitUserSelect===`none`&&(r.style.webkitUserSelect=yi||``),yi=``,vi=`default`)})},300)}else if(t&&bi.has(t)){let e=bi.get(t);t.style.userSelect===`none`&&(t.style.userSelect=e??``),t.getAttribute(`style`)===``&&t.removeAttribute(`style`),bi.delete(t)}}function Ci(e={}){let{defer:t,target:n,...r}=e,i=t?H:e=>e(),a=[];return a.push(i(()=>{let e=typeof n==`function`?n():n;a.push(xi({...r,target:e}))})),()=>{a.forEach(e=>e?.())}}function wi(e,t){let{onPointerMove:n,onPointerUp:r}=t,i=e=>{let t=hr(e);Math.sqrt(t.x**2+t.y**2)<(e.pointerType===`touch`?10:5)||(e.pointerType===`mouse`&&e.buttons===0?a(e):n({point:t,event:e}))},a=e=>{let t=hr(e);r({point:t,event:e})},o=[V(e,`pointermove`,i,!1),V(e,`pointerup`,a,!1),V(e,`pointercancel`,a,!1),V(e,`contextmenu`,a,!1),Ci({doc:e})];return()=>{o.forEach(e=>e())}}function Ti(e){let{pointerNode:t,keyboardNode:n=t,onPress:r,onPressStart:i,onPressEnd:a,isValidKey:o=e=>e.key===`Enter`}=e;if(!t)return jt;let s=on(t),c=jt,l=jt,u=jt,d=e=>({point:hr(e),event:e});function f(e){i?.(d(e))}function p(e){a?.(d(e))}c=At(V(t,`pointerdown`,e=>{l(),l=At(V(s,`pointerup`,e=>{let n=Zn(e);nn(t,n)?r?.(d(e)):a?.(d(e))},{passive:!r,once:!0}),V(s,`pointercancel`,p,{passive:!a,once:!0})),$t(n)&&e.pointerType===`mouse`&&e.preventDefault(),f(e)},{passive:!i}),V(n,`focus`,m));function m(){u=At(V(n,`keydown`,e=>{o(e)&&(l(),l=V(n,`keyup`,e=>{if(!o(e))return;let t=new s.PointerEvent(`pointerup`),n=d(t);r?.(n),a?.(n)}),f(new s.PointerEvent(`pointerdown`)))}),V(n,`blur`,()=>{p(new s.PointerEvent(`pointercancel`))}))}return()=>{c(),l(),u()}}function Ei(e){return e==null?null:typeof e==`function`?e():e}function Di(e,t,n){if(!t)return null;let r=Hr(e.ownerDocument.body,{getShadowRoot:n}),i=r.indexOf(t);if(i===-1)return null;for(let t=i+1;t<r.length;t++){let n=r[t];if(!nn(e,n))return n}return null}function Oi(e,t={}){let{triggerElement:n,onFocus:r,onFocusEnter:i,getShadowRoot:a}=t,o=(Ei(e)??Ei(n))?.ownerDocument||document;function s(t){if(t.key!==`Tab`)return;let o=Ei(e),s=Ei(n);if(!o)return;let[c,l]=Wr(o,{includeContainer:!0,getShadowRoot:a}),u=!c&&!l,d=null;t.shiftKey&&($t(c)||u)?d=s:!t.shiftKey&&$t(s)?(i?.(),d=c):!t.shiftKey&&($t(l)||u)?d=Di(o,s,a):t.shiftKey&&$t(Di(o,s,a))&&(i?.(),d=l),d&&(t.preventDefault(),typeof r==`function`?r(d):d.focus())}return V(o,`keydown`,s,!0)}function ki(e,t){let{defer:n,...r}=t,i=n?H:e=>e(),a=[];return a.push(i(()=>{a.push(Oi(e,r))})),()=>{a.forEach(e=>e?.())}}function Ai(e,t){return Array.from(e?.querySelectorAll(t)??[])}function ji(e,t){return e?.querySelector(t)??null}var Mi=e=>e.id;function Ni(e,t,n=Mi){return e.find(e=>n(e)===t)}function Pi(e,t,n=Mi){let r=Ni(e,t,n);return r?e.indexOf(r):-1}function Fi(e,t,n=!0){let r=Pi(e,t);return r=n?(r+1)%e.length:Math.min(r+1,e.length-1),e[r]}function Ii(e,t,n=!0){let r=Pi(e,t);return r===-1?n?e[e.length-1]:null:(r=n?(r-1+e.length)%e.length:Math.max(0,r-1),e[r])}var Li=ri({childList:!0,subtree:!0});function Ri(e){let{getContainerEl:t,getRootNode:n,parts:r,onChange:i}=e,a=Object.keys(r),o,s=()=>{let e={};for(let t of a)e[t]=!!r[t]();o&&a.every(t=>o[t]===e[t])||(o=e,i(e))},c,l=()=>{let e=t();return e?(c?.(),s(),c=Li.observe(e,s),!0):!1},u=H(()=>{if(l())return;s();let e=n?.();e&&(c=Li.observe(e,l))});return()=>{u(),c?.()}}function zi(e){let t=new WeakMap,n,r=new WeakMap,i=e=>n||(n=new e.ResizeObserver(e=>{for(let n of e){r.set(n.target,n);let e=t.get(n.target);if(e)for(let t of e)t(n)}}),n);return{observe:(n,r)=>{let a=on(n);if(typeof a.ResizeObserver!=`function`)return jt;let o=t.get(n)||new Set;return o.add(r),t.set(n,o),i(a).observe(n,e),()=>{let e=t.get(n);e&&(e.delete(r),e.size===0&&(t.delete(n),i(a).unobserve(n)))}},unobserve:e=>{t.delete(e),n?.unobserve(e)}}}var Bi=zi({box:`border-box`}),Vi=0,Hi=class e{constructor(){Zr(this,`id`,Vi),Zr(this,`clear`,()=>{this.id!==Vi&&(clearTimeout(this.id),this.id=Vi)})}static create(){return new e}start(e,t){this.clear(),this.id=setTimeout(()=>{this.id=Vi,t()},e)}isStarted(){return this.id!==Vi}};function Ui(e,t){let{rootEl:n}=t||{};if(!e||!n||!n.contains(e))return null;let r=on(n),i=n.getBoundingClientRect(),a=e.getBoundingClientRect(),o=r.getComputedStyle(n),s=r.getComputedStyle(e),c=n.offsetWidth?i.width/n.offsetWidth:1,l=n.offsetHeight?i.height/n.offsetHeight:1,{clientTop:u,clientLeft:d,clientWidth:f,clientHeight:p}=n,m=Gi(u+Ji(o.scrollPaddingTop,p),u+p-Ji(o.scrollPaddingBottom,p),(a.top-i.top)/l-qi(s.scrollMarginTop),(a.bottom-i.top)/l+qi(s.scrollMarginBottom)),h=Gi(d+Ji(o.scrollPaddingLeft,f),d+f-Ji(o.scrollPaddingRight,f),(a.left-i.left)/c-qi(s.scrollMarginLeft),(a.right-i.left)/c+qi(s.scrollMarginRight));return h===0&&m===0?null:{top:n.scrollTop+m,left:n.scrollLeft+h}}function Wi(e,t){let{rootEl:n}=t||{},r=Ui(e,{rootEl:n});if(!n||!r)return!1;let i=t?.behavior;return i===`smooth`&&Ki(n)&&(i=`instant`),n.scrollTo({...r,...i&&{behavior:i}}),!0}function Gi(e,t,n,r){if(n<e&&r>t)return 0;let i=r-n>t-e;return n<e?i?r-t:n-e:r>t?i?n-e:r-t:0}var Ki=e=>!!on(e).matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,qi=e=>{let t=Number.parseFloat(e);return Number.isNaN(t)?0:t},Ji=(e,t)=>{let n=qi(e);return e.trim().endsWith(`%`)?n*t/100:n},Yi,Xi=()=>Yi??=new Intl.Collator(void 0,{usage:`search`,sensitivity:`base`}),Zi=e=>e.normalize(`NFC`).trim(),Qi=e=>Zi(e.dataset?.valuetext??e.textContent??``),$i=(e,t)=>{let n=t.normalize(`NFC`);return Xi().compare(e.slice(0,n.length),n)===0};function ea(e,t,n,r=Mi){let i=n?Pi(e,n,r):-1,a=n?kt(e,i):e;return t.length===1&&(a=a.filter(e=>r(e)!==n)),a.find(e=>$i(Qi(e),t))}function ta(e,t,n){let r=e.getAttribute(t),i=r!=null;return r===n?jt:(e.setAttribute(t,n),()=>{i?e.setAttribute(t,r):e.removeAttribute(t)})}function na(e,t){if(!e)return jt;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return ia(n,t)?jt:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)})}function ra(e,t,n){if(!e)return jt;let r=e.style.getPropertyValue(t);return r===n?jt:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute(`style`)})}function ia(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function aa(e,t){let{state:n,activeId:r,key:i,timeout:a=350,itemToId:o}=t,s=n.keysSoFar+i,c=s.length>1&&Array.from(s).every(e=>e===s[0])?s[0]:s,l=ea(e.slice(),c,r,o);function u(){clearTimeout(n.timer),n.timer=-1}function d(e){n.keysSoFar=e,u(),e!==``&&(n.timer=+setTimeout(()=>{d(``),u()},a))}return d(s),l}var oa=Object.assign(aa,{defaultOptions:{keysSoFar:``,timer:-1},isValidEvent:sa});function sa(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var ca={border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`};function la(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(new DOMException(`Promise aborted`,`AbortError`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function ua(e,t){let{timeout:n,rootNode:r}=t,i=on(r),a=rn(r),o=new i.AbortController,s,c=la(new Promise(t=>{let n=e();n?t(n):(s=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(s?.disconnect(),t(n))}),s.observe(a.body,{childList:!0,subtree:!0}))}),o,n),l=()=>s?.disconnect();return c[0].then(l,l),c}var da=ri({childList:!0,subtree:!0});function fa(e,t,n={}){let{defer:r,onMissing:i,getRootNode:a}=n,o=()=>typeof e==`function`?e():e,s=[],c=e=>{if(!e)return i?.();s.push(t(e))};if(!r)c(o());else{let e=!1;s.push(()=>{e=!0}),queueMicrotask(()=>{if(e)return;let t=o();if(t){c(t);return}let n=!1,r=t=>{e||n||(n=!0,l(),u(),c(t))},i=a?.(),l=i?da.observe(i,()=>{let e=o();e&&r(e)}):jt,u=H(()=>r(o()));s.push(l,u)})}return()=>{s.forEach(e=>e?.())}}function pa(e){let t=()=>e.getRootNode?.()??document,n=()=>rn(t()),r=()=>n().defaultView??window,i=()=>sn(t()),a=e=>t().getElementById(e);return{...e,getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:$t,getById:a}}function ma(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ha=Symbol.for(`react.lazy`);function ga(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ha}function _a(e){if((0,s.isValidElement)(e))return e;if(ga(e))return s.Children.toArray(e).find(s.isValidElement)}var va=e=>{let t=(0,s.memo)((0,s.forwardRef)((t,n)=>{let{asChild:r,children:i,...a}=t,o=r?_a(i):void 0,c=o?ma(o):void 0,u=l(n,c);return r?o?(0,s.cloneElement)(o,{...z(a,o.props),ref:n?u:c}):null:(0,s.createElement)(e,{...a,ref:n},i)}));return t.displayName=e.displayName||e.name,t},U=(()=>{let e=new Map;return new Proxy(va,{apply(e,t,n){return va(n[0])},get(t,n){let r=n;return e.has(r)||e.set(r,va(r)),e.get(r)}})})();function ya(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function W(e={}){let{name:t,strict:n=!0,hookName:r=`useContext`,providerName:i=`Provider`,errorMessage:a,defaultValue:o}=e,c=(0,s.createContext)(o);c.displayName=t;function l(){let e=(0,s.useContext)(c);if(!e&&n){let e=Error(a??ya(r,i));throw e.name=`ContextError`,M(Error,`captureStackTrace`)&&A(Error.captureStackTrace)&&Error.captureStackTrace(e,l),e}return e}return[c.Provider,l,c]}var[ba,xa]=W({name:`PopoverContext`,hookName:`usePopoverContext`,providerName:`<PopoverProvider />`}),Sa=globalThis.document===void 0?s.useEffect:s.useLayoutEffect;function Ca(e){let t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r]=(0,s.useState)(t),[i,a]=(0,s.useState)(r),c=e().value!==void 0,l=(0,s.useRef)(i);l.current=c?e().value:i;let u=(0,s.useRef)(l.current);Sa(()=>{u.current=l.current},[i,e().value]);let d=t=>{let r=u.current,i=A(t)?t(r):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:i,prev:r}),c||a(i),n(i,r)||e().onChange?.(i,r)};function f(){return c?e().value:i}return{initial:r,ref:l,get:f,set(t){(e().sync?o.flushSync:se)(()=>d(t))},invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}Ca.cleanup=e=>{(0,s.useEffect)(()=>e,[])},Ca.ref=e=>{let t=(0,s.useRef)(e);return{get:()=>t.current,set:e=>{t.current=e}}};function wa(e){let t=(0,s.useRef)(void 0);return t.current===void 0&&(t.current=e()),t.current}function Ta(e){let t=(0,s.useRef)(e);return t.current=e,(0,s.useMemo)(()=>((...e)=>t.current(...e)),[])}function Ea(e){let t=(0,s.useRef)(e);return wa(()=>({get(e){return t.current[e]},set(e,n){t.current[e]=n}}))}var Da=(e,t)=>{let n=(e??[]).map(e=>typeof e==`function`?e():e),r=(0,s.useRef)(n);(0,s.useEffect)(()=>{let e=r.current;if(r.current=n,e.length!==n.length||n.some((t,n)=>!Object.is(t,e[n])))return t()},n)};function Oa(e,t={}){let n=(0,s.useMemo)(()=>{let{id:e,ids:n,getRootNode:r}=t;return pa({id:e,ids:n,getRootNode:r})},[t]),r=(...t)=>{e.debug&&console.log(...t)},i=Aa(e.props?.({props:ke(t),scope:n})??t),a=ka(e.context?.({prop:i,bindable:Ca,scope:n,flush:ja,getContext(){return c},getComputed(){return b},getRefs(){return g},getEvent(){return m()}})),c=wa(()=>({get(e){return a.current?.[e].ref.current},set(e,t){a.current?.[e].set(t)},initial(e){return a.current?.[e].initial},hash(e){let t=a.current?.[e].get();return a.current?.[e].hash(t)}})),l=(0,s.useRef)(new Map),d=(0,s.useRef)(null),f=(0,s.useRef)(null),p=(0,s.useRef)({type:``}),m=()=>({...p.current,current(){return p.current},previous(){return f.current}}),h=()=>({...E,matches(...e){return e.some(e=>St(E.ref.current,e))},hasTag(t){return Ct(e,E.ref.current,t)}}),g=Ea(e.refs?.({prop:i,context:c})??{}),_=Ta(t=>{if(O.current!==Dt.Started)return;f.current=p.current,p.current=t;let n=j(),{transitions:i,source:a}=bt(e,n,t.type),s=T(i);if(!s)return;d.current=s;let c=yt(e,s.target??n,a);r(`transition`,t.type,s.target||n,`(${s.actions})`),c===n?s.reenter?E.invoke(n,n):S(s.actions??[]):(0,o.flushSync)(()=>E.set(c))}),v=wa(tt),y=Ta(e=>{let t=e.replaces,n=t?v.claim(t):void 0;queueMicrotask(()=>{t&&n&&v.isReplaced(t,n)||_(e)})}),b=Ta(t=>(qe(e.computed,()=>`[zag-js] No computed object found on machine`),(0,e.computed[t])({context:c,event:m(),prop:i,refs:g,scope:n,computed:b}))),x=()=>({state:h(),context:c,event:m(),prop:i,send:y,action:S,guard:C,track:Da,refs:g,computed:b,flush:ja,scope:n,choose:T}),S=t=>{let n=A(t)?t(x()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||Ge(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(x())},C=t=>{if(A(t))return t(x());let n=e.implementations?.guards?.[t];return n||Ge(`[zag-js] No implementation found for guard "${JSON.stringify(t)}"`),n?.(x())},w=t=>{let n=A(t)?t(x()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||Ge(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(x());t&&i.push(t)}return()=>i.forEach(e=>e?.())},T=e=>u(e).find(e=>{let t=!e.guard;return k(e.guard)?t=!!C(e.guard):A(e.guard)&&(t=e.guard(x())),t}),E=Ca(()=>({defaultValue:yt(e,e.initialState({prop:i})),onChange(t,n){let{exiting:r,entering:i}=xt(e,n,t,d.current?.reenter);if(r.forEach(e=>{l.current.get(e.path)?.(),l.current.delete(e.path)}),r.forEach(e=>{S(e.state?.exit)}),S(d.current?.actions),i.forEach(e=>{let t=w(e.state?.effects);if(t){let n=l.current.get(e.path);l.current.set(e.path,n?I(n,t):t)}}),n===`__init__`){S(e.entry);let t=w(e.effects);if(t){let e=l.current.get(Ot);l.current.set(Ot,e?I(e,t):t)}}i.forEach(e=>{S(e.state?.entry)})}})),D=(0,s.useRef)(void 0),O=(0,s.useRef)(Dt.NotStarted),ee=(0,s.useRef)(!1),te=Ta(()=>O.current);Sa(()=>{ee.current=!0;let t=!1;queueMicrotask(()=>{if(!ee.current)return;t=!0;let e=O.current===Dt.Started;O.current=Dt.Started,r(e?`rehydrating...`:`initializing...`);let n=D.current??E.initial;E.invoke(n,e?E.get():Ot)});let n=l.current;return()=>{ee.current=!1;let i=j();r(`unmounting...`),D.current=i,O.current=Dt.Stopped,n.forEach(e=>e?.()),l.current=new Map,d.current=null,queueMicrotask(()=>{t&&(S(e.exit),O.current=Dt.Stopped)})}},[]);let j=()=>`ref`in E?E.ref.current:E.get();return e.watch?.(x()),{state:h(),send:y,context:c,prop:i,scope:n,refs:g,computed:b,event:m(),getStatus:te}}function ka(e){let t=(0,s.useRef)(e);return t.current=e,t}function Aa(e){let t=ka(e);return Ta(function(e){return t.current[e]})}function ja(e){queueMicrotask(()=>{(0,o.flushSync)(()=>e())})}function Ma(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}var Na=Ma(e=>e),G=a(),Pa=(0,s.forwardRef)((e,t)=>{let n=z(xa().getAnchorProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Pa.displayName=`PopoverAnchor`;var Fa=(0,s.forwardRef)((e,t)=>{let n=z(xa().getArrowProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Fa.displayName=`PopoverArrow`;var Ia=(0,s.forwardRef)((e,t)=>{let n=z(xa().getArrowTipProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Ia.displayName=`PopoverArrowTip`;var La=(0,s.forwardRef)((e,t)=>{let n=z(xa().getCloseTriggerProps(),e);return(0,G.jsx)(U.button,{...n,ref:t})});La.displayName=`PopoverCloseTrigger`;var Ra=(e=>Reflect.get(e,`Activity`))(s),za=Ra!==void 0,Ba=e=>{let{presence:t,children:n}=e;return t.unmounted?null:t.hideMode===`activity`&&Ra?(0,G.jsx)(Ra,{mode:t.present?`visible`:`hidden`,children:n}):n},[Va,Ha]=W({name:`PresenceContext`,hookName:`usePresenceContext`,providerName:`<PresenceProvider />`}),Ua=(0,s.forwardRef)((e,t)=>{let n=xa(),r=Ha(),i=z(n.getContentProps(),r.getPresenceProps(),e),a=l(r.ref,t);return(0,G.jsx)(Ba,{presence:r,children:(0,G.jsx)(U.div,{...i,ref:a})})});Ua.displayName=`PopoverContent`;var Wa=(0,s.forwardRef)((e,t)=>{let n=z(xa().getDescriptionProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Wa.displayName=`PopoverDescription`;var Ga=(0,s.forwardRef)((e,t)=>{let n=z(xa().getIndicatorProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Ga.displayName=`PopoverIndicator`;var Ka=(0,s.forwardRef)((e,t)=>{let n=xa(),r=Ha(),i=z(n.getPositionerProps(),e);return r.unmounted?null:(0,G.jsx)(U.div,{...i,ref:t})});Ka.displayName=`PopoverPositioner`;function qa(e,t={}){let{sync:n=!1}=t,r=Ja(e);return(0,s.useCallback)((...e)=>n?queueMicrotask(()=>r.current?.(...e)):r.current?.(...e),[n,r])}function Ja(e){let t=(0,s.useRef)(e);return t.current=e,t}function Ya(e,t){let{state:n,send:r,context:i}=e,a=n.matches(`mounted`,`unmountSuspended`);return{skip:!i.get(`initial`),present:a,setNode(e){e&&r({type:`NODE.SET`,node:e})},unmount(){r({type:`UNMOUNT`})}}}var Xa=Tt({props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e(`present`)?`mounted`:`unmounted`},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:[`cleanupNode`],watch({track:e,prop:t,send:n}){e([()=>t(`present`)],()=>{n({type:`PRESENCE.CHANGED`})})},on:{"NODE.SET":{actions:[`setupNode`]},"PRESENCE.CHANGED":{actions:[`setInitial`,`syncPresence`]}},states:{mounted:{effects:[`trackEnterAnimation`],on:{UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]},"UNMOUNT.SUSPEND":{target:`unmountSuspended`}}},unmountSuspended:{effects:[`trackExitAnimation`],on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]},UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]}}},unmounted:{on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get(`initial`)||queueMicrotask(()=>{e.set(`initial`,!0)})},invokeOnExitComplete:({prop:e,refs:t})=>{e(`onExitComplete`)?.();let n=t.get(`node`);if(!n)return;let r=new(on(n)).CustomEvent(`exitcomplete`,{bubbles:!1});n.dispatchEvent(r)},setupNode:({refs:e,event:t})=>{e.get(`node`)!==t.node&&(e.set(`node`,t.node),e.set(`styles`,fn(t.node)))},cleanupNode:({refs:e})=>{e.set(`node`,null),e.set(`styles`,null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{let i=r(`present`);if(i)return n({type:`MOUNT`,src:`presence.changed`});let a=t.get(`node`);if(!i&&a?.ownerDocument.visibilityState===`hidden`)return n({type:`UNMOUNT`,src:`visibilitychange`});H(()=>{if(r(`present`))return;let i=Za(t.get(`styles`));e.set(`unmountAnimationName`,i),i===`none`||i===e.get(`prevAnimationName`)||t.get(`styles`)?.display===`none`||t.get(`styles`)?.animationDuration===`0s`||!$a(t.get(`node`),i)?n({type:`UNMOUNT`,src:`presence.changed`}):n({type:`UNMOUNT.SUSPEND`})})},setPrevAnimationName:({context:e,refs:t})=>{H(()=>{e.set(`prevAnimationName`,Za(t.get(`styles`)))})},clearPrevAnimationName:({context:e})=>{e.set(`prevAnimationName`,null)}},effects:{trackEnterAnimation:({context:e,refs:t,prop:n})=>{if(!n(`onEnterComplete`)||!e.get(`initial`))return;let r,i=()=>{r=H(()=>{let e=t.get(`node`);if(!e||!e.isConnected){i();return}let r=fn(e);if(Za(r)===`none`||r.display===`none`||r.animationDuration===`0s`){n(`onEnterComplete`)?.();return}let a=t=>{Zn(t)===e&&n(`present`)&&(e.removeEventListener(`animationend`,a),n(`onEnterComplete`)?.())};return e.addEventListener(`animationend`,a),()=>{e.removeEventListener(`animationend`,a)}})};return i(),()=>r?.()},trackExitAnimation:({context:e,refs:t,send:n,prop:r})=>{let i=t.get(`node`);if(!i)return;let a=n=>{(n.composedPath?.()?.[0]??n.target)===i&&e.set(`prevAnimationName`,Za(t.get(`styles`)))},o=a=>{let o=Za(t.get(`styles`));Zn(a)===i&&o===e.get(`unmountAnimationName`)&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationend`})},s=e=>{Zn(e)===i&&!r(`present`)&&!Qa(i)&&n({type:`UNMOUNT`,src:`animationcancel`})};i.addEventListener(`animationstart`,a),i.addEventListener(`animationcancel`,s),i.addEventListener(`animationend`,o);let c=na(i,{animationFillMode:`forwards`});return()=>{i.removeEventListener(`animationstart`,a),i.removeEventListener(`animationcancel`,s),i.removeEventListener(`animationend`,o),$r(()=>c())}}}}});function Za(e){return e?.animationName||`none`}function Qa(e){return typeof e.getAnimations==`function`&&e.getAnimations().some(e=>`animationName`in e&&e.playState===`running`)}function $a(e,t){if(!e||typeof e.getAnimations!=`function`)return!0;let n=t.split(`,`).map(e=>e.trim());return e.getAnimations().some(e=>{let t=e.animationName;return e.playState===`running`&&(t==null||n.includes(t))})}var eo=(e={})=>{let{lazyMount:t,unmountOnExit:n,hideMode:r=`display-none`,present:i,skipAnimationOnMount:a=!1,...o}=e,c=(0,s.useRef)(!1),l=Ya(Oa(Xa,{...o,present:i,onEnterComplete:qa(e.onEnterComplete),onExitComplete:qa(e.onExitComplete)}),Na);l.present&&(c.current=!0);let u=!l.present&&!c.current&&t||n&&!l.present&&c.current,d=r===`activity`&&za?`activity`:`display-none`;return{ref:l.setNode,getPresenceProps:()=>({"data-state":l.skip&&a?void 0:i?`open`:`closed`,hidden:d!==`activity`&&!l.present}),present:l.present,unmounted:u,hideMode:d}},K=()=>(e,t)=>t.reduce((e,t)=>{let[n,r]=e,i=t;return r[i]!==void 0&&(n[i]=r[i]),delete r[i],[n,r]},[{},{...e}]),to=e=>K()(e,[`hideMode`,`immediate`,`lazyMount`,`onEnterComplete`,`onExitComplete`,`present`,`skipAnimationOnMount`,`unmountOnExit`]),[no,ro]=W({name:`EnvironmentContext`,hookName:`useEnvironmentContext`,providerName:`<EnvironmentProvider />`,strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[io,ao]=W({name:`LocaleContext`,hookName:`useLocaleContext`,providerName:`<LocaleProvider />`,strict:!1,defaultValue:{dir:`ltr`,locale:`en-US`}}),oo=(e,t=[])=>({parts:(...n)=>{if(co(t))return oo(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>oo(e,[...t,...n]),omit:(...n)=>oo(e,t.filter(e=>!n.includes(e))),rename:e=>oo(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${so(e)}"][data-part="${so(n)}"]`,`& [data-scope="${so(e)}"][data-part="${so(n)}"]`].join(`, `),attrs:{"data-scope":so(e),"data-part":so(n)}}}),{})}),so=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),co=e=>e.length===0,lo=oo(`popover`).parts(`arrow`,`arrowTip`,`anchor`,`trigger`,`indicator`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),uo=[`top`,`right`,`bottom`,`left`],fo=Math.min,po=Math.max,mo=Math.round,ho=Math.floor,go=e=>({x:e,y:e}),_o={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function vo(e,t,n){return po(e,fo(t,n))}function yo(e,t){return typeof e==`function`?e(t):e}function bo(e){return e.split(`-`)[0]}function xo(e){return e.split(`-`)[1]}function So(e){return e===`x`?`y`:`x`}function Co(e){return e===`y`?`height`:`width`}function wo(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function To(e){return So(wo(e))}function Eo(e,t,n){n===void 0&&(n=!1);let r=xo(e),i=To(e),a=Co(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Fo(o)),[o,Fo(o)]}function Do(e){let t=Fo(e);return[Oo(e),t,Oo(t)]}function Oo(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ko=[`left`,`right`],Ao=[`right`,`left`],jo=[`top`,`bottom`],Mo=[`bottom`,`top`];function No(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ao:ko:t?ko:Ao;case`left`:case`right`:return t?jo:Mo;default:return[]}}function Po(e,t,n,r){let i=xo(e),a=No(bo(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Oo)))),a}function Fo(e){let t=bo(e);return _o[t]+e.slice(t.length)}function Io(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Lo(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Io(e)}function Ro(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function zo(e,t,n){let{reference:r,floating:i}=e,a=wo(t),o=To(t),s=Co(o),c=bo(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=xo(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Bo(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=yo(t,e),p=Lo(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ro(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Ro(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Vo=50,Ho=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Bo},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=zo(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Vo&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=zo(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Uo=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=yo(e,t)||{};if(l==null)return{};let d=Lo(u),f={x:n,y:r},p=To(i),m=Co(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=fo(d[_],T),D=fo(d[v],T),O=C-h[m]-D,ee=C/2-h[m]/2+w,te=vo(E,ee,O),k=!c.arrow&&xo(i)!=null&&ee!==te&&a.reference[m]/2-(ee<E?E:D)-h[m]/2<0,A=k?ee<E?ee-E:ee-O:0;return{[p]:f[p]+A,data:{[p]:te,centerOffset:ee-te-A,...k&&{alignmentOffset:A}},reset:k}}}),Wo=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=yo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=bo(r),_=wo(o),v=bo(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Fo(o)]:Do(o)),x=p!==`none`;!d&&x&&b.push(...Po(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Eo(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===wo(t)||T.every(e=>wo(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=wo(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Go(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ko(e){return uo.some(t=>e[t]>=0)}var qo=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=yo(e,t);switch(i){case`referenceHidden`:{let e=Go(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ko(e)}}}case`escaped`:{let e=Go(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ko(e)}}}default:return{}}}}},Jo=new Set([`left`,`top`]);async function Yo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=bo(n),s=xo(n),c=wo(n)===`y`,l=Jo.has(o)?-1:1,u=a&&c?-1:1,d=yo(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Xo=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Yo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Zo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=yo(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=wo(i),p=So(f),m=u[p],h=u[f],g=(e,t)=>vo(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Qo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=yo(e,t),u={x:n,y:r},d=wo(i),f=So(d),p=u[f],m=u[d],h=yo(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Jo.has(bo(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},$o=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=yo(e,t),c=await i.detectOverflow(t,s),l=bo(n),u=xo(n),d=wo(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=fo(p-c[m],g),y=fo(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*po(c.left,c.right):S=p-2*po(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function es(){return typeof window<`u`}function ts(e){return is(e)?(e.nodeName||``).toLowerCase():`#document`}function ns(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rs(e){return((is(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function is(e){return es()?e instanceof Node||e instanceof ns(e).Node:!1}function as(e){return es()?e instanceof Element||e instanceof ns(e).Element:!1}function os(e){return es()?e instanceof HTMLElement||e instanceof ns(e).HTMLElement:!1}function ss(e){return!es()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ns(e).ShadowRoot}function cs(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ys(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ls(e){return/^(table|td|th)$/.test(ts(e))}function us(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ds=/transform|translate|scale|rotate|perspective|filter/,fs=/paint|layout|strict|content/,ps=e=>!!e&&e!==`none`,ms;function hs(e){let t=as(e)?ys(e):e;return ps(t.transform)||ps(t.translate)||ps(t.scale)||ps(t.rotate)||ps(t.perspective)||!_s()&&(ps(t.backdropFilter)||ps(t.filter))||ds.test(t.willChange||``)||fs.test(t.contain||``)}function gs(e){let t=xs(e);for(;os(t)&&!vs(t);){if(hs(t))return t;if(us(t))return null;t=xs(t)}return null}function _s(){return ms??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ms}function vs(e){return/^(html|body|#document)$/.test(ts(e))}function ys(e){return ns(e).getComputedStyle(e)}function bs(e){return as(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xs(e){if(ts(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ss(e)&&e.host||rs(e);return ss(t)?t.host:t}function Ss(e){let t=xs(e);return vs(t)?(e.ownerDocument||e).body:os(t)&&cs(t)?t:Ss(t)}function Cs(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ss(e),i=r===e.ownerDocument?.body,a=ns(r);if(i){let e=ws(a);return t.concat(a,a.visualViewport||[],cs(r)?r:[],e&&n?Cs(e):[])}return t.concat(r,Cs(r,[],n))}function ws(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ts(e){let t=ys(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=os(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=mo(n)!==a||mo(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Es(e){return as(e)?e:e.contextElement}function Ds(e){let t=Es(e);if(!os(t))return go(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ts(t),o=(a?mo(n.width):n.width)/r,s=(a?mo(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Os=go(0);function ks(e){let t=ns(e);return!_s()||!t.visualViewport?Os:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function As(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ns(e)}function js(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Es(e),o=go(1);t&&(r?as(r)&&(o=Ds(r)):o=Ds(e));let s=As(a,n,r)?ks(a):go(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=ns(a),t=as(r)?ns(r):r,n=e,i=ws(n);for(;i&&t!==n;){let e=Ds(i),t=i.getBoundingClientRect(),r=ys(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ns(i),i=ws(n)}}return Ro({width:u,height:d,x:c,y:l})}function Ms(e,t){let n=bs(e).scrollLeft;return t?t.left+n:js(rs(e)).left+n}function Ns(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ms(e,n),y:n.top+t.scrollTop}}function Ps(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=rs(r),s=t?us(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=go(1),u=go(0),d=os(r);if((d||!a)&&((ts(r)!==`body`||cs(o))&&(c=bs(r)),d)){let e=js(r);l=Ds(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ns(o,c):go(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Fs(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Is(e){let t=bs(e),n=e.ownerDocument.body,r=po(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=po(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ms(e),o=-t.scrollTop;return ys(n).direction===`rtl`&&(a+=po(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Ls=25;function Rs(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=ns(e),a=rs(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!_s()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ms(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Ls&&(s-=o)}return{width:s,height:c,x:l,y:u}}function zs(e,t){let n=js(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ds(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Bs(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Rs(e,n,t);else if(t===`document`)r=Is(rs(e));else if(as(t))r=zs(t,n);else{let n=ks(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ro(r)}function Vs(e,t){let n=t.get(e);if(n)return n;let r=Cs(e,[],!1).filter(e=>as(e)&&ts(e)!==`body`),i=null,a=ys(e).position===`fixed`,o=a?xs(e):e;for(;as(o)&&!vs(o);){let e=ys(o),t=hs(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=xs(o)}return t.set(e,r),r}function Hs(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?us(t)?[]:Vs(t,this._c):[].concat(n),r],o=Bs(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Bs(t,a[e],i);s=po(n.top,s),c=fo(n.right,c),l=fo(n.bottom,l),u=po(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Us(e){let{width:t,height:n}=Ts(e);return{width:t,height:n}}function Ws(e,t,n){let r=os(t),i=rs(t),a=n===`fixed`,o=js(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=go(0);if((r||!a)&&((ts(t)!==`body`||cs(i))&&(s=bs(t)),r)){let e=js(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ms(i));let l=i&&!r&&!a?Ns(i,s):go(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Gs(e){return ys(e).position===`static`}function Ks(e,t){if(!os(e)||ys(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return rs(e)===n&&(n=n.ownerDocument.body),n}function qs(e,t){let n=ns(e);if(us(e))return n;if(!os(e)){let t=xs(e);for(;t&&!vs(t);){if(as(t)&&!Gs(t))return t;t=xs(t)}return n}let r=Ks(e,t);for(;r&&ls(r)&&Gs(r);)r=Ks(r,t);return r&&vs(r)&&Gs(r)&&!hs(r)?n:r||gs(e)||n}var Js=async function(e){let t=this.getOffsetParent||qs,n=await(0,this.getDimensions)(e.floating);return{reference:Ws(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ys(e){return ys(e).direction===`rtl`}var Xs={convertOffsetParentRelativeRectToViewportRelativeRect:Ps,getDocumentElement:rs,getClippingRect:Hs,getOffsetParent:qs,getElementRects:Js,getClientRects:Fs,getDimensions:Us,getScale:Ds,isElement:as,isRTL:Ys};function Zs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Qs(e,t,n){let r=null,i,a=rs(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=ho(d),h=ho(a.clientWidth-(u+f)),g=ho(a.clientHeight-(d+p)),_=ho(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:po(0,fo(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Zs(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=ns(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function $s(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Es(e),u=i||a?[...l?Cs(l):[],...t?Cs(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Qs(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?js(e):null;c&&g();function g(){let t=js(e);h&&!Zs(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ec=Xo,tc=Zo,nc=Wo,rc=$o,ic=qo,ac=Uo,oc=Qo,sc=(e,t,n)=>{let r=new Map,i=n??{},a={...Xs,...i.platform,_c:r};return Ho(e,t,{...i,platform:a})};function cc(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function lc(e){if(!e)return cc();let{x:t,y:n,width:r,height:i}=e;return cc(t,n,r,i)}function uc(e,t){return{contextElement:Ut(e)?e:e?.contextElement,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?lc(r):n.getBoundingClientRect()}}}var dc=e=>({variable:e,reference:`var(${e})`}),fc={arrowSize:dc(`--arrow-size`),arrowSizeHalf:dc(`--arrow-size-half`),arrowBg:dc(`--arrow-background`),transformOrigin:dc(`--transform-origin`),arrowOffset:dc(`--arrow-offset`)},pc=e=>e===`top`||e===`bottom`?`y`:`x`;function mc(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=pc(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,w=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(fc.transformOrigin.variable,w?C:S),{data:{transformOrigin:w?C:S}}}}}var hc={name:`rects`,fn({rects:e}){return{data:e}}},gc=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${fc.arrowOffset.reference})`}),{}}}};function _c(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}function vc(e){return e.split(`-`)[0]}var yc={strategy:`absolute`,placement:`bottom`,listeners:!0,restoreStyles:!1,applyStyles:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function bc(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function xc(e,t){return e!=null&&Math.abs(e-t)<.5}function Sc(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function Cc(e,t,n){return ac({element:e||t.createElement(`div`),padding:n.arrowPadding})}function wc(e,t){if(!j(t.offset??t.gutter))return ec(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=_c(n),s=o?void 0:t.shift;return ke({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function Tc(e){if(e.flip)return nc(()=>{let t=Sc(e.boundary);return{...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}})}function Ec(e){if(e.slide||e.overlap)return tc(()=>{let t=Sc(e.boundary);return{...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:oc()}})}function Dc(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,i;return rc(()=>{let a=Sc(e.boundary);return{padding:e.overflowPadding,...a?{boundary:a}:void 0,apply({elements:e,rects:a,availableHeight:o,availableWidth:s}){let c=e.floating,l=Math.round(a.reference.width),u=Math.round(a.reference.height);s=Math.floor(s),o=Math.floor(o),xc(t,l)||(c.style.setProperty(`--reference-width`,`${l}px`),t=l),xc(n,u)||(c.style.setProperty(`--reference-height`,`${u}px`),n=u),xc(r,s)||(c.style.setProperty(`--available-width`,`${s}px`),r=s),xc(i,o)||(c.style.setProperty(`--available-height`,`${o}px`),i=o)}}})}function Oc(e){if(e.hideWhenDetached)return ic(()=>({strategy:`referenceHidden`,boundary:Sc(e.boundary)??`clippingAncestors`}))}function kc(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}var Ac=[`transform`,`visibility`,`pointer-events`,`--x`,`--y`,`--z-index`,`z-index`,`--reference-width`,`--reference-height`,`--available-width`,`--available-height`,`--transform-origin`],jc=[`top`,`right`,`bottom`,`left`],Mc=new WeakSet;function Nc(e,t){let n=e.style.getPropertyValue(`z-index`),r=Mc.has(e),i=r&&n===`var(--z-index)`;r&&!i&&Mc.delete(e);let a=fn(t).zIndex;a===`auto`?i&&(e.style.removeProperty(`z-index`),Mc.delete(e)):(!n||i)&&(e.style.setProperty(`--z-index`,a),e.style.setProperty(`z-index`,`var(--z-index)`),Mc.add(e))}function Pc(e,t){if(!e)return ce;let n=new Map(t.map(t=>[t,e.style.getPropertyValue(t)]));return()=>{n.forEach((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)}),e.style.length===0&&e.removeAttribute(`style`)}}function Fc(e){return e==null?null:Ut(e)?e:typeof e==`object`&&e&&`contextElement`in e&&e.contextElement?e.contextElement:e}function Ic(e,t,n={}){let r=()=>(typeof t==`function`?t():t)??null,i=()=>{let t=typeof e==`function`?e():e;return n.getAnchorElement?.()??t},a=()=>{let e=i();return!e&&!n.getAnchorRect?null:uc(e,n.getAnchorRect)},o=Object.assign({},yc,n),s=[],c=null,l,u;function d(e){if(l?.(),u?.(),c=e,o.restoreStyles){let t=Pc(e,Ac);l=()=>{t(),Mc.delete(e)}}else l=void 0;let t=e.querySelector(`[data-part=arrow]`);u=o.restoreStyles?Pc(t,jc):void 0,s=[wc(t,o),Tc(o),Ec(o),Cc(t,e.ownerDocument,o),gc(t),mc({gutter:o.gutter,offset:o.offset,overlap:o.overlap},t),Dc(o),Oc(o),hc]}let{placement:f,strategy:p,onComplete:m,onPositioned:h}=o,g,_,v=!1,y,b,x=ce,S=kc(o.listeners);function C(){if(!o.listeners)return;let e=i(),t=a(),n=r();t&&n&&(Fc(e)!==Fc(y)||n!==b)&&(x(),y=e,b=n,x=$s(t,n,T,S))}async function w(){C();let e=r();if(!e)return;e!==c&&(d(e),v=!1);let t=a();if(!t)return;let n=await sc(t,e,{placement:f,middleware:s,strategy:p}),i=on(e),l=bc(i,n.x),u=bc(i,n.y);if(m?.({...n,x:l,y:u}),o.applyStyles!==!1&&(xc(g,l)||(e.style.setProperty(`--x`,`${l}px`),g=l),xc(_,u)||(e.style.setProperty(`--y`,`${u}px`),_=u),o.hideWhenDetached&&(n.middlewareData.hide?.referenceHidden?(e.style.setProperty(`visibility`,`hidden`),e.style.setProperty(`pointer-events`,`none`)):(e.style.removeProperty(`visibility`),e.style.removeProperty(`pointer-events`))),!v)){let t=e.firstElementChild;t&&(Nc(e,t),v=!0)}}async function T(){n.updatePosition?(await n.updatePosition({updatePosition:w,floatingElement:r()}),h?.({placed:!0})):await w()}return T(),()=>{x(),u?.(),l?.(),h?.({placed:!1})}}function Lc(e,t,n={}){let{defer:r,...i}=n,a=r?H:e=>e(),o=[];return o.push(a(()=>{o.push(Ic(e,t,i))})),()=>{o.forEach(e=>e?.())}}var Rc={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function zc(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`,applyStyles:a=!0}=e;return{arrow:{position:`absolute`,width:fc.arrowSize.reference,height:fc.arrowSize.reference,[fc.arrowSizeHalf.variable]:`calc(${fc.arrowSize.reference} / 2)`,[fc.arrowOffset.variable]:`calc(${fc.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?Rc[t.split(`-`)[0]]:void 0,background:fc.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`var(--reference-width)`:void 0,maxWidth:r?`var(--available-width)`:void 0,maxHeight:r?`var(--available-height)`:void 0,pointerEvents:t?void 0:`none`,top:`0px`,left:`0px`,transform:t?`translate3d(var(--x, 0), var(--y, -100vh), 0)`:`translate3d(0, -100vh, 0)`,zIndex:a===!1?`var(--z-index)`:void 0}}}var Bc=e=>e.ids?.anchor??`popover:${e.id}:anchor`,Vc=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`popover:${e.id}:trigger:${t}`:`popover:${e.id}:trigger`:A(n)?n(t):n},Hc=e=>e.ids?.content??`popover:${e.id}:content`,Uc=e=>e.ids?.positioner??`popover:${e.id}:popper`,Wc=e=>e.ids?.arrow??`popover:${e.id}:arrow`,Gc=e=>e.ids?.title??`popover:${e.id}:title`,Kc=e=>e.ids?.description??`popover:${e.id}:desc`,qc=e=>e.ids?.closeTrigger??`popover:${e.id}:close`,Jc=e=>e.getById(Bc(e)),Yc=e=>e.getById(Vc(e)),Xc=e=>Ai(e.getRootNode(),`[data-scope="popover"][data-part="trigger"]${Rt(e.id)}`),Zc=(e,t)=>t==null?Yc(e)??Xc(e)[0]:e.getById(Vc(e,t)),Qc=e=>e.getById(Hc(e)),$c=e=>e.getById(Uc(e)),el=e=>e.getById(Gc(e)),tl=e=>e.getById(Kc(e)),nl={closeTriggerLabel:`close`};function rl(e,t){let{state:n,context:r,send:i,computed:a,prop:o,scope:s}=e,c=je(nl,o(`translations`)),l=n.matches(`open`),u=r.get(`currentPlacement`),d=u?vc(u):void 0,f=a(`currentPortalled`),p=r.get(`renderedElements`),m=r.get(`triggerValue`),h=zc({...o(`positioning`),placement:u});return{portalled:f,open:l,setOpen(e){i({type:e?`OPEN`:`CLOSE`,replaces:`open`})},triggerValue:m,setTriggerValue(e){i({type:`TRIGGER_VALUE.SET`,value:e})},reposition(e={}){i({type:`POSITIONING.SET`,options:e})},getArrowProps(){return t.element({id:Wc(s),...lo.arrow.attrs,dir:o(`dir`),style:h.arrow})},getArrowTipProps(){return t.element({...lo.arrowTip.attrs,dir:o(`dir`),style:h.arrowTip})},getAnchorProps(){return t.element({...lo.anchor.attrs,dir:o(`dir`),id:Bc(s)})},getTriggerProps(e={}){let{value:n}=e,r=n!=null&&m===n;return t.button({...lo.trigger.attrs,dir:o(`dir`),type:`button`,"data-placement":u,"data-side":d,id:Vc(s,n),"data-ownedby":s.id,"data-value":n,"data-current":B(r),"aria-haspopup":`dialog`,"aria-expanded":n==null?l:l&&r,"data-state":l?`open`:`closed`,"aria-controls":Hc(s),onPointerDown(e){rr(e)&&Nn()&&e.currentTarget.focus()},onClick(e){e.defaultPrevented||i({type:l&&n!=null&&!r?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})},onBlur(e){i({type:`TRIGGER_BLUR`,target:e.relatedTarget})}})},getIndicatorProps(){return t.element({...lo.indicator.attrs,dir:o(`dir`),"data-state":l?`open`:`closed`})},getPositionerProps(){return t.element({id:Uc(s),...lo.positioner.attrs,dir:o(`dir`),style:h.floating})},getContentProps(){return t.element({...lo.content.attrs,dir:o(`dir`),id:Hc(s),tabIndex:-1,role:`dialog`,"aria-modal":Pt(o(`modal`)),hidden:!l,"data-state":l?`open`:`closed`,"data-expanded":B(l),"aria-labelledby":p.title?Gc(s):void 0,"aria-describedby":p.description?Kc(s):void 0,"data-placement":u,"data-side":d})},getTitleProps(){return t.element({...lo.title.attrs,id:Gc(s),dir:o(`dir`)})},getDescriptionProps(){return t.element({...lo.description.attrs,id:Kc(s),dir:o(`dir`)})},getCloseTriggerProps(){return t.button({...lo.closeTrigger.attrs,dir:o(`dir`),id:qc(s),type:`button`,"aria-label":c.closeTriggerLabel,onClick(e){e.defaultPrevented||(e.stopPropagation(),i({type:`CLOSE`}))}})}}}var il=new WeakMap,al=new WeakMap,ol={},sl=0,cl=e=>e&&(e.host||cl(e.parentNode)),ll=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=cl(t);return n&&e.contains(n)?n:(console.error(`[zag-js > ariaHidden] target`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(e=>!!e),ul=new Set([`script`,`output`,`status`,`next-route-announcer`]),dl=e=>ul.has(e.localName)||e.role===`status`||e.hasAttribute(`aria-live`)?!0:e.matches(`[data-live-announcer]`),fl=(e,t)=>{var n;let{parentNode:r,markerName:i,attribute:a,followControlledElements:o=!0}=t,s=a===`aria-hidden`?`true`:``,c=e.filter(e=>r.contains(e));if(!c.length)return()=>{};(n=ol)[i]||(n[i]=new WeakMap);let l=ol[i],u=[],d=new Set,f=new Set(c),p=e=>{e&&!d.has(e)&&(d.add(e),p(e.parentNode))};c.forEach(e=>{p(e),o&&Ut(e)&&Wn(e,e=>{p(e),f.add(e)})});let m=e=>{e&&!f.has(e)&&Array.prototype.forEach.call(e.children,e=>{if(d.has(e))m(e);else try{if(dl(e))return;let t=a===`aria-hidden`?e.getAttribute(a)===`true`:e.hasAttribute(a),n=(il.get(e)||0)+1,r=(l.get(e)||0)+1;il.set(e,n),l.set(e,r),u.push(e),n===1&&t&&al.set(e,!0),r===1&&e.setAttribute(i,``),t||e.setAttribute(a,s)}catch(t){console.error(`[zag-js > ariaHidden] cannot operate on `,e,t)}})};return m(r),d.clear(),sl++,()=>{u.forEach(e=>{let t=il.get(e)-1,n=l.get(e)-1;il.set(e,t),l.set(e,n),t||(al.has(e)||e.removeAttribute(a),al.delete(e)),n||e.removeAttribute(i)}),sl--,sl||(il=new WeakMap,al=new WeakMap,ol={})}};function pl(){let e=[];return{add(t){e[e.length-1]?.pause(),e.push(t),t.resume()},remove(t){let n=e.indexOf(t);if(n===-1)return;let r=n===e.length-1;e.splice(n,1),r&&(t.pause(),e[e.length-1]?.resume())}}}var ml=new WeakMap,hl=e=>{let t=ml.get(e);return t||(t=pl(),ml.set(e,t)),t},gl=(e,t)=>{let{parentNode:n,attribute:r,followControlledElements:i=!0}=t,a=ll(n,Array.isArray(e)?e:[e]);if(!a.length)return()=>{};let o=r===`aria-hidden`?`[aria-hidden="true"]`:`[inert]`,s,c,l=()=>{let e=s;s=fl(a,t),e?.()},u=()=>{s?.(),s=void 0},d={pause(){c?.disconnect(),c=void 0,u()},resume(){l(),i&&(c=new(on(n)).MutationObserver(e=>{e.some(({target:e})=>Ht(e)&&!e.closest(o))&&l()}),c.observe(n,{attributes:!0,attributeFilter:[`aria-expanded`],subtree:!0}))}},f=hl(n.ownerDocument);return f.add(d),()=>f.remove(d)},_l=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,vl=(e,t=_l(e),n=`data-aria-hidden`,r=!0)=>{if(t)return gl(e,{parentNode:t,markerName:n,attribute:`aria-hidden`,followControlledElements:r})},yl=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function bl(e,t={}){let{defer:n=!0}=t,r=n?yl:e=>e(),i=[];return i.push(r(()=>{let t=(typeof e==`function`?e():e).filter(Boolean);t.length!==0&&i.push(vl(t))})),()=>{i.forEach(e=>e?.())}}function xl(e){let t={each(t){for(let n=0;n<e.frames?.length;n+=1){let r=e.frames[n];r&&t(r)}},addEventListener(e,n,r){return t.each(t=>{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function Sl(e){let t=e.frameElement==null?null:e.parent.document;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var Cl=`pointerdown.outside`,wl=`focus.outside`;function Tl(e){for(let t of e)if(Ut(t)&&Vr(t))return!0;return!1}var El=e=>`clientY`in e;function Dl(e,t){if(!El(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function Ol(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function kl(e,t){if(!t||!El(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return Ol({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function Al(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o,followControlledElements:s=!0}=t;if(!e)return;let c=rn(e),l=on(e),u=xl(l),d=Sl(l);function f(t,r){if(!Ut(r)||!r.isConnected||nn(e,r)||Dl(e,t)||s&&Un(e,r))return!1;let i=c.querySelector(`[aria-controls="${e.id}"]`);return i&&kl(t,fi(i))||kl(t,fi(e))?!1:!n?.(r)}let p=new Set,m=Yt(e?.getRootNode()),h=!1;function g(t){h=!0;let n=()=>{h=!1};c.addEventListener(`pointerup`,n,{once:!0}),l.addEventListener(`pointerup`,n,{once:!0});function r(n){let r=o&&!Dn()?H:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=m?c[0]:Zn(t);if(e&&f(t,n)){if(i||a){let t=I(i,a);e.addEventListener(Cl,t,{once:!0})}Ml(e,Cl,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:ir(s),focusable:Tl(c),target:n}})}})}t.pointerType===`touch`?(p.forEach(e=>e()),p.add(V(c,`click`,r,{once:!0})),p.add(d.addEventListener(`click`,r,{once:!0})),p.add(u.addEventListener(`click`,r,{once:!0}))):r()}let _=new Set,v=setTimeout(()=>{_.add(V(c,`pointerdown`,g,!0)),_.add(d.addEventListener(`pointerdown`,g,!0)),_.add(u.addEventListener(`pointerdown`,g,!0))},0),y=Qr.create();function b(t){h||(o?e=>y.request(e):e=>e())(()=>{let n=t?.composedPath?.()??[t?.target],i=m?n[0]:Zn(t);if(e&&f(t,i)){if(r||a){let t=I(r,a);e.addEventListener(wl,t,{once:!0})}Ml(e,wl,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:Vr(i),target:i}})}})}return Dn()||(_.add(V(c,`focusin`,b,!0)),_.add(d.addEventListener(`focusin`,b,!0)),_.add(u.addEventListener(`focusin`,b,!0))),()=>{clearTimeout(v),y.cancel(),p.forEach(e=>e()),_.forEach(e=>e())}}function jl(e,t){let{defer:n}=t,r=n?H:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(Al(n,t))})),()=>{i.forEach(e=>e?.())}}function Ml(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function Nl(e,t){return V(rn(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var Pl=`layer:request-dismiss`,Fl={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){let t=new Set([e]);return this.layers.slice(this.indexOf(e)+1).filter(e=>!e.parent||!t.has(e.parent)?!1:(t.add(e.node),!0))},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){return this.indexOf(e)===-1?[]:this.getNestedLayers(e).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.layers[this.indexOf(e)]?.parent;for(;n;){let e=this.layers[this.indexOf(n)];if(e?.type===t)return e;n=e?.parent}},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>nn(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>nn(t,e))},add(e){let t=this.indexOf(e.node);t===-1?(e.parent=this.getParentNode(e),this.layers.push(e)):(e.parent=this.layers[t].parent,this.layers[t]=e),this.syncLayers()},getParentNode(e){let t=e.origins?.filter(e=>e?.isConnected);return t?.length?[...this.layers].reverse().find(({node:e})=>t.some(t=>nn(e,t)))?.node:this.layers[this.count()-1]?.node},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);if(t<0)return;let n=this.layers[t];n.styleTargets?.forEach(e=>{let t=e();t&&Ll(t)}),this.recentlyRemoved.add(e),$r(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>Fl.dismiss(t.node,e)),this.layers.forEach(t=>{t.parent===e&&(t.parent=n.parent)}),this.layers.splice(t,1),this.syncLayers()},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{Il(e,t,e.node),e.styleTargets?.forEach(n=>{let r=n();if(!r||r===e.node)return;Il(e,t,r);let{zIndex:i}=fn(e.node);r.style.setProperty(`--z-index`,i)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];zl(e,Pl,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),Rl(e,Pl,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function Il(e,t,n){n.style.setProperty(`--layer-index`,`${t}`),n.removeAttribute(`data-nested`),n.removeAttribute(`data-has-nested`),Fl.getParentLayerOfType(e.node,e.type)&&n.setAttribute(`data-nested`,e.type);let r=Fl.countNestedLayersOfType(e.node,e.type);r>0&&n.setAttribute(`data-has-nested`,e.type),n.style.setProperty(`--nested-layer-count`,`${r}`)}function Ll(e){e.style.removeProperty(`--layer-index`),e.style.removeProperty(`--nested-layer-count`),e.removeAttribute(`data-nested`),e.removeAttribute(`data-has-nested`)}function Rl(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function zl(e,t,n){e.addEventListener(t,n,{once:!0})}var Bl=new WeakMap,Vl=new WeakMap;function Hl(e){return Fl.isBelowPointerBlockingLayer(e)?`none`:`auto`}function Ul(e){let t=Hl(e);e.style.pointerEvents!==t&&(e.style.pointerEvents=t)}function Wl(e){if(Vl.has(e))return;let t=on(e);if(t.MutationObserver===void 0)return;let n=new t.MutationObserver(()=>{Vl.has(e)&&Ul(e)});n.observe(e,{attributes:!0,attributeFilter:[`style`]}),Vl.set(e,n)}function Gl(){Fl.layers.forEach(({node:e})=>{Ul(e),Wl(e)})}function Kl(e){let t=Vl.get(e);t&&(t.disconnect(),Vl.delete(e)),e.style.pointerEvents=``}function ql(e,t){let n=rn(e),r=[];return Fl.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(Bl.set(n.body,n.body.style.pointerEvents),queueMicrotask(()=>{let e=n.body;e&&(e.style.pointerEvents=`none`,e.setAttribute(`data-inert`,``))})),t?.forEach(e=>{let[t,n]=ua(()=>{let t=e();return Ut(t)?t:null},{timeout:1e3});t.then(e=>r.push(na(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{Fl.hasPointerBlockingLayer()||(queueMicrotask(()=>{let e=n.body;if(!e)return;let t=Bl.get(e);t!==void 0&&(e.style.pointerEvents=t,Bl.delete(e)),e.removeAttribute(`data-inert`),e.style.length===0&&e.removeAttribute(`style`)}),r.forEach(e=>e()))}}function Jl(e,t){let{onDismiss:n,onRequestDismiss:r,pointerBlocking:i,exclude:a,debug:o,type:s=`dialog`,layerStyleTargets:c}=t,l=()=>{let e=typeof a==`function`?a():a;return Array.isArray(e)?e:[e]},u=l().filter(Boolean),d={dismiss:n,origins:u.length?[e,...u]:void 0,node:e,type:s,pointerBlocking:i,requestDismiss:r,styleTargets:c};Fl.add(d),Gl();function f(r){let i=Zn(r.detail.originalEvent);Fl.isBelowPointerBlockingLayer(e)||Fl.isInBranch(i)||(t.onPointerDownOutside?.(r),t.onInteractOutside?.(r),r.defaultPrevented||(o&&console.log(`onPointerDownOutside:`,r.detail.originalEvent),n?.(r)))}function p(e){let r=Zn(e.detail.originalEvent);Fl.isInBranch(r)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),e.defaultPrevented||(o&&console.log(`onFocusOutside:`,e.detail.originalEvent),n?.(e)))}function m(r){Fl.isTopMost(e)&&(t.onEscapeKeyDown?.(r),!r.defaultPrevented&&n&&(r.preventDefault(),n(r)))}function h(n){let r=l(),i=t.persistentElements?.map(e=>e()).filter(Ut);return i&&r.push(...i),r.some(e=>nn(e,n))||Fl.isInNestedLayer(e,n)}let g=[i?ql(e,t.persistentElements):void 0,Nl(e,m),jl(e,{exclude:h,onFocusOutside:p,onPointerDownOutside:f,defer:t.defer})];return()=>{Fl.remove(e),Gl(),Kl(e),g.forEach(e=>e?.())}}function Yl(e,t){let{warnOnMissingNode:n=!0}=t;return fa(e,e=>Jl(e,t),{defer:t.defer,getRootNode:t.getRootNode,onMissing:n?()=>Ge("[@zag-js/dismissable] node is `null` or `undefined`"):void 0})}function Xl(e,t={}){return fa(e,e=>(Fl.addBranch(e),()=>{Fl.removeBranch(e)}),{defer:t.defer,getRootNode:t.getRootNode,onMissing:()=>Ge("[@zag-js/dismissable] branch node is `null` or `undefined`")})}function Zl(e){"@babel/helpers - typeof";return Zl=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Zl(e)}function Ql(e,t){if(Zl(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(Zl(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $l(e){var t=Ql(e,`string`);return Zl(t)==`symbol`?t:t+``}function eu(e,t,n){return(t=$l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tu={activateTrap(e,t){if(e.length>0){let n=e[e.length-1];n!==t&&n.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},nu=[],ru=class{addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{Gn(e).forEach(e=>{this.addPortalContainer(e)})})}get active(){return this.state.active}get paused(){return this.state.paused}constructor(e,t){eu(this,`trapStack`,void 0),eu(this,`config`,void 0),eu(this,`doc`,void 0),eu(this,`state`,{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),eu(this,`lastInteractionType`,`keyboard`),eu(this,`portalContainers`,new Set),eu(this,`listenerCleanups`,[]),eu(this,`handleFocus`,e=>{let t=Zn(e),n=this.findContainerIndex(t,e)>=0;if(n||Wt(t))n&&(this.state.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();let t,n=!0;if(this.state.mostRecentlyFocusedNode){if(Gr(this.state.mostRecentlyFocusedNode)>0){let e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){let e=r.findIndex(e=>e===this.state.mostRecentlyFocusedNode);e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some(e=>e.tabbableNodes.some(e=>Gr(e)>0))||(n=!1)}else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),eu(this,`handlePointerDown`,e=>{this.lastInteractionType=`pointer`;let t=Zn(e);this.findContainerIndex(t,e)>=0||(cu(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):cu(this.config.allowOutsideClick,e)||e.preventDefault())}),eu(this,`handleClick`,e=>{let t=Zn(e);this.findContainerIndex(t,e)>=0||cu(this.config.clickOutsideDeactivates,e)||cu(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}),eu(this,`handleTabKey`,e=>{if(this.lastInteractionType=`keyboard`,this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;let t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;au(e)&&e.preventDefault(),this.tryFocus(n)}}),eu(this,`handleEscapeKey`,e=>{lu(e)&&cu(this.config.escapeDeactivates,e)!==!1&&(e.preventDefault(),this.deactivate())}),eu(this,`_mutationObserver`,void 0),eu(this,`setupMutationObserver`,()=>{let e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver(e=>{e.some(e=>Array.from(e.removedNodes).some(e=>e===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),e.some(e=>e.type===`attributes`&&(e.attributeName===`aria-controls`||e.attributeName===`aria-expanded`)||e.type===`childList`&&e.addedNodes.length>0&&Array.from(e.addedNodes).some(e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e;return Jn(t)?!0:t.id&&!this.state.containers.some(e=>e.contains(t))?Yn(t):!1}))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),eu(this,`updateObservedNodes`,()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(e=>{this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}),this.portalContainers.forEach(e=>{this.observePortalContainer(e)}))}),eu(this,`getInitialFocusNode`,()=>{let e=this.getNodeForOption(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!Vr(e)){let t=sn(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{let t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption(`fallbackFocus`)}}else e===null&&(e=this.getNodeForOption(`fallbackFocus`));if(!e||(e.isConnected||(e=this.getNodeForOption(`fallbackFocus`)),!e||!e.isConnected))throw Error(`Your focus-trap needs to have at least one focusable element`);return e}),eu(this,`tryFocus`,(e,t)=>{e!==!1&&e!==sn(this.doc)&&(!e||!e.focus?this.tryFocus(this.getInitialFocusNode()):(e.focus({preventScroll:!!this.config.preventScroll,...t}),this.state.mostRecentlyFocusedNode=e,du(e)&&e.select()))}),eu(this,`deactivate`,e=>{if(!this.state.active)return this;let t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),tu.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let n=this.getOption(t,`onDeactivate`),r=this.getOption(t,`onPostDeactivate`),i=this.getOption(t,`checkCanReturnFocus`),a=this.getOption(t,`returnFocus`,`returnFocusOnDeactivate`);n?.();let o=()=>{uu(()=>{if(a&&this.isSafeToOverrideFocus()){let e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation),t=this.lastInteractionType===`keyboard`?{focusVisible:!0}:void 0;this.tryFocus(e,t)}r?.()})};return a&&i?(i(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(o,o),this):(o(),this)}),eu(this,`pause`,e=>{if(this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onPause`),n=this.getOption(e,`onPostPause`);return this.state.paused=!0,t?.(),this.removeListeners(),this.updateObservedNodes(),n?.(),this}),eu(this,`unpause`,e=>{if(!this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onUnpause`),n=this.getOption(e,`onPostUnpause`);this.state.paused=!1,t?.();try{this.updateTabbableNodes()}catch{}this.attachListeners();try{this.commitInitialFocus()}catch{}return this.updateObservedNodes(),n?.(),this}),eu(this,`updateContainerElements`,e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),eu(this,`getReturnFocusNode`,e=>{let t=this.getNodeForOption(`setReturnFocus`,{params:[e]});return t||t!==!1&&e}),eu(this,`getOption`,(e,t,n)=>e&&e[t]!==void 0?e[t]:this.config[n||t]),eu(this,`getNodeForOption`,(e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if(typeof r==`function`&&(r=r(...n)),r===!0&&(r=void 0),!r){if(r===void 0||r===!1)return r;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let i=r;if(typeof r==`string`){try{i=this.doc.querySelector(r)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!i&&!t)throw Error(`\`${e}\` as selector refers to no known node`)}return i}),eu(this,`findNextNavNode`,e=>{let{event:t,isBackward:n=!1}=e,r=e.target||Zn(t);this.updateTabbableNodes();let i=null;if(this.state.tabbableGroups.length>0){let e=this.findContainerIndex(r,t),a=e>=0?this.state.containerGroups[e]:void 0;if(e<0)i=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex(({firstTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||Vr(r)&&!Ur(r)&&!a?.nextTabbableNode(r,!1))&&(n=e),n>=0){let e=n===0?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];i=Gr(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else au(t)||(i=a?.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex(({lastTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||Vr(r)&&!Ur(r)&&!a?.nextTabbableNode(r))&&(n=e),n>=0){let e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];i=Gr(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else au(t)||(i=a?.nextTabbableNode(r))}}else i=this.getNodeForOption(`fallbackFocus`);return i}),this.trapStack=t.trapStack||nu;let n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:ou,isKeyBackward:su,...t};this.doc=n.document||rn(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}findContainerIndex(e,t){let n=typeof t?.composedPath==`function`?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:i})=>r.contains(e)||n?.includes(r)||i.find(t=>t===e)||this.isControlledElement(r,e)||this.isPersistentElement(e,t))}isControlledElement(e,t){return this.config.followControlledElements?Un(e,t):!1}isPersistentElement(e,t){let n=this.config.persistentElements;if(!n||n.length===0)return!1;let r=typeof t?.composedPath==`function`?t.composedPath():void 0;return n.some(t=>{let n=t();return nn(n,e)||n!=null&&r?.includes(n)})}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=Hr(e,{getShadowRoot:this.config.getShadowRoot}),n=Br(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],i=t[t.length-1],a=r,o=i,s=!1;for(let e=0;e<t.length;e++)if(Gr(t[e])>0){s=!0;break}function c(e,r=!0){let i=t.indexOf(e);if(i>=0)return t[i+(r?1:-1)];let a=n.indexOf(e);if(!(a<0)){if(r){for(let e=a+1;e<n.length;e++)if(Ur(n[e]))return n[e]}else for(let e=a-1;e>=0;e--)if(Ur(n[e]))return n[e]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:a,lastDomTabbableNode:o,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)}attachListeners(){if(this.state.active)return tu.activateTrap(this.trapStack,this),this.listenerCleanups.push(V(this.doc,`focusin`,this.handleFocus,!0),V(this.doc,`mousedown`,this.handlePointerDown,{capture:!0,passive:!1}),V(this.doc,`touchstart`,this.handlePointerDown,{capture:!0,passive:!1}),V(this.doc,`click`,this.handleClick,{capture:!0,passive:!1}),V(this.doc,`keydown`,this.handleTabKey,{capture:!0,passive:!1}),V(this.doc,`keydown`,this.handleEscapeKey)),this}commitInitialFocus(){return this.state.delayInitialFocusTimer=this.config.delayInitialFocus?uu(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this}addListeners(){if(this.state.active)return this.attachListeners(),this.commitInitialFocus(),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}containsElement(e){return this.state.containers.some(t=>nn(t,e))}isSafeToOverrideFocus(){let e=sn(this.doc);return!e||e===this.doc.body||this.containsElement(e)?!0:this.trapStack.some(t=>t!==this&&t.containsElement(e))}activate(e){if(this.state.active)return this;let t=this.getOption(e,`onActivate`),n=this.getOption(e,`onPostActivate`),r=this.getOption(e,`checkCanFocusTrap`);r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=sn(this.doc),t?.();let i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},iu=e=>e?.type===`keydown`,au=e=>iu(e)&&e?.key===`Tab`,ou=e=>iu(e)&&e.key===`Tab`&&!e?.shiftKey,su=e=>iu(e)&&e.key===`Tab`&&e?.shiftKey,cu=(e,...t)=>typeof e==`function`?e(...t):e,lu=e=>!e.isComposing&&e.key===`Escape`,uu=e=>setTimeout(e,0),du=e=>e.localName===`input`&&`select`in e&&typeof e.select==`function`;function fu(e,t={}){let n,r=H(()=>{let r=(Array.isArray(e)?e:[e]).map(e=>typeof e==`function`?e():e).filter(e=>e!=null);if(r.length===0)return;let i=r[0];n=new ru(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:rn(i)});try{n.activate()}catch{}});return function(){n?.deactivate(),r()}}var pu=`data-scroll-lock`,mu=new WeakMap;function hu(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?`paddingLeft`:`paddingRight`}function gu(e){let t=fn(e)?.scrollbarGutter;return t===`stable`||t?.startsWith(`stable `)===!0}function _u(e){let{documentElement:t,body:n}=e;return gi(t)?t:n}function vu(e){let t=e.defaultView??window,{documentElement:n,body:r}=e,i=_u(e),a=gu(n)||gu(r),o=t.innerWidth-n.clientWidth;r.setAttribute(pu,``);let s=()=>ra(n,`--scrollbar-width`,`${o}px`),c=hu(n),l=[s(),An()?(()=>{let{scrollX:e,scrollY:n,visualViewport:i}=t,s=i?.offsetLeft??0,l=i?.offsetTop??0,u={position:`fixed`,overflow:`hidden`,top:`${-(n-Math.floor(l))}px`,left:`${-(e-Math.floor(s))}px`,right:`0`};!a&&o>0&&(u[c]=`${o}px`);let d=na(r,u);return()=>{d?.(),t.scrollTo({left:e,top:n,behavior:`instant`})}})():(()=>{let e={overflow:`hidden`};return!a&&o>0&&(e[c]=`${o}px`),na(i,e)})()];return()=>{l.forEach(e=>e?.()),r.removeAttribute(pu)}}function yu(e){let t=e??document,n=mu.get(t);n||(n={count:0,cleanup:vu(t)},mu.set(t,n)),n.count++;let r=n,i=!1;return()=>{i||(i=!0,r.count--,r.count===0&&(r.cleanup(),mu.delete(t)))}}var bu=Tt({props({props:e}){return{closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0,restoreFocus:!0,...e,positioning:{placement:`bottom`,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:Zc(n,e)})}}))}},computed:{currentPortalled:({prop:e})=>!!e(`modal`)||!!e(`portalled`)},watch({track:e,prop:t,action:n}){e([()=>t(`open`)],()=>{n([`toggleVisibility`])})},entry:[`checkRenderedElements`],on:{"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`,`reposition`]}},states:{closed:{on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setInitialFocus`]},TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`,`setInitialFocus`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`,`setInitialFocus`]}]}},open:{effects:[`trackRenderedElements`,`trapFocus`,`preventScroll`,`hideContentBelow`,`trackDismissableElement`,`trackPositioning`,`proxyTabFocus`],on:{"CONTROLLED.CLOSE":{target:`closed`,actions:[`setFinalFocus`]},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`,`setFinalFocus`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackRenderedElements({context:e,scope:t}){return Ri({getContainerEl:()=>Qc(t),getRootNode:()=>t.getRootNode(),parts:{title:()=>el(t),description:()=>tl(t)},onChange:t=>e.set(`renderedElements`,t)})},trackPositioning({context:e,prop:t,scope:n}){e.set(`currentPlacement`,t(`positioning`).placement);let r=Jc(n);return Lc(()=>r??Zc(n,e.get(`triggerValue`)),()=>$c(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},trackDismissableElement({send:e,prop:t,scope:n}){let r=()=>Qc(n),i=!0;return Yl(r,{type:`popover`,pointerBlocking:t(`modal`),exclude:[Yc(n),...Xc(n)].filter(Boolean),defer:!0,getRootNode:n.getRootNode,layerStyleTargets:[()=>$c(n)],onEscapeKeyDown(e){t(`onEscapeKeyDown`)?.(e),t(`closeOnEscape`)||e.preventDefault()},onInteractOutside(e){t(`onInteractOutside`)?.(e),e.defaultPrevented||(i=!(e.detail.focusable||e.detail.contextmenu),t(`closeOnInteractOutside`)||e.preventDefault())},onPointerDownOutside:t(`onPointerDownOutside`),onFocusOutside:t(`onFocusOutside`),persistentElements:t(`persistentElements`),onRequestDismiss:t(`onRequestDismiss`),onDismiss(t){e({type:`CLOSE`,src:`interact-outside`,restoreFocus:i,focusVisible:t?.type===`keydown`})}})},proxyTabFocus({prop:e,scope:t,context:n}){return e(`modal`)||!e(`portalled`)?void 0:ki(()=>Qc(t),{triggerElement:Zc(t,n.get(`triggerValue`)),defer:!0,getShadowRoot:!0,onFocus(e){e.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t,context:n}){return e(`modal`)?bl(()=>[Qc(t),Zc(t,n.get(`triggerValue`))],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e(`modal`))return yu(t.getDoc())},trapFocus({prop:e,scope:t,context:n}){return e(`modal`)?fu(()=>Qc(t),{preventScroll:!0,returnFocusOnDeactivate:!!e(`restoreFocus`),initialFocus:()=>Kr({root:Qc(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)}),setReturnFocus:r=>{let i=e(`finalFocusEl`)?.();if(i)return i;let a=n.get(`triggerValue`);if(a){let e=Zc(t,a);if(e)return e}return Xc(t)[0]||r},getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){let i=Jc(n);Lc(()=>i??Zc(n,r.get(`triggerValue`)),()=>$c(n),{...t(`positioning`),...e.options,defer:!0,listeners:!1,onComplete(e){r.set(`currentPlacement`,e.placement)}})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},checkRenderedElements({context:e,scope:t}){H(()=>{e.set(`renderedElements`,{title:!!el(t),description:!!tl(t)})})},setInitialFocus({prop:e,scope:t}){e(`modal`)||H(()=>{let n=Kr({root:Qc(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)});n&&n.focus({preventScroll:!0})})},setFinalFocus({event:e,prop:t,scope:n,context:r}){let i=e.restoreFocus??e.previousEvent?.restoreFocus;if(i!=null&&!i||!t(`restoreFocus`))return;let a=xu(e);H(()=>{let e=t(`finalFocusEl`)?.();e?e.focus(a):Zc(n,r.get(`triggerValue`))?.focus(a)})},invokeOnOpen({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})}}}});function xu(e){return e.focusVisible??e.previousEvent?.focusVisible?{preventScroll:!0,focusVisible:!0}:{preventScroll:!0}}var Su=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro(),{dir:r}=ao();return rl(Oa(bu,{id:t,dir:r,getRootNode:n,...e}),Na)},Cu=e=>{let[t,{children:n,...r}]=to(e),i=Su(r),a=eo(z({present:i.open},t));return(0,G.jsx)(ba,{value:i,children:(0,G.jsx)(Va,{value:a,children:n})})},wu=e=>{let[t,{value:n,children:r}]=to(e),i=eo(z({present:n.open},t));return(0,G.jsx)(ba,{value:n,children:(0,G.jsx)(Va,{value:i,children:r})})},Tu=(0,s.forwardRef)((e,t)=>{let n=z(xa().getTitleProps(),e);return(0,G.jsx)(U.h2,{...n,ref:t})});Tu.displayName=`PopoverTitle`;var Eu=K(),Du=(0,s.forwardRef)((e,t)=>{let[n,r]=Eu(e,[`value`]),i=xa(),a=Ha(),o=i.getTriggerProps(n),s=z({...o,"aria-controls":a.unmounted?void 0:o[`aria-controls`]},r);return(0,G.jsx)(U.button,{...s,ref:t})});Du.displayName=`PopoverTrigger`;var Ou=Object.defineProperty,ku=(e,t)=>{let n={};for(var r in e)Ou(n,r,{get:e[r],enumerable:!0});return t||Ou(n,Symbol.toStringTag,{value:`Module`}),n},Au=e=>{let{children:t,disabled:n}=e,[r,i]=(0,s.useState)(e.container?.current),a=(0,s.useSyncExternalStore)(Mu,()=>!1,()=>!0),{getRootNode:c}=ro();if((0,s.useEffect)(()=>{i(()=>e.container?.current)},[e.container]),a||n)return(0,G.jsx)(G.Fragment,{children:t});let l=r??ju(c);return(0,G.jsx)(G.Fragment,{children:s.Children.map(t,e=>(0,o.createPortal)(e,l))})},ju=e=>{let t=e?.(),n=t.getRootNode();return Yt(n)?n:rn(t).body},Mu=()=>()=>{},Nu=`CapsLock.ContextMenu.Convert.KanaMode.NonConvert.Help.Insert.NumLock.Fn.FnLock.PrintScreen.ScrollLock.Pause.BrowserBack.BrowserFavorites.BrowserForward.BrowserHome.BrowserRefresh.BrowserSearch.BrowserStop.Eject.LaunchMail.MediaPlayPause.MediaStop.MediaTrackNext.MediaTrackPrevious.Power.AudioVolumeDown.AudioVolumeMute.AudioVolumeUp.WakeUp.Hyper.Super.Again.Copy.Cut.Find.Open.Paste.Props.Select.Undo.Hiragana.Katakana`.split(`.`),Pu=[`Clear`,`Cancel`,`Standby`,`LaunchApplication1`,`LaunchApplication2`,`LaunchMediaPlayer`,`HangulMode`,`HanjaMode`,`Zenkaku`,`Hankaku`,`ZenkakuHankaku`],Fu=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`],Iu=[`Enter`,`Escape`,`Space`,`Tab`,`Backspace`,`Delete`],Lu=[`Control`,`Alt`,`Shift`,`Meta`],Ru=new Set(Lu),zu={Control:`Control`,Ctrl:`Control`,control:`Control`,ctrl:`Control`,Shift:`Shift`,shift:`Shift`,Alt:`Alt`,Option:`Alt`,alt:`Alt`,option:`Alt`,Command:`Meta`,Cmd:`Meta`,Meta:`Meta`,command:`Meta`,cmd:`Meta`,meta:`Meta`,OS:`Meta`,os:`Meta`,Win:`Meta`,win:`Meta`,CommandOrControl:`Mod`,Mod:`Mod`,commandorcontrol:`Mod`,mod:`Mod`},Bu=new Set(`ABCDEFGHIJKLMNOPQRSTUVWXYZ`),Vu=new Set(`0123456789`),Hu=new Set(Array.from({length:24},(e,t)=>`F${t+1}`)),Uu=new Set(Fu),Wu=new Set(Iu),Gu=new Set(`/[]\\=-,.;\`'+?!@#$%^&*()_{}|:"<>~`),Ku={Backquote:"`",Backslash:`\\`,BracketLeft:`[`,BracketRight:`]`,Comma:`,`,Equal:`=`,Minus:`-`,Period:`.`,Quote:`'`,Semicolon:`;`,Slash:`/`};function qu(...e){return new Set(e.flatMap(e=>[...e]))}var Ju=qu(Bu,Vu,Hu,Uu,Wu,Gu,Nu,Pu);function Yu(e){return/^\p{Letter}$/u.test(e)}function Xu(e){if(!e)return``;if(Yu(e)){let t=e.toUpperCase();return t.length===1?t:e}return e===` `?`Space`:e}var Zu={Control:`⌃`,Alt:`⌥`,Shift:`⇧`,Meta:`⌘`,Mod:`⌘`},Qu={Control:`Control`,Alt:`Option`,Shift:`Shift`,Meta:`Cmd`,Mod:`Cmd`},$u={Control:`Ctrl`,Alt:`Alt`,Shift:`Shift`,Meta:`Win`,Mod:`Ctrl`},ed={...$u,Meta:`Super`},td={"`":`Backquote`,"\\":`Backslash`,"[":`Left Bracket`,"]":`Right Bracket`,",":`Comma`,"=":`Equal`,"-":`Minus`,".":`Period`,";":`Semicolon`},nd={ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`,Enter:`↵`,Escape:`Esc`,Backspace:`⌫`,Delete:`⌦`,Tab:`⇥`,Space:`␣`},rd=/^(?:Node\.js\/|Deno\/|Bun\/|Cloudflare-Workers)/;function id(){return typeof navigator>`u`||rd.test(String(navigator.userAgent))}function ad(e){let t=``,n=e;if(n==null){if(id())return`linux`;t=navigator.platform?.toLowerCase()??``,n=navigator.userAgent??``}return n=n.toLowerCase(),t.includes(`mac`)||n.includes(`mac`)?`mac`:t.includes(`win`)||n.includes(`win`)?`windows`:`linux`}function od(e,t=ad()){return e===`Mod`?t===`mac`?`Meta`:`Control`:e}function sd(e,t){let n=!1;try{n=t!==`mac`&&typeof e.getModifierState==`function`&&e.getModifierState(`AltGraph`)}catch{}let r=(e.key||``).normalize(`NFC`),i=Xu(r),a=t===`windows`&&n&&!ld({key:i,altGraph:n});return{key:i,code:e.code||``,ctrl:a||!!e.ctrlKey,shift:!!e.shiftKey,alt:a||!!e.altKey,meta:!!e.metaKey,altGraph:n&&!a,location:e.location,isComposing:!!e.isComposing||e.keyCode===229||r===`Process`||r===`Unidentified`}}function cd(e){if(/^Key[A-Z]$/i.test(e))return e.slice(3).toUpperCase();if(/^Digit[0-9]$/i.test(e))return e.slice(5);if(/^Numpad[0-9]$/i.test(e))return e.slice(6);if(Object.hasOwn(Ku,e))return Ku[e];let t={NumpadAdd:`+`,NumpadSubtract:`-`,NumpadMultiply:`*`,NumpadDivide:`/`,NumpadDecimal:`.`,NumpadEnter:`Enter`,Space:`Space`};return Object.hasOwn(t,e)?t[e]:void 0}function ld(e){return e.altGraph?e.key===`Dead`||ud(e.key)&&!/^[A-Za-z0-9]$/.test(e.key):!1}function ud(e){return e!==``&&Array.from(e).length===1}function dd(e){let t=e.toLowerCase();return Object.hasOwn(zu,t)?zu[t]:void 0}function fd(e){return/^[A-Za-z][A-Za-z0-9]*$/.test(e)}function pd(e){return e.startsWith(`[`)&&e.endsWith(`]`)&&fd(e.slice(1,-1))?e.slice(1,-1):void 0}function md(e){if(!e.endsWith(`+`))return e.split(`+`);let t=e.slice(0,-1).split(`+`);return t.at(-1)===``&&t.pop(),t.push(`+`),t}function hd(e){return/^[A-Za-z]$/.test(e)}function gd(e){return/^\p{Script_Extensions=Latin}$/u.test(e)}var _d;function vd(e,t){return e===t?!0:/^\p{Letter}$/u.test(e)&&/^\p{Letter}$/u.test(t)?(_d??=new Intl.Collator(void 0,{sensitivity:`accent`}),_d.compare(e,t)===0):!1}function yd(e){if(/^\[.*\]$/s.test(e.trim()))throw Error(`Logical key must not contain a bracketed physical code. Use the code field instead.`)}function bd(e){return/^(?:.|F(?:[1-9]|1\d|2[0-4])|[A-Z][a-z][A-Za-z\d]*)$/su.test(e)}function xd(e,t,n,r,i){let a={Control:t,Alt:r,Shift:n,Meta:i};return{...e,ctrl:t,shift:n,alt:r,meta:i,modifiers:Lu.filter(e=>a[e])}}function Sd(e){return Array.isArray(e)}function Cd(e){return Sd(e)&&e.length===1?e[0]:e}function wd(e,t){let n=md(e),r=new Set,i=``;for(let e=0;e<n.length;e++){let a=n[e].trim();if(e===n.length-1)i=Xu(a);else{let e=dd(a);if(e){let n=od(e,t);r.add(n)}else n.length===1&&(i=Xu(a))}}!i&&n.length>0&&(i=Xu(n[n.length-1].trim()));let a=pd(i);return xd(a===void 0?{key:i}:{code:a},r.has(`Control`),r.has(`Shift`),r.has(`Alt`),r.has(`Meta`))}function Td(e,t){e.code===void 0&&yd(e.key);let n=e.ctrl??!1,r=e.shift??!1,i=e.alt??!1,a=e.meta??!1;return e.mod&&(od(`Mod`,t)===`Control`?n=!0:a=!0),xd(e.code===void 0?{key:Xu(e.key)}:{code:e.code},n,r,i,a)}function Ed(e,t){return typeof e==`string`?wd(e,t):Td(e,t)}function Dd(e,t){e.code===void 0&&yd(e.key);let n=t===`mac`?e.meta&&!e.ctrl:e.ctrl&&!e.meta,r=[];if(n)r.push(`Mod`),e.alt&&r.push(`Alt`),e.shift&&r.push(`Shift`);else for(let t of Lu)e.modifiers.includes(t)&&r.push(t);return r.push(e.code===void 0?Xu(e.key):`[${e.code}]`),r.join(`+`)}function Od(e,t=ad()){return Array.isArray(e)?e.map(e=>Ed(e,t)):Ed(e,t)}function kd(e,t=ad()){if(Array.isArray(e)){let n=e.map(e=>Dd(Ed(e,t),t));return n.length===1?n[0]:n}return Dd(Ed(e,t),t)}function Ad(e){return dd(e)!==void 0}function jd(e,t){let n=sd(e,t),r=!n.altGraph&&n.ctrl,i=!n.altGraph&&n.alt,a=n.shift;return xd({key:n.key},r,a,i,n.meta)}function Md(e,t=ad()){let n=typeof e==`string`?wd(e,t):e;return n.code===void 0?!Ad(n.key)&&n.key.length>0:n.code.length>0&&!/^(Control|Shift|Alt|Meta)(Left|Right)$/.test(n.code)}function Nd(e){return Array.isArray(e)?e.map(e=>Pd(e)):Pd(e)}function Pd(e){e.code===void 0&&yd(e.key);let t=[];for(let n of Lu)e.modifiers.includes(n)&&t.push(n);return t.push(e.code===void 0?e.key:`[${e.code}]`),t.join(`+`)}function Fd(e,t={}){if(Array.isArray(e)){let n=e.map(e=>zd(e,t));return t.parts?n:n.map(e=>e.join(Rd(t))).join(t.sequenceSeparator??` `)}let n=zd(e,t);return t.parts?n:n.join(Rd(t))}function Id(){return ad()}function Ld(e){let t=e.useSymbols??!0;return typeof t==`boolean`?t:t.modifiers??!0}function Rd(e){let t=e.platform??Id();return e.separatorToken??(t===`mac`&&Ld(e)?` `:`+`)}function zd(e,t){let n=t.platform??Id(),r=t.useSymbols??!0,i=Ld(t),a=typeof r==`boolean`?r:r.keys??!0,o=md(kd(e,n));if(n===`mac`){let e=e=>{let t=Lu.indexOf(e===`Mod`?`Meta`:e);return t===-1?Lu.length:t};o.sort((t,n)=>e(t)-e(n))}return o.map(e=>Vd(e,n,i,a,t))}function Bd(e,t){return e&&Object.hasOwn(e,t)?e[t]:void 0}function Vd(e,t,n,r,i){let a=dd(e);if(a)return t===`mac`?n?Zu[a]:Qu[a]:t===`windows`?$u[a]:ed[a];let o=pd(e),s=Bd(i.keyLabels,o??e);if(s!==void 0)return s;let c=o?.startsWith(`Numpad`)??!1,l=o??e,u=o?i.layoutMap?.get(o):void 0;u?l=Xu(u):o&&(l=c?o.slice(6):cd(o)??o);let d=Bd(r?nd:td,l)??l;return c?`Numpad ${d.replace(/([a-z])([A-Z])/g,`$1 $2`)}`:d}function Hd(e){if(typeof e!=`string`){if(e.length===0)return{valid:!1,warnings:[],errors:[`Sequence cannot be empty`]};if(e.length===1)return Ud(e[0]);let t=e.map(Ud),n=e=>t.flatMap((t,n)=>t[e].map(e=>`Step ${n+1}: ${e}`));return{valid:t.every(e=>e.valid),warnings:n(`warnings`),errors:n(`errors`)}}return Ud(e)}function Ud(e){let t=[],n=[];if(!e||e.trim()===``)return{valid:!1,warnings:[],errors:[`Hotkey cannot be empty`]};let r=md(e).map(e=>e.trim());if(r.length===0||r.some(e=>e===``))return{valid:!1,warnings:[],errors:[`Invalid hotkey format: empty parts detected`]};let i=r.slice(0,-1),a=r[r.length-1];for(let e of i)dd(e)||n.push(`Unknown modifier: '${e}'`);return a.length>1&&(a.startsWith(`[`)||a.endsWith(`]`))&&pd(a)===void 0&&n.push(`Invalid physical key: use a bracketed KeyboardEvent.code, such as [KeyS]`),pd(a)===void 0&&!bd(a)&&t.push(`Unknown key: '${a}'. Key names are case-sensitive, such as 'Escape' and 'F1'.`),{valid:n.length===0,warnings:t,errors:n}}function Wd(e){let t=Hd(e);if(!t.valid)throw Error(`Invalid hotkey '${String(e)}': ${t.errors.join(`, `)}`)}function Gd(e){return Hd(e).valid}function Kd(e,t,n=ad()){let r=typeof t==`string`?Od(t,n):t,i=sd(e,n),a={matched:!1,score:0};if(i.isComposing||i.altGraph&&(r.ctrl||r.alt)||i.altGraph&&!ld(i))return a;if(r.code!==void 0)return i.altGraph||!Jd(i,r,!1)?a:i.code===r.code?l(`code`,3):a;let o=vd(i.key,r.key),s=o&&ud(i.key)&&!/^\p{Letter}$/u.test(i.key)&&!r.shift;if(o&&Jd(i,r,s))return l(`key`,s?2:3);if(!qd(i)||i.altGraph||!Jd(i,r,!1))return a;let c=cd(i.code);return c!==void 0&&vd(c,r.key)?l(`fallback`,1):a;function l(e,t){return{matched:!0,score:t,source:e,identity:{key:i.key,code:i.code}}}}function qd({key:e,code:t,ctrl:n,meta:r,shift:i,alt:a}){return e!==`Dead`&&!ud(e)?!1:t.startsWith(`Digit`)?!0:hd(e)?!1:/^[!-~]$/.test(e)?i:!gd(e)||a?!0:(n||r)&&!t.startsWith(`Key`)}function Jd(e,t,n){let r=!e.altGraph&&e.ctrl,i=!e.altGraph&&e.alt;return r!==t.ctrl||i!==t.alt||e.meta!==t.meta?!1:e.shift===t.shift||n&&e.shift}function Yd(e,t){return e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift&&e.meta===t.meta&&(e.code!==void 0||t.code!==void 0?e.code===t.code:vd(e.key,t.key))}var Xd=`global`,Zd={capture:!1,preventDefault:!0,stopPropagation:!0,eventType:`keydown`,enabled:!0,ignoreInputs:`auto`,conflictBehavior:`warn`,scope:Xd};function Qd(...e){let t={};for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];r!==void 0&&(t[e]=r)}return t}function $d(e,t){return{...t,...Qd(e,t)}}function ef(e){return!!(e.code||e.key)}function tf(e){return!(e.ctrl||e.meta||e.key===`Escape`||e.code===`Escape`)}function nf(e,t,n,r){if(n!==`allow`&&n!==`warn`){if(n===`error`)throw Error(`'${t}' is already registered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to allow multiple registrations.`);r(e)}}function rf(e,t){let n=e,r=t,i=Object.keys(n);return i.length===Object.keys(r).length&&i.every(e=>e===`meta`&&n[e]&&r[e]?rf(n[e],r[e]):Object.is(n[e],r[e]))}function af(e,t,n=ad()){let r=typeof t==`string`?Od(t,n):t;return ef(r)?Kd(e,r,n).matched:!1}function of(e,t,n={}){let{preventDefault:r=!0,stopPropagation:i=!0,platform:a}=n,o=a??ad(),s=typeof e==`string`?e:Nd(e),c=typeof e==`string`?Od(e,o):e,l={kind:`chord`,hotkey:s,parsedChord:c};return e=>{af(e,c,o)&&(r&&e.preventDefault(),i&&e.stopPropagation(),t(e,l))}}function sf(e,t={}){let{preventDefault:n=!0,stopPropagation:r=!0,platform:i}=t,a=i??ad(),o=Object.entries(e).filter(e=>!!e[1]).map(([e,t])=>{let n=Od(e,a);return{parsed:n,handler:t,context:{kind:`chord`,hotkey:e,parsedChord:n}}});return e=>{for(let{parsed:t,handler:i,context:s}of o)if(af(e,t,a)){n&&e.preventDefault(),r&&e.stopPropagation(),i(e,s);return}}}function cf(e,t,n=ad()){let r=Sd(e)?e:[e],i=Sd(t)?t:[t];return r.length===i.length&&r.every((e,t)=>Yd(Od(e,n),Od(i[t],n)))}var lf=1e3;function uf(e,t={}){let n=t.platform??ad(),r=t.timeout??1e3,i=Od(e,n),a=0,o=0;return{match(e){if(e.type===`keydown`&&e.repeat||sd(e,n).isComposing||Ad(Xu(e.key)))return!1;let t=Date.now();a>0&&t-o>r&&(a=0);let s=i[a];if(!s)return!1;if(af(e,s,n)){if(o=t,a++,a>=i.length)return a=0,!0}else a>0&&(af(e,i[0],n)?(a=1,o=t):a=0);return!1},reset(){a=0,o=0},getProgress(){return a}}}function df(e,t,n={}){if(!e||t.includes(`AltGraph`))return!1;let r=[...new Set(t.map(Xu).filter(e=>Ru.has(e)))],i=Sd(e)?e[0]:e;if(i===void 0)return!1;let{modifiers:a}=Od(i,n.platform);return r.length>0&&r.every(e=>a.includes(e))&&(!n.exact||r.length===a.length)}function ff(e){return e?.nodeType===1}function pf(e){return`document`in e||e.nodeType===9}function mf(e){return`document`in e?e.document:e.ownerDocument??e}function hf(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function gf(e){return e.assignedSlot??e.parentNode??(e.host||null)}function _f(e){if(pf(e))return!0;for(let t=hf(e.ownerDocument);t;t=gf(t))if(t===e)return!0;return!1}var vf=[`ArrowUp`,`ArrowDown`],yf=[`ArrowLeft`,`ArrowRight`],bf=[`Enter`],xf=[`Space`],Sf=[`Enter`,`Space`],Cf=`typeahead`,wf=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`Enter`,`Space`,Cf],Tf=[`ArrowUp`,`ArrowDown`,`Home`,`End`,`Enter`,`Space`,Cf],Ef=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`,`Enter`,`Space`],Df=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Space`],Of=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`],kf=[`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`],Af=[`ArrowLeft`,`ArrowRight`,`Home`,`End`],jf={button:Sf,submit:Sf,reset:Sf,image:Sf,color:Sf,file:Sf,checkbox:xf,radio:Df,range:Of};function Mf(e){return e.getAttribute(`role`)?.trim().split(/\s+/)[0]}function Nf(e){if(!ff(e))return!1;switch(e.localName){case`input`:{let t=e;return!jf[t.type]&&!t.readOnly}case`textarea`:return!e.readOnly;case`select`:return!0}let t=Mf(e);return t===`textbox`||t===`searchbox`||e.isContentEditable}function Pf(e){return e.localName.includes(`-`)?e.constructor.formAssociated===!0?!e.hasAttribute(`role`):!e.hasAttribute(`tabindex`):!1}function Ff(e){let t=e.getAttribute(`aria-orientation`);switch(Mf(e)){case`button`:case`tab`:case`option`:case`treeitem`:case`menuitem`:case`menuitemcheckbox`:case`menuitemradio`:return Sf;case`link`:return bf;case`checkbox`:case`switch`:case`radio`:return xf;case`menu`:case`menubar`:case`tree`:return wf;case`listbox`:return[...t===`horizontal`?yf:vf,`Home`,`End`,`Enter`,`Space`,Cf];case`combobox`:return Tf;case`tablist`:return[...t===`vertical`?vf:yf,`Home`,`End`,`Enter`,`Space`];case`toolbar`:return[...t===`vertical`?vf:yf,`Home`,`End`];case`grid`:case`treegrid`:return Ef;case`radiogroup`:return Df;case`slider`:return Of;case`spinbutton`:return kf}switch(e.localName){case`button`:case`summary`:return Sf;case`input`:return jf[e.type]??Af;case`textarea`:return Of;case`a`:case`area`:return e.hasAttribute(`href`)?bf:[]}return[]}function If(e,t,n){if(t.ctrlKey||t.metaKey||t.altKey)return!1;let r=Ff(e);return n===`Enter`||n===`Space`?!t.shiftKey&&r.includes(n):r.includes(n)||r.includes(Cf)&&/^.$/u.test(t.key)}function Lf(e,t,n){let r=hf(t),i=[];for(let e=r;e;e=gf(e))ff(e)&&i.push(e);let a=e.composedPath()[0];ff(a)&&!i.includes(a)&&(i=e.composedPath().filter(ff));let o=i.findIndex(e=>n(e)||e===r&&Pf(e));return{elements:i,index:o}}function Rf({elements:e,index:t},n){return t>=0&&(pf(n)||t<e.indexOf(n))}var zf=new WeakMap;function Bf(e,t){let n=zf.get(e);if(!n){let r=Xu(e.key);n=Lf(e,mf(t),t=>Nf(t)||If(t,e,r)),zf.set(e,n)}return Rf(n,t)}function Vf(e,t){return Rf(Lf(e,mf(t),Nf),t)}var Hf=new Set;function Uf(e){for(let t of e)Hf.add(t);for(let e of Hf)Hf.delete(e),e()}function Wf(e){let t=e,n=new Set;return{get state(){return t},get:()=>t,setState(e){let r=e(t);Object.is(t,r)||(t=r,Uf(n))},subscribe(e){let r=()=>{typeof e==`function`?e(t):e.next?.(t)};return n.add(r),{unsubscribe(){n.delete(r),Hf.delete(r)}}}}}var Gf=class{dispatch;#e=new Map;#t=new WeakMap;constructor(e){this.dispatch=e}add(e,t,n){if(typeof document>`u`)return;let r=this.#e.get(e)??new Map,i=r.get(t);if(!i){let n=new Set,a=r=>i=>{let a=i,o=this.#t.get(a),s=!o||o.groups.has(n);(!o||s)&&(o={ids:new Set,groups:new Set},this.#t.set(a,o)),o.groups.add(n);let c=new Set;for(let e of n)o.ids.has(e)||(o.ids.add(e),c.add(e));this.dispatch(a,e,r,t,c,s)};i={ids:n,keydown:a(`keydown`),keyup:a(`keyup`)},e.addEventListener(`keydown`,i.keydown,t),e.addEventListener(`keyup`,i.keyup,t),r.set(t,i),this.#e.set(e,r)}i.ids.add(n)}remove(e,t,n){let r=this.#e.get(e),i=r?.get(t);i&&(i.ids.delete(n),i.ids.size===0&&(e.removeEventListener(`keydown`,i.keydown,t),e.removeEventListener(`keyup`,i.keyup,t),r.delete(t),r.size===0&&this.#e.delete(e)))}destroy(){for(let[e,t]of this.#e)for(let[n,r]of t)e.removeEventListener(`keydown`,r.keydown,n),e.removeEventListener(`keyup`,r.keyup,n);this.#e.clear(),this.#t=new WeakMap}},Kf={current:null},qf=new Set,Jf=new WeakSet,Yf=new Map,Xf=!1,Zf=e=>e.code||`key:${e.key}`;function Qf(e){if(Yf.delete(Zf(e))&&Jf.add(e),Ru.has(Xu(e.key)))for(let[e,t]of Yf)Ru.has(t)||Yf.delete(e);ep()}function $f(){Yf.clear(),ep()}function ep(){Xf&&qf.size===0&&Yf.size===0&&(document.removeEventListener(`keyup`,Qf,!0),window.removeEventListener(`blur`,$f),Xf=!1)}function tp(e){qf.add(e),!Xf&&typeof document<`u`&&(document.addEventListener(`keyup`,Qf,!0),window.addEventListener(`blur`,$f),Xf=!0)}function np(e){qf.delete(e),ep()}function rp(e){Jf.add(e),Yf.set(Zf(e),Xu(e.key))}function ip(e){return qf.size>0||Jf.has(e)||Yf.has(Zf(e))}function ap(e,t){return e.enabled===!1?`disabled`:t?.isScopeActive(e.scope)===!1?`suspended`:`active`}function op(e){let t={id:e.id,status:ap(e.options,Kf.current),target:e.target,triggerCount:e.triggerCount,hasFired:e.hasFired};if(e.kind===`chord`)return{...t,kind:`chord`,hotkey:e.hotkey,parsedChord:e.parsedChord,options:e.options};let n=e.parsedSequence.length,r=e.currentIndex>0&&e.currentIndex<n;return{...t,kind:`sequence`,hotkey:e.hotkey,parsedSequence:e.parsedSequence,options:e.options,matchedStepCount:r?e.currentIndex:0,partialMatchLastKeyTime:r?e.lastKeyTime:0}}var sp=0;function cp(e,t){return typeof e==`string`?e:Nd(t)}function lp(){return`hotkey_${++sp}`}function up(e){let t=e;return{id:lp(),unregister:()=>{},get callback(){return t},set callback(e){t=e},setOptions:()=>{},get isActive(){return!1}}}function dp(e){return{...Zd,...e===`sequence`?{timeout:lf}:{requireReset:!1}}}function fp(e,t){if(e===`chord`){let{timeout:e,...n}=t;return n}let{requireReset:n,...r}=t;return r}function pp(e){return e.kind===`chord`?[e.parsedChord]:e.parsedSequence}function mp(e){let{ignoreInputs:t=`auto`}=e.options;return t===`auto`?tf(pp(e)[0]):t}function hp(e,t){return e.length===t.length&&e.every((e,n)=>Yd(e,t[n]))}function gp(e){return Sd(e)?e.join(` `):e}var _p=class e{registrations=Wf(new Map);appHotkeys=Wf(null);scopes=Wf({active:[],exclusive:null,allowed:[],suspended:[]});#e;#t=new Set;#n=0;#r=[];#i=null;#a=new Gf((...e)=>this.#y(...e));#o=new WeakMap;#s=new Set;#c=new Map;constructor(){this.#e=ad()}static getInstance(){return Kf.current??=new e}static resetInstance(){Kf.current?.destroy(),Kf.current=null}activateScope(e,t={}){if(e===`global`)return()=>{};let{exclusive:n}=t,r=n?n===!0?[]:n.allow:null,i={scope:e,parent:t.parent??`global`,allow:r,order:++this.#n};return this.#t.add(i),this.#u(),()=>{this.#t.delete(i)&&this.#u()}}isScopeActive(e=Xd){return this.#i?this.#i.has(e):e===`global`||this.#r.includes(e)}#l(e=Xd){return this.#r.indexOf(e)+1}#u(){let e=new Map,t=new Map;for(let n of this.#t)e.set(n.scope,n.parent),t.set(n.scope,Math.max(t.get(n.scope)??0,n.order));let n=t=>{let n=0,r=new Set;for(let i=e.get(t);i!==void 0&&!r.has(i);i=e.get(i))r.add(i),n++;return n},r=new Map;for(let[n,i]of t){let a=new Set;for(let o=n;o!==void 0&&!a.has(o);o=e.get(o)){a.add(o);let e=t.get(o);e!==void 0&&r.set(o,Math.min(r.get(o)??e,i))}}let i=(e,i)=>r.get(e)-r.get(i)||n(e)-n(i)||t.get(e)-t.get(i);this.#r=[...t.keys()].sort(i);let a=[...this.#t].filter(e=>e.allow).sort((e,t)=>i(e.scope,t.scope)||e.order-t.order).pop(),o=[Xd,...this.#r],s=[];if(this.#i=null,a?.allow){let{allow:t}=a,n=t=>{let n=new Set;for(let r=t;r!==void 0&&!n.has(r);r=e.get(r)){if(r===a.scope)return!0;n.add(r)}return!1};s=o.filter(e=>!n(e)&&t.includes(e)),this.#i=new Set([...o.filter(n),...s])}let c=this.#i;this.scopes.setState(()=>({active:this.#r,exclusive:a?.scope??null,allowed:s,suspended:c?o.filter(e=>!c.has(e)):[]})),this.#p()}#d(e){return ap(e.options,this)===`active`}#f(e,t){let n=e.composedPath();for(let r of this.registrations.state.values())if(!(!this.#d(r)||r.options.eventType!==t||!n.includes(r.target)||mp(r)&&Bf(e,r.target))&&(r.kind===`chord`?[r.parsedChord]:[r.parsedSequence[r.currentIndex],r.parsedSequence[0]]).some(t=>Kd(e,t,r.options.platform).matched))return!0;return!1}#p(){this.registrations.setState(e=>new Map(e))}register(e,t,n={}){let r=Cd(e);if(r==null||Sd(r)&&r.length===0||typeof document>`u`&&!n.target)return up(t);let i=lp(),a=n.platform??this.#e,o=n.target??document,s=Sd(r),c=s?`sequence`:`chord`,l={id:i,callback:t,options:{...dp(c),...fp(c,Qd(n)),platform:a},target:o,triggerCount:0,hasFired:!1},u;if(s){let e=Od(r,a);u={...l,kind:`sequence`,hotkey:r.map((t,n)=>cp(t,e[n])),parsedSequence:e,currentIndex:0,lastKeyTime:0}}else{let e=Od(r,a);u={...l,kind:`chord`,hotkey:cp(r,e),parsedChord:e}}if(!(u.kind===`sequence`?u.parsedSequence:[u.parsedChord]).every(ef))return up(t);let d=this.#D(u);d&&nf(d.id,gp(u.hotkey),n.conflictBehavior??`warn`,e=>this.#m(e)),this.#a.add(o,!!u.options.capture,i),this.registrations.setState(e=>new Map(e).set(i,u));let f=this;return{get id(){return i},unregister:()=>{f.#m(i)},get callback(){return f.registrations.state.get(i)?.callback??t},set callback(e){let t=f.registrations.state.get(i);t&&(t.callback=e)},setOptions:e=>{f.registrations.setState(t=>{let n=t.get(i);if(!n)return t;let r={...dp(n.kind),platform:n.options.platform},a={...n.options},o=Object.entries(fp(n.kind,e));for(let[e,t]of o)t===void 0?e in r?a[e]=r[e]:delete a[e]:a[e]=t;if(rf(n.options,a))return t;let s=!!n.options.capture;return s!==!!a.capture&&(f.#a.remove(n.target,s,i),f.#a.add(n.target,!!a.capture,i)),new Map(t).set(i,{...n,options:a})})},get isActive(){return f.registrations.state.has(i)}}}#m(e){let t=this.registrations.state.get(e);if(!t)return;let n=t.target;this.registrations.setState(t=>{let n=new Map(t);return n.delete(e),n}),this.#a.remove(n,!!t.options.capture,e),this.#g(e)}#h(e,t){this.#g(e),this.#c.set(e,setTimeout(()=>{this.#c.delete(e);let t=this.registrations.state.get(e);if(t?.kind!==`sequence`||t.currentIndex===0)return;let n=t.options.timeout??1e3,r=t.lastKeyTime+n-Date.now();r>=0?this.#h(e,r+1):(t.currentIndex=0,t.lastKeyTime=0,this.#p())},t))}#g(e){let t=this.#c.get(e);t!==void 0&&(clearTimeout(t),this.#c.delete(e))}#_(e,t,n){let r=[];for(let i of e){let e=this.registrations.state.get(i);e?.kind===n&&!!e.options.capture===t&&r.push(e)}return r}#v(e,t){let n=this.registrations.state.get(e.id);return n&&!!n.options.capture===t?n:void 0}#y(e,t,n,r,i,a){a&&this.#o.set(e,this.#x(e,n)),this.#b(e,t,n,r,this.#_(i,r,`chord`)),this.#C(e,t,n,r,this.#_(i,r,`sequence`))}#b(e,t,n,r,i){if(n===`keyup`)for(let t of i)t.hasFired&&this.#O(t,e)&&(t.hasFired=!1,t.activeMatch=void 0);if(ip(e)||this.#o.get(e))return;let a=new Map,o=0,s=!1;for(let r of i){let i=this.#d(r);if(!i&&r.options.preventDefault!==`always`||r.options.eventType!==n||mp(r)&&Bf(e,t))continue;let c=Kd(e,r.parsedChord,r.options.platform);c.matched&&(i?(a.set(r.id,c),o=Math.max(o,c.score)):s=!0)}s&&a.size===0&&!this.#f(e,n)&&e.preventDefault();let c=-1;for(let e of i)a.get(e.id)?.score===o&&(c=Math.max(c,this.#l(e.options.scope)));for(let t of i){let i=a.get(t.id);if(!i?.matched||i.score!==o||this.#l(t.options.scope)!==c)continue;let s=this.#v(t,r);s&&(this.#w(s,e),n===`keyup`?this.#T(s,e):s.options.requireReset&&s.hasFired&&e.repeat||(s.options.requireReset&&(s.hasFired=!0,s.activeMatch=i.identity),this.#T(s,e)))}}#x(e,t){let n=e.code||Xu(e.key);if(t===`keyup`){let r=this.#s.delete(n);return this.#S(e,t)||r}if(e.repeat)return this.#s.has(n);let r=this.#S(e,t);return r?this.#s.add(n):this.#s.delete(n),r}#S(e,t){if(ip(e)||sd(e).isComposing||Ad(Xu(e.key)))return!1;let n=e.composedPath(),r=Date.now();for(let i of this.registrations.state.values()){if(i.kind!==`sequence`||i.currentIndex===0||!this.#d(i)||i.options.eventType!==t||r-i.lastKeyTime>(i.options.timeout??1e3))continue;let a=i.target;if(n.includes(pf(a)?mf(a):a)&&!(mp(i)&&Bf(e,a))&&Kd(e,i.parsedSequence[i.currentIndex],i.options.platform).matched)return!0}return!1}#C(e,t,n,r,i){if(i.length===0)return;if(ip(e)){let e=!1;for(let t of i)t.currentIndex>0&&(t.currentIndex=0,this.#g(t.id),e=!0);e&&this.#p();return}if(e.type===`keydown`&&e.repeat||sd(e).isComposing||Ad(Xu(e.key)))return;let a=Date.now(),o=!1,s=new Map,c=0;for(let r of i){if(!this.#d(r)||mp(r)&&Bf(e,t)||r.options.eventType!==n)continue;let i=r.options.timeout??1e3;r.currentIndex>0&&a-r.lastKeyTime>i&&(r.currentIndex=0,o=!0);let l=r.parsedSequence[r.currentIndex];if(!l)continue;let u=Kd(e,l,r.options.platform),d=r.currentIndex+1;!u.matched&&r.currentIndex>0&&(u=Kd(e,r.parsedSequence[0],r.options.platform),d=1),s.set(r.id,{score:u.score,nextIndex:d}),c=Math.max(c,u.score)}let l=[];for(let t of i){let n=s.get(t.id);n&&(n.score>0&&n.score===c?(t.lastKeyTime=a,t.currentIndex=n.nextIndex,o=!0,t.currentIndex>=t.parsedSequence.length?(this.#w(t,e),t.currentIndex=0,l.push(t)):t.options.preventDefault&&e.preventDefault()):t.currentIndex>0&&(t.currentIndex=0,o=!0))}for(let e of i)if(s.has(e.id)){if(e.currentIndex>0){let t=e.options.timeout??1e3;this.#h(e.id,t+1)}else this.#g(e.id)}o&&l.length===0&&this.#p();for(let t of l){let n=this.#v(t,r);n&&this.#T(n,e)}}#w(e,t){e.options.preventDefault&&t.preventDefault(),e.options.stopPropagation&&t.stopPropagation()}#T(e,t,n=this.#E(e)){e.triggerCount++,e.kind===`sequence`&&(e.hasFired=!0),this.#p(),e.callback(t,n)}#E(e){return e.kind===`chord`?{kind:`chord`,hotkey:e.hotkey,parsedChord:e.parsedChord}:{kind:`sequence`,hotkey:e.hotkey,parsedSequence:e.parsedSequence}}#D(e){let t=pp(e);for(let n of this.registrations.state.values())if(n.target===e.target&&n.options.scope===e.options.scope&&n.options.eventType===e.options.eventType&&hp(pp(n),t))return n;return null}#O(e,t){let n=e.parsedChord,r=Xu(t.key);return e.activeMatch?.code&&t.code===e.activeMatch.code?!0:(n.code===void 0?vd(r,n.key):t.code===n.code)||n.modifiers.includes(r)}resetSequenceProgress(){for(let e of this.registrations.state.values())e.kind===`sequence`&&(e.currentIndex=0,e.lastKeyTime=0);for(let e of this.#c.values())clearTimeout(e);this.#c.clear(),this.#p()}getRegistrationCount(){return this.registrations.state.size}isRegistered(e,t){for(let n of this.registrations.state.values())if(cf(n.hotkey,e,n.options.platform)&&(t===void 0||n.target===t))return!0;return!1}hasActiveRegistration(e){if(!e)return!1;let t=typeof e==`object`&&`~appHotkey`in e?e.id:void 0;for(let n of this.registrations.state.values())if(this.#d(n)&&_f(n.target)&&(t===void 0?cf(n.hotkey,e,n.options.platform):n.options.appHotkeyId===t))return!0;return!1}destroy(){for(let e of this.#c.values())clearTimeout(e);this.#c.clear(),this.#a.destroy(),this.registrations.setState(()=>new Map),this.appHotkeys.setState(()=>null)}};function vp(){return _p.getInstance()}function yp(e,t){return e===t?!0:mf(e)===mf(t)?!(`contains`in e)||!(`contains`in t)||e.contains(t)||t.contains(e):!1}function bp(e,t={}){let n=Sd(e)?e:[e];if(n.length===0)return[];let r=t.platform??ad(),i=n.map(e=>Od(e,r)),a=t.target??(typeof document>`u`?void 0:document),o=[],s=(e,n)=>!t.includeDisabled&&e.options.enabled===!1||(e.options.eventType??`keydown`)!==(t.eventType??`keydown`)||t.excludeIds?.includes(e.id)||t.exclude?.(e)||t.scope!==`all`&&a&&!yp(a,e.target)?!1:i.slice(0,Math.min(i.length,n.length)).every((i,a)=>{let o=Od(n[a],e.options.platform),s=t.events?.[a];return Yd(i,o)||s!==void 0&&af(s,i,r)&&af(s,o,e.options.platform)}),c=Kf.current?.registrations.state.values()??[];for(let e of c){let t=op(e);s(t,t.kind===`sequence`?t.hotkey:[t.hotkey])&&o.push({registration:t})}return o}var xp;function Sp(e){xp=e}function Cp(e,t){if(!xp)throw Error(`[hotkeys] App hotkeys must come from defineAppHotkeys.`);return xp(e,t)}function wp(e){Sp((e,t)=>new Lp(e,t));let t={};for(let[n,r]of Object.entries(e)){let e=r.hotkey===null?null:Cd(r.hotkey);t[n]={"~appHotkey":!0,id:n,hotkey:e,defaultHotkey:e,meta:r.meta,scope:r.scope,options:r.options}}return t}function Tp(e){return typeof e==`object`&&!!e&&e[`~appHotkey`]===!0}function Ep(e,t,n){return e===null||t===null?e===t:cf(e,t,n)}function Dp(e,t=ad()){return!Ep(e.hotkey,e.defaultHotkey,t)}function Op(e){return e===null?null:(typeof e==`string`||Array.isArray(e)&&e.every(e=>typeof e==`string`))&&Hd(e).valid?Cd(e):void 0}function kp(e,t){let n=t,r={};for(let[t,i]of Object.entries(e)){let e=n[t]===void 0?i.defaultHotkey:n[t];r[t]=e===i.hotkey?i:{...i,hotkey:e}}return r}function Ap(e,t){let n={};if(typeof t!=`object`||!t)return n;for(let[r,i]of Object.entries(t)){if(i===void 0||!Object.hasOwn(e,r))continue;let t=Op(i);t!==void 0&&(n[r]=t)}return n}function jp(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>Object.is(e,t[n]));if(typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.hasOwn(t,n)&&jp(e[n],t[n]))}function Mp(e){if(typeof e!=`object`||!e)return e;let t={};for(let[n,r]of Object.entries(e))t[n]=Array.isArray(r)?[...r]:r;return t}function Np(e,t){return jp(e===void 0?{}:e,t===void 0?{}:t)}function Pp(e,t,n){let r=Object.keys(e);return r.length===Object.keys(t).length&&r.every(r=>Object.hasOwn(t,r)&&Ep(e[r]??null,t[r]??null,n))}function Fp(e,t){let n=e.scope??`global`,r=t.scope??`global`;return n===`global`||r===`global`||n===r}function Ip(e,t,n){let r=Sd(e)?e:[e],i=Sd(t)?t:[t],a=Math.min(r.length,i.length);for(let e=0;e<a;e++)if(!cf(r[e],i[e],n))return!1;return!0}var Lp=class{store;#e;#t;#n;constructor(e,t={}){this.#e=e,this.#t=t,this.#n=Mp(t.customHotkeys);let n=Ap(e,t.customHotkeys);this.store=Wf({appHotkeys:kp(e,n),customHotkeys:n})}get#r(){return this.#t.platform??ad()}get appHotkeys(){return this.store.state.appHotkeys}get customHotkeys(){return this.store.state.customHotkeys}setOptions(e){let{customHotkeys:t,...n}=e;if(this.#t={...this.#t,...n},t===void 0||Np(t,this.#n))return;this.#n=Mp(t);let r=Ap(this.#e,t);Pp(r,this.store.state.customHotkeys,this.#r)||this.store.setState(()=>({appHotkeys:kp(this.#e,r),customHotkeys:r}))}setAppHotkeys(e){if(e===this.#e)return;this.#e=e;let t=Ap(e,this.store.state.customHotkeys);this.store.setState(()=>({appHotkeys:kp(e,t),customHotkeys:t}))}get(e){let{appHotkeys:t}=this.store.state;return Object.hasOwn(t,e)?t[e]:void 0}findConflicts(e,t){let n=this.get(e);if(!n)return[];let r=Cd(t);return Object.values(this.store.state.appHotkeys).filter(t=>t.id!==e&&t.hotkey!==null&&Fp(n,t)&&Ip(r,t.hotkey,this.#r))}setCustomHotkey(e,t){let n=this.get(e);if(!n)return[];let r=t===null?null:Cd(t);if(r!==null){let t=this.findConflicts(e,r);if(t.length>0)return t}let{[e]:i,...a}=this.store.state.customHotkeys;return this.#i(Ep(r,n.defaultHotkey,this.#r)?a:{...a,[e]:r}),[]}resetCustomHotkey(e){let{[e]:t,...n}=this.store.state.customHotkeys;this.#i(n)}resetCustomHotkeys(){this.#i({})}#i(e){this.store.setState(()=>({appHotkeys:kp(this.#e,e),customHotkeys:e})),this.#t.onCustomHotkeysChange?.(e)}getList(e){let t=new Map;for(let n of e){let e=n.options.appHotkeyId;if(e===void 0)continue;let r=t.get(e);r?r.push(n):t.set(e,[n])}return Object.values(this.store.state.appHotkeys).map(e=>{let n=t.get(e.id)??[],r=e=>n.some(t=>t.status===e);return{appHotkey:e,status:e.hotkey===null?`unbound`:n.length===0?`inactive`:r(`active`)?`active`:r(`suspended`)?`suspended`:`disabled`,isCustom:Dp(e,this.#r),registrations:n}})}};function Rp(e,t){return t?.get(e.id)??e}function zp(e){return{...e.options,...e.scope!==void 0&&{scope:e.scope},meta:e.meta,appHotkeyId:e.id}}function Bp(e){let t=vp();return t.appHotkeys.setState(()=>e),()=>{t.appHotkeys.state===e&&t.appHotkeys.setState(()=>null)}}function Vp(e,t={}){let n=new Lp(e,t);return{store:n,dispose:Bp(n)}}function Hp(){return{heldKeys:[],heldCodes:{}}}var Up=class e{static#e=null;store=Wf(Hp());#t=new Map;#n=[];constructor(){this.#r()}static getInstance(){return e.#e||=new e,e.#e}static resetInstance(){e.#e&&=(e.#e.destroy(),null)}#r(){if(typeof document>`u`)return;let e=e=>{let t=this.#i(e),n=Xu(e.key),r=e.code||`key:${n}`;this.#t.has(r)||(this.#t.set(r,{key:n,code:e.code}),t=!0),t&&this.#o()},t=e=>{let t=Xu(e.key),n=e.code||`key:${t}`;if(this.#t.delete(n),!e.code)for(let[e,n]of this.#t)n.key===t&&this.#t.delete(e);this.#i(e),Ru.has(t)&&this.#a(),this.#o()},n=e=>{if(e.defaultPrevented||!e.isTrusted)return;let t=this.#i(e);(this.#a()||t)&&this.#o()},r=e=>{this.#i(e)&&this.#o()},i=()=>{this.#t.size>0&&(this.#t.clear(),this.#o())};this.#n=[[`keydown`,e,!0],[`keyup`,t,!0],[`mousemove`,r,!0],[`mousedown`,r,!0],[`blur`,i,!1],[`contextmenu`,n,!1],[`visibilitychange`,()=>document.hidden&&i(),!1]];for(let[e,t,n]of this.#n)window.addEventListener(e,t,n)}#i(e){if(!e.isTrusted)return!1;let t=!1;for(let[n,r]of this.#t)(r.key===`Control`&&!e.ctrlKey||r.key===`Alt`&&!e.altKey||r.key===`Shift`&&!e.shiftKey||r.key===`Meta`&&!e.metaKey)&&(this.#t.delete(n),t=!0);return t}#a(){let e=!1;for(let[t,n]of this.#t)Ru.has(n.key)||(this.#t.delete(t),e=!0);return e}#o(){let e=Array.from(new Set(Array.from(this.#t.values(),e=>e.key))),t=Object.fromEntries(Array.from(this.#t.values(),e=>[e.key,e.code]));this.store.setState(()=>({heldKeys:e,heldCodes:t}))}#s(){for(let[e,t,n]of this.#n)window.removeEventListener(e,t,n);this.#n=[]}getHeldKeys(){return this.store.state.heldKeys}isKeyHeld(e){let t=Xu(e);return Array.from(this.#t.values()).some(e=>e.key===t)}isAnyKeyHeld(e){return e.some(e=>this.isKeyHeld(e))}areAllKeysHeld(e){return e.every(e=>this.isKeyHeld(e))}destroy(){this.#s(),this.#t.clear(),this.store.setState(()=>Hp())}};function Wp(){return Up.getInstance()}function Gp(e,t,n=`code`){let r=sd(e,t);if(r.isComposing||Ad(Xu(e.key))||e.key===`AltGraph`||n===`code`&&(!qp(e)||r.altGraph))return null;let i=jd(e,t);if(n===`code`){let{key:n,code:r,...a}=i;return kd({...a,code:e.code},t)}return i.key?kd(i,t):null}function Kp(e,t){if(t.recordBy!==`key`){if(sd(e,t.platform).altGraph)return{reason:`alt-graph`,message:`AltGraph character entry cannot be recorded as a physical shortcut. Use key mode for characters.`};if(!qp(e))return{reason:`missing-code`,message:`This event has no usable physical key code.`}}}function qp(e){return fd(e.code)&&e.code!==`Unidentified`}var Jp={isRecording:!1,steps:[],recordedHotkey:null},Yp=class{store=Wf(Jp);#e=null;#t;#n={};#r;#i=[];#a=null;get#o(){return{...typeof this.#t==`function`?this.#t():this.#t,...this.#n}}get#s(){return Math.max(1,this.#o.maxSteps??1)}constructor(e){this.#t=e,this.#r=ad()}setOptions(e){this.#n={...this.#n,...e}}#c(){this.#a!==null&&(clearTimeout(this.#a),this.#a=null)}#l(){this.#c();let e=this.#s>1?this.#o.idleTimeoutMs:void 0;e===void 0||e<=0||this.store.state.steps.length===0||(this.#a=setTimeout(()=>{this.#a=null,this.#e&&this.store.state.steps.length>=1&&this.commit()},e))}start(){if(this.#e||typeof document>`u`)return;this.#c(),this.#i=[],tp(this),this.store.setState(()=>({...Jp,isRecording:!0}));let e=e=>{if(!this.#e||this.#o.ignoreInputs!==!1&&e.key!==`Escape`&&Vf(e,document))return;let t=this.#o.platform??this.#r,n=sd(e,t);if(n.isComposing||(rp(e),e.preventDefault(),e.stopPropagation(),e.repeat))return;if(e.key===`Escape`){this.cancel();return}let r=!n.ctrl&&!n.shift&&!n.alt&&!n.meta&&!n.altGraph,i=this.#s>1;if((e.key===`Backspace`||e.key===`Delete`)&&r){if(this.store.state.steps.length===0){this.stop(),this.#o.onClear?.();return}this.#i.pop(),this.store.setState(e=>({...e,steps:e.steps.slice(0,-1)})),this.store.state.steps.length===0?this.#c():this.#l();return}let a=this.#o;if(i&&a.commitKeys!==`none`&&e.key===`Enter`&&r){this.store.state.steps.length>=1&&this.commit();return}if(Ad(e.key)||e.key===`AltGraph`)return;let o=Kp(e,{...a,platform:t});if(o){a.onReject?.(o);return}let s=Gp(e,t,a.recordBy);s!==null&&(md(s).some(e=>!e.trim())?a.onReject?.({reason:`invalid`,message:`Whitespace keys cannot be recorded`,hotkey:s}):(this.#i.push(e),this.store.setState(e=>({...e,steps:[...e.steps,s]})),this.store.state.steps.length>=this.#s?this.commit():this.#l()))};this.#e=e,this.#d(e)}commit(){let e=this.store.state.steps;if(e.length<1)return;let t=this.#o,n=t.platform??this.#r,r=Cd(e),i=this.#s===1;this.#c();let a=e=>{i&&(this.#i=[],this.store.setState(e=>({...e,steps:[]}))),t.onReject?.(e)},o=Od(e,n),s=e.length===1?{kind:`chord`,event:this.#i[this.#i.length-1],parsedChord:o[0]}:{kind:`sequence`,events:[...this.#i],parsedSequence:o},c=t.validate?.(r,s);if(c!==void 0&&c!==!0)a({reason:`validation`,message:typeof c==`string`?c:`This ${i?`shortcut`:`sequence`} is not allowed.`,hotkey:r});else{if(t.detectConflicts){let e=bp(r,{...typeof t.detectConflicts==`object`?t.detectConflicts:{},platform:n,events:this.#i});if(e.length){a({reason:`conflict`,message:`This ${i?`shortcut`:`sequence`} conflicts with a registered hotkey.`,hotkey:r,conflicts:e});return}}this.#u(r),t.onRecord(r)}}#u(e){np(this),this.#i=[],this.#c(),this.#e&&=(this.#f(this.#e),null),this.store.setState(()=>({...Jp,recordedHotkey:e}))}stop(){this.#u(null)}cancel(){this.#u(null),this.#o.onCancel?.()}#d(e){typeof document<`u`&&document.addEventListener(`keydown`,e,!0)}#f(e){typeof document<`u`&&document.removeEventListener(`keydown`,e,!0)}destroy(){this.#u(null)}},Xp=r({ALL_KEYS:()=>Ju,AppHotkeysStore:()=>Lp,DEFAULT_SEQUENCE_TIMEOUT:()=>lf,EDITING_KEYS:()=>Wu,FUNCTION_KEYS:()=>Hu,HotkeyManager:()=>_p,HotkeyRecorder:()=>Yp,KEY_DISPLAY_SYMBOLS:()=>nd,KeyStateTracker:()=>Up,LETTER_KEYS:()=>Bu,LINUX_MODIFIER_LABELS:()=>ed,MAC_MODIFIER_LABELS:()=>Qu,MAC_MODIFIER_SYMBOLS:()=>Zu,MODIFIER_ALIASES:()=>zu,MODIFIER_KEYS:()=>Ru,MODIFIER_ORDER:()=>Lu,NAVIGATION_KEYS:()=>Uu,NUMBER_KEYS:()=>Vu,PUNCTUATION_CODE_MAP:()=>Ku,PUNCTUATION_KEYS:()=>Gu,PUNCTUATION_KEY_DISPLAY_LABELS:()=>td,WINDOWS_MODIFIER_LABELS:()=>$u,areHotkeysEqual:()=>cf,assertValidHotkey:()=>Wd,checkHotkey:()=>Gd,createAppHotkeysStore:()=>Cp,createHotkeyChordHandler:()=>of,createMultiHotkeyChordHandler:()=>sf,createSequenceMatcher:()=>uf,defineAppHotkeys:()=>wp,detectPlatform:()=>ad,findHotkeyConflicts:()=>bp,formatForDisplay:()=>Fd,formatHotkey:()=>Nd,getAppHotkeyRegistrationOptions:()=>zp,getHotkeyManager:()=>vp,getKeyStateTracker:()=>Wp,hasNonModifierKey:()=>Md,isAppHotkey:()=>Tp,isCustomHotkey:()=>Dp,isHotkeySequence:()=>Sd,isModifierKey:()=>Ad,isSingleLetterKey:()=>Yu,matchesHeldModifiers:()=>df,matchesKeyboardEvent:()=>af,normalizeHotkey:()=>kd,normalizeKeyName:()=>Xu,parseHotkey:()=>Od,parseKeyboardEvent:()=>jd,provideAppHotkeys:()=>Vp,publishAppHotkeysStore:()=>Bp,resolveAppHotkey:()=>Rp,resolveModifier:()=>od,simplifyHotkey:()=>Cd,toHotkeyRegistrationView:()=>op,validateHotkey:()=>Hd}),Zp=Object.defineProperty,Qp=(e,t,n)=>t in e?Zp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q=(e,t,n)=>Qp(e,typeof t==`symbol`?t:t+``,n),$p=e=>e?.constructor.name===`Array`,em=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!tm(e[n],t[n]))return!1;return!0},tm=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if($p(e)&&$p(t))return em(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!tm(e[r],t[r]))return!1}return!0},nm=e=>Array.isArray(e),rm=e=>typeof e==`object`&&!!e,im=e=>rm(e)&&!nm(e),am=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Function.prototype.toString.call(Object);function om(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function sm(e,t,n){for(let r=0;r<t.length;r++)e=n.getChildren(e,t.slice(r+1))[t[r]];return e}function cm(e){let t=um(e),n=[],r=new Set;for(let e of t){let t=e.join();r.has(t)||(r.add(t),n.push(e))}return n}function lm(e,t){for(let n=0;n<Math.min(e.length,t.length);n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return e.length-t.length}function um(e){return e.sort(lm)}function dm(e,t){let n;return Mm(e,{...t,onEnter:(e,r)=>{if(t.predicate(e,r))return n=e,`stop`}}),n}function fm(e,t){let n=[];return Mm(e,{onEnter:(e,r)=>{t.predicate(e,r)&&n.push(e)},getChildren:t.getChildren}),n}function pm(e,t){let n;return Mm(e,{onEnter:(e,r)=>{if(t.predicate(e,r))return n=[...r],`stop`},getChildren:t.getChildren}),n}function mm(e,t){let n=t.initialResult;return Mm(e,{...t,onEnter:(e,r)=>{n=t.nextResult(n,e,r)}}),n}function hm(e,t){return mm(e,{...t,initialResult:[],nextResult:(e,n,r)=>(e.push(...t.transform(n,r)),e)})}function gm(e,t){let{predicate:n,create:r,getChildren:i}=t,a=(e,t)=>{let o=i(e,t),s=[];o.forEach((e,n)=>{let r=[...t,n],i=a(e,r);i&&s.push(i)});let c=t.length===0,l=n(e,t),u=s.length>0;return c||l||u?r(e,s,t):null};return a(e,[])||r(e,[],[])}function _m(e,t){let n=[],r=0,i=new Map,a=new Map;return Mm(e,{getChildren:t.getChildren,onEnter:(e,o)=>{i.has(e)||i.set(e,r++);let s=t.getChildren(e,o);s.forEach(t=>{a.has(t)||a.set(t,e),i.has(t)||i.set(t,r++)});let c=s.length>0?s.map(e=>i.get(e)):void 0,l=a.get(e),u=l?i.get(l):void 0,d=i.get(e);n.push({...e,_children:c,_parent:u,_index:d})}}),n}function vm(e,t){return{type:`insert`,index:e,nodes:t}}function ym(e){return{type:`remove`,indexes:e}}function bm(){return{type:`replace`}}function xm(e){return[e.slice(0,-1),e[e.length-1]]}function Sm(e,t,n=new Map){let[r,i]=xm(e);for(let e=r.length-1;e>=0;e--){let t=r.slice(0,e).join();n.get(t)?.type!==`remove`&&n.set(t,bm())}let a=n.get(r.join());return a?.type===`remove`?n.set(r.join(),{type:`removeThenInsert`,removeIndexes:a.indexes,insertIndex:i,insertNodes:t}):n.set(r.join(),vm(i,t)),n}function Cm(e){let t=new Map,n=new Map;for(let t of e){let e=t.slice(0,-1).join(),r=n.get(e)??[];r.push(t[t.length-1]),n.set(e,r.sort((e,t)=>e-t))}for(let n of e)for(let e=n.length-2;e>=0;e--){let r=n.slice(0,e).join();t.has(r)||t.set(r,bm())}for(let[e,r]of n)t.set(e,ym(r));return t}function wm(e,t){let n=new Map,[r,i]=xm(e);for(let e=r.length-1;e>=0;e--){let t=r.slice(0,e).join();n.set(t,bm())}return n.set(r.join(),{type:`removeThenInsert`,removeIndexes:[i],insertIndex:i,insertNodes:[t]}),n}function Tm(e,t,n){return Dm(e,{...n,getChildren:(e,r)=>{let i=r.join();switch(t.get(i)?.type){case`replace`:case`remove`:case`removeThenInsert`:case`insert`:return n.getChildren(e,r);default:return[]}},transform:(e,r,i)=>{let a=i.join(),o=t.get(a);switch(o?.type){case`remove`:return n.create(e,r.filter((e,t)=>!o.indexes.includes(t)),i);case`removeThenInsert`:let t=r.filter((e,t)=>!o.removeIndexes.includes(t)),a=o.removeIndexes.reduce((e,t)=>t<e?e-1:e,o.insertIndex);return n.create(e,Em(t,a,0,...o.insertNodes),i);case`insert`:return n.create(e,Em(r,o.index,0,...o.nodes),i);case`replace`:return n.create(e,r,i);default:return e}}})}function Em(e,t,n,...r){return[...e.slice(0,t),...r,...e.slice(t+n)]}function Dm(e,t){let n={};return Mm(e,{...t,onLeave:(e,r)=>{let i=[0,...r],a=i.join(),o=t.transform(e,n[a]??[],r),s=i.slice(0,-1).join(),c=n[s]??[];c.push(o),n[s]=c}}),n[``][0]}function Om(e,t){let{nodes:n,at:r}=t;if(r.length===0)throw Error(`Can't insert nodes at the root`);return Tm(e,Sm(r,n),t)}function km(e,t){return t.at.length===0?t.node:Tm(e,wm(t.at,t.node),t)}function Am(e,t){if(t.indexPaths.length===0)return e;for(let e of t.indexPaths)if(e.length===0)throw Error(`Can't remove the root node`);return Tm(e,Cm(t.indexPaths),t)}function jm(e,t){if(t.indexPaths.length===0)return e;for(let e of t.indexPaths)if(e.length===0)throw Error(`Can't move the root node`);if(t.to.length===0)throw Error(`Can't move nodes to the root`);let n=cm(t.indexPaths),r=n.map(n=>sm(e,n,t));return Tm(e,Sm(t.to,r,Cm(n)),t)}function Mm(e,t){let{onEnter:n,onLeave:r,getChildren:i}=t,a=[],o=[{node:e}],s=t.reuseIndexPath?()=>a:()=>a.slice();for(;o.length>0;){let e=o[o.length-1];if(e.state===void 0){let t=n?.(e.node,s());if(t===`stop`)return;e.state=t===`skip`?-1:0}let t=e.children||i(e.node,s());if(e.children||=t,e.state!==-1){if(e.state<t.length){let n=e.state;a.push(n),o.push({node:t[n]}),e.state=n+1;continue}if(r?.(e.node,s())===`stop`)return}a.pop(),o.pop()}}var Nm=class e{constructor(t){q(this,`options`,t),q(this,`rootNode`),q(this,`isEqual`,e=>tm(this.rootNode,e.rootNode)),q(this,`getNodeChildren`,e=>this.options.nodeToChildren?.(e)??Pm.nodeToChildren(e)??[]),q(this,`resolveIndexPath`,e=>typeof e==`string`?this.getIndexPath(e):e),q(this,`resolveNode`,e=>{let t=this.resolveIndexPath(e);return t?this.at(t):void 0}),q(this,`getNodeChildrenCount`,e=>this.options.nodeToChildrenCount?.(e)??Pm.nodeToChildrenCount(e)),q(this,`getNodeValue`,e=>this.options.nodeToValue?.(e)??Pm.nodeToValue(e)),q(this,`getNodeDisabled`,e=>this.options.isNodeDisabled?.(e)??Pm.isNodeDisabled(e)),q(this,`stringify`,e=>{let t=this.findNode(e);return t?this.stringifyNode(t):null}),q(this,`stringifyNode`,e=>this.options.nodeToString?.(e)??Pm.nodeToString(e)),q(this,`getFirstNode`,(e=this.rootNode,t={})=>{let n;return Mm(e,{getChildren:this.getNodeChildren,onEnter:(r,i)=>{if(!this.isSameNode(r,e)){if(t.skip?.({value:this.getNodeValue(r),node:r,indexPath:i}))return`skip`;if(!n&&i.length>0&&!this.getNodeDisabled(r))return n=r,`stop`}}}),n}),q(this,`getLastNode`,(e=this.rootNode,t={})=>{let n;return Mm(e,{getChildren:this.getNodeChildren,onEnter:(r,i)=>{if(!this.isSameNode(r,e)){if(t.skip?.({value:this.getNodeValue(r),node:r,indexPath:i}))return`skip`;i.length>0&&!this.getNodeDisabled(r)&&(n=r)}}}),n}),q(this,`at`,e=>sm(this.rootNode,e,{getChildren:this.getNodeChildren})),q(this,`findNode`,(e,t=this.rootNode)=>dm(t,{getChildren:this.getNodeChildren,predicate:t=>this.getNodeValue(t)===e})),q(this,`findNodes`,(e,t=this.rootNode)=>{let n=new Set(e.filter(e=>e!=null));return fm(t,{getChildren:this.getNodeChildren,predicate:e=>n.has(this.getNodeValue(e))})}),q(this,`sort`,e=>e.reduce((e,t)=>{let n=this.getIndexPath(t);return n&&e.push({value:t,indexPath:n}),e},[]).sort((e,t)=>lm(e.indexPath,t.indexPath)).map(({value:e})=>e)),q(this,`getValue`,e=>{let t=this.at(e);return t?this.getNodeValue(t):void 0}),q(this,`getValuePath`,e=>{if(!e)return[];let t=[],n=[...e];for(;n.length>0;){let e=this.at(n);e&&t.unshift(this.getNodeValue(e)),n.pop()}return t}),q(this,`getDepth`,e=>pm(this.rootNode,{getChildren:this.getNodeChildren,predicate:t=>this.getNodeValue(t)===e})?.length??0),q(this,`isSameNode`,(e,t)=>this.getNodeValue(e)===this.getNodeValue(t)),q(this,`isRootNode`,e=>this.isSameNode(e,this.rootNode)),q(this,`contains`,(e,t)=>!e||!t?!1:t.slice(0,e.length).every((n,r)=>e[r]===t[r])),q(this,`getNextNode`,(e,t={})=>{let n=!1,r;return Mm(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(i,a)=>{if(this.isRootNode(i))return;let o=this.getNodeValue(i);if(t.skip?.({value:o,node:i,indexPath:a}))return o===e&&(n=!0),`skip`;if(n&&!this.getNodeDisabled(i))return r=i,`stop`;o===e&&(n=!0)}}),r}),q(this,`getPreviousNode`,(e,t={})=>{let n,r=!1;return Mm(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(i,a)=>{if(this.isRootNode(i))return;let o=this.getNodeValue(i);if(t.skip?.({value:o,node:i,indexPath:a}))return`skip`;if(o===e)return r=!0,`stop`;this.getNodeDisabled(i)||(n=i)}}),r?n:void 0}),q(this,`getParentNodes`,e=>{let t=this.resolveIndexPath(e)?.slice();if(!t)return[];let n=[];for(;t.length>0;){t.pop();let e=this.at(t);e&&!this.isRootNode(e)&&n.unshift(e)}return n}),q(this,`getDescendantNodes`,(e,t)=>{let n=this.resolveNode(e);if(!n)return[];let r=[];return Mm(n,{getChildren:this.getNodeChildren,onEnter:(e,n)=>{n.length!==0&&(t?.withBranch||!this.isBranchNode(e))&&r.push(e)}}),r}),q(this,`getDescendantValues`,(e,t)=>this.getDescendantNodes(e,t).map(e=>this.getNodeValue(e))),q(this,`getParentIndexPath`,e=>e.slice(0,-1)),q(this,`getParentNode`,e=>{let t=this.resolveIndexPath(e);return t?this.at(this.getParentIndexPath(t)):void 0}),q(this,`visit`,e=>{let{skip:t,...n}=e;Mm(this.rootNode,{...n,getChildren:this.getNodeChildren,onEnter:(e,r)=>{if(!this.isRootNode(e))return t?.({value:this.getNodeValue(e),node:e,indexPath:r})?`skip`:n.onEnter?.(e,r)}})}),q(this,`getPreviousSibling`,e=>{let t=this.getParentNode(e);if(!t)return;let n=this.getNodeChildren(t),r=e[e.length-1];for(;--r>=0;){let e=n[r];if(!this.getNodeDisabled(e))return e}}),q(this,`getNextSibling`,e=>{let t=this.getParentNode(e);if(!t)return;let n=this.getNodeChildren(t),r=e[e.length-1];for(;++r<n.length;){let e=n[r];if(!this.getNodeDisabled(e))return e}}),q(this,`getSiblingNodes`,e=>{let t=this.getParentNode(e);return t?this.getNodeChildren(t):[]}),q(this,`getValues`,(e=this.rootNode)=>hm(e,{getChildren:this.getNodeChildren,transform:e=>[this.getNodeValue(e)]}).slice(1)),q(this,`isValidDepth`,(e,t)=>t==null?!0:typeof t==`function`?t(e.length):e.length===t),q(this,`isBranchNode`,e=>this.getNodeChildren(e).length>0||this.getNodeChildrenCount(e)!=null),q(this,`getBranchValues`,(e=this.rootNode,t={})=>{let n=[];return Mm(e,{getChildren:this.getNodeChildren,onEnter:(e,r)=>{if(r.length===0)return;let i=this.getNodeValue(e);if(t.skip?.({value:i,node:e,indexPath:r}))return`skip`;this.isBranchNode(e)&&this.isValidDepth(r,t.depth)&&n.push(this.getNodeValue(e))}}),n}),q(this,`flatten`,(e=this.rootNode)=>_m(e,{getChildren:this.getNodeChildren})),q(this,`_create`,(e,t)=>this.getNodeChildren(e).length>0||t.length>0?{...e,children:t}:{...e}),q(this,`_insert`,(e,t,n)=>this.copy(Om(e,{at:t,nodes:n,getChildren:this.getNodeChildren,create:this._create}))),q(this,`copy`,t=>new e({...this.options,rootNode:t})),q(this,`_replace`,(e,t,n)=>this.copy(km(e,{at:t,node:n,getChildren:this.getNodeChildren,create:this._create}))),q(this,`_move`,(e,t,n)=>this.copy(jm(e,{indexPaths:t,to:n,getChildren:this.getNodeChildren,create:this._create}))),q(this,`_remove`,(e,t)=>this.copy(Am(e,{indexPaths:t,getChildren:this.getNodeChildren,create:this._create}))),q(this,`replace`,(e,t)=>this._replace(this.rootNode,e,t)),q(this,`remove`,e=>this._remove(this.rootNode,e)),q(this,`insertBefore`,(e,t)=>this.getParentNode(e)?this._insert(this.rootNode,e,t):void 0),q(this,`insertAfter`,(e,t)=>{if(!this.getParentNode(e))return;let n=[...e.slice(0,-1),e[e.length-1]+1];return this._insert(this.rootNode,n,t)}),q(this,`move`,(e,t)=>this._move(this.rootNode,e,t)),q(this,`filter`,e=>{let t=gm(this.rootNode,{predicate:e,getChildren:this.getNodeChildren,create:this._create});return this.copy(t)}),q(this,`toJSON`,()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}getIndexPath(e){if(Array.isArray(e)){if(e.length===0)return[];let t=[],n=this.getNodeChildren(this.rootNode);for(let r=0;r<e.length;r++){let i=e[r],a=n.findIndex(e=>this.getNodeValue(e)===i);if(a===-1)break;if(t.push(a),r<e.length-1){let e=n[a];n=this.getNodeChildren(e)}}return t}return pm(this.rootNode,{getChildren:this.getNodeChildren,predicate:t=>this.getNodeValue(t)===e})}},Pm={nodeToValue(e){return typeof e==`string`?e:im(e)&&am(e,`value`)?e.value:``},nodeToString(e){return typeof e==`string`?e:im(e)&&am(e,`label`)?e.label:Pm.nodeToValue(e)},isNodeDisabled(e){return im(e)&&am(e,`disabled`)?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(im(e)&&am(e,`childrenCount`))return e.childrenCount}};function Fm(e){let t=new Map;return function(n,r){let i=n+(r?Object.entries(r).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(t.has(i))return t.get(i);let a=new e(n,r);return t.set(i,a),a}}var Im=Fm(Intl.Collator);function Lm(e){let{locale:t,...n}=e||{},r=Im(t||`en-US`,{usage:`search`,...n});function i(e){return e=e.normalize(`NFC`),r.resolvedOptions().ignorePunctuation&&(e=e.replace(/\p{P}/gu,``)),e}function a(e,t){return t.length===0||(e=i(e),t=i(t),r.compare(e.slice(0,t.length),t)===0)}function o(e,t){return t.length===0||(e=i(e),t=i(t),r.compare(e.slice(-t.length),t)===0)}function s(e,t){if(t.length===0)return!0;e=i(e),t=i(t);let n=0,a=t.length;for(;n+a<=e.length;n++){let i=e.slice(n,n+a);if(r.compare(t,i)===0)return!0}return!1}return{startsWith:a,endsWith:o,contains:s}}var Rm=Object.defineProperty,zm=(e,t,n)=>t in e?Rm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bm=(e,t,n)=>zm(e,typeof t==`symbol`?t:t+``,n),Vm=e=>typeof e==`object`&&!!e,Hm=1,Um=9,Wm=11,Gm=e=>Vm(e)&&e.nodeType===Hm&&typeof e.nodeName==`string`,Km=e=>Vm(e)&&e.nodeType===Um,qm=e=>Vm(e)&&e===e.window,Jm=e=>Vm(e)&&e.constructor.name===`VisualViewport`,Ym=e=>Vm(e)&&e.nodeType!==void 0,Xm=e=>Ym(e)&&e.nodeType===Wm&&`host`in e,Zm=e=>Gm(e)&&e.localName===`input`,Qm=e=>Gm(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1,$m=/(textarea|select)/;function eh(e){if(e==null||!Gm(e))return!1;try{return Zm(e)&&e.selectionStart!=null||$m.test(e.localName)||e.isContentEditable||e.getAttribute(`contenteditable`)===`true`||e.getAttribute(`contenteditable`)===``}catch{return!1}}function th(e,t){if(!e||!t||!Gm(e)||!Ym(t))return!1;if(Gm(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&Xm(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function nh(e){return Km(e)?e:qm(e)?e.document:e?.ownerDocument??document}function rh(e){return Xm(e)?rh(e.host):Km(e)?e.defaultView??window:Gm(e)?e.ownerDocument?.defaultView??window:window}function ih(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}var ah=new WeakMap;function oh(e){return ah.has(e)||ah.set(e,rh(e).getComputedStyle(e)),ah.get(e)}var sh=()=>typeof document<`u`;function ch(){return navigator.userAgentData?.platform??navigator.platform}function lh(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var uh=e=>sh()&&e.test(ch()),dh=e=>sh()&&e.test(lh()),fh=()=>uh(/^Mac/i),ph=()=>dh(/Android/i);function mh(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function hh(e){return mh(e)?.[0]??e.target}function gh(e){return e.pointerType===``&&e.isTrusted?!0:ph()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var _h=e=>Gm(e)&&e.tagName===`IFRAME`;function vh(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function yh(e,t,n){let r=[...e],i=[...e],a=new Set,o=new Map;e.forEach((e,t)=>o.set(e,t));let s=0;for(;s<i.length;){let e=i[s++];if(!e||a.has(e))continue;a.add(e);let c=vh(e,t);if(c){let t=Array.from(c.querySelectorAll(bh)).filter(n),a=o.get(e);if(a!==void 0){let e=a+1;r.splice(e,0,...t),t.forEach((t,n)=>{o.set(t,e+n)});for(let n=e+t.length;n<r.length;n++)o.set(r[n],n)}else{let e=r.length;r.push(...t),t.forEach((t,n)=>{o.set(t,e+n)})}i.push(...t)}}return r}var bh=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`,xh=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(bh));(n==1||n==`if-empty`&&i.length===0)&&Gm(e)&&Sh(e)&&i.unshift(e);let a=[];for(let e of i)if(Sh(e)){if(_h(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...xh(t,{getShadowRoot:r}))}else a.push(e)}return r?yh(a,r,Sh):a};function Sh(e){return!Gm(e)||e.closest(`[inert]`)?!1:e.matches(bh)&&Qm(e)}var Ch=class e{constructor(){Bm(this,`id`,null),Bm(this,`fn_cleanup`),Bm(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function wh(e){let t=Ch.create();return t.request(e),t.cleanup}function Th(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}var Eh=e=>Gm(e)?e.getBoundingClientRect():Jm(e)?{top:0,left:0,bottom:e.height,right:e.width}:{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth};function Dh(e,t){if(!Gm(e))return!0;let n=Eh(t),r=e.getBoundingClientRect();return r.top>=n.top&&r.left>=n.left&&r.bottom<=n.bottom&&r.right<=n.right}function Oh(e,t,n={}){let{defer:r,onMissing:i}=n,a=()=>typeof e==`function`?e():e,o=[],s=e=>{if(!e)return i?.();o.push(t(e))},c=a();if(!r||c)s(c);else{let e=!1;o.push(()=>{e=!0}),queueMicrotask(()=>{if(e)return;let t=a();t?s(t):o.push(wh(()=>{e||s(a())}))})}return()=>{o.forEach(e=>e?.())}}var kh=`__live-region__`,Ah=`__live-region-debug__`,jh=`position:fixed;inset-inline:0;bottom:0;z-index:2147483647;padding:12px 16px;background:black;color:white;font-size:14px;line-height:20px;text-align:center;pointer-events:none;`;function Mh(e={}){let{level:t=`polite`,document:n=document,root:r,delay:i=0,debug:a=!1}=e,o=n.defaultView??window,s=r??n.body;function c(){if(!a)return;let e=n.getElementById(Ah);return e||(e=n.createElement(`div`),e.id=Ah,e.dataset.liveAnnouncerDebug=`true`,e.setAttribute(`aria-hidden`,`true`),e.style.cssText=jh,s.appendChild(e),e)}function l(e,r){n.getElementById(kh)?.remove(),r??=i;let a=n.createElement(`span`);a.id=kh,a.dataset.liveAnnouncer=`true`;let l=t===`assertive`?`alert`:`status`;a.setAttribute(`aria-live`,t),a.setAttribute(`role`,l),Object.assign(a.style,{border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}),s.appendChild(a),o.setTimeout(()=>{if(!a.isConnected)return;a.textContent=e;let t=c();t&&(t.textContent=e)},r)}function u(){n.getElementById(kh)?.remove(),n.getElementById(Ah)?.remove()}return{announce:l,destroy:u,toJSON(){return kh}}}var Nh={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&&(Nh[n]=e)}}var Ph={a:[7844,7863],e:[7870,7879],o:[7888,7907],u:[7912,7921]};for(let e of Object.keys(Ph)){let t=e.toUpperCase();for(let n=Ph[e][0];n<=Ph[e][1];++n)Nh[n]=n%2==0?t:e}function Fh(e){if(e<192||e>8580)return e;let t=Nh[e];return t===void 0?e:t.codePointAt(0)}function Ih(e){return e}function Lh(e){return e}function Rh(e,t){return e>t?e:t}var zh=e=>e.split(``).map(e=>e.codePointAt(0)),Bh=new Set(` \f
2
2
  \r \v\xA0 \u2028\u2029   `.split(``).map(e=>e.codePointAt(0)));for(let e=` `.codePointAt(0);e<=` `.codePointAt(0);e++)Bh.add(e);var Vh=``.codePointAt(0),Hh=`A`.codePointAt(0),Uh=`Z`.codePointAt(0),Wh=`a`.codePointAt(0),Gh=`z`.codePointAt(0),Kh=`0`.codePointAt(0),qh=`9`.codePointAt(0);function Jh(e,t,n){return n?e:t-e-1}var Yh=16,Xh=-3,Zh=-1,Qh=Yh/2,$h=Yh/2,eg=7,tg=4,ng=2;function rg(e){return e?new Set:null}function ig(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 ag(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 og(e){return e>=Wh&&e<=Gh?1:e>=Hh&&e<=Uh?2:e>=Kh&&e<=qh?4:0}function sg(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 cg(e){return e<=Vh?og(e):sg(e)}function lg(e,t){return e===0&&t!==0?Qh:e===1&&t===2||e!==4&&t===4?eg:t===0?$h:0}function ug(e,t){return t===0?Qh:lg(cg(e[t-1]),cg(e[t]))}function dg(e,t,n,r){let i=e.slice(r),a=i.indexOf(n);if(a===0)return r;if(!t&&n>=Wh&&n<=Gh){a>0&&(i=i.slice(0,a));let e=i.indexOf(n-32);e>=0&&(a=e)}return a<0?-1:r+a}function fg(e){for(let t of e)if(t>=128)return!1;return!0}function pg(e,t,n){if(!fg(e))return 0;if(!fg(t))return-1;let r=0,i=0;for(let a=0;a<t.length;a++){if(i=dg(e,n,t[a],i),i<0)return-1;a===0&&i>0&&(r=i-1),i++}return r}var mg=(e,t,n,r,i,a,o)=>{let s=i.length;if(s===0)return[{start:0,end:0,score:0},rg(a)];let c=r.length;if(o!==null&&c*s>o.i16.length)return gg(e,t,n,r,i,a);let l=pg(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]=ig(u,o,c),[u,p]=ig(u,o,c),[u,m]=ig(u,o,c),[d,h]=ag(d,o,s);let[,g]=ag(d,o,c);for(let e=0;e<g.length;e++)g[e]=r[e];let _=Ih(0),v=0,y=0,b=0,x=i[0],S=i[0],C=Ih(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),ee=m.subarray(l).subarray(0,E.length);for(let[r,a]of E.entries()){let o=null;a<=Vh?(o=og(a),!e&&o===2&&(a+=32)):(o=sg(a),!e&&o===2&&(a=String.fromCodePoint(a).toLowerCase().codePointAt(0)),t&&(a=Fh(a))),E[r]=a;let c=lg(w,o);if(ee[r]=c,w=o,a===S&&(y<s&&(h[y]=Lh(l+r),y++,S=i[Math.min(y,s-1)]),b=l+r),a===x){let e=Yh+c*ng;if(D[r]=e,O[r]=1,s===1&&(n&&e>_||!n&&e>=_)&&(_=e,v=l+r,n&&c===Qh))break;T=!1}else D[r]=Rh(T?C+Zh:C+Xh,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 te=h[0],k=b-te+1,A=null;[u,A]=ig(u,o,k*s);{let e=f.subarray(te,b+1);for(let[t,n]of e.entries())A[t]=n}let[,j]=ig(u,o,k*s);{let e=p.subarray(te,b+1);for(let[t,n]of e.entries())j[t]=n}let M=h.subarray(1),N=i.slice(1).slice(0,M.length);for(let[e,t]of M.entries()){let r=!1,i=N[e],a=e+1,o=a*k,c=g.subarray(t,b+1),l=m.subarray(t).subarray(0,c.length),u=j.subarray(o+t-te).subarray(0,c.length),d=j.subarray(o+t-te-1-k).subarray(0,c.length),f=A.subarray(o+t-te).subarray(0,c.length),p=A.subarray(o+t-te-1-k).subarray(0,c.length),h=A.subarray(o+t-te-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]+Zh:h[e]+Xh,i===o){g=p[e]+Yh;let t=l[e];b=d[e]+1,t===Qh?b=1:b>1&&(t=Rh(t,Rh(tg,m[c-b+1]))),g+t<y?(g+=l[e],b=0):g+=t}u[e]=b,r=g<y;let x=Rh(Rh(g,y),0);a===s-1&&(n&&x>_||!n&&x>=_)&&(_=x,v=c),f[e]=x}}let P=rg(a),ne=te;if(a&&P!==null){let e=s-1;ne=v;let t=!0;for(;;){let n=e*k,r=ne-te,i=A[n+r],a=0,o=0;if(e>0&&ne>=h[e]&&(a=A[n-k+r-1]),ne>h[e]&&(o=A[n+r-1]),i>a&&(i>o||i===o&&t)){if(P.add(ne),e===0)break;e--}t=j[n+r]>1||n+k+r+1<j.length&&j[n+k+r+1]>0,ne--}}return[{start:ne,end:v+1,score:_},P]};function hg(e,t,n,r,i,a,o){let s=0,c=0,l=!1,u=0,d=Ih(0),f=rg(o),p=0;i>0&&(p=cg(n[i-1]));for(let m=i;m<a;m++){let i=n[m],a=cg(i);if(e||(i>=Hh&&i<=Uh?i+=32:i>Vh&&(i=String.fromCodePoint(i).toLowerCase().codePointAt(0))),t&&(i=Fh(i)),i===r[s]){o&&f!==null&&f.add(m),c+=Yh;let e=lg(p,a);u===0?d=e:(e===Qh&&(d=e),e=Rh(Rh(e,d),tg)),c+=s===0?e*ng:e,l=!1,u++,s++}else c+=l?Zh:Xh,l=!0,u=0,d=0;p=a}return[c,f]}var gg=(e,t,n,r,i,a,o)=>{if(i.length===0)return[{start:0,end:0,score:0},null];if(pg(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[Jh(a,u,n)];e||(o>=Hh&&o<=Uh?o+=32:o>Vh&&(o=String.fromCodePoint(o).toLowerCase().codePointAt(0))),t&&(o=Fh(o));let f=i[Jh(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[Jh(t,u,n)];e||(a>=Hh&&a<=Uh?a+=32:a>Vh&&(a=String.fromCodePoint(a).toLowerCase().codePointAt(0)));let o=i[Jh(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]=hg(e,t,r,i,c,l,a);return[{start:c,end:l,score:o},f]}return[{start:-1,end:-1,score:0},null]},_g=(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||pg(r,i,e)<0)return[{start:-1,end:-1,score:0},null];let l=0,u=-1,d=Ih(0),f=Ih(-1);for(let a=0;a<s;a++){let o=Jh(a,s,n),p=r[o];e||(p>=Hh&&p<=Uh?p+=32:p>Vh&&(p=String.fromCodePoint(p).toLowerCase().codePointAt(0))),t&&(p=Fh(p));let m=Jh(l,c,n);if(i[m]===p){if(m===0&&(d=ug(r,o)),l++,l===c){if(d>f&&(u=a,f=d),d===Qh)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]=hg(e,t,r,i,a,o,!1);return[{start:a,end:o,score:l},null]}return[{start:-1,end:-1,score:0},null]},vg=102400,yg=2048;function bg(e,t){return{i16:new Int16Array(e),i32:new Int32Array(t)}}var xg=bg(vg,yg),Sg=(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=zh(e);return n&&(i=i.map(Fh)),{queryRunes:i,caseSensitive:r}};function Cg(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 wg(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,xg);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 Tg(e){let{queryRunes:t,caseSensitive:n}=Sg(e,this.opts.casing,this.opts.normalize),r={},i=wg.bind(this)(r,t,n);for(let e=0,t=this.runesList.length;e<t;++e)i(e);return Cg(r,this.opts.limit)}var Eg={limit:1/0,selector:e=>e,casing:`smart-case`,normalize:!0,fuzzy:`v2`,tiebreakers:[],sort:!0,forward:!0},Dg=class{constructor(e,...t){switch(this.opts={...Eg,...t[0]},this.items=e,this.runesList=e.map(e=>zh(this.opts.selector(e).normalize())),this.algoFn=_g,this.opts.fuzzy){case`v2`:this.algoFn=mg;break;case`v1`:this.algoFn=gg}}},Og={...Eg,match:Tg},kg=class extends Dg{constructor(e,...t){super(e,...t),this.opts={...Og,...t[0]}}find(e){return e.length===0||this.items.length===0?this.items.slice(0,this.opts.limit).map(Ag):(e=e.normalize(),jg(this.opts.match.bind(this)(e),this.opts))}};({...Eg});var Ag=e=>({item:e,start:-1,end:-1,score:0,positions:new Set});function jg(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 Mg(e,t,n){return n(e.item).length-n(t.item).length}var Ng=class{constructor(e,...t){this.finder=new kg(e,...t),this.find=this.finder.find.bind(this.finder)}};function Pg(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Pg(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Fg(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Pg(e))&&(r&&(r+=` `),r+=t);return r}var Ig=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Lg=Fg,J=(e,t)=>n=>{if(t?.variants==null)return Lg(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Ig(t)||Ig(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Lg(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Rg=`__root__`,zg=`Commands`,Bg=Lm({sensitivity:`base`}),Vg=null;function Hg(e){return(e.command??e.value).trim()}function Ug(e){if(!e||typeof e!=`object`)return!1;let t=e;if(t.isContentEditable)return!0;let n=t.tagName?.toLowerCase();return!!(n===`input`||n===`textarea`||n===`select`||typeof t.closest==`function`&&t.closest(`[contenteditable="true"], .ProseMirror`))}function Wg(e,t,n,r,i,a){let o=Hg(e),s=[...t,e.value],c=[...r,o],l=i.isBranchNode(e),u=e.group??a??(n.length>0?n[n.length-1]:zg);return{value:s.join(`/`),label:e.label,description:e.description,group:u,command:o,fullCommand:`:${c.join(` `)}`,aliases:e.aliases??[],shortcut:e.shortcut,badge:e.badge,active:!!e.active,disabled:!!e.disabled,isBranch:l,valuePath:s,breadcrumbLabels:n,node:e}}function Gg(e){let t=new Map;for(let n of e){let e=n.group||zg,r=t.get(e);r?r.push(n):t.set(e,[n])}return Array.from(t.entries()).map(([e,t])=>({label:e,items:t}))}function Kg(e,t,n,r,i,a){let o=i.getNodeChildren(e);for(let e of o){let o=Wg(e,t,n,r,i);a.push(o),i.isBranchNode(e)&&Kg(e,[...t,e.value],[...n,e.label],[...r,Hg(e)],i,a)}}function qg(e,t){let n=t.toLowerCase();return Hg(e).toLowerCase()===n||e.value.toLowerCase()===n||(e.aliases??[]).some(e=>e.toLowerCase()===n)}function Jg(e){if(e.closest(`[hidden]`))return!1;let t=e.closest(`[data-fw]`),n=e.ownerDocument?.documentElement?.getAttribute(`data-framework`);return!(t&&n&&t.getAttribute(`data-fw`)!==n)}function Yg(e){return e instanceof Nm?e:new Nm({rootNode:{value:Rg,label:`Root`,children:e??[]},nodeToValue:e=>e.value,nodeToString:e=>e.label,isNodeDisabled:e=>!!e.disabled,nodeToChildren:e=>e.children??[]})}function Xg(e,t=[],n=``,r){if(!(e.getNodeChildren(e.rootNode).length>0))return{hasCommands:!1,breadcrumbs:[],items:[],groups:[]};let i=[],a=[],o=[],s=[],c=e.rootNode;for(let n of t){let t=e.getNodeChildren(c).find(e=>e.value===n);if(!t||!e.isBranchNode(t))break;let r=Hg(t);i.push({value:t.value,label:t.label,command:r}),a.push(t.value),o.push(t.label),s.push(r),c=t}let l=n.trim(),u=e.getNodeChildren(c).map(t=>Wg(t,a,o,s,e));if(!l)return{hasCommands:!0,breadcrumbs:i,items:u,groups:Gg(u)};let d=l.startsWith(`:`)?l.slice(1).trim():l;if(!d)return{hasCommands:!0,breadcrumbs:i,items:u,groups:Gg(u)};let f=r?.deepSearch!==!1&&i.length===0,p=[];f?Kg(c,a,o,s,e,p):p.push(...u);let m=new Ng(p,{selector:e=>e.label,tiebreakers:[Mg],casing:`case-insensitive`}).find(d),h=new Map;for(let e of m)h.set(e.item.value,{score:e.score,positions:Array.from(e.positions).sort((e,t)=>e-t)});let g=new Ng(p,{selector:e=>[e.label,e.command,e.fullCommand,...e.aliases,...e.breadcrumbLabels,e.description??``,...e.node.keywords??[]].join(` `),tiebreakers:[Mg],casing:`case-insensitive`}).find(d),_=new Map;for(let e of g){let t=h.get(e.item.value),n=(e.item.valuePath.length-1)*2,r=(t?t.score+20:e.score)-n;_.set(e.item.value,{...e.item,matchPositions:t?.positions??[],score:r})}for(let e of p)_.has(e.value)||(Bg.contains(e.label,d)||Bg.contains(e.command,d))&&_.set(e.value,{...e,matchPositions:[],score:1});let v=Array.from(_.values()).sort((e,t)=>{let n=(t.score??0)-(e.score??0);return n===0?e.valuePath.length===t.valuePath.length?e.label.length-t.label.length:e.valuePath.length-t.valuePath.length:n});return{hasCommands:!0,breadcrumbs:i,items:v,groups:Gg(v)}}function Zg(e,t=``){let n=e.getNodeChildren(e.rootNode).length>0,r=t.startsWith(`:`)?t.slice(1):t,i=`:${r}`;if(!n)return{hasCommands:!1,normalizedInput:i,completedTokens:[],partialToken:r.trim(),breadcrumbs:[],suggestions:[],exactNode:null,error:null};let a=/\s+$/.test(r),o=r.trim(),s=o.length>0?o.split(/\s+/):[],c=a?s:s.slice(0,-1),l=a?``:s[s.length-1]??``,u=[],d=[],f=[],p=[],m=e.rootNode;for(let t=0;t<c.length;t++){let n=c[t],r=e.getNodeChildren(m).find(e=>qg(e,n));if(!r)return{hasCommands:!0,normalizedInput:i,completedTokens:u,partialToken:s.slice(t).join(` `),breadcrumbs:d,suggestions:[],exactNode:null,error:`Unknown command: ${n}`};let a=Hg(r);if(!e.isBranchNode(r)){if(s.slice(t+1).length>0||l.length>0)return{hasCommands:!0,normalizedInput:i,completedTokens:[...u,a],partialToken:l,breadcrumbs:d,suggestions:[],exactNode:null,error:`Command ':${[...u,a].join(` `)}' does not take arguments`};let n=Wg(r,f,p,u,e);return{hasCommands:!0,normalizedInput:i,completedTokens:[...u,a],partialToken:``,breadcrumbs:d,suggestions:[n],exactNode:n,error:null}}u.push(a),d.push({value:r.value,label:r.label,command:a}),f.push(r.value),p.push(r.label),m=r}let h=e.getNodeChildren(m).map(t=>Wg(t,f,p,u,e));if(!l)return{hasCommands:!0,normalizedInput:i,completedTokens:u,partialToken:``,breadcrumbs:d,suggestions:h,exactNode:null,error:null};let g=h.find(e=>qg(e.node,l))??null,_=new Ng(h,{selector:e=>e.command,tiebreakers:[Mg],casing:`case-insensitive`}),v=new Map;for(let e of _.find(l))v.set(e.item.value,{score:e.score,positions:Array.from(e.positions).sort((e,t)=>e-t)});let y=new Ng(h,{selector:e=>e.label,tiebreakers:[Mg],casing:`case-insensitive`}),b=new Map;for(let e of y.find(l))b.set(e.item.value,{score:e.score,positions:Array.from(e.positions).sort((e,t)=>e-t)});let x=new Ng(h,{selector:e=>[e.command,...e.aliases,e.label,e.description??``,...e.node.keywords??[]].join(` `),tiebreakers:[Mg],casing:`case-insensitive`}),S=new Map;for(let e of x.find(l)){let t=v.get(e.item.value),n=b.get(e.item.value),r=g?.value===e.item.value,i=e.item.command.toLowerCase().startsWith(l.toLowerCase()),a=(t?t.score+50:e.score)+(r?500:0)+(i?100:0);S.set(e.item.value,{...e.item,commandMatchPositions:t?.positions??[],matchPositions:n?.positions??[],score:a})}let C=Array.from(S.values()).sort((e,t)=>{let n=(t.score??0)-(e.score??0);return n===0?e.command.length-t.command.length:n}),w=C.length===0?`Unknown command: ${[...u,l].join(` `)}`:null;return{hasCommands:!0,normalizedInput:i,completedTokens:u,partialToken:l,breadcrumbs:d,suggestions:C,exactNode:g?S.get(g.value)??g:null,error:w}}function Qg(e,t,n=!0){let r=[...e,t.command].join(` `);return t.isBranch&&n?`:${r} `:`:${r}`}function $g(e,t){if(!e)return[];if(!t||t.length===0)return[{text:e,highlight:!1}];let n=new Set(t),r=[],i=``,a=n.has(0);for(let t=0;t<e.length;t++){let o=n.has(t);t>0&&o!==a?(r.push({text:i,highlight:a}),i=e[t],a=o):i+=e[t]}return i.length>0&&r.push({text:i,highlight:a}),r}function e_(e){if(typeof document<`u`&&e)try{Vg||=Mh({level:`polite`,document}),Vg.announce(e,150)}catch{}}function t_(e,t){if(!t)return!1;let n=t.trim();if(n===`:`)return!Ug(e.target)&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&e.key===`:`;try{if(af(e,t))return!0}catch{}let r=n.toLowerCase();return r===`mod+k`||r===`cmd+k`||r===`ctrl+k`?(e.metaKey||e.ctrlKey)&&!e.altKey&&e.key.toLowerCase()===`k`:!1}function n_(e,t){if(!e||typeof document>`u`)return!0;if(!Jg(e))return!1;let n=e.closest(`[data-example-preview]`),r=document.activeElement?.closest?.(`[data-example-preview]`)??null;return r?n===r:!n||Array.from(document.querySelectorAll(`[data-example-preview] ${t}`)).filter(Jg)[0]===e}function r_(e=`auto`,t){if(e===1||t<=0)return;let n=Math.max(1,Math.min(e===`auto`?t<=6?2:t<=12?3:4:e,t));return{display:`grid`,gridAutoFlow:`column`,gridTemplateRows:`repeat(${Math.max(1,Math.ceil(t/n))}, minmax(0, auto))`,gridTemplateColumns:`repeat(${n}, minmax(0, 1fr))`}}function i_(e=`auto`,t,n,r){if(t<=0)return-1;let i=n>=0&&n<t?n:0;if(r===`ArrowDown`)return(i+1)%t;if(r===`ArrowUp`)return(i-1+t)%t;if(e===1)return i;let a=Math.max(1,Math.ceil(t/Math.max(1,Math.min(e===`auto`?t<=6?2:t<=12?3:4:e,t)))),o=Math.max(1,Math.ceil(t/a)),s=i%a,c=Math.floor(i/a),l=r===`ArrowRight`?(c+1)%o:(c-1+o)%o;return Math.min(l*a+s,t-1)}var a_={root:J(`flex w-full flex-col overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl outline-none`,{variants:{size:{sm:`max-w-md`,md:`max-w-xl`,lg:`max-w-2xl`}},defaultVariants:{size:`md`}}),positioner:`items-center justify-center p-4`,dialogContent:`my-auto gap-0 overflow-hidden p-0 sm:max-w-xl`,header:`flex items-center gap-2 border-b border-border px-3 py-2.5`,breadcrumb:`inline-flex shrink-0 items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground`,input:`flex-1 border-0 bg-transparent px-1 py-0.5 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-0`,list:`max-h-80 overflow-y-auto p-1.5 outline-none`,item:`group relative flex w-full cursor-pointer select-none items-center justify-between gap-3 rounded-lg px-2.5 py-2 text-sm outline-none transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,footer:`flex flex-wrap items-center justify-between gap-2 border-t border-border bg-muted/30 px-3 py-2 text-[11px] text-muted-foreground`},o_={root:J(`flex w-full flex-col overflow-hidden border border-border bg-popover font-mono text-popover-foreground shadow-2xl outline-none`,{variants:{size:{sm:`text-xs`,md:`text-sm`,lg:`text-base`}},defaultVariants:{size:`md`}}),positioner:`items-end justify-stretch p-0!`,dialogContent:`fixed inset-x-0 bottom-0 top-auto my-0 w-full max-w-none translate-x-0 translate-y-0 gap-0 overflow-hidden rounded-none border-x-0 border-b-0 border-t border-border p-0 shadow-2xl sm:max-w-none sm:rounded-none`,list:J(`overflow-y-auto border-b border-border bg-popover/95 outline-none`,{variants:{columns:{auto:`grid! grid-flow-col!`,1:`flex flex-col`,2:`grid! grid-flow-col!`,3:`grid! grid-flow-col!`,4:`grid! grid-flow-col!`},size:{sm:`max-h-44 gap-x-2 gap-y-0.5 px-2 py-1`,md:`max-h-60 gap-x-3 gap-y-1 p-2`,lg:`max-h-72 gap-x-4 gap-y-1.5 p-3`}},defaultVariants:{columns:`auto`,size:`md`}}),item:J(`group relative flex min-w-0 w-full cursor-pointer select-none items-center justify-between gap-2 rounded-md font-mono outline-none transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,{variants:{size:{sm:`px-1.5 py-0.5 text-[11px] leading-tight`,md:`px-2.5 py-1.5 text-xs`,lg:`px-3 py-2 text-sm`}},defaultVariants:{size:`md`}}),promptBar:J(`flex w-full items-center border-t border-border/60 bg-muted/50 font-mono`,{variants:{size:{sm:`gap-1 px-2 py-1 text-xs`,md:`gap-1.5 px-3 py-2 text-sm`,lg:`gap-2 px-4 py-2.5 text-base`}},defaultVariants:{size:`md`}}),prefix:`select-none font-mono font-bold text-primary`,input:J(`flex-1 border-0 bg-transparent font-mono text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-0`,{variants:{size:{sm:`px-0.5 py-0 text-xs`,md:`px-1 py-0.5 text-sm`,lg:`px-1.5 py-1 text-base`}},defaultVariants:{size:`md`}}),error:`flex items-center justify-between gap-2 border-t border-destructive/30 bg-destructive/10 px-3 py-1.5 font-mono text-xs text-destructive`},s_=globalThis,c_=s_.__helicalModalEditorRegistry__??=new WeakMap,l_=s_.__helicalActiveModalEditors__??=new Set;function u_(e,t){return c_.set(e,t),l_.add(t),()=>{c_.get(e)===t&&c_.delete(e),l_.delete(t)}}function d_(e){let t=e;for(;t;){let e=c_.get(t);if(e)return e;t=t.parentElement}}function f_(e){for(let t of l_)t.setModalState(e)}var p_=Object.defineProperty,m_=Object.getOwnPropertyDescriptor,h_=Object.getOwnPropertyNames,g_=Object.prototype.hasOwnProperty,__=(e,t)=>{for(var n in t)p_(e,n,{get:t[n],enumerable:!0})},v_=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of h_(t))!g_.call(e,i)&&i!==n&&p_(e,i,{get:()=>t[i],enumerable:!(r=m_(t,i))||r.enumerable});return e},y_=(e,t,n)=>(v_(e,t,`default`),n&&v_(n,t,`default`)),b_=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},x_=(e,t)=>({classGroupId:e,validator:t}),S_=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),C_=`-`,w_=[],T_=`arbitrary..`,E_=e=>{let t=k_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return O_(e);let n=e.split(C_);return D_(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?b_(i,t):t:i||w_}return n[e]||w_}}},D_=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=D_(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(C_):e.slice(t).join(C_),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},O_=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?T_+r:void 0})(),k_=e=>{let{theme:t,classGroups:n}=e;return A_(n,t)},A_=(e,t)=>{let n=S_();for(let r in e)j_(e[r],n,r,t);return n},j_=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++)M_(e[a],t,n,r)},M_=(e,t,n,r)=>{typeof e==`string`?N_(e,t,n):typeof e==`function`?P_(e,t,n,r):F_(e,t,n,r)},N_=(e,t,n)=>{let r=e===``?t:I_(t,e);r.classGroupId=n},P_=(e,t,n,r)=>{L_(e)?j_(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(x_(n,e)))},F_=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];j_(o,I_(t,a),n,r)}},I_=(e,t)=>{let n=e,r=t.split(C_),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=S_(),n.nextPart.set(t,i)),n=i}return n},L_=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,R_=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},z_=`!`,B_=`:`,V_=[],H_=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),U_=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let c=e[s];if(n===0&&r===0){if(c===B_){t.push(e.slice(i,s)),i=s+1;continue}if(c===`/`){a=s;continue}}if(c===`[`)n++;else if(c===`]`)n--;else if(c===`(`)r++;else if(c===`)`)r--;else if(c===`\\`)s++;else if(c===`"`||c===`'`)for(;++s<o;){let t=e[s];if(t===`\\`)s++;else if(t===c)break}}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(z_)?(c=s.slice(0,-1),l=!0):s.startsWith(z_)&&(c=s.slice(1),l=!0);let u=l&&s.startsWith(z_)?1:0,d=a&&a>i?a-i-u:void 0;return H_(t,l,c,d)};if(t){let e=t+B_,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):H_(V_,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},W_=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},G_=e=>({cache:R_(e.cacheSize),parseClassName:U_(e),sortModifiers:W_(e),postfixLookupClassGroupIds:K_(e),...E_(e)}),K_=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},q_=/\s+/,J_=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(q_),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+z_:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Y_=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=X_(n))&&(i&&(i+=` `),i+=r);return i},X_=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=X_(e[r]))&&(n&&(n+=` `),n+=t);return n},Z_=(e,...t)=>{let n,r,i,a,o=o=>(n=G_(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=J_(e,n);return i(e,a),a};return a=o,(...e)=>a(Y_(...e))},Q_=[],$_=e=>{let t=t=>t[e]||Q_;return t.isThemeGetter=!0,t.themeKey=e,t},e1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,t1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,n1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,r1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,i1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|Q|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^--spacing\(.+\)|^0$/,a1=/^[+-]?(?:\d*\.)?\d+(?:[eE][+-]?\d+)?(?:r?ic|r(?:cap|ch|ex))$/,o1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark|contrast-color|device-cmyk|--alpha)\(.+\)$/i,s1=/^(?:_*[+-]?(?:\d|\.\d)|[\w-]+\(|_*(?:inherit|initial|revert(?:-layer)?|unset)_*$)/i,c1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,l1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,u1=e=>n1.test(e),Y=e=>!!e&&!Number.isNaN(Number(e)),d1=e=>!!e&&Number.isInteger(Number(e)),f1=e=>e.endsWith(`%`)&&Y(e.slice(0,-1)),p1=e=>r1.test(e),m1=()=>!0,h1=e=>(i1.test(e)||a1.test(e))&&!o1.test(e),g1=e=>s1.test(e)&&!o1.test(e),_1=()=>!1,v1=e=>c1.test(e),y1=e=>l1.test(e),b1=e=>!X(e)&&!Z(e),x1=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),S1=e=>z1(e,U1,_1),X=e=>e1.test(e),C1=e=>z1(e,W1,h1),w1=e=>z1(e,G1,g1),T1=e=>z1(e,K1,Y),E1=e=>z1(e,J1,m1),D1=e=>z1(e,q1,_1),O1=e=>z1(e,V1,_1),k1=e=>z1(e,H1,y1),A1=e=>z1(e,Y1,v1),Z=e=>t1.test(e),j1=e=>B1(e,W1),M1=e=>B1(e,G1,!0),N1=e=>B1(e,q1),P1=e=>B1(e,V1),F1=e=>B1(e,U1),I1=e=>B1(e,H1),L1=e=>B1(e,Y1,!0),R1=e=>B1(e,J1,!0),z1=(e,t,n)=>{let r=e1.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},B1=(e,t,n=!1)=>{let r=t1.exec(e);return r?r[1]?t(r[1]):n:!1},V1=e=>e===`position`||e===`percentage`,H1=e=>e===`image`||e===`url`,U1=e=>e===`length`||e===`size`||e===`bg-size`,W1=e=>e===`length`,G1=e=>e!==`color`,K1=e=>e===`number`,q1=e=>e===`family-name`,J1=e=>e===`number`||e===`weight`,Y1=e=>e===`shadow`,X1=Z_(()=>{let e=$_(`color`),t=$_(`font`),n=$_(`text`),r=$_(`font-weight`),i=$_(`tracking`),a=$_(`leading`),o=$_(`breakpoint`),s=$_(`container`),c=$_(`spacing`),l=$_(`radius`),u=$_(`shadow`),d=$_(`inset-shadow`),f=$_(`text-shadow`),p=$_(`drop-shadow`),m=$_(`blur`),h=$_(`perspective`),g=$_(`aspect`),_=$_(`ease`),v=$_(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Z,X],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Z,X,c],T=()=>[u1,`full`,`auto`,...w()],E=()=>[d1,`none`,`subgrid`,Z,X],D=()=>[`auto`,{span:[`full`,d1,Z,X]},d1,Z,X],O=()=>[d1,`auto`,Z,X],ee=()=>[`auto`,`min`,`max`,`fr`,Y,Z,X],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[u1,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[s,u1,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],N=()=>[u1,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,Z,X],ne=()=>[...b(),P1,O1,{position:[Z,X]}],re=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ie=()=>[`auto`,`cover`,`contain`,F1,S1,{size:[Z,X]}],ae=()=>[f1,j1,C1],F=()=>[``,`none`,`full`,l,Z,X],oe=()=>[``,Y,j1,C1],se=()=>[`solid`,`dashed`,`dotted`,`double`],ce=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],I=()=>[Y,f1,M1,w1],le=()=>[``,`none`,m,Z,X],ue=()=>[`none`,Y,Z,X],de=()=>[`none`,Y,Z,X],L=()=>[Y,Z,X],fe=()=>[u1,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[p1],breakpoint:[p1],color:[m1],container:[p1],"drop-shadow":[p1],ease:[`in`,`out`,`in-out`],font:[b1],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[p1],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[p1],shadow:[p1],spacing:[`px`,Y],text:[p1],"text-shadow":[p1],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,u1,X,Z,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Z,X]}],"container-named":[x1],columns:[{columns:[Y,`auto`,X,Z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`],"not-sr":[`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],contain:[{contain:[`none`,`content`,`strict`,Z,X]}],"contain-size":[{contain:[`size`,`inline-size`]}],"contain-layout":[`contain-layout`],"contain-paint":[`contain-paint`],"contain-style":[`contain-style`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[d1,`auto`,Z,X]}],basis:[{basis:[u1,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Y,u1,`auto`,`initial`,`none`,Z,X]}],grow:[{grow:[``,Y,Z,X]}],shrink:[{shrink:[``,Y,Z,X]}],order:[{order:[d1,`first`,`last`,`none`,Z,X]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...M()]}],"min-inline-size":[{"min-inline":[`auto`,...M()]}],"max-inline-size":[{"max-inline":[`none`,...M()]}],"block-size":[{block:[`auto`,...N()]}],"min-block-size":[{"min-block":[`auto`,...N()]}],"max-block-size":[{"max-block":[`none`,...N()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...j()]}],"font-size":[{text:[`base`,n,j1,C1]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,R1,E1]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,f1,Z,X]}],"font-family":[{font:[N1,D1,t]}],"font-features":[{"font-features":[Z,X]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Z,X]}],"line-clamp":[{"line-clamp":[Y,`none`,Z,X]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,Z,X]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Z,X]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...se(),`wavy`]}],"text-decoration-thickness":[{decoration:[Y,`from-font`,`auto`,j1,P1,C1]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Y,`auto`,Z,X]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`text-ellipsis`,`text-clip`],truncate:[`truncate`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[d1,Z,X]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Z,X]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Z,X]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},d1,Z,X],radial:[``,Z,X],conic:[``,d1,Z,X]},I1,k1]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...se(),`hidden`,`none`]}],"divide-style":[{divide:[...se(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...se(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Y,Z,X]}],"outline-w":[{outline:[``,Y,j1,C1]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`inner`,`none`,u,L1,A1]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,L1,A1]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:oe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Y,C1]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,L1,A1]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Y,Z,X]}],"mix-blend":[{"mix-blend":[...ce(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Y,Z,X]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{mask:[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[Y,Z,X]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Z,X]}],filter:[{filter:[``,`none`,Z,X]}],blur:[{blur:le()}],brightness:[{brightness:[Y,Z,X]}],contrast:[{contrast:[Y,Z,X]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,L1,A1]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,Y,Z,X]}],"hue-rotate":[{"hue-rotate":[Y,Z,X]}],invert:[{invert:[``,Y,Z,X]}],saturate:[{saturate:[Y,Z,X]}],sepia:[{sepia:[``,Y,Z,X]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Z,X]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Y,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[Y,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Y,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Y,Z,X]}],"backdrop-invert":[{"backdrop-invert":[``,Y,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[Y,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[Y,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":[``,Y,Z,X]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Z,X]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Y,`initial`,Z,X]}],ease:[{ease:[`linear`,`initial`,_,Z,X]}],delay:[{delay:[Y,Z,X]}],animate:[{animate:[`none`,v,Z,X]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Z,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:L()}],"skew-x":[{"skew-x":L()}],"skew-y":[{"skew-y":L()}],transform:[{transform:[Z,X,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],"transform-box":[{transform:[`content`,`border`,`fill`,`stroke`,`view`]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":[`translate-none`],"translate-3d":[`translate-3d`],zoom:[{zoom:[d1,Z,X]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Z,X]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Z,X]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[Y,j1,C1,T1]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],"place-content":[`align-content`,`justify-content`],"place-items":[`align-items`,`justify-items`],"place-self":[`align-self`,`justify-self`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],truncate:[`text-overflow`,`overflow`,`overflow-x`,`overflow-y`,`whitespace`],sr:`not-sr.position.size.w.h.p.px.py.ps.pe.pbs.pbe.pt.pr.pb.pl.m.mx.my.ms.me.mbs.mbe.mt.mr.mb.ml.overflow.overflow-x.overflow-y.whitespace`.split(`.`),"not-sr":[`sr`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],"mask-image-x-from-pos":[`mask-image-r-from-pos`,`mask-image-l-from-pos`],"mask-image-x-to-pos":[`mask-image-r-to-pos`,`mask-image-l-to-pos`],"mask-image-x-from-color":[`mask-image-r-from-color`,`mask-image-l-from-color`],"mask-image-x-to-color":[`mask-image-r-to-color`,`mask-image-l-to-color`],"mask-image-y-from-pos":[`mask-image-t-from-pos`,`mask-image-b-from-pos`],"mask-image-y-to-pos":[`mask-image-t-to-pos`,`mask-image-b-to-pos`],"mask-image-y-from-color":[`mask-image-t-from-color`,`mask-image-b-from-color`],"mask-image-y-to-color":[`mask-image-t-to-color`,`mask-image-b-to-color`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`,`translate-3d`],"translate-x":[`translate-none`],"translate-y":[`translate-none`],"translate-z":[`translate-none`],"translate-3d":[`translate-none`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],contain:[`contain-size`,`contain-layout`,`contain-paint`,`contain-style`],"contain-size":[`contain`],"contain-layout":[`contain`],"contain-paint":[`contain`],"contain-style":[`contain`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),Z1=`layer:request-dismiss`,Q1={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>th(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>th(t,e))},add(e){let t=this.indexOf(e.node);t!==-1&&this.layers.splice(t,1),this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.layers[t].styleTargets?.forEach(e=>{let t=e();t&&e0(t)}),this.recentlyRemoved.add(e),Th(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>Q1.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{$1(e,t,e.node),e.styleTargets?.forEach(n=>{let r=n();if(!r||r===e.node)return;$1(e,t,r);let{zIndex:i}=oh(e.node);r.style.setProperty(`--z-index`,i)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];n0(e,Z1,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),t0(e,Z1,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function $1(e,t,n){n.style.setProperty(`--layer-index`,`${t}`),n.removeAttribute(`data-nested`),n.removeAttribute(`data-has-nested`),Q1.getParentLayerOfType(e.node,e.type)&&n.setAttribute(`data-nested`,e.type);let r=Q1.countNestedLayersOfType(e.node,e.type);r>0&&n.setAttribute(`data-has-nested`,e.type),n.style.setProperty(`--nested-layer-count`,`${r}`)}function e0(e){e.style.removeProperty(`--layer-index`),e.style.removeProperty(`--nested-layer-count`),e.style.removeProperty(`--z-index`),e.removeAttribute(`data-nested`),e.removeAttribute(`data-has-nested`)}function t0(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function n0(e,t,n){e.addEventListener(t,n,{once:!0})}function r0(e,t={}){return Oh(e,e=>(Q1.addBranch(e),()=>{Q1.removeBranch(e)}),{defer:t.defer,onMissing:()=>om("[@zag-js/dismissable] branch node is `null` or `undefined`")})}function i0(e){return!(e.metaKey||!fh()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var a0=`a[href],audio[controls],button,details,embed,iframe,img[controls],img[usemap],input,select,textarea,video[controls]`,o0=null,s0=new Set,c0=new Map,l0=!1,u0=null,d0=!1,f0=null;function p0(e,t){for(let n of s0)n(e,t)}function m0(e){u0=null,l0=!0,i0(e)&&(o0=`keyboard`,p0(`keyboard`,e))}function h0(e){(e.type!==`pointermove`&&e.type!==`mousemove`||f0?.x!==e.clientX||f0?.y!==e.clientY)&&(f0={x:e.clientX,y:e.clientY},o0=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(u0=null,l0=!0,p0(`pointer`,e)))}function g0(e){if(gh(e)){u0=null,l0=!0,o0=`virtual`;return}u0=null;let t=hh(e),n=t?.closest(`label`),r=n?.control;if(!n||!r||r.matches(`:disabled`))return;let i=t?.closest(a0);i&&n.contains(i)&&i!==r||r!==ih(n.ownerDocument)&&(u0=r)}function _0(e){let t=hh(e),n=t===u0;t!==rh(t)&&t!==nh(t)&&e.isTrusted&&(l0||n||d0||(o0=`virtual`,p0(`virtual`,e)),l0=!1,u0=null,d0=!1)}function v0(){l0=!1,u0=null,d0=!0}function y0(e){if(typeof window>`u`||c0.get(rh(e)))return;let t=rh(e),n=nh(e),r=t.HTMLElement.prototype.focus;function i(){l0=!0,r.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener(`keydown`,m0,!0),n.addEventListener(`keyup`,m0,!0),n.addEventListener(`click`,g0,!0),t.addEventListener(`focus`,_0,!0),t.addEventListener(`blur`,v0,!1),t.PointerEvent===void 0?(n.addEventListener(`mousedown`,h0,!0),n.addEventListener(`mousemove`,h0,!0),n.addEventListener(`mouseup`,h0,!0)):(n.addEventListener(`pointerdown`,h0,!0),n.addEventListener(`pointermove`,h0,!0),n.addEventListener(`pointerup`,h0,!0)),t.addEventListener(`beforeunload`,()=>{b0(e)},{once:!0}),c0.set(t,{focus:r})}var b0=(e,t)=>{let n=rh(e),r=nh(e);t&&r.removeEventListener(`DOMContentLoaded`,t);let i=c0.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}r.removeEventListener(`keydown`,m0,!0),r.removeEventListener(`keyup`,m0,!0),r.removeEventListener(`click`,g0,!0),n.removeEventListener(`focus`,_0,!0),n.removeEventListener(`blur`,v0,!1),n.PointerEvent===void 0?(r.removeEventListener(`mousedown`,h0,!0),r.removeEventListener(`mousemove`,h0,!0),r.removeEventListener(`mouseup`,h0,!0)):(r.removeEventListener(`pointerdown`,h0,!0),r.removeEventListener(`pointermove`,h0,!0),r.removeEventListener(`pointerup`,h0,!0)),c0.delete(n)}};function x0(e){o0=e,p0(e,null)}function S0(e){let{onChange:t,root:n}=e;y0(n),t({modality:o0});let r=()=>t({modality:o0});return s0.add(r),()=>{s0.delete(r)}}var C0={};__(C0,{DEFAULT_JUMP_ALPHABET:()=>U3,DEFAULT_THEME:()=>By,Jumplist:()=>r6,SIDEBAR_KEYBOARD_SHORTCUT:()=>Uv,SIDEBAR_WIDGET_DEFAULT_SNAP_POINT:()=>Gv,SIDEBAR_WIDGET_SNAP_POINTS:()=>Wv,SIDEBAR_WIDTH:()=>Bv,SIDEBAR_WIDTH_ICON:()=>Hv,SIDEBAR_WIDTH_MOBILE:()=>Vv,THEMES:()=>Ky,THEME_CLASS_PREFIX:()=>zy,THEME_NAMES:()=>qy,badgeVariants:()=>ov,buildWhichKeyTree:()=>$3,buttonVariants:()=>w0,captureDialogFocusTarget:()=>J0,cardBodyBase:()=>vv,cardCoverVariants:()=>gv,cardDescriptionBase:()=>xv,cardFooterBase:()=>yv,cardHeaderBase:()=>_v,cardTitleBase:()=>bv,cardVariants:()=>hv,centerBase:()=>pv,checkboxGroupBase:()=>S2,checkboxIndicatorBase:()=>b2,checkboxLabelBase:()=>x2,checkboxVariants:()=>y2,clipboardTriggerBase:()=>a4,cn:()=>Q,colBase:()=>lv,collectVisitedProxies:()=>J3,comboboxClearTriggerBase:()=>U2,comboboxContentBase:()=>G2,comboboxControlBase:()=>B2,comboboxEmptyBase:()=>X2,comboboxInputBase:()=>V2,comboboxItemGroupLabelBase:()=>K2,comboboxItemIndicatorBase:()=>J2,comboboxItemVariants:()=>q2,comboboxListBase:()=>Y2,comboboxPositionerBase:()=>W2,comboboxTriggerBase:()=>H2,commandMenuStyles:()=>o_,commandPaletteStyles:()=>a_,containerBase:()=>sv,createCommandTree:()=>Yg,createHelixPreset:()=>d6,createJumplist:()=>i6,createKakounePreset:()=>p6,createVimPreset:()=>f6,createWhichKeyController:()=>U6,cycleThemeModeValue:()=>Py,defaultListboxFilter:()=>f3,dialogBackdropBase:()=>I0,dialogCloseTriggerBase:()=>K0,dialogContentBase:()=>R0,dialogDescriptionBase:()=>B0,dialogFooterBase:()=>H0,dialogFooterStickyBase:()=>W0,dialogFullscreenContentBase:()=>G0,dialogHeaderBase:()=>V0,dialogHeaderStickyBase:()=>U0,dialogPositionerBase:()=>L0,dialogStyles:()=>q0,dialogTitleBase:()=>z0,eventToChordKeys:()=>D6,extractYouTubeId:()=>R4,feedbackCorrectBase:()=>Q4,feedbackExplanationBase:()=>e3,feedbackIncorrectBase:()=>$4,fetchYouTubeMetadata:()=>H4,fieldErrorBase:()=>s2,fieldHelperBase:()=>o2,fieldLabelBase:()=>a2,fieldRequiredIndicatorBase:()=>c2,fieldRootBase:()=>i2,fieldsetErrorBase:()=>f2,fieldsetHelperBase:()=>d2,fieldsetLegendBase:()=>u2,fieldsetRootBase:()=>l2,figureCaptionBase:()=>m4,figureImageBase:()=>p4,figureRootBase:()=>f4,findDirectionalPane:()=>t6,flattenKeymapEntries:()=>e6,formatKeyChord:()=>j3,formatKeySequence:()=>M3,formatTime:()=>z4,formatWhichKeyLabel:()=>Q3,generateJumpLabels:()=>n6,getDocumentWhichKeyController:()=>z6,getModalEditor:()=>d_,getNodeChildren:()=>q3,getPresetKeymap:()=>m6,hasThemeCss:()=>e2,hstackBase:()=>dv,inferPlatform:()=>O3,inputVariants:()=>p2,isChordCommandString:()=>P3,isGroupNode:()=>Z3,itemVariants:()=>mv,jumpBadgeMatchedPrefixBase:()=>lb,jumpBadgeVariants:()=>cb,jumpOverlayRootBase:()=>sb,kbdGroupBase:()=>w3,kbdVariants:()=>C3,lightSwitchButtonVariants:()=>Ny,listboxContentBase:()=>m3,listboxEmptyBase:()=>y3,listboxInputBase:()=>v3,listboxItemBase:()=>h3,listboxItemGroupBase:()=>x3,listboxItemGroupLabelBase:()=>S3,listboxItemIndicatorBase:()=>_3,listboxItemTextBase:()=>g3,listboxLabelBase:()=>b3,listboxRootBase:()=>p3,matchesCommandHotkey:()=>t_,mergeThemePresets:()=>$y,nativeSelectIconBase:()=>z2,nativeSelectVariants:()=>L2,nativeSelectWrapperBase:()=>R2,navbarActionsBase:()=>Cy,navbarActivationAreaBase:()=>Ey,navbarBrandBase:()=>by,navbarContainerBase:()=>_y,navbarDensityVariants:()=>vy,navbarMenuBase:()=>xy,navbarMenuContentBase:()=>Qv,navbarMenuIndicatorBase:()=>iy,navbarMenuItemBase:()=>Xv,navbarMenuLinkBase:()=>$v,navbarMenuListBase:()=>Yv,navbarMenuPlacementVariants:()=>Sy,navbarMenuRootBase:()=>Jv,navbarMenuTriggerStyle:()=>Zv,navbarMenuViewportBase:()=>ry,navbarMenuViewportPositionerBase:()=>ny,navbarMobileActionsBase:()=>Ay,navbarMobileBase:()=>Ty,navbarMobileContentBase:()=>Dy,navbarMobileHeaderBase:()=>Oy,navbarMobileMenuBase:()=>ky,navbarMobileMenuContentBase:()=>ey,navbarMobileMenuTriggerBase:()=>ty,navbarShrunkBase:()=>yy,navbarTriggerVariants:()=>wy,navbarVariants:()=>gy,nodeExplicitlyIncludesMode:()=>G3,nodeMatchesMode:()=>W3,normalizeNodeModes:()=>K3,noticeDescriptionBase:()=>d4,noticeTitleBase:()=>u4,noticeVariants:()=>l4,notifyAllModalEditors:()=>f_,numberInputControlBase:()=>g2,numberInputInputBase:()=>_2,numberInputRootBase:()=>h2,numberInputTriggerBase:()=>v2,pageContentBase:()=>Mv,pageFooterBase:()=>Nv,pageGutterAreaBase:()=>kv,pageGutterContentVariants:()=>jv,pageGutterVariants:()=>Av,pageSectionBase:()=>Pv,pageVariants:()=>Ov,paginationEllipsisBase:()=>hy,paginationItemBase:()=>my,paginationRootBase:()=>fy,paginationTriggerBase:()=>py,paneVariants:()=>ob,parseYouTubeChapters:()=>V4,popoverArrowBase:()=>A0,popoverCloseTriggerBase:()=>P0,popoverContentBase:()=>j0,popoverDescriptionBase:()=>N0,popoverIndicatorBase:()=>F0,popoverPositionerBase:()=>k0,popoverTitleBase:()=>M0,prevNextDirectionBase:()=>S4,prevNextLinkBase:()=>b4,prevNextLinkNextBase:()=>x4,prevNextRootBase:()=>y4,prevNextSpacerBase:()=>w4,prevNextTitleBase:()=>C4,proseVariants:()=>u3,questionCardBase:()=>U4,questionCheckButtonBase:()=>Y4,questionGroupBase:()=>G4,questionInputBase:()=>X4,questionOptionBase:()=>K4,questionOptionCorrectBase:()=>q4,questionOptionIncorrectBase:()=>J4,questionPromptBase:()=>W4,questionUnitBase:()=>Z4,quizHeaderBase:()=>n3,quizResetButtonBase:()=>l3,quizResultBase:()=>a3,quizResultTextBase:()=>s3,quizResultTitleBase:()=>o3,quizRootBase:()=>t3,quizScoreBase:()=>i3,quizSubmitButtonBase:()=>c3,quizTitleBase:()=>r3,radioGroupItemControlBase:()=>s4,radioGroupItemTextBase:()=>c4,radioGroupRootBase:()=>o4,readDocumentDarkMode:()=>Ly,readDocumentTheme:()=>t2,readSystemDarkMode:()=>Fy,registerCustomThemes:()=>Qy,registerModalEditor:()=>u_,resolveKbdSteps:()=>N3,resolveNode:()=>X3,restoreDialogFocusTarget:()=>Y0,revealChevronBase:()=>_4,revealContentBase:()=>v4,revealRootBase:()=>h4,revealTriggerBase:()=>g4,rowBase:()=>cv,scrollContentBase:()=>wv,scrollCornerBase:()=>Dv,scrollRootBase:()=>Sv,scrollScrollbarBase:()=>Tv,scrollThumbBase:()=>Ev,scrollViewportBase:()=>Cv,selectClearTriggerBase:()=>A2,selectContentBase:()=>M2,selectIndicatorBase:()=>k2,selectItemBase:()=>P2,selectItemGroupLabelBase:()=>N2,selectItemIndicatorBase:()=>I2,selectItemTextBase:()=>F2,selectPositionerBase:()=>j2,selectTriggerBase:()=>D2,selectValueBase:()=>O2,sidebarMenuButtonVariants:()=>Kv,sidebarStyles:()=>qv,splitterPanelBase:()=>Iv,splitterResizeTriggerBase:()=>Lv,splitterResizeTriggerIndicatorBase:()=>zv,splitterResizeTriggerSeparatorBase:()=>Rv,splitterRootBase:()=>Fv,stackBase:()=>uv,subscribeDocumentTheme:()=>r2,subscribeDocumentWhichKeyController:()=>B6,subscribeSystemDarkMode:()=>Iy,switchControlBase:()=>w2,switchLabelBase:()=>E2,switchThumbBase:()=>T2,switchVariants:()=>C2,syncDocumentDarkMode:()=>Ry,syncDocumentTheme:()=>n2,tabsContentBase:()=>dy,tabsIndicatorBase:()=>cy,tabsIndicatorVariants:()=>ly,tabsListBase:()=>oy,tabsListVariants:()=>sy,tabsRootBase:()=>ay,tabsTriggerBase:()=>uy,tagsInputClearTriggerBase:()=>i4,tagsInputControlBase:()=>Q2,tagsInputInputBase:()=>$2,tagsInputItemBase:()=>e4,tagsInputItemDeleteTriggerBase:()=>r4,tagsInputItemInputBase:()=>n4,tagsInputItemTextBase:()=>t4,tagsInputRootBase:()=>Z2,textareaBase:()=>m2,themeSelectorStyles:()=>Vy,toastActionTriggerBase:()=>B3,toastCloseTriggerBase:()=>V3,toastDescriptionBase:()=>z3,toastIconBase:()=>L3,toastTitleBase:()=>R3,toastVariants:()=>I3,toasterBase:()=>F3,toggleButtonVariants:()=>T0,toggleGroupRootVariants:()=>d3,tooltipArrowBase:()=>D0,tooltipContentBase:()=>O0,tooltipPositionerBase:()=>E0,validateKbdChord:()=>k3,validateKbdHotkey:()=>A3,vstackBase:()=>fv,whichKeyBodyVariants:()=>J6,whichKeyBreadcrumbBase:()=>q6,whichKeyExplorerContentBase:()=>$6,whichKeyExplorerHeaderBase:()=>eb,whichKeyExplorerHighlightMarkBase:()=>ab,whichKeyExplorerInputBase:()=>nb,whichKeyExplorerItemBase:()=>ib,whichKeyExplorerListContentBase:()=>rb,whichKeyExplorerListboxBase:()=>tb,whichKeyFooterBase:()=>Z6,whichKeyHeaderBase:()=>G6,whichKeyItemBase:()=>Y6,whichKeyItemLabelBase:()=>X6,whichKeyModeBadgeVariants:()=>Q6,whichKeyTitleBase:()=>K6,whichKeyVariants:()=>W6,windowBodyBase:()=>iv,windowCloseTriggerBase:()=>rv,windowContentBase:()=>Z0,windowControlBase:()=>tv,windowDragTriggerBase:()=>Q0,windowHeaderBase:()=>$0,windowPositionerBase:()=>X0,windowResizeTriggerBase:()=>av,windowStageTriggerBase:()=>nv,windowTitleBase:()=>ev,youtubeChapterButtonBase:()=>F4,youtubeChapterLabelBase:()=>L4,youtubeChapterTimeBase:()=>I4,youtubeChaptersBase:()=>j4,youtubeChaptersChevronBase:()=>N4,youtubeChaptersListBase:()=>P4,youtubeChaptersSummaryBase:()=>M4,youtubeDescriptionBase:()=>A4,youtubeFacadeBase:()=>D4,youtubePlayButtonBase:()=>O4,youtubePlayButtonInnerBase:()=>k4,youtubeRootBase:()=>T4,youtubeTitleBase:()=>E4});var w0=J(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{solid:``,outline:``,text:``},color:{primary:``,secondary:``,success:``,danger:``,warn:``,info:``},size:{sm:`h-9 px-3`,md:`h-10 px-4 py-2`,lg:`h-11 px-8`,icon:`size-10`}},compoundVariants:Object.entries({solid:{primary:`bg-primary text-primary-foreground hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,success:`bg-success text-success-foreground hover:bg-success/90`,danger:`bg-danger text-danger-foreground hover:bg-danger/90`,warn:`bg-warn text-warn-foreground hover:bg-warn/90`,info:`bg-info text-info-foreground hover:bg-info/90`},outline:{primary:`border border-primary/40 bg-background text-primary hover:bg-primary/10`,secondary:`border border-secondary-foreground/30 bg-background text-secondary-foreground hover:bg-secondary`,success:`border border-success/50 bg-background text-success hover:bg-success/10`,danger:`border border-danger/50 bg-background text-danger hover:bg-danger/10`,warn:`border border-warn/60 bg-background text-warn hover:bg-warn/15`,info:`border border-info/50 bg-background text-info hover:bg-info/10`},text:{primary:`bg-transparent text-primary hover:bg-primary/10`,secondary:`bg-transparent text-secondary-foreground hover:bg-secondary`,success:`bg-transparent text-success hover:bg-success/10`,danger:`bg-transparent text-danger hover:bg-danger/10`,warn:`bg-transparent text-warn hover:bg-warn/15`,info:`bg-transparent text-info hover:bg-info/10`}}).flatMap(([e,t])=>Object.entries(t).map(([t,n])=>({variant:e,color:t,className:n}))),defaultVariants:{variant:`solid`,color:`primary`,size:`md`}}),T0=J(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 min-w-9 px-2`,sm:`h-8 min-w-8 px-1.5`,lg:`h-10 min-w-10 px-2.5`}},defaultVariants:{variant:`default`,size:`default`}}),E0=`z-50 [--z-index:50]!`,D0=`[--arrow-size:0.5rem] [--arrow-background:var(--color-popover)] z-[60]! [--arrow-size-half:calc(var(--arrow-size)/2_+_1px)]!`,O0=`relative z-50 max-w-xs rounded-md border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md outline-none`,k0=`z-50 [--z-index:50]!`,A0=`[--arrow-size:0.5rem] [--arrow-background:var(--color-popover)] z-[60]! [--arrow-size-half:calc(var(--arrow-size)/2_+_1px)]!`,j0=`relative z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none`,M0=`text-sm font-semibold leading-none`,N0=`text-sm text-muted-foreground`,P0=`absolute end-3.5 top-3.5 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-[3px] focus:ring-ring/30 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,F0=`transition-transform data-[state=open]:rotate-180`,I0=`bg-black/50`,L0=`fixed inset-0 z-50 [--z-index:50]! flex items-start justify-center overflow-y-auto p-4`,R0=`relative z-50 my-auto grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg sm:rounded-lg outline-none`,z0=`text-lg font-semibold leading-none tracking-tight`,B0=`text-sm text-muted-foreground`,V0=`flex flex-col gap-2`,H0=`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,U0=`sticky top-0 z-10 bg-background`,W0=`sticky bottom-0 z-10 bg-background`,G0=`h-dvh w-full max-w-none rounded-none border-0 p-0 sm:rounded-none`,K0=`absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-[3px] focus:ring-ring/30 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,q0={backdrop:I0,positioner:L0,content:R0,title:z0,description:B0,header:V0,footer:H0,headerSticky:U0,footerSticky:W0,fullscreenContent:G0,closeTrigger:K0};function J0(e){if(typeof document>`u`||!(document.activeElement instanceof HTMLElement))return null;let t=document.activeElement;return t===document.body||t===document.documentElement||e?.contains(t)?null:t}function Y0(e,t){if(typeof window>`u`||typeof document>`u`)return;let n=()=>{let n=document.activeElement;if(n&&n!==document.body&&n!==document.documentElement&&n!==e&&(!t||!t.contains(n))&&!n.closest(`[data-state="closed"]`))return!0;let r=document.querySelector(`[role="dialog"][data-state="open"], [data-modal="true"]:not([data-state="closed"])`);return!!(r&&r!==t)};if(n())return;let r=()=>{n()||e&&document.contains(e)&&e.focus()};typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{n()||window.requestAnimationFrame(r)}):r()}var X0=`z-50 [--z-index:50]!`,Z0=`relative z-50 flex w-80 flex-col overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg`,Q0=`flex flex-col`,$0=`flex cursor-move items-center justify-between gap-2 border-b px-4 py-2.5`,ev=`text-sm font-semibold leading-none`,tv=`flex items-center gap-1`,nv=`inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus:outline-none focus:ring-[3px] focus:ring-ring/30 [&_svg]:size-3.5 [&_svg]:shrink-0`,rv=`inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus:outline-none focus:ring-[3px] focus:ring-ring/30 [&_svg]:size-3.5 [&_svg]:shrink-0`,iv=`flex flex-1 flex-col gap-4 overflow-auto p-4 text-sm`,av=`absolute bottom-0 right-0 size-4 cursor-se-resize`,ov=J(`inline-flex items-center gap-1 rounded-md border font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{solid:``,subtle:``,outline:``,surface:``,plain:``},color:{primary:``,secondary:``,success:``,danger:``,warn:``,info:``},size:{xs:`px-1.5 py-0.5 text-[10px]`,sm:`px-2 py-0.5 text-xs`,md:`px-2.5 py-1 text-xs`,lg:`px-3 py-1 text-sm`}},compoundVariants:Object.entries({solid:{primary:`border-transparent bg-primary text-primary-foreground`,secondary:`border-transparent bg-secondary text-secondary-foreground`,success:`border-transparent bg-success text-success-foreground`,danger:`border-transparent bg-danger text-danger-foreground`,warn:`border-transparent bg-warn text-warn-foreground`,info:`border-transparent bg-info text-info-foreground`},subtle:{primary:`border-transparent bg-primary/10 text-primary`,secondary:`border-transparent bg-secondary/10 text-secondary-foreground`,success:`border-transparent bg-success/10 text-success`,danger:`border-transparent bg-danger/10 text-danger`,warn:`border-transparent bg-warn/10 text-warn`,info:`border-transparent bg-info/10 text-info`},outline:{primary:`border-primary/40 bg-transparent text-primary`,secondary:`border-secondary-foreground/30 bg-transparent text-secondary-foreground`,success:`border-success/50 bg-transparent text-success`,danger:`border-danger/50 bg-transparent text-danger`,warn:`border-warn/50 bg-transparent text-warn`,info:`border-info/50 bg-transparent text-info`},surface:{primary:`border-primary/40 bg-primary/10 text-primary`,secondary:`border-secondary-foreground/30 bg-secondary text-secondary-foreground`,success:`border-success/50 bg-success/10 text-success`,danger:`border-danger/50 bg-danger/10 text-danger`,warn:`border-warn/50 bg-warn/10 text-warn`,info:`border-info/50 bg-info/10 text-info`},plain:{primary:`border-transparent bg-transparent text-primary`,secondary:`border-transparent bg-transparent text-secondary-foreground`,success:`border-transparent bg-transparent text-success`,danger:`border-transparent bg-transparent text-danger`,warn:`border-transparent bg-transparent text-warn`,info:`border-transparent bg-transparent text-info`}}).flatMap(([e,t])=>Object.entries(t).map(([t,n])=>({variant:e,color:t,className:n}))),defaultVariants:{variant:`subtle`,color:`primary`,size:`sm`}}),sv=`relative mx-auto w-full max-w-[90rem] px-4 md:px-6 lg:px-8`,cv=`flex flex-row`,lv=`flex flex-col`,uv=`flex flex-col gap-1`,dv=`flex flex-row gap-1`,fv=`flex flex-col gap-1`,pv=`flex items-center justify-center`,mv=J(`flex-1 p-3 text-sm`,{variants:{variant:{plain:``,surface:`rounded-md border border-border bg-card text-card-foreground`}},defaultVariants:{variant:`plain`}}),hv=J(`flex flex-col overflow-hidden rounded-lg border bg-card text-card-foreground`,{variants:{variant:{outline:`border-border shadow-xs`,elevated:`border-transparent shadow-md`,subtle:`border-transparent bg-muted`},size:{sm:`gap-3 p-3 [--card-padding:0.75rem]`,md:`gap-4 p-4 [--card-padding:1rem]`,lg:`gap-6 p-6 [--card-padding:1.5rem]`},orientation:{vertical:``,horizontal:`flex-row`}},defaultVariants:{variant:`outline`,size:`md`,orientation:`vertical`}}),gv=J(`shrink-0 overflow-hidden`,{variants:{variant:{flush:``,inset:`rounded-md`},orientation:{vertical:``,horizontal:``}},compoundVariants:[{variant:`flush`,orientation:`vertical`,className:`-mx-[var(--card-padding)] -mt-[var(--card-padding)]`},{variant:`flush`,orientation:`horizontal`,className:`-ml-[var(--card-padding)] -mt-[var(--card-padding)] -mb-[var(--card-padding)]`}],defaultVariants:{variant:`flush`,orientation:`vertical`}}),_v=`flex flex-col gap-1`,vv=``,yv=`flex items-center gap-2`,bv=`font-semibold leading-tight`,xv=`text-sm text-muted-foreground`,Sv=`relative flex h-full w-full flex-col overflow-hidden [--scrollbar-size:0.5rem] [--scrollbar-margin:2px]`,Cv=`flex h-full w-full flex-col rounded-[inherit] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,wv=`min-w-full`,Tv=`relative m-[var(--scrollbar-margin)] flex touch-none select-none rounded-full bg-border/10 opacity-0 transition-opacity duration-150 data-[hover]:opacity-100 data-[scrolling]:opacity-100 data-[orientation=vertical]:w-[var(--scrollbar-size)] data-[orientation=vertical]:flex-col data-[orientation=horizontal]:h-[var(--scrollbar-size)] data-[orientation=horizontal]:flex-row [&:not([data-overflow-x],[data-overflow-y])]:hidden`,Ev=`rounded-[inherit] bg-border/40 transition-colors data-[orientation=vertical]:w-full data-[orientation=horizontal]:h-full`,Dv=`m-[var(--scrollbar-margin)] bg-muted opacity-0 transition-opacity duration-150 data-[hover]:opacity-100`;function Q(...e){return X1(Fg(e))}var Ov=J(`min-h-svh w-full`,{variants:{variant:{default:`grid grid-cols-[auto_minmax(0,1fr)_auto] grid-rows-[minmax(100svh,1fr)_auto] [grid-template-areas:"left_content_right"_"footer_footer_footer"]`,landing:lv}},defaultVariants:{variant:`default`}}),kv=`h-full min-w-0 [grid-area:left]`,Av=J(`sticky top-0 h-svh w-4 shrink-0 overflow-hidden p-0.5 md:w-56 md:p-2 lg:w-72 lg:p-3`,{variants:{side:{left:``,right:``}},defaultVariants:{side:`left`}}),jv=J(`hidden h-full w-full flex-col md:flex`,{variants:{align:{start:`justify-start`,center:`justify-center`,end:`justify-end`}},defaultVariants:{align:`start`}}),Mv=`min-w-0 [grid-area:content]`,Nv=`w-full shrink-0 [grid-area:footer]`,Pv=Q(lv,`min-h-svh w-full`),Fv=``,Iv=``,Lv=`group relative grid place-items-center outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 data-[orientation=horizontal]:-mx-1 data-[orientation=horizontal]:min-w-2 data-[orientation=vertical]:-my-1 data-[orientation=vertical]:min-h-2`,Rv=`absolute bg-border group-data-[orientation=horizontal]:inset-y-0 group-data-[orientation=horizontal]:right-1 group-data-[orientation=horizontal]:w-px group-data-[orientation=vertical]:inset-x-0 group-data-[orientation=vertical]:bottom-1 group-data-[orientation=vertical]:h-px`,zv=`relative z-10 rounded-full border border-border bg-muted shadow-xs data-[dragging]:bg-muted-foreground data-[focus]:bg-accent data-[disabled]:hidden data-[orientation=horizontal]:h-6 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-6`,Bv=`16rem`,Vv=`18rem`,Hv=`3rem`,Uv=`b`,Wv=[.35,.5],Gv=.5,Kv=J(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}}),qv={wrapperClass:`group/sidebar-wrapper min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,containerClass:`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,mobileBackdropClass:`fixed inset-0 bg-black/50 select-none data-[state=open]:animate-[helical-fade-in_200ms_ease-out] data-[state=closed]:animate-[helical-fade-out_200ms_ease-in]`,mobilePositionerClass:`fixed inset-0 z-50 flex data-[swipe-direction=left]:justify-start data-[swipe-direction=left]:items-stretch data-[swipe-direction=down]:justify-center data-[swipe-direction=down]:items-end`,mobileContentClass:`relative flex h-full w-full flex-col bg-sidebar p-0 text-sidebar-foreground shadow-xl data-[swipe-direction=left]:w-(--sidebar-width) data-[swipe-direction=down]:max-h-[96svh] data-[swipe-direction=left]:data-[state=open]:animate-[helical-drawer-in-left_200ms_ease-out] data-[swipe-direction=left]:data-[state=closed]:animate-[helical-drawer-out-left_200ms_ease-in] data-[swipe-direction=down]:rounded-t-2xl data-[swipe-direction=down]:data-[state=open]:animate-[helical-drawer-in-down_200ms_ease-out] data-[swipe-direction=down]:data-[state=closed]:animate-[helical-drawer-out-down_200ms_ease-in]`,mobileGrabberClass:`flex w-full shrink-0 cursor-grab touch-none select-none items-center justify-center py-3 data-[dragging]:cursor-grabbing`,mobileGrabberIndicatorClass:`h-1 w-10 shrink-0 rounded-full bg-sidebar-border`,gapClass:`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear group-data-[collapsible=offcanvas]:w-0`,innerClass:`flex h-full w-full flex-col bg-sidebar data-[variant=floating]:rounded-lg data-[variant=floating]:border data-[variant=floating]:border-sidebar-border data-[variant=floating]:shadow-sm`,headerClass:`gap-2 p-2`,footerClass:`gap-2 p-2`,separatorClass:`mx-2 w-auto bg-sidebar-border`,contentClass:`min-h-0 flex-1 gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,groupClass:`relative w-full min-w-0 p-2`,groupLabelClass:`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,groupActionClass:`absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0 after:absolute after:-inset-2 md:after:hidden group-data-[collapsible=icon]:hidden`,groupContentClass:`w-full text-sm`,menuClass:`flex w-full min-w-0 flex-col gap-1`,menuItemClass:`group/menu-item relative`,menuActionClass:`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0 after:absolute after:-inset-2 md:after:hidden peer-data-[size=sm]/menu-button:top-1 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 group-data-[collapsible=icon]:hidden`,menuBadgeClass:`pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground peer-data-[size=sm]/menu-button:top-1 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 group-data-[collapsible=icon]:hidden`,menuSkeletonClass:`flex h-8 items-center gap-2 rounded-md px-2`,menuSubClass:`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden`,menuSubItemClass:`group/menu-sub-item relative`,menuSubButtonClass:`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[size=sm]:text-xs data-[size=md]:text-sm group-data-[collapsible=icon]:hidden`,triggerClass:`flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground ring-sidebar-ring outline-hidden transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,railClass:`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[side=left]:cursor-w-resize group-data-[side=right]:cursor-e-resize [[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize [[data-side=left][data-collapsible=offcanvas]_&]:-right-2 [[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,insetClass:`relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,inputClass:`h-8 w-full bg-background shadow-none`,tooltipContentClass:`z-50 w-auto rounded-md bg-sidebar-primary px-2 py-1.5 text-xs text-sidebar-primary-foreground`},Jv=`group/nav-menu relative flex max-w-max flex-1 items-center justify-center`,Yv=`group flex flex-1 list-none items-center justify-center gap-1`,Xv=`relative`,Zv=J(`group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-3 text-sm font-medium outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent`,{variants:{density:{relaxed:``,compact:`h-8 px-2 text-xs`},variant:{default:``,link:`bg-transparent px-3 text-muted-foreground hover:bg-transparent hover:text-primary focus:bg-transparent focus:text-primary focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-transparent data-[state=open]:text-primary data-[state=open]:hover:bg-transparent data-[state=open]:focus:bg-transparent data-[active=true]:bg-transparent data-[active=true]:text-primary`}},defaultVariants:{density:`relaxed`,variant:`default`}}),Qv=`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 left-0 top-0 w-full min-w-44 bg-popover p-2 text-popover-foreground md:absolute md:w-auto`,$v=`data-[active=true]:bg-accent data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring`,ey=`flex flex-col gap-1 py-1`,ty=`flex w-full items-center justify-between rounded-md px-3 py-2 text-sm font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,ny=`absolute left-0 top-full z-50 w-full`,ry=`absolute left-(--viewport-x) top-0 mt-1.5 h-(--viewport-height) w-(--viewport-width) overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md transition-[width,height] duration-200`,iy=`data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-50 flex h-1.5 items-end justify-center overflow-hidden`,ay=`flex flex-col gap-2 data-[orientation=vertical]:flex-row`,oy=`relative z-0 flex w-fit items-center justify-center gap-x-0.5 text-muted-foreground data-[orientation=vertical]:flex-col`,sy=J(``,{variants:{variant:{default:`rounded-lg`,underline:`data-[orientation=vertical]:px-1 data-[orientation=horizontal]:py-1`}},defaultVariants:{variant:`default`}}),cy=`absolute inset-x-0 bottom-0 h-(--height) w-(--width) transition-[width,translate] duration-200 ease-in-out motion-reduce:transition-none`,ly=J(``,{variants:{variant:{default:`-z-1 rounded-lg bg-accent`,underline:`z-10 bg-primary data-[orientation=horizontal]:h-0.5 data-[orientation=vertical]:w-0.5`}},defaultVariants:{variant:`default`}}),uy=`relative flex h-9 shrink-0 grow items-center justify-center gap-1.5 rounded-lg border border-transparent px-[calc(--spacing(2.5)-1px)] text-sm font-medium whitespace-nowrap transition-[color,background-color,box-shadow] data-[orientation=vertical]:w-full data-[orientation=vertical]:justify-start hover:text-foreground/72 aria-selected:text-foreground outline-none focus-visible:border-primary focus-visible:ring-3 focus-visible:ring-ring/30 data-disabled:pointer-events-none data-disabled:opacity-50 motion-reduce:transition-none sm:h-8 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,dy=`flex-1 outline-none`,fy=`mx-auto flex w-full justify-center gap-1`,py=`inline-flex h-9 items-center justify-center gap-2 whitespace-nowrap rounded-md px-3 text-sm font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0`,my=`inline-flex h-9 min-w-9 items-center justify-center whitespace-nowrap rounded-md px-3 text-sm font-medium tabular-nums text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[selected]:bg-accent data-[selected]:text-accent-foreground`,hy=`flex h-8 w-12 items-end justify-center text-muted-foreground pointer-events-none select-none [&_svg]:size-4`,gy=J(`w-full bg-background/80 backdrop-blur transition-[box-shadow,height,translate] duration-300`,{variants:{variant:{scroll:`border-b border-border`,sticky:`sticky top-0 z-50 border-b border-border data-[scrolled=true]:bg-background/95 data-[scrolled=true]:shadow-md`,shrink:`sticky top-0 z-50 border-b border-border data-[scrolled=true]:bg-background/95 data-[scrolled=true]:shadow-md`,hide:`sticky top-0 z-50 border-b border-border data-[scrolled=true]:bg-background/95 data-[scrolled=true]:shadow-md data-[hidden=true]:-translate-y-full`},floating:{false:``,true:`fixed inset-x-0 top-4 z-50 mx-auto w-[calc(100%-2rem)] max-w-6xl rounded-full border`}},defaultVariants:{variant:`sticky`,floating:!1}}),_y=`flex items-center justify-between transition-[height,gap,padding] duration-300`,vy=J(``,{variants:{density:{relaxed:`h-16 gap-4 px-4 md:px-6`,compact:`h-12 gap-1.5 px-2`}},defaultVariants:{density:`relaxed`}}),yy=`h-12`,by=`flex shrink-0 items-center gap-2`,xy=`hidden items-center md:flex`,Sy=J(``,{variants:{placement:{left:`justify-start`,center:`justify-center`,right:`justify-end`}},defaultVariants:{placement:`center`}}),Cy=`ml-auto hidden items-center gap-2 md:flex`,wy=J(`inline-flex h-9 w-9 items-center justify-center text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,{variants:{floating:{false:`rounded-md border border-border`,true:`rounded-full`}},defaultVariants:{floating:!1}}),Ty=`md:hidden`,Ey=`fixed inset-x-0 top-0 z-40 h-12`,Dy=`flex h-full flex-col bg-background`,Oy=`flex items-center justify-between gap-2 px-4 py-3`,ky=`flex flex-1 flex-col gap-1 overflow-y-auto px-4 py-2`,Ay=`flex items-center gap-2 border-t border-border px-4 py-4`,jy=`theme-`,My=`helical-ui`,Ny=J(`ml-auto h-[26px] w-[26px] p-1`);function Py(e){return e===`system`?`light`:e===`light`?`dark`:`system`}function Fy(){if(typeof window>`u`||typeof window.matchMedia!=`function`)return!1;try{return window.matchMedia(`(prefers-color-scheme: dark)`).matches}catch{return!1}}function Iy(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};try{let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=t=>e(t.matches);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}catch{return()=>{}}}function Ly(){return typeof document>`u`?Fy():document.documentElement.classList.contains(`dark`)}function Ry(e){if(typeof document>`u`)return;let t=document.documentElement;Array.from(t.classList).some(e=>e.startsWith(jy))||t.classList.add(`${jy}${My}`),t.classList.toggle(`dark`,e)}var zy=`theme-`,By=`helical-ui`,Vy={container:`max-h-64 overflow-y-auto rounded-md border border-border p-2`,grid:`grid grid-cols-2 gap-2`,swatch:J(`relative flex flex-col gap-1.5 overflow-hidden rounded-md border bg-background p-1.5 text-left text-foreground transition-colors`,{variants:{active:{true:`border-foreground`,false:`border-border hover:border-muted-foreground`}},defaultVariants:{active:!1}})},Hy=[{name:`amber-minimal`,label:`Amber Minimal`},{name:`amethyst-haze`,label:`Amethyst Haze`},{name:`anthropic`,label:`Anthropic`},{name:`anyscale`,label:`Anyscale`},{name:`bold-tech`,label:`Bold Tech`},{name:`bubblegum`,label:`Bubblegum`},{name:`caffeine`,label:`Caffeine`},{name:`candyland`,label:`Candyland`},{name:`catppuccin`,label:`Catppuccin`},{name:`claude`,label:`Claude`},{name:`claymorphism`,label:`Claymorphism`},{name:`clean-slate`,label:`Clean Slate`},{name:`cosmic-night`,label:`Cosmic Night`},{name:`cyberpunk`,label:`Cyberpunk`},{name:`darkmatter`,label:`Darkmatter`},{name:`default`,label:`Default`},{name:`doom-64`,label:`Doom 64`},{name:`elegant-luxury`,label:`Elegant Luxury`},{name:`graphite`,label:`Graphite`},{name:`green`,label:`Green`},{name:`kodama-grove`,label:`Kodama Grove`},{name:`lambda`,label:`Lambda`},{name:`mdbook`,label:`mdBook`},{name:`midnight-bloom`,label:`Midnight Bloom`},{name:`mocha-mousse`,label:`Mocha Mousse`},{name:`modern-minimal`,label:`Modern Minimal`},{name:`mono`,label:`Mono`},{name:`nature`,label:`Nature`},{name:`neo-brutalism`,label:`Neo Brutalism`},{name:`northern-lights`,label:`Northern Lights`},{name:`notebook`,label:`Notebook`},{name:`ocean-breeze`,label:`Ocean Breeze`},{name:`openai`,label:`Openai`},{name:`pastel-dreams`,label:`Pastel Dreams`},{name:`perpetuity`,label:`Perpetuity`},{name:`quantum-rose`,label:`Quantum Rose`},{name:`retro-arcade`,label:`Retro Arcade`},{name:`rose`,label:`Rose`},{name:`sage-garden`,label:`Sage Garden`},{name:`slate`,label:`Slate`},{name:`soft-pop`,label:`Soft Pop`},{name:`solar-dusk`,label:`Solar Dusk`},{name:`starry-night`,label:`Starry Night`},{name:`sunset-horizon`,label:`Sunset Horizon`},{name:`supabase`,label:`Supabase`},{name:`t3-chat`,label:`T3 Chat`},{name:`tangerine`,label:`Tangerine`},{name:`twitter`,label:`Twitter`},{name:`vercel`,label:`Vercel`},{name:`vintage-paper`,label:`Vintage Paper`},{name:`violet-bloom`,label:`Violet Bloom`},{name:`vitepress`,label:`Vitepress`},{name:`helical-ui`,label:`Helical UI`}],Uy=new Set(Hy.map(e=>e.name)),Wy=new Set,Gy=new Set,Ky=[...Hy],qy=Ky.map(e=>e.name);function Jy(){let e={theme:t2(),dark:Ly(),themes:[...Ky]};for(let t of Gy)t(e)}function Yy(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Xy(e,t){for(let n=0;n<e.length;n+=1){let r=e[n];if(r&&(`selectorText`in r&&typeof r.selectorText==`string`&&t.test(r.selectorText)||`cssRules`in r&&r.cssRules&&Xy(r.cssRules,t)))return!0}return!1}function Zy(e){if(e.css?.trim()&&Wy.add(e.name),typeof document>`u`||!e.css?.trim())return;let t=`style[data-helical-custom-theme="${e.name}"]`,n=document.head.querySelector(t);n||(n=document.createElement(`style`),n.setAttribute(`data-helical-custom-theme`,e.name),document.head.appendChild(n)),n.textContent!==e.css&&(n.textContent=e.css)}function Qy(e){let t=[],n=new Set;for(let r of e)n.has(r.name)||(Zy(r),t.push(r),n.add(r.name));for(let e of Ky)n.has(e.name)||(t.push(e),n.add(e.name));for(let e of Hy)n.has(e.name)||(t.push(e),n.add(e.name));let r=t.length!==Ky.length||t.some((e,t)=>Ky[t]?.name!==e.name);return Ky.splice(0,Ky.length,...t),qy.splice(0,qy.length,...t.map(e=>e.name)),r&&Jy(),t}var $y=Qy;function e2(e){if(!e)return!1;if(typeof document>`u`||!document.styleSheets||document.styleSheets.length===0)return Uy.has(e)||Wy.has(e);let t=RegExp(`\\.${zy}${Yy(e)}(?![a-zA-Z0-9_-])`);for(let e=0;e<document.styleSheets.length;e+=1){let n=document.styleSheets[e];if(n)try{if(n.cssRules&&Xy(n.cssRules,t))return!0}catch{}}return!1}function t2(){if(typeof document>`u`)return By;let e=Array.from(document.documentElement.classList);for(let t of e)if(t.startsWith(zy)){let e=t.slice(zy.length);if(e)return e}return By}function n2(e,t){let n=e2(e)?e:By;if(typeof document>`u`)return n;let r=document.documentElement,i=`${zy}${n}`,a=[];r.classList.forEach(e=>{e.startsWith(zy)&&e!==i&&a.push(e)});for(let e of a)r.classList.remove(e);return r.classList.contains(i)||r.classList.add(i),typeof t==`boolean`&&r.classList.toggle(`dark`,t),Jy(),n}function r2(e){if(Gy.add(e),typeof document>`u`||typeof MutationObserver>`u`)return()=>{Gy.delete(e)};let t=document.documentElement,n=new MutationObserver(()=>{e({theme:t2(),dark:Ly(),themes:[...Ky]})});return n.observe(t,{attributes:!0,attributeFilter:[`class`]}),()=>{Gy.delete(e),n.disconnect()}}var i2=`flex w-full flex-col gap-2 data-invalid:text-destructive`,a2=`flex w-fit select-none items-center gap-1 text-sm font-medium leading-none text-foreground`,o2=`text-sm text-muted-foreground`,s2=`text-sm text-destructive`,c2=`text-destructive`,l2=`flex flex-col gap-6`,u2=`mb-3 text-base font-medium`,d2=`text-sm text-muted-foreground`,f2=`text-sm text-destructive`,p2=J(`flex w-full min-w-0 rounded-md border border-input bg-transparent px-3 text-sm shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/24 data-invalid:border-destructive data-invalid:ring-[3px] data-invalid:ring-destructive/24`,{variants:{size:{sm:`h-8 px-2.5`,md:`h-9`,lg:`h-10`}},defaultVariants:{size:`md`}}),m2=`field-sizing-content flex min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/24 data-invalid:border-destructive data-invalid:ring-[3px] data-invalid:ring-destructive/24`,h2=`flex w-full flex-col items-start gap-2`,g2=`flex w-full items-center justify-between rounded-md border border-input bg-transparent shadow-xs transition-[box-shadow] outline-none focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/30 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/24 data-invalid:border-destructive data-invalid:ring-[3px] data-invalid:ring-destructive/24`,_2=`h-9 w-full min-w-0 flex-1 border-0 bg-transparent px-3 text-center text-sm tabular-nums shadow-none outline-none ring-0 focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50`,v2=`flex size-9 shrink-0 items-center justify-center text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,y2=J(`relative inline-flex size-4 shrink-0 items-center justify-center rounded-sm border border-input bg-transparent shadow-xs transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30 focus-visible:ring-offset-1 focus-visible:ring-offset-background data-invalid:border-destructive data-invalid:ring-[3px] data-invalid:ring-destructive/24 disabled:pointer-events-none disabled:opacity-50`,{variants:{size:{sm:`size-3.5`,md:`size-4`,lg:`size-5`}},defaultVariants:{size:`md`}}),b2=`flex size-full items-center justify-center text-primary-foreground data-[state=unchecked]:hidden [&_svg]:pointer-events-none [&_svg]:size-3 [&_svg]:shrink-0`,x2=`select-none text-sm font-medium leading-none`,S2=`flex flex-col gap-2`,C2=J(`inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-input p-0.5 shadow-xs transition-colors outline-none data-[state=checked]:bg-primary data-invalid:border-destructive data-invalid:ring-[3px] data-invalid:ring-destructive/24 focus-visible:ring-[3px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50`,{variants:{size:{sm:`h-5 w-9`,md:`h-6 w-11`,lg:`h-7 w-12`}},defaultVariants:{size:`md`}}),w2=`flex size-full items-center`,T2=`pointer-events-none block aspect-square h-full w-auto rounded-full bg-background shadow-sm transition-transform data-[state=checked]:translate-x-[calc(100%-1px)] data-[state=unchecked]:translate-x-0 dark:data-[state=unchecked]:bg-foreground`,E2=`select-none text-sm font-medium leading-none`,D2=`flex w-fit cursor-default items-center gap-2 whitespace-nowrap data-[placeholder-shown]:text-muted-foreground data-[state=open]:border-ring data-[state=open]:ring-[3px] data-[state=open]:ring-ring/30 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground`,O2=`flex min-w-0 items-center gap-2 truncate`,k2=`flex items-center justify-center text-muted-foreground`,A2=`flex items-center justify-center text-muted-foreground opacity-60 transition-opacity hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none [&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0`,j2=`z-50 [--z-index:50]!`,M2=`relative z-50 max-h-96 min-w-(--reference-width) overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none`,N2=`px-2 py-1.5 text-xs font-semibold text-muted-foreground`,P2=`relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 pe-8 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground`,F2=`flex w-full flex-1 items-center gap-2`,I2=`absolute inset-y-0 end-2 flex items-center justify-center text-foreground`,L2=J(`appearance-none w-full min-w-0 rounded-md border border-input bg-transparent pe-8 ps-2.5 text-sm shadow-xs transition-colors outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/24`,{variants:{size:{sm:`h-8`,md:`h-9`,lg:`h-10`}},defaultVariants:{size:`md`}}),R2=`relative w-fit [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground`,z2=`pointer-events-none absolute inset-y-0 end-2.5 flex items-center justify-center text-muted-foreground`,B2=`relative flex w-full flex-wrap items-center gap-1`,V2=`pe-8`,H2=`absolute inset-y-0 end-1 flex w-8 items-center justify-center text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,U2=`absolute inset-y-0 end-9 flex items-center justify-center text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none [&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0`,W2=`z-50 [--z-index:50]!`,G2=`relative z-50 max-h-96 min-w-48 overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none`,K2=`px-2 py-1.5 text-xs font-semibold text-muted-foreground`,q2=J(`relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground`,{variants:{showIndicator:{true:`pe-8`,false:`pe-2`}},defaultVariants:{showIndicator:!0}}),J2=`absolute inset-y-0 end-2 flex items-center justify-center text-foreground`,Y2=`flex flex-col`,X2=`px-2 py-1.5 text-center text-sm text-muted-foreground`,Z2=`flex w-full flex-col gap-2`,Q2=`flex w-full flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent p-1.5 shadow-xs transition-[box-shadow] outline-none focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/30 data-invalid:border-destructive data-invalid:ring-[3px] data-invalid:ring-destructive/24 data-disabled:pointer-events-none data-disabled:opacity-50`,$2=`min-w-12 flex-1 border-0 bg-transparent px-1 text-sm outline-none ring-0 placeholder:text-muted-foreground focus-visible:ring-0`,e4=`inline-flex h-6 max-w-full shrink-0 items-center gap-1 rounded-md border bg-secondary px-1.5 text-xs text-secondary-foreground outline-none data-[highlighted]:border-primary/30 data-[highlighted]:bg-primary/10`,t4=`truncate`,n4=`w-16 border-0 bg-transparent text-xs outline-none`,r4=`flex size-4 shrink-0 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none [&_svg]:pointer-events-none [&_svg]:size-3 [&_svg]:shrink-0`,i4=`ms-auto flex shrink-0 items-center justify-center self-center text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none [&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0`,a4=`inline-flex h-7 w-7 shrink-0 items-center justify-center gap-1.5 rounded-md text-xs text-muted-foreground transition-colors hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&_svg]:size-3.5 [&_svg]:shrink-0`,o4=`flex flex-col gap-2`,s4=`relative inline-flex size-4 shrink-0 items-center justify-center rounded-full border border-input bg-transparent shadow-xs transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30 focus-visible:ring-offset-1 focus-visible:ring-offset-background data-invalid:border-destructive data-invalid:ring-[3px] data-invalid:ring-destructive/24 data-[state=checked]:border-primary data-[state=checked]:text-primary disabled:pointer-events-none disabled:opacity-50`,c4=`select-none text-sm font-medium leading-none`,l4=J(`not-prose relative my-4 grid w-full items-center gap-y-0.5 rounded-lg border px-3 py-2.5 text-sm grid-cols-[0_1fr] has-[>svg]:grid-cols-[calc(var(--spacing)*3)_1fr] has-[>svg]:gap-x-2.5 [&>svg]:size-4`,{variants:{variant:{none:`bg-card text-card-foreground`,info:`border-info/30 bg-info/5 [&>svg]:text-info`,success:`border-success/30 bg-success/5 [&>svg]:text-success`,warning:`border-warn/30 bg-warn/5 [&>svg]:text-warn`,error:`border-danger/30 bg-danger/5 [&>svg]:text-danger`}},defaultVariants:{variant:`info`}}),u4=`col-start-2 min-h-4 font-semibold tracking-tight`,d4=`col-start-2 text-sm text-foreground [&_p]:leading-relaxed`,f4=`not-prose my-4 flex flex-col items-center`,p4=`rounded-lg border border-border`,m4=`mt-2 text-center text-sm text-muted-foreground`,h4=`not-prose my-4 overflow-hidden rounded-lg border border-border bg-muted/40`,g4=`flex w-full cursor-pointer items-center gap-2 px-3 py-2.5 text-sm font-semibold`,_4=`size-4 shrink-0 text-muted-foreground transition-transform duration-200 data-[state=open]:rotate-90`,v4=`border-t border-border px-3 py-2.5 text-sm text-foreground`,y4=`not-prose mt-8 flex flex-col gap-3 border-t border-border pt-6 sm:flex-row sm:justify-between`,b4=`group flex min-w-0 flex-1 flex-col rounded-lg border border-border px-4 py-3 no-underline transition-colors hover:border-primary`,x4=`items-end text-right`,S4=`text-xs font-medium text-muted-foreground`,C4=`truncate text-sm font-medium text-foreground transition-colors group-hover:text-primary`,w4=`flex-1`,T4=`not-prose my-4`,E4=`mb-2 text-lg font-semibold text-foreground`,D4=`group relative aspect-video w-full cursor-pointer overflow-hidden rounded-md border border-border bg-muted/40`,O4=`absolute inset-0 flex items-center justify-center`,k4=`flex items-center justify-center rounded-xl bg-red-600 px-4 py-2 text-white drop-shadow-lg transition-transform group-hover:scale-105`,A4=`mt-2 text-sm text-muted-foreground`,j4=`group mt-3 rounded-lg border border-border bg-muted/40`,M4=`flex cursor-pointer list-none items-center gap-2 px-3 py-2.5 text-sm font-medium [&::-webkit-details-marker]:hidden`,N4=`size-4 shrink-0 text-muted-foreground transition-transform duration-200 group-open:rotate-90`,P4=`border-t border-border px-2 py-2`,F4=`inline-flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,I4=`font-mono text-xs text-primary`,L4=`text-foreground`;function R4(e){try{let t=new URL(e),n=t.searchParams.get(`v`);if(n)return n;if(t.hostname===`youtu.be`)return t.pathname.slice(1)}catch{}return e}function z4(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60),i=String(n).padStart(2,`0`),a=String(r).padStart(2,`0`);return t>0?`${t}:${i}:${a}`:`${i}:${a}`}var B4=/^\s*\[?\(?(?:(\d+):)?(\d{1,2}):(\d{2})\)?\]?\s+(\S.*)$/;function V4(e){return e.split(`
3
3
  `).map(e=>{let t=B4.exec(e);return t?{t:(t[1]?Number(t[1]):0)*3600+Number(t[2])*60+Number(t[3]),label:t[4]}:null}).filter(e=>e!==null)}async function H4(e){let t=R4(e),n=await fetch(`https://noembed.com/embed?url=${encodeURIComponent(`https://www.youtube.com/watch?v=${t}`)}`);if(!n.ok)return{};let r=await n.json();return{title:r.title,description:r.description}}var U4=`not-prose my-4 rounded-lg border border-border bg-card p-4`,W4=`mb-3 text-sm font-medium text-foreground`,G4=`grid gap-2`,K4=`rounded-md px-3 py-2 transition-colors hover:bg-muted/60`,q4=`bg-success/10`,J4=`bg-destructive/10`,Y4=`mt-3 rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,X4=`h-9 w-32 rounded-md border border-input bg-background px-3 text-sm text-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50`,Z4=`text-sm text-muted-foreground`,Q4=`text-success`,$4=`text-destructive`,e3=`mt-1.5 text-sm text-muted-foreground`,t3=`not-prose my-6 rounded-lg border border-border bg-card/50 p-4`,n3=`mb-4 flex items-center justify-between gap-3`,r3=`text-base font-semibold text-foreground`,i3=`inline-flex items-center rounded-full bg-muted px-2.5 py-0.5 text-xs font-medium text-muted-foreground`,a3=`mt-4 rounded-lg border border-border bg-muted/40 p-4`,o3=`text-lg font-semibold text-foreground`,s3=`mt-1 text-sm text-muted-foreground`,c3=`rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,l3=`inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-3 py-1.5 text-sm font-medium text-foreground transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,u3=J([`text-foreground`,`max-w-none`,`[&>*:first-child]:mt-0`,`[&_h1]:font-bold [&_h1]:tracking-tight [&_h1]:mt-10 [&_h1]:mb-4`,`[&_h2]:font-semibold [&_h2]:tracking-tight [&_h2]:mt-8 [&_h2]:mb-3`,`[&_h3]:font-semibold [&_h3]:mt-6 [&_h3]:mb-2`,`[&_h4]:font-semibold [&_h4]:mt-4 [&_h4]:mb-2`,`[&_h5]:font-semibold [&_h5]:mt-4 [&_h5]:mb-1`,`[&_h6]:font-semibold [&_h6]:mt-4 [&_h6]:mb-1 [&_h6]:text-muted-foreground`,`[&_p]:my-4 [&_p]:leading-7`,`[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2 hover:[&_a]:opacity-80`,`[&_strong]:font-semibold`,`[&_ul]:my-4 [&_ul]:list-disc [&_ul]:pl-6`,`[&_ol]:my-4 [&_ol]:list-decimal [&_ol]:pl-6`,`[&_li]:my-1`,`[&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-4 [&_blockquote]:italic [&_blockquote]:text-muted-foreground`,`[&_hr]:my-8 [&_hr]:border-border`,`[&_code]:rounded [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:text-[0.875em]`,`[&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-4 [&_pre]:overflow-x-auto`,`[&_pre_code]:bg-transparent [&_pre_code]:p-0`,`[&_img]:rounded-lg [&_img]:my-6`,`[&_figure]:my-6`,`[&_figcaption]:mt-2 [&_figcaption]:text-center [&_figcaption]:text-sm [&_figcaption]:italic [&_figcaption]:text-muted-foreground`],{variants:{size:{sm:`text-sm [&_h1]:text-2xl [&_h2]:text-xl [&_h3]:text-lg [&_h4]:text-base [&_h5]:text-sm`,base:`text-base [&_h1]:text-4xl [&_h2]:text-2xl [&_h3]:text-xl [&_h4]:text-lg [&_h5]:text-base`,lg:`text-lg [&_h1]:text-5xl [&_h2]:text-3xl [&_h3]:text-2xl [&_h4]:text-xl [&_h5]:text-lg`}},defaultVariants:{size:`base`}}),d3=J(`inline-flex items-center`,{variants:{orientation:{horizontal:`flex-row`,vertical:`flex-col`},attached:{true:`gap-0 [&>*]:rounded-none [&>*]:shadow-none [&>*[data-state=on]]:z-10 [&>*[data-state=on]]:border-primary`,false:`gap-1`}},compoundVariants:[{orientation:`horizontal`,attached:!0,class:`[&>*:first-child]:rounded-s-md [&>*:last-child]:rounded-e-md [&>*:not(:first-child)]:-ms-px`},{orientation:`vertical`,attached:!0,class:`[&>*:first-child]:rounded-t-md [&>*:last-child]:rounded-b-md [&>*:not(:first-child)]:-mt-px`}],defaultVariants:{orientation:`horizontal`,attached:!1}});function f3(e,t){return!t||e.label.toLowerCase().includes(t.toLowerCase())}var p3=`flex flex-col overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-sm`,m3=`max-h-72 overflow-y-auto p-1 outline-none`,h3=`relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 pe-8 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=checked]:font-medium data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,g3=`flex w-full flex-1 items-center gap-2`,_3=`absolute inset-y-0 end-2 flex items-center justify-center text-foreground`,v3=`w-full border-b border-input bg-transparent px-2.5 py-1.5 text-sm outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30`,y3=`px-2 py-6 text-center text-sm text-muted-foreground`,b3=`px-2 py-1.5 text-xs font-semibold text-muted-foreground`,x3=`flex flex-col py-1 first:pt-0 last:pb-0`,S3=`px-2 py-1 text-[11px] font-semibold tracking-wider text-muted-foreground uppercase select-none`,C3=J(`inline-flex shrink-0 items-center justify-center gap-0.5 rounded border font-mono font-medium leading-none tracking-tight select-none`,{variants:{variant:{outline:`border-border border-b-2 bg-muted/70 text-foreground shadow-2xs`,subtle:`border-transparent bg-muted text-muted-foreground`,solid:`border-transparent bg-primary text-primary-foreground shadow-2xs`},size:{sm:`min-h-4 min-w-4 px-1 py-0.5 text-[10px]`,md:`min-h-5 min-w-5 px-1.5 py-0.5 text-xs`,lg:`min-h-6 min-w-6 px-2 py-1 text-sm`},invalid:{true:`border-destructive/70 bg-destructive/10 text-destructive line-through decoration-destructive/70`,false:``}},defaultVariants:{variant:`outline`,size:`md`,invalid:!1}}),w3=`inline-flex items-center gap-1`,T3={Space:`Space`,Spacebar:`Space`," ":`Space`,Escape:`Esc`,Esc:`Esc`,Backspace:`⌫`,Delete:`⌦`,Del:`⌦`,Enter:`↵`,Return:`↵`,Tab:`Tab`,ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`},E3=Ju;function D3(e){return e?Object.hasOwn(T3,e)||E3.has(e)||e.length===1&&E3.has(Xu(e))?!0:/^\[[A-Za-z][A-Za-z0-9]*\]$/.test(e)?Hd(e).valid:!1:!1}function O3(){return ad((typeof navigator<`u`?`${navigator.platform??``} ${navigator.userAgent??``}`.trim():void 0)||void 0)}function k3(e){let t=e.trim();if(!t)return{valid:!1,warnings:[],errors:[`Hotkey cannot be empty`]};if(t.length>1&&(t.startsWith(`+`)||/[^+]\+$/.test(t)||t.includes(`++`)&&!t.endsWith(`++`)))return{valid:!1,warnings:[],errors:[`Invalid hotkey format in '${t}': empty modifier or key part`]};let n=Hd(t);if(!n.valid)return n;if(t.includes(`+`)&&t.length>1){if(!Md(t))return{valid:!1,warnings:n.warnings,errors:[...n.errors,`Modifier-only chord '${t}' is missing an action key`]};let e=t.endsWith(`++`)?[...t.slice(0,-2).split(`+`),`+`]:t.split(`+`),r=e[e.length-1]?.trim()??``;return D3(r)?n:{valid:!1,warnings:n.warnings,errors:[...n.errors,`Unknown key: '${r}'`]}}return t.length===1||D3(t)||Ad(t)?n:{valid:!1,warnings:n.warnings,errors:[...n.errors,`Unknown key: '${t}'`]}}function A3(e){let t=Array.isArray(e)?e:typeof e==`string`?e.trim().split(/\s+/).filter(Boolean):[];if(t.length===0)return{valid:!1,warnings:[],errors:[`Hotkey cannot be empty`]};if(t.length===1)return k3(t[0]);let n=t.map(e=>k3(e));return{valid:n.every(e=>e.valid),warnings:n.flatMap((e,t)=>e.warnings.map(e=>`Step ${t+1}: ${e}`)),errors:n.flatMap((e,t)=>e.errors.map(e=>`Step ${t+1}: ${e}`))}}function j3(e,t){let n=e.trim();if(!n)return``;if(Object.hasOwn(T3,n))return T3[n];if(n.length===1)return n;if(/^Shift\+([a-zA-Z])$/.test(n))return n.slice(-1).toUpperCase();if(!k3(n).valid)return n;try{return Fd(n,{platform:O3(),useSymbols:t?.useSymbols??!0})||n}catch{return n}}function M3(e,t){return(typeof e==`string`?e.trim().split(/\s+/).filter(Boolean):e).map(e=>j3(e,t))}function N3(e,t){let n=Array.isArray(e)?[...e]:typeof e==`string`?e.trim().split(/\s+/).filter(Boolean):[];if(n.length===0){let n=`Hotkey cannot be empty`;return t?.warn!==!1&&console.warn(`[helical-ui/Kbd] Invalid hotkey "${String(e)}": ${n}`),{steps:[{raw:``,label:`?`,valid:!1,errors:[n],warnings:[]}],valid:!1,message:n}}let r=n.map(e=>{let n=k3(e);return{raw:e,label:n.valid?j3(e,t):e.trim()||`?`,valid:n.valid,errors:n.errors,warnings:n.warnings}}),i=r.every(e=>e.valid),a=r.flatMap((e,t)=>{let n=r.length>1?`Step ${t+1} (${e.raw}): `:``;return[...e.errors,...e.warnings].map(e=>`${n}${e}`)}),o=a.length>0?a.join(`; `):void 0;if(!i&&t?.warn!==!1){let t=Array.isArray(e)?e.join(` `):e;console.warn(`[helical-ui/Kbd] Invalid hotkey "${t}": ${o}`)}return{steps:r,valid:i,message:o}}function P3(e){let t=e.trim();if(!t||t.length<=1)return!1;if(t.includes(`+`))return!0;if(/\s+/.test(t)){let e=t.split(/\s+/).filter(Boolean);return e.length>1&&e.every(e=>k3(e).valid)}return!1}var F3=`w-[calc(100%-var(--viewport-offset-left))] sm:w-(--width) [--width:22.25rem] data-[align=center]:left-[calc(var(--viewport-offset-right)/2)]! sm:data-[align=center]:w-full`,I3=J(`z-(--z-index) translate-x-(--x) translate-y-(--y) opacity-(--opacity) data-[overlap]:scale-[calc(1-var(--index,0)*0.04)] relative w-[calc(100%-var(--viewport-offset-left))] sm:w-(--width) flex items-start justify-between gap-2.5 rounded-lg border border-border bg-popover px-3.5 py-3 text-sm text-popover-foreground shadow-lg select-none outline-none transition-[translate,scale,opacity,height] duration-250 ease-[cubic-bezier(0.21,1.02,0.73,1)] will-change-[translate,opacity,scale] data-[state=closed]:duration-200 data-[state=closed]:ease-[cubic-bezier(0.06,0.71,0.55,1)] motion-reduce:transition-none! data-[type=info]:border-info/30 data-[type=success]:border-success/30 data-[type=warning]:border-warn/30 data-[type=error]:border-danger/30`),L3=`mt-0.5 shrink-0 in-data-[type=warning]:text-warn in-data-[type=success]:text-success in-data-[type=error]:text-danger in-data-[type=info]:text-info in-data-[type=loading]:text-primary [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,R3=`text-sm font-medium leading-tight text-popover-foreground`,z3=`text-xs leading-relaxed text-muted-foreground`,B3=`inline-flex h-7 shrink-0 cursor-pointer items-center justify-center rounded-md border border-border bg-secondary px-2.5 text-xs font-medium text-secondary-foreground transition-colors hover:bg-secondary/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,V3=`inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground opacity-70 transition-opacity hover:bg-accent hover:text-accent-foreground hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 [&_svg]:pointer-events-none [&_svg]:size-3.5`,H3={};__(H3,{DEFAULT_JUMP_ALPHABET:()=>U3,Jumplist:()=>r6,buildWhichKeyTree:()=>$3,collectVisitedProxies:()=>J3,createHelixPreset:()=>d6,createJumplist:()=>i6,createKakounePreset:()=>p6,createVimPreset:()=>f6,createWhichKeyController:()=>U6,eventToChordKeys:()=>D6,findDirectionalPane:()=>t6,flattenKeymapEntries:()=>e6,formatWhichKeyLabel:()=>Q3,generateJumpLabels:()=>n6,getDocumentWhichKeyController:()=>z6,getModalEditor:()=>d_,getNodeChildren:()=>q3,getPresetKeymap:()=>m6,isGroupNode:()=>Z3,jumpBadgeMatchedPrefixBase:()=>lb,jumpBadgeVariants:()=>cb,jumpOverlayRootBase:()=>sb,nodeExplicitlyIncludesMode:()=>G3,nodeMatchesMode:()=>W3,normalizeNodeModes:()=>K3,notifyAllModalEditors:()=>f_,paneVariants:()=>ob,registerModalEditor:()=>u_,resolveNode:()=>X3,subscribeDocumentWhichKeyController:()=>B6,whichKeyBodyVariants:()=>J6,whichKeyBreadcrumbBase:()=>q6,whichKeyExplorerContentBase:()=>$6,whichKeyExplorerHeaderBase:()=>eb,whichKeyExplorerHighlightMarkBase:()=>ab,whichKeyExplorerInputBase:()=>nb,whichKeyExplorerItemBase:()=>ib,whichKeyExplorerListContentBase:()=>rb,whichKeyExplorerListboxBase:()=>tb,whichKeyFooterBase:()=>Z6,whichKeyHeaderBase:()=>G6,whichKeyItemBase:()=>Y6,whichKeyItemLabelBase:()=>X6,whichKeyModeBadgeVariants:()=>Q6,whichKeyTitleBase:()=>K6,whichKeyVariants:()=>W6}),y_(H3,Xp);var U3=`asdfghjklqwertyuiopzxcvbnm`;function W3(e,t){return!t||!e.mode?!0:Array.isArray(e.mode)?e.mode.includes(t):e.mode===t}function G3(e,t){return e.mode?Array.isArray(e.mode)?e.mode.includes(t):e.mode===t:!1}function K3(e){return e.mode?Array.isArray(e.mode)?e.mode:[e.mode]:[`normal`]}function q3(e,t,n=new Set){let r={},i=new Set(n);if(e.proxy&&e.proxy.length>0){let a=e.proxy.join(`>`);if(!n.has(a)){i.add(a);let n=Y3(t,e.proxy,void 0,i,t);n&&(r=q3(n,t,i))}}let a=e.expand?e.expand():{},o={...r,...a,...e.children??{}};if(i.size>0)for(let[e,t]of Object.entries(o))t.proxy&&t.proxy.length>0&&i.has(t.proxy.join(`>`))&&!t.action&&!t.commandId&&!t.children&&!t.expand&&delete o[e];return o}function J3(e,t,n=e){let r=new Set,i=e;for(let e=0;e<t.length;e+=1){let a=t[e];if(!a)break;let o=t.slice(0,e+1).join(`>`);r.add(o);let s=i[a];if(!s)break;e<t.length-1&&(i=q3(s,n,r),s.proxy&&s.proxy.length>0&&r.add(s.proxy.join(`>`)))}return r}function Y3(e,t,n,r,i=e){if(t.length===0)return null;let a=e,o=null,s=new Set(r);for(let e=0;e<t.length;e+=1){let r=t[e];if(!r)return null;let c=a[r];if(!c||n&&!W3(c,n)||c.proxy&&c.proxy.length>0&&s.has(c.proxy.join(`>`))&&!c.action&&!c.commandId&&!c.children&&!c.expand)return null;o=c,e<t.length-1&&(s.add(t.slice(0,e+1).join(`>`)),a=q3(c,i,s),c.proxy&&c.proxy.length>0&&s.add(c.proxy.join(`>`)))}return o}function X3(e,t,n,r=e){return Y3(e,t,n,new Set,r)}function Z3(e,t,n=new Set){let r=q3(e,t,n);return Object.keys(r).length>0}function Q3(e){let t=e.trim();if(!t.startsWith(`+`))return t;let n=t.slice(1).trim();return n?n.toLowerCase()===`goto`?`Go to`:n.charAt(0).toUpperCase()+n.slice(1):t}function $3(e,t,n){if(t.length===0)return{node:null,items:Object.values(e).filter(e=>!e.hidden&&W3(e,n)),title:`Commands`,breadcrumb:[],sticky:!1};let r=X3(e,t,n);if(!r)return{node:null,items:[],title:``,breadcrumb:t,sticky:!1};let i=q3(r,e,J3(e,t)),a=Object.values(i).filter(e=>!e.hidden&&W3(e,n)),o=!!(r.sticky||r.loop);if(!o&&r.proxy&&r.proxy.length>0){let t=X3(e,r.proxy,n);t&&(o=!!(t.sticky||t.loop))}return{node:r,items:a,title:r.group??r.label,breadcrumb:[...t],sticky:o}}function e6(e,t){let n=[],r=new Set;function i(a,o,s,c){for(let[l,u]of Object.entries(a)){if(u.hidden||t&&!W3(u,t))continue;let a=[...o,u.key||l],d=q3(u,e,c),f=Object.keys(d);if(f.length>0){let e=u.group??u.label.replace(/^\+/,``),t=[...s,e],n=new Set(c);u.proxy&&u.proxy.length>0&&n.add(u.proxy.join(`>`)),i(d,a,t,n)}if(u.commandId||u.action||f.length===0){if(f.length>0&&!u.commandId&&!u.action)continue;let e=a.join(` `),t=u.category??(s.length>0?s[0]:`General`),i=s.length>0?s.join(` / `):t,o=`${e}::${u.commandId??u.label}`;if(r.has(o))continue;r.add(o),n.push({id:o,chords:a,sequenceText:e,label:u.label,description:u.description??u.label,group:i,category:t,mode:K3(u),commandId:u.commandId,action:u.action})}}}return i(e,[],[],new Set),n}function t6(e,t,n){let r=e.x+e.width/2,i=e.y+e.height/2,a=null,o=1/0;for(let s of t){if(s.disabled||s.id===e.id||s.width<=0||s.height<=0)continue;let t=s.x+s.width/2,c=s.y+s.height/2,l=t-r,u=c-i,d=Math.max(0,Math.max(e.x,s.x)-Math.min(e.x+e.width,s.x+s.width)),f=Math.max(0,Math.max(e.y,s.y)-Math.min(e.y+e.height,s.y+s.height)),p=0,m=0;switch(n){case`left`:if(l>=-1)continue;p=-l,m=f;break;case`right`:if(l<=1)continue;p=l,m=f;break;case`up`:if(u>=-1)continue;p=-u,m=d;break;case`down`:if(u<=1)continue;p=u,m=d}let h=Math.hypot(l,u),g=p+m*2+h*.01;g<o&&(o=g,a=s)}return a}function n6(e,t=U3){if(e<=0)return[];let n=Array.from(new Set(t.split(``).filter(Boolean))),r=n.length;if(r===0)return[];if(r===1)return Array.from({length:e},(e,t)=>n[0].repeat(t+1));if(e<=r)return n.slice(0,e);let i=[...n];for(;i.length<e;){let t=i.shift();for(let r of n)if(i.push(t+r),i.length+(n.length-1)>=e&&i.length>=e)break}return i.slice(0,e)}var r6=class{stack=[];index=-1;maxSize;constructor(e=50){this.maxSize=Math.max(2,e)}push(e){let t=this.stack[this.index];t&&t.paneId===e.paneId&&t.element===e.element&&t.elementSelector===e.elementSelector||(this.index<this.stack.length-1&&(this.stack=this.stack.slice(0,this.index+1)),this.stack.push({...e,timestamp:e.timestamp??Date.now()}),this.stack.length>this.maxSize&&this.stack.shift(),this.index=this.stack.length-1)}back(e){if(this.stack.length===0)return null;if(e&&this.index===this.stack.length-1){let t=this.stack[this.index];t&&t.paneId===e.paneId&&t.element===e.element&&t.elementSelector===e.elementSelector||this.push(e)}return this.index<=0?null:(--this.index,this.stack[this.index]??null)}forward(){return this.index<0||this.index>=this.stack.length-1?null:(this.index+=1,this.stack[this.index]??null)}entries(){return this.stack}currentIndex(){return this.index}clear(){this.stack=[],this.index=-1}};function i6(e=50){return new r6(e)}function a6(){return{i:{key:`i`,label:`Inner`,group:`Inner Text Object`,category:`Match / Text Objects`,mode:[`normal`,`select`],children:{w:{key:`w`,label:`Inner Word`,description:`Select inner word (iw)`,category:`Match / Text Objects`,commandId:`textObject.iw`},p:{key:`p`,label:`Inner Paragraph`,description:`Select inner paragraph (ip)`,category:`Match / Text Objects`,commandId:`textObject.ip`},c:{key:`c`,label:`Inner Code Block`,description:`Select inner code block (ic)`,category:`Match / Text Objects`,commandId:`textObject.ic`},n:{key:`n`,label:`Inner Notice / Callout`,description:`Select inner notice or blockquote (in)`,category:`Match / Text Objects`,commandId:`textObject.in`},l:{key:`l`,label:`Inner List Item`,description:`Select inner list item (il)`,category:`Match / Text Objects`,commandId:`textObject.il`}}},a:{key:`a`,label:`Around`,group:`Around Text Object`,category:`Match / Text Objects`,mode:[`normal`,`select`],children:{w:{key:`w`,label:`Around Word`,description:`Select word and surrounding whitespace (aw)`,category:`Match / Text Objects`,commandId:`textObject.aw`},p:{key:`p`,label:`Around Paragraph`,description:`Select entire paragraph block (ap)`,category:`Match / Text Objects`,commandId:`textObject.ap`},c:{key:`c`,label:`Around Code Block`,description:`Select entire code block (ac)`,category:`Match / Text Objects`,commandId:`textObject.ac`},n:{key:`n`,label:`Around Notice / Callout`,description:`Select entire notice or blockquote (an)`,category:`Match / Text Objects`,commandId:`textObject.an`},l:{key:`l`,label:`Around List Item`,description:`Select entire list item (al)`,category:`Match / Text Objects`,commandId:`textObject.al`}}}}}function o6(){return{key:`Control+w`,label:`Window`,group:`Window / Pane`,category:`Window / Pane`,mode:[`normal`,`select`],children:{h:{key:`h`,label:`Focus Pane Left`,description:`Move focus to the pane on the left`,category:`Window / Pane`,commandId:`pane.left`},j:{key:`j`,label:`Focus Pane Down`,description:`Move focus to the pane below`,category:`Window / Pane`,commandId:`pane.down`},k:{key:`k`,label:`Focus Pane Up`,description:`Move focus to the pane above`,category:`Window / Pane`,commandId:`pane.up`},l:{key:`l`,label:`Focus Pane Right`,description:`Move focus to the pane on the right`,category:`Window / Pane`,commandId:`pane.right`},ArrowLeft:{key:`ArrowLeft`,label:`Focus Pane Left`,category:`Window / Pane`,commandId:`pane.left`,hidden:!0},ArrowDown:{key:`ArrowDown`,label:`Focus Pane Down`,category:`Window / Pane`,commandId:`pane.down`,hidden:!0},ArrowUp:{key:`ArrowUp`,label:`Focus Pane Up`,category:`Window / Pane`,commandId:`pane.up`,hidden:!0},ArrowRight:{key:`ArrowRight`,label:`Focus Pane Right`,category:`Window / Pane`,commandId:`pane.right`,hidden:!0},w:{key:`w`,label:`Cycle Next Pane`,description:`Cycle focus to the next registered pane`,category:`Window / Pane`,commandId:`pane.next`},W:{key:`W`,label:`Cycle Previous Pane`,description:`Cycle focus to the previous registered pane`,category:`Window / Pane`,commandId:`pane.prev`}}}}function s6(e=`Space`,t=`z`){return{key:e,label:`Leader`,group:`Leader`,category:`Leader`,mode:[`normal`,`select`],children:{"?":{key:`?`,label:`Explore Keybindings`,description:`Open searchable keybinding exploration menu (<leader>?)`,category:`Space`,commandId:`whichKey.openExplorer`},w:{key:`w`,label:`Window`,group:`Window / Pane`,description:`Spatial and indexed pane navigation`,category:`Window / Pane`,proxy:[`Control+w`]},j:{key:`j`,label:`Jump to Element`,description:`Show 2D home-row jump labels over visible controls`,category:`Navigation`,commandId:`jump.start`},g:{key:`g`,label:`Go to`,group:`Go to`,description:`Go to locations and boundaries`,category:`Goto`,proxy:[`g`]},v:{key:`v`,label:`View`,group:`View / Scroll`,description:`Scroll and align viewport`,category:`View`,proxy:[t]},k:{key:`k`,label:`Preset`,group:`Keybinding Preset`,description:`Switch modal grammar (Helix / Vim / Kakoune)`,category:`Space`,children:{h:{key:`h`,label:`Helix Preset`,description:`Switch to Helix selection-first grammar (default)`,category:`Preset`,commandId:`preset.helix`},v:{key:`v`,label:`Vim Preset`,description:`Switch to Vim operator-motion grammar`,category:`Preset`,commandId:`preset.vim`},k:{key:`k`,label:`Kakoune Preset`,description:`Switch to Kakoune object-verb grammar`,category:`Preset`,commandId:`preset.kakoune`}}}}}}function c6(e,t){return{key:e,label:`View`,group:`View`,category:`View`,mode:[`normal`,`select`],children:{[t]:{key:t,label:`Center Viewport`,description:`Center the focused item in the viewport`,category:`View`,commandId:`view.center`},c:{key:`c`,label:`Center Viewport`,description:`Center the focused item in the viewport`,category:`View`,commandId:`view.center`},t:{key:`t`,label:`Align Top`,description:`Align focused item to top of viewport`,category:`View`,commandId:`view.top`},b:{key:`b`,label:`Align Bottom`,description:`Align focused item to bottom of viewport`,category:`View`,commandId:`view.bottom`},j:{key:`j`,label:`Scroll Down`,description:`Scroll active pane down`,category:`View`,commandId:`view.scrollDown`},k:{key:`k`,label:`Scroll Up`,description:`Scroll active pane up`,category:`View`,commandId:`view.scrollUp`}}}}function l6(){return{"[":{key:`[`,label:`Previous`,group:`Previous (Unimpaired)`,category:`Unimpaired`,mode:[`normal`,`select`],children:{s:{key:`s`,label:`Previous Section`,description:`Jump to previous heading or PageSection`,category:`Unimpaired`,commandId:`section.prev`},t:{key:`t`,label:`Previous Tab`,description:`Switch to previous tab in active tablist ([t)`,category:`Unimpaired`,commandId:`tab.prev`},p:{key:`p`,label:`Previous Paragraph / Section`,description:`Jump to previous paragraph or section`,category:`Unimpaired`,commandId:`motion.paragraphBackward`},f:{key:`f`,label:`Previous Focusable Block`,description:`Move focus to previous interactive control`,category:`Unimpaired`,commandId:`focus.prevBlock`},Space:{key:`Space`,label:`Blank Line Above`,description:`Insert blank line above current block`,category:`Unimpaired`,commandId:`operator.openAbove`}}},"]":{key:`]`,label:`Next`,group:`Next (Unimpaired)`,category:`Unimpaired`,mode:[`normal`,`select`],children:{s:{key:`s`,label:`Next Section`,description:`Jump to next heading or PageSection`,category:`Unimpaired`,commandId:`section.next`},t:{key:`t`,label:`Next Tab`,description:`Switch to next tab in active tablist (]t)`,category:`Unimpaired`,commandId:`tab.next`},p:{key:`p`,label:`Next Paragraph / Section`,description:`Jump to next paragraph or section`,category:`Unimpaired`,commandId:`motion.paragraphForward`},f:{key:`f`,label:`Next Focusable Block`,description:`Move focus to next interactive control`,category:`Unimpaired`,commandId:`focus.nextBlock`},Space:{key:`Space`,label:`Blank Line Below`,description:`Insert blank line below current block`,category:`Unimpaired`,commandId:`operator.openBelow`}}}}}function u6(){return{h:{key:`h`,label:`Move Left`,description:`Move cursor or focus left`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.left`,hidden:!0},j:{key:`j`,label:`Move Down / Next Item`,description:`Step focus to next item or line down`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.down`,hidden:!0},k:{key:`k`,label:`Move Up / Previous Item`,description:`Step focus to previous item or line up`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.up`,hidden:!0},l:{key:`l`,label:`Move Right`,description:`Move cursor or focus right`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.right`,hidden:!0},w:{key:`w`,label:`Next Word`,description:`Select or move to next word (w)`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.wordForward`},b:{key:`b`,label:`Previous Word`,description:`Select or move to previous word (b)`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.wordBackward`},e:{key:`e`,label:`Word End`,description:`Select or move to end of word (e)`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.wordEnd`},"{":{key:`{`,label:`Previous Paragraph / Section`,description:`Jump to previous paragraph or section ({)`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.paragraphBackward`},"}":{key:`}`,label:`Next Paragraph / Section`,description:`Jump to next paragraph or section (})`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.paragraphForward`},0:{key:`0`,label:`Start of Line / Group`,description:`Move to beginning of line or group (0)`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.lineStart`},$:{key:`$`,label:`End of Line / Group`,description:`Move to end of line or group ($)`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.lineEnd`},i:{key:`i`,label:`Insert Mode`,description:`Enter insert mode at start of selection or control`,category:`Mode / Operator`,mode:[`normal`,`select`],commandId:`operator.insertStart`},a:{key:`a`,label:`Append / Insert After`,description:`Enter insert mode at end of selection or control`,category:`Mode / Operator`,mode:[`normal`],commandId:`operator.appendEnd`},o:{key:`o`,label:`Open Line Below`,description:`Open new paragraph below and enter insert mode`,category:`Mode / Operator`,mode:[`normal`,`select`],commandId:`operator.openBelow`},O:{key:`O`,label:`Open Line Above`,description:`Open new paragraph above and enter insert mode`,category:`Mode / Operator`,mode:[`normal`,`select`],commandId:`operator.openAbove`},d:{key:`d`,label:`Delete Selection`,description:`Delete active selection and store in register`,category:`Operator`,mode:[`normal`,`select`],commandId:`operator.delete`},c:{key:`c`,label:`Change Selection`,description:`Delete selection and enter insert mode`,category:`Operator`,mode:[`normal`,`select`],commandId:`operator.change`},y:{key:`y`,label:`Yank Selection`,description:`Copy selection slice into register`,category:`Operator`,mode:[`normal`,`select`],commandId:`operator.yank`},p:{key:`p`,label:`Paste After`,description:`Paste yanked slice after selection`,category:`Operator`,mode:[`normal`,`select`],commandId:`operator.pasteAfter`},P:{key:`P`,label:`Paste Before`,description:`Paste yanked slice before selection`,category:`Operator`,mode:[`normal`,`select`],commandId:`operator.pasteBefore`},u:{key:`u`,label:`Undo`,description:`Undo last editor transaction`,category:`Operator`,mode:[`normal`,`select`],commandId:`operator.undo`},"Control+o":{key:`Control+o`,label:`Jump Back`,description:`Navigate backward in Jumplist history`,category:`Navigation`,mode:[`normal`,`select`],commandId:`jumplist.back`},"Control+i":{key:`Control+i`,label:`Jump Forward`,description:`Navigate forward in Jumplist history`,category:`Navigation`,mode:[`normal`,`select`],commandId:`jumplist.forward`},"?":{key:`?`,label:`Explore Keybindings`,description:`Open searchable keybinding exploration menu (?)`,category:`Navigation`,mode:[`normal`,`select`],commandId:`whichKey.openExplorer`}}}function d6(e=`Space`){let t=a6(),n=l6();return{...u6(),[e]:s6(e,`z`),"Control+w":o6(),g:{key:`g`,label:`Go to`,group:`Go to`,category:`Goto`,mode:[`normal`,`select`],children:{g:{key:`g`,label:`Go to Top`,description:`Jump to first item or top of document (gg)`,category:`Goto`,commandId:`motion.docStart`},e:{key:`e`,label:`Go to End`,description:`Jump to last item or bottom of document (ge)`,category:`Goto`,commandId:`motion.docEnd`},h:{key:`h`,label:`Line / Group Start`,description:`Move to start of line or control group (gh)`,category:`Goto`,commandId:`motion.lineStart`},l:{key:`l`,label:`Line / Group End`,description:`Move to end of line or control group (gl)`,category:`Goto`,commandId:`motion.lineEnd`},c:{key:`c`,label:`Window Center`,description:`Jump to center of visible viewport (gc)`,category:`Goto`,commandId:`view.center`},b:{key:`b`,label:`Go to Bottom`,description:`Jump to last item or bottom of document (gb)`,category:`Goto`,commandId:`motion.docEnd`},n:{key:`n`,label:`Next Tab / Section`,description:`Switch to next tab or section (gn)`,category:`Goto`,commandId:`tab.next`},p:{key:`p`,label:`Previous Tab / Section`,description:`Switch to previous tab or section (gp)`,category:`Goto`,commandId:`tab.prev`},t:{key:`t`,label:`Next Tab`,description:`Switch to next tab or section (gt)`,category:`Goto`,commandId:`tab.next`},T:{key:`T`,label:`Previous Tab`,description:`Switch to previous tab or section (gT)`,category:`Goto`,commandId:`tab.prev`},w:{key:`w`,label:`Jump Label (2D)`,description:`Overlay 2D home-row jump labels (gw)`,category:`Goto`,commandId:`jump.start`}}},z:c6(`z`,`z`),Z:{key:`Z`,label:`Sticky View`,group:`View (Sticky)`,description:`Lock View menu open until Escape`,category:`View`,mode:[`normal`,`select`],sticky:!0,loop:!0,proxy:[`z`]},m:{key:`m`,label:`Match`,group:`Match / Text Objects`,category:`Match / Text Objects`,mode:[`normal`,`select`],children:{m:{key:`m`,label:`Goto Matching Bracket / Flip`,description:`Flip selection anchor and head (mm)`,category:`Match / Text Objects`,commandId:`selection.flip`},...t}},v:{key:`v`,label:`Select / Extend Mode`,description:`Toggle Helix select/extend mode (v)`,category:`Selection`,mode:[`normal`,`select`],commandId:`mode.toggleSelect`},x:{key:`x`,label:`Select Line`,description:`Select current line or extend to next line (x)`,category:`Selection`,mode:[`normal`,`select`],commandId:`motion.lineSelect`},";":{key:`;`,label:`Collapse Selection`,description:`Collapse selection to cursor head (;)`,category:`Selection`,mode:[`normal`,`select`],commandId:`selection.collapse`},"Alt+;":{key:`Alt+;`,label:`Flip Selection Direction`,description:`Swap selection anchor and head (Alt-;)`,category:`Selection`,mode:[`normal`,`select`],commandId:`selection.flip`},C:{key:`C`,label:`Copy Selection Below`,description:`Add secondary cursor on next line/block (C)`,category:`Selection`,mode:[`normal`,`select`],commandId:`selection.addCursorBelow`},",":{key:`,`,label:`Keep Primary Selection`,description:`Clear secondary cursors and keep primary selection (,)`,category:`Selection`,mode:[`normal`,`select`],commandId:`selection.keepPrimary`},U:{key:`U`,label:`Redo`,description:`Redo last undone editor transaction (U)`,category:`Operator`,mode:[`normal`,`select`],commandId:`operator.redo`},...n}}function f6(e=`Space`){let t=a6(),n=l6();return{...u6(),[e]:s6(e,`z`),"Control+w":o6(),g:{key:`g`,label:`Go to`,group:`Go to`,category:`Goto`,mode:[`normal`,`select`],children:{g:{key:`g`,label:`First Line / Top`,description:`Jump to first item or top of document (gg)`,category:`Goto`,commandId:`motion.docStart`},e:{key:`e`,label:`Backward Word End / Bottom`,description:`Jump to bottom of pane or document (ge)`,category:`Goto`,commandId:`motion.docEnd`},b:{key:`b`,label:`Last Line / Bottom`,description:`Jump to last item or bottom of document (gb)`,category:`Goto`,commandId:`motion.docEnd`},h:{key:`h`,label:`Start of Line`,description:`Move to start of line or group (gh)`,category:`Goto`,commandId:`motion.lineStart`},l:{key:`l`,label:`End of Line`,description:`Move to end of line or group (gl)`,category:`Goto`,commandId:`motion.lineEnd`},t:{key:`t`,label:`Next Tab / Section`,description:`Go to next tab or section (gt)`,category:`Goto`,commandId:`tab.next`},T:{key:`T`,label:`Previous Tab / Section`,description:`Go to previous tab or section (gT)`,category:`Goto`,commandId:`tab.prev`},n:{key:`n`,label:`Next Tab / Section`,description:`Go to next tab or section (gn)`,category:`Goto`,commandId:`tab.next`},p:{key:`p`,label:`Previous Tab / Section`,description:`Go to previous tab or section (gp)`,category:`Goto`,commandId:`tab.prev`},w:{key:`w`,label:`Jump Label (2D)`,description:`Overlay 2D home-row jump labels (gw)`,category:`Goto`,commandId:`jump.start`}}},G:{key:`G`,label:`Last Line / Bottom`,description:`Jump immediately to bottom of pane or document (G)`,category:`Motion`,mode:[`normal`,`select`],commandId:`motion.docEnd`},s:{key:`s`,label:`Flash / Sneak Jump`,description:`Trigger 2D forward jump labels (s)`,category:`Navigation`,mode:[`normal`,`select`],commandId:`jump.start`},v:{key:`v`,label:`Visual Mode`,description:`Toggle characterwise Visual selection mode (v)`,category:`Mode`,mode:[`normal`,`select`],commandId:`mode.toggleSelect`},V:{key:`V`,label:`Visual Line Mode`,description:`Select entire line in Visual Line mode (V)`,category:`Mode`,mode:[`normal`,`select`],commandId:`motion.lineSelect`},z:c6(`z`,`z`),m:{key:`m`,label:`Text Objects`,group:`Text Objects`,category:`Match / Text Objects`,mode:[`normal`,`select`],children:t},"Control+r":{key:`Control+r`,label:`Redo`,description:`Redo last undone editor transaction (Ctrl-r)`,category:`Operator`,mode:[`normal`,`select`],commandId:`operator.redo`},...n}}function p6(e=`Space`){let t=a6(),n=l6();return{...u6(),[e]:s6(e,`v`),"Control+w":o6(),g:{key:`g`,label:`Go to`,group:`Go to`,category:`Goto`,mode:[`normal`,`select`],children:{g:{key:`g`,label:`Buffer Top`,description:`Go to top of buffer or first item (gg)`,category:`Goto`,commandId:`motion.docStart`},k:{key:`k`,label:`Buffer Top`,description:`Go to top of buffer (gk)`,category:`Goto`,commandId:`motion.docStart`},j:{key:`j`,label:`Buffer Bottom`,description:`Go to bottom of buffer (gj)`,category:`Goto`,commandId:`motion.docEnd`},e:{key:`e`,label:`Buffer End`,description:`Go to end of buffer (ge)`,category:`Goto`,commandId:`motion.docEnd`},h:{key:`h`,label:`Line Start`,description:`Go to start of line or group (gh)`,category:`Goto`,commandId:`motion.lineStart`},l:{key:`l`,label:`Line End`,description:`Go to end of line or group (gl)`,category:`Goto`,commandId:`motion.lineEnd`},c:{key:`c`,label:`Window Center`,description:`Go to center of visible window (gc)`,category:`Goto`,commandId:`view.center`},b:{key:`b`,label:`Buffer Bottom`,description:`Go to bottom of buffer or last item (gb)`,category:`Goto`,commandId:`motion.docEnd`},a:{key:`a`,label:`Previous Location`,description:`Jump to alternate / previous location (ga)`,category:`Goto`,commandId:`jumplist.back`},n:{key:`n`,label:`Next Tab / Section`,description:`Switch to next tab or section (gn)`,category:`Goto`,commandId:`tab.next`},p:{key:`p`,label:`Previous Tab / Section`,description:`Switch to previous tab or section (gp)`,category:`Goto`,commandId:`tab.prev`},t:{key:`t`,label:`Next Tab`,description:`Switch to next tab or section (gt)`,category:`Goto`,commandId:`tab.next`},T:{key:`T`,label:`Previous Tab`,description:`Switch to previous tab or section (gT)`,category:`Goto`,commandId:`tab.prev`},w:{key:`w`,label:`Jump Label (2D)`,description:`Overlay 2D home-row jump labels (gw)`,category:`Goto`,commandId:`jump.start`}}},v:c6(`v`,`v`),V:{key:`V`,label:`Lock View`,group:`View (Lock)`,description:`Lock Kakoune View mode open until Escape (V)`,category:`View`,mode:[`normal`,`select`],sticky:!0,loop:!0,proxy:[`v`]},m:{key:`m`,label:`Object`,group:`Object / Match`,category:`Match / Text Objects`,mode:[`normal`,`select`],children:t},x:{key:`x`,label:`Select Line`,description:`Select current line (x)`,category:`Selection`,mode:[`normal`,`select`],commandId:`motion.lineSelect`},";":{key:`;`,label:`Reduce Selection to Cursor`,description:`Collapse selection to single cursor (;)`,category:`Selection`,mode:[`normal`,`select`],commandId:`selection.collapse`},"Alt+;":{key:`Alt+;`,label:`Flip Selection Direction`,description:`Swap anchor and cursor (Alt-;)`,category:`Selection`,mode:[`normal`,`select`],commandId:`selection.flip`},C:{key:`C`,label:`Copy Selection on Next Line`,description:`Add secondary selection on next line (C)`,category:`Selection`,mode:[`normal`,`select`],commandId:`selection.addCursorBelow`},",":{key:`,`,label:`Keep Main Selection`,description:`Clear secondary selections (,)`,category:`Selection`,mode:[`normal`,`select`],commandId:`selection.keepPrimary`},U:{key:`U`,label:`Redo`,description:`Redo last undone change (U)`,category:`Operator`,mode:[`normal`,`select`],commandId:`operator.redo`},...n}}function m6(e,t=`Space`){switch(e){case`vim`:return f6(t);case`kakoune`:return p6(t);default:return d6(t)}}var h6={overlay:60,widget:50,extension:40,editor:30,pane:20,global:10};function g6(e){try{return typeof e.enabled==`function`?!!e.enabled():!!e.enabled}catch{return!1}}function _6(e){try{return(typeof e.nodes==`function`?e.nodes():e.nodes)??{}}catch{return{}}}function v6(e){if(!e.hasElementOption)return null;try{return(typeof e.element==`function`?e.element():e.element)??null}catch{return null}}function y6(e,t){if(!t)return!1;if(e===t)return!0;if(typeof e.contains==`function`)try{if(e.contains(t))return!0}catch{}let n=t.parentElement;for(;n;){if(n===e)return!0;n=n.parentElement}return!1}function b6(e){let t=0,n=e.parentElement;for(;n;)t+=1,n=n.parentElement;return t}function x6(e,t){if(!!e.isPreset!=!!t.isPreset)return e.isPreset?1:-1;let n=e.priority===`overlay`;if(n!==(t.priority===`overlay`))return n?-1:1;if(e.matchedElement&&t.matchedElement){if(e.matchedElement!==t.matchedElement){if(y6(e.matchedElement,t.matchedElement))return 1;if(y6(t.matchedElement,e.matchedElement))return-1;if(t.elementDepth!==e.elementDepth)return t.elementDepth-e.elementDepth}}else if(e.matchedElement&&!t.matchedElement)return-1;else if(!e.matchedElement&&t.matchedElement)return 1;let r=h6[t.priority]-h6[e.priority];return r===0?t.registrationOrder-e.registrationOrder:r}function S6(e,t){let n={...e};for(let[e,r]of Object.entries(t)){let t=n[e];n[e]=t&&t.children&&r.children?{...t,...r,children:S6(t.children,r.children)}:r}return n}function C6(e){return!e||typeof e!=`object`?!1:typeof Element<`u`&&e instanceof Element||`parentElement`in e||`tagName`in e}function w6(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement||`parentElement`in e||`tagName`in e}function T6(e){if(!e||!w6(e)||e.closest?.(`[data-modal-ignore-pointer]`))return!1;let t=typeof e.tagName==`string`?e.tagName.toLowerCase():``;if(d_(e))return!e.closest?.(`[contenteditable="false"]`)||t===`input`||t===`textarea`;if(e.isContentEditable||e.getAttribute?.(`contenteditable`)===`true`)return!0;if(t===`textarea`)return!e.disabled&&!e.readOnly;if(t===`input`){let t=e;return t.disabled||t.readOnly?!1:!new Set([`button`,`checkbox`,`color`,`file`,`hidden`,`image`,`radio`,`range`,`reset`,`submit`]).has((t.type||`text`).toLowerCase())}try{return eh(e)}catch{return!1}}function E6(e){let t=[],n=e=>{e&&!t.includes(e)&&t.push(e)};for(let t of e)n(t),t.includes(`+`)&&t.length>1&&n(t.replace(/\b(Control|Ctrl|Alt|Shift|Meta|Mod)\+/g,`$1-`)),t.includes(`-`)&&t.length>1&&n(t.replace(/\b(Control|Ctrl|Alt|Shift|Meta|Mod)-/g,`$1+`));return t}function D6(e){let t=e.key;if(!t)return[];let n=Xu(t);if(Ad(n)||t===`Shift`||t===`Control`||t===`Alt`||t===`Meta`)return[];let r=e.ctrlKey,i=e.altKey,a=e.metaKey,o=e.shiftKey,s=t===` `||e.code===`Space`?`Space`:t;if(r||i||a){let t=[];r&&t.push(`Control`),i&&t.push(`Alt`),o&&s.length>1&&t.push(`Shift`),a&&t.push(`Meta`);let c=[],l=s.length===1?s:n;if(c.push([...t,l].join(`+`)),s.length===1&&s.toLowerCase()!==s&&c.push([...t,s.toLowerCase()].join(`+`)),r!==a){let e=[`Mod`];i&&e.push(`Alt`),o&&e.push(`Shift`);let t=[...e,l].join(`+`);if(c.includes(t)||c.push(t),s.length===1&&s.toLowerCase()!==s){let t=[...e,s.toLowerCase()].join(`+`);c.includes(t)||c.push(t)}}try{let t=jd(e);if(t?.key){let e=[];t.ctrl&&e.push(`Control`),t.alt&&e.push(`Alt`),t.shift&&e.push(`Shift`),t.meta&&e.push(`Meta`);let n=[...e,t.key].join(`+`);c.includes(n)||c.push(n)}}catch{}return E6(c)}let c=[];return o&&s.length>1&&(c.push(`Shift+${s}`),n!==s&&c.push(`Shift+${n}`)),c.push(s),o&&s.length===1?(c.push(`Shift+${s.toUpperCase()}`),c.push(`Shift+${s}`)):s.length>1&&n!==s&&c.push(n),E6(c)}function O6(e){let t=Array.from(e.querySelectorAll(`[data-scope="dialog"][data-part="content"][data-state="open"], [role="dialog"][aria-modal="true"]:not([data-state="closed"]), [role="alertdialog"][aria-modal="true"]:not([data-state="closed"])`)).filter(e=>!e.hasAttribute(`data-which-key-explorer`));if(t.length===0)return null;for(let e=t.length-1;e>=0;--e){let n=t[e];if(n.style.pointerEvents!==`none`)return n}return t[t.length-1]??null}function k6(e){return typeof e.querySelectorAll==`function`?Array.from(e.querySelectorAll(`[data-part="branch-control"]:not([disabled]):not([data-disabled]):not([aria-disabled="true"]), [role="treeitem"]:not([disabled]):not([data-disabled]):not([aria-disabled="true"]), [data-which-key-target]:not([disabled]):not([data-disabled]):not([aria-disabled="true"])`)).filter(e=>{if(e.getAttribute(`role`)===`treeitem`&&e.getAttribute(`data-part`)===`branch`&&e.querySelector(`[data-part="branch-control"]`)||e.closest(`[hidden], [data-part="branch-content"][data-state="closed"]`))return!1;let t=e.closest(`[role="treeitem"][aria-expanded="false"]`);return!t||t===e||e.getAttribute(`data-part`)===`branch-control`&&e.closest(`[data-part="branch"]`)===t}):[]}function A6(e){let t=new Set,n=[];for(let r of e)for(let e of r)e instanceof HTMLElement&&!t.has(e)&&(t.add(e),n.push(e));return n.length>1&&typeof n[0].compareDocumentPosition==`function`&&n.sort((e,t)=>{if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&4?-1:n&2?1:0}),n}function j6(e,t,n=!1){let r=e.ownerDocument,i=r?.activeElement instanceof HTMLElement?r.activeElement:null,a=!n&&!t&&i&&!i.hasAttribute(`data-example`)?i.closest(`[data-example]`):null,o=a&&e.contains(a)?a.querySelector(`[data-example-preview]`)??a:e;return A6([xh(o,{includeContainer:!1}),k6(o)]).filter(e=>{if(!(e instanceof HTMLElement)||e.tabIndex<0&&e.getAttribute(`role`)!==`tab`&&e.getAttribute(`role`)!==`treeitem`&&e.getAttribute(`data-part`)!==`branch-control`&&!e.hasAttribute(`data-which-key-target`)||e.closest(`[data-which-key-root], [data-which-key-explorer], [data-which-key-jump-overlay], [data-scope="toast"]`))return!1;let n=e.closest(`[data-fw]`),i=r?.documentElement?.getAttribute(`data-framework`);return!(n&&i&&n.getAttribute(`data-fw`)!==i||!t&&(!a&&e.parentElement?.closest(`[data-example]`)||e.closest(`[data-which-key-scope]`))||e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`inert`))})}function M6(e,t){let n=e.ownerDocument,r=A6([xh(e,{includeContainer:!1}),Array.from(e.querySelectorAll(`[role="tab"]:not([disabled]):not([data-disabled]):not([aria-disabled="true"])`)),k6(e)]),i=[];for(let e of r){if(!(e instanceof HTMLElement)||e.tabIndex<0&&e.getAttribute(`role`)!==`tab`&&e.getAttribute(`role`)!==`treeitem`&&e.getAttribute(`data-part`)!==`branch-control`&&!e.hasAttribute(`data-which-key-target`)||e.closest(`[data-which-key-root], [data-which-key-explorer], [data-which-key-jump-overlay], [data-scope="toast"]`))continue;let r=e.closest(`[data-fw]`),a=n?.documentElement?.getAttribute(`data-framework`);r&&a&&r.getAttribute(`data-fw`)!==a||!t&&e.closest(`[data-which-key-scope]`)||e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`inert`)||i.push(e)}return i}var N6=globalThis,P6=N6.__helicalAttachedEntriesByDoc__??=new WeakMap,F6=N6.__helicalLastInteractedScopeByDoc__??=new WeakMap,I6=N6.__helicalRootControllerByDoc__??=new WeakMap,L6=N6.__helicalRootControllerListenersByDoc__??=new WeakMap;function R6(e){let t=L6.get(e);if(t)for(let e of t)e()}function z6(e){let t=e??(typeof document<`u`?document:void 0);if(!t)return null;let n=I6.get(t);if(n)return n;let r=P6.get(t);if(!r||r.size===0)return null;let i=t.activeElement&&C6(t.activeElement)?t.activeElement:null,a=i?i.closest?.(`[data-which-key-scope]`)??null:null;if(a){for(let e of r)if(e.getScopeElement()===a)return e.controller}let o=F6.get(t)??null;if(o){for(let e of r)if(e.getScopeElement()===o)return e.controller}for(let e of r)if(V6(e.getScopeElement(),t))return e.controller;return Array.from(r)[0]?.controller??null}function B6(e,t){let n=e??(typeof document<`u`?document:void 0);if(!n)return()=>{};let r=L6.get(n);return r||(r=new Set,L6.set(n,r)),r.add(t),()=>{r?.delete(t)}}function V6(e,t){if(!e)return!0;if(!e.isConnected)return!1;let n=e.closest?.(`[data-fw]`),r=t.documentElement?.getAttribute(`data-framework`);return!(n&&r&&n.getAttribute(`data-fw`)!==r)}function H6(e,t){if(!V6(e.getScopeElement(),t))return!1;let n=P6.get(t);if(!n||n.size<=1)return!0;let r=Array.from(n).filter(e=>V6(e.getScopeElement(),t));if(r.length<=1)return r[0]===e;let i=r.find(e=>e.isBusy());if(i)return i===e;let a=t.activeElement&&t.activeElement!==t.body&&t.activeElement!==t.documentElement&&C6(t.activeElement)?t.activeElement:null,o=a?a.closest?.(`[data-which-key-scope]`)??null:null,s=F6.get(t)??null,c=o&&V6(o,t)?o:s&&V6(s,t)?s:null;if(c){let t=r.find(e=>e.getScopeElement()===c);if(t)return t===e}let l=r.find(e=>e.getScopeElement()===null);return l?l===e:r[0]===e}function U6(e={}){let t=e.storageKey;function n(){if(e.disableOnMobile===!1)return!1;let t=N()?.defaultView??(typeof window<`u`?window:null);if(!t||typeof t.matchMedia!=`function`)return!1;try{return t.matchMedia(`(pointer: coarse) and (hover: none)`).matches||t.matchMedia(`(max-width: 767px) and (pointer: coarse)`).matches}catch{return!1}}function r(){return!(e.enabled===!1||n())}function i(){if(!t||typeof window>`u`)return null;try{let e=window.localStorage.getItem(`${t}:keymap-preset`);if(e===`helix`||e===`vim`||e===`kakoune`)return e}catch{}return null}function a(n){let r=N();if(r?.documentElement&&!e.getScopeElement?.()&&(r.documentElement.dataset.keymapPreset=n),t&&typeof window<`u`)try{window.localStorage.setItem(`${t}:keymap-preset`,n)}catch{}}function o(){if(!t||typeof window>`u`)return null;try{let e=window.localStorage.getItem(`${t}:jump-action`);if(e===`activate`||e===`focus`)return e}catch{}return null}function s(n){let r=N();if(r?.documentElement&&!e.getScopeElement?.()&&(r.documentElement.dataset.jumpAction=n),t&&typeof window<`u`)try{window.localStorage.setItem(`${t}:jump-action`,n)}catch{}}function c(){if(!t||typeof window>`u`)return null;try{let e=window.localStorage.getItem(`${t}:leader-only`);if(e===`true`)return!0;if(e===`false`)return!1}catch{}return null}function l(n){let r=N();if(r?.documentElement&&!e.getScopeElement?.()&&(r.documentElement.dataset.whichKeyLeaderOnly=String(n)),t&&typeof window<`u`)try{window.localStorage.setItem(`${t}:leader-only`,String(n))}catch{}}let u=e.preset??i()??`helix`,d=e.defaultMode??`normal`,f=e.leaderKey??`Space`,p=e.leaderOnly??c()??!1,m=e.jumpAction??o()??`activate`,h=e.jumpAlphabet??U3,g=new Set,_=new Map,v=new Map,y=new Map,b=i6(50),x=0;if(e.keymap&&_.set(`__initial__`,{id:`__initial__`,nodes:e.keymap,enabled:!0,priority:`global`,hasElementOption:!1,registrationOrder:++x}),e.commands)for(let[t,n]of Object.entries(e.commands))v.set(t,n);let S=[],C=!1,w=``,T=!1,E=``,D=null,O=``,ee=[],te=``,k=0,A=null,j=null,M=[];function N(){if(e.getDocument)try{return e.getDocument()}catch{}return typeof document<`u`?document:null}function P(e){te=e;try{j?.announce(e)}catch{}}function ne(e,t=!0,n=!1){let r=N(),i=e?.target??null,a=C6(i)?i:null,o=r?.activeElement&&C6(r.activeElement)?r.activeElement:null,s=[];for(let t of _.values()){if(!g6(t)||t.scope&&t.scope!==D)continue;let r=null,c=-1;if(t.hasElementOption){let e=v6(t);if(!e)continue;if(!n){let t=y6(e,a),n=y6(e,o);if(!t&&!n)continue}r=e,c=b6(e)}if(t.matchesTarget&&e){let n=i??o;try{if(!t.matchesTarget(n,e))continue}catch{continue}}s.push({id:t.id,nodes:_6(t),priority:t.priority,matchedElement:r,elementDepth:c,registrationOrder:t.registrationOrder})}return s.sort(x6),t&&s.push({id:`__preset__`,nodes:m6(u,f),priority:`global`,matchedElement:null,elementDepth:-1,registrationOrder:-1,isPreset:!0}),s}function re(){let e=ne(void 0,!0,!0),t={};for(let n=e.length-1;n>=0;--n)t=S6(t,e[n].nodes);return t}function ie(){let e=F().length>1;for(let t of y.values())t.element&&typeof t.element.setAttribute==`function`&&t.element.setAttribute(`data-pane-active`,e&&t.id===D?`true`:`false`)}function ae(t){let n=t??N();if(!n||typeof n.querySelectorAll!=`function`)return;let r=e.getScopeElement?.()??null,i=r??n.body;if(!i||typeof i.querySelectorAll!=`function`)return;let a=Array.from(i.querySelectorAll(`[data-pane-id]`));for(let e of a){if(!r&&e.closest(`[data-which-key-scope]`))continue;let t=e.getAttribute(`data-pane-id`);if(!t)continue;let n=y.get(t);if(n&&n.element===e)continue;let i=e.getAttribute(`data-pane-title`)||n?.title||t,a=e.getAttribute(`data-pane-order`),o=a?Number.parseInt(a,10):NaN,s=Number.isNaN(o)?n?.order??y.size+1:o,c=e.getAttribute(`data-pane-disabled`)===`true`;y.set(t,{id:t,title:i,element:e,disabled:c,order:s,lastFocusedElement:n?.lastFocusedElement??null}),!c&&(!D||t===`docs-main`&&D===`docs-sidebar`)&&(D=t)}ie()}function F(){return Array.from(y.values()).filter(e=>!e.disabled).sort((e,t)=>(e.order??0)-(t.order??0))}function oe(){return d===`jump`?ee.filter(e=>e.label.startsWith(O)).map(e=>({...e,matchedPrefix:O,remainingLabel:e.label.slice(O.length)})):[]}function se(){let e=re(),t=$3(e,S,d===`jump`?`normal`:d),n=e6(e),r=E.trim().toLowerCase(),i=r?n.filter(e=>e.label.toLowerCase().includes(r)||(e.description?.toLowerCase().includes(r)??!1)||e.group.toLowerCase().includes(r)||e.sequenceText.toLowerCase().includes(r)):n;return{preset:u,mode:d,leaderKey:f,leaderOnly:p,activePath:[...S],breadcrumb:t.breadcrumb,title:t.title,items:t.items,isOpen:S.length>0&&t.items.length>0&&(!p||S[0]===f),sticky:C||t.sticky,countBuffer:w,explorerOpen:T,explorerQuery:E,explorerEntries:i,activePaneId:D,panes:F(),jumpQuery:O,jumpAction:m,jumpTargets:oe(),statusMessage:te}}let ce=se();function I(){ie(),ce=se();for(let e of g)e(ce)}function le(e){k+=1;try{x0(`keyboard`)}catch{}try{e()}finally{k=Math.max(0,k-1)}}function ue(){let t=N();if(!t)return null;let n=O6(t);if(n)return n;if(D){let e=y.get(D);if(e?.element)return e.element}let r=F().find(e=>e.element);return r?.element?(D=r.id,r.element):e.getScopeElement?.()??t.body}function de(){let e=N()?.activeElement??null,t=D??F()[0]?.id??`root`;b.push({paneId:t,element:e,scrollTop:ue()?.scrollTop??0})}function L(t){d!==t&&(d=t,t!==`jump`&&(O=``,ee=[]),t===`insert`&&(S=[],C=!1,w=``),f_({mode:t,preset:u}),e.onModeChange?.(t),P(`${t.charAt(0).toUpperCase()}${t.slice(1)} mode`),I())}function fe(t){u!==t&&(u=t,S=[],C=!1,w=``,a(t),f_({mode:d,preset:t}),e.onPresetChange?.(t),P(`Switched to ${t} preset`),I())}function pe(t){p!==t&&(p=t,l(t),e.onLeaderOnlyChange?.(t),I())}function me(t){m!==t&&(m=t,s(t),e.onJumpActionChange?.(t),I())}function he(e,t){S=[...e],C=!!t?.sticky,I()}function ge(){(S.length!==0||C||w)&&(S=[],C=!1,w=``,I())}function _e(){return S.length!==0&&(S=S.slice(0,-1),S.length===0&&(C=!1),I(),!0)}function ve(){S=[],C=!1,w=``,E=``,T=!0,P(`Keybinding explorer opened`),I()}function ye(){T&&(T=!1,E=``,I())}function be(e){E=e,I()}function xe(e){let t=N(),n=t?.documentElement?.getAttribute(`data-framework`),r=e.querySelector(`[data-example-preview]`)??e,i=Array.from(r.querySelectorAll(`[data-which-key-scope]`)),a=t?i.find(e=>V6(e,t))??null:null;if(a&&t){F6.set(t,a);let e=j6(a,a)[0]??r;return de(),Se(e),P(`Entered example preview`),I(),!0}let o=xh(r,{includeContainer:!1}).filter(e=>{if(!(e instanceof HTMLElement))return!1;let t=e.closest(`[data-fw]`);return!(t&&n&&t.getAttribute(`data-fw`)!==n||e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`inert`))});if(o.length>0)return de(),Se(o[0]),P(`Entered example preview`),I(),!0;let s=e.querySelector(`[data-example-toggle]`);return s?(s.click(),P(`Toggled example code`),!0):!1}function Se(e){if(le(()=>{if(e.focus({preventScroll:!0}),typeof e.scrollIntoView==`function`)try{e.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`instant`})}catch{}}),D){let t=y.get(D);t&&(t.lastFocusedElement=e)}}function Ce(t){let n=ue();if(!n)return!1;let r=j6(n,e.getScopeElement?.());if(r.length===0)return!1;let i=N()?.activeElement,a=i?r.indexOf(i):-1,o=0;if(a===-1){let e=D?y.get(D):void 0;if(e?.lastFocusedElement){let n=r.indexOf(e.lastFocusedElement);o=n===-1?t>=0?0:r.length-1:t>0?Math.min(r.length-1,n+t):Math.max(0,n+t)}else o=t>=0?0:r.length-1}else o=Math.max(0,Math.min(r.length-1,a+t));let s=r[o];return s?(Se(s),I(),!0):!1}function we(e,t){if(!t||e===t.body||e===t.documentElement||e.scrollHeight<=e.clientHeight+2)return!1;let n=t.defaultView;if(!n||typeof n.getComputedStyle!=`function`)return!0;let r=n.getComputedStyle(e).overflowY;return r===`auto`||r===`scroll`||r===`overlay`}function Te(t){let n=ue();if(!n)return!1;let r=e.getScopeElement?.()??null,i=j6(n,r,t===`start`||t===`end`),a=N(),o=a?.defaultView??null;if(i.length===0&&t!==`start`&&t!==`end`)return!1;if(de(),t===`start`||t===`first-in-group`){let e=i[0];if(e&&Se(e),t===`start`&&(n.scrollTop=0,o&&!r&&!we(n,a)))try{o.scrollTo({top:0,behavior:`instant`})}catch{o.scrollTo(0,0)}return de(),I(),!0}let s=i[i.length-1];if(s&&Se(s),t===`end`&&(n.scrollTop=n.scrollHeight,o&&!r&&!we(n,a))){let e=Math.max(a?.documentElement?.scrollHeight??0,a?.body?.scrollHeight??0,n.scrollHeight);try{o.scrollTo({top:e,behavior:`instant`})}catch{o.scrollTo(0,e)}}return de(),I(),!0}function Ee(e,t=1){let n=ue();if(!n)return!1;let r=N()?.activeElement;if(e===`center`&&r&&typeof r.scrollIntoView==`function`){try{r.scrollIntoView({block:`center`,behavior:`instant`})}catch{}return!0}if(e===`top`&&r&&typeof r.scrollIntoView==`function`){try{r.scrollIntoView({block:`start`,behavior:`instant`})}catch{}return!0}if(e===`bottom`&&r&&typeof r.scrollIntoView==`function`){try{r.scrollIntoView({block:`end`,behavior:`instant`})}catch{}return!0}let i=120*Math.max(1,t),a=e===`down`?i:e===`up`?-i:0;return a!==0&&(typeof n.scrollBy==`function`?n.scrollBy({top:a,behavior:`instant`}):n.scrollTop+=a,!0)}function De(t){let n=F();if(n.length===0)return!1;let r;if(typeof t==`number`)r=n[t-1];else if(r=y.get(t),!r||r.disabled){let e=Number.parseInt(t,10);!Number.isNaN(e)&&e>=1&&(r=n[e-1])}if(!r||!r.element)return!1;de(),D=r.id;let i=e.getScopeElement?.()??null,a=typeof r.element.querySelector==`function`&&!!r.element.querySelector(`[role="tree"]`),o=r.lastFocusedElement&&r.element.contains(r.lastFocusedElement)&&(!a||r.lastFocusedElement.closest(`[role="tree"]`))&&(i||!r.lastFocusedElement.closest(`[data-which-key-scope]`))?r.lastFocusedElement:null,s=!o&&typeof r.element.querySelector==`function`?r.element.querySelector(`[data-pane-focus-target]:not([disabled]):not([data-disabled]):not([aria-disabled="true"]), [role="treeitem"][aria-selected="true"]:not([data-part="branch"]):not([disabled]):not([data-disabled]):not([aria-disabled="true"]), [data-part="branch"][aria-selected="true"] > [data-part="branch-control"]:not([disabled]):not([data-disabled]):not([aria-disabled="true"]), [data-part="branch-control"][tabindex="0"]:not([disabled]):not([data-disabled]):not([aria-disabled="true"]), [role="treeitem"][tabindex="0"]:not([data-part="branch"]):not([disabled]):not([data-disabled]):not([aria-disabled="true"])`)??k6(r.element)[0]??r.element.querySelector(`[data-modal-editor="true"], .ProseMirror[contenteditable="true"]`):null,c=o??s??j6(r.element,i)[0]??null;return c instanceof HTMLElement?Se(c):le(()=>{r.element.tabIndex<0&&(r.element.tabIndex=-1),r.element.focus({preventScroll:!1})}),d===`insert`&&(d=`normal`,f_({mode:`normal`,preset:u})),de(),P(`Focused pane ${r.title}`),I(),!0}function Oe(e){let t=F().filter(e=>e.element);if(t.length===0)return!1;let n=(D?y.get(D):void 0)??t[0];if(!n?.element)return!1;let r=e=>{let t=e.element.getBoundingClientRect();return{id:e.id,x:t.left,y:t.top,width:t.width||e.element.offsetWidth||100,height:t.height||e.element.offsetHeight||100,disabled:e.disabled,order:e.order}},i=r(n),a=t6(i,t.map(r),e);return a?De(a.id):i.x===0&&i.y===0&&t.length>1&&R(e===`left`||e===`up`)}function R(e=!1){let t=F().filter(e=>e.element);if(t.length===0)return!1;let n=t.findIndex(e=>e.id===D),r=t[n===-1?0:(n+(e?-1:1)+t.length)%t.length];return r?De(r.id):!1}function ke(t){let n=N();if(!n)return;t&&(m=t);let r=e.getScopeElement?.()??null,i=O6(n)??r??n.body,a=M6(i,r).filter(e=>{let t=e.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;if(r)return!0;let a=t.bottom>0&&t.right>0&&t.top<(n.defaultView?.innerHeight??1080)&&t.left<(n.defaultView?.innerWidth??1920);try{return Dh(e,n.defaultView??i)||a}catch{return a}});if(a.length===0)return;let o=n6(a.length,h);ee=a.map((e,t)=>{let n=e.getBoundingClientRect();return{id:`jump-${t}-${o[t]}`,label:o[t],element:e,rect:{top:n.top,left:n.left,width:n.width,height:n.height}}}),O=``,S=[],C=!1,w=``,d=`jump`,P(`Jump mode (${ee.length} targets)`),I()}function Ae(){d===`jump`&&(O=``,ee=[],d=`normal`,I())}function je(){let e=N()?.activeElement??null,t=D??F()[0]?.id??`root`,n=b.back({paneId:t,element:e});return n?(n.paneId&&y.has(n.paneId)&&(D=n.paneId),n.element&&n.element.isConnected?Se(n.element):n.paneId&&De(n.paneId),I(),!0):!1}function Me(){let e=b.forward();return e?(e.paneId&&y.has(e.paneId)&&(D=e.paneId),e.element&&e.element.isConnected?Se(e.element):e.paneId&&De(e.paneId),I(),!0):!1}function Ne(t){let n=ue();if(!n)return!1;let r=j6(n,e.getScopeElement?.());if(r.length===0)return!1;let i=N()?.activeElement,a=i?r.indexOf(i):-1;if(a===-1)return Ce(t);let o=r[a].getBoundingClientRect();if(o.width<=0||o.height<=0)return Ce(t);let s=o.left+o.width/2,c=o.top+o.height/2,l=Math.max(8,o.height*.5);if(!r.some((e,t)=>{if(t===a)return!1;let n=e.getBoundingClientRect();if(n.width<=0||n.height<=0)return!1;let r=n.top+n.height/2,i=n.left+n.width/2;return Math.abs(r-c)<=l&&Math.abs(i-s)>8}))return Ce(t);let u=t>=0?1:-1,d=Math.max(1,Math.abs(t)),f=r[a];for(let e=0;e<d;e+=1){let n=f.getBoundingClientRect(),i=n.top+n.height/2,a=Math.max(8,n.height*.5),o=r.map(e=>{let t=e.getBoundingClientRect();return{el:e,cx:t.left+t.width/2,cy:t.top+t.height/2,h:t.height,w:t.width}}).filter(e=>e.w<=0||e.h<=0?!1:u>0?e.cy>i+a:e.cy<i-a);if(o.length===0){if(e===0)return Ce(t);break}let c=o[0].cy;for(let e of o)Math.abs(e.cy-i)<Math.abs(c-i)&&(c=e.cy);let l=o.filter(e=>Math.abs(e.cy-c)<=a),d=l[0];for(let e of l)Math.abs(e.cx-s)<Math.abs(d.cx-s)&&(d=e);f=d.el}return Se(f),I(),!0}function Pe(e,t){let n=e.closest(`[data-fw]`),r=t?.documentElement?.getAttribute(`data-framework`);return!(n&&r&&n.getAttribute(`data-fw`)!==r||e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`inert`))}function Fe(e,t){let n=N();if(e){let t=e.closest(`[role="tablist"]`);if(t&&Pe(t,n))return t;let r=e.closest(`[data-scope="tabs"]`);if(r){let e=Array.from(r.querySelectorAll(`[role="tablist"]`)).find(e=>Pe(e,n));if(e)return e}let i=e.closest(`[role="tabpanel"]`);if(i?.parentElement){let e=Array.from(i.parentElement.querySelectorAll(`[role="tablist"]`)).find(e=>Pe(e,n));if(e)return e}let a=e.hasAttribute(`data-example`)?e:e.closest(`[data-example]`);if(a){let e=Array.from(a.querySelectorAll(`[role="tablist"]`)).find(e=>Pe(e,n));if(e)return e}}let r=t??n?.body??null;return r?Array.from(r.querySelectorAll(`[role="tablist"]`)).filter(e=>Pe(e,n))[0]??null:null}function Ie(e,t){let n=N(),r=n?.activeElement??null,i=Fe(r,ue());if(!i)return!1;let a=Array.from(i.querySelectorAll(`[role="tab"]:not([disabled]):not([data-disabled]):not([aria-disabled="true"])`)).filter(e=>Pe(e,n));if(a.length===0)return!1;let o=r?a.findIndex(e=>e===r||e.contains(r)):-1;o===-1&&(o=a.findIndex(e=>e.getAttribute(`aria-selected`)===`true`||e.hasAttribute(`data-selected`)||e.getAttribute(`data-state`)===`active`)),o===-1&&(o=0);let s;s=t===`first`?0:t===`last`?a.length-1:((o+e)%a.length+a.length)%a.length;let c=a[s];return c?(de(),Se(c),c.click(),de(),P(`Tab ${c.textContent?.trim()||s+1}`),I(),!0):!1}function Le(t){let n=N(),r=e.getScopeElement?.()??null,i=!r&&y.has(`docs-main`)&&y.get(`docs-main`)?.element?y.get(`docs-main`).element:ue();if(!i)return!1;let a=r?`[data-page-section], [data-slot="page-section"], section[id], .docs-prose :is(h1, h2, h3)`:`h1:not([data-demo] *), [data-page-section]:not([data-demo] *), [data-slot="page-section"]:not([data-demo] *), section[id]:not([data-demo] *), .docs-prose :is(h1, h2, h3):not([data-demo] *)`,o=Array.from(i.querySelectorAll(a)),s=o.filter(e=>!o.some(t=>t!==e&&(t.hasAttribute?.(`data-page-section`)||t.getAttribute?.(`data-slot`)===`page-section`||t.tagName===`SECTION`)&&t.contains(e)));if(s.length===0){if(r&&n){let e=I6.get(n);if(e&&e!==nt)return e.executeCommand(t>=0?`motion.paragraphForward`:`motion.paragraphBackward`,{count:Math.abs(t)})}return!1}let c=n?.activeElement,l=c?s.findIndex(e=>e===c||e.contains(c)):-1;if(l===-1&&c&&c!==n?.body&&c!==n?.documentElement&&i.contains(c))for(let e=s.length-1;e>=0;--e){let t=s[e];if(typeof t.compareDocumentPosition==`function`&&t.compareDocumentPosition(c)&4){l=e;break}}if(l===-1&&typeof s[0]?.getBoundingClientRect==`function`){let e=s[0].getBoundingClientRect(),t=s[s.length-1].getBoundingClientRect();if(e.height>0||t.top!==e.top){for(let e=s.length-1;e>=0;--e)if(s[e].getBoundingClientRect().top<=140){l=e;break}}}let u=l===-1?t>=0?0:s.length-1:Math.max(0,Math.min(s.length-1,l+t)),d=s[u];if(!d)return!1;if(de(),!r&&n&&F6.set(n,null),u===0&&t<0&&!r&&n?.defaultView&&!we(i,n))try{n.defaultView.scrollTo({top:0,behavior:`instant`})}catch{n.defaultView.scrollTo(0,0)}else if(typeof d.scrollIntoView==`function`)try{d.scrollIntoView({block:`start`,behavior:`instant`})}catch{}return le(()=>{d.tabIndex<0&&(d.tabIndex=-1),d.style.outline=`none`,d.focus({preventScroll:!0})}),de(),I(),!0}function Re(e,t,n){let r=(e.ownerDocument?.defaultView)?.getSelection?.();if(!r||typeof r.modify!=`function`)return!1;let i=d===`select`||(u===`helix`||u===`kakoune`)&&(t===`wordForward`||t===`wordBackward`||t===`wordEnd`||t===`lineSelect`)?`extend`:`move`;for(let e=0;e<Math.max(1,n);e+=1)switch(t){case`left`:r.modify(i,`backward`,`character`);break;case`right`:r.modify(i,`forward`,`character`);break;case`up`:r.modify(i,`backward`,`line`);break;case`down`:r.modify(i,`forward`,`line`);break;case`wordForward`:case`wordEnd`:r.modify(i,`forward`,`word`);break;case`wordBackward`:r.modify(i,`backward`,`word`);break;case`paragraphForward`:r.modify(i,`forward`,`paragraphboundary`);break;case`paragraphBackward`:r.modify(i,`backward`,`paragraphboundary`);break;case`lineStart`:r.modify(i,`backward`,`lineboundary`);break;case`lineEnd`:r.modify(i,`forward`,`lineboundary`);break;case`lineSelect`:r.modify(`move`,`backward`,`lineboundary`),r.modify(`extend`,`forward`,`lineboundary`);break;case`docStart`:r.modify(i,`backward`,`documentboundary`);break;case`docEnd`:r.modify(i,`forward`,`documentboundary`)}return!0}function ze(t,n){let r=N(),i=(C6(n.event?.target)?n.event.target:null)??r?.activeElement??null,a=d_(i);if(t===`whichKey.openExplorer`)return ve(),!0;if(t===`preset.helix`)return fe(`helix`),!0;if(t===`preset.vim`)return fe(`vim`),!0;if(t===`preset.kakoune`)return fe(`kakoune`),!0;if(t===`mode.toggleSelect`){let e=d===`select`?`normal`:`select`;return e===`normal`&&a&&a.transformSelection(`collapse`),L(e),!0}if(t===`jump.start`)return ke(),!0;if(t===`jump.activate`)return ke(`activate`),!0;if(t===`jump.focus`)return ke(`focus`),!0;if(t===`jump.action.activate`)return me(`activate`),!0;if(t===`jump.action.focus`)return me(`focus`),!0;if(t===`jumplist.back`)return je();if(t===`jumplist.forward`)return Me();if(t.startsWith(`pane.focus.`))return De(Number.parseInt(t.slice(11),10));if(t===`pane.left`)return Oe(`left`);if(t===`pane.down`)return Oe(`down`);if(t===`pane.up`)return Oe(`up`);if(t===`pane.right`)return Oe(`right`);if(t===`pane.next`)return R(!1);if(t===`pane.prev`)return R(!0);if(t===`view.center`)return Ee(`center`,n.count);if(t===`view.top`)return Ee(`top`,n.count);if(t===`view.bottom`)return Ee(`bottom`,n.count);if(t===`view.scrollDown`)return Ee(`down`,n.count);if(t===`view.scrollUp`)return Ee(`up`,n.count);if(t===`tab.next`)return Ie(n.count)||Le(n.count);if(t===`tab.prev`)return Ie(-n.count)||Le(-n.count);if(t===`section.next`)return Le(n.count);if(t===`section.prev`)return Le(-n.count);if(t===`focus.nextBlock`)return Ce(n.count);if(t===`focus.prevBlock`)return Ce(-n.count);if(t.startsWith(`motion.`)){let e=t.slice(7);if(a){let t=a.move(e,{preset:u,mode:d,count:n.count});return e===`lineSelect`&&d===`normal`&&L(`select`),t}if(i&&(i.isContentEditable||i.getAttribute(`contenteditable`)===`true`)){let t=Re(i,e,n.count);return t&&e===`lineSelect`&&d===`normal`&&L(`select`),t}let o=i?.closest(`[role="tree"]`);if(o&&(e===`down`||e===`up`||e===`left`||e===`right`||e===`docStart`||e===`docEnd`)){let t=e===`down`?`ArrowDown`:e===`up`?`ArrowUp`:e===`left`?`ArrowLeft`:e===`right`?`ArrowRight`:e===`docStart`?`Home`:`End`,a=e===`docStart`||e===`docEnd`?1:Math.max(1,n.count),s=!1;if(le(()=>{for(let n=0;n<a;n+=1){let n=(r?.activeElement instanceof HTMLElement&&o.contains(r.activeElement)?r.activeElement:i)??null;if(!n)break;let a=!1;if(typeof KeyboardEvent==`function`&&typeof n.dispatchEvent==`function`){let e=new KeyboardEvent(`keydown`,{key:t,code:t,bubbles:!0,cancelable:!0});n.dispatchEvent(e),a=e.defaultPrevented}if(a||r?.activeElement&&r.activeElement!==n){s=!0;continue}let c=k6(o);if(c.length===0)break;let l=c.findIndex(e=>e===n||e.contains(n));if(e===`down`||e===`up`){let t=e===`down`?1:-1,n=c[l===-1?t>0?0:c.length-1:Math.max(0,Math.min(c.length-1,l+t))];n&&(Se(n),s=!0)}else if(e===`docStart`||e===`docEnd`){let t=e===`docStart`?c[0]:c[c.length-1];t&&(Se(t),s=!0)}else if(e===`right`||e===`left`){let t=n.closest(`[role="treeitem"][aria-expanded]`),r=t?.getAttribute(`aria-expanded`)===`true`;(e===`right`&&t&&!r||e===`left`&&t&&r)&&(n.click(),s=!0)}}}),s){if(D&&r?.activeElement instanceof HTMLElement){let e=y.get(D);e&&e.element?.contains(r.activeElement)&&(e.lastFocusedElement=r.activeElement)}return I(),!0}}let s=i?.closest(`[role="tab"]`),c=s?.closest(`[role="tablist"]`);if(s&&c){if(c.getAttribute(`aria-orientation`)!==`vertical`&&c.getAttribute(`data-orientation`)!==`vertical`){if(e===`right`||e===`wordForward`||e===`wordEnd`)return Ie(n.count);if(e===`left`||e===`wordBackward`)return Ie(-n.count);if(e===`lineStart`)return Ie(0,`first`);if(e===`lineEnd`)return Ie(0,`last`)}else{if(e===`down`)return Ie(n.count);if(e===`up`)return Ie(-n.count);if(e===`lineStart`)return Ie(0,`first`);if(e===`lineEnd`)return Ie(0,`last`)}}switch(e){case`down`:return Ne(n.count);case`up`:return Ne(-n.count);case`wordForward`:case`wordEnd`:case`right`:return Ce(n.count);case`wordBackward`:case`left`:return Ce(-n.count);case`paragraphForward`:return Le(n.count);case`paragraphBackward`:return Le(-n.count);case`docStart`:return Te(`start`);case`docEnd`:return Te(`end`);case`lineStart`:return Te(`first-in-group`);case`lineEnd`:return Te(`last-in-group`);case`lineSelect`:return L(d===`select`?`normal`:`select`),!0}}if(t.startsWith(`textObject.`)){let e=t.slice(11);return a?a.selectTextObject(e,{preset:u,mode:d}):!1}if(t.startsWith(`selection.`)){let e=t.slice(10);if(a){let t=a.transformSelection(e);return e===`collapse`&&d===`select`&&L(`normal`),t}return e===`collapse`&&d===`select`&&(L(`normal`),!0)}if(t.startsWith(`operator.`)){let o=t.slice(9),s=t=>{t&&(e.onYank?.(t,n),typeof CustomEvent==`function`&&(i??r??null)?.dispatchEvent?.(new CustomEvent(`helical:yank`,{bubbles:!0,detail:{text:t,preset:n.preset,mode:n.mode,count:n.count}})))};if(a){let e=a.execOperator(o,{preset:u,mode:d,count:n.count});return o===`yank`&&typeof e==`object`&&e&&typeof e.yankedText==`string`&&s(e.yankedText),typeof e==`object`&&e&&e.enterInsert||o===`change`||o===`insertStart`||o===`appendEnd`||o===`openBelow`||o===`openAbove`?L(`insert`):(o===`delete`||o===`yank`)&&d===`select`&&L(`normal`),!!e}if(o===`yank`){let e=``;if(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement){let t=i.selectionStart??0,n=i.selectionEnd??0;e=i.value.slice(t,n)}else e=r?.defaultView?.getSelection?.()?.toString()??``;return e&&typeof navigator<`u`&&navigator.clipboard?.writeText&&navigator.clipboard.writeText(e).catch(()=>{}),s(e),d===`select`&&L(`normal`),!!e}if(o===`insertStart`&&i?.hasAttribute(`data-example`))return xe(i);if(o===`change`&&i&&!T6(i)){let e=i.closest(`[data-example]`);if(e){let t=e.querySelector(`[data-example-toggle]`);if(t)return t.click(),P(`Toggled example code`),!0}}if(o===`insertStart`||o===`appendEnd`||o===`change`){if(T6(i)){if(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)try{let e=o===`insertStart`?0:i.value.length;i.setSelectionRange(e,e)}catch{}return L(`insert`),!0}return L(`insert`),!0}}return!1}function Be(t,n){let r={count:n?.count??(w?Math.max(1,Number.parseInt(w,10)):1),mode:n?.mode??d,preset:n?.preset??u,activePaneId:n?.activePaneId??D,event:n?.event},i=v.get(t),a=!1;return i&&(a=i(r)!==!1),a||=ze(t,r),e.onCommand?.(t,r),a}function Ve(e){return{count:w?Math.max(1,Number.parseInt(w,10)):1,mode:d,preset:u,activePaneId:D,event:e}}function He(e,t){if(e.when&&!e.when(t))return!1;let n=!1;return e.action&&(n=e.action(t)!==!1),!n&&!e.action&&e.commandId&&(n=Be(e.commandId,t)),n?(w=``,C||(S=[]),I(),!0):!1}function Ue(e,t){let n=ne(t,!0),r=re(),i=J3(r,S),a=!1;for(let o of n){let n=X3(o.nodes,S,d,r);if(!n)continue;let s=q3(n,r,i),c=new Set(i);n.proxy&&n.proxy.length>0&&c.add(n.proxy.join(`>`));for(let n of e){let e=s[n];if(!e||!W3(e,d))continue;a=!0;let i=Ve(t);if(!e.when||e.when(i)){if(!e.action&&!e.commandId&&Z3(e,r,c))return S=[...S,n],(e.sticky||e.loop)&&(C=!0),P(`${e.group??e.label} menu`),I(),t&&(t.preventDefault(),t.stopPropagation()),{handled:!0,matchedAnyNode:!0};if(He(e,i))return t&&(t.preventDefault(),t.stopPropagation()),{handled:!0,matchedAnyNode:!0}}}}return{handled:!1,matchedAnyNode:a}}function We(e,t,n={}){let r=!!n.insertModeOnly,i=ne(t,n.includePreset??!r),a=E6(e),o=null,s=()=>o??=re();for(let e of i)for(let n of a){let i=e.nodes[n];if(!i)continue;if(r){if(!(e.priority===`overlay`?W3(i,`insert`):G3(i,`insert`)))continue}else if(!W3(i,d))continue;let a=Ve(t);if(!i.when||i.when(a)){if(!i.action&&!i.commandId&&Z3(i,s()))return S=[n],C=!!(i.sticky||i.loop),P(`${i.group??i.label} menu`),I(),t&&(t.preventDefault(),t.stopPropagation()),!0;if(He(i,a))return t&&(t.preventDefault(),t.stopPropagation()),!0}}return!1}function Ge(e,t){let n=ne(t,!1);for(let t of n){let n=t.nodes[e];if(n&&W3(n,d))return!0}return!1}function Ke(e){let t=se(),n=typeof e==`string`?t.explorerEntries.find(t=>t.id===e):e;if(!n)return!1;ye();let r={count:1,mode:d,preset:u,activePaneId:D},i=!1;return n.action&&(i=n.action(r)!==!1),!i&&n.commandId&&(i=Be(n.commandId,r)),I(),i}function qe(e){if(e.key===`Escape`)return e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation?.(),Ae(),!0;if(e.key===`Backspace`)return e.preventDefault(),e.stopPropagation(),O.length>0?(O=O.slice(0,-1),I()):Ae(),!0;if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let t=O+e.key.toLowerCase(),n=ee.filter(e=>e.label.startsWith(t));if(e.preventDefault(),e.stopPropagation(),n.length===0)return!0;let r=n.find(e=>e.label===t);if(r&&n.length===1){de();let e=r.element,t=m;O=``,ee=[],d=`normal`;for(let t of y.values())if(t.element&&t.element.contains(e)){D=t.id;break}return Se(e),t===`activate`&&e.click(),de(),I(),!0}return O=t,I(),!0}return!1}function Je(e,t){if(d===`insert`)return We([e],t,{insertModeOnly:!0,includePreset:!1});if(S.length>0){let{handled:n}=Ue([e],t);return!n&&!C&&ge(),n}let n=re();return/^[0-9]$/.test(e)&&!Ge(e,t)&&(w.length>0||e!==`0`||!n[0])&&(w.length>0||e!==`0`)?(w+=e,I(),t&&(t.preventDefault(),t.stopPropagation()),!0):We([e],t,{insertModeOnly:!1,includePreset:!0})}function Ye(t){if(!r()||t.defaultPrevented&&S.length===0&&d!==`jump`)return!1;if(T)return t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),ye(),!0);let n=N(),i=(C6(t.target)?t.target:null)??n?.activeElement??null;if(i&&w6(i)&&typeof i.closest==`function`&&(i.closest(`[data-command-palette][data-modal="true"], [data-command-menu][data-modal="true"], [data-colon-command][data-modal="true"]`)||T6(i)&&i.closest(`[data-command-palette], [data-command-menu], [data-colon-command]`)))return!1;let a=d_(i),o=T6(i);if(d===`insert`){let e=D6(t);if(e.length>0&&We(e,t,{insertModeOnly:!0,includePreset:!1}))return!0;if(t.key===`Escape`){if(a?.hasActiveSuggestion?.()||n?.querySelector(`[data-editor-overlay], [data-slash-menu-surface], [data-mention-menu-surface], [data-editor-slash-menu], [data-editor-mention-menu], [data-scope="select"][data-state="open"], [data-scope="menu"][data-state="open"], [data-scope="popover"][data-state="open"], [data-scope="combobox"][data-state="open"], [role="alertdialog"]:not([data-state="closed"])`))return!1;if(w6(i)&&i.closest?.(`[data-part="node-rename-input"]`))return L(`normal`),!1;if(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation?.(),L(`normal`),w6(i)&&a&&i.closest?.(`[contenteditable="false"]`)){let e=i.closest?.(`.ProseMirror`);e&&le(()=>{e.focus({preventScroll:!0})})}return!0}return!1}if(d===`jump`)return qe(t);if(S.length>0){if(A=null,t.key===`Escape`)return t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation?.(),ge(),!0;if(t.key===`Backspace`)return t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation?.(),_e(),!0;let e=D6(t);if(e.length===0)return!1;let{handled:n,matchedAnyNode:r}=Ue(e,t);if(n)return!0;let i=p&&S[0]!==f;return C||ge(),i&&e.includes(f)&&We(e,t,{insertModeOnly:!1,includePreset:!0})?!0:!r&&(t.preventDefault(),t.stopPropagation(),!0)}let s=D6(t);if(t.key===` `&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&i){let t=i.getAttribute?.(`role`)??null;if(typeof HTMLInputElement<`u`&&i instanceof HTMLInputElement&&(i.type===`checkbox`||i.type===`radio`)||t===`checkbox`||t===`switch`)return A=null,!1;if((i.tagName===`BUTTON`||t===`button`)&&A===i){A=null;let t=i.closest?.(`[data-example-preview]`)??null,n=e.getScopeElement?.()??null;if(t&&(!n||!t.contains(n)))return!1}}if(A=t.key===`Enter`&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&i&&(i.tagName===`BUTTON`||i.getAttribute?.(`role`)===`button`)&&i.getAttribute?.(`data-part`)!==`trigger`&&!i.hasAttribute?.(`aria-haspopup`)&&i.closest?.(`[data-example-preview]`)?i:null,s.length>0){let e=re();for(let n of s)if(/^[0-9]$/.test(n)&&!Ge(n,t)&&(w.length>0||n!==`0`||!e[0])&&(w.length>0||n!==`0`))return w+=Xe(n),I(),t.preventDefault(),t.stopPropagation(),!0;if(We(s,t,{insertModeOnly:!1,includePreset:!0}))return!0}if(t.key===`Escape`){if(a&&(d===`select`||!a.hasActiveSuggestion?.()))return t.preventDefault(),t.stopPropagation(),w=``,a.setModalState({mode:`normal`,preset:u}),d===`select`?(a.transformSelection(`collapse`),L(`normal`)):I(),!0;if(w.length>0||d===`select`)return t.preventDefault(),t.stopPropagation(),w=``,a&&a.transformSelection(`collapse`),d===`select`?L(`normal`):I(),!0;let e=w6(i)&&!i.hasAttribute?.(`data-example`)?i.closest?.(`[data-example]`):null,r=!!n?.querySelector(`[data-scope="popover"][data-state="open"], [data-scope="menu"][data-state="open"], [data-scope="select"][data-state="open"], [data-scope="combobox"][data-state="open"], [role="dialog"]:not([hidden]):not([data-state="closed"]), [role="listbox"]:not([hidden]):not([data-state="closed"]), [aria-expanded="true"]`);return e&&(!n||!O6(n)&&!r)?(t.preventDefault(),t.stopPropagation(),n&&F6.set(n,null),Se(e),P(`Exited example preview`),I(),!0):!1}if(t.key===`Enter`&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&w6(i)&&i.hasAttribute?.(`data-example`))return t.preventDefault(),t.stopPropagation(),xe(i);if(t.key===`Enter`&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&o&&!a)return t.preventDefault(),t.stopPropagation(),L(`insert`),!0;if(a&&!a.hasActiveSuggestion?.()&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&(t.key===`ArrowLeft`||t.key===`ArrowRight`||t.key===`ArrowUp`||t.key===`ArrowDown`)){let e=t.key===`ArrowLeft`?`left`:t.key===`ArrowRight`?`right`:t.key===`ArrowUp`?`up`:`down`;t.shiftKey&&d===`normal`&&L(`select`);let n=t.shiftKey?`select`:d,r=w.length>0?Math.max(1,Number.parseInt(w,10)):1;return w=``,t.preventDefault(),t.stopPropagation(),a.move(e,{preset:u,mode:n,count:r}),I(),!0}return o&&t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey?(t.preventDefault(),t.stopPropagation(),!0):!1}function Xe(e){return e}function Ze(t){M.forEach(e=>e()),M=[];let n=typeof Document<`u`&&t instanceof Document?t:t&&`ownerDocument`in t&&t.ownerDocument?t.ownerDocument:t??N();if(!n)return()=>{};let a=t??n;try{let e=S0({root:n,onChange:()=>{}});M.push(e)}catch{}try{j=Mh({level:`polite`,document:n}),M.push(()=>{j?.destroy(),j=null})}catch{j=null}let s={controller:nt,getScopeElement:()=>e.getScopeElement?.()??null,isBusy:()=>S.length>0||C||T||d===`jump`||w.length>0},l=P6.get(n);if(l||(l=new Set,P6.set(n,l)),l.add(s),R6(n),M.push(()=>{l?.delete(s),R6(n)}),!e.getScopeElement?.()){let t=i();t&&!e.preset&&(u=t);let r=o();r&&!e.jumpAction&&(m=r);let a=c();a!==null&&e.leaderOnly===void 0&&(p=a),n.documentElement&&(n.documentElement.dataset.keymapPreset=u,n.documentElement.dataset.jumpAction=m,n.documentElement.dataset.whichKeyLeaderOnly=String(p)),I6.set(n,nt),R6(n),M.push(()=>{I6.get(n)===nt&&(I6.delete(n),R6(n))})}ae(n),I();let f=e=>{if(!r())return;A=null;let t=e.target instanceof Element?e.target:null;if(!t)return;let i=!!t.closest(`[data-which-key-root], [data-which-key-explorer], [data-which-key-jump-overlay], [data-scope="dialog"]`);if(!i){let e=t.closest(`[data-which-key-scope]`)??null;(!e||V6(e,n))&&F6.set(n,e),(S.length>0||w.length>0)&&ge()}if(H6(s,n)){for(let e of y.values())if(e.element&&e.element.contains(t)){D!==e.id&&(D=e.id,I());break}T6(t)&&!t.closest(`[data-which-key-explorer], [data-command-palette], [data-command-menu], [data-colon-command]`)&&(d===`normal`||d===`select`)?L(`insert`):d!==`insert`||i||T6(t)||d_(t)||t.closest(`[data-scope="editor"], [data-editor-toolbar], .ProseMirror, [data-editor-overlay], [data-slash-menu-surface], [data-mention-menu-surface], [data-editor-slash-menu], [data-editor-mention-menu], [data-scope="select"], [data-scope="menu"], [data-scope="popover"], [data-scope="combobox"]`)||L(`normal`)}},h=e=>{if(!r())return;A=null;let t=e.target instanceof HTMLElement?e.target:null;if(t){if(k===0&&!t.closest(`[data-which-key-root], [data-which-key-explorer], [data-which-key-jump-overlay], [data-scope="dialog"]`)){let e=t.closest(`[data-which-key-scope]`)??null;if(e&&V6(e,n))F6.set(n,e);else if(!e){let e=F6.get(n)??null;e&&t.contains(e)||F6.set(n,null)}}if(H6(s,n)){for(let e of y.values())if(e.element&&e.element.contains(t)){let n=D;D=e.id,e.lastFocusedElement=t,n!==e.id&&I();break}k>0||!T6(t)||d_(t)||t.closest(`[data-which-key-explorer], [data-command-palette], [data-command-menu], [data-colon-command]`)||d!==`normal`&&d!==`select`||L(`insert`)}}},g=e=>{H6(s,n)&&(e instanceof KeyboardEvent||e&&typeof e.key==`string`)&&Ye(e)};return a.addEventListener(`pointerdown`,f,!0),a.addEventListener(`focusin`,h,!0),a.addEventListener(`keydown`,g,!0),M.push(()=>{a.removeEventListener(`pointerdown`,f,!0),a.removeEventListener(`focusin`,h,!0),a.removeEventListener(`keydown`,g,!0)}),()=>{M.forEach(e=>e()),M=[]}}function Qe(){M.forEach(e=>e()),M=[],g.clear(),y.clear(),_.clear()}function $e(e,t,n){let r=n!==void 0&&Object.prototype.hasOwnProperty.call(n,`element`)&&n.element!==void 0,i=n?.scope?`pane`:`global`,a={id:e,nodes:t,scope:n?.scope,enabled:n?.enabled??!0,priority:n?.priority??i,hasElementOption:r,element:n?.element,matchesTarget:n?.matchesTarget,registrationOrder:++x};return _.set(e,a),I(),()=>{_.get(e)===a&&(_.delete(e),I())}}function z(e,t){return v.set(e,t),()=>{v.get(e)===t&&v.delete(e)}}function et(e){let t=y.get(e.id),n={id:e.id,title:e.title,element:e.element,disabled:e.disabled,order:e.order??t?.order??y.size+1,lastFocusedElement:t?.lastFocusedElement??null};return y.set(e.id,n),!D&&!e.disabled&&e.element&&(D=e.id),I(),()=>{y.delete(e.id),D===e.id&&(D=F()[0]?.id??null),I()}}function tt(e){try{return r0(e,{defer:!0})}catch{return()=>{}}}let nt={getState:()=>ce,subscribe:e=>(g.add(e),()=>{g.delete(e)}),attach:Ze,destroy:Qe,handleKeyDown:Ye,setPreset:fe,setMode:L,setLeaderOnly:pe,setJumpAction:me,openPrefix:he,closePrefix:ge,stepBackPrefix:_e,triggerKey:e=>Je(e),openExplorer:ve,closeExplorer:ye,setExplorerQuery:be,executeExplorerEntry:Ke,registerKeymap:$e,registerCommand:z,executeCommand:Be,registerPane:et,focusPane:De,focusPaneDirection:Oe,cyclePane:R,stepFocusInPane:Ce,jumpToBoundary:Te,scrollActivePane:Ee,startJumpMode:ke,cancelJumpMode:Ae,jumpBack:je,jumpForward:Me,trackBranchElement:tt};return nt}var W6=J(`fixed z-50 flex flex-col overflow-hidden border bg-popover/95 text-popover-foreground shadow-xl backdrop-blur-md transition-all duration-150 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,{variants:{variant:{helix:`right-4 bottom-4 w-80 max-w-[calc(100vw-2rem)] rounded-lg data-[state=closed]:slide-out-to-bottom-2 data-[state=open]:slide-in-from-bottom-2`,modern:`bottom-4 left-1/2 w-[min(36rem,calc(100vw-2rem))] -translate-x-1/2 rounded-xl data-[state=closed]:slide-out-to-bottom-2 data-[state=open]:slide-in-from-bottom-2`,classic:`inset-x-0 bottom-0 w-full rounded-none border-x-0 border-b-0 px-4 py-2`}},defaultVariants:{variant:`helix`}}),G6=`flex items-center justify-between gap-2 px-3 pt-2.5 pb-1 text-xs font-medium`,K6=`flex items-center gap-1.5 font-semibold text-foreground`,q6=`flex items-center gap-1 text-[11px] text-muted-foreground`,J6=J(`p-1.5`,{variants:{variant:{helix:`flex flex-col gap-0.5`,modern:`grid grid-cols-1 gap-1 sm:grid-cols-2`,classic:`grid grid-cols-2 gap-x-4 gap-y-1 sm:grid-cols-3 md:grid-cols-4`}},defaultVariants:{variant:`helix`}}),Y6=`group flex w-full cursor-pointer items-center justify-between gap-3 rounded-md px-2 py-1 text-left text-xs transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:outline-none`,X6=`inline-flex min-w-0 items-center gap-1 truncate text-foreground group-hover:text-accent-foreground data-[group=true]:font-medium data-[group=true]:text-primary`,Z6=`pointer-events-none h-2 shrink-0`,Q6=J(`inline-flex items-center gap-1 rounded font-mono font-semibold tracking-wider uppercase select-none`,{variants:{mode:{normal:`bg-primary/15 text-primary`,select:`bg-warn/20 text-warn`,insert:`bg-success/20 text-success`,jump:`bg-info/20 text-info`},size:{sm:`px-1.5 py-0.5 text-[10px]`,md:`px-2 py-0.5 text-xs`,lg:`px-2.5 py-1 text-sm`}},defaultVariants:{mode:`normal`,size:`sm`}}),$6=`flex max-h-[min(34rem,85vh)] w-full max-w-xl flex-col gap-0 overflow-hidden bg-popover p-0 text-popover-foreground`,eb=`flex flex-row items-center justify-between gap-2 px-4 pt-3.5 pb-2.5`,tb=`flex min-h-0 flex-1 flex-col rounded-none border-0 bg-transparent shadow-none`,nb=`mx-4 mb-2 w-[calc(100%-2rem)] rounded-md border-0 border-b-2 border-transparent bg-muted/60 px-3 py-2 text-sm text-foreground outline-none transition-colors placeholder:text-muted-foreground focus:border-primary focus-visible:border-primary focus-visible:ring-0`,rb=`max-h-none flex-1 overflow-visible px-2.5 pt-1 pb-3 outline-none`,ib=`flex w-full cursor-pointer items-center justify-between gap-3 rounded-md px-2.5 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground`,ab=`rounded-xs bg-primary/20 px-0.5 font-semibold text-foreground`,ob=J(`relative transition-shadow duration-150 data-[pane-active=true]:ring-1 data-[pane-active=true]:ring-primary/40`,{variants:{active:{true:`ring-1 ring-primary/40`,false:``}},defaultVariants:{active:!1}}),sb=`pointer-events-none fixed inset-0 z-[60] overflow-hidden`,cb=J(`pointer-events-auto fixed z-[61] inline-flex items-center justify-center rounded border px-1 py-0.5 font-mono text-[11px] leading-none font-bold shadow-md transition-transform select-none`,{variants:{action:{focus:`border-primary bg-primary text-primary-foreground`,activate:`border-warn bg-warn text-warn-foreground`}},defaultVariants:{action:`focus`}}),lb=`opacity-50 line-through`;y_(C0,H3);var ub=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join(`-`).toLowerCase();function db(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:ub(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var fb=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},pb=e=>{let t=fb(e);return t.charAt(0).toUpperCase()+t.slice(1)},mb=(...e)=>{let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of n.split(/\s+/))e&&t.add(e);return[...t].join(` `)},hb={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function gb(e){return e!=null}function _b(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??hb.width,a=e.size??e.height??hb.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?mb(...c):mb(`lucide`,...s,...c),u=t.strokeWidth??hb[`stroke-width`];if(t.absoluteStrokeWidth){let n=Number(u)*Number(e.size??e.width??hb.width)/Number(t.size??t.width??hb.width);Number.isFinite(n)&&(u=n)}return[`svg`,{...Object.entries(hb).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&gb(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&gb(t.width)&&{[r(`width`)]:t.width},...`height`in t&&gb(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function vb(e,t={}){return _b(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var yb=e=>{if(typeof e!=`object`||!e)return!1;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(t.startsWith(`aria-`)||t===`role`||t===`title`)&&e[t]!=null)return!0;return!1},bb=(0,s.createContext)({}),xb=()=>(0,s.useContext)(bb),Sb=(0,s.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=xb()??{},b=yb(f),[x,S,C=[]]=vb(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:mb(y,c),hasA11yProp:b,attributes:f});return(0,s.createElement)(x,{ref:p,...S},[...C.map(([e,t])=>(0,s.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function Cb(e,t=[],n=[]){let r=typeof e==`string`?db(e,t,n):e,i=(0,s.forwardRef)(({className:e,...t},n)=>(0,s.createElement)(Sb,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=pb(r.name)),i}var wb={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};wb.node;var Tb=Cb(wb),Eb={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Eb.node;var Db=Cb(Eb),Ob={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};Ob.node;var kb=Cb(Ob),Ab={name:`circle-exclamation-point`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`,`circle-alert`]};Ab.node;var jb=Cb(Ab),Mb={name:`corner-down-left`,size:24,node:[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]};Mb.node;var Nb=Cb(Mb),Pb={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};Pb.node;var Fb=Cb(Pb),Ib={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Ib.node;var Lb=Cb(Ib),Rb={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};Rb.node;var zb=Cb(Rb),Bb={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};Bb.node;var Vb=Cb(Bb),Hb={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};Hb.node;var Ub=Cb(Hb),Wb={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Wb.node;var Gb=Cb(Wb),Kb={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};Kb.node;var qb=Cb(Kb),Jb={name:`triangle-exclamation-point`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`,`triangle-alert`]};Jb.node;var Yb=Cb(Jb),Xb={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Xb.node;var Zb=Cb(Xb),[Qb,$b]=W({name:`ToggleGroupContext`,hookName:`useToggleGroupContext`,providerName:`<ToggleGroupProvider />`}),e8=K(),t8=(0,s.forwardRef)((e,t)=>{let[n,r]=e8(e,[`value`,`disabled`]),i=z($b().getItemProps(n),r);return(0,G.jsx)(U.button,{...i,ref:t})});t8.displayName=`ToggleGroupItem`;var n8=oo(`toggle-group`).parts(`root`,`item`).build(),r8=e=>e.ids?.root??`toggle-group:${e.id}`,i8=(e,t)=>e.ids?.item?.(t)??`toggle-group:${e.id}:${t}`,a8=e=>e.getById(r8(e)),o8=e=>{let t=`${Rt(r8(e))}:not([data-disabled])`;return Ai(a8(e),t)},s8=e=>d(o8(e)),c8=e=>f(o8(e)),l8=(e,t,n)=>Fi(o8(e),t,n),u8=(e,t,n)=>Ii(o8(e),t,n);function d8(e,t){let{context:n,send:r,prop:i,scope:a}=e,o=n.get(`value`),s=i(`disabled`),c=!i(`multiple`),l=i(`rovingFocus`),u=i(`orientation`)===`horizontal`;function d(e){let t=i8(a,e.value);return{id:t,disabled:!!(e.disabled||s),pressed:!!o.includes(e.value),focused:n.get(`focusedId`)===t}}return{value:o,setValue(e){r({type:`VALUE.SET`,value:e})},getRootProps(){return t.element({...n8.root.attrs,id:r8(a),dir:i(`dir`),role:c?`radiogroup`:`group`,tabIndex:n.get(`isTabbingBackward`)?-1:0,"data-disabled":B(s),"data-orientation":i(`orientation`),"data-focus":B(n.get(`focusedId`)!=null),style:{outline:`none`},onMouseDown(){s||r({type:`ROOT.MOUSE_DOWN`})},onFocus(e){s||e.currentTarget===Zn(e)&&(n.get(`isClickFocus`)||n.get(`isTabbingBackward`)||r({type:`ROOT.FOCUS`}))},onBlur(e){let t=e.relatedTarget;nn(e.currentTarget,t)||s||r({type:`ROOT.BLUR`})}})},getItemState:d,getItemProps(e){let n=d(e),o=n.focused?0:-1;return t.button({...n8.item.attrs,id:n.id,type:`button`,"data-ownedby":r8(a),"data-focus":B(n.focused),disabled:n.disabled,tabIndex:l?o:void 0,role:c?`radio`:void 0,"aria-checked":c?n.pressed:void 0,"aria-pressed":c?void 0:n.pressed,"data-disabled":B(n.disabled),"data-orientation":i(`orientation`),dir:i(`dir`),"data-state":n.pressed?`on`:`off`,onFocus(){n.disabled||r({type:`TOGGLE.FOCUS`,id:n.id})},onClick(t){n.disabled||(r({type:`TOGGLE.CLICK`,id:n.id,value:e.value}),Nn()&&t.currentTarget.focus({preventScroll:!0}))},onKeyDown(e){if(e.defaultPrevented||!nn(e.currentTarget,Zn(e))||n.disabled)return;let t={Tab(e){let t=e.shiftKey;r({type:`TOGGLE.SHIFT_TAB`,isShiftTab:t})},ArrowLeft(){l&&u&&r({type:`TOGGLE.FOCUS_PREV`})},ArrowRight(){l&&u&&r({type:`TOGGLE.FOCUS_NEXT`})},ArrowUp(){l&&!u&&r({type:`TOGGLE.FOCUS_PREV`})},ArrowDown(){l&&!u&&r({type:`TOGGLE.FOCUS_NEXT`})},Home(){l&&r({type:`TOGGLE.FOCUS_FIRST`})},End(){l&&r({type:`TOGGLE.FOCUS_LAST`})}}[lr(e,{dir:i(`dir`),orientation:i(`orientation`)})];t&&(t(e),e.key!==`Tab`&&e.preventDefault())}})}}}var{not:f8,and:p8}=wt(),m8=Tt({props({props:e}){return{defaultValue:[],orientation:`horizontal`,rovingFocus:!0,loopFocus:!0,deselectable:!0,...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}})),focusedId:t(()=>({defaultValue:null})),isTabbingBackward:t(()=>({defaultValue:!1})),isClickFocus:t(()=>({defaultValue:!1})),isWithinToolbar:t(()=>({defaultValue:!1}))}},computed:{currentLoopFocus:({context:e,prop:t})=>t(`loopFocus`)&&!e.get(`isWithinToolbar`)},refs(){return{focusFrame:Qr.create()}},entry:[`checkIfWithinToolbar`],exit:[`cancelFocusFrame`],on:{"VALUE.SET":{actions:[`setValue`]},"TOGGLE.CLICK":{actions:[`setValue`]},"ROOT.MOUSE_DOWN":{actions:[`setClickFocus`]}},states:{idle:{on:{"ROOT.FOCUS":{target:`focused`,guard:f8(p8(`isClickFocus`,`isTabbingBackward`)),actions:[`focusFirstToggle`,`clearClickFocus`]},"TOGGLE.FOCUS":{target:`focused`,actions:[`setFocusedId`]}}},focused:{exit:[`cancelFocusFrame`],on:{"ROOT.BLUR":{target:`idle`,actions:[`clearIsTabbingBackward`,`clearFocusedId`,`clearClickFocus`]},"TOGGLE.FOCUS":{actions:[`setFocusedId`]},"TOGGLE.FOCUS_NEXT":{actions:[`focusNextToggle`]},"TOGGLE.FOCUS_PREV":{actions:[`focusPrevToggle`]},"TOGGLE.FOCUS_FIRST":{actions:[`focusFirstToggle`]},"TOGGLE.FOCUS_LAST":{actions:[`focusLastToggle`]},"TOGGLE.SHIFT_TAB":[{guard:f8(`isFirstToggleFocused`),target:`idle`,actions:[`setIsTabbingBackward`]},{actions:[`setIsTabbingBackward`]}]}}},implementations:{guards:{isClickFocus:({context:e})=>e.get(`isClickFocus`),isTabbingBackward:({context:e})=>e.get(`isTabbingBackward`),isFirstToggleFocused:({context:e,scope:t})=>e.get(`focusedId`)===s8(t)?.id},actions:{setIsTabbingBackward({context:e}){e.set(`isTabbingBackward`,!0)},clearIsTabbingBackward({context:e}){e.set(`isTabbingBackward`,!1)},setClickFocus({context:e}){e.set(`isClickFocus`,!0)},clearClickFocus({context:e}){e.set(`isClickFocus`,!1)},checkIfWithinToolbar({context:e,scope:t}){let n=a8(t)?.closest(`[role=toolbar]`);e.set(`isWithinToolbar`,!!n)},setFocusedId({context:e,event:t}){e.set(`focusedId`,t.id)},clearFocusedId({context:e}){e.set(`focusedId`,null)},setValue({context:e,event:t,prop:n}){Je(t,[`value`]);let r=e.get(`value`);r=E(t.value)?t.value:n(`multiple`)?v(r,t.value):T(r,[t.value])&&n(`deselectable`)?[]:[t.value],e.set(`value`,r)},focusNextToggle({context:e,scope:t,prop:n,refs:r}){r.get(`focusFrame`).request(()=>{let r=e.get(`focusedId`);r&&l8(t,r,n(`loopFocus`))?.focus({preventScroll:!0})})},focusPrevToggle({context:e,scope:t,prop:n,refs:r}){r.get(`focusFrame`).request(()=>{let r=e.get(`focusedId`);r&&u8(t,r,n(`loopFocus`))?.focus({preventScroll:!0})})},focusFirstToggle({scope:e,refs:t}){t.get(`focusFrame`).request(()=>{s8(e)?.focus({preventScroll:!0})})},focusLastToggle({scope:e,refs:t}){t.get(`focusFrame`).request(()=>{c8(e)?.focus({preventScroll:!0})})},cancelFocusFrame({refs:e}){e.get(`focusFrame`).cancel()}}}}),h8=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro(),{dir:r}=ao();return d8(Oa(m8,{id:t,dir:r,getRootNode:n,...e}),Na)},g8=K(),_8=(0,s.forwardRef)((e,t)=>{let[n,r]=g8(e,[`defaultValue`,`deselectable`,`disabled`,`id`,`ids`,`loopFocus`,`multiple`,`onValueChange`,`orientation`,`rovingFocus`,`value`]),i=h8(n),a=z(i.getRootProps(),r);return(0,G.jsx)(Qb,{value:i,children:(0,G.jsx)(U.div,{...a,ref:t})})});_8.displayName=`ToggleGroupRoot`;function v8(e){"@babel/helpers - typeof";return v8=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},v8(e)}function y8(e,t){if(v8(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(v8(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function b8(e){var t=y8(e,`string`);return v8(t)==`symbol`?t:t+``}function $(e,t,n){return(t=b8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x8,S8={itemToValue(e){return typeof e==`string`?e:ee(e)&&M(e,`value`)?e.value:``},itemToString(e){return typeof e==`string`?e:ee(e)&&M(e,`label`)?e.label:S8.itemToValue(e)},isItemDisabled(e){return ee(e)&&M(e,`disabled`)?!!e.disabled:!1}},C8=2;x8=Symbol.iterator;var w8=class e{constructor(e){this.options=e,$(this,`items`,void 0),$(this,`indexMap`,null),$(this,`orderedItems`,null),$(this,`cacheSource`,null),$(this,`scannedCount`,0),$(this,`copy`,e=>this.createCollection(e??[...this.items])),$(this,`isEqual`,e=>T(this.items,e.items)),$(this,`setItems`,e=>this.copy(e)),$(this,`getValues`,(e=this.items)=>{let t=[];for(let n of e){let e=this.getItemValue(n);e!=null&&t.push(e)}return t}),$(this,`find`,e=>{if(e==null)return null;let t=this.indexOf(e);return t===-1?null:this.at(t)}),$(this,`findMany`,e=>{let t=[];for(let n of e){let e=this.find(n);e!=null&&t.push(e)}return t}),$(this,`at`,e=>this.isGrouped()?this.getOrderedItems()[e]??null:this.items[e]??null),$(this,`sortFn`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return(n??0)-(r??0)}),$(this,`sort`,e=>[...e].sort(this.sortFn.bind(this))),$(this,`getItemValue`,e=>e==null?null:this.options.itemToValue?.(e)??S8.itemToValue(e)),$(this,`getItemDisabled`,e=>e==null?!1:this.options.isItemDisabled?.(e)??S8.isItemDisabled(e)),$(this,`stringifyItem`,e=>e==null?null:this.options.itemToString?.(e)??S8.itemToString(e)),$(this,`stringify`,e=>e==null?null:this.stringifyItem(this.find(e))),$(this,`stringifyItems`,(e,t=`, `)=>{let n=[];for(let t of e){let e=this.stringifyItem(t);e!=null&&n.push(e)}return n.join(t)}),$(this,`stringifyMany`,(e,t)=>this.stringifyItems(this.findMany(e),t)),$(this,`has`,e=>this.indexOf(e)!==-1),$(this,`hasItem`,e=>e!=null&&this.has(this.getItemValue(e))),$(this,`group`,()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[[``,[...this.items]]];let n=new Map;this.items.forEach((t,r)=>{let i=e(t,r);n.has(i)||n.set(i,[]),n.get(i).push(t)});let r=Array.from(n.entries());return t&&r.sort(([e],[n])=>{if(typeof t==`function`)return t(e,n);if(Array.isArray(t)){let r=t.indexOf(e),i=t.indexOf(n);return r===-1?1:i===-1?-1:r-i}return t===`asc`?e.localeCompare(n):t===`desc`?n.localeCompare(e):0}),r}),$(this,`getNextValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))}),$(this,`getPreviousValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))}),$(this,`indexOf`,e=>{if(e==null)return-1;if(this.syncCache(),!this.indexMap&&!this.isGrouped()&&this.scannedCount<this.items.length*C8){let t=this.getItemIndex(e);return this.scannedCount+=t===-1?this.items.length:t+1,t}if(!this.indexMap){let e=new Map,t=this.getOrderedItems();for(let n=0;n<t.length;n++){let r=this.getItemValue(t[n]);r!=null&&!e.has(r)&&e.set(r,n)}this.indexMap=e}return this.indexMap.get(e)??-1}),$(this,`getByText`,(e,t)=>{let n=t==null?-1:this.indexOf(t),r=e.length===1,i=this.getOrderedItems();for(let a=0;a<i.length;a++){let o=i[(n+a+1)%i.length];if(!(r&&this.getItemValue(o)===t)&&!this.getItemDisabled(o)&&T8(this.stringifyItem(o),e))return o}}),$(this,`search`,(e,t)=>{let{state:n,currentValue:r,timeout:i=350}=t,a=n.keysSoFar+e,o=a.length>1&&Array.from(a).every(e=>e===a[0])?a[0]:a,s=this.getByText(o,r),c=this.getItemValue(s);function l(){clearTimeout(n.timer),n.timer=-1}function u(e){n.keysSoFar=e,l(),e!==``&&(n.timer=+setTimeout(()=>{u(``),l()},i))}return u(a),c}),$(this,`update`,(e,t)=>{let n=this.getItemIndex(e);return n===-1?this.unchanged():this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])}),$(this,`upsert`,(e,t,n=`append`)=>{let r=this.getItemIndex(e);return r===-1?(n===`append`?this.append:this.prepend)(t):this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])}),$(this,`insert`,(e,...t)=>this.copy(E8(this.items,e,...t))),$(this,`insertBefore`,(e,...t)=>{let n=this.getItemIndex(e);if(n===-1){if(this.items.length===0)n=0;else return this.unchanged()}return this.copy(E8(this.items,n,...t))}),$(this,`insertAfter`,(e,...t)=>{let n=this.getItemIndex(e);if(n===-1){if(this.items.length===0)n=0;else return this.unchanged()}return this.copy(E8(this.items,n+1,...t))}),$(this,`prepend`,(...e)=>this.copy(E8(this.items,0,...e))),$(this,`append`,(...e)=>this.copy(E8(this.items,this.items.length,...e))),$(this,`filter`,e=>{let t=this.items.filter((t,n)=>e(this.stringifyItem(t),n,t));return this.copy(t)}),$(this,`remove`,(...e)=>{let t=e.map(e=>typeof e==`string`?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let n=this.getItemValue(e);return n!=null&&!t.includes(n)}))}),$(this,`move`,(e,t)=>{let n=this.getItemIndex(e);return n===-1?this.unchanged():this.copy(D8(this.items,[n],t))}),$(this,`moveBefore`,(e,...t)=>{let n=this.getItemIndex(e);if(n===-1)return this.unchanged();let r=t.map(e=>this.getItemIndex(e)).sort((e,t)=>e-t);return this.copy(D8(this.items,r,n))}),$(this,`moveAfter`,(e,...t)=>{let n=this.getItemIndex(e);if(n===-1)return this.unchanged();let r=t.map(e=>this.getItemIndex(e)).sort((e,t)=>e-t);return this.copy(D8(this.items,r,n+1))}),$(this,`reorder`,(e,t)=>this.copy(D8(this.items,[e],t))),$(this,`compareValue`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:+(n>r)}),$(this,`range`,(e,t)=>{let n=[],r=e;for(;r!=null;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]}),$(this,`getValueRange`,(e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[]),$(this,`toString`,()=>{let e=``;for(let t of this.items){let n=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(`:`);e+=n+`,`}return e}),$(this,`toJSON`,()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...e.items]}unchanged(){return this}createCollection(t){return new e({...this.options,items:t})}isGrouped(){return!!(this.options.groupBy||this.options.groupSort)}syncCache(){this.cacheSource!==this.items&&(this.cacheSource=this.items,this.indexMap=null,this.orderedItems=null,this.scannedCount=0)}getOrderedItems(){if(!this.isGrouped())return this.items;if(this.syncCache(),!this.orderedItems){let e=[];for(let[,t]of this.group())for(let n of t)e.push(n);this.orderedItems=e}return this.orderedItems}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}getItemIndex(e){return this.items.findIndex(t=>this.getItemValue(t)===e)}*[x8](){yield*this.items}},T8=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function E8(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function D8(e,t,n){t=[...t].sort((e,t)=>e-t);let r=t.map(t=>e[t]);for(let n=t.length-1;n>=0;n--)e=[...e.slice(0,t[n]),...e.slice(t[n]+1)];return n=Math.max(0,n-t.filter(e=>e<n).length),[...e.slice(0,n),...r,...e.slice(n)]}function O8(e){return M(e,`columnCount`)&&M(e,`getRows`)}function k8({values:e,collection:t,selectedItemMap:n}){let r=[];for(let i of e){let e=t.find(i)??n.get(i);e!=null&&r.push(e)}return r}function A8({selectedItemMap:e,values:t,selectedItems:n,collection:r}){let i=new Map(e);for(let e of n){let t=r.getItemValue(e);t!=null&&i.set(t,e)}let a=new Set(t);for(let e of i.keys())a.has(e)||i.delete(e);return i}function j8({values:e,collection:t,selectedItemMap:n}){let r=k8({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:A8({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function M8({selectedItems:e,collection:t}){return A8({selectedItemMap:new Map,values:e.map(e=>t.getItemValue(e)).filter(Boolean),selectedItems:e,collection:t})}var N8=class e extends Set{constructor(t=[]){super(t),$(this,`selectionMode`,`single`),$(this,`deselectable`,!0),$(this,`copy`,()=>{let t=new e([...this]);return this.sync(t)}),$(this,`sync`,e=>(e.selectionMode=this.selectionMode,e.deselectable=this.deselectable,e)),$(this,`isEmpty`,()=>this.size===0),$(this,`isSelected`,e=>this.selectionMode===`none`||e==null?!1:this.has(e)),$(this,`canSelect`,(e,t)=>this.selectionMode!==`none`||!e.getItemDisabled(e.find(t))),$(this,`firstSelectedValue`,e=>{let t=null;for(let n of this)(!t||e.compareValue(n,t)<0)&&(t=n);return t}),$(this,`lastSelectedValue`,e=>{let t=null;for(let n of this)(!t||e.compareValue(n,t)>0)&&(t=n);return t}),$(this,`extendSelection`,(e,t,n,r)=>{if(this.selectionMode===`none`)return this;if(this.selectionMode===`single`)return this.replaceSelection(e,n);let i=this.copy(),a=r??Array.from(this).pop();for(let r of e.getValueRange(t,a??n))i.delete(r);for(let r of e.getValueRange(n,t))this.canSelect(e,r)&&i.add(r);return i}),$(this,`toggleSelection`,(e,t)=>{if(this.selectionMode===`none`)return this;if(this.selectionMode===`single`&&!this.isSelected(t))return this.replaceSelection(e,t);let n=this.copy();return n.has(t)?n.delete(t):n.canSelect(e,t)&&n.add(t),n}),$(this,`replaceSelection`,(t,n)=>{if(this.selectionMode===`none`||n==null||!this.canSelect(t,n))return this;let r=new e([n]);return this.sync(r)}),$(this,`setSelection`,t=>{if(this.selectionMode===`none`)return this;let n=new e;for(let e of t)if(e!=null&&(n.add(e),this.selectionMode===`single`))break;return this.sync(n)}),$(this,`clearSelection`,()=>{let e=this.copy();return e.deselectable&&e.size>0&&e.clear(),e}),$(this,`select`,(e,t,n)=>this.selectionMode===`none`?this:this.selectionMode===`single`?this.isSelected(t)&&this.deselectable?this.toggleSelection(e,t):this.replaceSelection(e,t):this.selectionMode===`multiple`||n?this.toggleSelection(e,t):this.replaceSelection(e,t)),$(this,`deselect`,e=>{let t=this.copy();return t.delete(e),t}),$(this,`isEqual`,e=>T(Array.from(this),Array.from(e)))}},P8=e=>new w8(e),[F8,I8]=W({name:`ListboxContext`,hookName:`useListboxContext`,providerName:`<ListboxProvider />`}),L8=(0,s.forwardRef)((e,t)=>{let n=z(I8().getContentProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});L8.displayName=`ListboxContent`;var R8=oo(`listbox`).parts(`label`,`input`,`item`,`itemText`,`itemIndicator`,`itemGroup`,`itemGroupLabel`,`content`,`root`,`valueText`),z8=R8.build(),B8=e=>new w8(e);B8.empty=()=>new w8({items:[]});function V8(e){return!(e.metaKey||!Mn()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var H8=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),U8=`a[href],audio[controls],button,details,embed,iframe,img[controls],img[usemap],input,select,textarea,video[controls]`;function W8(e,t,n){let r=n?Zn(n):null,i=rn(r),a=on(r),o=sn(i);return e=e||o instanceof a.HTMLInputElement&&!H8.has(o?.type)||o instanceof a.HTMLTextAreaElement||o instanceof a.HTMLElement&&o.isContentEditable,!(e&&t===`keyboard`&&n instanceof a.KeyboardEvent&&!Reflect.has(Q8,n.key))}var G8=null,K8=new Set,q8=new Map,J8=!1,Y8=null,X8=!1,Z8=null,Q8={Tab:!0,Escape:!0};function $8(e,t){for(let n of K8)n(e,t)}function ex(e){Y8=null,J8=!0,V8(e)&&(G8=`keyboard`,$8(`keyboard`,e))}function tx(e){(e.type!==`pointermove`&&e.type!==`mousemove`||!e.isTrusted||Z8?.x!==e.clientX||Z8?.y!==e.clientY)&&(Z8={x:e.clientX,y:e.clientY},G8=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(Y8=null,J8=!0,$8(`pointer`,e)))}function nx(e){if(nr(e)){Y8=null,J8=!0,G8=`virtual`;return}Y8=null;let t=Zn(e),n=t?.closest(`label`),r=n?.control;if(!n||!r||r.matches(`:disabled`))return;let i=t?.closest(U8);i&&n.contains(i)&&i!==r||r!==sn(n.ownerDocument)&&(Y8=r)}function rx(e){let t=Zn(e),n=t===Y8;t!==on(t)&&t!==rn(t)&&e.isTrusted&&(J8||n||X8||(G8=`virtual`,$8(`virtual`,e)),J8=!1,Y8=null,X8=!1)}function ix(){J8=!1,Y8=null,X8=!0}function ax(e){try{return e.focus}catch{return}}function ox(e){let t=e.HTMLElement.prototype;try{let n=ax(t),r=n?void 0:Object.getOwnPropertyDescriptor(t,`focus`),i=r?.get;if(!n&&!i)return{focus:void 0};function a(){J8=!0,(n??i.call(this)).apply(this,arguments)}return Object.defineProperty(e.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:a}),{focus:n,descriptor:r}}catch{return{focus:void 0}}}function sx(e){if(typeof window>`u`||q8.get(on(e)))return;let t=on(e),n=rn(e),r=ox(t);n.addEventListener(`keydown`,ex,!0),n.addEventListener(`keyup`,ex,!0),n.addEventListener(`click`,nx,!0),t.addEventListener(`focus`,rx,!0),t.addEventListener(`blur`,ix,!1),t.PointerEvent===void 0?(n.addEventListener(`mousedown`,tx,!0),n.addEventListener(`mousemove`,tx,!0),n.addEventListener(`mouseup`,tx,!0)):(n.addEventListener(`pointerdown`,tx,!0),n.addEventListener(`pointermove`,tx,!0),n.addEventListener(`pointerup`,tx,!0)),t.addEventListener(`beforeunload`,()=>{cx(e)},{once:!0}),q8.set(t,r)}var cx=(e,t)=>{let n=on(e),r=rn(e);t&&r.removeEventListener(`DOMContentLoaded`,t);let i=q8.get(n);if(i){if(i.focus||i.descriptor)try{Object.defineProperty(n.HTMLElement.prototype,"focus",i.descriptor??{configurable:!0,writable:!0,value:i.focus})}catch{}r.removeEventListener(`keydown`,ex,!0),r.removeEventListener(`keyup`,ex,!0),r.removeEventListener(`click`,nx,!0),n.removeEventListener(`focus`,rx,!0),n.removeEventListener(`blur`,ix,!1),n.PointerEvent===void 0?(r.removeEventListener(`mousedown`,tx,!0),r.removeEventListener(`mousemove`,tx,!0),r.removeEventListener(`mouseup`,tx,!0)):(r.removeEventListener(`pointerdown`,tx,!0),r.removeEventListener(`pointermove`,tx,!0),r.removeEventListener(`pointerup`,tx,!0)),q8.delete(n)}};function lx(){return G8}function ux(e){G8=e,$8(e,null)}function dx(){return G8===`keyboard`||G8===`virtual`}function fx(e={}){let{isTextInput:t,autoFocus:n,onChange:r,root:i}=e;sx(i),r?.({isFocusVisible:n||dx(),modality:G8});let a=(e,n)=>{W8(!!t,e,n)&&r?.({isFocusVisible:dx(),modality:e})};return K8.add(a),()=>{K8.delete(a)}}var px=e=>e.ids?.root??`listbox:${e.id}`,mx=e=>e.ids?.content??`listbox:${e.id}:content`,hx=e=>e.ids?.label??`listbox:${e.id}:label`,gx=(e,t)=>e.ids?.item?.(t)??`listbox:${e.id}:item:${t}`,_x=(e,t)=>e.ids?.itemGroup?.(t)??`listbox:${e.id}:item-group:${t}`,vx=(e,t)=>e.ids?.itemGroupLabel?.(t)??`listbox:${e.id}:item-group-label:${t}`,yx=e=>e.getById(mx(e)),bx=(e,t)=>e.getById(gx(e,t));function xx(e,t){let{context:n,prop:r,scope:i,computed:a,send:o,refs:s}=e,c=r(`disabled`),l=r(`collection`),u=O8(l)?`grid`:`list`,d=n.get(`focused`),f=s.get(`focusVisible`)&&d,p=s.get(`inputState`),m=n.get(`value`),h=a(`selectedItems`),g=n.get(`highlightedValue`),_=n.get(`highlightedItem`),v=a(`isTypingAhead`),y=a(`isInteractive`),b=g?gx(i,g):void 0;function x(e){let t=l.getItemDisabled(e.item),r=l.getItemValue(e.item);qe(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`);let i=g===r;return{value:r,disabled:!!(c||t),focused:i&&d,focusVisible:i&&f,highlighted:i&&(p.focused?d:f),selected:n.get(`value`).includes(r)}}return{empty:m.length===0,highlightedItem:_,highlightedValue:g,clearHighlightedValue(){o({type:`HIGHLIGHTED_VALUE.SET`,value:null})},selectedItems:h,hasSelectedItems:a(`hasSelectedItems`),value:m,valueAsString:a(`valueAsString`),collection:l,disabled:!!c,selectValue(e){o({type:`ITEM.SELECT`,value:e})},setValue(e){o({type:`VALUE.SET`,value:e})},selectAll(){if(!a(`multiple`))throw Error(`[zag-js] Cannot select all items in a single-select listbox`);o({type:`VALUE.SET`,value:l.getValues()})},highlightValue(e){o({type:`HIGHLIGHTED_VALUE.SET`,value:e})},highlightFirst(){o({type:`HIGHLIGHT.FIRST`})},highlightLast(){o({type:`HIGHLIGHT.LAST`})},highlightNext(){o({type:`HIGHLIGHT.NEXT`})},highlightPrevious(){o({type:`HIGHLIGHT.PREV`})},clearValue(e){o(e?{type:`ITEM.CLEAR`,value:e}:{type:`VALUE.CLEAR`})},getItemState:x,getRootProps(){return t.element({...z8.root.attrs,dir:r(`dir`),id:px(i),"data-orientation":r(`orientation`),"data-disabled":B(c)})},getInputProps(e={}){let n=e.keyboardPriority??`caret`;return t.input({...z8.input.attrs,dir:r(`dir`),disabled:c,"data-disabled":B(c),autoComplete:`off`,autoCorrect:`off`,"aria-haspopup":`listbox`,"aria-controls":mx(i),"aria-autocomplete":`list`,"aria-activedescendant":b,spellCheck:!1,enterKeyHint:`go`,onFocus(){queueMicrotask(()=>{o({type:`INPUT.FOCUS`,autoHighlight:!!e?.autoHighlight})})},onBlur(){o({type:`CONTENT.BLUR`,src:`input`})},onInput(t){e?.autoHighlight&&(t.currentTarget.value.trim()||queueMicrotask(()=>{o({type:`HIGHLIGHTED_VALUE.SET`,value:null})}))},onKeyDown(e){if(e.defaultPrevented||er(e))return;let t=ur(e),r=()=>{e.preventDefault();let n=new(i.getWin()).KeyboardEvent(t.type,t);yx(i)?.dispatchEvent(n)};switch(t.key){case`ArrowLeft`:case`ArrowRight`:if(!O8(l)||e.ctrlKey||n!==`navigate`)return;r();break;case`Home`:case`End`:if(n!==`navigate`||g==null&&e.shiftKey)return;r();break;case`ArrowDown`:case`ArrowUp`:r();break;case`Enter`:g!=null&&(e.preventDefault(),o({type:`ITEM.CLICK`,value:g}))}}})},getLabelProps(){return t.element({dir:r(`dir`),id:hx(i),...z8.label.attrs,"data-disabled":B(c)})},getValueTextProps(){return t.element({...z8.valueText.attrs,dir:r(`dir`),"data-disabled":B(c)})},getItemProps(e){let n=x(e);return t.element({id:gx(i,n.value),role:`option`,...z8.item.attrs,dir:r(`dir`),"data-value":n.value,"aria-selected":n.selected,"data-selected":B(n.selected),"data-layout":u,"data-state":n.selected?`checked`:`unchecked`,"data-orientation":r(`orientation`),"data-highlighted":B(n.highlighted),"data-disabled":B(n.disabled),"aria-disabled":Pt(n.disabled),onPointerMove(t){e.highlightOnHover&&(n.disabled||t.pointerType!==`mouse`||lx()===`pointer`&&(n.highlighted||o({type:`ITEM.POINTER_MOVE`,value:n.value})))},onMouseDown(e){e.preventDefault(),yx(i)?.focus()},onClick(e){e.defaultPrevented||$n(e)||Qn(e)||ir(e)||n.disabled||o({type:`ITEM.CLICK`,value:n.value,shiftKey:e.shiftKey,metaKey:tr(e)})}})},getItemTextProps(e){let n=x(e);return t.element({...z8.itemText.attrs,"data-state":n.selected?`checked`:`unchecked`,"data-disabled":B(n.disabled),"data-highlighted":B(n.highlighted)})},getItemIndicatorProps(e){let n=x(e);return t.element({...z8.itemIndicator.attrs,"aria-hidden":!0,"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...z8.itemGroupLabel.attrs,id:vx(i,n),dir:r(`dir`),role:`presentation`})},getItemGroupProps(e){let{id:n}=e;return t.element({...z8.itemGroup.attrs,"data-disabled":B(c),"data-orientation":r(`orientation`),"data-empty":B(l.size===0),id:_x(i,n),"aria-labelledby":vx(i,n),role:`group`,dir:r(`dir`)})},getContentProps(){return t.element({dir:r(`dir`),id:mx(i),role:`listbox`,...z8.content.attrs,"data-activedescendant":b,"aria-activedescendant":b,"data-orientation":r(`orientation`),"aria-multiselectable":a(`multiple`)?!0:void 0,"aria-labelledby":hx(i),tabIndex:0,"data-layout":u,"data-empty":B(l.size===0),style:{"--column-count":O8(l)?l.columnCount:1},onFocus(){o({type:`CONTENT.FOCUS`})},onBlur(){o({type:`CONTENT.BLUR`})},onKeyDown(e){if(!y)return;let t=Zn(e);if(!nn(e.currentTarget,Zn(e)))return;let n=e.shiftKey,i={ArrowUp(e){let t=null;O8(l)&&g?t=l.getPreviousRowValue(g):g&&(t=l.getPreviousValue(g)),t||!r(`loopFocus`)&&g||(t=l.lastValue),t&&(e.preventDefault(),o({type:`NAVIGATE`,value:t,shiftKey:n}))},ArrowDown(e){let t=null;O8(l)&&g?t=l.getNextRowValue(g):g&&(t=l.getNextValue(g)),t||!r(`loopFocus`)&&g||(t=l.firstValue),t&&(e.preventDefault(),o({type:`NAVIGATE`,value:t,shiftKey:n}))},ArrowLeft(){if(!O8(l)&&r(`orientation`)===`vertical`)return;let t=g?l.getPreviousValue(g):null;!t&&r(`loopFocus`)&&(t=l.lastValue),t&&(e.preventDefault(),o({type:`NAVIGATE`,value:t,shiftKey:n}))},ArrowRight(){if(!O8(l)&&r(`orientation`)===`vertical`)return;let t=g?l.getNextValue(g):null;!t&&r(`loopFocus`)&&(t=l.firstValue),t&&(e.preventDefault(),o({type:`NAVIGATE`,value:t,shiftKey:n}))},Home(e){if(tn(t))return;e.preventDefault();let r=l.firstValue;o({type:`NAVIGATE`,value:r,shiftKey:n})},End(e){if(tn(t))return;e.preventDefault();let r=l.lastValue;o({type:`NAVIGATE`,value:r,shiftKey:n})},Enter(){o({type:`ITEM.CLICK`,value:g})},a(e){tr(e)&&a(`multiple`)&&!r(`disallowSelectAll`)&&(e.preventDefault(),o({type:`VALUE.SET`,value:l.getValues()}))},Space(e){v&&r(`typeahead`)?o({type:`CONTENT.TYPEAHEAD`,key:e.key}):i.Enter?.(e)},Escape(e){r(`deselectable`)&&m.length>0&&(e.preventDefault(),e.stopPropagation(),o({type:`VALUE.CLEAR`}))}},s=lr(e,{dir:r(`dir`)}),c=s===`a`&&!tr(e)?void 0:i[s];c?c(e):tn(t)||oa.isValidEvent(e)&&r(`typeahead`)&&(o({type:`CONTENT.TYPEAHEAD`,key:e.key}),e.preventDefault())}})}}}var{guards:Sx,createMachine:Cx}=Et(),{or:wx}=Sx,Tx=Cx({props({props:e}){return{loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:B8.empty(),orientation:`vertical`,selectionMode:`single`,...e}},context({prop:e,bindable:t,getContext:n}){let r=e(`value`)??e(`defaultValue`)??[],i=e(`collection`).findMany(r);return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:T,onChange(t){let r=n(),i=e(`collection`),a=j8({values:t,collection:i,selectedItemMap:r.get(`selectedItemMap`)}),o=e(`value`)??t,s=o===t?a:j8({values:o,collection:i,selectedItemMap:a.nextSelectedItemMap});return r.set(`selectedItemMap`,s.nextSelectedItemMap),e(`onValueChange`)?.({value:t,items:a.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),sync:!0,onChange(t){e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:e(`collection`).find(t),highlightedIndex:e(`collection`).indexOf(t)})}})),highlightedItem:t(()=>({defaultValue:null})),selectedItemMap:t(()=>({defaultValue:M8({selectedItems:i,collection:e(`collection`)})})),focused:t(()=>({sync:!0,defaultValue:!1}))}},refs(){return{typeahead:{...oa.defaultOptions},focusVisible:!1,inputState:{autoHighlight:!1,focused:!1},anchorValue:null,currentValue:null}},computed:{hasSelectedItems:({context:e})=>e.get(`value`).length>0,isTypingAhead:({refs:e})=>e.get(`typeahead`).keysSoFar!==``,isInteractive:({prop:e})=>!e(`disabled`),selection:({context:e,prop:t})=>{let n=new N8(e.get(`value`));return n.selectionMode=t(`selectionMode`),n.deselectable=!!t(`deselectable`),n},multiple:({prop:e})=>e(`selectionMode`)===`multiple`||e(`selectionMode`)===`extended`,selectedItems:({context:e,prop:t})=>k8({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)}),valueAsString:({computed:e,prop:t})=>t(`collection`).stringifyItems(e(`selectedItems`))},initialState(){return`idle`},watch({context:e,prop:t,track:n,action:r}){n([()=>e.get(`value`).toString()],()=>{r([`syncSelectedItems`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`])}),n([()=>t(`collection`).toString()],()=>{r([`syncHighlightedValue`])})},effects:[`trackFocusVisible`],on:{"HIGHLIGHTED_VALUE.SET":{actions:[`setHighlightedItem`]},"ITEM.SELECT":{actions:[`selectItem`]},"ITEM.CLEAR":{actions:[`clearItem`]},"VALUE.SET":{actions:[`setSelectedItems`,`clearRangeEnd`]},"VALUE.CLEAR":{actions:[`clearSelectedItems`,`clearRangeEnd`]},"HIGHLIGHT.FIRST":{actions:[`highlightFirstValue`]},"HIGHLIGHT.LAST":{actions:[`highlightLastValue`]},"HIGHLIGHT.NEXT":{actions:[`highlightNextValue`]},"HIGHLIGHT.PREV":{actions:[`highlightPreviousValue`]}},states:{idle:{effects:[`scrollToHighlightedItem`],on:{"INPUT.FOCUS":{actions:[`setFocused`,`setInputState`]},"CONTENT.FOCUS":[{guard:wx(`hasSelectedValue`,`hasHighlightedValue`),actions:[`setFocused`]},{actions:[`setFocused`,`setDefaultHighlightedValue`]}],"CONTENT.BLUR":{actions:[`clearFocused`,`clearInputState`]},"ITEM.CLICK":{actions:[`setHighlightedItem`,`selectHighlightedItem`]},"CONTENT.TYPEAHEAD":{actions:[`setFocused`,`highlightMatchingItem`]},"ITEM.POINTER_MOVE":{actions:[`highlightItem`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedItem`]},NAVIGATE:{actions:[`setFocused`,`setHighlightedItem`,`selectWithKeyboard`]}}}},implementations:{guards:{hasSelectedValue:({context:e})=>e.get(`value`).length>0,hasHighlightedValue:({context:e})=>e.get(`highlightedValue`)!=null},effects:{trackFocusVisible:({scope:e,refs:t})=>fx({root:e.getRootNode?.(),onChange(e){t.set(`focusVisible`,e.isFocusVisible)}}),scrollToHighlightedItem({context:e,prop:t,scope:n}){let r=r=>{let i=e.get(`highlightedValue`);if(i==null||lx()===`pointer`)return;let a=yx(n),o=t(`scrollToIndexFn`);if(o){let e=t(`collection`).indexOf(i);o?.({index:e,immediate:r,getElement(){return bx(n,i)}})}else Wi(bx(n,i),{rootEl:a})},i=H(()=>{ux(`virtual`),r(!0)}),a=ai(()=>yx(n),{defer:!0,attributes:[`data-activedescendant`],callback(){r(!1)}});return()=>{i(),a()}}},actions:{selectHighlightedItem({context:e,prop:t,event:n,computed:r,refs:i}){let a=n.value??e.get(`highlightedValue`),o=t(`collection`);if(a==null||!o.has(a))return;let s=r(`selection`),c=i.get(`anchorValue`);if(n.shiftKey&&r(`multiple`)&&c!=null){let n=s.extendSelection(o,c,a,i.get(`currentValue`));Dx(s,n,t(`onSelect`)),e.set(`value`,Array.from(n)),i.set(`currentValue`,a)}else{let r=s.select(o,a,n.metaKey);Dx(s,r,t(`onSelect`)),e.set(`value`,Array.from(r)),i.set(`anchorValue`,a),i.set(`currentValue`,a)}},selectWithKeyboard({context:e,prop:t,event:n,computed:r,refs:i}){let a=r(`selection`),o=t(`collection`),s=i.get(`anchorValue`);if(n.shiftKey&&r(`multiple`)&&s!=null){let r=a.extendSelection(o,s,n.value,i.get(`currentValue`));Dx(a,r,t(`onSelect`)),e.set(`value`,Array.from(r)),i.set(`currentValue`,n.value)}else if(i.set(`anchorValue`,n.value),i.set(`currentValue`,n.value),t(`selectOnHighlight`)){let r=a.replaceSelection(o,n.value);Dx(a,r,t(`onSelect`)),e.set(`value`,Array.from(r))}},highlightItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`highlightedValue`)});i!=null&&e.set(`highlightedValue`,i)},setHighlightedItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},highlightFirstValue({context:e,prop:t}){e.set(`highlightedValue`,t(`collection`).firstValue??null)},highlightLastValue({context:e,prop:t}){e.set(`highlightedValue`,t(`collection`).lastValue??null)},highlightNextValue({context:e,prop:t}){let n=t(`collection`),r=e.get(`highlightedValue`),i=null;O8(n)&&r?i=n.getNextRowValue(r):r&&(i=n.getNextValue(r)),i||!t(`loopFocus`)&&r||(i=n.firstValue),i&&e.set(`highlightedValue`,i)},highlightPreviousValue({context:e,prop:t}){let n=t(`collection`),r=e.get(`highlightedValue`),i=null;O8(n)&&r?i=n.getPreviousRowValue(r):r&&(i=n.getPreviousValue(r)),i||!t(`loopFocus`)&&r||(i=n.lastValue),i&&e.set(`highlightedValue`,i)},clearHighlightedItem({context:e}){e.set(`highlightedValue`,null)},clearRangeEnd({refs:e}){e.set(`currentValue`,null)},selectItem({context:e,prop:t,event:n,computed:r}){let i=t(`collection`),a=r(`selection`),o=a.select(i,n.value);Dx(a,o,t(`onSelect`)),e.set(`value`,Array.from(o))},clearItem({context:e,event:t,computed:n}){let r=n(`selection`).deselect(t.value);e.set(`value`,Array.from(r))},setSelectedItems({context:e,event:t}){e.set(`value`,t.value)},clearSelectedItems({context:e}){e.set(`value`,[])},syncSelectedItems({context:e,prop:t}){let n=j8({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)});e.set(`selectedItemMap`,n.nextSelectedItemMap)},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`),r=e.get(`highlightedValue`),i=r?n.find(r):null;e.set(`highlightedItem`,i)},syncHighlightedValue({context:e,prop:t,refs:n}){let r=t(`collection`),i=e.get(`highlightedValue`),{autoHighlight:a}=n.get(`inputState`),o=n.get(`anchorValue`);o!=null&&!r.has(o)&&(n.set(`anchorValue`,null),n.set(`currentValue`,null)),a?queueMicrotask(()=>{e.set(`highlightedValue`,t(`collection`).firstValue??null)}):i!=null&&!r.has(i)&&queueMicrotask(()=>{e.set(`highlightedValue`,null)})},setFocused({context:e}){e.set(`focused`,!0)},setDefaultHighlightedValue({context:e,prop:t}){let n=t(`collection`).firstValue;n!=null&&e.set(`highlightedValue`,n)},clearFocused({context:e}){e.set(`focused`,!1)},setInputState({refs:e,event:t}){e.set(`inputState`,{autoHighlight:!!t.autoHighlight,focused:!0})},clearInputState({refs:e}){e.set(`inputState`,{autoHighlight:!1,focused:!1})}}}}),Ex=(e,t)=>{let n=new Set(e);for(let e of t)n.delete(e);return n};function Dx(e,t,n){let r=Ex(t,e);for(let e of r)n?.({value:e})}var Ox=R8.extendWith(`empty`).build(),kx=(0,s.forwardRef)((e,t)=>I8().collection.size===0?(0,G.jsx)(U.div,{...Ox.empty.attrs,...e,role:`presentation`,ref:t}):null);kx.displayName=`ListboxEmpty`;var Ax=K(),jx=(0,s.forwardRef)((e,t)=>{let[n,r]=Ax(e,[`autoHighlight`,`keyboardPriority`]),i=z(I8().getInputProps(n),r);return(0,G.jsx)(U.input,{...i,ref:t})});jx.displayName=`ListboxInput`;var[Mx,Nx]=W({name:`ListboxItemContext`,hookName:`useListboxItemContext`,providerName:`<ListboxItemProvider />`}),[Px,Fx]=W({name:`ListboxItemPropsContext`,hookName:`useListboxItemPropsContext`,providerName:`<ListboxItemPropsProvider />`}),Ix=K(),Lx=(0,s.forwardRef)((e,t)=>{let[n,r]=Ix(e,[`item`,`highlightOnHover`]),i=I8(),a=z(i.getItemProps(n),r),o=i.getItemState(n);return(0,G.jsx)(Px,{value:n,children:(0,G.jsx)(Mx,{value:o,children:(0,G.jsx)(U.div,{...a,ref:t})})})});Lx.displayName=`ListboxItem`;var[Rx,zx]=W({name:`ListboxItemGroupPropsContext`,hookName:`useListboxItemGroupPropsContext`,providerName:`<ListboxItemGroupPropsProvider />`}),Bx=K(),Vx=(0,s.forwardRef)((e,t)=>{let n=(0,s.useId)(),[r,i]=Bx(e,[`id`]),a={id:n,...r},o=z(I8().getItemGroupProps(a),i);return(0,G.jsx)(Rx,{value:a,children:(0,G.jsx)(U.div,{...o,ref:t})})});Vx.displayName=`ListboxItemGroup`;var Hx=(0,s.forwardRef)((e,t)=>{let n=I8(),r=zx(),i=z(n.getItemGroupLabelProps({htmlFor:r.id}),e);return(0,G.jsx)(U.div,{...i,ref:t})});Hx.displayName=`ListboxItemGroupLabel`;var Ux=(0,s.forwardRef)((e,t)=>{let n=I8(),r=Fx(),i=z(n.getItemIndicatorProps(r),e);return(0,G.jsx)(U.div,{...i,ref:t})});Ux.displayName=`ListboxItemIndicator`;var Wx=(0,s.forwardRef)((e,t)=>{let n=I8(),r=Fx(),i=z(n.getItemTextProps(r),e);return(0,G.jsx)(U.span,{...i,ref:t})});Wx.displayName=`ListboxItemText`;var Gx=(0,s.forwardRef)((e,t)=>{let n=z(I8().getLabelProps(),e);return(0,G.jsx)(U.span,{...n,ref:t})});Gx.displayName=`ListboxLabel`;var Kx=e=>{let t=(0,s.useId)(),{dir:n}=ao(),{getRootNode:r}=ro();return xx(Oa(Tx,{id:t,dir:n,getRootNode:r,...e}),Na)},qx=(0,s.forwardRef)((e,t)=>{let[n,r]=K()(e,[`collection`,`defaultHighlightedValue`,`defaultValue`,`deselectable`,`disabled`,`disallowSelectAll`,`highlightedValue`,`id`,`ids`,`loopFocus`,`onHighlightChange`,`onSelect`,`onValueChange`,`orientation`,`scrollToIndexFn`,`selectionMode`,`selectOnHighlight`,`typeahead`,`value`]),i=Kx(n),a=z(i.getRootProps(),r);return(0,G.jsx)(F8,{value:i,children:(0,G.jsx)(U.div,{...a,ref:t})})});function Jx(e){return(0,G.jsx)(Cu,{...e})}function Yx(e){return(0,G.jsx)(wu,{...e})}function Xx({className:e,...t}){return(0,G.jsx)(Du,{className:Q(e),...t})}function Zx({className:e,...t}){return(0,G.jsx)(Pa,{className:Q(e),...t})}function Qx({arrow:e=!1,className:t,...n}){let r=xa();return(0,G.jsx)(Au,{children:(0,G.jsxs)(Ka,{className:k0,children:[e&&r.open?(0,G.jsx)(Fa,{className:A0,children:(0,G.jsx)(Ia,{})}):null,(0,G.jsx)(Ua,{className:Q(j0,t),...n})]})})}function $x({className:e,...t}){return(0,G.jsx)(Tu,{className:Q(M0,e),...t})}function e5({className:e,...t}){return(0,G.jsx)(Wa,{className:Q(N0,e),...t})}function t5({className:e,...t}){return(0,G.jsx)(La,{"aria-label":`Close`,className:Q(P0,e),...t})}function n5({className:e,...t}){return(0,G.jsx)(Ga,{className:Q(F0,e),...t})}function r5(){return(0,G.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,G.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,G.jsx)(`path`,{d:`M12 16v-4`}),(0,G.jsx)(`path`,{d:`M12 8h.01`})]})}function i5(){return(0,G.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,G.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,G.jsx)(`path`,{d:`m9 12 2 2 4-4`})]})}function a5(){return(0,G.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,G.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}),(0,G.jsx)(`path`,{d:`M12 9v4`}),(0,G.jsx)(`path`,{d:`M12 17h.01`})]})}function o5(){return(0,G.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,G.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,G.jsx)(`path`,{d:`m15 9-6 6`}),(0,G.jsx)(`path`,{d:`m9 9 6 6`})]})}var s5={info:r5,success:i5,warning:a5,error:o5};function c5({variant:e=`info`,title:t,children:n,className:r,...i}){let a=e!=null&&e!==`none`?s5[e]:null,o=e===`error`?`alert`:e===`none`?void 0:`status`;return(0,G.jsxs)(U.div,{role:o,className:Q(l4({variant:e}),r),...i,children:[a?(0,G.jsx)(a,{}):null,t?(0,G.jsx)(U.div,{className:u4,children:t}):null,n?(0,G.jsx)(U.div,{className:d4,children:n}):null]})}var l5=(0,s.createContext)(null);function u5(){let e=(0,s.useContext)(l5);if(!e)throw Error(`YoutubeTimestamps must be rendered inside a <YouTube>.`);return e}function d5({url:e,title:t,description:n,poster:r,className:i,children:a,...o}){let c=R4(e),l=r??`https://i.ytimg.com/vi/${c}/hqdefault.jpg`,[u,d]=(0,s.useState)(!1),[f,p]=(0,s.useState)(null),m=e=>{p(e),d(!0)},h=`https://www.youtube-nocookie.com/embed/${c}?autoplay=1${f==null?``:`&start=${f}`}`;return(0,G.jsx)(l5.Provider,{value:{url:e,videoId:c,seek:m},children:(0,G.jsxs)(U.div,{"data-youtube-id":c,className:Q(T4,i),...o,children:[t?(0,G.jsx)(U.h3,{className:E4,children:t}):null,u?(0,G.jsx)(`iframe`,{src:h,title:t??`YouTube video ${c}`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`,allowFullScreen:!0,className:`aspect-video w-full rounded-md border border-border`}):(0,G.jsxs)(U.button,{type:`button`,className:D4,onClick:()=>d(!0),"aria-label":t?`Play video: ${t}`:`Play video`,children:[(0,G.jsx)(U.img,{src:l,alt:t??`YouTube video ${c}`,loading:`lazy`,className:`h-full w-full object-cover`}),(0,G.jsx)(U.span,{className:O4,"aria-hidden":`true`,children:(0,G.jsx)(U.span,{className:k4,children:(0,G.jsx)(Ub,{className:`size-8 fill-current`,"aria-hidden":`true`,"data-youtube-logo":!0})})})]}),n?(0,G.jsx)(U.p,{className:A4,children:n}):null,a]})})}function f5({t:e,children:t,className:n,...r}){let{seek:i}=u5();return(0,G.jsx)(U.li,{className:n,...r,children:(0,G.jsxs)(U.button,{type:`button`,onClick:()=>i(e),className:F4,children:[(0,G.jsx)(U.span,{className:I4,children:z4(e)}),(0,G.jsx)(U.span,{className:L4,children:t})]})})}function p5({chapters:e,children:t,className:n,...r}){let{url:i}=u5(),[a,o]=(0,s.useState)([]),[c,l]=(0,s.useState)(e===void 0);(0,s.useEffect)(()=>{if(e!==void 0)return;let t=!1;return l(!0),H4(i).then(e=>{t||(o(e.description?V4(e.description):[]),l(!1))}).catch(()=>{t||l(!1)}),()=>{t=!0}},[i,e]);let u=e??a,d=t!=null;return!c&&u.length===0&&!d?null:(0,G.jsx)(U.div,{className:Q(j4,n),...r,children:(0,G.jsxs)(`details`,{className:`group`,open:!0,children:[(0,G.jsxs)(U.summary,{className:M4,children:[(0,G.jsx)(Db,{className:N4,"aria-hidden":`true`}),(0,G.jsx)(`span`,{children:`Timestamps`})]}),(0,G.jsx)(U.nav,{"aria-label":`Video timestamps`,className:P4,children:(0,G.jsxs)(U.ul,{className:`space-y-1`,children:[u.map(e=>(0,G.jsx)(f5,{t:e.t,children:e.label},e.t)),t]})})]})})}function m5({orientation:e,attached:t,className:n,...r}){return(0,G.jsx)(_8,{orientation:e??`horizontal`,className:Q(d3({orientation:e,attached:t}),n),...r})}function h5({variant:e,size:t,className:n,...r}){return(0,G.jsx)(t8,{className:Q(T0({variant:e,size:t}),n),...r})}var g5=I8;function _5({items:e,collection:t,className:n,children:r,...i}){let a=(0,s.useMemo)(()=>t??P8({items:e??[]}),[t,e]);return(0,G.jsx)(qx,{collection:a,className:Q(p3,n),...i,children:r})}function v5({className:e,children:t,...n}){return(0,G.jsx)(L8,{className:Q(m3,e),...n,children:t})}function y5({item:e,className:t,children:n,...r}){return(0,G.jsx)(Lx,{item:e,className:Q(h3,t),...r,children:n})}function b5({className:e,children:t,...n}){return(0,G.jsx)(Wx,{className:Q(g3,e),...n,children:t})}function x5({className:e,children:t,...n}){return(0,G.jsx)(Ux,{className:Q(_3,e),...n,children:t})}function S5({className:e,...t}){return(0,G.jsx)(jx,{className:Q(v3,e),...t})}function C5({className:e,children:t,...n}){return(0,G.jsx)(kx,{className:Q(y3,e),...n,children:t??`No results.`})}function w5({className:e,children:t,...n}){return(0,G.jsx)(Gx,{className:Q(b3,e),...n,children:t})}function T5({className:e,children:t,...n}){return(0,G.jsx)(Vx,{className:Q(x3,e),...n,children:t})}function E5({className:e,children:t,...n}){return(0,G.jsx)(Hx,{className:Q(S3,e),...n,children:t})}var[D5,O5]=W({name:`ClipboardContext`,hookName:`useClipboardContext`,providerName:`<ClipboardProvider />`}),k5=(0,s.forwardRef)((e,t)=>{let{children:n,copied:r,...i}=e,a=O5(),o=z(a.getIndicatorProps({copied:a.copied}),i);return(0,G.jsx)(U.div,{...o,ref:t,children:a.copied?r:n})});k5.displayName=`ClipboardIndicator`;var A5=oo(`clipboard`).parts(`root`,`control`,`trigger`,`indicator`,`input`,`label`).build(),j5=e=>e.ids?.root??`clip:${e.id}`,M5=e=>e.ids?.input??`clip:${e.id}:input`,N5=e=>e.ids?.label??`clip:${e.id}:label`,P5=e=>e.getById(M5(e)),F5=(e,t)=>R5(e.getDoc(),t);function I5(e,t){let n=e.createElement(`pre`);return Object.assign(n.style,{width:`1px`,height:`1px`,position:`fixed`,top:`5px`}),n.textContent=t,n}function L5(e){let t=on(e).getSelection();if(t==null)return Promise.reject(Error());t.removeAllRanges();let n=e.ownerDocument,r=n.createRange();return r.selectNodeContents(e),t.addRange(r),n.execCommand(`copy`),t.removeAllRanges(),Promise.resolve()}function R5(e,t){let n=e.defaultView||window;if(n.navigator.clipboard?.writeText!==void 0)return n.navigator.clipboard.writeText(t);if(!e.body)return Promise.reject(Error());let r=I5(e,t);return e.body.appendChild(r),L5(r),e.body.removeChild(r),Promise.resolve()}var z5={triggerLabel:e=>e?`Copied to clipboard`:`Copy to clipboard`};function B5(e,t){let{state:n,send:r,context:i,scope:a,prop:o}=e,s=n.matches(`copied`),c=je(z5,o(`translations`));return{copied:s,value:i.get(`value`),setValue(e){r({type:`VALUE.SET`,value:e})},copy(){r({type:`COPY`})},getRootProps(){return t.element({...A5.root.attrs,"data-copied":B(s),id:j5(a)})},getLabelProps(){return t.label({...A5.label.attrs,htmlFor:M5(a),"data-copied":B(s),id:N5(a)})},getControlProps(){return t.element({...A5.control.attrs,"data-copied":B(s)})},getInputProps(){return t.input({...A5.input.attrs,defaultValue:i.get(`value`),"data-copied":B(s),readOnly:!0,"data-readonly":`true`,id:M5(a),onFocus(e){e.currentTarget.select()},onCopy(){r({type:`INPUT.COPY`})}})},getTriggerProps(){return t.button({...A5.trigger.attrs,type:`button`,"aria-label":c.triggerLabel?.(s),"data-copied":B(s),onClick(){r({type:`COPY`})}})},getIndicatorProps(e){return t.element({...A5.indicator.attrs,hidden:e.copied!==s})}}}var V5=Tt({props({props:e}){return{timeout:3e3,defaultValue:``,...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}}))}},watch({track:e,context:t,action:n}){e([()=>t.get(`value`)],()=>{n([`syncInputElement`])})},on:{"VALUE.SET":{actions:[`setValue`]},COPY:{target:`copied`,actions:[`copyToClipboard`,`invokeOnCopy`]}},states:{idle:{on:{"INPUT.COPY":{target:`copied`,actions:[`invokeOnCopy`]}}},copied:{effects:[`waitForTimeout`],on:{"COPY.DONE":{target:`idle`},COPY:{target:`copied`,actions:[`copyToClipboard`,`invokeOnCopy`]},"INPUT.COPY":{actions:[`invokeOnCopy`]}}}},implementations:{effects:{waitForTimeout({prop:e,send:t}){return We(()=>{t({type:`COPY.DONE`})},e(`timeout`))}},actions:{setValue({context:e,event:t}){e.set(`value`,t.value)},copyToClipboard({context:e,scope:t}){F5(t,e.get(`value`))},invokeOnCopy({prop:e}){e(`onStatusChange`)?.({copied:!0})},syncInputElement({context:e,scope:t}){let n=P5(t);n&&yr(n,e.get(`value`))}}}}),H5=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro();return B5(Oa(V5,{id:t,getRootNode:n,...e}),Na)},U5=K(),W5=(0,s.forwardRef)((e,t)=>{let[n,r]=U5(e,[`defaultValue`,`id`,`ids`,`onStatusChange`,`onValueChange`,`timeout`,`translations`,`value`]),i=H5(n),a=z(i.getRootProps(),r);return(0,G.jsx)(D5,{value:i,children:(0,G.jsx)(U.div,{ref:t,...a})})});W5.displayName=`ClipboardRoot`;var G5=(0,s.forwardRef)((e,t)=>{let n=z(O5().getTriggerProps(),e);return(0,G.jsx)(U.button,{...n,ref:t})});G5.displayName=`ClipboardTrigger`;var[K5,q5]=W({name:`SelectContext`,hookName:`useSelectContext`,providerName:`<SelectProvider />`}),J5=(0,s.forwardRef)((e,t)=>{let n=z(q5().getClearTriggerProps(),e);return(0,G.jsx)(U.button,{...n,ref:t})});J5.displayName=`SelectClearTrigger`;var Y5=(0,s.forwardRef)((e,t)=>{let n=q5(),r=Ha(),i=z(n.getContentProps(),r.getPresenceProps(),e),a=l(r.ref,t);return(0,G.jsx)(Ba,{presence:r,children:(0,G.jsx)(U.div,{...i,ref:a})})});Y5.displayName=`SelectContent`;var[X5,Z5]=W({name:`FieldContext`,hookName:`useFieldContext`,providerName:`<FieldProvider />`,strict:!1}),Q5=(0,s.forwardRef)((e,t)=>{let n=q5(),r=z(n.getHiddenSelectProps(),e),i=n.value.length===0,a=Z5();return(0,G.jsxs)(U.select,{"aria-describedby":a?.ariaDescribedby,...r,ref:t,children:[i&&(0,G.jsx)(`option`,{value:``}),n.collection.items.map((e,t)=>(0,G.jsx)(`option`,{value:n.collection.getItemValue(e)??``,disabled:n.collection.getItemDisabled(e),children:n.collection.stringifyItem(e)},t))]})});Q5.displayName=`SelectHiddenSelect`;var $5=(0,s.forwardRef)((e,t)=>{let n=z(q5().getIndicatorProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});$5.displayName=`SelectIndicator`;var[e7,t7]=W({name:`SelectItemContext`,hookName:`useSelectItemContext`,providerName:`<SelectItemProvider />`}),[n7,r7]=W({name:`SelectItemPropsContext`,hookName:`useSelectItemPropsContext`,providerName:`<SelectItemPropsProvider />`}),i7=K(),a7=(0,s.forwardRef)((e,t)=>{let[n,r]=i7(e,[`item`,`persistFocus`]),i=q5(),a=z(i.getItemProps(n),r),o=i.getItemState(n);return(0,G.jsx)(n7,{value:n,children:(0,G.jsx)(e7,{value:o,children:(0,G.jsx)(U.div,{...a,ref:t})})})});a7.displayName=`SelectItem`;var[o7,s7]=W({name:`SelectItemGroupPropsContext`,hookName:`useSelectItemGroupPropsContext`,providerName:`<SelectItemGroupPropsProvider />`}),c7=K(),l7=(0,s.forwardRef)((e,t)=>{let n=(0,s.useId)(),[r,i]=c7(e,[`id`]),a={id:n,...r},o=z(q5().getItemGroupProps(a),i);return(0,G.jsx)(o7,{value:a,children:(0,G.jsx)(U.div,{...o,ref:t})})});l7.displayName=`SelectItemGroup`;var u7=(0,s.forwardRef)((e,t)=>{let n=q5(),r=s7(),i=z(n.getItemGroupLabelProps({htmlFor:r.id}),e);return(0,G.jsx)(U.div,{...i,ref:t})});u7.displayName=`SelectItemGroupLabel`;var d7=(0,s.forwardRef)((e,t)=>{let n=q5(),r=r7(),i=z(n.getItemIndicatorProps(r),e);return(0,G.jsx)(U.div,{...i,ref:t})});d7.displayName=`SelectItemIndicator`;var f7=(0,s.forwardRef)((e,t)=>{let n=q5(),r=r7(),i=z(n.getItemTextProps(r),e);return(0,G.jsx)(U.span,{...i,ref:t})});f7.displayName=`SelectItemText`;var p7=(0,s.forwardRef)((e,t)=>{let n=z(q5().getPositionerProps(),e);return Ha().unmounted?null:(0,G.jsx)(U.div,{...n,ref:t})});p7.displayName=`SelectPositioner`;var m7=oo(`select`).parts(`label`,`positioner`,`trigger`,`indicator`,`clearTrigger`,`item`,`itemText`,`itemIndicator`,`itemGroup`,`itemGroupLabel`,`list`,`content`,`root`,`control`,`valueText`).build(),h7=e=>new w8(e);h7.empty=()=>new w8({items:[]});var g7=e=>e.ids?.root??`select:${e.id}`,_7=e=>e.ids?.content??`select:${e.id}:content`,v7=e=>e.ids?.trigger??`select:${e.id}:trigger`,y7=e=>e.ids?.clearTrigger??`select:${e.id}:clear-trigger`,b7=e=>e.ids?.label??`select:${e.id}:label`,x7=e=>e.ids?.control??`select:${e.id}:control`,S7=(e,t)=>e.ids?.item?.(t)??`select:${e.id}:option:${t}`,C7=e=>e.ids?.hiddenSelect??`select:${e.id}:select`,w7=e=>e.ids?.positioner??`select:${e.id}:positioner`,T7=(e,t)=>e.ids?.itemGroup?.(t)??`select:${e.id}:optgroup:${t}`,E7=(e,t)=>e.ids?.itemGroupLabel?.(t)??`select:${e.id}:optgroup-label:${t}`,D7=e=>e.getById(C7(e)),O7=e=>e.getById(_7(e)),k7=e=>e.getById(v7(e)),A7=e=>e.getById(y7(e)),j7=e=>e.getById(w7(e)),M7=(e,t)=>t==null?null:e.getById(S7(e,t)),N7=e=>e.getById(g7(e)),P7=e=>e.getById(b7(e)),F7={clearTriggerLabel:`Clear value`};function I7(e,t){let{context:n,prop:r,scope:i,state:a,computed:o,send:s}=e,c=n.get(`rendered`),l=je(F7,r(`translations`)),u=r(`disabled`)||n.get(`fieldsetDisabled`),d=!!r(`invalid`),f=!!r(`required`),p=!!r(`readOnly`),m=r(`composite`),h=r(`collection`),g=a.hasTag(`open`),_=a.matches(`focused`),v=n.get(`highlightedValue`),y=n.get(`highlightedItem`),b=o(`selectedItems`),x=n.get(`currentPlacement`),S=x?vc(x):void 0,C=o(`isTypingAhead`),w=o(`isInteractive`),T=v?S7(i,v):void 0;function E(e){let t=h.getItemDisabled(e.item),r=h.getItemValue(e.item);return qe(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`),{value:r,disabled:!!(u||t),highlighted:v===r,selected:n.get(`value`).includes(r)}}let D=zc({...r(`positioning`),placement:x});return{open:g,focused:_,empty:n.get(`value`).length===0,highlightedItem:y,highlightedValue:v,selectedItems:b,hasSelectedItems:o(`hasSelectedItems`),value:n.get(`value`),valueAsString:o(`valueAsString`),collection:h,multiple:!!r(`multiple`),disabled:!!u,reposition(e={}){s({type:`POSITIONING.SET`,options:e})},focus(){k7(i)?.focus({preventScroll:!0})},setOpen(e){s({type:e?`OPEN`:`CLOSE`,replaces:`open`})},selectValue(e){s({type:`ITEM.SELECT`,value:e})},setValue(e){s({type:`VALUE.SET`,value:e})},selectAll(){s({type:`VALUE.SET`,value:h.getValues()})},setHighlightValue(e){s({type:`HIGHLIGHTED_VALUE.SET`,value:e})},clearHighlightValue(){s({type:`HIGHLIGHTED_VALUE.CLEAR`})},clearValue(e){s(e?{type:`ITEM.CLEAR`,value:e}:{type:`VALUE.CLEAR`})},getItemState:E,getRootProps(){return t.element({...m7.root.attrs,dir:r(`dir`),id:g7(i),"data-invalid":B(d),"data-readonly":B(p)})},getLabelProps(){return t.label({dir:r(`dir`),id:b7(i),...m7.label.attrs,"data-disabled":B(u),"data-invalid":B(d),"data-readonly":B(p),"data-required":B(f),htmlFor:C7(i),onClick(e){e.defaultPrevented||u||k7(i)?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...m7.control.attrs,dir:r(`dir`),id:x7(i),"data-state":g?`open`:`closed`,"data-focus":B(_),"data-disabled":B(u),"data-invalid":B(d)})},getValueTextProps(){return t.element({...m7.valueText.attrs,dir:r(`dir`),"data-disabled":B(u),"data-invalid":B(d),"data-focus":B(_)})},getTriggerProps(){return t.button({id:v7(i),disabled:u,dir:r(`dir`),type:`button`,role:`combobox`,"aria-controls":_7(i),"aria-expanded":g,"aria-haspopup":`listbox`,"data-state":g?`open`:`closed`,"aria-invalid":d,"aria-required":f,"aria-labelledby":c.label?b7(i):void 0,...m7.trigger.attrs,"data-disabled":B(u),"data-invalid":B(d),"data-readonly":B(p),"data-placement":x,"data-side":S,"data-placeholder-shown":B(!o(`hasSelectedItems`)),onClick(e){w&&(e.defaultPrevented||s({type:`TRIGGER.CLICK`}))},onFocus(){s({type:`TRIGGER.FOCUS`})},onBlur(){s({type:`TRIGGER.BLUR`})},onKeyDown(e){if(e.defaultPrevented||!w)return;let t={ArrowUp(){s({type:`TRIGGER.ARROW_UP`})},ArrowDown(e){s({type:e.altKey?`OPEN`:`TRIGGER.ARROW_DOWN`})},ArrowLeft(){s({type:`TRIGGER.ARROW_LEFT`})},ArrowRight(){s({type:`TRIGGER.ARROW_RIGHT`})},Home(){s({type:`TRIGGER.HOME`})},End(){s({type:`TRIGGER.END`})},Enter(){s({type:`TRIGGER.ENTER`})},Space(e){s(C?{type:`TRIGGER.TYPEAHEAD`,key:e.key}:{type:`TRIGGER.ENTER`})}}[lr(e,{dir:r(`dir`),orientation:`vertical`})];t?(t(e),e.preventDefault()):oa.isValidEvent(e)&&(s({type:`TRIGGER.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getIndicatorProps(){return t.element({...m7.indicator.attrs,dir:r(`dir`),"aria-hidden":!0,"data-state":g?`open`:`closed`,"data-disabled":B(u),"data-invalid":B(d),"data-readonly":B(p)})},getItemProps(e){let n=E(e);return t.element({id:S7(i,n.value),role:`option`,...m7.item.attrs,dir:r(`dir`),"data-value":n.value,"aria-selected":n.selected,"data-state":n.selected?`checked`:`unchecked`,"data-highlighted":B(n.highlighted),"data-disabled":B(n.disabled),"aria-disabled":Pt(n.disabled),onPointerMove(e){n.disabled||e.pointerType!==`mouse`||lx()===`pointer`&&n.value!==v&&s({type:`ITEM.POINTER_MOVE`,value:n.value})},onClick(e){e.defaultPrevented||n.disabled||s({type:`ITEM.CLICK`,src:`pointerup`,value:n.value})},onPointerLeave(t){n.disabled||e.persistFocus||t.pointerType===`mouse`&&lx()===`pointer`&&s({type:`ITEM.POINTER_LEAVE`})}})},getItemTextProps(e){let n=E(e);return t.element({...m7.itemText.attrs,"data-state":n.selected?`checked`:`unchecked`,"data-disabled":B(n.disabled),"data-highlighted":B(n.highlighted)})},getItemIndicatorProps(e){let n=E(e);return t.element({"aria-hidden":!0,...m7.itemIndicator.attrs,"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...m7.itemGroupLabel.attrs,id:E7(i,n),dir:r(`dir`),role:`presentation`})},getItemGroupProps(e){let{id:n}=e;return t.element({...m7.itemGroup.attrs,"data-disabled":B(u),id:T7(i,n),"aria-labelledby":E7(i,n),role:`group`,dir:r(`dir`)})},getClearTriggerProps(){return t.button({...m7.clearTrigger.attrs,id:y7(i),type:`button`,"aria-label":l.clearTriggerLabel,"data-invalid":B(d),disabled:u,hidden:!o(`hasSelectedItems`),dir:r(`dir`),onClick(e){e.defaultPrevented||s({type:`CLEAR.CLICK`})}})},getHiddenSelectProps(){let e=n.get(`value`),a=r(`multiple`)?e:e?.[0],o=e=>{Or(ur(e))||s({type:`VALUE.SET`,value:L7(e.currentTarget)})};return t.select({name:r(`name`),form:r(`form`),disabled:u,multiple:r(`multiple`),required:r(`required`),"aria-hidden":!0,id:C7(i),defaultValue:a,style:ca,tabIndex:-1,autoComplete:r(`autoComplete`),onChange:o,onInput:o,onFocus(){k7(i)?.focus({preventScroll:!0})},"aria-labelledby":c.label?b7(i):void 0})},getPositionerProps(){return t.element({...m7.positioner.attrs,dir:r(`dir`),id:w7(i),style:D.floating})},getContentProps(){return t.element({hidden:!g,dir:r(`dir`),id:_7(i),role:m?`listbox`:`dialog`,...m7.content.attrs,"data-state":g?`open`:`closed`,"data-placement":x,"data-side":S,"data-activedescendant":T,"aria-activedescendant":m?T:void 0,"aria-multiselectable":r(`multiple`)&&m?!0:void 0,"aria-labelledby":c.label?b7(i):void 0,tabIndex:0,onKeyDown(e){if(!w||!nn(e.currentTarget,Zn(e)))return;if(e.key===`Tab`&&!qr(e)){e.preventDefault();return}let t={ArrowUp(){s({type:`CONTENT.ARROW_UP`})},ArrowDown(){s({type:`CONTENT.ARROW_DOWN`})},Home(){s({type:`CONTENT.HOME`})},End(){s({type:`CONTENT.END`})},Enter(){s({type:`ITEM.CLICK`,src:`keydown.enter`})},Space(e){C?s({type:`CONTENT.TYPEAHEAD`,key:e.key}):t.Enter?.(e)}},n=t[lr(e)];n?(n(e),e.preventDefault()):tn(Zn(e))||oa.isValidEvent(e)&&(s({type:`CONTENT.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getListProps(){return t.element({...m7.list.attrs,tabIndex:0,role:m?void 0:`listbox`,"aria-labelledby":v7(i),"aria-activedescendant":m?void 0:T,"aria-multiselectable":!m&&r(`multiple`)?!0:void 0})}}}var L7=e=>e.multiple?Array.from(e.selectedOptions,e=>e.value):e.value?[e.value]:[],{and:R7,not:z7,or:B7}=wt(),V7=Tt({props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??h7.empty(),positioning:{placement:`bottom-start`,gutter:8,...e.positioning}}},context({prop:e,bindable:t,getContext:n}){let r=e(`value`)??e(`defaultValue`)??[],i=e(`collection`).findMany(r);return{rendered:t(()=>({defaultValue:{label:!0}})),value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:T,onChange(t){let r=n(),i=e(`collection`),a=j8({values:t,collection:i,selectedItemMap:r.get(`selectedItemMap`)}),o=e(`value`)??t,s=o===t?a:j8({values:o,collection:i,selectedItemMap:a.nextSelectedItemMap});return r.set(`selectedItemMap`,s.nextSelectedItemMap),e(`onValueChange`)?.({value:t,items:a.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),onChange(t){e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:e(`collection`).find(t),highlightedIndex:e(`collection`).indexOf(t)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItemMap:t(()=>({defaultValue:M8({selectedItems:i,collection:e(`collection`)})}))}},refs(){return{typeahead:{...oa.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get(`value`).length>0,isTypingAhead:({refs:e})=>e.get(`typeahead`).keysSoFar!==``,isDisabled:({prop:e,context:t})=>!!e(`disabled`)||!!t.get(`fieldsetDisabled`),isInteractive:({prop:e})=>!(e(`disabled`)||e(`readOnly`)),selectedItems:({context:e,prop:t})=>k8({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)}),valueAsString:({computed:e,prop:t})=>t(`collection`).stringifyItems(e(`selectedItems`))},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`idle`},entry:[`syncSelectElement`],watch({context:e,prop:t,track:n,action:r}){n([()=>e.get(`value`).toString()],()=>{r([`syncSelectedItems`,`syncSelectElement`,`dispatchChangeEvent`])}),n([()=>t(`open`)],()=>{r([`toggleVisibility`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`])}),n([()=>t(`collection`).toString()],()=>{r([`syncCollection`])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:[`setHighlightedItem`]},"HIGHLIGHTED_VALUE.CLEAR":{actions:[`clearHighlightedItem`]},"ITEM.SELECT":{actions:[`selectItem`]},"ITEM.CLEAR":{actions:[`clearItem`]},"VALUE.SET":{actions:[`setSelectedItems`]},"VALUE.CLEAR":{actions:[`clearSelectedItems`]},"CLEAR.CLICK":{actions:[`clearSelectedItems`,`focusTriggerEl`]}},effects:[`trackFormControlState`,`trackRenderedElements`],states:{idle:{tags:[`closed`],on:{"CONTROLLED.OPEN":[{guard:`isTriggerClickEvent`,target:`open`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`]},{target:`open`,actions:[`setInitialFocus`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`,`highlightFirstSelectedItem`]}],"TRIGGER.FOCUS":{target:`focused`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`]}]}},focused:{tags:[`closed`],on:{"CONTROLLED.OPEN":[{guard:`isTriggerClickEvent`,target:`open`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`]},{guard:`isTriggerArrowUpEvent`,target:`open`,actions:[`setInitialFocus`,`highlightComputedLastItem`]},{guard:B7(`isTriggerArrowDownEvent`,`isTriggerEnterEvent`),target:`open`,actions:[`setInitialFocus`,`highlightComputedFirstItem`]},{target:`open`,actions:[`setInitialFocus`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`]}],"TRIGGER.BLUR":{target:`idle`},"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightFirstSelectedItem`]}],"TRIGGER.ENTER":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedFirstItem`]}],"TRIGGER.ARROW_UP":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedLastItem`]}],"TRIGGER.ARROW_DOWN":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedFirstItem`]}],"TRIGGER.ARROW_LEFT":[{guard:R7(z7(`multiple`),`hasSelectedItems`),actions:[`selectPreviousItem`]},{guard:z7(`multiple`),actions:[`selectLastItem`]}],"TRIGGER.ARROW_RIGHT":[{guard:R7(z7(`multiple`),`hasSelectedItems`),actions:[`selectNextItem`]},{guard:z7(`multiple`),actions:[`selectFirstItem`]}],"TRIGGER.HOME":{guard:z7(`multiple`),actions:[`selectFirstItem`]},"TRIGGER.END":{guard:z7(`multiple`),actions:[`selectLastItem`]},"TRIGGER.TYPEAHEAD":{guard:z7(`multiple`),actions:[`selectMatchingItem`]}}},open:{tags:[`open`],exit:[`scrollContentToTop`],effects:[`trackDismissableElement`,`trackFocusVisible`,`computePlacement`,`scrollToHighlightedItem`],on:{"CONTROLLED.CLOSE":[{guard:`restoreFocus`,target:`focused`,actions:[`focusTriggerEl`,`clearHighlightedItem`]},{target:`idle`,actions:[`clearHighlightedItem`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{guard:`restoreFocus`,target:`focused`,actions:[`invokeOnClose`,`focusTriggerEl`,`clearHighlightedItem`]},{target:`idle`,actions:[`invokeOnClose`,`clearHighlightedItem`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`focused`,actions:[`invokeOnClose`,`clearHighlightedItem`]}],"ITEM.CLICK":[{guard:R7(`closeOnSelect`,`isOpenControlled`),actions:[`selectHighlightedItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`focused`,actions:[`selectHighlightedItem`,`invokeOnClose`,`focusTriggerEl`,`clearHighlightedItem`]},{actions:[`selectHighlightedItem`]}],"CONTENT.HOME":{actions:[`highlightFirstItem`]},"CONTENT.END":{actions:[`highlightLastItem`]},"CONTENT.ARROW_DOWN":[{guard:R7(`hasHighlightedItem`,`loop`,`isLastItemHighlighted`),actions:[`highlightFirstItem`]},{guard:`hasHighlightedItem`,actions:[`highlightNextItem`]},{actions:[`highlightFirstItem`]}],"CONTENT.ARROW_UP":[{guard:R7(`hasHighlightedItem`,`loop`,`isFirstItemHighlighted`),actions:[`highlightLastItem`]},{guard:`hasHighlightedItem`,actions:[`highlightPreviousItem`]},{actions:[`highlightLastItem`]}],"CONTENT.TYPEAHEAD":{actions:[`highlightMatchingItem`]},"ITEM.POINTER_MOVE":{actions:[`highlightItem`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedItem`]},"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{loop:({prop:e})=>!!e(`loopFocus`),multiple:({prop:e})=>!!e(`multiple`),hasSelectedItems:({computed:e})=>!!e(`hasSelectedItems`),hasHighlightedItem:({context:e})=>e.get(`highlightedValue`)!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get(`highlightedValue`)===t(`collection`).firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get(`highlightedValue`)===t(`collection`).lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e(`closeOnSelect`)),restoreFocus:({event:e})=>H7(e),isOpenControlled:({prop:e})=>e(`open`)!==void 0,isTriggerClickEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.CLICK`,isTriggerEnterEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ENTER`,isTriggerArrowUpEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ARROW_UP`,isTriggerArrowDownEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ARROW_DOWN`},effects:{trackRenderedElements({context:e,scope:t}){return Ri({getContainerEl:()=>N7(t),getRootNode:()=>t.getRootNode(),parts:{label:()=>P7(t)},onChange:t=>e.set(`rendered`,t)})},trackFocusVisible({scope:e}){return fx({root:e.getRootNode?.()})},trackFormControlState({context:e,scope:t}){return Er(D7(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){let t=e.initial(`value`);e.set(`value`,t)}})},trackDismissableElement({scope:e,send:t,prop:n}){let r=()=>O7(e),i=!0;return Yl(r,{type:`listbox`,defer:!0,getRootNode:e.getRootNode,layerStyleTargets:[()=>j7(e)],exclude:[k7(e),A7(e)],onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onInteractOutside(e){n(`onInteractOutside`)?.(e),i=!(e.detail.focusable||e.detail.contextmenu)},onDismiss(e){t({type:`CLOSE`,src:`interact-outside`,restoreFocus:i,focusVisible:e?.type===`keydown`})}})},computePlacement({context:e,prop:t,scope:n}){let r=t(`positioning`);return e.set(`currentPlacement`,r.placement),Lc(()=>k7(n),()=>j7(n),{defer:!0,...r,onComplete(t){e.set(`currentPlacement`,t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let r=r=>{let i=e.get(`highlightedValue`);if(i==null||lx()===`pointer`)return;let a=O7(n),o=t(`scrollToIndexFn`);if(o){let e=t(`collection`).indexOf(i);o?.({index:e,immediate:r,getElement:()=>M7(n,i)})}else Wi(M7(n,i),{rootEl:a})},i=H(()=>{ux(`virtual`),r(!0)}),a=ai(()=>O7(n),{defer:!0,attributes:[`data-activedescendant`],callback(){r(!1)}});return()=>{i(),a()}}},actions:{reposition({context:e,prop:t,scope:n,event:r}){Lc(k7(n),()=>j7(n),{...t(`positioning`),...r.options,defer:!0,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility({send:e,prop:t,event:n}){e({type:t(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})},highlightPreviousItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getPreviousValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightNextItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getNextValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;e.set(`highlightedValue`,n)},highlightLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;e.set(`highlightedValue`,n)},setInitialFocus({scope:e}){H(()=>{let t=Kr({root:O7(e)});t&&t.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){if(!H7(e))return;let n=U7(e);H(()=>{k7(t)?.focus(n)})},selectHighlightedItem({context:e,prop:t,event:n}){let r=n.value??e.get(`highlightedValue`);r!=null&&t(`collection`).has(r)&&(t(`onSelect`)?.({value:r}),r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(r)?null:r,e.set(`value`,e=>r==null?[]:t(`multiple`)?v(e,r):[r]))},highlightComputedFirstItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.firstValue;e.set(`highlightedValue`,i)},highlightComputedLastItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.lastValue;e.set(`highlightedValue`,i)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n(`hasSelectedItems`))return;let r=t(`collection`).sort(e.get(`value`))[0];e.set(`highlightedValue`,r)},highlightItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`highlightedValue`)});i!=null&&e.set(`highlightedValue`,i)},setHighlightedItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},clearHighlightedItem({context:e}){e.set(`highlightedValue`,null)},selectItem({context:e,prop:t,event:n}){t(`onSelect`)?.({value:n.value});let r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(n.value)?null:n.value;e.set(`value`,e=>r==null?[]:t(`multiple`)?v(e,r):[r])},clearItem({context:e,event:t}){e.set(`value`,e=>e.filter(e=>e!==t.value))},setSelectedItems({context:e,event:t}){e.set(`value`,t.value)},clearSelectedItems({context:e}){e.set(`value`,[])},selectPreviousItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getPreviousValue(n);r&&e.set(`value`,[r])},selectNextItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getNextValue(n);r&&e.set(`value`,[r])},selectFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;n&&e.set(`value`,[n])},selectLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;n&&e.set(`value`,[n])},selectMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`value`)[0]});i!=null&&e.set(`value`,[i])},scrollContentToTop({prop:e,scope:t}){if(e(`scrollToIndexFn`)){let n=e(`collection`).firstValue;e(`scrollToIndexFn`)?.({index:0,immediate:!0,getElement:()=>M7(t,n)})}else O7(t)?.scrollTo(0,0)},invokeOnOpen({prop:e,context:t}){e(`onOpenChange`)?.({open:!0,value:t.get(`value`)})},invokeOnClose({prop:e,context:t}){e(`onOpenChange`)?.({open:!1,value:t.get(`value`)})},syncSelectElement({context:e,prop:t,scope:n}){let r=D7(n);if(r){if(e.get(`value`).length===0&&!t(`multiple`))r.selectedIndex=-1;else for(let t of r.options)t.selected=e.get(`value`).includes(t.value)}},syncCollection({context:e,prop:t}){let n=t(`collection`),r=n.find(e.get(`highlightedValue`));r&&e.set(`highlightedItem`,r);let i=j8({values:e.get(`value`),collection:n,selectedItemMap:e.get(`selectedItemMap`)});e.set(`selectedItemMap`,i.nextSelectedItemMap)},syncSelectedItems({context:e,prop:t}){let n=j8({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)});e.set(`selectedItemMap`,n.nextSelectedItemMap)},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`),r=e.get(`highlightedValue`),i=r?n.find(r):null;e.set(`highlightedItem`,i)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=D7(e);if(!t)return;let n=new(e.getWin()).Event(`change`,{bubbles:!0,composed:!0});t.dispatchEvent(kr(n))})}}}});function H7(e){let t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null||!!t}function U7(e){return e.focusVisible??e.previousEvent?.focusVisible?{preventScroll:!0,focusVisible:!0}:{preventScroll:!0}}var W7=e=>{let t=(0,s.useId)(),{dir:n}=ao(),{getRootNode:r}=ro(),i=Z5();return I7(Oa(V7,{id:t,ids:{label:i?.ids.label,hiddenSelect:i?.ids.control},disabled:i?.disabled,readOnly:i?.readOnly,invalid:i?.invalid,required:i?.required,dir:n,getRootNode:r,...e}),Na)},G7=(0,s.forwardRef)((e,t)=>{let[n,r]=to(e),[i,a]=K()(r,`closeOnSelect.collection.composite.defaultHighlightedValue.defaultOpen.defaultValue.deselectable.disabled.form.highlightedValue.id.ids.invalid.loopFocus.multiple.name.onFocusOutside.onHighlightChange.onInteractOutside.onOpenChange.onPointerDownOutside.onSelect.onValueChange.open.positioning.readOnly.required.scrollToIndexFn.translations.autoComplete.value`.split(`.`)),o=W7(i),s=eo(z({present:o.open},n)),c=z(o.getRootProps(),a);return(0,G.jsx)(K5,{value:o,children:(0,G.jsx)(Va,{value:s,children:(0,G.jsx)(U.div,{...c,ref:t})})})}),K7=(0,s.forwardRef)((e,t)=>{let n=z(q5().getTriggerProps(),e),r=Z5();return(0,G.jsx)(U.button,{"aria-describedby":r?.ariaDescribedby,...n,ref:t})});K7.displayName=`SelectTrigger`;var q7=(0,s.forwardRef)((e,t)=>{let{children:n,placeholder:r,...i}=e,a=q5(),o=z(a.getValueTextProps(),i);return(0,G.jsx)(U.span,{...o,ref:t,children:n||a.valueAsString||r})});q7.displayName=`SelectValueText`;function J7(){return(0,G.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,G.jsx)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,G.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})}function Y7(){return(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,G.jsx)(`path`,{d:`M20 6 9 17l-5-5`})})}function X7({value:e,label:t=`Copy`,className:n,...r}){return(0,G.jsx)(W5,{value:e,...r,children:(0,G.jsx)(G5,{className:Q(a4,n),"aria-label":t,children:(0,G.jsx)(k5,{copied:(0,G.jsx)(Y7,{}),children:(0,G.jsx)(J7,{})})})})}function Z7(e){return(0,s.useSyncExternalStore)(t=>{let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},()=>window.matchMedia(e).matches,()=>!1)}function Q7({items:e,collection:t,size:n,children:r,...i}){let a=Z7(`(pointer: coarse)`),o=(0,s.useMemo)(()=>t??P8({items:e??[]}),[t,e]);return a&&e?(0,G.jsx)(d9,{items:e,size:n,value:i.value?.[0],defaultValue:i.defaultValue?.[0],onValueChange:t=>i.onValueChange?.({value:[t],items:e.filter(e=>e.value===t)}),invalid:i.invalid,disabled:i.disabled,name:i.name,form:i.form,required:i.required}):(0,G.jsxs)(G7,{collection:o,...i,children:[r,(0,G.jsx)(Q5,{})]})}function $7({size:e=`md`,className:t,...n}){return(0,G.jsx)(K7,{className:Q(p2({size:e}),D2,t),...n})}function e9({className:e,...t}){return(0,G.jsx)(q7,{className:Q(O2,e),...t})}function t9({className:e,...t}){return(0,G.jsx)($5,{className:Q(k2,e),...t})}function n9({className:e,...t}){return(0,G.jsx)(J5,{"aria-label":`Clear selection`,className:Q(A2,e),...t})}function r9({className:e,...t}){return(0,G.jsx)(Au,{children:(0,G.jsx)(p7,{className:j2,children:(0,G.jsx)(Y5,{className:Q(M2,e),...t})})})}function i9({className:e,...t}){return(0,G.jsx)(l7,{className:e,...t})}function a9({className:e,...t}){return(0,G.jsx)(u7,{className:Q(N2,e),...t})}function o9({item:e,className:t,...n}){return(0,G.jsx)(a7,{item:e,className:Q(P2,t),...n})}function s9({className:e,...t}){return(0,G.jsx)(f7,{className:Q(F2,e),...t})}function c9({className:e,...t}){return(0,G.jsx)(d7,{className:Q(I2,e),...t})}var l9=q5;function u9(){return(0,G.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:(0,G.jsx)(`path`,{d:`m6 9 6 6 6-6`})})}function d9({items:e=[],value:t,defaultValue:n,onValueChange:r,size:i=`md`,invalid:a,icon:o,className:s,...c}){return(0,G.jsxs)(U.div,{className:Q(R2,s),children:[(0,G.jsx)(U.select,{className:L2({size:i}),value:t,defaultValue:n,onChange:e=>r?.(e.currentTarget.value),"aria-invalid":a,...c,children:e.map(e=>(0,G.jsx)(U.option,{value:e.value,disabled:e.disabled,children:e.label},e.value))}),(0,G.jsx)(U.span,{className:z2,"aria-hidden":!0,children:o??(0,G.jsx)(u9,{})})]})}var f9=Object.defineProperty,p9=Object.getOwnPropertyDescriptor,m9=Object.getOwnPropertyNames,h9=Object.prototype.hasOwnProperty,g9=(e,t)=>{for(var n in t)f9(e,n,{get:t[n],enumerable:!0})},_9=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of m9(t))!h9.call(e,i)&&i!==n&&f9(e,i,{get:()=>t[i],enumerable:!(r=p9(t,i))||r.enumerable});return e},v9=(e,t,n)=>(_9(e,t,`default`),n&&_9(n,t,`default`)),[y9,b9]=W({name:`ToggleContext`,hookName:`useToggleContext`,providerName:`<ToggleProvider />`}),x9=(0,s.forwardRef)((e,t)=>{let{children:n,fallback:r,...i}=e,a=b9(),o=z(a.getIndicatorProps(),i);return(0,G.jsx)(U.span,{...o,ref:t,children:a.pressed?n:r})});x9.displayName=`ToggleIndicator`;var S9=oo(`toggle`,[`root`,`indicator`]).build();function C9(e,t){let{context:n,prop:r,send:i}=e,a=n.get(`pressed`);return{pressed:a,disabled:!!r(`disabled`),setPressed(e){i({type:`PRESS.SET`,value:e})},getRootProps(){return t.element({type:`button`,...S9.root.attrs,disabled:r(`disabled`),"aria-pressed":a,"data-state":a?`on`:`off`,"data-pressed":B(a),"data-disabled":B(r(`disabled`)),onClick(e){e.defaultPrevented||r(`disabled`)||i({type:`PRESS.TOGGLE`})}})},getIndicatorProps(){return t.element({...S9.indicator.attrs,"data-disabled":B(r(`disabled`)),"data-pressed":B(a),"data-state":a?`on`:`off`})}}}var w9=Tt({props({props:e}){return{defaultPressed:!1,...e}},context({prop:e,bindable:t}){return{pressed:t(()=>({value:e(`pressed`),defaultValue:e(`defaultPressed`),onChange(t){e(`onPressedChange`)?.(t)}}))}},initialState(){return`idle`},on:{"PRESS.TOGGLE":{actions:[`togglePressed`]},"PRESS.SET":{actions:[`setPressed`]}},states:{idle:{}},implementations:{actions:{togglePressed({context:e}){e.set(`pressed`,!e.get(`pressed`))},setPressed({context:e,event:t}){e.set(`pressed`,t.value)}}}});function T9(e){return C9(Oa(w9,e),Na)}var E9=K(),D9=(0,s.forwardRef)((e,t)=>{let[n,r]=E9(e,[`pressed`,`defaultPressed`,`disabled`,`onPressedChange`]),i=T9(n),a=z(i.getRootProps(),r);return(0,G.jsx)(y9,{value:i,children:(0,G.jsx)(U.button,{...a,ref:t})})});D9.displayName=`ToggleRoot`;var[O9,k9]=W({name:`TooltipContext`,hookName:`useTooltipContext`,providerName:`<TooltipProvider />`}),A9=(0,s.forwardRef)((e,t)=>{let n=z(k9().getArrowProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});A9.displayName=`TooltipArrow`;var j9=(0,s.forwardRef)((e,t)=>{let n=z(k9().getArrowTipProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});j9.displayName=`TooltipArrowTip`;var M9=(0,s.forwardRef)((e,t)=>{let n=k9(),r=Ha(),i=z(n.getContentProps(),r.getPresenceProps(),e),a=l(r.ref,t);return(0,G.jsx)(Ba,{presence:r,children:(0,G.jsx)(U.div,{...i,ref:a})})});M9.displayName=`TooltipContent`;var N9=(0,s.forwardRef)((e,t)=>{let n=z(k9().getPositionerProps(),e);return Ha().unmounted?null:(0,G.jsx)(U.div,{...n,ref:t})});N9.displayName=`TooltipPositioner`;var P9=oo(`tooltip`).parts(`trigger`,`arrow`,`arrowTip`,`positioner`,`content`).build(),F9=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`tooltip:${e.id}:trigger:${t}`:`tooltip:${e.id}:trigger`:A(n)?n(t):n},I9=e=>e.ids?.content??`tooltip:${e.id}:content`,L9=e=>e.ids?.arrow??`tooltip:${e.id}:arrow`,R9=e=>e.ids?.positioner??`tooltip:${e.id}:popper`,z9=e=>e.getById(F9(e)),B9=e=>e.getById(R9(e)),V9=e=>Ai(e.getRootNode(),`[data-scope="tooltip"][data-part="trigger"]${Rt(e.id)}`),H9=(e,t)=>t==null?z9(e)??V9(e)[0]:e.getById(F9(e,t)),U9=Me({id:null,prevId:null,instant:!1});function W9(e,t){let{state:n,context:r,send:i,scope:a,prop:o,event:s}=e,c=o(`id`),l=n.matches(`open`,`closing`),u=r.get(`triggerValue`),d=r.get(`currentPlacement`),f=d?vc(d):void 0,p=I9(a),m=o(`disabled`),h=zc({...o(`positioning`),placement:d});return{open:l,setOpen(e){i({type:e?`open`:`close`,replaces:`open`})},triggerValue:u,setTriggerValue(e){i({type:`triggerValue.set`,value:e??void 0})},reposition(e={}){i({type:`positioning.set`,options:e})},getTriggerProps(e={}){let{value:n}=e,r=n!=null&&u===n,s=F9(a,n);return t.button({...P9.trigger.attrs,id:s,"data-ownedby":a.id,"data-value":n,"data-current":B(r),dir:o(`dir`),"data-expanded":B(l),"data-state":l?`open`:`closed`,"aria-describedby":l?p:void 0,onClick(e){e.defaultPrevented||m||o(`closeOnClick`)&&i({type:l&&n!=null&&!r?`triggerValue.set`:`close`,src:`trigger.click`,value:n,triggerId:s})},onFocus(e){e.defaultPrevented||m||dx()&&i({type:l&&n!=null&&!r?`triggerValue.set`:`open`,src:`trigger.focus`,value:n,triggerId:s})},onBlur(e){e.defaultPrevented||m||c===U9.get(`id`)&&((e.relatedTarget??a.getDoc().activeElement)?.closest(Rt(a.id))??i({type:`close`,src:`trigger.blur`,value:n,triggerId:s}))},onPointerDown(e){e.defaultPrevented||m||rr(e)&&o(`closeOnPointerDown`)&&c===U9.get(`id`)&&i({type:`close`,src:`trigger.pointerdown`,value:n,triggerId:s})},onPointerMove(e){e.defaultPrevented||m||e.pointerType!==`touch`&&i({type:l&&n!=null&&!r?`triggerValue.set`:`pointer.move`,value:n,triggerId:s})},onPointerOver(e){e.defaultPrevented||m||e.pointerType!==`touch`&&i({type:`pointer.move`,value:n,triggerId:s})},onPointerLeave(){i({type:`pointer.leave`})},onPointerCancel(){i({type:`pointer.leave`})}})},getArrowProps(){return t.element({id:L9(a),...P9.arrow.attrs,dir:o(`dir`),style:h.arrow})},getArrowTipProps(){return t.element({...P9.arrowTip.attrs,dir:o(`dir`),style:h.arrowTip})},getPositionerProps(){return t.element({id:R9(a),...P9.positioner.attrs,dir:o(`dir`),style:h.floating})},getContentProps(){let e=U9.get(`id`)===c,n=U9.get(`prevId`)===c,r=U9.get(`instant`)&&(l&&e||n);return t.element({...P9.content.attrs,dir:o(`dir`),hidden:!l,"data-state":l?`open`:`closed`,"data-instant":B(r),role:`tooltip`,id:p,"aria-label":o(`aria-label`),"data-placement":d,"data-side":f,onPointerEnter(){i({type:`content.pointer.move`})},onPointerLeave(){i({type:`content.pointer.leave`})},style:{pointerEvents:o(`interactive`)?`auto`:`none`}})}}}var{and:G9,not:K9}=wt(),q9=Tt({initialState:({prop:e})=>e(`open`)||e(`defaultOpen`)?`open`:`closed`,props({props:e}){Je(e,[`id`]);let t=e.closeOnClick??!0,n=e.closeOnPointerDown??t;return{openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:n,closeOnClick:t,positioning:{placement:`bottom`,...e.positioning}}},effects:[`trackFocusVisible`,`trackStore`],exit:[`clearGlobalId`],context:({bindable:e,prop:t,scope:n})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:null})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:H9(n,e)})}}))}),watch({track:e,action:t,prop:n}){e([()=>n(`disabled`)],()=>{t([`closeIfDisabled`])}),e([()=>n(`open`)],()=>{t([`toggleVisibility`])}),e([()=>n(`triggerValue`)],()=>{t([`repositionImmediate`])})},on:{"triggerValue.set":{actions:[`setTriggerValue`,`repositionImmediate`]}},states:{closed:{entry:[`clearGlobalId`],on:{"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":{actions:[`clearPointerMoveOpened`]},"pointer.move":[{guard:G9(`noVisibleTooltip`,K9(`hasPointerMoveOpened`)),target:`opening`,actions:[`setTriggerValue`]},{guard:K9(`hasPointerMoveOpened`),target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`,`setTriggerValue`]}]}},opening:{effects:[`trackScroll`,`trackPointerlockChange`,`waitForOpenDelay`],on:{"after.openDelay":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]},{target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]}],"controlled.open":{target:`open`},"controlled.close":{target:`closed`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":[{guard:`isDisabled`,actions:[`clearPointerMoveOpened`]},{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`invokeOnClose`]}]}},open:{effects:[`trackEscapeKey`,`trackScroll`,`trackPointerlockChange`,`trackPositioning`],entry:[`setGlobalId`],on:{"controlled.close":{target:`closed`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.leave":[{guard:`isDisabled`,actions:[`clearPointerMoveOpened`]},{guard:`isVisible`,target:`closing`,actions:[`clearPointerMoveOpened`]},{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],"content.pointer.leave":{guard:`isInteractive`,target:`closing`},"positioning.set":{actions:[`reposition`]},"triggerValue.set":{target:`closing`,actions:[`setTriggerValue`,`immediateReopen`]}}},closing:{effects:[`trackPositioning`,`waitForCloseDelay`],on:{"after.closeDelay":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"controlled.close":{target:`closed`},"controlled.open":{target:`open`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.move":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`,`toggleVisibility`]},{target:`open`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`]}],"triggerValue.set":{target:`open`,actions:[`setTriggerValue`,`repositionImmediate`]},reopen:{target:`open`},"content.pointer.move":{guard:`isInteractive`,target:`open`},"positioning.set":{actions:[`reposition`]}}}},implementations:{guards:{noVisibleTooltip:()=>U9.get(`id`)===null,isVisible:({prop:e})=>e(`id`)===U9.get(`id`),isInteractive:({prop:e})=>!!e(`interactive`),hasPointerMoveOpened:({context:e})=>!!e.get(`hasPointerMoveOpened`),isOpenControlled:({prop:e})=>e(`open`)!==void 0,isDisabled:({prop:e})=>!!e(`disabled`)},actions:{setGlobalId:({prop:e})=>{let t=U9.get(`id`),n=t!==null&&t!==e(`id`);U9.update({id:e(`id`),prevId:n?t:null,instant:n})},clearGlobalId:({prop:e})=>{e(`id`)===U9.get(`id`)&&U9.update({id:null,prevId:null,instant:!1})},invokeOnOpen:({prop:e})=>{e(`onOpenChange`)?.({open:!0})},invokeOnClose:({prop:e})=>{e(`onOpenChange`)?.({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e(`disabled`)&&t({type:`close`,src:`disabled.change`})},reposition:({context:e,event:t,prop:n,scope:r})=>{t.type===`positioning.set`&&Lc(()=>H9(r,e.get(`triggerValue`)),()=>B9(r),{...n(`positioning`),...t.options,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},repositionImmediate:({context:e,event:t,prop:n,scope:r})=>{let i=t.value??e.get(`triggerValue`);return Lc(()=>H9(r,i),()=>B9(r),{...n(`positioning`),onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility:({prop:e,event:t,send:n})=>{queueMicrotask(()=>{n({type:e(`open`)?`controlled.open`:`controlled.close`,previousEvent:t})})},setPointerMoveOpened:({context:e,event:t})=>{let n=t.triggerId??t.previousEvent?.triggerId;e.set(`hasPointerMoveOpened`,n??null)},clearPointerMoveOpened:({context:e})=>{e.set(`hasPointerMoveOpened`,null)},setTriggerValue:({context:e,event:t})=>{t.value!==void 0&&e.set(`triggerValue`,t.value)},immediateReopen:({send:e})=>{queueMicrotask(()=>{e({type:`reopen`})})}},effects:{trackFocusVisible:({scope:e})=>fx({root:e.getRootNode?.()}),trackPositioning:({context:e,prop:t,scope:n})=>(e.get(`currentPlacement`)||e.set(`currentPlacement`,t(`positioning`).placement),Lc(()=>H9(n,e.get(`triggerValue`)),()=>B9(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})),trackPointerlockChange:({send:e,scope:t})=>V(t.getDoc(),`pointerlockchange`,()=>e({type:`close`,src:`pointerlock:change`}),!1),trackScroll:({send:e,prop:t,scope:n,context:r})=>{if(!t(`closeOnScroll`))return;let i=H9(n,r.get(`triggerValue`));if(!i)return;let a=pi(i).map(t=>V(t,`scroll`,()=>{e({type:`close`,src:`scroll`})},{passive:!0,capture:!0}));return()=>{a.forEach(e=>e?.())}},trackStore:({prop:e,send:t})=>{let n,r=!1;return queueMicrotask(()=>{r||(n=U9.subscribe(()=>{U9.get(`id`)!==e(`id`)&&t({type:`close`,src:`id.change`})}))}),()=>{r=!0,n?.()}},trackEscapeKey:({send:e,prop:t})=>t(`closeOnEscape`)?V(document,`keydown`,t=>{er(t)||t.key===`Escape`&&(t.stopPropagation(),e({type:`close`,src:`keydown.escape`}))},!0):void 0,waitForOpenDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.openDelay`,previousEvent:n})},t(`openDelay`));return()=>clearTimeout(r)},waitForCloseDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.closeDelay`,previousEvent:n})},t(`closeDelay`));return()=>clearTimeout(r)}}}}),J9=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro(),{dir:r}=ao();return W9(Oa(q9,{id:t,dir:r,getRootNode:n,...e}),Na)},Y9=e=>{let[t,{children:n,...r}]=to(e),i=J9(r),a=eo(z({present:i.open},t));return(0,G.jsx)(O9,{value:i,children:(0,G.jsx)(Va,{value:a,children:n})})},X9=e=>{let[t,{value:n,children:r}]=to(e),i=eo(z({present:n.open},t));return(0,G.jsx)(O9,{value:n,children:(0,G.jsx)(Va,{value:i,children:r})})},Z9=K(),Q9=(0,s.forwardRef)((e,t)=>{let[n,r]=Z9(e,[`value`]),i=z(k9().getTriggerProps(n),r);return(0,G.jsx)(U.button,{...i,ref:t})});Q9.displayName=`TooltipTrigger`;var[$9,eS]=W({name:`RenderStrategyContext`,hookName:`useRenderStrategyContext`,providerName:`<RenderStrategyPropsProvider />`}),tS=e=>K()(e,[`lazyMount`,`unmountOnExit`,`hideMode`]),[nS,rS]=W({name:`DialogContext`,hookName:`useDialogContext`,providerName:`<DialogProvider />`}),iS=(0,s.forwardRef)((e,t)=>{let n=rS(),r=eo({...eS(),present:n.open}),i=z(n.getBackdropProps(),r.getPresenceProps(),e),a=l(r.ref,t);return(0,G.jsx)(Ba,{presence:r,children:(0,G.jsx)(U.div,{...i,ref:a})})});iS.displayName=`DialogBackdrop`;var aS=(0,s.forwardRef)((e,t)=>{let n=z(rS().getCloseTriggerProps(),e);return(0,G.jsx)(U.button,{...n,ref:t})});aS.displayName=`DialogCloseTrigger`;var oS=(0,s.forwardRef)((e,t)=>{let n=rS(),r=Ha(),i=z(n.getContentProps(),r.getPresenceProps(),e),a=l(r.ref,t);return(0,G.jsx)(Ba,{presence:r,children:(0,G.jsx)(U.div,{...i,ref:a})})});oS.displayName=`DialogContent`;var sS=(0,s.forwardRef)((e,t)=>{let n=z(rS().getDescriptionProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});sS.displayName=`DialogDescription`;var cS=(0,s.forwardRef)((e,t)=>{let n=z(rS().getPositionerProps(),e);return Ha().unmounted?null:(0,G.jsx)(U.div,{...n,ref:t})});cS.displayName=`DialogPositioner`;var lS=oo(`dialog`).parts(`trigger`,`backdrop`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),uS=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,dS=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,fS=e=>e.ids?.content??`dialog:${e.id}:content`,pS=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`dialog:${e.id}:trigger:${t}`:`dialog:${e.id}:trigger`:A(n)?n(t):n},mS=e=>e.ids?.title??`dialog:${e.id}:title`,hS=e=>e.ids?.description??`dialog:${e.id}:description`,gS=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,_S=e=>e.getById(fS(e)),vS=e=>e.getById(uS(e)),yS=e=>e.getById(dS(e)),bS=e=>e.getById(pS(e)),xS=e=>e.getById(mS(e)),SS=e=>e.getById(hS(e)),CS=e=>e.getById(gS(e)),wS=e=>Ai(e.getRootNode(),`[data-scope="dialog"][data-part="trigger"]${Rt(e.id)}`),TS=(e,t)=>t==null?bS(e)??wS(e)[0]:e.getById(pS(e,t)),ES=(e,t)=>{let n=t.finalFocusEl?.();if(n)return n;if(t.triggerValue){let n=TS(e,t.triggerValue);if(n)return n}return wS(e)[0]??null};function DS(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`aria-label`),c=n.matches(`open`),l=i.get(`triggerValue`);return{open:c,modal:!!a(`modal`),setOpen(e){r({type:e?`OPEN`:`CLOSE`,replaces:`open`})},triggerValue:l,setTriggerValue(e){r({type:`TRIGGER_VALUE.SET`,value:e})},getTriggerProps(e={}){let{value:n}=e,i=n!=null&&l===n;return t.button({...lS.trigger.attrs,dir:a(`dir`),id:pS(o,n),"data-ownedby":o.id,"data-value":n,"aria-haspopup":`dialog`,type:`button`,"aria-expanded":n==null?c:c&&i,"data-state":c?`open`:`closed`,"aria-controls":fS(o),"data-current":B(i),onClick(e){e.defaultPrevented||r({type:c&&n!=null&&!i?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})}})},getBackdropProps(){return t.element({...lS.backdrop.attrs,dir:a(`dir`),hidden:!c,id:dS(o),"data-state":c?`open`:`closed`})},getPositionerProps(){return t.element({...lS.positioner.attrs,dir:a(`dir`),id:uS(o),style:ke({pointerEvents:!c||!a(`modal`)?`none`:void 0})})},getContentProps(){let e=i.get(`rendered`);return t.element({...lS.content.attrs,dir:a(`dir`),role:a(`role`),hidden:!c,id:fS(o),tabIndex:-1,"data-state":c?`open`:`closed`,"aria-modal":a(`modal`),"aria-label":s||void 0,"aria-labelledby":s||!e.title?void 0:mS(o),"aria-describedby":e.description?hS(o):void 0,style:ke({pointerEvents:a(`modal`)?void 0:`auto`})})},getTitleProps(){return t.element({...lS.title.attrs,dir:a(`dir`),id:mS(o)})},getDescriptionProps(){return t.element({...lS.description.attrs,dir:a(`dir`),id:hS(o)})},getCloseTriggerProps(){return t.button({...lS.closeTrigger.attrs,dir:a(`dir`),id:gS(o),type:`button`,onClick(e){e.defaultPrevented||(e.stopPropagation(),r({type:`CLOSE`}))}})}}}var OS=Tt({props({props:e,scope:t}){let n=e.role===`alertdialog`,r=n?()=>CS(t):void 0,i=typeof e.modal!=`boolean`||e.modal;return{role:`dialog`,modal:i,trapFocus:i,preventScroll:i,closeOnInteractOutside:i&&!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r,...e}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:TS(n,e)})}}))}},refs(){return{returnFocusEl:null}},watch({track:e,action:t,prop:n}){e([()=>n(`open`)],()=>{t([`toggleVisibility`])})},states:{open:{entry:[`setReturnFocusEl`,`setInitialFocus`],effects:[`trackRenderedElements`,`trackDismissableElement`,`trapFocus`,`preventScroll`,`hideContentBelow`],on:{"CONTROLLED.CLOSE":{target:`closed`,actions:[`setFinalFocus`]},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`,`setFinalFocus`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`,`setFinalFocus`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}},closed:{on:{"CONTROLLED.OPEN":{target:`open`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackRenderedElements({context:e,scope:t}){return Ri({getContainerEl:()=>_S(t),getRootNode:()=>t.getRootNode(),parts:{title:()=>xS(t),description:()=>SS(t)},onChange:t=>e.set(`rendered`,t)})},trackDismissableElement({scope:e,send:t,prop:n}){let r=()=>_S(e),i=!0;return Yl(r,{type:`dialog`,defer:!0,getRootNode:e.getRootNode,pointerBlocking:n(`modal`),layerStyleTargets:[()=>yS(e),()=>vS(e)],exclude:[bS(e),...wS(e)].filter(Boolean),onInteractOutside(e){n(`onInteractOutside`)?.(e),n(`closeOnInteractOutside`)||e.preventDefault(),i=!(e.detail.focusable||e.detail.contextmenu)},persistentElements:n(`persistentElements`),onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onRequestDismiss:n(`onRequestDismiss`),onEscapeKeyDown(e){n(`onEscapeKeyDown`)?.(e),n(`closeOnEscape`)||e.preventDefault()},onDismiss(){t({type:`CLOSE`,src:`interact-outside`,restoreFocus:i})}})},preventScroll({scope:e,prop:t}){if(t(`preventScroll`))return yu(e.getDoc())},trapFocus({scope:e,prop:t,context:n}){return t(`trapFocus`)?fu(()=>_S(e),{preventScroll:!0,returnFocusOnDeactivate:!!t(`restoreFocus`),initialFocus:()=>Kr({root:_S(e),getInitialEl:t(`initialFocusEl`)}),setReturnFocus:r=>ES(e,{finalFocusEl:t(`finalFocusEl`),triggerValue:n.get(`triggerValue`)})??r,getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t(`modal`)?bl(()=>[_S(e)],{defer:!0}):void 0}},actions:{setReturnFocusEl({refs:e,scope:t}){H(()=>e.set(`returnFocusEl`,t.getActiveElement()))},setFinalFocus({event:e,prop:t,refs:n,scope:r,context:i}){if(t(`trapFocus`)||!t(`restoreFocus`)||(e.restoreFocus??e.previousEvent?.restoreFocus)===!1)return;let a=_S(r),o=ES(r,{finalFocusEl:t(`finalFocusEl`),triggerValue:i.get(`triggerValue`)})??n.get(`returnFocusEl`);H(()=>{cn(r.getActiveElement(),[a])||o?.focus({preventScroll:!0})})},setInitialFocus({prop:e,scope:t}){e(`trapFocus`)||H(()=>{let n=Kr({root:_S(t),getInitialEl:e(`initialFocusEl`)});n&&n.focus({preventScroll:!0})})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},toggleVisibility({prop:e,send:t,event:n}){t({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})}}}}),kS=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro(),{dir:r}=ao();return DS(Oa(OS,{id:t,getRootNode:n,dir:r,...e}),Na)},AS=e=>{let[t,{children:n,...r}]=to(e),[i]=tS(t),a=kS(r),o=eo(z({present:a.open},t));return(0,G.jsx)(nS,{value:a,children:(0,G.jsx)($9,{value:i,children:(0,G.jsx)(Va,{value:o,children:n})})})},jS=e=>{let[t,{value:n,children:r}]=to(e),[i]=tS(t),a=eo(z({present:n.open},t));return(0,G.jsx)(nS,{value:n,children:(0,G.jsx)($9,{value:i,children:(0,G.jsx)(Va,{value:a,children:r})})})},MS=(0,s.forwardRef)((e,t)=>{let n=z(rS().getTitleProps(),e);return(0,G.jsx)(U.h2,{...n,ref:t})});MS.displayName=`DialogTitle`;var NS=K(),PS=(0,s.forwardRef)((e,t)=>{let[n,r]=NS(e,[`value`]),i=rS(),a=Ha(),o=i.getTriggerProps(n),s=z({...o,"aria-controls":a.unmounted?void 0:o[`aria-controls`]},r);return(0,G.jsx)(U.button,{...s,ref:t})});PS.displayName=`DialogTrigger`;var[FS,IS]=W({name:`FloatingPanelContext`,hookName:`useFloatingPanelContext`,providerName:`<FloatingPanelProvider />`}),LS=(0,s.forwardRef)((e,t)=>{let n=z(IS().getBodyProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});LS.displayName=`FloatingPanelBody`;var RS=(0,s.forwardRef)((e,t)=>{let n=z(IS().getCloseTriggerProps(),e);return(0,G.jsx)(U.button,{...n,ref:t})});RS.displayName=`FloatingPanelCloseTrigger`;var zS=(0,s.forwardRef)((e,t)=>{let n=IS(),r=Ha(),i=z(n.getContentProps(),r.getPresenceProps(),e),a=l(r.ref,t);return(0,G.jsx)(Ba,{presence:r,children:(0,G.jsx)(U.div,{...i,ref:a})})});zS.displayName=`FloatingPanelContent`;var BS=(0,s.forwardRef)((e,t)=>{let n=z(IS().getDragTriggerProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});BS.displayName=`FloatingPanelDragTrigger`;var VS=(0,s.forwardRef)((e,t)=>{let n=z(IS().getHeaderProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});VS.displayName=`FloatingPanelHeader`;var HS=(0,s.forwardRef)((e,t)=>{let n=z(IS().getPositionerProps(),e);return Ha().unmounted?null:(0,G.jsx)(U.div,{...n,ref:t})});HS.displayName=`FloatingPanelPositioner`;var US=K(),WS=(0,s.forwardRef)((e,t)=>{let[n,r]=US(e,[`axis`]),i=z(IS().getResizeTriggerProps(n),r);return(0,G.jsx)(U.div,{...i,ref:t})});WS.displayName=`FloatingPanelResizeTrigger`;var GS=K(),KS=(0,s.forwardRef)((e,t)=>{let[n,r]=GS(e,[`stage`]),i=z(IS().getStageTriggerProps(n),r);return(0,G.jsx)(U.button,{...i,ref:t})});KS.displayName=`FloatingPanelStageTrigger`;var qS=oo(`floating-panel`).parts(`trigger`,`positioner`,`content`,`header`,`body`,`title`,`resizeTrigger`,`dragTrigger`,`stageTrigger`,`closeTrigger`,`control`).build();function JS(e){"@babel/helpers - typeof";return JS=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JS(e)}function YS(e,t){if(JS(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(JS(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function XS(e){var t=YS(e,`string`);return JS(t)==`symbol`?t:t+``}function ZS(e,t,n){return(t=XS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var QS=class e{constructor([t,n,r,i,a,o]=[0,0,0,0,0,0]){ZS(this,`m00`,void 0),ZS(this,`m01`,void 0),ZS(this,`m02`,void 0),ZS(this,`m10`,void 0),ZS(this,`m11`,void 0),ZS(this,`m12`,void 0),ZS(this,`rotate`,(...t)=>this.prepend(e.rotate(...t))),ZS(this,`scale`,(...t)=>this.prepend(e.scale(...t))),ZS(this,`translate`,(...t)=>this.prepend(e.translate(...t))),this.m00=t,this.m01=n,this.m02=r,this.m10=i,this.m11=a,this.m12=o}applyTo(e){let{x:t,y:n}=e,{m00:r,m01:i,m02:a,m10:o,m11:s,m12:c}=this;return{x:r*t+i*n+a,y:o*t+s*n+c}}prepend(t){return new e([this.m00*t.m00+this.m01*t.m10,this.m00*t.m01+this.m01*t.m11,this.m00*t.m02+this.m01*t.m12+this.m02,this.m10*t.m00+this.m11*t.m10,this.m10*t.m01+this.m11*t.m11,this.m10*t.m02+this.m11*t.m12+this.m12])}append(t){return new e([t.m00*this.m00+t.m01*this.m10,t.m00*this.m01+t.m01*this.m11,t.m00*this.m02+t.m01*this.m12+t.m02,t.m10*this.m00+t.m11*this.m10,t.m10*this.m01+t.m11*this.m11,t.m10*this.m02+t.m11*this.m12+t.m12])}get determinant(){return this.m00*this.m11-this.m01*this.m10}get isInvertible(){let e=this.determinant;return isFinite(e)&&isFinite(this.m02)&&isFinite(this.m12)&&e!==0}invert(){let t=this.determinant;return new e([this.m11/t,-this.m01/t,(this.m01*this.m12-this.m11*this.m02)/t,-this.m10/t,this.m00/t,(this.m10*this.m02-this.m00*this.m12)/t])}get array(){return[this.m00,this.m01,this.m02,this.m10,this.m11,this.m12,0,0,1]}get float32Array(){return new Float32Array(this.array)}static get identity(){return new e([1,0,0,0,1,0])}static rotate(t,n){let r=new e([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?e.multiply(e.translate(n.x,n.y),r,e.translate(-n.x,-n.y)):r}static scale(t,n=t,r={x:0,y:0}){let i=new e([t,0,0,0,n,0]);return r.x!==0||r.y!==0?e.multiply(e.translate(r.x,r.y),i,e.translate(-r.x,-r.y)):i}static translate(t,n){return new e([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((e,t)=>e.prepend(t),t):e.identity}get a(){return this.m00}get b(){return this.m10}get c(){return this.m01}get d(){return this.m11}get tx(){return this.m02}get ty(){return this.m12}get scaleComponents(){return{x:this.a,y:this.d}}get translationComponents(){return{x:this.tx,y:this.ty}}get skewComponents(){return{x:this.c,y:this.b}}toString(){return`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.tx}, ${this.ty})`}},$S=(e,t,n)=>Math.min(Math.max(e,t),n),eC=(e,t,n)=>({x:$S(e.x,n.x,n.x+n.width-t.width),y:$S(e.y,n.y,n.y+n.height-t.height)}),tC={width:0,height:0},nC={width:1/0,height:1/0},rC=(e,t=tC,n=nC)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),iC=(e,t)=>({x:e,y:t}),aC=(e,t)=>t?iC(e.x-t.x,e.y-t.y):e,oC=(e,t)=>iC(e.x+t.x,e.y+t.y);function sC(e){let{x:t,y:n,width:r,height:i}=e,a=t+r/2,o=n+i/2;return{x:t,y:n,width:r,height:i,minX:t,minY:n,maxX:t+r,maxY:n+i,midX:a,midY:o,center:iC(a,o)}}var cC=(e,t)=>({x:Math.max(t.x,Math.min(e.x,t.x+t.width-e.width)),y:Math.max(t.y,Math.min(e.y,t.y+t.height-e.height)),width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}),lC=(e,t)=>e.width===t?.width&&e.height===t?.height,uC=(e,t)=>e.x===t?.x&&e.y===t?.y,dC=new WeakMap;function fC(e){if(!dC.has(e)){let t=e.ownerDocument.defaultView||window;dC.set(e,t.getComputedStyle(e))}return dC.get(e)}function pC(e,t={}){return sC(mC(e,t))}function mC(e,t={}){let{excludeScrollbar:n=!1,excludeBorders:r=!1}=t,{x:i,y:a,width:o,height:s}=e.getBoundingClientRect(),c={x:i,y:a,width:o,height:s},{borderLeftWidth:l,borderTopWidth:u,borderRightWidth:d,borderBottomWidth:f}=fC(e),p=gC(l,d),m=gC(u,f);if(r&&(c.width-=p,c.height-=m,c.x+=hC(l),c.y+=hC(u)),n){let t=e.offsetWidth-e.clientWidth-p,n=e.offsetHeight-e.clientHeight-m;c.width-=t,c.height-=n}return c}var hC=e=>parseFloat(e.replace(`px`,``)),gC=(...e)=>e.reduce((e,t)=>e+(t?hC(t):0),0);function _C(e,t={}){return sC(vC(e,t))}function vC(e,t){let{excludeScrollbar:n=!1}=t,{innerWidth:r,innerHeight:i,document:a,visualViewport:o}=e,s={x:0,y:0,width:o?.width||r,height:o?.height||i};if(n){let e=r-a.documentElement.clientWidth,t=i-a.documentElement.clientHeight;s.width-=e,s.height-=t}return s}var yC={n:{x:.5,y:0},ne:{x:1,y:0},e:{x:1,y:.5},se:{x:1,y:1},s:{x:.5,y:1},sw:{x:0,y:1},w:{x:0,y:.5},nw:{x:0,y:0}},bC={n:`s`,ne:`sw`,e:`w`,se:`nw`,s:`n`,sw:`ne`,w:`e`,nw:`se`},{sign:xC,abs:SC,min:CC}=Math;function wC(e,t){let{minX:n,minY:r,maxX:i,maxY:a,midX:o,midY:s}=e;return{x:t.includes(`w`)?n:t.includes(`e`)?i:o,y:t.includes(`n`)?r:t.includes(`s`)?a:s}}function TC(e){return bC[e]}function EC(e,t,n,r){let{scalingOriginMode:i,lockAspectRatio:a}=r,o=wC(e,n),s=wC(e,TC(n));i===`center`&&(t={x:t.x*2,y:t.y*2});let c={x:o.x+t.x,y:o.y+t.y},l={x:yC[n].x*2-1,y:yC[n].y*2-1},u={width:c.x-s.x,height:c.y-s.y},d=l.x*u.width/e.width,f=l.y*u.height/e.height,p=SC(d)>SC(f)?d:f,m=a?{x:p,y:p}:{x:o.x===s.x?1:d,y:o.y===s.y?1:f};switch(o.y===s.y?m.y=SC(m.y):xC(m.y)!==xC(f)&&(m.y*=-1),o.x===s.x?m.x=SC(m.x):xC(m.x)!==xC(d)&&(m.x*=-1),i){case`extent`:return OC(e,QS.scale(m.x,m.y,s),!1);case`center`:return OC(e,QS.scale(m.x,m.y,{x:e.midX,y:e.midY}),!1)}}function DC(e,t,n=!0){return n?{x:CC(t.x,e.x),y:CC(t.y,e.y),width:SC(t.x-e.x),height:SC(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function OC(e,t,n=!0){return DC(t.applyTo({x:e.minX,y:e.minY}),t.applyTo({x:e.maxX,y:e.maxY}),n)}var kC=e=>e.ids?.trigger??`float:${e.id}:trigger`,AC=e=>e.ids?.positioner??`float:${e.id}:positioner`,jC=e=>e.ids?.content??`float:${e.id}:content`,MC=e=>e.ids?.title??`float:${e.id}:title`,NC=e=>e.ids?.header??`float:${e.id}:header`,PC=e=>e.getById(kC(e)),FC=e=>e.getById(AC(e)),IC=e=>e.getById(jC(e)),LC=e=>e.getById(NC(e)),RC={x:0,y:0},zC=(e,t)=>{if(t!==`absolute`)return RC;let n=FC(e)?.offsetParent;return Ut(n)?Ae(pC(n,{excludeBorders:!0}),[`x`,`y`]):RC},BC=(e,t,n)=>{let r;return r=Ut(t)?pC(t):_C(e.getWin()),n&&(r=sC({x:-r.width,y:r.minY,width:r.width*3,height:r.height*2})),Ae(r,[`x`,`y`,`width`,`height`])};function VC(e){switch(e){case`n`:return{cursor:`n-resize`,width:`100%`,top:0,left:`50%`,translate:`-50%`};case`e`:return{cursor:`e-resize`,height:`100%`,right:0,top:`50%`,translate:`0 -50%`};case`s`:return{cursor:`s-resize`,width:`100%`,bottom:0,left:`50%`,translate:`-50%`};case`w`:return{cursor:`w-resize`,height:`100%`,left:0,top:`50%`,translate:`0 -50%`};case`se`:return{cursor:`se-resize`,bottom:0,right:0};case`sw`:return{cursor:`sw-resize`,bottom:0,left:0};case`ne`:return{cursor:`ne-resize`,top:0,right:0};case`nw`:return{cursor:`nw-resize`,top:0,left:0};default:throw Error(`Invalid axis: ${e}`)}}var HC={minimize:`Minimize window`,maximize:`Maximize window`,restore:`Restore window`},UC=new Set([`minimized`,`maximized`,`default`]);function WC(e,t){let{state:n,send:r,scope:i,prop:a,computed:o,context:s}=e,c=je(HC,a(`translations`)),l=n.hasTag(`open`),u=n.matches(`open.dragging`),d=n.matches(`open.resizing`),f=s.get(`isTopmost`),p=s.get(`stackIndex`),m=s.get(`size`),h=s.get(`position`),g=s.get(`offsetOrigin`),_=h.x-g.x,v=h.y-g.y,y=o(`isMaximized`),b=o(`isMinimized`),x=o(`isStaged`),S=o(`canResize`),C=o(`canDrag`);return{open:l,resizable:a(`resizable`),draggable:a(`draggable`),setOpen(e){r({type:e?`OPEN`:`CLOSE`,replaces:`open`})},dragging:u,resizing:d,position:h,size:m,setPosition(e){r({type:`SET_POSITION`,position:e})},setSize(e){r({type:`SET_SIZE`,size:e})},minimize(){r({type:`MINIMIZE`})},maximize(){r({type:`MAXIMIZE`})},restore(){r({type:`RESTORE`})},getTriggerProps(){return t.button({...qS.trigger.attrs,dir:a(`dir`),type:`button`,disabled:a(`disabled`),id:kC(i),"data-state":l?`open`:`closed`,"data-dragging":B(u),"aria-controls":jC(i),onClick(e){if(e.defaultPrevented||a(`disabled`))return;let t=n.hasTag(`open`);r({type:t?`CLOSE`:`OPEN`,src:`trigger`})}})},getPositionerProps(){return t.element({...qS.positioner.attrs,dir:a(`dir`),id:AC(i),style:{"--width":R(m?.width),"--height":R(m?.height),"--x":R(_),"--y":R(v),"--z-index":p>-1?p+1:void 0,position:a(`strategy`),isolation:`isolate`,top:`var(--y)`,left:`var(--x)`}})},getContentProps(){return t.element({...qS.content.attrs,dir:a(`dir`),role:`dialog`,tabIndex:0,hidden:!l,id:jC(i),"aria-labelledby":MC(i),"data-state":l?`open`:`closed`,"data-dragging":B(u),"data-topmost":B(f),"data-behind":B(!f),"data-minimized":B(b),"data-maximized":B(y),"data-staged":B(x),style:{width:`var(--width)`,height:`var(--height)`,overflow:b?`hidden`:void 0},onFocus(){r({type:`CONTENT_FOCUS`})},onKeyDown(e){if(e.defaultPrevented)return;if(e.key===`Escape`&&f){r({type:`ESCAPE`});return}if(e.currentTarget!==Zn(e))return;let t=pr(e)*a(`gridSize`),n={ArrowLeft(){r({type:`MOVE`,direction:`left`,step:t})},ArrowRight(){r({type:`MOVE`,direction:`right`,step:t})},ArrowUp(){r({type:`MOVE`,direction:`up`,step:t})},ArrowDown(){r({type:`MOVE`,direction:`down`,step:t})}}[lr(e)];n&&(e.preventDefault(),n(e))}})},getCloseTriggerProps(){return t.button({...qS.closeTrigger.attrs,dir:a(`dir`),disabled:a(`disabled`),"aria-label":`Close Window`,type:`button`,onClick(e){e.defaultPrevented||r({type:`CLOSE`})}})},getStageTriggerProps(e){if(!UC.has(e.stage))throw Error(`[zag-js] Invalid stage: ${e.stage}. Must be one of: ${Array.from(UC).join(`, `)}`);let n=ue(e.stage,{minimized:()=>({"aria-label":c.minimize,hidden:x}),maximized:()=>({"aria-label":c.maximize,hidden:x}),default:()=>({"aria-label":c.restore,hidden:!x})});return t.button({...qS.stageTrigger.attrs,dir:a(`dir`),disabled:a(`disabled`),"data-stage":e.stage,...n,type:`button`,onClick(t){if(t.defaultPrevented||!a(`resizable`))return;let n=ue(e.stage,{minimized:()=>`MINIMIZE`,maximized:()=>`MAXIMIZE`,default:()=>`RESTORE`});r({type:n.toUpperCase()})}})},getResizeTriggerProps(e){return t.element({...qS.resizeTrigger.attrs,dir:a(`dir`),"data-disabled":B(!S),"data-axis":e.axis,onPointerDown(t){S&&rr(t)&&(t.currentTarget.setPointerCapture(t.pointerId),t.stopPropagation(),r({type:`RESIZE_START`,axis:e.axis,position:{x:t.clientX,y:t.clientY}}))},onPointerUp(e){if(!S)return;let t=e.currentTarget;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)},style:{position:`absolute`,touchAction:`none`,...VC(e.axis)}})},getDragTriggerProps(){return t.element({...qS.dragTrigger.attrs,dir:a(`dir`),"data-disabled":B(!C),onPointerDown(e){if(!C||!rr(e))return;let t=Zn(e);t?.closest(`button`)||t?.closest(`[data-no-drag]`)||(e.currentTarget.setPointerCapture(e.pointerId),e.stopPropagation(),r({type:`DRAG_START`,pointerId:e.pointerId,position:{x:e.clientX,y:e.clientY}}))},onPointerUp(e){if(!C)return;let t=e.currentTarget;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)},onDoubleClick(e){e.defaultPrevented||a(`resizable`)&&r({type:x?`RESTORE`:`MAXIMIZE`})},style:{WebkitUserSelect:`none`,userSelect:`none`,touchAction:`none`,cursor:`move`}})},getControlProps(){return t.element({...qS.control.attrs,dir:a(`dir`),"data-disabled":B(a(`disabled`)),"data-stage":s.get(`stage`),"data-minimized":B(b),"data-maximized":B(y),"data-staged":B(x)})},getTitleProps(){return t.element({...qS.title.attrs,dir:a(`dir`),id:MC(i)})},getHeaderProps(){return t.element({...qS.header.attrs,dir:a(`dir`),id:NC(i),"data-dragging":B(u),"data-topmost":B(f),"data-behind":B(!f),"data-minimized":B(b),"data-maximized":B(y),"data-staged":B(x)})},getBodyProps(){return t.element({...qS.body.attrs,dir:a(`dir`),"data-dragging":B(u),"data-minimized":B(b),"data-maximized":B(y),"data-staged":B(x),hidden:b})}}}var GC=Me({stack:[]}),KC={subscribe:GC.subscribe,count(){return GC.get(`stack`).length},add(e){let t=GC.get(`stack`);t.includes(e)||GC.set(`stack`,[...t,e])},remove(e){let t=GC.get(`stack`);t.includes(e)&&GC.set(`stack`,t.filter(t=>t!==e))},bringToFront(e){let t=GC.get(`stack`);t[t.length-1]!==e&&GC.set(`stack`,[...t.filter(t=>t!==e),e])},isTopmost(e){let t=GC.get(`stack`);return t[t.length-1]===e},indexOf(e){return GC.get(`stack`).indexOf(e)}},{not:qC,and:JC}=wt(),YC=Object.freeze({width:320,height:240}),XC=Object.freeze({x:300,y:100}),ZC=Tt({props({props:e}){return Je(e,[`id`],`floating-panel`),{strategy:`fixed`,gridSize:1,allowOverflow:!0,resizable:!0,draggable:!0,...e}},initialState({prop:e}){return e(`open`)??e(`defaultOpen`)?`open`:`closed`},context({prop:e,bindable:t}){return{size:t(()=>({defaultValue:e(`defaultSize`)??YC,value:e(`size`),isEqual:lC,hash(e){return`W:${e.width} H:${e.height}`},onChange(t){e(`onSizeChange`)?.({size:t})}})),position:t(()=>({defaultValue:e(`defaultPosition`)??XC,value:e(`position`),isEqual:uC,hash(e){return`X:${e.x} Y:${e.y}`},onChange(t){e(`onPositionChange`)?.({position:t})}})),stage:t(()=>({defaultValue:`default`,onChange(t){e(`onStageChange`)?.({stage:t})}})),offsetOrigin:t(()=>({defaultValue:{x:0,y:0},isEqual:uC})),lastEventPosition:t(()=>({defaultValue:null})),prevPosition:t(()=>({defaultValue:null})),prevSize:t(()=>({defaultValue:null})),isTopmost:t(()=>({defaultValue:void 0})),stackIndex:t(()=>({defaultValue:-1}))}},computed:{isMaximized:({context:e})=>e.get(`stage`)===`maximized`,isMinimized:({context:e})=>e.get(`stage`)===`minimized`,isStaged:({context:e})=>e.get(`stage`)!=="default",hasSpecifiedPosition:({prop:e})=>e(`defaultPosition`)!=null||e(`position`)!=null,canResize:({context:e,prop:t})=>t(`resizable`)&&!t(`disabled`)&&e.get(`stage`)==="default",canDrag:({prop:e,computed:t})=>e(`draggable`)&&!e(`disabled`)&&!t(`isMaximized`)},watch({track:e,context:t,action:n,prop:r}){e([()=>t.hash(`position`),()=>t.hash(`offsetOrigin`)],()=>{n([`setPositionStyle`])}),e([()=>t.hash(`size`)],()=>{n([`setSizeStyle`])}),e([()=>r(`strategy`)],()=>{n([`setOffsetOrigin`])}),e([()=>r(`open`)],()=>{n([`toggleVisibility`])})},effects:[`trackPanelStack`],on:{CONTENT_FOCUS:{actions:[`bringToFrontOfPanelStack`]},SET_POSITION:{actions:[`setPosition`]},SET_SIZE:{actions:[`setSize`]}},states:{closed:{tags:[`closed`],on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setOffsetOrigin`,`setAnchorPosition`,`setPositionStyle`,`setSizeStyle`,`setInitialFocus`]},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setOffsetOrigin`,`setAnchorPosition`,`setPositionStyle`,`setSizeStyle`,`setInitialFocus`]}]}},open:{tags:[`open`],entry:[`bringToFrontOfPanelStack`],exit:[`removeFromPanelStack`],initial:`idle`,on:{"CONTROLLED.CLOSE":{target:`closed`,actions:[`resetRect`,`setFinalFocus`]},CLOSE:[{guard:`isOpenControlled`,target:`closed`,actions:[`invokeOnClose`,`setFinalFocus`]},{target:`closed`,actions:[`invokeOnClose`,`resetRect`,`setFinalFocus`]}]},states:{idle:{effects:[`trackBoundaryRect`],on:{DRAG_START:{guard:qC(`isMaximized`),target:`dragging`,actions:[`setPrevPosition`]},RESIZE_START:{guard:qC(`isMinimized`),target:`resizing`,actions:[`setPrevSize`]},ESCAPE:[{guard:JC(`isOpenControlled`,`closeOnEsc`),actions:[`invokeOnClose`]},{guard:`closeOnEsc`,target:`closed`,actions:[`invokeOnClose`,`resetRect`,`setFinalFocus`]}],MINIMIZE:{actions:[`setMinimized`]},MAXIMIZE:{actions:[`setMaximized`]},RESTORE:{actions:[`setRestored`]},MOVE:{actions:[`setPositionFromKeyboard`]}}},dragging:{effects:[`trackPointerMove`],on:{DRAG:{actions:[`setPositionFromDrag`]},DRAG_END:{target:`idle`,actions:[`invokeOnDragEnd`,`clearPrevPosition`]},ESCAPE:{target:`idle`,actions:[`restorePosition`,`clearPrevPosition`]}}},resizing:{effects:[`trackPointerMove`],on:{DRAG:{actions:[`setSizeFromDrag`]},DRAG_END:{target:`idle`,actions:[`invokeOnResizeEnd`,`clearPrevSize`]},ESCAPE:{target:`idle`,actions:[`restoreSize`,`clearPrevSize`]}}}}}},implementations:{guards:{closeOnEsc:({prop:e})=>!!e(`closeOnEscape`),isMaximized:({context:e})=>e.get(`stage`)===`maximized`,isMinimized:({context:e})=>e.get(`stage`)===`minimized`,isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackPointerMove({scope:e,send:t,event:n,prop:r}){let i=e.getDoc(),a=BC(e,r(`getBoundaryEl`)?.(),!1);return wi(i,{onPointerMove({point:e,event:r}){let{altKey:i,shiftKey:o}=r;t({type:`DRAG`,position:{x:Ce(e.x,a.x,a.x+a.width),y:Ce(e.y,a.y,a.y+a.height)},axis:n.axis,altKey:i,shiftKey:o})},onPointerUp(){t({type:`DRAG_END`})}})},trackBoundaryRect({context:e,scope:t,prop:n,computed:r}){let i=t.getWin(),a=()=>BC(t,n(`getBoundaryEl`)?.(),!1),o=a(),s=t=>{let n=t.x-o.x,r=t.y-o.y;if(n===0&&r===0)return;let i=e.get(`position`);e.set(`position`,{x:i.x+n,y:i.y+r})},c=t=>{if(t.width===o.width&&t.height===o.height)return;let n={...e.get(`position`),...e.get(`size`)},i=r(`isMaximized`)?t:cC(n,t);e.set(`size`,Ae(i,[`width`,`height`])),e.set(`position`,Ae(i,[`x`,`y`]))},l=()=>{e.set(`offsetOrigin`,zC(t,n(`strategy`)))},u=()=>{let e=a();l(),s(e),c(e),o=e},d=n(`getBoundaryEl`)?.(),f=[H(l)];if(Ut(d)){f.push(Bi.observe(d,u));for(let e of pi(d))f.push(V(e,`scroll`,u))}else f.push(V(i,`resize`,u));return()=>f.forEach(e=>e?.())},trackPanelStack({context:e,scope:t}){let n=KC.subscribe(()=>{e.set(`isTopmost`,KC.isTopmost(t.id)),e.set(`stackIndex`,KC.indexOf(t.id))});return()=>{KC.remove(t.id),n()}}},actions:{setPosition({context:e,event:t,prop:n,scope:r}){let i=BC(r,n(`getBoundaryEl`)?.(),n(`allowOverflow`)),a=eC(t.position,e.get(`size`),i);e.set(`position`,a)},setSize({context:e,event:t,scope:n,prop:r}){let i=BC(n,r(`getBoundaryEl`)?.(),!1),a=t.size;a=rC(a,r(`minSize`),r(`maxSize`)),a=rC(a,r(`minSize`),i);let o=eC(e.get(`position`),a,i);e.set(`size`,a),e.set(`position`,o)},setAnchorPosition({context:e,computed:t,prop:n,scope:r}){if(t(`hasSpecifiedPosition`))return;let i=e.get(`prevPosition`)||e.get(`prevSize`);if(n(`persistRect`)&&i)return;let a=PC(r),o=BC(r,n(`getBoundaryEl`)?.(),!1),s=n(`getAnchorPosition`)?.({triggerRect:a?DOMRect.fromRect(pC(a)):null,boundaryRect:DOMRect.fromRect(o)});if(!s){let t=e.get(`size`);s={x:o.x+(o.width-t.width)/2,y:o.y+(o.height-t.height)/2}}s&&e.set(`position`,s)},setPrevPosition({context:e,event:t}){e.set(`prevPosition`,{...e.get(`position`)}),e.set(`lastEventPosition`,t.position)},clearPrevPosition({context:e,prop:t}){t(`persistRect`)||e.set(`prevPosition`,null),e.set(`lastEventPosition`,null)},restorePosition({context:e}){let t=e.get(`prevPosition`);t&&e.set(`position`,t)},setPositionFromDrag({context:e,event:t,prop:n,scope:r}){let i=aC(t.position,e.get(`lastEventPosition`));i.x=Math.round(i.x/n(`gridSize`))*n(`gridSize`),i.y=Math.round(i.y/n(`gridSize`))*n(`gridSize`);let a=e.get(`prevPosition`);if(!a)return;let o=oC(a,i),s=BC(r,n(`getBoundaryEl`)?.(),n(`allowOverflow`));o=eC(o,e.get(`size`),s),e.set(`position`,o)},setOffsetOrigin({scope:e,context:t,prop:n}){let r=()=>t.set(`offsetOrigin`,zC(e,n(`strategy`)));n(`strategy`)===`absolute`&&!FC(e)?.offsetParent?H(r):r()},setPositionStyle({scope:e,context:t}){let n=FC(e),r=t.get(`position`),i=t.get(`offsetOrigin`);n?.style.setProperty(`--x`,`${r.x-i.x}px`),n?.style.setProperty(`--y`,`${r.y-i.y}px`)},resetRect({context:e,prop:t}){e.set(`stage`,`default`),t(`persistRect`)||(e.set(`position`,e.initial(`position`)),e.set(`size`,e.initial(`size`)))},setPrevSize({context:e,event:t}){e.set(`prevSize`,{...e.get(`size`)}),e.set(`prevPosition`,{...e.get(`position`)}),e.set(`lastEventPosition`,t.position)},clearPrevSize({context:e}){e.set(`prevSize`,null),e.set(`prevPosition`,null),e.set(`lastEventPosition`,null)},restoreSize({context:e}){let t=e.get(`prevSize`);t&&e.set(`size`,t);let n=e.get(`prevPosition`);n&&e.set(`position`,n)},setSizeFromDrag({context:e,event:t,scope:n,prop:r}){let i=e.get(`prevSize`),a=e.get(`prevPosition`),o=e.get(`lastEventPosition`);if(!i||!a||!o)return;let s=EC(sC({...a,...i}),aC(t.position,o),t.axis,{scalingOriginMode:t.altKey?`center`:`extent`,lockAspectRatio:!!r(`lockAspectRatio`)||t.shiftKey}),c=Ae(s,[`width`,`height`]),l=Ae(s,[`x`,`y`]),u=BC(n,r(`getBoundaryEl`)?.(),!1);if(c=rC(c,r(`minSize`),r(`maxSize`)),c=rC(c,r(`minSize`),u),e.set(`size`,c),l){let t=eC(l,c,u);e.set(`position`,t)}},setSizeStyle({scope:e,context:t}){queueMicrotask(()=>{let n=FC(e),r=t.get(`size`);n?.style.setProperty(`--width`,`${r.width}px`),n?.style.setProperty(`--height`,`${r.height}px`)})},setMaximized({context:e,prop:t,scope:n}){if(e.get(`stage`)===`maximized`)return;let r=e.get(`stage`)==="default",i=e.get(`size`),a=e.get(`position`),o=BC(n,t(`getBoundaryEl`)?.(),!1),s=Ae(o,[`x`,`y`]),c=Ae(o,[`height`,`width`]);e.set(`stage`,`maximized`),r&&(e.set(`prevSize`,i),e.set(`prevPosition`,a)),e.set(`position`,s),e.set(`size`,c)},setMinimized({context:e,scope:t}){if(e.get(`stage`)===`minimized`)return;let n=e.get(`stage`)==="default",r=e.get(`size`),i=e.get(`position`);e.set(`stage`,`minimized`),n&&(e.set(`prevSize`,r),e.set(`prevPosition`,i));let a=LC(t);if(!a)return;let o={...r,height:a?.offsetHeight};e.set(`size`,o)},setRestored({context:e,prop:t,scope:n}){let r=BC(n,t(`getBoundaryEl`)?.(),!1);e.set(`stage`,`default`);let i=e.get(`size`),a=e.get(`prevSize`);a&&(i=rC(a,t(`minSize`),t(`maxSize`)),i=rC(i,t(`minSize`),r));let o=e.get(`position`),s=e.get(`prevPosition`);s&&(o=eC(s,i,r)),e.set(`size`,i),e.set(`position`,o),e.set(`prevSize`,null),e.set(`prevPosition`,null)},setPositionFromKeyboard({context:e,event:t,prop:n,scope:r}){Ke(t.step==null,`step is required`);let i=e.get(`position`),a=t.step,o=ue(t.direction,{left:{x:i.x-a,y:i.y},right:{x:i.x+a,y:i.y},up:{x:i.x,y:i.y-a},down:{x:i.x,y:i.y+a}}),s=BC(r,n(`getBoundaryEl`)?.(),!1);o=eC(o,e.get(`size`),s),e.set(`position`,o)},bringToFrontOfPanelStack({prop:e}){KC.bringToFront(e(`id`))},removeFromPanelStack({prop:e}){KC.remove(e(`id`))},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},invokeOnDragEnd({context:e,prop:t}){t(`onPositionChangeEnd`)?.({position:e.get(`position`)})},invokeOnResizeEnd({context:e,prop:t}){t(`onSizeChangeEnd`)?.({size:e.get(`size`)})},setFinalFocus({scope:e,prop:t}){t(`restoreFocus`)!==!1&&H(()=>{(t(`finalFocusEl`)?.()??PC(e))?.focus({preventScroll:!0})})},setInitialFocus({scope:e,prop:t}){H(()=>{let n=t(`initialFocusEl`)?.();n!==!1&&(n??IC(e))?.focus({preventScroll:!0})})},toggleVisibility({send:e,prop:t,event:n}){e({type:t(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})}}}}),QC=(e={})=>{let{getRootNode:t}=ro(),{dir:n}=ao();return WC(Oa(ZC,{id:(0,s.useId)(),dir:n,getRootNode:t,...e}),Na)},$C=K(),ew=e=>{let[t,n]=to(e),[r,i]=$C(n,`allowOverflow.closeOnEscape.defaultOpen.defaultPosition.defaultSize.dir.disabled.draggable.getAnchorPosition.getBoundaryEl.gridSize.finalFocusEl.id.ids.initialFocusEl.lockAspectRatio.maxSize.minSize.onOpenChange.onPositionChange.onPositionChangeEnd.onSizeChange.onSizeChangeEnd.onStageChange.open.persistRect.position.resizable.restoreFocus.size.strategy.translations`.split(`.`)),a=QC(r),o=eo(z({present:a.open},t));return(0,G.jsx)(FS,{value:a,children:(0,G.jsx)(Va,{value:o,children:i.children})})},tw=K(),nw=e=>{let[t,n]=to(e),[{value:r},i]=tw(n,[`value`]),a=eo(z({present:r.open},t));return(0,G.jsx)(FS,{value:r,children:(0,G.jsx)(Va,{value:a,children:i.children})})},rw=(0,s.forwardRef)((e,t)=>{let n=z(IS().getTitleProps(),e);return(0,G.jsx)(U.h2,{...n,ref:t})});rw.displayName=`FloatingPanelTitle`;var iw=(0,s.forwardRef)((e,t)=>{let n=z(IS().getControlProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});iw.displayName=`FloatingPanelControl`;function aw(){let e=new Map;return{update(t,n={}){let r=[];t.forEach((e,t)=>{let i=Qd(n,e.options),a={...Zd,...i,target:`target`in i?i.target??null:typeof document>`u`?null:document,platform:i.platform??ad()};if(!a.target||!e.hotkey||Sd(e.hotkey)&&e.hotkey.length===0)return;let o=Od(e.hotkey,a.platform);if(!(Array.isArray(o)?o:[o]).every(ef))return;let s=kd(o,a.platform);Sd(s)?delete a.requireReset:delete a.timeout,r.push({key:`${t}:${Sd(s)?s.join(` `):s}`,callback:e.callback,options:a,register:()=>vp().register(s,e.callback,a)})});let i=new Set(r.map(e=>e.key));for(let[t,n]of e)i.has(t)||(n.handle.unregister(),e.delete(t));for(let t of r){let n=e.get(t.key),{target:r,platform:i}=t.options;if(n?.handle.isActive&&n.target===r&&n.platform===i){n.handle.callback=t.callback;let e=Object.fromEntries(Object.keys(n.options).map(e=>[e,void 0]));n.handle.setOptions({...e,...t.options}),n.options=t.options}else n?.handle.unregister(),e.set(t.key,{handle:t.register(),target:r,platform:i,options:t.options})}},destroy(){for(let{handle:t}of e.values())t.unregister();e.clear()}}}function ow(e,t={}){return e.map(e=>{let n=e.hotkey,r={};if(Tp(n)){let e=Rp(n,t.appHotkeysStore);r=zp(e),n=e.hotkey??[]}let{target:i,...a}=Qd(t.defaults,r,t.commonOptions,e.options),o=i===void 0?void 0:t.resolveTarget?t.resolveTarget(i):i;return{hotkey:n,callback:e.callback,options:o===void 0?a:{...a,target:o}}})}function sw(e,t,n){let r={platform:e?.platform},i={platform:t?.platform};return{...Qd(r,i),hotkey:{...Qd(r,e?.hotkey,i,t?.hotkey),...n&&{scope:n}},hotkeyRecorder:Qd(r,e?.hotkeyRecorder,i,t?.hotkeyRecorder)}}function cw(){return`linux`}function lw(e){let{scope:t,exclusive:n,active:r,parent:i}=e;return!t||!r?null:JSON.stringify([t,typeof n==`object`?n.allow:!!n,i??null])}function uw(e){let[t,n,r]=JSON.parse(e);return vp().activateScope(t,{exclusive:Array.isArray(n)?{allow:n}:n,parent:r??void 0})}var dw=(0,s.createContext)(null),fw={},pw={appHotkeysStore:null,defaultOptions:fw,enabled:!0};function mw({children:e,appHotkeys:t,customHotkeys:n,onCustomHotkeysChange:r,defaultOptions:i=fw,scope:a,exclusive:o=!1,enabled:c=!0}){let l=(0,s.useContext)(dw)??pw,[u]=(0,s.useState)(()=>t?Cp(t,{customHotkeys:n,onCustomHotkeysChange:r}):null),d=l.enabled&&c,f=lw({scope:a,exclusive:o,active:d,parent:l.defaultOptions.hotkey?.scope});(0,s.useEffect)(()=>f?uw(f):void 0,[f]),(0,s.useEffect)(()=>{u?.setOptions({customHotkeys:n,onCustomHotkeysChange:r})},[u,n,r]),(0,s.useEffect)(()=>{t&&u?.setAppHotkeys(t)},[u,t]),(0,s.useEffect)(()=>{if(u)return Bp(u)},[u]);let p=(0,s.useMemo)(()=>({appHotkeysStore:u??l.appHotkeysStore,defaultOptions:sw(l.defaultOptions,i,a),enabled:d}),[u,l,i,a,d]);return s.createElement(dw.Provider,{value:p},e)}function hw(){return(0,s.useContext)(dw)}function gw(){return(0,s.useContext)(dw)?.defaultOptions??fw}function _w(e,t){let n=(0,s.useCallback)(t=>e.subscribe(t).unsubscribe,[e]),r=(0,s.useRef)(null),i=()=>{let n=e.get(),i=r.current;return i&&i.selector===t&&Object.is(i.state,n)?i.selected:(r.current={state:n,selector:t,selected:t(n)},r.current.selected)};return(0,s.useSyncExternalStore)(n,i,i)}var vw=Wf(null);function yw(){let e=hw()?.appHotkeysStore??null;return _w(e?.store??vw,e=>e),e}function bw(e){return typeof e==`object`&&!!e&&`current`in e}function xw(e){return bw(e)?e.current:e}function Sw(e,t={}){let n=hw()?.defaultOptions.hotkey,r=yw(),i=(0,s.useRef)({hotkeys:e,commonOptions:t,defaults:n,appHotkeysStore:r});i.current={hotkeys:e,commonOptions:t,defaults:n,appHotkeysStore:r};let a=(0,s.useRef)(null);(0,s.useEffect)(()=>{a.current??=aw();let{hotkeys:e,...t}=i.current;a.current.update(ow(e,{...t,resolveTarget:xw}))}),(0,s.useEffect)(()=>()=>{a.current?.destroy(),a.current=null},[])}function Cw(e,t,n){Sw([{hotkey:e,callback:t,options:n}])}function ww(e){let t=$d(gw().hotkeyRecorder,e),n=(0,s.useRef)(null);n.current||=new Yp(t),n.current.setOptions(t);let r=n.current,i=_w(r.store,e=>e.isRecording),a=_w(r.store,e=>e.steps),o=_w(r.store,e=>e.recordedHotkey);(0,s.useEffect)(()=>()=>{n.current?.destroy()},[]);let[c]=(0,s.useState)(()=>({startRecording:()=>n.current?.start(),stopRecording:()=>n.current?.stop(),cancelRecording:()=>n.current?.cancel(),commitRecording:()=>n.current?.commit()}));return{isRecording:i,steps:a,recordedHotkey:o,...c}}function Tw(){return _w(vp().registrations,e=>Array.from(e.values()).map(op))}function Ew(){return _w(vp().scopes,e=>e)}function Dw(e,t={}){let n=yw(),r=Tp(e)?Rp(e,n).hotkey:e,i=vp(),a=_w(i.registrations,()=>r!==null&&i.hasActiveRegistration(e)),o=_w(Wp().store,e=>r!==null&&df(r,e.heldKeys,t));return a&&o}var Ow=()=>()=>{};function kw(){let e=gw().platform;return(0,s.useSyncExternalStore)(Ow,()=>e??ad(),()=>e??cw())}function Aw(){let e=kw();return(0,s.useCallback)((t,n)=>Fd(t,{...n,platform:n?.platform??e}),[e])}function jw(e){let t=yw();if(!t)throw Error(`${e} requires a HotkeysProvider with an appHotkeys prop`);return t}function Mw(){return jw(`useAppHotkeys`).appHotkeys}function Nw(){let e=jw(`useAppHotkeyList`),t=Tw();return e.getList(t)}function Pw(){let e=jw(`useCustomHotkeys`);return{customHotkeys:e.customHotkeys,setCustomHotkey:(t,n)=>e.setCustomHotkey(t,n),resetCustomHotkey:t=>e.resetCustomHotkey(t),resetCustomHotkeys:()=>e.resetCustomHotkeys(),findConflicts:(t,n)=>e.findConflicts(t,n)}}function Fw(){return _w(Wp().store,e=>e.heldKeys)}function Iw(){return _w(Wp().store,e=>e.heldCodes)}function Lw(e){let t=Wp(),n=e.toLowerCase();return _w(t.store,e=>e.heldKeys.some(e=>e.toLowerCase()===n))}var Rw=r({ALL_KEYS:()=>Ju,AppHotkeysStore:()=>Lp,DEFAULT_SEQUENCE_TIMEOUT:()=>lf,EDITING_KEYS:()=>Wu,FUNCTION_KEYS:()=>Hu,HotkeyManager:()=>_p,HotkeyRecorder:()=>Yp,HotkeysProvider:()=>mw,KEY_DISPLAY_SYMBOLS:()=>nd,KeyStateTracker:()=>Up,LETTER_KEYS:()=>Bu,LINUX_MODIFIER_LABELS:()=>ed,MAC_MODIFIER_LABELS:()=>Qu,MAC_MODIFIER_SYMBOLS:()=>Zu,MODIFIER_ALIASES:()=>zu,MODIFIER_KEYS:()=>Ru,MODIFIER_ORDER:()=>Lu,NAVIGATION_KEYS:()=>Uu,NUMBER_KEYS:()=>Vu,PUNCTUATION_CODE_MAP:()=>Ku,PUNCTUATION_KEYS:()=>Gu,PUNCTUATION_KEY_DISPLAY_LABELS:()=>td,WINDOWS_MODIFIER_LABELS:()=>$u,areHotkeysEqual:()=>cf,assertValidHotkey:()=>Wd,checkHotkey:()=>Gd,createAppHotkeysStore:()=>Cp,createHotkeyChordHandler:()=>of,createMultiHotkeyChordHandler:()=>sf,createSequenceMatcher:()=>uf,defineAppHotkeys:()=>wp,detectPlatform:()=>ad,findHotkeyConflicts:()=>bp,formatForDisplay:()=>Fd,formatHotkey:()=>Nd,getAppHotkeyRegistrationOptions:()=>zp,getHotkeyManager:()=>vp,getKeyStateTracker:()=>Wp,hasNonModifierKey:()=>Md,isAppHotkey:()=>Tp,isCustomHotkey:()=>Dp,isHotkeySequence:()=>Sd,isModifierKey:()=>Ad,isSingleLetterKey:()=>Yu,matchesHeldModifiers:()=>df,matchesKeyboardEvent:()=>af,normalizeHotkey:()=>kd,normalizeKeyName:()=>Xu,parseHotkey:()=>Od,parseKeyboardEvent:()=>jd,provideAppHotkeys:()=>Vp,publishAppHotkeysStore:()=>Bp,resolveAppHotkey:()=>Rp,resolveModifier:()=>od,simplifyHotkey:()=>Cd,toHotkeyRegistrationView:()=>op,useAppHotkeyList:()=>Nw,useAppHotkeys:()=>Mw,useCustomHotkeys:()=>Pw,useDefaultHotkeysOptions:()=>gw,useFormatForDisplay:()=>Aw,useHeldKeyCodes:()=>Iw,useHeldKeys:()=>Fw,useHotkey:()=>Cw,useHotkeyHint:()=>Dw,useHotkeyRecorder:()=>ww,useHotkeyRegistrations:()=>Tw,useHotkeyScopesState:()=>Ew,useHotkeys:()=>Sw,useHotkeysContext:()=>hw,useKeyHold:()=>Lw,validateHotkey:()=>Hd}),[zw,Bw]=W({name:`ScrollAreaContext`,hookName:`useScrollAreaContext`,providerName:`<ScrollAreaProvider />`}),Vw=(0,s.forwardRef)((e,t)=>{let n=z(Bw().getContentProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Vw.displayName=`ScrollAreaContent`;var Hw=(0,s.forwardRef)((e,t)=>{let n=z(Bw().getCornerProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});Hw.displayName=`ScrollAreaCorner`;var Uw=oo(`scroll-area`).parts(`root`,`viewport`,`content`,`scrollbar`,`thumb`,`corner`).build(),Ww=e=>e.ids?.root??`scroll-area-${e.id}`,Gw=e=>e.ids?.viewport??`scroll-area-${e.id}:viewport`,Kw=e=>e.ids?.content??`scroll-area-${e.id}:content`,qw=e=>e.getById(Ww(e)),Jw=e=>e.getById(Gw(e)),Yw=e=>e.getById(Kw(e)),Xw=e=>ji(qw(e),`[data-part=scrollbar][data-orientation=horizontal]${Rt(Ww(e))}`),Zw=e=>ji(qw(e),`[data-part=scrollbar][data-orientation=vertical]${Rt(Ww(e))}`),Qw=e=>ji(Xw(e),`[data-part=thumb][data-orientation=horizontal]${Rt(Ww(e))}`),$w=e=>ji(Zw(e),`[data-part=thumb][data-orientation=vertical]${Rt(Ww(e))}`),eT=e=>ji(qw(e),`[data-part=corner]${Rt(Ww(e))}`);function tT(e,t){if(!e)return nT;let n=0,r=0,i=e.scrollWidth-e.clientWidth;i>t&&(n=Math.min(1,Math.max(0,e.scrollLeft/i)));let a=e.scrollHeight-e.clientHeight;return a>t&&(r=Math.min(1,Math.max(0,e.scrollTop/a))),{x:n,y:r}}var nT={x:0,y:0},rT=300,iT=e=>e*(2-e);function aT(e,t={}){let{top:n,left:r,duration:i=rT,easing:a=iT,onComplete:o}=t;if(!e)return;let s={startTime:0,startScrollTop:e.scrollTop,startScrollLeft:e.scrollLeft,targetScrollTop:n??e.scrollTop,targetScrollLeft:r??e.scrollLeft},c=!1,l=()=>{s.rafId&&=(cancelAnimationFrame(s.rafId),void 0),c=!0},u=t=>{if(c)return;s.startTime===0&&(s.startTime=t);let n=t-s.startTime,r=Math.min(n/i,1),l=a(r),d=s.targetScrollTop-s.startScrollTop,f=s.targetScrollLeft-s.startScrollLeft;e.scrollTop=s.startScrollTop+d*l,e.scrollLeft=s.startScrollLeft+f*l,r<1?s.rafId=requestAnimationFrame(u):o?.()};return s.rafId=requestAnimationFrame(u),l}function oT(e,t={}){if(!e)return;let{top:n,left:r,behavior:i=`smooth`,easing:a,duration:o}=t;if(i===`smooth`)aT(e,{top:n,left:r,easing:a,duration:o});else{let t=ke({behavior:i,top:n,left:r});e.scrollTo(t)}}function sT(e,t,n,r=`smooth`,i,a){if(!e)return;let o=e.scrollWidth-e.clientWidth,s=e.scrollHeight-e.clientHeight,c=n===`rtl`,l,u;switch(t){case`top`:l=0;break;case`bottom`:l=s;break;case`left`:u=c&&e.scrollLeft<=0?-o:0;break;case`right`:u=c&&e.scrollLeft<=0?0:o}if(r===`smooth`)aT(e,{top:l,left:u,easing:i,duration:a});else{let t=ke({left:u,top:l,behavior:r});e.scrollTo(t)}}function cT(e,t){let{state:n,send:r,context:i,prop:a,scope:o,refs:s}=e,c=n.matches(`dragging`)?s.get(`orientation`):null,l=i.get(`hovering`),u=i.get(`cornerSize`),d=i.get(`thumbSize`),f=i.get(`hiddenState`),p=i.get(`atSides`);return{isAtTop:p.top,isAtBottom:p.bottom,isAtLeft:p.left,isAtRight:p.right,hasOverflowX:!f.scrollbarXHidden,hasOverflowY:!f.scrollbarYHidden,getScrollProgress(){return tT(Jw(o),0)},scrollToEdge(e){let{edge:t,behavior:n}=e;return sT(Jw(o),t,a(`dir`),n)},scrollTo(e){return oT(Jw(o),e)},getScrollbarState(e){let{orientation:t=`vertical`}=e,n=t===`horizontal`;return{hovering:l,dragging:c===t,scrolling:i.get(n?`scrollingX`:`scrollingY`),hidden:n?f.scrollbarXHidden:f.scrollbarYHidden}},getRootProps(){return t.element({...Uw.root.attrs,id:Ww(o),dir:a(`dir`),role:`presentation`,"data-overflow-x":B(!f.scrollbarXHidden),"data-overflow-y":B(!f.scrollbarYHidden),onPointerEnter(e){let t=Zn(e);nn(e.currentTarget,t)&&r({type:`root.pointerenter`,pointerType:e.pointerType})},onPointerMove(e){let t=Zn(e);nn(e.currentTarget,t)&&r({type:`root.pointerenter`,pointerType:e.pointerType})},onPointerDown({pointerType:e}){r({type:`root.pointerdown`,pointerType:e})},onPointerLeave(e){nn(e.currentTarget,e.relatedTarget)||r({type:`root.pointerleave`})},style:{position:`relative`,"--corner-width":R(u?.width),"--corner-height":R(u?.height),"--thumb-width":R(d?.width),"--thumb-height":R(d?.height)}})},getViewportProps(){let e=()=>{r({type:`user.scroll`})};return t.element({...Uw.viewport.attrs,role:`presentation`,"data-ownedby":Ww(o),id:Gw(o),"data-at-top":B(p.top),"data-at-bottom":B(p.bottom),"data-at-left":B(p.left),"data-at-right":B(p.right),"data-overflow-x":B(!f.scrollbarXHidden),"data-overflow-y":B(!f.scrollbarYHidden),tabIndex:f.scrollbarXHidden||f.scrollbarYHidden?void 0:0,style:{overflow:`auto`},onScroll(e){r({type:`viewport.scroll`,target:e.currentTarget})},onWheel:e,onTouchMove:e,onPointerMove:e,onPointerEnter:e,onKeyDown:e})},getContentProps(){return t.element({...Uw.content.attrs,id:Kw(o),role:`presentation`,"data-overflow-x":B(!f.scrollbarXHidden),"data-overflow-y":B(!f.scrollbarYHidden),style:{minWidth:`fit-content`}})},getScrollbarProps(e={}){let{orientation:n=`vertical`}=e;return t.element({...Uw.scrollbar.attrs,"data-ownedby":Ww(o),"data-orientation":n,"data-scrolling":B(i.get(n===`horizontal`?`scrollingX`:`scrollingY`)),"data-hover":B(l),"data-dragging":B(c===n),"data-overflow-x":B(!f.scrollbarXHidden),"data-overflow-y":B(!f.scrollbarYHidden),onPointerUp(){r({type:`scrollbar.pointerup`,orientation:n})},onPointerDown(e){if(e.button!==0||e.currentTarget!==e.target)return;let t=hr(e);r({type:`scrollbar.pointerdown`,orientation:n,point:t}),e.stopPropagation()},style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,...n===`vertical`&&{top:0,bottom:`var(--corner-height)`,insetInlineEnd:0},...n===`horizontal`&&{insetInlineStart:0,insetInlineEnd:`var(--corner-width)`,bottom:0}}})},getThumbProps(e={}){let{orientation:n=`vertical`}=e;return t.element({...Uw.thumb.attrs,"data-ownedby":Ww(o),"data-orientation":n,"data-hover":B(l),"data-dragging":B(c===n),onPointerDown(e){if(e.button!==0)return;let t=hr(e);r({type:`thumb.pointerdown`,orientation:n,point:t})},style:{...n===`vertical`&&{height:`var(--thumb-height)`},...n===`horizontal`&&{width:`var(--thumb-width)`}}})},getCornerProps(){return t.element({...Uw.corner.attrs,"data-ownedby":Ww(o),"data-hover":B(l),"data-state":f.cornerHidden?`hidden`:`visible`,"data-overflow-x":B(!f.scrollbarXHidden),"data-overflow-y":B(!f.scrollbarYHidden),style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:`var(--corner-width)`,height:`var(--corner-height)`}})}}}function lT(e,t,n){if(!e)return 0;let r=fn(e),i=n===`x`?`Inline`:`Block`;return n===`x`&&t===`margin`?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${i}Start`])+parseFloat(r[`${t}${i}End`])}function uT(e,t){let n=e.scrollTop,r=e.scrollLeft,i=t===`rtl`,a=e.scrollHeight-e.clientHeight>1,o=e.scrollWidth-e.clientWidth>1,s=e.scrollWidth-e.clientWidth,c=e.scrollHeight-e.clientHeight,l=!1,u=!1,d=!1,f=!1;return o&&(i&&r<=0?(l=Math.abs(r)>=s-1,u=Math.abs(r)<=1):(l=r<=1,u=r>=s-1)),a&&(d=n<=1,f=n>=c-1),{top:d,right:u,bottom:f,left:l}}var dT=20,fT=1e3,pT=Tt({props({props:e}){return Je(e,[`id`]),e},context({bindable:e}){return{scrollingX:e(()=>({defaultValue:!1})),scrollingY:e(()=>({defaultValue:!1})),hovering:e(()=>({defaultValue:!1})),dragging:e(()=>({defaultValue:!1})),touchModality:e(()=>({defaultValue:!1})),atSides:e(()=>({defaultValue:{top:!0,right:!1,bottom:!1,left:!0}})),cornerSize:e(()=>({defaultValue:{width:0,height:0}})),thumbSize:e(()=>({defaultValue:{width:0,height:0}})),hiddenState:e(()=>({defaultValue:{scrollbarYHidden:!1,scrollbarXHidden:!1,cornerHidden:!1},hash(e){return`Y:${e.scrollbarYHidden} X:${e.scrollbarXHidden} C:${e.cornerHidden}`}}))}},refs(){return{orientation:`vertical`,scrollPosition:{x:0,y:0},scrollYTimeout:Hi.create(),scrollXTimeout:Hi.create(),scrollEndTimeout:Hi.create(),startX:0,startY:0,startScrollTop:0,startScrollLeft:0,programmaticScroll:!0}},initialState(){return`idle`},watch({track:e,prop:t,context:n,send:r}){e([()=>t(`dir`),()=>n.hash(`hiddenState`)],()=>{r({type:`thumb.measure`})})},effects:[`trackContentResize`,`trackViewportVisibility`,`trackWheelEvent`],entry:[`checkHovering`],exit:[`clearTimeouts`],on:{"thumb.measure":{actions:[`setThumbSize`]},"viewport.scroll":{actions:[`setThumbSize`,`setScrolling`,`setProgrammaticScroll`]},"root.pointerenter":{actions:[`setTouchModality`,`setHovering`]},"root.pointerdown":{actions:[`setTouchModality`]},"root.pointerleave":{actions:[`clearHovering`]}},states:{idle:{on:{"scrollbar.pointerdown":{target:`dragging`,actions:[`scrollToPointer`,`startDragging`]},"thumb.pointerdown":{target:`dragging`,actions:[`startDragging`]}}},dragging:{effects:[`trackPointerMove`],on:{"thumb.pointermove":{actions:[`setDraggingScroll`]},"scrollbar.pointerup":{target:`idle`,actions:[`stopDragging`]},"thumb.pointerup":{target:`idle`,actions:[`clearScrolling`,`stopDragging`]}}}},implementations:{actions:{setTouchModality({context:e,event:t}){e.set(`touchModality`,t.pointerType===`touch`)},setHovering({context:e}){e.set(`hovering`,!0)},clearHovering({context:e}){e.set(`hovering`,!1)},setProgrammaticScroll({refs:e}){e.get(`scrollEndTimeout`).start(100,()=>{e.set(`programmaticScroll`,!0)})},clearScrolling({context:e,event:t}){e.set(t.orientation===`vertical`?`scrollingY`:`scrollingX`,!1)},setThumbSize({context:e,scope:t,prop:n}){let r=Jw(t);if(!r)return;let i=r.scrollHeight,a=r.scrollWidth;if(i===0||a===0)return;let o=Zw(t),s=Xw(t),c=$w(t),l=Qw(t),u=r.clientHeight,d=r.clientWidth,f=r.scrollTop,p=r.scrollLeft,m=u>=i,h=d>=a,g=d/a,_=u/i,v=h?0:d,y=m?0:u,b=lT(s,`padding`,`x`),x=lT(o,`padding`,`y`),S=lT(l,`margin`,`x`),C=lT(c,`margin`,`y`),w=v-b-S,E=y-x-C,D=s?Math.min(s.offsetWidth,w):w,O=o?Math.min(o.offsetHeight,E):E,ee=Math.max(dT,D*g),te=Math.max(dT,O*_);if(e.set(`thumbSize`,e=>e.height===te&&e.width===ee?e:{width:ee,height:te}),o&&c){let e=o.offsetHeight-te-x-C,t=f/(i-u),n=Math.min(e,Math.max(0,t*e));c.style.transform=`translate3d(0,${n}px,0)`}if(s&&l){let e=s.offsetWidth-ee-b-S,t=p/(a-d),r=n(`dir`)===`rtl`?Ce(t*e,-e,0):Ce(t*e,0,e);l.style.transform=`translate3d(${r}px,0,0)`}if(eT(t)){if(h||m)e.set(`cornerSize`,{width:0,height:0});else if(!h&&!m){let t=o?.offsetWidth||0,n=s?.offsetHeight||0;e.set(`cornerSize`,{width:t,height:n})}}e.set(`hiddenState`,e=>{let t=m||h;return e.scrollbarYHidden===m&&e.scrollbarXHidden===h&&e.cornerHidden===t?e:{scrollbarYHidden:m,scrollbarXHidden:h,cornerHidden:t}}),e.set(`atSides`,e=>{let t=uT(r,n(`dir`));return T(e,t)?e:t});let k=Math.max(0,i-u),A=Math.max(0,a-d),j=0,M=0;h||(j=n(`dir`)===`rtl`?Ce(-p,0,A):Ce(p,0,A),M=A-j);let N=m?0:Ce(f,0,k),P=m?0:k-N;ra(r,`--scroll-area-overflow-x-start`,`${j}px`),ra(r,`--scroll-area-overflow-x-end`,`${M}px`),ra(r,`--scroll-area-overflow-y-start`,`${N}px`),ra(r,`--scroll-area-overflow-y-end`,`${P}px`)},checkHovering({scope:e,context:t}){Jw(e)?.matches(`:hover`)&&t.set(`hovering`,!0)},setScrolling({event:e,refs:t,context:n,prop:r}){let i={x:e.target.scrollLeft,y:e.target.scrollTop},a=t.get(`scrollPosition`),o=i.x-a.x,s=i.y-a.y;t.set(`scrollPosition`,i),n.set(`atSides`,t=>{let n=uT(e.target,r(`dir`));return T(t,n)?t:n}),s!==0&&(n.set(`scrollingY`,!0),t.get(`scrollYTimeout`).start(fT,()=>{n.set(`scrollingY`,!1)})),o!==0&&(n.set(`scrollingX`,!0),t.get(`scrollXTimeout`).start(fT,()=>{n.set(`scrollingX`,!1)}))},scrollToPointer({event:e,scope:t,prop:n}){let r=Jw(t);if(!r)return;let i=$w(t),a=Zw(t),o=Qw(t),s=Xw(t),c=e.point;if(i&&a&&e.orientation===`vertical`){let e=lT(i,`margin`,`y`),t=lT(a,`padding`,`y`),n=i.offsetHeight,o=a.getBoundingClientRect(),s=c.y-o.top-n/2-t+e/2,l=r.scrollHeight,u=r.clientHeight;r.scrollTop=s/(a.offsetHeight-n-t-e)*(l-u)}if(o&&s&&e.orientation===`horizontal`){let e=lT(o,`margin`,`x`),t=lT(s,`padding`,`x`),i=o.offsetWidth,a=s.getBoundingClientRect(),l=c.x-a.left-i/2-t+e/2,u=r.scrollWidth,d=r.clientWidth,f=l/(s.offsetWidth-i-t-e),p;n(`dir`)===`rtl`?(p=(1-f)*(u-d),r.scrollLeft<=0&&(p=-p)):p=f*(u-d),r.scrollLeft=p}},startDragging({event:e,refs:t,scope:n}){t.set(`startX`,e.point.x),t.set(`startY`,e.point.y),t.set(`orientation`,e.orientation);let r=Jw(n);r&&(t.set(`startScrollTop`,r.scrollTop),t.set(`startScrollLeft`,r.scrollLeft))},setDraggingScroll({event:e,refs:t,scope:n,context:r}){let i=t.get(`startY`),a=t.get(`startX`),o=t.get(`startScrollTop`),s=t.get(`startScrollLeft`),c=e.point,l=c.y-i,u=c.x-a,d=Jw(n);if(!d)return;let f=d.scrollHeight,p=d.clientHeight,m=d.scrollWidth,h=d.clientWidth,g=t.get(`orientation`),_=$w(n),v=Zw(n);if(_&&v&&g===`vertical`){let e=lT(v,`padding`,`y`),n=lT(_,`margin`,`y`),i=_.offsetHeight;d.scrollTop=o+l/(v.offsetHeight-i-e-n)*(f-p),r.set(`scrollingY`,!0),t.get(`scrollYTimeout`).start(fT,()=>{r.set(`scrollingY`,!1)})}let y=Qw(n),b=Xw(n);if(y&&b&&g===`horizontal`){let e=lT(b,`padding`,`x`),n=lT(y,`margin`,`x`),i=y.offsetWidth;d.scrollLeft=s+u/(b.offsetWidth-i-e-n)*(m-h),r.set(`scrollingX`,!0),t.get(`scrollXTimeout`).start(fT,()=>{r.set(`scrollingX`,!1)})}},stopDragging({refs:e}){e.set(`orientation`,null)},clearTimeouts({refs:e}){e.get(`scrollYTimeout`).clear(),e.get(`scrollXTimeout`).clear(),e.get(`scrollEndTimeout`).clear()}},effects:{trackContentResize({scope:e,send:t}){let n=Yw(e),r=qw(e);if(!n||!r)return;let i=e.getWin(),a=Hi.create(),o=new i.ResizeObserver(()=>{a.start(1,()=>{t({type:`thumb.measure`})})});return o.observe(n),o.observe(r),()=>{o.disconnect(),a.clear()}},trackViewportVisibility({scope:e,send:t}){let n=e.getWin(),r=Jw(e);if(!r)return;let i=new n.IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio>0&&(t({type:`thumb.measure`}),i.disconnect())})});return i.observe(r),()=>{i.disconnect()}},trackWheelEvent({scope:e}){let t=Zw(e),n=Xw(e);if(!t&&!n)return;let r=t=>{let n=Jw(e);if(!n||t.ctrlKey)return;let r=t.currentTarget.dataset.orientation;if(r===`vertical`){let e=n.scrollHeight>n.clientHeight,r=n.scrollTop===0&&t.deltaY<0,i=n.scrollTop===n.scrollHeight-n.clientHeight&&t.deltaY>0;if(!e||t.deltaY===0||r||i)return;t.preventDefault(),n.scrollTop+=t.deltaY}else if(r===`horizontal`){let e=n.scrollWidth>n.clientWidth,r=n.scrollLeft===0&&t.deltaX<0,i=n.scrollLeft===n.scrollWidth-n.clientWidth&&t.deltaX>0;if(!e||t.deltaX===0||r||i)return;t.preventDefault(),n.scrollLeft+=t.deltaX}};return I(t&&V(t,`wheel`,r,{passive:!1}),n&&V(n,`wheel`,r,{passive:!1}))},trackPointerMove({scope:e,send:t,refs:n}){let r=e.getDoc(),i=n.get(`orientation`);return wi(r,{onPointerMove({point:e}){t({type:`thumb.pointermove`,orientation:i,point:e})},onPointerUp(){t({type:`thumb.pointerup`,orientation:i})}})}}}}),mT=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro(),{dir:r}=ao();return cT(Oa(pT,{id:t,dir:r,getRootNode:n,...e}),Na)},hT=K(),gT=(0,s.forwardRef)((e,t)=>{let[n,r]=hT(e,[`id`,`ids`]),i=mT(n),a=z(i.getRootProps(),r);return(0,G.jsx)(zw,{value:i,children:(0,G.jsx)(U.div,{...a,ref:t})})});gT.displayName=`ScrollAreaRoot`;var[_T,vT]=W({name:`ScrollAreaScrollbarContext`,hookName:`useScrollAreaScrollbarContext`,providerName:`<ScrollAreaScrollbarProvider />`}),yT=K(),bT=(0,s.forwardRef)((e,t)=>{let[n,r]=yT(e,[`orientation`]),i=z(Bw().getScrollbarProps(n),r);return(0,G.jsx)(_T,{value:n,children:(0,G.jsx)(U.div,{...i,ref:t})})});bT.displayName=`ScrollAreaScrollbar`;var xT=(0,s.forwardRef)((e,t)=>{let n=Bw(),r=vT(),i=z(n.getThumbProps(r),e);return(0,G.jsx)(U.div,{...i,ref:t})});xT.displayName=`ScrollAreaThumb`;var ST=(0,s.forwardRef)((e,t)=>{let n=z(Bw().getViewportProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});ST.displayName=`ScrollAreaViewport`;var CT=oo(`splitter`).parts(`root`,`panel`,`resizeTrigger`,`resizeTriggerIndicator`).build(),wT=e=>e.ids?.root??`splitter:${e.id}`,TT=(e,t)=>e.ids?.resizeTrigger?.(t)??`splitter:${e.id}:splitter:${t}`,ET=(e,t)=>e.ids?.panel?.(t)??`splitter:${e.id}:panel:${t}`,DT=e=>`splitter:${e.id}:global-cursor`,OT=e=>e.getById(wT(e)),kT=(e,t)=>t==null?null:e.getById(TT(e,t)),AT=e=>Ut(e)&&e.dataset.part===`panel`?e.dataset.id:void 0,jT=e=>{let t=e?.previousElementSibling??null;for(;t;){let e=AT(t);if(e)return e;t=t.previousElementSibling}},MT=e=>{let t=e?.nextElementSibling??null;for(;t;){let e=AT(t);if(e)return e;t=t.nextElementSibling}},NT=(e,t)=>{let[n,r]=t.split(`:`);if(n&&r)return t;let i=kT(e,t),a=n||jT(i),o=r||MT(i);return a&&o?`${a}:${o}`:null},PT=(e,t)=>{let n=t?`col-resize`:`row-resize`;return e.isAtMin&&(n=t?`e-resize`:`s-resize`),e.isAtMax&&(n=t?`w-resize`:`n-resize`),n},FT=e=>Ai(OT(e),`[role=separator]${Rt(wT(e))}`),IT=e=>e.getDoc().getElementById(DT(e)),LT=(e,t,n,r)=>{let i=IT(e),a=`* { cursor: ${PT(t,n)} !important; }`;if(i)i.textContent!==a&&(i.textContent=a);else{let t=e.getDoc().createElement(`style`);r&&(t.nonce=r),t.id=DT(e),t.textContent=a,e.getDoc().head.appendChild(t)}},RT=e=>{IT(e)?.remove()};function zT({size:e,panels:t,pivotIndices:n}){let r=0,i=100,a=0,o=0,s=n[0];return qe(s,()=>`No pivot index found`),t.forEach((e,t)=>{let{maxSize:n=100,minSize:c=0}=e;t===s?(r=c,i=n):(a+=c,o+=n)}),{valueMax:Math.min(i,100-a),valueMin:Math.max(r,100-o),valueNow:e[s]}}function BT(e,t,n){let[r,i]=n.split(`:`),a=t.findIndex(e=>e.id===r),o=t.findIndex(e=>e.id===i);if(a===-1||o===-1)return{beforeId:r||void 0,afterId:i||void 0,valueMax:void 0,valueMin:void 0,valueNow:void 0};let{valueMax:s,valueMin:c,valueNow:l}=zT({size:e,panels:t,pivotIndices:[a,o]});return{beforeId:r,afterId:i,valueMax:Math.round(s),valueMin:Math.round(c),valueNow:l==null?void 0:Math.round(l)}}function VT(e,t,n=10){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function HT(e,t,n=10){return e==null||t==null?!1:VT(e,t,n)===0}function UT(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!HT(e[r],t[r],n))return!1;return!0}var WT=/^(-?\d*\.?\d+)(%|px|em|rem|vw|vh)?$/,GT=/^(-?\d*\.?\d+)%$/;function KT(e,t){if(!e)return 0;let n=e.getBoundingClientRect();return t===`horizontal`?n.width:n.height}function qT(e,t){return KT(e,t)}function JT(e,t,n){let r=n.ownerDocument.defaultView;if(r)switch(t){case`px`:return e;case`em`:return e*Number.parseFloat(r.getComputedStyle(n).fontSize);case`rem`:return e*Number.parseFloat(r.getComputedStyle(n.ownerDocument.documentElement).fontSize);case`vw`:return e/100*r.innerWidth;case`vh`:return e/100*r.innerHeight;default:return}}function YT(e,t,n){if(e==null)return;if(typeof e==`number`)return e;let r=e.trim().match(WT);if(!r)return;let i=Number.parseFloat(r[1]);if(!Number.isFinite(i))return;let a=r[2];if(a==null||a===`%`)return i;if(!t)return;let o=KT(t,n);if(o===0)return;let s=JT(i,a,t);return s==null?void 0:s/o*100}function XT(e){if(e==null)return;if(typeof e==`number`)return`${e}%`;let t=e.trim();if(GT.test(t))return t;let n=t.match(WT);if(!n)return;let r=Number.parseFloat(n[1]);if(!Number.isFinite(r))return;let i=n[2];return i==null?`${r}%`:`${r}${i}`}function ZT({sizes:e,panels:t,rootEl:n,orientation:r}){let i=Array(t.length),a=100,o=0;for(let s=0;s<t.length;s++){let t=YT(e?.[s],n,r);t!=null&&(o++,i[s]=t,a-=t)}for(let e=0;e<t.length;e++){if(i[e]!=null)continue;let n=t.length-o,r=n>0?a/n:0;o++,i[e]=r,a-=r}return i}function QT(e,t,n){return e.map(e=>({...e,minSize:YT(e.minSize,t,n),maxSize:YT(e.maxSize,t,n),collapsedSize:YT(e.collapsedSize,t,n)}))}function $T(e,t){let n=e.find(e=>e.id===t);return qe(n,()=>`Panel data not found for id "${t}"`),n}function eE(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function tE(e,t){return e.findIndex(e=>e.id===t)}function nE(e,t,n){let r=tE(e,t.id),i=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t,panelSize:a,pivotIndices:i}}function rE(e){return e.sort((e,t)=>{let n=e.order,r=t.order;return n==null&&r==null?0:n==null?-1:r==null?1:n-r})}function iE(e){return e.map(e=>e.id).sort().join(`:`)}function aE(e){return e.map(e=>e.id).sort().map(t=>{let n=e.find(e=>e.id===t);return JSON.stringify(n)}).join(`,`)}function oE({size:e,defaultSize:t,dragState:n,resolvedSizes:r,panels:i,panelIndex:a,horizontal:o,collapsed:s=!1,precision:c=3}){let l=r[a],u=e??t,d=i[a],f,p,m=1,h=o?`Width`:`Height`,g=d?XT(d.minSize):void 0,_=d?XT(d.maxSize):void 0,v=s?XT(d?.collapsedSize??0):g,y=XT(u);return l==null?y==null?f=`1`:y.endsWith(`%`)?f=Number.parseFloat(y).toPrecision(c):(p=sE({basis:y,minSize:g,maxSize:_}),f=`0`,m=0):f=i.length===1?`1`:l.toPrecision(c),{flexBasis:p??0,flexGrow:f,flexShrink:m,...v?{[`min${h}`]:v}:{},..._?{[`max${h}`]:_}:{},overflow:`hidden`,pointerEvents:n===null?void 0:`none`}}function sE({basis:e,minSize:t,maxSize:n}){return`clamp(${t??`0%`}, ${e}, ${n??`100%`})`}function cE(e,t){let{state:n,send:r,prop:i,computed:a,context:o,scope:s}=e,c=a(`horizontal`),l=n.matches(`dragging`),u=i(`registry`),d=i(`orientation`),f=i(`panels`),p=o.get(`panels`),m=()=>{let e=o.get(`size`);return e.length>0?e:ZT({sizes:i(`size`)??i(`defaultSize`),panels:f,rootEl:null,orientation:d})},h=e=>{let t=f.findIndex(t=>t.id===e),n=i(`size`)?.[t],r=i(`defaultSize`)?.[t],a=o.get(`dragState`),s=o.get(`size`),l=p[t],u=s[t],d=!!l?.collapsible&&u!=null&&HT(u,l.collapsedSize??0);return oE({size:n,defaultSize:r,dragState:a,resolvedSizes:s,panels:f,panelIndex:t,horizontal:c,collapsed:d})},g=e=>{let[t,n]=e.split(`:`);if(t&&n)return e;if(t){let n=f.findIndex(e=>e.id===t),r=f[n+1];return r?`${t}:${r.id}`:e}if(n){let t=f.findIndex(e=>e.id===n),r=f[t-1];return r?`${r.id}:${n}`:e}return e},_=e=>{let{id:t,disabled:r}=e,i=o.get(`dragState`)?.resizeTriggerId===t;return{dragging:i,focused:i||n.matches(`focused`)&&o.get(`keyboardState`)?.resizeTriggerId===t,disabled:!!r}};return{dragging:l,orientation:d,getPanels(){return f},getPanelById(e){return $T(f,e)},getItems(){return f.flatMap((e,t,n)=>{let r=n[t+1];return e&&r?[{type:`panel`,id:e.id},{type:`handle`,id:`${e.id}:${r.id}`}]:[{type:`panel`,id:e.id}]})},getSizes(){return m()},setSizes(e){r({type:`SIZE.SET`,size:e})},resetSizes(){r({type:`SIZE.RESET`})},collapsePanel(e){r({type:`PANEL.COLLAPSE`,id:e})},expandPanel(e,t){r({type:`PANEL.EXPAND`,id:e,minSize:t})},resizePanel(e,t){r({type:`PANEL.RESIZE`,id:e,size:t})},getPanelSize(e){let t=o.get(`panels`),n=m(),r=$T(t,e),{panelSize:i}=nE(t,r,n);return qe(i!=null,()=>`Panel size not found for panel "${r.id}"`),i},isPanelCollapsed(e){let t=o.get(`panels`),n=m(),r=$T(t,e),{collapsedSize:i=0,collapsible:a,panelSize:s}=nE(t,r,n);return qe(s!=null,()=>`Panel size not found for panel "${r.id}"`),a===!0&&HT(s,i)},isPanelExpanded(e){let t=o.get(`panels`),n=m(),r=$T(t,e),{collapsedSize:i=0,collapsible:a,panelSize:s}=nE(t,r,n);return qe(s!=null,()=>`Panel size not found for panel "${r.id}"`),!a||VT(s,i)>0},getLayout(){return iE(i(`panels`))},getRootProps(){return t.element({...CT.root.attrs,"data-orientation":d,"data-dragging":B(l),id:wT(s),dir:i(`dir`),style:{display:`flex`,flexDirection:c?`row`:`column`,height:`100%`,width:`100%`,overflow:`hidden`}})},getPanelProps(e){let{id:n}=e;return t.element({...CT.panel.attrs,"data-orientation":d,"data-dragging":B(l),dir:i(`dir`),"data-id":n,"data-index":tE(i(`panels`),n),id:ET(s,n),"data-ownedby":wT(s),style:h(n)})},getResizeTriggerState:_,getResizeTriggerIndicator(e){let n=_(e);return t.element({...CT.resizeTriggerIndicator.attrs,"data-orientation":d,"data-focus":B(n.focused),"data-dragging":B(n.dragging),"data-disabled":B(n.disabled),"data-ownedby":wT(s)})},getResizeTriggerProps(e){let{id:n}=e,a=_(e),o=g(n),l=BT(m(),p,o);return t.element({...CT.resizeTrigger.attrs,dir:i(`dir`),id:TT(s,n),role:`separator`,"data-id":n,"data-ownedby":wT(s),tabIndex:a.disabled?void 0:0,"aria-valuenow":l.valueNow,"aria-valuemin":l.valueMin,"aria-valuemax":l.valueMax,"data-orientation":d,"aria-orientation":c?`vertical`:`horizontal`,"aria-controls":l.beforeId&&l.afterId?`${ET(s,l.beforeId)} ${ET(s,l.afterId)}`:void 0,"data-focus":B(a.focused),"data-dragging":B(a.dragging),"data-disabled":B(a.disabled),style:{touchAction:`none`,userSelect:`none`,WebkitUserSelect:`none`,flex:`0 0 auto`,pointerEvents:a.disabled||a.dragging&&!a.focused?`none`:void 0,cursor:a.disabled||u?void 0:c?`col-resize`:`row-resize`,[c?`minHeight`:`minWidth`]:`0`},onPointerDown(e){if(!rr(e))return;if(a.disabled){e.preventDefault();return}if(e.currentTarget.focus({preventScroll:!0,focusVisible:!1}),u)return;let t=hr(e);r({type:`POINTER_DOWN`,id:n,point:t}),e.currentTarget.setPointerCapture(e.pointerId),e.preventDefault(),e.stopPropagation()},onPointerUp(e){a.disabled||e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},onPointerOver(){a.disabled||u||r({type:`POINTER_OVER`,id:n})},onPointerLeave(){a.disabled||u||r({type:`POINTER_LEAVE`,id:n})},onBlur(){a.disabled||r({type:`BLUR`})},onFocus(){a.disabled||r({type:`FOCUS`,id:n})},onKeyDown(e){if(e.defaultPrevented||a.disabled)return;let t=i(`keyboardResizeBy`),o=0;o=e.shiftKey?10:t??1;let s={Enter(){r({type:`ENTER`,id:n})},ArrowUp(){r({type:`KEYBOARD_MOVE`,id:n,delta:c?0:-o})},ArrowDown(){r({type:`KEYBOARD_MOVE`,id:n,delta:c?0:o})},ArrowLeft(){r({type:`KEYBOARD_MOVE`,id:n,delta:c?-o:0})},ArrowRight(){r({type:`KEYBOARD_MOVE`,id:n,delta:c?o:0})},Home(){r({type:`KEYBOARD_MOVE`,id:n,delta:-100})},End(){r({type:`KEYBOARD_MOVE`,id:n,delta:100})},F6(){r({type:`FOCUS.CYCLE`,id:n,shiftKey:e.shiftKey})}}[lr(e,{dir:i(`dir`),orientation:d})];s&&(s(e),e.preventDefault())}})}}}function lE({panels:e,prevLayout:t,prevGroupSize:n,nextGroupSize:r}){if(n<=0||r<=0)return t;let i=[...t],a=[],o=0,s=0;if(e.forEach((e,c)=>{if(e.resizeBehavior===`preserve-pixel-size`){let e=t[c]/100*n/r*100;i[c]=e,o+=e}else a.push(c),s+=t[c]}),a.length===0){let e=i.reduce((e,t)=>e+t,0);if(HT(e,100))return i;if(e<=0)return t;let n=100/e;return i.map(e=>e*n)}let c=100-o;if(c<=0){let e=i.reduce((e,t)=>e+t,0);if(HT(e,100))return i;let t=100/Math.max(e,1);return i.map(e=>e*t)}if(HT(s,0)){let e=c/a.length;return a.forEach(t=>{i[t]=e}),i}a.forEach(e=>{i[e]=t[e]/s*c});let l=i.reduce((e,t)=>e+t,0);if(HT(l,100))return i;let u=100/l;return i.map(e=>e*u)}function uE({panels:e,index:t,size:n}){let r=e[t];qe(r,()=>`Panel data not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,maxSize:o=100,minSize:s=0}=r;if(VT(n,s)<0){if(a){let e=(i+s)/2;n=VT(n,e)<0?i:s}else n=s}return n=Math.min(o,n),n=parseFloat(n.toFixed(10)),n}function dE(e){let{delta:t,initialSize:n,panels:r,pivotIndices:i,prevSize:a,trigger:o}=e;if(HT(t,0))return n;let s=[...n],[c,l]=i;qe(c,()=>`Invalid first pivot index`),qe(l,()=>`Invalid second pivot index`);let u=0;if(o===`keyboard`){{let e=t<0?l:c,i=r[e];qe(i,()=>`Panel data not found for index ${e}`);let{collapsedSize:a=0,collapsible:o,minSize:s=0}=i;if(o){let r=n[e];if(qe(r,()=>`Previous size not found for panel index ${e}`),HT(r,a)){let e=s-r;VT(e,Math.abs(t))>0&&(t=t<0?0-e:e)}}}{let e=t<0?c:l,i=r[e];qe(i,()=>`No panel data found for index ${e}`);let{collapsedSize:a=0,collapsible:o,minSize:s=0}=i;if(o){let r=n[e];if(qe(r,()=>`Previous size not found for panel index ${e}`),HT(r,s)){let e=r-a;VT(e,Math.abs(t))>0&&(t=t<0?0-e:e)}}}}{let e=t<0?1:-1,i=t<0?l:c,a=0;for(;;){let t=n[i];qe(t,()=>`Previous size not found for panel index ${i}`);let o=uE({panels:r,index:i,size:100})-t;if(a+=o,i+=e,i<0||i>=r.length)break}let o=Math.min(Math.abs(t),Math.abs(a));t=t<0?0-o:o}{let e=t<0?c:l;for(;e>=0&&e<r.length;){let i=Math.abs(t)-Math.abs(u),a=n[e];qe(a,()=>`Previous size not found for panel index ${e}`);let o=a-i,c=uE({panels:r,index:e,size:o});if(!HT(a,c)&&(u+=a-c,s[e]=c,u.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?e--:e++}}if(UT(a,s))return a;{let e=t<0?l:c,i=n[e];qe(i,()=>`Previous size not found for panel index ${e}`);let a=i+u,o=uE({panels:r,index:e,size:a});if(s[e]=o,!HT(o,a)){let e=a-o,n=t<0?l:c;for(;n>=0&&n<r.length;){let i=s[n];qe(i,()=>`Previous size not found for panel index ${n}`);let a=i+e,o=uE({panels:r,index:n,size:a});if(HT(i,o)||(e-=o-i,s[n]=o),HT(e,0))break;t>0?n--:n++}}}return HT(s.reduce((e,t)=>t+e,0),100)?s:a}function fE({size:e,panels:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel size: ${n.map(e=>`${e}%`).join(`, `)}`);if(!HT(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];qe(t,()=>`No size data found for index ${e}`);let i=100/r*t;n[e]=i}let i=0;for(let e=0;e<t.length;e++){let r=n[e];qe(r,()=>`No size data found for index ${e}`);let a=uE({panels:t,index:e,size:r});r!=a&&(i+=r-a,n[e]=a)}if(!HT(i,0))for(let e=0;e<t.length;e++){let r=n[e];qe(r,()=>`No size data found for index ${e}`);let a=r+i,o=uE({panels:t,index:e,size:a});if(r!==o&&(i-=o-r,n[e]=o,HT(i,0)))break}return n}var pE=Tt({props({props:e}){return Je(e,[`panels`]),{orientation:`horizontal`,defaultSize:[],dir:`ltr`,...e,panels:rE(e.panels)}},initialState(){return`idle`},context({prop:e,bindable:t,getContext:n,getRefs:r}){return{panels:t(()=>({defaultValue:QT(e(`panels`),null,e(`orientation`))})),size:t(()=>({defaultValue:[],isEqual(e,t){return t!=null&&UT(e,t)},onChange(t){let i=n(),a=r();if(a.get(`suppressOnResize`))return;let o=a.get(`panelSizeBeforeCollapse`),s=Object.fromEntries(o.entries()),c=i.get(`dragState`)?.resizeTriggerId??null,l=iE(e(`panels`));e(`onResize`)?.({size:t,layout:l,resizeTriggerId:c,expandToSizes:s})}})),dragState:t(()=>({defaultValue:null})),keyboardState:t(()=>({defaultValue:null}))}},watch({track:e,action:t,prop:n}){e([()=>aE(n(`panels`)),()=>JSON.stringify(n(`size`)??[]),()=>JSON.stringify(n(`defaultSize`)??[])],()=>{t([`syncSize`])})},refs(){return{panelSizeBeforeCollapse:new Map,prevDelta:0,panelIdToLastNotifiedSizeMap:new Map,initialSize:null,prevInitialLayout:null,prevGroupSize:null,prevPropsKey:null,lastRequestedSize:null,suppressOnResize:!1}},computed:{horizontal({prop:e}){return e(`orientation`)===`horizontal`}},on:{"SIZE.SET":{actions:[`setSize`]},"SIZE.RESET":{actions:[`resetSize`]},"PANEL.COLLAPSE":{actions:[`collapsePanel`]},"PANEL.EXPAND":{actions:[`expandPanel`]},"PANEL.RESIZE":{actions:[`resizePanel`]},"ROOT.RESIZE":{actions:[`syncSize`]}},entry:[`syncSize`],exit:[`clearGlobalCursor`],effects:[`trackResizeHandles`,`trackRootResize`],states:{idle:{entry:[`clearDraggingState`,`clearKeyboardState`],on:{POINTER_OVER:{target:`hover:temp`,actions:[`setKeyboardState`]},FOCUS:{target:`focused`,actions:[`setKeyboardState`]},POINTER_DOWN:{target:`dragging`,actions:[`setDraggingState`]}}},"hover:temp":{effects:[`waitForHoverDelay`],on:{HOVER_DELAY:{target:`hover`},FOCUS:{target:`focused`,actions:[`setKeyboardState`]},POINTER_DOWN:{target:`dragging`,actions:[`setDraggingState`]},POINTER_LEAVE:{target:`idle`}}},hover:{tags:[`focus`],on:{FOCUS:{target:`focused`,actions:[`setKeyboardState`]},POINTER_DOWN:{target:`dragging`,actions:[`setDraggingState`]},POINTER_LEAVE:{target:`idle`}}},focused:{tags:[`focus`],on:{BLUR:{target:`idle`},ENTER:{actions:[`collapseOrExpandPanel`]},POINTER_DOWN:{target:`dragging`,actions:[`setDraggingState`]},KEYBOARD_MOVE:{actions:[`invokeOnResizeStart`,`setKeyboardValue`,`invokeOnResizeEnd`]},"FOCUS.CYCLE":{actions:[`focusNextResizeTrigger`]}}},dragging:{tags:[`focus`],effects:[`trackPointerMove`],entry:[`invokeOnResizeStart`],on:{POINTER_MOVE:{actions:[`setPointerValue`,`setGlobalCursor`]},POINTER_UP:[{guard:`isResizeTriggerFocused`,target:`focused`,actions:[`invokeOnResizeEnd`,`setKeyboardState`,`clearDraggingState`,`clearGlobalCursor`]},{target:`idle`,actions:[`invokeOnResizeEnd`,`clearGlobalCursor`]}]}}},implementations:{guards:{isResizeTriggerFocused({context:e,scope:t}){let n=e.get(`dragState`);return t.isActiveElement(kT(t,n?.resizeTriggerId))}},effects:{trackResizeHandles:({prop:e,scope:t,send:n})=>{let r=e(`registry`);if(!r)return;let i=[],a=()=>{i.forEach(e=>e()),i=FT(t).map(i=>{let a=i.dataset.id;if(a)return r.register({id:TT(t,a),element:i,orientation:e(`orientation`),onActivate(e){n({type:`POINTER_DOWN`,id:a,point:e})},onDeactivate(){n({type:`POINTER_UP`})}})}).filter(Boolean)};a();let o=si(OT(t),{callback:a});return()=>{i.forEach(e=>e()),o?.()}},trackRootResize:({scope:e,send:t})=>{let n=OT(e);if(n)return Bi.observe(n,()=>{t({type:`ROOT.RESIZE`})})},waitForHoverDelay:({send:e})=>We(()=>{e({type:`HOVER_DELAY`})},250),trackPointerMove:({scope:e,send:t})=>wi(e.getDoc(),{onPointerMove(e){t({type:`POINTER_MOVE`,point:e.point})},onPointerUp(){t({type:`POINTER_UP`})}})},actions:{setSize(e){let{context:t,event:n,prop:r,scope:i}=e,a=n.size,o=t.get(`size`),s=t.get(`panels`),c=fE({size:ZT({sizes:a,panels:r(`panels`),rootEl:OT(i),orientation:r(`orientation`)}),panels:s});T(o,c)||mE(e,c)},resetSize(e){let{refs:t,context:n,prop:r,scope:i}=e;mE(e,t.get(`initialSize`)??fE({size:ZT({sizes:r(`size`)??r(`defaultSize`),panels:r(`panels`),rootEl:OT(i),orientation:r(`orientation`)}),panels:n.get(`panels`)}))},syncSize(e){let{context:t,scope:n,prop:r,refs:i}=e,a=OT(n);if(!a)return;let o=r(`orientation`),s=qT(a,o);if(s<=0)return;let c=QT(r(`panels`),a,r(`orientation`));t.set(`panels`,c);let l=r(`size`)??r(`defaultSize`),u=`${iE(r(`panels`))}:${JSON.stringify(r(`size`)??[])}:${JSON.stringify(r(`defaultSize`)??[])}`,d=i.get(`prevGroupSize`),f=t.get(`size`),p=ZT({sizes:l,panels:r(`panels`),rootEl:a,orientation:o}),m=d!=null&&f.length===c.length,h=`${aE(r(`panels`))}:${JSON.stringify(r(`size`)??[])}:${JSON.stringify(r(`defaultSize`)??[])}`,g=i.get(`prevPropsKey`)!==h,_=p;m&&d!==s?_=lE({panels:c,prevLayout:f,prevGroupSize:d,nextGroupSize:s}):m&&!g&&(_=f);let v=fE({size:_,panels:c});i.get(`prevInitialLayout`)!==u&&(i.set(`initialSize`,v),i.set(`prevInitialLayout`,u));let y=t.get(`size`);T(y,v)||(i.set(`suppressOnResize`,r(`size`)!=null||y.length===0),t.set(`size`,v),i.set(`suppressOnResize`,!1)),i.set(`prevGroupSize`,s),i.set(`prevPropsKey`,h)},setDraggingState({context:e,event:t,prop:n,scope:r}){let i=n(`orientation`),a=e.get(`size`),o=t.id,s=NT(r,o);if(!s||!OT(r))return;let c=kT(r,o);qe(c,()=>`Drag handle element not found for id "${o}"`);let l=i===`horizontal`?t.point.x:t.point.y;e.set(`dragState`,{resizeTriggerId:t.id,resolvedResizeTriggerId:s,resizeTriggerRect:c.getBoundingClientRect(),initialCursorPosition:l,initialSize:a})},clearDraggingState({context:e}){e.set(`dragState`,null)},setKeyboardState({context:e,event:t,scope:n}){let r=t.id??e.get(`dragState`)?.resizeTriggerId;r!=null&&e.set(`keyboardState`,{resizeTriggerId:r,resolvedResizeTriggerId:NT(n,r)})},clearKeyboardState({context:e}){e.set(`keyboardState`,null)},collapsePanel(e){let{context:t,event:n,refs:r}=e,i=t.get(`size`),a=t.get(`panels`),o=a.find(e=>e.id===n.id);if(qe(o,()=>`Panel data not found for id "${n.id}"`),o.collapsible){let{collapsedSize:t=0,panelSize:n,pivotIndices:s}=nE(a,o,i);if(qe(n!=null,()=>`Panel size not found for panel "${o.id}"`),!HT(n,t)){r.get(`panelSizeBeforeCollapse`).set(o.id,n);let c=dE({delta:eE(a,o)===a.length-1?n-t:t-n,initialSize:i,panels:a,pivotIndices:s,prevSize:i,trigger:`imperative-api`});T(i,c)||mE(e,c)}}},expandPanel(e){let{context:t,event:n,refs:r}=e,i=t.get(`panels`),a=t.get(`size`),o=i.find(e=>e.id===n.id);if(qe(o,()=>`Panel data not found for id "${n.id}"`),o.collapsible){let{collapsedSize:t=0,panelSize:s=0,minSize:c=0,pivotIndices:l}=nE(i,o,a),u=n.minSize??c;if(HT(s,t)){let t=r.get(`panelSizeBeforeCollapse`).get(o.id),n=t!=null&&t>=u?t:u,c=dE({delta:eE(i,o)===i.length-1?s-n:n-s,initialSize:a,panels:i,pivotIndices:l,prevSize:a,trigger:`imperative-api`});T(a,c)||mE(e,c)}}},resizePanel(e){let{context:t,event:n}=e,r=t.get(`size`),i=t.get(`panels`),a=$T(i,n.id),o=n.size,{panelSize:s,pivotIndices:c}=nE(i,a,r);qe(s!=null,()=>`Panel size not found for panel "${a.id}"`);let l=dE({delta:eE(i,a)===i.length-1?s-o:o-s,initialSize:r,panels:i,pivotIndices:c,prevSize:r,trigger:`imperative-api`});T(r,l)||mE(e,l)},setPointerValue(e){let{context:t,event:n,prop:r,scope:i}=e,a=t.get(`dragState`);if(!a)return;let{resolvedResizeTriggerId:o,initialSize:s,initialCursorPosition:c}=a,l=t.get(`panels`),u=OT(i);qe(u,()=>`Panel group element not found`);let d=o.split(`:`).map(e=>l.findIndex(t=>t.id===e)),f=r(`orientation`)===`horizontal`,p=f?n.point.x:n.point.y,m=u.getBoundingClientRect(),h=f?m.width:m.height,g=(p-c)/h*100,_=t.get(`size`),v=dE({delta:g,initialSize:s??_,panels:l,pivotIndices:d,prevSize:_,trigger:`mouse-or-touch`});T(_,v)||mE(e,v)},setKeyboardValue(e){let{context:t,event:n}=e,r=t.get(`panels`),i=NT(e.scope,n.id);if(!i)return;let a=n.delta,o=i.split(`:`).map(e=>r.findIndex(t=>t.id===e)),s=t.get(`size`),c=dE({delta:a,initialSize:s,panels:r,pivotIndices:o,prevSize:s,trigger:`keyboard`});T(s,c)||mE(e,c)},invokeOnResizeEnd({context:e,prop:t,refs:n,event:r}){let i=r.id??e.get(`dragState`)?.resizeTriggerId??null;queueMicrotask(()=>{t(`onResizeEnd`)?.({size:n.get(`lastRequestedSize`)??e.get(`size`),resizeTriggerId:i})})},invokeOnResizeStart({prop:e}){queueMicrotask(()=>{e(`onResizeStart`)?.()})},collapseOrExpandPanel(e){let{context:t,refs:n}=e,r=t.get(`panels`),i=t.get(`size`),[a,o]=(t.get(`keyboardState`)?.resolvedResizeTriggerId)?.split(`:`)??[],s=r.findIndex(e=>e.id===a);if(s===-1)return;let c=r[s];qe(c,()=>`No panel data found for index ${s}`);let l=i[s],{collapsedSize:u=0,collapsible:d,minSize:f=0}=c;if(l!=null&&d){let t=[a,o].map(e=>r.findIndex(t=>t.id===e)),s=dE({delta:HT(l,u)?f-u:u-l,initialSize:n.get(`initialSize`)??i,panels:r,pivotIndices:t,prevSize:i,trigger:`keyboard`});T(i,s)||mE(e,s)}},setGlobalCursor(e){let{context:t,scope:n,prop:r}=e;if(r(`registry`))return;let i=t.get(`dragState`);if(!i)return;let a=t.get(`panels`),o=r(`orientation`)===`horizontal`,[s]=i.resolvedResizeTriggerId.split(`:`),c=a[a.findIndex(e=>e.id===s)],l=BT(t.get(`size`),a,i.resolvedResizeTriggerId);LT(n,{isAtMin:HT(l.valueNow,l.valueMin)||HT(l.valueNow,c.collapsedSize),isAtMax:HT(l.valueNow,l.valueMax)},o,r(`nonce`))},clearGlobalCursor({scope:e}){RT(e)},focusNextResizeTrigger({event:e,scope:t}){let n=FT(t),r=n.findIndex(t=>t.dataset.id===e.id);(e.shiftKey?S(n,r):b(n,r))?.focus()}}}});function mE(e,t){let{refs:n,prop:r,context:i}=e,a=i.get(`panels`),o=r(`onCollapse`),s=r(`onExpand`),c=r(`onResize`),l=r(`onResizeStart`),u=r(`onResizeEnd`),d=n.get(`panelIdToLastNotifiedSizeMap`),f=i.get(`size`),p=i.get(`dragState`),m=i.get(`keyboardState`),h=p===null&&m===null;if(n.set(`lastRequestedSize`,t),h&&l&&queueMicrotask(()=>{l()}),r(`size`)==null)i.set(`size`,t);else if(c){let e=n.get(`panelSizeBeforeCollapse`),i=Object.fromEntries(e.entries()),a=p?.resizeTriggerId??null;c({size:t,layout:iE(r(`panels`)),resizeTriggerId:a,expandToSizes:i})}t.forEach((e,t)=>{let n=a[t];qe(n,()=>`Panel data not found for index ${t}`);let{collapsedSize:r=0,collapsible:i,id:c}=n,l=d.get(c)??f[t];(l==null||e!==l)&&(d.set(c,e),i&&l!=null&&(o||s)&&(HT(l,r)&&!HT(e,r)&&s?.({panelId:c,size:e}),!HT(l,r)&&HT(e,r)&&o?.({panelId:c,size:e})))}),h&&u&&queueMicrotask(()=>{u({size:t,resizeTriggerId:null})})}var[hE,gE]=W({name:`SplitterContext`,hookName:`useSplitterContext`,providerName:`<SplitterProvider />`}),_E=K(),vE=(0,s.forwardRef)((e,t)=>{let[n,r]=_E(e,[`id`]),i=z(gE().getPanelProps(n),r);return(0,G.jsx)(U.div,{...i,ref:t})});vE.displayName=`SplitterPanel`;var[yE,bE]=W({name:`SplitterResizeTriggerPropsContext`,hookName:`useSplitterResizeTriggerPropsContext`,providerName:`<SplitterResizeTriggerPropsProvider />`}),xE=K(),SE=(0,s.forwardRef)((e,t)=>{let[n,r]=xE(e,[`disabled`,`id`]),i=z(gE().getResizeTriggerProps(n),r);return(0,G.jsx)(yE,{value:n,children:(0,G.jsx)(U.button,{ref:t,...i})})});SE.displayName=`SplitterResizeTrigger`;var CE=(0,s.forwardRef)((e,t)=>{let n=gE(),r=bE(),i=z(n.getResizeTriggerIndicator(r),e);return(0,G.jsx)(U.div,{ref:t,...i})});CE.displayName=`SplitterResizeTriggerIndicator`;var wE=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro(),{dir:r}=ao();return cE(Oa(pE,{id:t,dir:r,getRootNode:n,...e}),Na)},TE=K(),EE=(0,s.forwardRef)((e,t)=>{let[n,r]=TE(e,[`defaultSize`,`id`,`ids`,`keyboardResizeBy`,`nonce`,`onCollapse`,`onExpand`,`onResize`,`onResizeEnd`,`onResizeStart`,`orientation`,`panels`,`registry`,`size`]),i=wE(n),a=z(i.getRootProps(),r);return(0,G.jsx)(hE,{value:i,children:(0,G.jsx)(U.div,{...a,ref:t})})});EE.displayName=`SplitterRoot`;var[DE,OE]=W({name:`DrawerContext`,hookName:`useDrawerContext`,providerName:`<DrawerProvider />`}),kE=(0,s.forwardRef)((e,t)=>{let n=OE(),r=eo({...eS(),present:n.open}),i=z(n.getBackdropProps(),r.getPresenceProps(),e),a=l(r.ref,t);return(0,G.jsx)(Ba,{presence:r,children:(0,G.jsx)(U.div,{...i,ref:a})})});kE.displayName=`DrawerBackdrop`;var AE=(0,s.forwardRef)((e,t)=>{let n=z(OE().getCloseTriggerProps(),e);return(0,G.jsx)(U.button,{...n,ref:t})});AE.displayName=`DrawerCloseTrigger`;var jE=K(),ME=(0,s.forwardRef)((e,t)=>{let[n,r]=jE(e,[`draggable`]),i=OE(),a=Ha(),o=z(i.getContentProps({draggable:!0,...n}),a.getPresenceProps(),r),s=l(a.ref,t);return(0,G.jsx)(Ba,{presence:a,children:(0,G.jsx)(U.div,{...o,ref:s})})});ME.displayName=`DrawerContent`;var NE=(0,s.forwardRef)((e,t)=>{let n=z(OE().getDescriptionProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});NE.displayName=`DrawerDescription`;var PE=(0,s.forwardRef)((e,t)=>{let n=OE(),r=Ha(),i=z(n.getPositionerProps(),e);return r.unmounted?null:(0,G.jsx)(U.div,{...i,ref:t})});PE.displayName=`DrawerPositioner`;var FE=(0,s.forwardRef)((e,t)=>{let n=z(OE().getGrabberProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});FE.displayName=`DrawerGrabber`;var IE=(0,s.forwardRef)((e,t)=>{let n=z(OE().getGrabberIndicatorProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});IE.displayName=`DrawerGrabberIndicator`;var LE=(0,s.createContext)(void 0);LE.Provider;var RE=()=>(0,s.useContext)(LE),zE=oo(`drawer`).parts(`positioner`,`content`,`title`,`description`,`trigger`,`backdrop`,`grabber`,`grabberIndicator`,`closeTrigger`,`swipeArea`).build(),BE=e=>e.ids?.content??`drawer:${e.id}:content`,VE=e=>e.ids?.positioner??`drawer:${e.id}:positioner`,HE=e=>e.ids?.title??`drawer:${e.id}:title`,UE=e=>e.ids?.description??`drawer:${e.id}:description`,WE=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`drawer:${e.id}:trigger:${t}`:`drawer:${e.id}:trigger`:A(n)?n(t):n},GE=e=>Ai(e.getRootNode(),`[data-scope="drawer"][data-part="trigger"]${Rt(e.id)}`),KE=(e,t)=>t==null?rD(e)??GE(e)[0]:e.getById(WE(e,t)),qE=(e,t)=>{let n=t.finalFocusEl?.();if(n)return n;if(t.triggerValue){let n=KE(e,t.triggerValue);if(n)return n}return GE(e)[0]??null},JE=e=>e.ids?.backdrop??`drawer:${e.id}:backdrop`,YE=e=>e.ids?.grabber??`drawer:${e.id}:grabber`,XE=e=>e.ids?.grabberIndicator??`drawer:${e.id}:grabber-indicator`,ZE=e=>e.ids?.closeTrigger??`drawer:${e.id}:close-trigger`,QE=e=>e.ids?.swipeArea??`drawer:${e.id}:swipe-area`,$E=e=>e.getById(BE(e)),eD=e=>e.getById(VE(e)),tD=e=>e.getById(HE(e)),nD=e=>e.getById(UE(e)),rD=e=>e.getById(WE(e)),iD=e=>e.getById(JE(e)),aD=e=>e.getById(ZE(e)),oD=e=>e.getById(QE(e));function sD(e,t,n){if(!Number.isFinite(t)||t<=0)return null;if(typeof e==`number`)return Number.isFinite(e)?e<=1?Ce(e,0,1)*t:e:null;let r=e.trim();if(r.endsWith(`px`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e:null}if(r.endsWith(`rem`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e*n:null}return null}function cD(e,t){let{contentSize:n,viewportSize:r,rootFontSize:i}=t,a=Math.min(n,r);if(!Number.isFinite(a)||a<=0)return null;let o=sD(e,r,i);if(o===null||!Number.isFinite(o))return null;let s=Ce(o,0,a);return{value:e,height:s,offset:Math.max(0,n-s)}}var lD=1;function uD(e){if(e.length<=1)return e;let t=[],n=[];for(let r=e.length-1;r>=0;--r){let i=e[r];n.some(e=>Math.abs(e-i.height)<=lD)||(n.push(i.height),t.push(i))}return t.reverse(),t}function dD(e,t){return t.length===0?null:t.reduce((t,n)=>{let r=Math.abs(e-t.offset);return Math.abs(e-n.offset)<r?n:t})}function fD(e){"@babel/helpers - typeof";return fD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fD(e)}function pD(e,t){if(fD(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(fD(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function mD(e){var t=pD(e,`string`);return fD(t)==`symbol`?t:t+``}function hD(e,t,n){return(t=mD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gD=100,_D=80,vD=50,yD=2,bD=8,xD=6,SD=1.35;function CD(e){return e===`down`||e===`up`}function wD(e){return e===`up`||e===`left`}var TD=class{constructor(){hD(this,`startPoint`,null),hD(this,`startTarget`,null),hD(this,`velocity`,null),hD(this,`samples`,[]),hD(this,`sampleStartIndex`,0),hD(this,`gestureStartAxis`,null),hD(this,`gestureStartTime`,null),hD(this,`gestureSign`,1),hD(this,`pendingSwipe`,null)}setStartPoint(e,t=null){this.startPoint=e,this.startTarget=t}clearStartPoint(){this.startPoint=null,this.startTarget=null}getStartPoint(){return this.startPoint}getStartTarget(){return this.startTarget}getGestureAxis(e){return e===`left`||e===`right`?`x`:`y`}getGestureSign(e){return wD(e)?-1:1}getAxisValue(e,t){return e[t]}getMainAxisDisplacement(e,t,n){return this.startPoint?(this.getAxisValue(this.startPoint,t)-this.getAxisValue(e,t))*n:0}getCrossAxisDisplacement(e,t){if(!this.startPoint)return 0;let n=t===`x`?`y`:`x`,r=this.getAxisValue(this.startPoint,n);return this.getAxisValue(e,n)-r}track(e,t,n){let r=this.getAxisValue(e,t),i=performance.now();this.gestureStartAxis===null&&(this.gestureStartAxis=r,this.gestureStartTime=i,this.gestureSign=n),this.samples.push({axis:r,time:i});let a=i-gD;for(;this.sampleStartIndex<this.samples.length&&this.samples[this.sampleStartIndex].time<a;)this.sampleStartIndex+=1;if(this.sampleStartIndex>=bD&&(this.samples=this.samples.slice(this.sampleStartIndex),this.sampleStartIndex=0),this.samples.length-this.sampleStartIndex<yD){this.velocity=0;return}let o=this.samples[this.sampleStartIndex],s=this.samples[this.samples.length-1],c=s.time-o.time;if(c<=0){this.velocity=0;return}let l=(s.axis-o.axis)*n/c*1e3;this.velocity=Number.isFinite(l)?l:0}getReleaseVelocity(){let e=performance.now();if(this.samples.length-this.sampleStartIndex>=yD&&e-this.samples[this.samples.length-1].time<=_D)return this.velocity??0;if(this.gestureStartAxis!==null&&this.gestureStartTime!==null){let e=this.samples[this.samples.length-1];if(e){let t=Math.max(e.time-this.gestureStartTime,vD),n=(e.axis-this.gestureStartAxis)*this.gestureSign/t*1e3;return Number.isFinite(n)?n:0}}return this.velocity??0}clearVelocityTracking(){this.samples=[],this.sampleStartIndex=0,this.velocity=null,this.gestureStartAxis=null,this.gestureStartTime=null,this.gestureSign=1}clear(){this.cancelDeferredSwipe(),this.clearStartPoint(),this.clearVelocityTracking()}startDeferredSwipe(e){let{getWin:t,pointerId:n,startPoint:r,swipeDirection:i,onCommit:a,canCommit:o,onCancel:s}=e;this.cancelDeferredSwipe();let c=t(),l=CD(i),u=e=>{if(e.pointerId!==n)return;let t=e.clientX-r.x,i=e.clientY-r.y,s=l?i:t,c=l?t:i,u=Math.abs(s);u>=xD&&u>=Math.abs(c)*SD&&((!o||o())&&a(r),this.cancelDeferredSwipe())},d=e=>{e.pointerId===n&&(s?.(),this.cancelDeferredSwipe())},f=[V(c,`pointermove`,u,{capture:!0}),V(c,`pointerup`,d,{capture:!0}),V(c,`pointercancel`,d,{capture:!0}),V(c,`lostpointercapture`,d,{capture:!0})];this.pendingSwipe={pointerId:n,startPoint:r,cleanups:f}}cancelDeferredSwipe(){this.pendingSwipe&&=(this.pendingSwipe.cleanups.forEach(e=>e()),null)}bind(e){let{getDoc:t,getSelectionTarget:n,swipeDirection:r,onStart:i,onMove:a,onEnd:o,onCancel:s,preventDefault:c,cancelOnInterrupt:l}=e,u=t(),d=!1,f,p=this.getGestureAxis(r),m=this.getGestureSign(r),h=e=>{this.track(e,p,m)},g=()=>{f??=Ci({doc:u,target:n?.()})},_=()=>{f?.(),f=void 0},v=()=>this.startPoint!==null;function y(e){if(e.pointerType===`touch`&&d)return;let t=hr(e),n=Zn(e);v()&&g(),h(t),a({point:t,target:n,event:e,pointerType:e.pointerType,axis:p,swipeDirection:r})}function b(e){e.pointerType===`touch`&&d?d=!1:(_(),o({point:hr(e),swipeDirection:r}))}function x(e){e.pointerType===`touch`&&d?d=!1:(_(),s())}function S(e){if(!e.touches[0])return;d=!0;let t=hr(e),n=Zn(e);i?.({point:t,target:n,event:e,pointerType:`touch`,axis:p,swipeDirection:r})}function C(e){if(!e.touches[0])return;d=!0;let t=hr(e),n={point:t,target:Zn(e),event:e,pointerType:`touch`,axis:p,swipeDirection:r};c?.(n)&&e.cancelable&&e.preventDefault(),g(),h(t),a(n)}function w(e){e.touches.length===0&&(_(),o({point:hr(e),swipeDirection:r}))}function T(){_(),s()}function E(){u.visibilityState===`hidden`&&l?.({reason:`visibility-hidden`,event:u,target:null,pointerType:null})!==!1&&(_(),s())}function D(e){if(e.pointerType===`touch`)return;let t=Zn(e);l?.({reason:`lost-pointer-capture`,event:e,target:t,pointerType:e.pointerType})!==!1&&s()}let O=[V(u,`pointermove`,y),V(u,`pointerup`,b),V(u,`pointercancel`,x),V(u,`touchstart`,S,{capture:!0,passive:!1}),V(u,`touchmove`,C,{capture:!0,passive:!1}),V(u,`touchend`,w,{capture:!0}),V(u,`touchcancel`,T,{capture:!0}),V(u,`visibilitychange`,E),V(u,`lostpointercapture`,D,!0)];return()=>{_(),O.forEach(e=>e())}}},ED=24,DD=.22,OD=1.25,kD=.5,AD=650,jD=.3,MD=.58,ND=.5,PD=1,FD=24,ID=400,LD=.4,RD=4e3,zD=360,BD=.1,VD=1,HD=5,UD=`data-no-drag`,WD=`[${UD}]`,GD=class{constructor(e){hD(this,`session`,new TD),hD(this,`dragOffset`,null),hD(this,`preventDragOnScroll`,void 0),this.preventDragOnScroll=e.preventDragOnScroll}contentPointerDown(e){let{event:t,getDoc:n,getContentEl:r,getWin:i,swipeDirection:a,canCommit:o,onCommit:s}=e;if(lO(t,this.session.getGestureAxis(a))||sO(n(),r())||!o())return;let c=hr(t);t.pointerType!==`mouse`&&t.pointerType!==`pen`?s(c):this.session.startDeferredSwipe({getWin:i,pointerId:t.pointerId,startPoint:c,swipeDirection:a,onCommit:s,canCommit:o})}grabberPointerDown(e){let{event:t,point:n,swipeDirection:r,canCommit:i,onCommit:a}=e;lO(t,this.session.getGestureAxis(r))||(this.session.cancelDeferredSwipe(),i()&&a(n))}adjustReleaseVelocityAgainstDisplacement(e,t){let n=Math.sign(t),r=Math.sign(e);return n!==0&&Math.abs(t)>=ED&&r!==0&&r!==n?0:e}adjustReleaseVelocityForOpenSwipe(e,t,n){return t<DD&&e<0&&Math.abs(e)<n*OD||t>kD&&e>0&&Math.abs(e)<AD?0:e}beginSwipe(e,t){this.session.setStartPoint(e,t)}clearSwipeStart(){this.session.clearStartPoint()}getSwipeStart(){return this.session.getStartPoint()}getDragOffset(){return this.dragOffset}resetDragOffset(){this.dragOffset=null}resetVelocity(){this.session.clearVelocityTracking()}reset(){this.dragOffset=null,this.session.clear()}setDragOffset(e,t,n){if(!this.session.getStartPoint()){this.dragOffset=null;return}let r=this.session.getGestureAxis(n),i=this.session.getGestureSign(n),a=this.session.getMainAxisDisplacement(e,r,i)-t;a>0&&(a=Math.sqrt(a)),this.dragOffset=-a}setSwipeOpenOffset(e,t,n){if(!this.session.getStartPoint()){this.dragOffset=null;return}let r=this.session.getGestureAxis(n),i=this.session.getGestureSign(n),a=this.session.getMainAxisDisplacement(e,r,i),o=t-Math.max(0,a);o<0&&(o=-Math.sqrt(Math.abs(o))),this.dragOffset=o}canStartDrag(e,t,n,r,i){t=this.session.getStartTarget()??t;let a=this.session.getGestureAxis(i);if(!Ut(t)||oO(t,a)||!this.session.getStartPoint()||!n)return!1;if(!r)return!0;let o=this.session.getGestureSign(i),s=this.session.getMainAxisDisplacement(e,a,o);if(Math.abs(s)<jD)return!1;if(Math.abs(this.session.getCrossAxisDisplacement(e,a))>Math.abs(s)*MD){let e=CD(i)?`right`:`down`,r=rO(t,n,e);if(r.availableForwardScroll>ND||r.availableBackwardScroll>ND)return!1}let{availableForwardScroll:c,availableBackwardScroll:l}=rO(t,n,i);return!(s>0&&c>ND||s<0&&l>ND)}resolveSnapPointOnRelease(e,t,n,r){let i=this.dragOffset;if(i===null)return e[0]?.value??1;let a=this.session.getReleaseVelocity();if(n&&t){let n=[...e].sort((e,t)=>e.offset-t.offset),o=0,s=Math.abs(t.offset-n[0].offset);for(let e=1;e<n.length;e++){let r=Math.abs(t.offset-n[e].offset);r<s&&(s=r,o=e)}let c=n[o],l=i-c.offset,u=Math.sign(l),d=this.adjustReleaseVelocityAgainstDisplacement(a,l),f=Math.sign(d),p=c,m=i;if(u!==0&&f===u&&Math.abs(d)>=ID){let e=Math.min(Math.max(o+u,0),n.length-1);if(e!==o)p=n[e],m=p.offset;else if(u>0)return null}else if(l>FD){let e=n[Math.min(o+1,n.length-1)];e&&(p=e,m=e.offset)}else if(l<-24){let e=n[Math.max(o-1,0)];e&&(p=e,m=e.offset)}return Math.abs(m-r)<Math.abs(m-p.offset)?null:p.value}let o=t?.offset??0,s=this.adjustReleaseVelocityAgainstDisplacement(a,i-o),c=i;if(Math.abs(s)>=ID){let e=Ce(s,-4e3,RD);c+=e*LD,c=Math.max(0,c)}return dD(c,e)?.value??null}shouldOpenOnRelease(e,t,n){let r=this.dragOffset;if(r===null||e===null)return!1;let i=e-r,a=i/e,o=this.adjustReleaseVelocityForOpenSwipe(this.session.getReleaseVelocity(),a,t);return o<0&&Math.abs(o)>=t||i>=e*n}shouldDismissOnRelease(e,t,n){let r=this.dragOffset;if(r===null||e===null)return!1;let i=this.adjustReleaseVelocityAgainstDisplacement(this.session.getReleaseVelocity(),r-n);if(e-r<=0)return!0;let a=r;if(Math.abs(i)>=ID){let e=Ce(i,-4e3,RD);a+=e*LD,a=Math.max(0,a)}let o=dD(a,t);return o?Math.abs(a-e)<Math.abs(a-o.offset):!1}getSwipeStrength(e,t=null){let n=this.dragOffset;if(n===null)return VD;let r=this.session.getReleaseVelocity();t!=null&&(r=this.adjustReleaseVelocityAgainstDisplacement(r,n-t));let i=Math.abs(n-e),a=Math.abs(r);return a<=0||i<=0?VD:BD+Ce(i/a*1e3/zD,0,1)*.9}bindDragTracking(e){let{getDoc:t,getContentEl:n,getSwipeAreaEl:r,swipeDirection:i,onMove:a,onEnd:o,onCancel:s}=e,c=this.preventDragOnScroll,l=CD(i),u=0;return this.session.bind({getDoc:t,getSelectionTarget:n,swipeDirection:i,onMove:a,onEnd:o,onCancel:s,cancelOnInterrupt:({reason:e,target:t})=>e!==`lost-pointer-capture`||KD(t,n(),r()),onStart({pointerType:e,point:t}){e===`touch`&&(u=l?t.y:t.x)},preventDefault({event:e,pointerType:t,point:r,target:a}){if(t!==`touch`)return!1;let o=n(),s=a??e.target;if(!c()||!o||!s||oO(s,l?`y`:`x`))return!1;let d=nO(s,o,i);if(d){let e=l?r.y:r.x,t=iO({scrollParent:d,swipeDirection:i,lastMainAxis:u,currentMainAxis:e});return u=e,t}return u=l?r.y:r.x,!1}})}bindSwipeOpenTracking(e){let{getDoc:t,getContentEl:n,getSwipeAreaEl:r,swipeDirection:i,onMove:a,onEnd:o,onCancel:s}=e;return this.session.bind({getDoc:t,getSelectionTarget:r,swipeDirection:i,onMove({point:e}){a({point:e})},onEnd:o,onCancel:s,cancelOnInterrupt:({reason:e,target:t})=>e!==`lost-pointer-capture`||KD(t,n(),r())})}};function KD(e,t,n){return e?nn(t,e)||nn(n,e):!1}var qD={up:`down`,down:`up`,start:`end`,end:`start`};function JD(e,t){return e===`start`?t===`rtl`?`right`:`left`:e===`end`?t===`rtl`?`left`:`right`:e}function YD(e,t){return CD(t)?e.height:e.width}function XD(e,t,n){return!e||e<=0?0:Ce((t??n)/e,0,1)}function ZD(e,t,n){let r=CD(n)?`y`:`x`,i=wD(n)?-1:1;return(e[r]-t[r])*i>HD}function QD(e){return e===`auto`||e===`scroll`||e===`overlay`}function $D(e){return QD(fn(e).overflowY)?e.scrollHeight>e.clientHeight+PD:!1}function eO(e){return QD(fn(e).overflowX)?e.scrollWidth>e.clientWidth+PD:!1}function tO(e,t){return CD(t)?$D(e):eO(e)}function nO(e,t,n){if(!t)return null;let r=e;for(;r&&r!==t;){if(tO(r,n))return r;r=r.parentElement}return null}function rO(e,t,n){let r=0,i=0;if(!t)return{availableForwardScroll:r,availableBackwardScroll:i};let a=CD(n),o=e;for(;o;){if(a?$D(o):eO(o)){let e=a?o.clientHeight:o.clientWidth,t=a?o.scrollTop:o.scrollLeft,n=(a?o.scrollHeight:o.scrollWidth)-t-e;r+=n,i+=t}if(o===t||o===o.ownerDocument.documentElement)break;o=o.parentElement}return{availableForwardScroll:r,availableBackwardScroll:i}}function iO(e){let{scrollParent:t,swipeDirection:n,lastMainAxis:r,currentMainAxis:i}=e,a=CD(n),o=i>r;if(a){let e=t.scrollTop,r=Math.max(0,t.scrollHeight-t.clientHeight);if(n===`down`)return e<=PD&&o;if(n===`up`)return e>=r-PD&&!o}else{let e=t.scrollLeft,r=Math.max(0,t.scrollWidth-t.clientWidth);if(n===`right`)return e<=PD&&o;if(n===`left`)return e>=r-PD&&!o}return!1}function aO(e,t){let n=e.closest(WD);for(;n;){let e=n.getAttribute(UD);if(e!==`x`&&e!==`y`||!t||e===t)return!0;n=n.parentElement?.closest(WD)??null}return!1}function oO(e,t){if(!Ut(e))return!1;if(aO(e,t))return!0;let n=e;for(;n;){if(tn(n))return!0;n=n.parentElement}let r=e.closest(`input`);if(Xt(r)){let e=r.type;if(e===`range`||e===`file`)return!0}return!1}function sO(e,t){if(!t)return!1;let n=e.getSelection();if(!n||n.rangeCount===0||n.isCollapsed)return!1;try{let e=n.getRangeAt(0);if(nn(t,e.commonAncestorContainer)||nn(t,n.anchorNode)||nn(t,n.focusNode)||typeof e.intersectsNode==`function`&&e.intersectsNode(t))return!0}catch{return!1}return!1}function cO(e,t){let n=typeof e.composedPath==`function`?e.composedPath():[];for(let e of n)if(oO(e,t))return!0;return oO(e.target,t)}function lO(e,t){return!rr(e)||cO(e,t)}var uO=9999;function dO(e,t,n){return!e||t!==null?null:n??uO}function fO(e,t){let{state:n,send:r,context:i,scope:a,prop:o,refs:s}=e,c=n.hasTag(`open`),l=n.matches(`closed`),u=n.matches(`closing`),d=n.matches(`swiping-open`),f=i.get(`dragOffset`),p=f!==null,m=i.get(`triggerValue`),h=i.get(`snapPoint`),g=o(`swipeDirection`),_=JD(g,o(`dir`)),v=i.get(`contentSize`),y=i.get(`swipeStrength`),b=i.get(`resolvedActiveSnapPoint`),x=b?.offset??0,S=i.get(`nestedMetrics`),C=dO(d,f,v)??f??x,w=wD(_)?-x:x,T=p||d,E=p||d?C-x:0,D=wD(_)?-E:E,O=T&&v&&v>0?Ce(Math.abs(D)/v,0,1):+!!d,ee=wD(_)?-C:C,te=CD(_)?0:ee,k=CD(_)?ee:0;function A(e){s.get(`swipeSession`).contentPointerDown({event:e,getDoc:()=>a.getDoc(),getContentEl:()=>$E(a),getWin:()=>a.getWin(),swipeDirection:_,canCommit:()=>n.hasTag(`open`)&&!n.matches(`closing`),onCommit(t){r({type:`POINTER_DOWN`,point:t,target:Zn(e)})}})}function j(e){s.get(`swipeSession`).grabberPointerDown({event:e,point:hr(e),swipeDirection:_,canCommit:()=>n.hasTag(`open`)&&!n.matches(`closing`),onCommit(t){r({type:`POINTER_DOWN`,point:t,target:Zn(e)})}})}return{open:c,modal:!!o(`modal`),dragging:p,setOpen(e){r({type:e?`OPEN`:`CLOSE`,replaces:`open`})},snapPoints:o(`snapPoints`),swipeDirection:g,snapPoint:h,setSnapPoint(e){r({type:`SNAP_POINT.SET`,snapPoint:e,replaces:`snapPoint`})},getOpenPercentage(){return!c||!v?0:Ce(1-C/v,0,1)},getSnapPointIndex(){return h===null?-1:o(`snapPoints`).indexOf(h)},getContentSize(){return v},getPositionerProps(){return t.element({...zE.positioner.attrs,id:VE(a),dir:o(`dir`),hidden:l,"data-state":c?`open`:`closed`,"data-swipe-direction":_,style:ke({pointerEvents:u||!o(`modal`)?`none`:void 0})})},getContentProps(e={draggable:!0}){let n=CD(_)?0:D,r=CD(_)?D:0,s=i.get(`rendered`);return t.element({...zE.content.attrs,dir:o(`dir`),id:BE(a),tabIndex:-1,role:o(`role`),"aria-modal":o(`modal`),"aria-labelledby":s.title?HE(a):void 0,"aria-describedby":s.description?UE(a):void 0,hidden:!c,"data-state":c?`open`:`closed`,"data-expanded":b?.offset===0?``:void 0,"data-swipe-direction":_,"data-swiping":p||d?``:void 0,"data-dragging":p?``:void 0,"data-nested-drawer-open":S.open?``:void 0,"data-nested-drawer-swiping":S.swiping?``:void 0,style:ke({pointerEvents:o(`modal`)?void 0:`auto`,visibility:d&&f===null?`hidden`:void 0,transform:`translate3d(var(--drawer-translate-x, 0px), var(--drawer-translate-y, 0px), 0)`,transitionDuration:p||d?`0s`:void 0,"--drawer-translate":R(k),"--drawer-translate-x":R(te),"--drawer-translate-y":R(k),"--drawer-snap-point-offset-x":CD(_)?`0px`:R(w),"--drawer-snap-point-offset-y":CD(_)?R(w):`0px`,"--drawer-swipe-movement-x":R(n),"--drawer-swipe-movement-y":R(r),"--drawer-swipe-strength":`${y}`,"--nested-drawers":`${S.count}`,"--drawer-height":S.height>0?R(S.height):void 0,"--drawer-frontmost-height":S.frontmostHeight>0?R(S.frontmostHeight):void 0,willChange:`transform`}),onPointerDown(t){e.draggable&&A(t)}})},getTitleProps(){return t.element({...zE.title.attrs,id:HE(a),dir:o(`dir`)})},getDescriptionProps(){return t.element({...zE.description.attrs,id:UE(a),dir:o(`dir`)})},triggerValue:m,setTriggerValue(e){r({type:`OPEN`,value:e??void 0})},getTriggerProps(e={}){let{value:n}=e,i=n!=null&&m===n;return t.button({...zE.trigger.attrs,dir:o(`dir`),id:WE(a,n),"data-ownedby":a.id,"data-value":n,"aria-haspopup":`dialog`,type:`button`,"aria-expanded":n==null?c:c&&i,"data-state":c?`open`:`closed`,"aria-controls":BE(a),"data-current":B(i),onClick(e){e.defaultPrevented||r({type:c&&n!=null&&!i?`TRIGGER_VALUE.SET`:c?`CLOSE`:`OPEN`,value:n})}})},getBackdropProps(){return t.element({...zE.backdrop.attrs,id:JE(a),hidden:!c||d&&f===null,"data-state":c?`open`:`closed`,"data-swiping":p||d?``:void 0,style:{willChange:`opacity`,pointerEvents:u?`none`:void 0,"--drawer-swipe-progress":`${O}`,"--drawer-swipe-strength":`${y}`}})},getGrabberProps(){return t.element({...zE.grabber.attrs,id:YE(a),onPointerDown(e){j(e)},style:{touchAction:`none`}})},getGrabberIndicatorProps(){return t.element({...zE.grabberIndicator.attrs,id:XE(a)})},getCloseTriggerProps(){return t.button({...zE.closeTrigger.attrs,id:ZE(a),type:`button`,onClick(){r({type:`CLOSE`})}})},getSwipeAreaProps(e={}){let n=e.disabled??!1,i=JD(e.swipeDirection??qD[g],o(`dir`));return t.element({...zE.swipeArea.attrs,id:QE(a),role:`presentation`,"aria-hidden":!0,"data-state":c?`open`:`closed`,"data-swiping":d?``:void 0,"data-swipe-direction":i,"data-disabled":n?``:void 0,style:{touchAction:CD(i)?`pan-x`:`pan-y`,pointerEvents:n||c&&!d?`none`:void 0},onPointerDown(e){n||rr(e)&&e.pointerType!==`touch`&&(!c||d)&&(r({type:`SWIPE_AREA.START`,point:hr(e)}),e.cancelable&&e.preventDefault())},onTouchStart(e){if(n||c&&!d)return;let t=e.touches[0];t&&r({type:`SWIPE_AREA.START`,point:{x:t.clientX,y:t.clientY}})}})}}}var pO=new class{constructor(){hD(this,`elements`,new Map),hD(this,`swipingIds`,new Set),hD(this,`swipeProgress`,new Map),hD(this,`listeners`,new Set)}notify(){this.listeners.forEach(e=>e())}register(e,t){this.elements.set(e,t),this.notify()}unregister(e){this.swipingIds.delete(e),this.swipeProgress.delete(e),this.elements.delete(e)&&this.notify()}setSwiping(e,t){((t?!this.swipingIds.has(e):this.swipingIds.has(e))||!t)&&(t?this.swipingIds.add(e):(this.swipingIds.delete(e),this.swipeProgress.delete(e)),this.notify())}setSwipeProgress(e,t){this.swipeProgress.set(e,t),this.notify()}getSwipeProgressAfter(e){let t=[...this.elements.keys()],n=t.indexOf(e);if(n===-1)return 0;for(let e=t.length-1;e>n;--e)if(this.swipingIds.has(t[e]))return this.swipeProgress.get(t[e])??0;return 0}hasSwipingAfter(e){let t=[...this.elements.keys()],n=t.indexOf(e);return n!==-1&&t.slice(n+1).some(e=>this.swipingIds.has(e))}getEntries(){return this.elements}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},{and:mO}=wt(),hO=e=>e.get(`resolvedActiveSnapPoint`)?.offset??0,gO=e=>e.some(e=>typeof e==`string`&&e.trim().endsWith(`rem`)),_O=[1],vO=Tt({props({props:e,scope:t}){let n=e.role===`alertdialog`?()=>aD(t):void 0,r=typeof e.modal!=`boolean`||e.modal,i=e.snapPoints??_O;return{modal:r,trapFocus:r,preventScroll:r,closeOnInteractOutside:!0,closeOnEscape:!0,restoreFocus:!0,role:`dialog`,initialFocusEl:n,snapPoints:i,defaultSnapPoint:e.defaultSnapPoint??i[0]??null,swipeDirection:`down`,snapToSequentialPoints:!1,swipeVelocityThreshold:500,closeThreshold:.5,preventDragOnScroll:!0,...e}},context({bindable:e,prop:t,scope:n}){return{triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:KE(n,e)})}})),dragOffset:e(()=>({defaultValue:null})),snapPoint:e(()=>({defaultValue:t(`defaultSnapPoint`),value:t(`snapPoint`),onChange(e){return t(`onSnapPointChange`)?.({snapPoint:e})}})),resolvedActiveSnapPoint:e(()=>({defaultValue:null})),contentSize:e(()=>({defaultValue:null})),viewportSize:e(()=>({defaultValue:0})),rootFontSize:e(()=>({defaultValue:16})),swipeStrength:e(()=>({defaultValue:1})),rendered:e(()=>({defaultValue:{title:!0,description:!0}})),nestedMetrics:e(()=>({defaultValue:{count:0,height:0,frontmostHeight:0,open:!1,swiping:!1},isEqual:T}))}},refs({prop:e}){return{swipeSession:new GD({preventDragOnScroll:()=>e(`preventDragOnScroll`)}),snapBackFrame:Qr.create(),returnFocusEl:null}},computed:{drawerId({prop:e,scope:t}){return String(e(`id`)??t.id)},physicalSwipeDirection({prop:e}){return JD(e(`swipeDirection`),e(`dir`))},resolvedSnapPoints({context:e,prop:t}){let n=e.get(`contentSize`),r=e.get(`viewportSize`),i=e.get(`rootFontSize`);return n===null?[]:uD(t(`snapPoints`).map(e=>cD(e,{contentSize:n,viewportSize:r,rootFontSize:i})).filter(e=>e!==null))}},watch({track:e,context:t,prop:n,action:r,computed:i}){e([()=>t.get(`snapPoint`),()=>t.get(`contentSize`),()=>t.get(`viewportSize`),()=>t.get(`rootFontSize`),()=>n(`snapPoints`).join(`|`)],()=>{let e=t.get(`snapPoint`),n=t.get(`contentSize`),r=t.get(`viewportSize`),a=t.get(`rootFontSize`);if(e===null||n===null){t.set(`resolvedActiveSnapPoint`,null);return}let o=i(`resolvedSnapPoints`),s=o.find(t=>Object.is(t.value,e));if(s){t.set(`resolvedActiveSnapPoint`,s);return}let c=cD(e,{contentSize:n,viewportSize:r,rootFontSize:a});if(c){t.set(`resolvedActiveSnapPoint`,c);return}let l=o[0];l?(t.set(`snapPoint`,l.value),t.set(`resolvedActiveSnapPoint`,l)):t.set(`resolvedActiveSnapPoint`,null)}),e([()=>n(`open`)],()=>{r([`toggleVisibility`])}),e([()=>t.get(`dragOffset`),()=>t.get(`contentSize`),()=>hO(t)],()=>{r([`syncDrawerStack`])})},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},on:{"SNAP_POINT.SET":{actions:[`setSnapPoint`]}},states:{open:{tags:[`open`],entry:[`setReturnFocusEl`,`setInitialFocus`,`deferClearDragOffset`],effects:[`trackRenderedElements`,`trackDismissableElement`,`preventScroll`,`trapFocus`,`hideContentBelow`,`trackPointerMove`,`trackSizeMeasurements`,`trackNestedDrawerMetrics`,`trackDrawerStack`],on:{"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]},"CONTROLLED.CLOSE":{target:`closing`,actions:[`clearSwipeOpenAnimation`,`cancelSnapBack`,`setFinalFocus`]},POINTER_DOWN:{actions:[`setPointerStart`,`cancelSnapBack`]},POINTER_MOVE:[{guard:`isDragging`,actions:[`setDragOffset`]},{guard:`shouldStartDragging`,actions:[`setRegistrySwiping`,`setDragOffset`]}],SNAP_BACK:{guard:`isDragging`,actions:[`deferClearDragOffset`,`resetSwipeStrength`]},POINTER_UP:[{guard:mO(`shouldCloseOnSwipe`,`isOpenControlled`),actions:[`clearRegistrySwiping`,`clearPointerStart`,`setDismissSwipeStrength`,`invokeOnClose`,`scheduleSnapBack`]},{guard:`shouldCloseOnSwipe`,target:`closing`,actions:[`clearSwipeOpenAnimation`,`clearRegistrySwiping`,`setDismissSwipeStrength`,`setFinalFocus`]},{guard:`isDragging`,actions:[`clearRegistrySwiping`,`suppressBackdropAnimation`,`setSnapSwipeStrength`,`setClosestSnapPoint`,`clearPointerStart`,`clearDragOffset`,`clearVelocityTracking`]},{actions:[`clearRegistrySwiping`,`clearPointerStart`,`clearDragOffset`,`clearVelocityTracking`]}],POINTER_CANCEL:[{guard:`isDragging`,actions:[`clearRegistrySwiping`,`clearPointerStart`,`clearDragOffset`,`clearVelocityTracking`]},{actions:[`clearRegistrySwiping`,`clearPointerStart`,`clearVelocityTracking`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closing`,actions:[`clearSwipeOpenAnimation`,`resetSwipeStrength`,`invokeOnClose`,`setFinalFocus`]}]}},closing:{entry:[`cancelSnapBack`],effects:[`trackExitAnimation`],on:{"CONTROLLED.OPEN":{target:`open`},OPEN:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"TRIGGER_VALUE.SET":{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]},ANIMATION_END:{target:`closed`,actions:[`invokeOnClose`,`clearPointerStart`,`clearDragOffset`,`clearActiveSnapPoint`,`clearResolvedActiveSnapPoint`,`clearSizeMeasurements`,`clearVelocityTracking`]}}},"swipe-area-dragging":{tags:[`closed`],effects:[`trackSwipeOpenPointerMove`],on:{POINTER_MOVE:{guard:`hasSwipeIntent`,target:`swiping-open`},POINTER_UP:{target:`closed`,actions:[`clearPointerStart`,`clearVelocityTracking`]},POINTER_CANCEL:{target:`closed`,actions:[`clearPointerStart`,`clearVelocityTracking`]}}},"swiping-open":{tags:[`open`],effects:[`trackSwipeOpenPointerMove`,`trackSizeMeasurements`],on:{POINTER_MOVE:{actions:[`setSwipeOpenDragOffset`]},POINTER_UP:[{guard:mO(`shouldOpenOnSwipe`,`isOpenControlled`),actions:[`clearPointerStart`,`invokeOnOpen`]},{guard:`shouldOpenOnSwipe`,target:`open`,actions:[`clearPointerStart`,`invokeOnOpen`]},{target:`closed`,actions:[`clearPointerStart`,`clearDragOffset`,`clearSizeMeasurements`]}],POINTER_CANCEL:{target:`closed`,actions:[`clearPointerStart`,`clearDragOffset`,`clearSizeMeasurements`,`clearVelocityTracking`]},"CONTROLLED.OPEN":{target:`open`},CLOSE:{target:`closed`,actions:[`clearPointerStart`,`clearDragOffset`,`clearSizeMeasurements`]}}},closed:{tags:[`closed`],on:{"CONTROLLED.OPEN":{target:`open`},OPEN:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"SWIPE_AREA.START":{target:`swipe-area-dragging`,actions:[`setPointerStart`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!==void 0,isDragging({context:e}){return e.get(`dragOffset`)!==null},shouldStartDragging({computed:e,prop:t,refs:n,event:r,scope:i}){return n.get(`swipeSession`).canStartDrag(r.point,r.target,$E(i),t(`preventDragOnScroll`),e(`physicalSwipeDirection`))},shouldCloseOnSwipe({prop:e,context:t,computed:n,refs:r}){return!e(`snapToSequentialPoints`)&&r.get(`swipeSession`).shouldDismissOnRelease(t.get(`contentSize`),n(`resolvedSnapPoints`),hO(t))},hasSwipeIntent({refs:e,computed:t,event:n}){let r=e.get(`swipeSession`).getSwipeStart();return!r||!n.point?!1:ZD(r,n.point,t(`physicalSwipeDirection`))},shouldOpenOnSwipe({context:e,refs:t,prop:n}){return t.get(`swipeSession`).shouldOpenOnRelease(e.get(`contentSize`),n(`swipeVelocityThreshold`),n(`closeThreshold`))}},actions:{setReturnFocusEl({refs:e,scope:t}){H(()=>e.set(`returnFocusEl`,t.getActiveElement()))},setFinalFocus({event:e,prop:t,refs:n,scope:r,context:i}){if(t(`trapFocus`)||!t(`restoreFocus`)||(e.restoreFocus??e.previousEvent?.restoreFocus)===!1)return;let a=$E(r),o=qE(r,{finalFocusEl:t(`finalFocusEl`),triggerValue:i.get(`triggerValue`)})??n.get(`returnFocusEl`);H(()=>{cn(r.getActiveElement(),[a])||o?.focus({preventScroll:!0})})},setInitialFocus({prop:e,scope:t}){e(`trapFocus`)||H(()=>{let n=Kr({root:$E(t),getInitialEl:e(`initialFocusEl`)});n&&n.focus({preventScroll:!0})})},deferClearDragOffset({context:e,refs:t,scope:n}){if(e.get(`dragOffset`)===null)return;let r=$E(n),i=iD(n);r&&r.style.setProperty(`animation`,`none`,`important`),i&&i.style.setProperty(`animation`,`none`,`important`),H(()=>{t.get(`swipeSession`).resetDragOffset(),e.set(`dragOffset`,null)})},suppressBackdropAnimation({scope:e}){let t=iD(e);t&&t.style.setProperty(`animation`,`none`,`important`)},clearSwipeOpenAnimation({scope:e}){let t=$E(e),n=iD(e);t&&t.style.removeProperty(`animation`),n&&n.style.removeProperty(`animation`)},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},setSnapPoint({context:e,event:t}){e.set(`snapPoint`,t.snapPoint)},setPointerStart({event:e,refs:t}){t.get(`swipeSession`).beginSwipe(e.point,e.target)},setDragOffset({context:e,event:t,refs:n,computed:r}){let i=n.get(`swipeSession`),a=t.swipeDirection??r(`physicalSwipeDirection`);i.setDragOffset(t.point,hO(e),a),e.set(`dragOffset`,i.getDragOffset())},setSwipeOpenDragOffset({context:e,event:t,refs:n,computed:r}){let i=n.get(`swipeSession`),a=e.get(`contentSize`);a&&(i.setSwipeOpenOffset(t.point,a,r(`physicalSwipeDirection`)),e.set(`dragOffset`,i.getDragOffset()))},setClosestSnapPoint({computed:e,context:t,refs:n,prop:r,send:i}){let a=e(`resolvedSnapPoints`),o=t.get(`contentSize`),s=t.get(`viewportSize`),c=t.get(`rootFontSize`);if(!a.length||o===null)return;let l=n.get(`swipeSession`).resolveSnapPointOnRelease(a,t.get(`resolvedActiveSnapPoint`),r(`snapToSequentialPoints`),o);if(l===null){i({type:`CLOSE`});return}t.set(`snapPoint`,l);let u=cD(l,{contentSize:o,viewportSize:s,rootFontSize:c});t.set(`resolvedActiveSnapPoint`,u)},clearDragOffset({context:e,refs:t}){t.get(`swipeSession`).resetDragOffset(),e.set(`dragOffset`,null)},clearActiveSnapPoint({context:e}){e.set(`snapPoint`,e.initial(`snapPoint`))},clearSizeMeasurements({context:e}){e.set(`contentSize`,null),e.set(`viewportSize`,0),e.set(`rootFontSize`,16)},clearResolvedActiveSnapPoint({context:e}){e.set(`resolvedActiveSnapPoint`,null)},clearPointerStart({refs:e}){e.get(`swipeSession`).clearSwipeStart()},clearVelocityTracking({refs:e}){e.get(`swipeSession`).resetVelocity()},setSnapSwipeStrength({context:e,refs:t,computed:n,prop:r}){let i=t.get(`swipeSession`),a=n(`resolvedSnapPoints`),o=e.get(`contentSize`),s=i.resolveSnapPointOnRelease(a,e.get(`resolvedActiveSnapPoint`),r(`snapToSequentialPoints`),o??0);if(s===null)return;let c=e.get(`viewportSize`),l=e.get(`rootFontSize`),u=cD(s,{contentSize:o??0,viewportSize:c,rootFontSize:l}),d=hO(e);e.set(`swipeStrength`,i.getSwipeStrength(u?.offset??0,d))},setDismissSwipeStrength({context:e,refs:t}){let n=t.get(`swipeSession`),r=e.get(`contentSize`),i=hO(e);e.set(`swipeStrength`,n.getSwipeStrength(r??0,i))},resetSwipeStrength({context:e}){e.set(`swipeStrength`,1)},scheduleSnapBack({refs:e,send:t,prop:n}){n(`onOpenChange`)??e.get(`snapBackFrame`).request(()=>{t({type:`SNAP_BACK`})})},cancelSnapBack({refs:e}){e.get(`snapBackFrame`).cancel()},setRegistrySwiping({computed:e}){pO.setSwiping(e(`drawerId`),!0)},clearRegistrySwiping({computed:e}){pO.setSwiping(e(`drawerId`),!1)},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})},syncDrawerStack({context:e,prop:t,computed:n}){let r=e.get(`contentSize`);if(r===null)return;let i=e.get(`dragOffset`),a=XD(r,i,hO(e)),o=n(`drawerId`);i!==null&&pO.setSwipeProgress(o,a);let s=t(`stack`);s&&(s.setHeight(o,r),s.setSwipe(o,i!==null,a))}},effects:{trackRenderedElements({context:e,scope:t}){return Ri({getContainerEl:()=>$E(t),getRootNode:()=>t.getRootNode(),parts:{title:()=>tD(t),description:()=>nD(t)},onChange:t=>e.set(`rendered`,t)})},trackDrawerStack({context:e,prop:t,computed:n}){let r=t(`stack`);if(!r)return;let i=n(`drawerId`);return r.register(i),r.setOpen(i,!0),(()=>{let t=e.get(`contentSize`),n=e.get(`dragOffset`),a=hO(e);r.setHeight(i,t??0),r.setSwipe(i,n!==null,XD(t,n,a))})(),()=>{r.setSwipe(i,!1,0),r.setOpen(i,!1),r.unregister(i)}},trackDismissableElement({scope:e,prop:t,send:n}){let r=()=>$E(e),i=!0;return Yl(r,{type:`drawer`,defer:!0,getRootNode:e.getRootNode,pointerBlocking:t(`modal`),layerStyleTargets:[()=>iD(e),()=>eD(e)],exclude:[rD(e),...GE(e)].filter(Boolean),onInteractOutside(e){t(`onInteractOutside`)?.(e),t(`closeOnInteractOutside`)||e.preventDefault(),i=!(e.detail.focusable||e.detail.contextmenu)},onFocusOutside:t(`onFocusOutside`),onEscapeKeyDown(e){t(`onEscapeKeyDown`)?.(e),t(`closeOnEscape`)||e.preventDefault()},onPointerDownOutside:t(`onPointerDownOutside`),onRequestDismiss:t(`onRequestDismiss`),onDismiss(){n({type:`CLOSE`,src:`interact-outside`,restoreFocus:i})}})},preventScroll({scope:e,prop:t}){if(t(`preventScroll`))return yu(e.getDoc())},trapFocus({scope:e,prop:t,context:n}){return t(`trapFocus`)?fu(()=>$E(e),{preventScroll:!0,returnFocusOnDeactivate:!!t(`restoreFocus`),initialFocus:()=>Kr({root:$E(e),getInitialEl:t(`initialFocusEl`)}),setReturnFocus:r=>qE(e,{finalFocusEl:t(`finalFocusEl`),triggerValue:n.get(`triggerValue`)})??r,getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t(`modal`)?bl(()=>[$E(e)],{defer:!0}):void 0},trackPointerMove({scope:e,send:t,refs:n,computed:r}){return n.get(`swipeSession`).bindDragTracking({getDoc:()=>e.getDoc(),getContentEl:()=>$E(e),getSwipeAreaEl:()=>oD(e),swipeDirection:r(`physicalSwipeDirection`),onMove(e){t({type:`POINTER_MOVE`,...e})},onEnd(e){t({type:`POINTER_UP`,...e})},onCancel(){t({type:`POINTER_CANCEL`})}})},trackSizeMeasurements({context:e,scope:t,computed:n,prop:r}){let i=t.getDoc().documentElement,a=gO(r(`snapPoints`));return yO(t,r=>{let o=()=>{let t=n(`physicalSwipeDirection`),o=r.getBoundingClientRect(),s=CD(t)?i.clientHeight:i.clientWidth;if(e.set(`contentSize`,YD(o,t)),e.set(`viewportSize`,s),a){let t=Number.parseFloat(fn(i).fontSize);Number.isFinite(t)&&e.set(`rootFontSize`,t)}};o();let s=[Bi.observe(r,o),V(t.getWin(),`resize`,o)];return()=>s.forEach(e=>e?.())})},trackNestedDrawerMetrics({scope:e,computed:t,context:n}){return yO(e,r=>{let i=t(`drawerId`);pO.register(i,r);let a=()=>{let e=[...pO.getEntries().entries()],t=e.findIndex(([e])=>e===i);if(t===-1)return;let a=e.length-1-t,o=(e[e.length-1]?.[1])?.getBoundingClientRect().height??0,s=r.getBoundingClientRect().height;n.set(`nestedMetrics`,{count:a,height:s,frontmostHeight:o,open:a>0&&o>0,swiping:pO.hasSwipingAfter(i)})};a();let o=[pO.subscribe(a),Bi.observe(r,()=>pO.notify()),V(e.getWin(),`resize`,()=>pO.notify())];return()=>{o.forEach(e=>e?.()),pO.unregister(i)}})},trackSwipeOpenPointerMove({scope:e,send:t,refs:n,computed:r}){return n.get(`swipeSession`).bindSwipeOpenTracking({getDoc:()=>e.getDoc(),getContentEl:()=>$E(e),getSwipeAreaEl:()=>oD(e),swipeDirection:r(`physicalSwipeDirection`),onMove(e){t({type:`POINTER_MOVE`,...e})},onEnd(e){t({type:`POINTER_UP`,...e})},onCancel(){t({type:`POINTER_CANCEL`})}})},trackExitAnimation({send:e,scope:t}){let n=$E(t);if(n)return V(n,`exitcomplete`,()=>{e({type:`ANIMATION_END`})})}}}});function yO(e,t){let n=$E(e),r=n?t(n):void 0,i,a=!1;if(!r){let[n,o]=ua(()=>$E(e),{timeout:1e3,rootNode:e.getDoc()});i=o,n.then(e=>{a||(r=t(e))}).catch(ce)}return()=>{a=!0,i?.(),r?.()}}var bO=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro(),{dir:r}=ao();return fO(Oa(vO,{id:t,dir:r,getRootNode:n,stack:RE(),...e}),Na)},xO=e=>{let[t,{children:n,...r}]=to(e),[i]=tS(t),a=bO(r),o=eo(z({present:a.open},t));return(0,G.jsx)(DE,{value:a,children:(0,G.jsx)($9,{value:i,children:(0,G.jsx)(Va,{value:o,children:n})})})},SO=(0,s.forwardRef)((e,t)=>{let n=z(OE().getTitleProps(),e);return(0,G.jsx)(U.h2,{...n,ref:t})});SO.displayName=`DrawerTitle`;var[CO,wO]=W({name:`TabsContext`,hookName:`useTabsContext`,providerName:`<TabsProvider />`}),TO=K(),EO=(0,s.forwardRef)((e,t)=>{let[n,r]=TO(e,[`value`]),i=wO(),a=eo({...eS(),present:i.value===e.value,immediate:!0}),o=z(i.getContentProps(n),a.getPresenceProps(),r),s=l(a.ref,t);return(0,G.jsx)(Va,{value:a,children:(0,G.jsx)(Ba,{presence:a,children:(0,G.jsx)(U.div,{...o,ref:s})})})});EO.displayName=`TabContent`;var DO=(0,s.forwardRef)((e,t)=>{let n=z(wO().getIndicatorProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});DO.displayName=`TabIndicator`;var OO=(0,s.forwardRef)((e,t)=>{let n=z(wO().getListProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});OO.displayName=`TabList`;var kO=K(),AO=(0,s.forwardRef)((e,t)=>{let[n,r]=kO(e,[`disabled`,`value`]),i=z(wO().getTriggerProps(n),r);return(0,G.jsx)(U.button,{...i,ref:t})});AO.displayName=`TabTrigger`;var jO=oo(`tabs`).parts(`root`,`list`,`trigger`,`content`,`indicator`).build(),MO=e=>e.ids?.root??`tabs:${e.id}`,NO=e=>e.ids?.list??`tabs:${e.id}:list`,PO=(e,t)=>e.ids?.content?.(t)??`tabs:${e.id}:content-${t}`,FO=(e,t)=>e.ids?.trigger?.(t)??`tabs:${e.id}:trigger-${t}`,IO=e=>e.ids?.indicator??`tabs:${e.id}:indicator`,LO=e=>e.getById(NO(e)),RO=(e,t)=>e.getById(PO(e,t)),zO=(e,t)=>t==null?null:e.getById(FO(e,t)),BO=e=>e.getById(IO(e)),VO=e=>{let t=`[role=tab]${Rt(NO(e))}:not([disabled])`;return Ai(LO(e),t)},HO=e=>d(VO(e)),UO=e=>f(VO(e)),WO=(e,t)=>Fi(VO(e),FO(e,t.value),t.loopFocus),GO=(e,t)=>Ii(VO(e),FO(e,t.value),t.loopFocus),KO=e=>({x:e?.offsetLeft??0,y:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),qO=(e,t)=>KO(Ni(VO(e),FO(e,t)));function JO(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`translations`),c=n.matches(`focused`),l=a(`orientation`)===`vertical`,u=a(`orientation`)===`horizontal`,d=a(`composite`);function f(e,t){r({type:e,key:t,src:`keyboard`})}function p(e){return{selected:i.get(`value`)===e.value,focused:i.get(`focusedValue`)===e.value,disabled:!!e.disabled}}return{value:i.get(`value`),focusedValue:i.get(`focusedValue`),setValue(e){r({type:`SET_VALUE`,value:e})},clearValue(){r({type:`CLEAR_VALUE`})},setIndicatorRect(e){let t=FO(o,e);r({type:`SET_INDICATOR_RECT`,id:t})},syncTabIndex(){r({type:`SYNC_TAB_INDEX`})},selectNext(e){r({type:`TAB_FOCUS`,value:e,src:`selectNext`}),r({type:`ARROW_NEXT`,src:`selectNext`})},selectPrev(e){r({type:`TAB_FOCUS`,value:e,src:`selectPrev`}),r({type:`ARROW_PREV`,src:`selectPrev`})},focus(){let e=i.get(`value`);e&&zO(o,e)?.focus()},getRootProps(){return t.element({...jO.root.attrs,id:MO(o),"data-orientation":a(`orientation`),"data-focus":B(c),dir:a(`dir`)})},getListProps(){return t.element({...jO.list.attrs,id:NO(o),role:`tablist`,dir:a(`dir`),"data-focus":B(c),"aria-orientation":a(`orientation`),"data-orientation":a(`orientation`),"aria-label":s?.listLabel,onKeyDown(e){if(e.defaultPrevented||er(e)||!nn(e.currentTarget,Zn(e)))return;let t={ArrowDown(){u||f(`ARROW_NEXT`,`ArrowDown`)},ArrowUp(){u||f(`ARROW_PREV`,`ArrowUp`)},ArrowLeft(){l||f(`ARROW_PREV`,`ArrowLeft`)},ArrowRight(){l||f(`ARROW_NEXT`,`ArrowRight`)},Home(){f(`HOME`)},End(){f(`END`)}}[lr(e,{dir:a(`dir`),orientation:a(`orientation`)})];t&&(e.preventDefault(),t(e))}})},getTriggerState:p,getTriggerProps(e){let{value:n,disabled:s}=e,c=p(e);return t.button({...jO.trigger.attrs,role:`tab`,type:`button`,disabled:s,dir:a(`dir`),"data-orientation":a(`orientation`),"data-disabled":B(s),"aria-disabled":s,"data-value":n,"aria-selected":c.selected,"data-selected":B(c.selected),"data-focus":B(c.focused),"aria-controls":c.selected?PO(o,n):void 0,"data-ownedby":NO(o),"data-ssr":B(i.get(`ssr`)),id:FO(o,n),tabIndex:c.selected&&d?0:-1,onFocus(){r({type:`TAB_FOCUS`,value:n})},onBlur(e){e.relatedTarget?.getAttribute(`role`)!==`tab`&&r({type:`TAB_BLUR`})},onClick(e){if(e.defaultPrevented||$n(e)||Qn(e)||e.shiftKey&&Zt(e.currentTarget)||s)return;Nn()&&e.currentTarget.focus();let t=e.currentTarget;a(`navigate`)!=null&&Zt(t)&&e.preventDefault(),r({type:`TAB_CLICK`,value:n})}})},getContentProps(e){let{value:n}=e,r=i.get(`value`)===n;return t.element({...jO.content.attrs,dir:a(`dir`),id:PO(o,n),tabIndex:d?0:-1,"aria-labelledby":FO(o,n),role:`tabpanel`,"data-ownedby":NO(o),"data-selected":B(r),"data-orientation":a(`orientation`),hidden:!r})},getIndicatorProps(){let e=i.get(`indicatorRect`),n=i.get(`animateIndicator`);return t.element({id:IO(o),...jO.indicator.attrs,dir:a(`dir`),"data-orientation":a(`orientation`),hidden:YO(e),onTransitionEnd(e){Zn(e)===e.currentTarget&&r({type:`INDICATOR_TRANSITION_END`})},style:{"--transition-property":`left, right, top, bottom, width, height`,"--left":R(e?.x),"--top":R(e?.y),"--width":R(e?.width),"--height":R(e?.height),position:`absolute`,willChange:n?`var(--transition-property)`:`auto`,transitionProperty:n?`var(--transition-property)`:`none`,transitionDuration:n?`var(--transition-duration, 150ms)`:`0ms`,transitionTimingFunction:`var(--transition-timing-function)`,[u?`left`:`top`]:u?`var(--left)`:`var(--top)`}})}}}var YO=e=>e==null||e.width===0&&e.height===0&&e.x===0&&e.y===0,{createMachine:XO}=Et(),ZO=XO({props({props:e}){return{dir:`ltr`,orientation:`horizontal`,activationMode:`automatic`,loopFocus:!0,composite:!0,defaultValue:null,...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}})),focusedValue:t(()=>({defaultValue:e(`value`)||e(`defaultValue`),sync:!0,onChange(t){e(`onFocusChange`)?.({focusedValue:t})}})),ssr:t(()=>({defaultValue:!0})),indicatorRect:t(()=>({defaultValue:null})),animateIndicator:t(()=>({defaultValue:!1}))}},refs(){return{indicatorCleanup:null,prevValue:null,focusFrame:Qr.create()}},watch({context:e,prop:t,track:n,action:r}){n([()=>e.get(`value`)],()=>{r([`syncIndicatorAnimation`,`syncIndicatorRect`,`syncTabIndex`])}),n([()=>t(`dir`),()=>t(`orientation`)],()=>{r([`syncIndicatorRect`])})},on:{SET_VALUE:{actions:[`setValue`]},CLEAR_VALUE:{actions:[`clearValue`]},SET_INDICATOR_RECT:{actions:[`setIndicatorRect`]},SYNC_TAB_INDEX:{actions:[`syncTabIndex`]},INDICATOR_TRANSITION_END:{actions:[`clearIndicatorAnimation`]}},entry:[`syncPrevValue`,`syncIndicatorRect`,`syncTabIndex`,`syncSsr`],exit:[`cleanupObserver`,`cancelFocusFrame`],states:{idle:{on:{TAB_FOCUS:{target:`focused`,actions:[`setFocusedValue`]},TAB_CLICK:{target:`focused`,actions:[`setFocusedValue`,`setValue`,`requestNavigation`]}}},focused:{exit:[`cancelFocusFrame`],on:{TAB_CLICK:{actions:[`setFocusedValue`,`setValue`,`requestNavigation`]},ARROW_PREV:[{guard:`selectOnFocus`,actions:[`focusPrevTab`,`selectFocusedTab`]},{actions:[`focusPrevTab`]}],ARROW_NEXT:[{guard:`selectOnFocus`,actions:[`focusNextTab`,`selectFocusedTab`]},{actions:[`focusNextTab`]}],HOME:[{guard:`selectOnFocus`,actions:[`focusFirstTab`,`selectFocusedTab`]},{actions:[`focusFirstTab`]}],END:[{guard:`selectOnFocus`,actions:[`focusLastTab`,`selectFocusedTab`]},{actions:[`focusLastTab`]}],TAB_FOCUS:{actions:[`setFocusedValue`]},TAB_BLUR:{target:`idle`,actions:[`clearFocusedValue`]}}}},implementations:{guards:{selectOnFocus:({prop:e})=>e(`activationMode`)===`automatic`},actions:{selectFocusedTab({context:e,prop:t,event:n,scope:r}){H(()=>{let i=e.get(`focusedValue`);if(!i)return;let a=t(`deselectable`)&&e.get(`value`)===i?null:i;if(e.get(`value`)!==a){if(n.src===`keyboard`){let e=zO(r,i);if(Zt(e)&&t(`navigate`)!==null){e.click();return}}e.set(`value`,a)}})},setFocusedValue({context:e,event:t,flush:n}){t.value!=null&&n(()=>{e.set(`focusedValue`,t.value)})},clearFocusedValue({context:e}){e.set(`focusedValue`,null)},setValue({context:e,event:t,prop:n}){let r=n(`deselectable`)&&e.get(`value`)===e.get(`focusedValue`);e.set(`value`,r?null:t.value)},clearValue({context:e}){e.set(`value`,null)},focusFirstTab({scope:e,refs:t}){t.get(`focusFrame`).request(()=>{HO(e)?.focus()})},focusLastTab({scope:e,refs:t}){t.get(`focusFrame`).request(()=>{UO(e)?.focus()})},focusNextTab({context:e,prop:t,scope:n,event:r,refs:i}){let a=r.value??e.get(`focusedValue`);if(!a)return;let o=WO(n,{value:a,loopFocus:t(`loopFocus`)});i.get(`focusFrame`).request(()=>{t(`composite`)?o?.focus():o?.dataset.value!=null&&e.set(`focusedValue`,o.dataset.value)})},focusPrevTab({context:e,prop:t,scope:n,event:r,refs:i}){let a=r.value??e.get(`focusedValue`);if(!a)return;let o=GO(n,{value:a,loopFocus:t(`loopFocus`)});i.get(`focusFrame`).request(()=>{t(`composite`)?o?.focus():o?.dataset.value!=null&&e.set(`focusedValue`,o.dataset.value)})},syncTabIndex({context:e,scope:t}){H(()=>{let n=e.get(`value`);if(!n)return;let r=RO(t,n);r&&(Br(r).length>0?r.removeAttribute(`tabindex`):r.setAttribute(`tabindex`,`0`))})},cancelFocusFrame({refs:e}){e.get(`focusFrame`).cancel()},cleanupObserver({refs:e}){let t=e.get(`indicatorCleanup`);t&&t()},setIndicatorRect({context:e,event:t,scope:n}){let r=t.id??e.get(`value`);BO(n)&&r&&zO(n,r)&&e.set(`indicatorRect`,qO(n,r))},syncSsr({context:e}){e.set(`ssr`,!1)},syncPrevValue({context:e,refs:t}){t.set(`prevValue`,e.get(`value`))},syncIndicatorAnimation({context:e,refs:t}){let n=t.get(`prevValue`),r=e.get(`value`),i=n!=null&&r!=null&&n!==r;e.set(`animateIndicator`,i),t.set(`prevValue`,r)},clearIndicatorAnimation({context:e}){e.set(`animateIndicator`,!1)},syncIndicatorRect({context:e,refs:t,scope:n}){let r=t.get(`indicatorCleanup`);if(r&&r(),!BO(n))return;let i=()=>{let t=zO(n,e.get(`value`));if(!t)return;let r=KO(t);e.set(`indicatorRect`,e=>T(e,r)?e:r)};i();let a=VO(n),o=LO(n),s=I(...a.map(e=>Bi.observe(e,i)),...o?[Bi.observe(o,i)]:[]);t.set(`indicatorCleanup`,s)},requestNavigation({event:e,prop:t,scope:n}){let r=t(`navigate`);if(!r||e.value==null)return;let i=zO(n,e.value);Zt(i)&&r({value:e.value,node:i,href:i.href})}}}}),QO=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro(),{dir:r}=ao();return JO(Oa(ZO,{id:t,dir:r,getRootNode:n,...e}),Na)},$O=K(),ek=(0,s.forwardRef)((e,t)=>{let[n,r]=tS(e),[i,a]=$O(r,[`activationMode`,`composite`,`defaultValue`,`deselectable`,`id`,`ids`,`loopFocus`,`navigate`,`onFocusChange`,`onValueChange`,`orientation`,`translations`,`value`]),o=QO(i),s=z(o.getRootProps(),a);return(0,G.jsx)(CO,{value:o,children:(0,G.jsx)($9,{value:n,children:(0,G.jsx)(U.div,{...s,ref:t})})})});ek.displayName=`TabsRoot`;var[tk,nk]=W({name:`PaginationContext`,hookName:`usePaginationContext`,providerName:`<PaginationProvider />`}),rk=e=>e.children(nk()),ik=K(),ak=(0,s.forwardRef)((e,t)=>{let[n,r]=ik(e,[`index`]),i=z(nk().getEllipsisProps(n),r);return(0,G.jsx)(U.div,{...i,ref:t})});ak.displayName=`PaginationEllipsis`;var ok=K(),sk=(0,s.forwardRef)((e,t)=>{let[n,r]=ok(e,[`value`,`type`]),i=nk(),a=z(i.getItemProps(n),r);return i.type===`link`?(0,G.jsx)(U.a,{...a,ref:t}):(0,G.jsx)(U.button,{...a,ref:t})});sk.displayName=`PaginationItem`;var ck=(0,s.forwardRef)((e,t)=>{let n=nk(),r=z(n.getNextTriggerProps(),e);return n.type===`link`?(0,G.jsx)(U.a,{...r,ref:t}):(0,G.jsx)(U.button,{...r,ref:t})});ck.displayName=`PaginationNextTrigger`;var lk=(0,s.forwardRef)((e,t)=>{let n=nk(),r=z(n.getPrevTriggerProps(),e);return n.type===`link`?(0,G.jsx)(U.a,{...r,ref:t}):(0,G.jsx)(U.button,{...r,ref:t})});lk.displayName=`PaginationPrevTrigger`;var uk=oo(`pagination`).parts(`root`,`item`,`ellipsis`,`firstTrigger`,`prevTrigger`,`nextTrigger`,`lastTrigger`).build(),dk=e=>e.ids?.root??`pagination:${e.id}`,fk=e=>e.ids?.firstTrigger??`pagination:${e.id}:first`,pk=e=>e.ids?.prevTrigger??`pagination:${e.id}:prev`,mk=e=>e.ids?.nextTrigger??`pagination:${e.id}:next`,hk=e=>e.ids?.lastTrigger??`pagination:${e.id}:last`,gk=(e,t)=>e.ids?.ellipsis?.(t)??`pagination:${e.id}:ellipsis:${t}`,_k=(e,t)=>e.ids?.item?.(t)??`pagination:${e.id}:item:${t}`,vk=(e,t)=>{let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)},yk=e=>e.map(e=>te(e)?{type:`page`,value:e}:{type:`ellipsis`}),bk=`ellipsis`,xk=e=>{let{page:t,totalPages:n,siblingCount:r,boundaryCount:i=1}=e;if(n<=0)return[];if(n===1)return[1];let a=n,o=Math.max(t-r,1),s=Math.min(t+r,a),c=Math.min(r*2+3+i*2,n);if(n<=c)return vk(1,a);let l=c-1-i,u=o>1+i+1&&Math.abs(o-1)>i+1,d=s<a-i-1&&Math.abs(a-s)>i+1,f=[];if(!u&&d){let e=vk(1,l);f.push(...e,bk),f.push(...vk(a-i+1,a))}else if(u&&!d){f.push(...vk(1,1+i-1)),f.push(bk);let e=vk(a-l+1,a);f.push(...e)}else if(u&&d){f.push(...vk(1,1+i-1)),f.push(bk);let e=vk(o,s);f.push(...e),f.push(bk),f.push(...vk(a-i+1,a))}else f.push(...vk(1,a));for(let e=0;e<f.length;e++)if(f[e]===bk){let t=te(f[e-1])?f[e-1]:0;(te(f[e+1])?f[e+1]:n+1)-t===2&&(f[e]=t+1)}return f},Sk=e=>yk(xk(e)),Ck={rootLabel:`pagination`,firstTriggerLabel:`first page`,prevTriggerLabel:`previous page`,nextTriggerLabel:`next page`,lastTriggerLabel:`last page`,itemLabel({page:e,totalPages:t}){return`${t>1&&e===t?`last page, `:``}page ${e}`}};function wk(e,t){let{send:n,scope:r,prop:i,computed:a,context:o}=e,s=a(`totalPages`),c=o.get(`page`),l=o.get(`pageSize`),u=je(Ck,i(`translations`)),d=i(`count`),f=i(`getPageUrl`),p=i(`type`),m=a(`previousPage`),h=a(`nextPage`),g=a(`pageRange`),_=c===1,v=c>=s,y=(e,t)=>{if(p===`link`){if(t||e==null)return{role:`link`,"aria-disabled":!0};if(f)return{href:f({page:e,pageSize:l})}}};return{count:d,page:c,pageSize:l,totalPages:s,pages:Sk({page:c,totalPages:s,siblingCount:i(`siblingCount`),boundaryCount:i(`boundaryCount`)}),previousPage:m,nextPage:h,pageRange:g,type:p,getPageUrl(e){return f?.({page:e,pageSize:l})},slice(e){return e.slice(g.start,g.end)},setPageSize(e){n({type:`SET_PAGE_SIZE`,size:e})},setPage(e){n({type:`SET_PAGE`,page:e})},goToNextPage(){n({type:`NEXT_PAGE`})},goToPrevPage(){n({type:`PREVIOUS_PAGE`})},goToFirstPage(){n({type:`FIRST_PAGE`})},goToLastPage(){n({type:`LAST_PAGE`})},getRootProps(){return t.element({id:dk(r),...uk.root.attrs,dir:i(`dir`),"aria-label":u.rootLabel})},getEllipsisProps(e){return t.element({id:gk(r,e.index),...uk.ellipsis.attrs,dir:i(`dir`)})},getItemProps(e){let a=e.value,o=a===c;return t.element({id:_k(r,a),...uk.item.attrs,dir:i(`dir`),"data-index":a,"data-selected":B(o),"aria-current":o?`page`:void 0,"aria-label":u.itemLabel?.({page:a,totalPages:s}),onClick(){n({type:`SET_PAGE`,page:a})},...p===`button`&&{type:`button`},...p===`link`&&f&&{href:f({page:a,pageSize:l})}})},getPrevTriggerProps(){return t.element({id:pk(r),...uk.prevTrigger.attrs,dir:i(`dir`),"data-disabled":B(_),"aria-label":u.prevTriggerLabel,onClick(){n({type:`PREVIOUS_PAGE`})},...p===`button`&&{disabled:_,type:`button`},...y(m,_)})},getFirstTriggerProps(){return t.element({id:fk(r),...uk.firstTrigger.attrs,dir:i(`dir`),"data-disabled":B(_),"aria-label":u.firstTriggerLabel,onClick(){n({type:`FIRST_PAGE`})},...p===`button`&&{disabled:_,type:`button`},...y(1,_)})},getNextTriggerProps(){return t.element({id:mk(r),...uk.nextTrigger.attrs,dir:i(`dir`),"data-disabled":B(v),"aria-label":u.nextTriggerLabel,onClick(){n({type:`NEXT_PAGE`})},...p===`button`&&{disabled:v,type:`button`},...y(h,v)})},getLastTriggerProps(){return t.element({id:hk(r),...uk.lastTrigger.attrs,dir:i(`dir`),"data-disabled":B(v),"aria-label":u.lastTriggerLabel,onClick(){n({type:`LAST_PAGE`})},...p===`button`&&{disabled:v,type:`button`},...y(s,v)})}}}var Tk=Tt({props({props:e}){return{defaultPageSize:10,siblingCount:1,boundaryCount:1,defaultPage:1,type:`button`,count:1,...e}},initialState(){return`idle`},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({value:e(`page`),defaultValue:e(`defaultPage`),onChange(t){let r=n();e(`onPageChange`)?.({page:t,pageSize:r.get(`pageSize`)})}})),pageSize:t(()=>({value:e(`pageSize`),defaultValue:e(`defaultPageSize`),onChange(t){e(`onPageSizeChange`)?.({pageSize:t})}}))}},watch({track:e,context:t,action:n}){e([()=>t.get(`pageSize`)],()=>{n([`setPageIfNeeded`])})},computed:{totalPages:et(({prop:e,context:t})=>[t.get(`pageSize`),e(`count`)],([e,t])=>Math.ceil(t/e)),pageRange:et(({context:e,prop:t})=>[e.get(`page`),e.get(`pageSize`),t(`count`)],([e,t,n])=>{let r=(e-1)*t;return{start:r,end:Math.min(r+t,n)}}),previousPage:({context:e})=>e.get(`page`)===1?null:e.get(`page`)-1,nextPage:({context:e,computed:t})=>e.get(`page`)===t(`totalPages`)?null:e.get(`page`)+1,isValidPage:({context:e,computed:t})=>e.get(`page`)>=1&&e.get(`page`)<=t(`totalPages`)},on:{SET_PAGE:{guard:`isValidPage`,actions:[`setPage`]},SET_PAGE_SIZE:{actions:[`setPageSize`]},FIRST_PAGE:{actions:[`goToFirstPage`]},LAST_PAGE:{actions:[`goToLastPage`]},PREVIOUS_PAGE:{guard:`canGoToPrevPage`,actions:[`goToPrevPage`]},NEXT_PAGE:{guard:`canGoToNextPage`,actions:[`goToNextPage`]}},states:{idle:{}},implementations:{guards:{isValidPage:({event:e,computed:t})=>e.page>=1&&e.page<=t(`totalPages`),isValidCount:({context:e,event:t})=>e.get(`page`)>t.count,canGoToNextPage:({context:e,computed:t})=>e.get(`page`)<t(`totalPages`),canGoToPrevPage:({context:e})=>e.get(`page`)>1},actions:{setPage({context:e,event:t,computed:n}){let r=Ek(t.page,n(`totalPages`));e.set(`page`,r)},setPageSize({context:e,event:t}){e.set(`pageSize`,t.size)},goToFirstPage({context:e}){e.set(`page`,1)},goToLastPage({context:e,computed:t}){e.set(`page`,t(`totalPages`))},goToPrevPage({context:e,computed:t}){e.set(`page`,e=>Ek(e-1,t(`totalPages`)))},goToNextPage({context:e,computed:t}){e.set(`page`,e=>Ek(e+1,t(`totalPages`)))},setPageIfNeeded({context:e,computed:t}){t(`isValidPage`)||e.set(`page`,1)}}}}),Ek=(e,t)=>Math.min(Math.max(e,1),t),Dk=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro(),{dir:r}=ao();return wk(Oa(Tk,{id:t,dir:r,getRootNode:n,...e}),Na)},Ok=K(),kk=(0,s.forwardRef)((e,t)=>{let[n,r]=Ok(e,[`boundaryCount`,`count`,`defaultPage`,`defaultPageSize`,`getPageUrl`,`id`,`ids`,`onPageChange`,`onPageSizeChange`,`page`,`pageSize`,`siblingCount`,`translations`,`type`]),i=Dk(n),a=z(i.getRootProps(),r);return(0,G.jsx)(tk,{value:i,children:(0,G.jsx)(U.nav,{...a,ref:t})})});kk.displayName=`PaginationRoot`;var Ak=e=>{let{collapsible:t,children:n}=e;return t.isUnmounted?null:t.hideMode===`activity`&&Ra?(0,G.jsx)(Ra,{mode:t.visible?`visible`:`hidden`,children:n}):n},[jk,Mk]=W({name:`CollapsibleContext`,hookName:`useCollapsibleContext`,providerName:`<CollapsibleProvider />`}),Nk=(0,s.forwardRef)((e,t)=>{let n=Mk(),r=z(n.getContentProps(),n.hideMode===`activity`?{hidden:!1}:{},e);return(0,G.jsx)(Ak,{collapsible:n,children:(0,G.jsx)(U.div,{...r,ref:t})})});Nk.displayName=`CollapsibleContent`;var Pk=e=>K()(e,[`collapsedHeight`,`collapsedWidth`,`defaultOpen`,`disabled`,`hideMode`,`id`,`ids`,`lazyMount`,`onExitComplete`,`onOpenChange`,`open`,`unmountOnExit`]),Fk=oo(`collapsible`).parts(`root`,`trigger`,`content`,`indicator`).build(),Ik=e=>e.ids?.root??`collapsible:${e.id}`,Lk=e=>e.ids?.content??`collapsible:${e.id}:content`,Rk=e=>e.ids?.trigger??`collapsible:${e.id}:trigger`,zk=e=>e.getById(Lk(e));function Bk(e,t){let{state:n,send:r,context:i,scope:a,prop:o}=e,s=n.matches(`open`)||n.matches(`closing`),c=n.matches(`open`),l=n.matches(`closed`),{width:u,height:d}=i.get(`size`),f=!!o(`disabled`),p=o(`collapsedHeight`),m=o(`collapsedWidth`),h=p!=null,g=m!=null,_=h||g,v=!i.get(`initial`)&&c;return{disabled:f,visible:s,open:c,measureSize(){r({type:`size.measure`})},setOpen(e){r({type:e?`open`:`close`,replaces:`open`})},getRootProps(){return t.element({...Fk.root.attrs,"data-state":c?`open`:`closed`,dir:o(`dir`),id:Ik(a)})},getContentProps(){return t.element({...Fk.content.attrs,id:Lk(a),"data-collapsible":``,"data-state":v?void 0:c?`open`:`closed`,"data-disabled":B(f),"data-has-collapsed-size":B(_),hidden:!s&&!_,dir:o(`dir`),style:{"--height":R(d),"--width":R(u),"--collapsed-height":R(p),"--collapsed-width":R(m),...l&&h&&{overflow:`hidden`,minHeight:R(p),maxHeight:R(p)},...l&&g&&{overflow:`hidden`,minWidth:R(m),maxWidth:R(m)}}})},getTriggerProps(){return t.button({...Fk.trigger.attrs,id:Rk(a),dir:o(`dir`),type:`button`,"data-state":c?`open`:`closed`,"data-disabled":B(f),disabled:f,"aria-controls":Lk(a),"aria-expanded":s||!1,onClick(e){e.defaultPrevented||f||r({type:c?`close`:`open`})}})},getIndicatorProps(){return t.element({...Fk.indicator.attrs,dir:o(`dir`),"data-state":c?`open`:`closed`,"data-disabled":B(f)})}}}var Vk=Tt({initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t(`open`)],()=>{n([`setInitial`,`computeSize`,`toggleVisibility`])})},exit:[`cleanupNode`],states:{closed:{effects:[`trackTabbableElements`],on:{"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitial`,`computeSize`,`invokeOnOpen`]}]}},closing:{effects:[`trackExitAnimation`],on:{"controlled.close":{target:`closed`},"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitial`,`invokeOnOpen`]}],close:[{guard:`isOpenControlled`,actions:[`invokeOnExitComplete`]},{target:`closed`,actions:[`setInitial`,`computeSize`,`invokeOnExitComplete`]}],"animation.end":{target:`closed`,actions:[`invokeOnExitComplete`,`clearInitial`]}}},open:{effects:[`trackEnterAnimation`],on:{"controlled.close":{target:`closing`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closing`,actions:[`setInitial`,`computeSize`,`invokeOnClose`]}],"size.measure":{actions:[`measureSize`]},"animation.end":{actions:[`clearInitial`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n,r=H(()=>{let r=zk(t);if(!r)return;let i=fn(r).animationName;if(!i||i===`none`){e({type:`animation.end`});return}let a=t=>{Zn(t)===r&&e({type:`animation.end`})};r.addEventListener(`animationend`,a),n=()=>{r.removeEventListener(`animationend`,a)}});return()=>{r(),n?.()}},trackExitAnimation:({send:e,scope:t})=>{let n,r=H(()=>{let r=zk(t);if(!r)return;let i=fn(r).animationName;if(!i||i===`none`){e({type:`animation.end`});return}let a=t=>{Zn(t)===r&&e({type:`animation.end`})};r.addEventListener(`animationend`,a);let o=na(r,{animationFillMode:`forwards`});n=()=>{r.removeEventListener(`animationend`,a),$r(()=>o())}});return()=>{r(),n?.()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t(`collapsedHeight`)&&!t(`collapsedWidth`))return;let n=zk(e);if(!n)return;let r=()=>{let e=Hr(n).map(e=>ta(e,`inert`,``));return()=>{e.forEach(e=>e())}},i=r(),a=si(n,{callback(){i(),i=r()}});return()=>{i(),a()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set(`initial`,!0)})},clearInitial:({context:e})=>{e.set(`initial`,!1)},cleanupNode:({refs:e})=>{e.get(`cleanup`)?.(),e.set(`stylesRef`,null)},measureSize:({context:e,scope:t})=>{let n=zk(t);if(!n)return;let{height:r,width:i}=n.getBoundingClientRect();e.set(`size`,{height:r,width:i})},computeSize:({refs:e,scope:t,context:n})=>{e.get(`cleanup`)?.();let r=H(()=>{let e=zk(t);if(!e)return;let r=e.hidden;e.style.animationName=`none`,e.style.animationDuration=`0s`,e.hidden=!1;let i=e.getBoundingClientRect();n.set(`size`,{height:i.height,width:i.width}),n.get(`initial`)&&(e.style.animationName=``,e.style.animationDuration=``),e.hidden=r});e.set(`cleanup`,r)},invokeOnOpen:({prop:e})=>{e(`onOpenChange`)?.({open:!0})},invokeOnClose:({prop:e})=>{e(`onOpenChange`)?.({open:!1})},invokeOnExitComplete:({prop:e})=>{e(`onExitComplete`)?.()},toggleVisibility:({prop:e,send:t})=>{t({type:e(`open`)?`controlled.open`:`controlled.close`})}}}}),Hk=(e={})=>{let{lazyMount:t,unmountOnExit:n,hideMode:r=`display-none`,...i}=e,a=(0,s.useId)(),o=(0,s.useRef)(!1),{dir:c}=ao(),{getRootNode:l}=ro(),u=Bk(Oa(Vk,{id:a,dir:c,getRootNode:l,...i}),Na);u.visible&&(o.current=!0);let d=!u.visible&&!o.current&&t||n&&!u.visible&&o.current,f=r===`activity`&&za?`activity`:`display-none`;return{...u,isUnmounted:d,hideMode:f}},Uk=(0,s.forwardRef)((e,t)=>{let[n,r]=Pk(e),i=Hk(n),a=z(i.getRootProps(),r);return(0,G.jsx)(jk,{value:i,children:(0,G.jsx)(U.div,{...a,ref:t})})});Uk.displayName=`CollapsibleRoot`;var Wk=(0,s.forwardRef)((e,t)=>{let n=z(Mk().getTriggerProps(),e);return(0,G.jsx)(U.button,{...n,ref:t})});Wk.displayName=`CollapsibleTrigger`;var[Gk,Kk]=W({name:`NavigationMenuContext`,hookName:`useNavigationMenuContext`,providerName:`<NavigationMenuProvider />`}),[qk,Jk]=W({name:`NavigationMenuItemPropsContext`,hookName:`useNavigationMenuItemPropsContext`,providerName:`<NavigationMenuItemPropsProvider />`,strict:!1}),Yk=K(),Xk=(0,s.forwardRef)((e,t)=>{let n=Kk(),r=Jk(),i=e.value??r?.value,[a,o]=Yk({...e,value:i},[`value`]),s=eo({...eS(),present:n.value===i}),c=z(n.getContentProps(a),s.getPresenceProps(),o),u=l(s.ref,t),d=(0,G.jsx)(Va,{value:s,children:(0,G.jsx)(Ba,{presence:s,children:(0,G.jsx)(U.div,{...c,ref:u})})}),f=n.isViewportRendered?n.getViewportNode():null;return n.isViewportRendered&&f?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{...n.getViewportProxyProps(a)}),(0,G.jsx)(`div`,{...n.getTriggerProxyProps(a)}),(0,G.jsx)(Au,{container:{current:f},children:d})]}):d});Xk.displayName=`NavigationMenuContent`;var Zk=(0,s.forwardRef)((e,t)=>{let n=Kk(),r=eo({...eS(),present:n.open}),i=z(n.getIndicatorProps(),r.getPresenceProps(),e),a=l(r.ref,t);return(0,G.jsx)(Va,{value:r,children:(0,G.jsx)(Ba,{presence:r,children:(0,G.jsx)(U.div,{...i,ref:a})})})});Zk.displayName=`NavigationMenuIndicator`;var Qk=K(),$k=(0,s.forwardRef)((e,t)=>{let[n,r]=Qk(e,[`disabled`,`value`]),i=z(Kk().getItemProps(n),r);return(0,G.jsx)(qk,{value:n,children:(0,G.jsx)(U.div,{...i,ref:t})})});$k.displayName=`NavigationMenuItem`;var eA=K(),tA=(0,s.forwardRef)((e,t)=>{let n=Jk(),r=e.value??n?.value,[i,a]=eA({...e,value:r},[`current`,`onSelect`,`value`,`closeOnClick`]),o=z(Kk().getLinkProps(i),a);return(0,G.jsx)(U.a,{...o,ref:t})});tA.displayName=`NavigationMenuLink`;var nA=(0,s.forwardRef)((e,t)=>{let n=z(Kk().getListProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});nA.displayName=`NavigationMenuList`;var rA=oo(`navigation-menu`).parts(`root`,`viewportPositioner`,`viewport`,`trigger`,`content`,`list`,`item`,`link`,`indicator`,`itemIndicator`,`arrow`).build(),iA=e=>e.ids?.root??`nav-menu:${e.id}`,aA=(e,t)=>e.ids?.trigger?.(t)??`nav-menu:${e.id}:trigger:${t}`,oA=(e,t)=>e.ids?.triggerProxy?.(t)??`nav-menu:${e.id}:trigger-proxy:${t}`,sA=(e,t)=>e.ids?.content?.(t)??`nav-menu:${e.id}:content:${t}`,cA=e=>e.ids?.viewport??`nav-menu:${e.id}:viewport`,lA=e=>e.ids?.list??`nav-menu:${e.id}:list`,uA=(e,t)=>e.ids?.item?.(t)??`nav-menu:${e.id}:item:${t}`,dA=e=>e.getById(iA(e)),fA=e=>e.getById(cA(e)),pA=(e,t)=>t?e.getById(aA(e,t)):null,mA=(e,t)=>t?e.getById(oA(e,t)):null,hA=e=>e.getById(lA(e)),gA=(e,t)=>t?e.getById(sA(e,t)):null,_A=e=>Ai(e.getDoc(),`[data-scope=navigation-menu][data-part=content][data-uid='${e.id}']`),vA=(e,t)=>Hr(gA(e,t)),yA=e=>Ai(hA(e),`[data-part=trigger][data-uid='${e.id}']`),bA=(e,t)=>Ai(gA(e,t),`[data-part=link]${Rt(sA(e,t))}`),xA=e=>{let t=`[data-part=trigger][data-uid='${e.id}']:not([data-disabled])`;return Ai(hA(e),`${t}, [data-part=item] > [data-part=link]`)};function SA(e,t){if(!e.length)return;let n=0,r=new(on(e[0])).ResizeObserver(()=>{cancelAnimationFrame(n),n=requestAnimationFrame(t)});return e.forEach(e=>{e&&r.observe(e)}),()=>{cancelAnimationFrame(n),e.forEach(e=>{e&&r.unobserve(e)})}}function CA(e,t,n){let r=yA(e),i=r[0].dir,a=r.map(e=>e.getAttribute(`data-value`));i===`rtl`&&a.reverse();let o=a.indexOf(t),s=a.indexOf(n);_A(e).forEach(e=>{let n=e.dataset.value,r=t===n,i=s===a.indexOf(n);if(!r&&!i){delete e.dataset.motion;return}let c=(()=>{if(o!==s){if(r&&s!==-1)return o>s?`from-end`:`from-start`;if(i&&o!==-1)return o>s?`to-start`:`to-end`}return null})();c?e.dataset.motion=c:delete e.dataset.motion})}function wA(e,t){let n=e.getActiveElement();return t.some(t=>t===n||(t.focus(),e.getActiveElement()!==n))}function TA(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute(`tabindex`,t)})}}function EA(e,t){let{context:n,send:r,prop:i,scope:a}=e,o=i(`translations`),s=n.get(`triggerRect`),c=n.get(`viewportSize`),l=n.get(`viewportPosition`),u=n.get(`value`),d=n.get(`previousValue`),f=!!u,p=n.get(`isViewportRendered`),m=u&&!d;function h(e){let t=u===e.value,n=!u&&d===e.value;return{itemId:uA(a,e.value),triggerId:aA(a,e.value),triggerProxyId:oA(a,e.value),contentId:sA(a,e.value),selected:t,wasSelected:n,open:t||n,disabled:!!e.disabled}}return{open:f,value:u,orientation:i(`orientation`),isViewportRendered:p,getViewportNode(){return fA(a)},setValue(e){r({type:`VALUE.SET`,value:e})},reposition(){r({type:`VIEWPORT.POSITION`})},getRootProps(){return t.element({...rA.root.attrs,id:iA(a),"aria-label":o?.rootLabel,"data-orientation":i(`orientation`),dir:i(`dir`),style:{"--trigger-width":R(s?.width),"--trigger-height":R(s?.height),"--trigger-x":R(s?.x),"--trigger-y":R(s?.y),"--viewport-width":R(c?.width),"--viewport-height":R(c?.height),"--viewport-x":R(l?.x),"--viewport-y":R(l?.y)}})},getListProps(){return t.element({...rA.list.attrs,id:lA(a),dir:i(`dir`),"data-orientation":i(`orientation`),style:{position:`relative`}})},getItemProps(e){let n=h(e);return t.element({...rA.item.attrs,id:n.itemId,dir:i(`dir`),"data-value":e.value,"data-state":n.open?`open`:`closed`,"data-orientation":i(`orientation`),"data-disabled":B(n.disabled),onKeyDown(t){switch(t.key){case`ArrowDown`:case`ArrowUp`:case`ArrowLeft`:case`ArrowRight`:case`Home`:case`End`:r({type:`ITEM.NAVIGATE`,value:e.value,key:t.key}),t.preventDefault(),t.stopPropagation()}}})},getIndicatorProps(){return t.element({...rA.indicator.attrs,"aria-hidden":!0,dir:i(`dir`),hidden:!f,"data-state":f?`open`:`closed`,"data-orientation":i(`orientation`),style:{position:`absolute`,transition:m?`none`:void 0}})},getArrowProps(){return t.element({...rA.arrow.attrs,"aria-hidden":!0,dir:i(`dir`),"data-orientation":i(`orientation`)})},getTriggerProps(e){let n=h(e);return t.button({...rA.trigger.attrs,id:n.triggerId,type:`button`,"data-uid":i(`id`),"data-trigger-proxy-id":oA(a,e.value),dir:i(`dir`),disabled:n.disabled,"data-value":e.value,"data-state":n.selected?`open`:`closed`,"data-disabled":B(n.disabled),"aria-controls":n.contentId,"aria-expanded":n.selected,onPointerEnter(t){i(`disableHoverTrigger`)||t.pointerType===`mouse`&&(n.disabled||r({type:`TRIGGER.POINTERENTER`,value:e.value}))},onPointerLeave(t){i(`disableHoverTrigger`)||t.pointerType===`mouse`&&(n.disabled||r({type:`TRIGGER.POINTERLEAVE`,value:e.value}))},onClick(){i(`disableClickTrigger`)||r({type:`TRIGGER.CLICK`,value:e.value})},onKeyDown(e){let t={horizontal:`ArrowDown`,vertical:i(`dir`)===`rtl`?`ArrowLeft`:`ArrowRight`}[i(`orientation`)];if(f&&e.key===t){r({type:`CONTENT.FOCUS`,side:`start`}),e.preventDefault(),e.stopPropagation();return}let n=ci(xA(a),e.currentTarget,{key:e.key,orientation:i(`orientation`),dir:i(`dir`),loop:!1});n&&(n.focus(),e.preventDefault(),e.stopPropagation())}})},getTriggerProxyProps(e){let n=h(e);return t.element({"aria-hidden":!0,tabIndex:0,"data-trigger-proxy":``,id:n.triggerProxyId,"data-trigger-id":n.triggerId,hidden:!n.selected,style:ca,onFocus(t){let n=gA(a,e.value);if(!n)return;let i=t.relatedTarget,o=i===pA(a,e.value),s=nn(n,i);(o||!s)&&r({type:`CONTENT.FOCUS`,side:o?`start`:`end`})}})},getViewportProxyProps(e){return!h(e).selected||!p?{hidden:!0}:t.element({"aria-owns":sA(a,e.value)})},getLinkProps(e){let{closeOnClick:n=!0}=e;return t.element({...rA.link.attrs,dir:i(`dir`),"data-value":e.value,"data-current":B(e.current),"aria-current":e.current?`page`:void 0,"data-ownedby":sA(a,e.value),onClick(t){let i=t.currentTarget,a=on(i),o=e.onSelect;i.addEventListener(`link.select`,o,{once:!0});let s=new a.CustomEvent(`link.select`,{bubbles:!0,cancelable:!0,detail:{originalEvent:t}});i.dispatchEvent(s),n&&!s.defaultPrevented&&!t.metaKey&&r({type:`CLOSE`})},onKeyDown(t){let n=t.currentTarget,r=ci(n.closest(`[data-scope="navigation-menu"][data-part="content"]`)?bA(a,e.value):xA(a),n,{key:t.key,orientation:i(`orientation`),dir:i(`dir`),loop:!1});r&&(r.focus(),t.preventDefault(),t.stopPropagation())}})},getContentProps(e){let o=h(e),s=n.get(`value`)||n.get(`previousValue`),c=p?s===e.value:o.selected;return t.element({...rA.content.attrs,id:o.contentId,dir:i(`dir`),hidden:!c,"aria-labelledby":o.triggerId,"data-uid":i(`id`),"data-state":c?`open`:`closed`,"data-orientation":i(`orientation`),"data-value":e.value,onPointerEnter(t){t.pointerType===`mouse`&&r({type:`CONTENT.POINTERENTER`,value:e.value})},onPointerLeave(t){t.pointerType===`mouse`&&r({type:`CONTENT.POINTERLEAVE`,value:e.value})},onKeyDown(t){if(t.defaultPrevented||t.currentTarget.closest(`[data-scope=navigation-menu][data-part=root]`)!==dA(a))return;let n=t.altKey||t.ctrlKey||t.metaKey,r=t.key===`Tab`&&!n,o=Hr(t.currentTarget);if(r){let n=a.getActiveElement(),r=o.findIndex(e=>e===n),i=t.shiftKey?o.slice(0,r).reverse():o.slice(r+1,o.length);if(wA(a,i))t.preventDefault();else{mA(a,e.value)?.focus();return}}if(!gr(t))return;let s=ci(o,a.getActiveElement(),{key:t.key,dir:i(`dir`),loop:!1});s&&(s.focus(),t.preventDefault(),t.stopPropagation())}})},getViewportPositionerProps(e={}){let{align:n=`center`}=e;return t.element({...rA.viewportPositioner.attrs,dir:i(`dir`),"data-orientation":i(`orientation`),"data-align":n})},getViewportProps(e={}){let{align:n=`center`}=e,o=!!u;return t.element({...rA.viewport.attrs,id:cA(a),dir:i(`dir`),hidden:!o,"data-state":o?`open`:`closed`,"data-orientation":i(`orientation`),"data-align":n,style:{transition:m?`none`:void 0,pointerEvents:o?void 0:`none`,"--viewport-width":R(c?.width),"--viewport-height":R(c?.height),"--viewport-x":R(l?.x),"--viewport-y":R(l?.y)},onPointerEnter(){r({type:`CONTENT.POINTERENTER`})},onPointerLeave(e){i(`disablePointerLeaveClose`)||e.pointerType===`mouse`&&r({type:`CONTENT.POINTERLEAVE`})}})},getItemState:h,getItemIndicatorProps(e){let n=h(e);return t.element({...rA.itemIndicator.attrs,"aria-hidden":!0,dir:i(`dir`),hidden:!n.selected,"data-state":n.selected?`open`:`closed`,"data-orientation":i(`orientation`),"data-value":e.value})}}}function DA(e,t,n){OA(e);let r=window.setTimeout(()=>{t.set(`value`,``)},n(`closeDelay`));e.set(`closeTimeoutId`,r)}function OA(e){let t=e.get(`closeTimeoutId`);t&&(clearTimeout(t),e.set(`closeTimeoutId`,null))}function kA(e,t,n){let r=e.get(`openTimeoutIds`);e.set(`openTimeoutIds`,{...r,[t]:n})}function AA(e,t){let n=e.get(`openTimeoutIds`),r=n[t];if(r){clearTimeout(r);let{[t]:i,...a}=n;e.set(`openTimeoutIds`,a)}}function jA(e){let t=e.get(`openTimeoutIds`);Object.values(t).forEach(e=>{e&&clearTimeout(e)}),e.set(`openTimeoutIds`,{})}var{createMachine:MA}=Et(),NA=MA({props({props:e}){return Je(e,[`id`]),{dir:`ltr`,openDelay:200,closeDelay:300,orientation:`horizontal`,defaultValue:``,...e}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),sync:!0,onChange(t){e(`onValueChange`)?.({value:t})}})),previousValue:t(()=>({defaultValue:``,sync:!0})),viewportSize:t(()=>({defaultValue:null,sync:!0})),isViewportRendered:t(()=>({defaultValue:!1})),viewportPosition:t(()=>({defaultValue:null})),contentNode:t(()=>({defaultValue:null})),triggerRect:t(()=>({defaultValue:null,sync:!0})),triggerNode:t(()=>({defaultValue:null}))}},computed:{open:({context:e})=>e.get(`value`)!=null},watch({track:e,action:t,context:n}){e([()=>n.get(`value`)],()=>{t([`restoreTabOrder`,`setTriggerNode`,`syncContentNode`,`syncMotionAttribute`])})},refs(){return{restoreContentTabOrder:void 0,contentResizeObserverCleanup:void 0,contentDismissableCleanup:void 0,contentExitCompleteCleanup:void 0,triggerResizeObserverCleanup:void 0,closeTimeoutId:null,openTimeoutIds:{}}},entry:[`checkViewportNode`],exit:[`cleanupObservers`,`clearAllTimeouts`],effects:[`trackDocumentResize`],initialState(){return`idle`},on:{"VALUE.SET":{actions:[`setValue`]},"VIEWPORT.POSITION":{actions:[`setViewportPosition`]},"TRIGGER.POINTERENTER":{actions:[`clearCloseTimeout`,`setValueWithDelay`]},"TRIGGER.POINTERLEAVE":[{actions:[`setCloseTimeout`,`resetValueWithDelay`]}],"TRIGGER.CLICK":[{guard:`isItemOpen`,actions:[`deselectValue`]},{actions:[`selectValue`]}],"CONTENT.FOCUS":{actions:[`restoreTabOrder`,`focusFirstTabbableEl`]},"CONTENT.BLUR":{actions:[`removeFromTabOrder`]},"CONTENT.POINTERENTER":{actions:[`clearCloseTimeout`]},"CONTENT.POINTERLEAVE":{actions:[`setCloseTimeout`]},"ITEM.NAVIGATE":{actions:[`focusNextLink`]},"ITEM.CLOSE":{actions:[`focusTrigger`,`deselectValue`]},CLOSE:{actions:[`clearAllOpenTimeouts`,`deselectValue`,`focusTriggerIfNeeded`,`removeFromTabOrder`]}},states:{idle:{}},implementations:{guards:{isItemOpen:({context:e,event:t})=>e.get(`value`)===t.value},effects:{trackDocumentResize({scope:e,send:t}){return SA([e.getDoc().body,dA(e)],()=>{t({type:`VIEWPORT.POSITION`})})}},actions:{setValue({context:e,event:t}){e.set(`value`,t.value)},clearCloseTimeout({refs:e}){OA(e)},clearAllOpenTimeouts({refs:e}){jA(e)},setCloseTimeout({refs:e,context:t,prop:n}){DA(e,t,n)},resetValueWithDelay({event:e,refs:t}){AA(t,e.value)},setValueWithDelay({event:e,prop:t,context:n,refs:r}){let i=n.get(`value`)!==``;AA(r,e.value);let a=window.setTimeout(()=>{let t=window.setTimeout(()=>{AA(r,e.value),n.set(`previousValue`,n.get(`value`)),n.set(`value`,e.value)});kA(r,e.value,t)},i?0:t(`openDelay`));kA(r,e.value,a)},selectValue:({context:e,event:t})=>{e.set(`previousValue`,e.get(`value`)),e.set(`value`,t.value)},deselectValue:({context:e})=>{e.set(`value`,``),e.set(`previousValue`,``)},syncContentNode({context:e,scope:t,refs:n,send:r}){n.get(`contentResizeObserverCleanup`)?.(),n.get(`contentDismissableCleanup`)?.(),n.get(`contentExitCompleteCleanup`)?.();let i=e.get(`previousValue`);if(i){let r=gA(t,i),a=fA(t);if(r){let t=()=>e.set(`previousValue`,``);n.set(`contentExitCompleteCleanup`,I(V(r,`exitcomplete`,t),V(a,`exitcomplete`,t)))}}let a=gA(t,e.get(`value`));if(!a)return;if(e.set(`contentNode`,a),e.get(`isViewportRendered`)){let i=SA([a],()=>{let n=gA(t,e.get(`value`));n&&(e.set(`viewportSize`,{width:n.offsetWidth,height:n.offsetHeight}),r({type:`VIEWPORT.POSITION`}))});n.set(`contentResizeObserverCleanup`,i)}let o=Yl(()=>fA(t)||gA(t,e.get(`value`)),{defer:!0,getRootNode:t.getRootNode,onFocusOutside(e){let n=e.detail.target;(n.matches(`[data-scope=navigation-menu][data-part=trigger]`)||n.matches(`[data-trigger-proxy]`))&&e.preventDefault(),e.defaultPrevented||(r({type:`CONTENT.BLUR`}),nn(dA(t),n)&&e.preventDefault())},onPointerDownOutside(e){let n=e.detail.target;if(!e.defaultPrevented){let r=yA(t).some(e=>e.contains(n)),i=nn(fA(t),n);(r||i)&&e.preventDefault()}},onDismiss(){r({type:`CLOSE`,value:e.get(`value`)})}});n.set(`contentDismissableCleanup`,o)},setTriggerNode({context:e,scope:t,refs:n}){n.get(`triggerResizeObserverCleanup`)?.();let r=pA(t,e.get(`value`));if(!r)return;e.set(`triggerNode`,r);let i=SA([r,hA(t)],()=>{let t={x:r.offsetLeft,y:r.offsetTop,width:r.offsetWidth,height:r.offsetHeight};e.set(`triggerRect`,t)});n.set(`triggerResizeObserverCleanup`,i)},syncMotionAttribute({context:e,scope:t}){e.get(`isViewportRendered`)&&CA(t,e.get(`value`),e.get(`previousValue`))},focusFirstTabbableEl({event:e,scope:t,context:n}){H(()=>{let r=vA(t,e.value||n.get(`value`)),i=e.side===`start`?r:r.reverse();i.length&&wA(t,i)})},focusNextLink({event:e,scope:t}){let n=t.getActiveElement(),r=bA(t,e.value);n!=null&&r.includes(n)&&ci(r,n,{key:e.key,loop:!1})?.focus()},focusTrigger({scope:e,event:t,context:n}){pA(e,t.value??n.get(`value`))?.focus()},focusTriggerIfNeeded({event:e,scope:t}){let n=e.value;nn(gA(t,n),t.getActiveElement())&&pA(t,n)?.focus()},removeFromTabOrder({event:e,scope:t,refs:n,context:r}){let i=vA(t,e.value??r.get(`value`));i.length&&n.set(`restoreContentTabOrder`,TA(i))},restoreTabOrder({refs:e}){e.get(`restoreContentTabOrder`)?.()},clearAllTimeouts({refs:e}){OA(e),jA(e)},cleanupObservers({refs:e}){e.get(`contentResizeObserverCleanup`)?.(),e.get(`contentDismissableCleanup`)?.(),e.get(`triggerResizeObserverCleanup`)?.(),e.get(`restoreContentTabOrder`)?.(),e.get(`contentExitCompleteCleanup`)?.()},checkViewportNode({context:e,scope:t}){e.set(`isViewportRendered`,!!fA(t))},setViewportPosition({context:e,scope:t}){let n=e.get(`triggerNode`),r=e.get(`contentNode`),i=dA(t),a=t.getDoc(),o=fA(t)?.dataset.align||`center`;if(r&&n&&i){let t=a.documentElement.offsetWidth,s=a.documentElement.offsetHeight,c=i.getBoundingClientRect(),l=n.getBoundingClientRect(),{offsetWidth:u,offsetHeight:d}=r,f=l.left-c.left,p=l.top-c.top,m=null,h=null;switch(o){case`start`:m=f,h=p;break;case`end`:m=f-u+l.width,h=p-d+l.height;break;default:m=f-u/2+l.width/2,h=p-d/2+l.height/2}m+c.left<10&&(m=10-c.left);let g=m+c.left+u;g>t-10&&(m-=g-t+10,m<10-c.left&&(m=10-c.left)),h+c.top<10&&(h=10-c.top);let _=h+c.top+d;_>s-10&&(h-=_-s+10,h<10-c.top&&(h=10-c.top)),m=Math.round(m),h=Math.round(h),e.set(`viewportPosition`,{x:m,y:h})}}}}}),PA=e=>{let t=(0,s.useId)(),{getRootNode:n}=ro(),{dir:r}=ao();return EA(Oa(NA,{id:t,dir:r,getRootNode:n,...e}),Na)},FA=K(),IA=(0,s.forwardRef)((e,t)=>{let[n,r]=tS(e),[i,a]=FA(r,[`closeDelay`,`defaultValue`,`disableClickTrigger`,`disableHoverTrigger`,`disablePointerLeaveClose`,`id`,`ids`,`onValueChange`,`openDelay`,`orientation`,`translations`,`value`]),o=PA(i),s=z(o.getRootProps(),a);return(0,G.jsx)(Gk,{value:o,children:(0,G.jsx)($9,{value:n,children:(0,G.jsx)(U.nav,{...s,ref:t})})})});IA.displayName=`NavigationMenuRoot`;var LA=K(),RA=(0,s.forwardRef)((e,t)=>{let n=Jk();qe(n,()=>`NavigationMenu.Trigger must be used within NavigationMenu.Item`);let r=n.value,i=e.disabled??n.disabled,[a,o]=LA({...e,value:r,disabled:i},[`value`,`disabled`]),s=z(Kk().getTriggerProps(a),o);return(0,G.jsx)(U.button,{...s,ref:t})});RA.displayName=`NavigationMenuTrigger`;var[zA,BA]=W({name:`NavigationMenuViewportPropsContext`,hookName:`useNavigationMenuViewportPropsContext`,providerName:`<NavigationMenuViewportPropsProvider />`,strict:!1}),VA=(0,s.forwardRef)((e,t)=>{let n=BA(),r=Kk(),i=eo({...eS(),present:r.open}),a=z(r.getViewportProps(n),i.getPresenceProps(),e),o=l(i.ref,t);return(0,G.jsx)(Va,{value:i,children:(0,G.jsx)(Ba,{presence:i,children:(0,G.jsx)(U.div,{...a,ref:o})})})});VA.displayName=`NavigationMenuViewport`;var HA=K(),UA=(0,s.forwardRef)((e,t)=>{let[n,r]=HA(e,[`align`]),i=z(Kk().getViewportPositionerProps(n),r);return(0,G.jsx)(zA,{value:n,children:(0,G.jsx)(U.div,{...i,ref:t})})});UA.displayName=`NavigationMenuViewportPositioner`;var WA=(0,s.forwardRef)((e,t)=>{let n=Z5(),r=z(n.getErrorTextProps(),e);return n?.invalid?(0,G.jsx)(U.span,{...r,ref:t}):null});WA.displayName=`FieldErrorText`;var GA=(0,s.forwardRef)((e,t)=>{let n=z(Z5()?.getHelperTextProps(),e);return(0,G.jsx)(U.span,{...n,ref:t})});GA.displayName=`FieldHelperText`;var KA=(0,s.forwardRef)((e,t)=>{let n=z(Z5()?.getInputProps(),e);return(0,G.jsx)(U.input,{...n,ref:t})});KA.displayName=`FieldInput`;var qA=oo(`field`).parts(`root`,`errorText`,`helperText`,`input`,`label`,`select`,`textarea`,`requiredIndicator`).build(),JA=(0,s.forwardRef)((e,t)=>{let n=z(Z5()?.getLabelProps(),e);return(0,G.jsx)(U.label,{...n,ref:t})});JA.displayName=`FieldLabel`;var YA=(0,s.forwardRef)(({fallback:e,...t},n)=>{let r=Z5();if(!r.required)return e;let i=z(r.getRequiredIndicatorProps(),t);return(0,G.jsx)(U.span,{...i,ref:n,children:t.children??`*`})});YA.displayName=`FieldRequiredIndicator`;var XA=typeof window<`u`?s.useLayoutEffect:s.useEffect,[ZA,QA]=W({name:`FieldsetContext`,hookName:`useFieldsetContext`,providerName:`<FieldsetProvider />`,strict:!1}),$A=(e={})=>{let t=QA(),n=ro(),{ids:r,target:i,disabled:a=!!t?.disabled,invalid:o=!1,readOnly:c=!1,required:l=!1}=e,[u,d]=(0,s.useState)(!1),[f,p]=(0,s.useState)(!1),m=(0,s.useId)(),h=e.id??m,g=(0,s.useRef)(null),_=r?.root??`field::${h}`,v=r?.control??h,y=r?.errorText??`field::${h}::error-text`,b=r?.helperText??`field::${h}::helper-text`,x=r?.label??`field::${h}::label`;XA(()=>{let e=g.current;if(!e)return;let t=()=>{let e=n.getRootNode();d(!!e.getElementById(y)),p(!!e.getElementById(b))};t();let r=new(n.getWindow()).MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()},[n,y,b]);let S=(0,s.useMemo)(()=>()=>({...qA.root.attrs,id:_,ref:g,role:`group`,"data-disabled":B(a),"data-invalid":B(o),"data-readonly":B(c)}),[a,o,c,_]),C=i?`field::${v}::item::${i}`:void 0,w=(0,s.useMemo)(()=>()=>({...qA.label.attrs,id:x,"data-disabled":B(a),"data-invalid":B(o),"data-readonly":B(c),"data-required":B(l),htmlFor:C??v}),[a,o,c,l,v,x,C]),T=[u&&o?y:void 0,f?b:void 0].filter(Boolean).join(` `)||void 0,E=(0,s.useMemo)(()=>()=>({"aria-describedby":T,"aria-invalid":Pt(o),"data-invalid":B(o),"data-required":B(l),"data-readonly":B(c),id:v,required:l,disabled:a,readOnly:c}),[T,o,l,c,v,a]),D=(0,s.useMemo)(()=>()=>({...E(),...qA.input.attrs}),[E]),O=(0,s.useMemo)(()=>()=>({...E(),...qA.textarea.attrs}),[E]),ee=(0,s.useMemo)(()=>()=>({...E(),...qA.select.attrs}),[E]),te=(0,s.useMemo)(()=>()=>({id:b,...qA.helperText.attrs,"data-disabled":B(a)}),[a,b]),k=(0,s.useMemo)(()=>()=>({id:y,...qA.errorText.attrs,"aria-live":`polite`}),[y]),A=(0,s.useMemo)(()=>()=>({"aria-hidden":!0,...qA.requiredIndicator.attrs}),[]);return{ariaDescribedby:T,ids:{root:_,control:v,label:x,errorText:y,helperText:b},refs:{rootRef:g},disabled:a,invalid:o,readOnly:c,required:l,getLabelProps:w,getRootProps:S,getInputProps:D,getTextareaProps:O,getSelectProps:ee,getHelperTextProps:te,getErrorTextProps:k,getRequiredIndicatorProps:A}},ej=K(),tj=(0,s.forwardRef)((e,t)=>{let[n,r]=ej(e,[`id`,`ids`,`disabled`,`invalid`,`readOnly`,`required`,`target`]),i=$A(n),a=z(i.getRootProps(),r),o=l(t,i.refs.rootRef);return(0,G.jsx)(X5,{value:i,children:(0,G.jsx)(U.div,{...a,ref:o})})});tj.displayName=`FieldRoot`;function nj(e){if(!e)return;let t=fn(e);return`box-sizing:`+t.boxSizing+`;border-left:`+t.borderLeftWidth+` solid red;border-right:`+t.borderRightWidth+` solid red;font-family:`+t.fontFamily+`;font-feature-settings:`+t.fontFeatureSettings+`;font-kerning:`+t.fontKerning+`;font-size:`+t.fontSize+`;font-stretch:`+t.fontStretch+`;font-style:`+t.fontStyle+`;font-variant:`+t.fontVariant+`;font-variant-caps:`+t.fontVariantCaps+`;font-variant-ligatures:`+t.fontVariantLigatures+`;font-variant-numeric:`+t.fontVariantNumeric+`;font-weight:`+t.fontWeight+`;letter-spacing:`+t.letterSpacing+`;margin-left:`+t.marginLeft+`;margin-right:`+t.marginRight+`;padding-left:`+t.paddingLeft+`;padding-right:`+t.paddingRight+`;text-indent:`+t.textIndent+`;text-transform:`+t.textTransform}function rj(e){let t=e.createElement(`div`);return t.id=`ghost`,t.style.cssText=`display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;`,e.body.appendChild(t),t}function ij(e){if(!e)return;let t=rn(e),n=on(e),r=rj(t),i=nj(e);i&&(r.style.cssText+=i);function a(){n.requestAnimationFrame(()=>{r.textContent=e.value;let t=n.getComputedStyle(r);e?.style.setProperty(`width`,t.width)})}return a(),e?.addEventListener(`input`,a),e?.addEventListener(`change`,a),()=>{t.body.removeChild(r),e?.removeEventListener(`input`,a),e?.removeEventListener(`change`,a)}}var aj=e=>{if(!e)return;let t=fn(e),n=on(e),r=rn(e),i=()=>{requestAnimationFrame(()=>{e.style.height=`auto`;let n;n=t.boxSizing===`content-box`?e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!==`none`&&n>parseFloat(t.maxHeight)?(t.overflowY===`hidden`&&(e.style.overflowY=`scroll`),n=parseFloat(t.maxHeight)):t.overflowY!==`hidden`&&(e.style.overflowY=`hidden`),e.style.height=`${n}px`})};e.addEventListener(`input`,i),e.form?.addEventListener(`reset`,i);let a=Object.getOwnPropertyDescriptor(e,`value`),o=a?.set?a:Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),`value`);o?.set&&Object.defineProperty(e,"value",{...o,set(e){o.set?.call(this,e),i()}});let s=new n.ResizeObserver(()=>{requestAnimationFrame(()=>i())});s.observe(e);let c=new n.MutationObserver(()=>i());return c.observe(e,{attributes:!0,attributeFilter:[`rows`,`placeholder`]}),r.fonts?.addEventListener(`loadingdone`,i),()=>{e.removeEventListener(`input`,i),e.form?.removeEventListener(`reset`,i),r.fonts?.removeEventListener(`loadingdone`,i),s.disconnect(),c.disconnect()}},oj=(0,s.forwardRef)((e,t)=>{let{autoresize:n,...r}=e,i=(0,s.useRef)(null),a=z(Z5()?.getTextareaProps(),{style:{resize:n?`none`:void 0}},r),o=l(t,i);return(0,s.useEffect)(()=>{if(n)return aj(i.current)},[n]),(0,G.jsx)(U.textarea,{...a,ref:o})});oj.displayName=`FieldTextarea`;var sj=(0,s.forwardRef)((e,t)=>{let n=QA(),r=z(n.getErrorTextProps(),e);return n.invalid?(0,G.jsx)(U.span,{...r,ref:t}):null});sj.displayName=`FieldsetErrorText`;var cj=(0,s.forwardRef)((e,t)=>{let n=z(QA().getHelperTextProps(),e);return(0,G.jsx)(U.span,{...n,ref:t})});cj.displayName=`FieldsetHelperText`;var lj=(0,s.forwardRef)((e,t)=>{let n=z(QA().getLegendProps(),e);return(0,G.jsx)(U.legend,{...n,ref:t})});lj.displayName=`FieldsetLegend`;var uj=oo(`fieldset`).parts(`root`,`errorText`,`helperText`,`legend`).build(),dj=(e={})=>{let{disabled:t=!1,invalid:n=!1}=e,r=ro(),[i,a]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),l=(0,s.useId)(),u=e.id??l,d=(0,s.useRef)(null),f=`fieldset::${u}::legend`,p=`fieldset::${u}::error-text`,m=`fieldset::${u}::helper-text`;XA(()=>{let e=d.current;if(!e)return;let t=()=>{let e=r.getRootNode();a(!!e.getElementById(p)),c(!!e.getElementById(m))};t();let n=new(r.getWindow()).MutationObserver(t);return n.observe(e,{childList:!0,subtree:!0}),()=>n.disconnect()},[r,p,m]);let h=[];i&&n&&h.push(p),o&&h.push(m);let g=h.length>0?h.join(` `):void 0;return{refs:{rootRef:d},ids:{legend:f,errorText:p,helperText:m},disabled:t,invalid:n,getRootProps:()=>({...uj.root.attrs,ref:d,disabled:t,"data-disabled":B(t),"data-invalid":B(n),"aria-labelledby":f,"aria-describedby":g}),getLegendProps:()=>({id:f,...uj.legend.attrs,"data-disabled":B(t),"data-invalid":B(n)}),getHelperTextProps:()=>({id:m,...uj.helperText.attrs}),getErrorTextProps:()=>({id:p,...uj.errorText.attrs,"aria-live":`polite`})}},fj=K(),pj=(0,s.forwardRef)((e,t)=>{let[n,r]=fj(e,[`id`,`disabled`,`invalid`]),i=dj(n),a=z(i.getRootProps(),r),o=l(t,i.refs.rootRef);return(0,G.jsx)(ZA,{value:i,children:(0,G.jsx)(U.fieldset,{...a,ref:o})})});pj.displayName=`FieldsetRoot`;var[mj,hj]=W({name:`NumberInputContext`,hookName:`useNumberInputContext`,providerName:`<NumberInputProvider />`}),gj=(0,s.forwardRef)((e,t)=>{let n=z(hj().getControlProps(),e);return(0,G.jsx)(U.div,{...n,ref:t})});gj.displayName=`NumberInputControl`;var _j=(0,s.forwardRef)((e,t)=>{let n=z(hj().getDecrementTriggerProps(),e);return(0,G.jsx)(U.button,{...n,ref:t})});_j.displayName=`NumberInputDecrementTrigger`;var vj=(0,s.forwardRef)((e,t)=>{let n=z(hj().getIncrementTriggerProps(),e);return(0,G.jsx)(U.button,{...n,ref:t})});vj.displayName=`NumberInputIncrementTrigger`;var yj=(0,s.forwardRef)((e,t)=>{let n=z(hj().getInputProps(),e),r=Z5();return(0,G.jsx)(U.input,{"aria-describedby":r?.ariaDescribedby,...n,ref:t})});yj.displayName=`NumberInputInput`;var bj=oo(`numberInput`).parts(`root`,`label`,`input`,`control`,`valueText`,`incrementTrigger`,`decrementTrigger`,`scrubber`).build();function xj(e,t){if(e&&t.isActiveElement(e))try{let{selectionStart:t,selectionEnd:n,value:r}=e;return t==null||n==null?void 0:{start:t,end:n,value:r}}catch{return}}function Sj(e,t,n){if(e&&n.isActiveElement(e)){if(t)try{let n=e.value,{start:r,end:i,value:a}=t;if(n===a){e.setSelectionRange(r,i);return}let o=Cj(a,n,r),s=r===i?o:Cj(a,n,i),c=Math.max(0,Math.min(o,n.length)),l=Math.max(c,Math.min(s,n.length));e.setSelectionRange(c,l)}catch{let t=e.value.length;e.setSelectionRange(t,t)}else{let t=e.value.length;e.setSelectionRange(t,t)}}}function Cj(e,t,n){let r=e.slice(0,n),i=e.slice(n),a=0,o=Math.min(r.length,t.length);for(let e=0;e<o&&r[e]===t[e];e++)a=e+1;let s=0,c=Math.min(i.length,t.length-a);for(let e=0;e<c;e++){let n=i.length-1-e,r=t.length-1-e;if(i[n]===t[r])s=e+1;else break}if(r.length>0&&a>=r.length)return a;if(s>=i.length)return t.length-s;if(a>0)return a;if(s>0)return t.length-s;if(n===0&&a===0&&s===0)return t.length;if(e.length>0){let r=n/e.length;return Math.round(r*t.length)}return t.length}var wj=e=>e.ids?.root??`number-input:${e.id}`,Tj=e=>e.ids?.input??`number-input:${e.id}:input`,Ej=e=>e.ids?.incrementTrigger??`number-input:${e.id}:inc`,Dj=e=>e.ids?.decrementTrigger??`number-input:${e.id}:dec`,Oj=e=>e.ids?.scrubber??`number-input:${e.id}:scrubber`,kj=e=>`number-input:${e.id}:cursor`,Aj=e=>e.ids?.label??`number-input:${e.id}:label`,jj=e=>e.getById(Tj(e)),Mj=e=>e.getById(Ej(e)),Nj=e=>e.getById(Dj(e)),Pj=e=>e.getDoc().getElementById(kj(e)),Fj=(e,t)=>{let n=null;return t===`increment`&&(n=Mj(e)),t===`decrement`&&(n=Nj(e)),n},Ij=(e,t)=>{if(!Nn())return zj(e,t),()=>{Pj(e)?.remove()}},Lj=e=>{let t=e.getDoc(),n=t.documentElement,r=t.body;return r.style.pointerEvents=`none`,n.style.userSelect=`none`,n.style.cursor=`ew-resize`,()=>{r.style.pointerEvents=``,n.style.userSelect=``,n.style.cursor=``,n.style.length||n.removeAttribute(`style`),r.style.length||r.removeAttribute(`style`)}},Rj=(e,t)=>{let{point:n,isRtl:r,event:i}=t,a=e.getWin(),o=we(i.movementX,a.devicePixelRatio),s=we(i.movementY,a.devicePixelRatio),c=o>0?`increment`:o<0?`decrement`:null;r&&c&&(c=c===`increment`?`decrement`:`increment`);let l={x:n.x+o,y:n.y+s},u=a.innerWidth,d=we(7.5,a.devicePixelRatio);return l.x=ye(l.x+d,u)-d,{hint:c,point:l}},zj=(e,t)=>{let n=e.getDoc(),r=n.createElement(`div`);r.className=`scrubber--cursor`,r.id=kj(e),Object.assign(r.style,{width:`15px`,height:`15px`,position:`fixed`,pointerEvents:`none`,left:`0px`,top:`0px`,zIndex:Nt,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:`transform`}),r.innerHTML=`
4
4
  <svg width="46" height="15" style="left: -15.5px; position: absolute; top: 0; filter: drop-shadow(rgba(0, 0, 0, 0.4) 0px 1px 1.1px);">