@preply/ds-docs 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/assets/{00.LayoutFlex.stories-I1L9KcKN.js → 00.LayoutFlex.stories-D-VczObO.js} +1 -1
  2. package/dist/assets/{00.applications-DVA0eR_5.js → 00.applications-CzYSGmEf.js} +1 -1
  3. package/dist/assets/{00.favicons.guide-BA4TBs8A.js → 00.favicons.guide-B-CARcAk.js} +1 -1
  4. package/dist/assets/00.token-explorer-hV-uX2Ww.js +345 -0
  5. package/dist/assets/{00.using-responsive-props-DvWa2hX7.js → 00.using-responsive-props-q9jDxHWy.js} +1 -1
  6. package/dist/assets/{01.semantic-tokens-CMnyPCuB.js → 01.semantic-tokens-phY-TgD0.js} +1 -1
  7. package/dist/assets/{01.using-shorthand-props-DfgZvMPF.js → 01.using-shorthand-props-CUZbQwLg.js} +1 -1
  8. package/dist/assets/{10.Combinations.stories-Zk1vUvHN.js → 10.Combinations.stories-BDDl05Hz.js} +1 -1
  9. package/dist/assets/{10.fonts.guide-4nDXerbt.js → 10.fonts.guide-hytCpjSP.js} +1 -1
  10. package/dist/assets/{10.ssr-BBOII78K.js → 10.ssr-CXQLuZOI.js} +1 -1
  11. package/dist/assets/{11.languageFont.explorer.stories-B4Vdpt9q.js → 11.languageFont.explorer.stories-Dkv9M5eT.js} +1 -1
  12. package/dist/assets/{11.ssr.app-router-v52x2FyK.js → 11.ssr.app-router-bEmxNK6u.js} +1 -1
  13. package/dist/assets/{20.libraries-BIoBeRPw.js → 20.libraries-Dz7mgu2C.js} +1 -1
  14. package/dist/assets/30.icons.explorer-oiyfLcQp.js +73 -0
  15. package/dist/assets/{30.storybook-DhzFfbyl.js → 30.storybook-BGbx9nQ-.js} +1 -1
  16. package/dist/assets/{40.illustrations.explorer-7gHbzv6D.js → 40.illustrations.explorer-BuiSr8c3.js} +1 -1
  17. package/dist/assets/{90.advanced-C_nJm0ZM.js → 90.advanced-BoZM3QR8.js} +1 -1
  18. package/dist/assets/{Accordion-Bi0GzCYO.js → Accordion-CxiCI4Rz.js} +3 -3
  19. package/dist/assets/{Accordion.stories-AuiZJ4NQ.js → Accordion.stories-D7Cw24sj.js} +1 -1
  20. package/dist/assets/{Accordion.tests.stories-CFXQ7lMz.js → Accordion.tests.stories-DtE9udvN.js} +1 -1
  21. package/dist/assets/{AlertDialog.stories-BqN0gz7W.js → AlertDialog.stories-Crl9ra0W.js} +1 -1
  22. package/dist/assets/Badge-BMWjsGzx.css +1 -0
  23. package/dist/assets/Badge.stories-CkGzqxM7.js +66 -0
  24. package/dist/assets/{Box.stories-CpizOdtP.js → Box.stories-Tx-88Owx.js} +1 -1
  25. package/dist/assets/{BubbleCounter.stories-CPQE-nOi.js → BubbleCounter.stories-DCyCDG7S.js} +1 -1
  26. package/dist/assets/{Button-DhteO3C6.js → Button-B80XIKcv.js} +1 -1
  27. package/dist/assets/{Button-DqlzCI4z.css → Button-Cd0upysu.css} +1 -1
  28. package/dist/assets/{Button.stories-DmzVQ1VL.js → Button.stories-BWsh38ts.js} +1 -1
  29. package/dist/assets/{ButtonBase-B_gwKVAa.js → ButtonBase-BS1Kc_U5.js} +1 -1
  30. package/dist/assets/{ButtonBase-HxlpSDVr.css → ButtonBase-Cv8JsBJE.css} +1 -1
  31. package/dist/assets/{Checkbox-BNGbflsm.js → Checkbox-0Rr3azkZ.js} +2 -2
  32. package/dist/assets/{Checkbox.stories-C_K-2uYm.js → Checkbox.stories-CklDbW2-.js} +1 -1
  33. package/dist/assets/{Checkbox.tests.stories-CsxFaHsD.js → Checkbox.tests.stories-dtDQPZYm.js} +1 -1
  34. package/dist/assets/{Chips.stories-BwZ71-HV.js → Chips.stories-CLRPrNOW.js} +1 -1
  35. package/dist/assets/Color-YHDXOIA2-CPoUziDM.js +1 -0
  36. package/dist/assets/CountryFlag-2OfagIL-.js +49 -0
  37. package/dist/assets/{CountryFlag.stories-UhDU5aPp.js → CountryFlag.stories-B9rUoQXw.js} +1 -1
  38. package/dist/assets/{CountryFlag.test.stories-kJ9jqJTG.js → CountryFlag.test.stories-C3Hz7_Cq.js} +1 -1
  39. package/dist/assets/Dialog-5t3Rt4HF.css +1 -0
  40. package/dist/assets/Dialog.stories-zkSlU40W.js +405 -0
  41. package/dist/assets/{DismissibleChips-jYvlTjTA.js → DismissibleChips-DbEsCC0J.js} +1 -1
  42. package/dist/assets/{DismissibleChips.stories-CpdIBN_g.js → DismissibleChips.stories-Bv47ROIC.js} +1 -1
  43. package/dist/assets/{Divider.stories-Dt8b4I0I.js → Divider.stories-BlFQRFSK.js} +1 -1
  44. package/dist/assets/{DocsRenderer-CFRXHY34-DHd29E9v.js → DocsRenderer-CFRXHY34-CVrIvO9U.js} +1 -1
  45. package/dist/assets/{FormControl-D9rxeKMc.js → FormControl-CPKPJ97_.js} +1 -1
  46. package/dist/assets/{FormControl.stories-Drzur_Xo.js → FormControl.stories-C6dT1HUz.js} +1 -1
  47. package/dist/assets/{Heading-BLxyLk9f.js → Heading-BKJX3nsJ.js} +2 -2
  48. package/dist/assets/{Heading.stories-DcyjKmJn.js → Heading.stories-D2N4ywNt.js} +1 -1
  49. package/dist/assets/{Icon-BkmQyVqb.js → Icon-CkCFpqfD.js} +1 -1
  50. package/dist/assets/{Icon-RSC-Cwt4AD8I.js → Icon-RSC-DeEnUUcz.js} +1 -1
  51. package/dist/assets/{Icon.stories-Dh3KvtM-.js → Icon.stories-CexhJHbi.js} +1 -1
  52. package/dist/assets/{IconButton-CqTm2jIV.js → IconButton-B-3o70a9.js} +1 -1
  53. package/dist/assets/{Input-UdhYxppR.js → Input-DeHbbC7g.js} +3 -3
  54. package/dist/assets/{IntegrationWithReactHookForm.stories-C02oiA5w.js → IntegrationWithReactHookForm.stories-DxrZ050E.js} +1 -1
  55. package/dist/assets/{IntlFormattedCurrency.stories-D09rXQbZ.js → IntlFormattedCurrency.stories-BLxRgJWU.js} +1 -1
  56. package/dist/assets/{IntlFormattedDateTime.stories-BuOwAp8C.js → IntlFormattedDateTime.stories-hYtatyHE.js} +1 -1
  57. package/dist/assets/{LayoutFlex-JDgK8BCr.js → LayoutFlex-DvBktCUC.js} +1 -1
  58. package/dist/assets/{LayoutFlexItem-bGRFvGp6.js → LayoutFlexItem-Cm3OI9f2.js} +1 -1
  59. package/dist/assets/{LayoutGrid-CGatrPKO.js → LayoutGrid-Dm6EcI-G.js} +1 -1
  60. package/dist/assets/{LayoutGrid.stories-DyBN7RV8.js → LayoutGrid.stories-CKn4Vg30.js} +1 -1
  61. package/dist/assets/{LayoutGridItem-BdIUwiuA.js → LayoutGridItem-DWhZMKvq.js} +1 -1
  62. package/dist/assets/{Link-DdFAEBXD.js → Link-D3ljGEp4.js} +1 -1
  63. package/dist/assets/{Link.stories-WQCe-o4N.js → Link.stories-DOzq9sNs.js} +1 -1
  64. package/dist/assets/{Loader.stories-Ceu9fTo6.js → Loader.stories-C53ODmdL.js} +1 -1
  65. package/dist/assets/{MultiSelectChips-Crsz1TpK.js → MultiSelectChips-RUBRF3C_.js} +2 -2
  66. package/dist/assets/{MultiSelectChips.stories-D94TLaMf.js → MultiSelectChips.stories-DbfKSXnF.js} +1 -1
  67. package/dist/assets/{NumberField-BClPzJbf.js → NumberField-B95TvbPY.js} +5 -5
  68. package/dist/assets/{NumberField.stories-Cl5bAyRn.js → NumberField.stories-CEV8efH2.js} +1 -1
  69. package/dist/assets/{ObserveIntersection-B2ZY3pJT.js → ObserveIntersection-Ds88YwOI.js} +1 -1
  70. package/dist/assets/{ObserveIntersection.stories-C8C2l5zu.js → ObserveIntersection.stories-DAfiJTnQ.js} +1 -1
  71. package/dist/assets/{OnboardingTooltip-Bc-Jj706.js → OnboardingTooltip-C5HCJ0E7.js} +1 -1
  72. package/dist/assets/{OnboardingTooltip.stories-1_99oJ2j.js → OnboardingTooltip.stories-Cn1uymI0.js} +1 -1
  73. package/dist/assets/{OnboardingTooltip.tests.stories-CIUh12pG.js → OnboardingTooltip.tests.stories-DLvBh09g.js} +1 -1
  74. package/dist/assets/{OnboardingTour-BnYumvD2.js → OnboardingTour-Cye6iUC2.js} +1 -1
  75. package/dist/assets/{OnboardingTour.stories-CaCYuehO.js → OnboardingTour.stories-D_A2LFco.js} +1 -1
  76. package/dist/assets/{OnboardingTour.tests.stories-C9M7Z4vy.js → OnboardingTour.tests.stories-D0hNfgv6.js} +1 -1
  77. package/dist/assets/{PasswordField-CFjBYGMS.js → PasswordField-DHlrM2-7.js} +5 -5
  78. package/dist/assets/{PasswordField.stories-CWrYRKg3.js → PasswordField.stories-BJWCj1u3.js} +1 -1
  79. package/dist/assets/{PreplyLogo.stories-DbHXRqIe.js → PreplyLogo.stories-dfSPndrY.js} +1 -1
  80. package/dist/assets/{ProgressBar.stories-Bj7JgZUL.js → ProgressBar.stories-BV6Y9Nyi.js} +1 -1
  81. package/dist/assets/{ProgressSteps-CwDoZPp7.js → ProgressSteps-DQE6Rlvo.js} +1 -1
  82. package/dist/assets/{ProgressSteps.stories-Eo_YRUQQ.js → ProgressSteps.stories-BKC2XSoe.js} +1 -1
  83. package/dist/assets/PromoDialog-BrI3UbB4.js +3 -0
  84. package/dist/assets/{RangeSlider-CNeCUMy9.js → RangeSlider-BXIcGg3R.js} +1 -1
  85. package/dist/assets/{RangeSlider.stories-DjAvKpFH.js → RangeSlider.stories-BNeMiH_1.js} +1 -1
  86. package/dist/assets/RootProvider-D0tv2ED1.js +1 -0
  87. package/dist/assets/{SelectField-B0-aTIgP.js → SelectField-DOoh2Y5k.js} +8 -8
  88. package/dist/assets/{SelectField.stories-YbuvDmfl.js → SelectField.stories-BiuvF5Yg.js} +1 -1
  89. package/dist/assets/{ShowOnIntersection.stories-q8aTxrQs.js → ShowOnIntersection.stories-C4LXhIWf.js} +1 -1
  90. package/dist/assets/{SingleSelectChips-CAjBrNcu.js → SingleSelectChips-BRlD7T8V.js} +2 -2
  91. package/dist/assets/{SingleSelectChips.stories-BL3YG_kg.js → SingleSelectChips.stories-dgLjjU24.js} +1 -1
  92. package/dist/assets/{Slider-CUGM3UNz.js → Slider-eGOchL2V.js} +1 -1
  93. package/dist/assets/{Slider.stories-B_pnnXYh.js → Slider.stories-C5BY4PbW.js} +1 -1
  94. package/dist/assets/Steps-hgwULI7z.js +26 -0
  95. package/dist/assets/Steps-nUB2CDHz.css +1 -0
  96. package/dist/assets/{Steps.stories-BZsILE5g.js → Steps.stories-DX7zuse4.js} +7 -5
  97. package/dist/assets/{StorybookGlobalStyle-CQSpwvw3.js → StorybookGlobalStyle-BBqRFe5S.js} +1 -1
  98. package/dist/assets/{Switch.stories-CAuFyq9X.js → Switch.stories-DU5uZxfg.js} +1 -1
  99. package/dist/assets/{Text-CjpUlaH0.js → Text-D3i9pJx6.js} +1 -1
  100. package/dist/assets/{Text.stories-C6McCecj.js → Text.stories-4sHiU0p1.js} +1 -1
  101. package/dist/assets/{TextField-DqiXpdlZ.js → TextField-BxOrYHxj.js} +5 -5
  102. package/dist/assets/{TextField-CdxeFYRX.js → TextField-DHg6sqdw.js} +1 -1
  103. package/dist/assets/{TextField.stories-gNIPEGLY.js → TextField.stories-BsanVpHj.js} +1 -1
  104. package/dist/assets/{TextHighlighted.stories-CprNxXTt.js → TextHighlighted.stories-DzvaApjE.js} +1 -1
  105. package/dist/assets/{TextInline.stories-DBDcLVOT.js → TextInline.stories-CcrREeIa.js} +1 -1
  106. package/dist/assets/{TextareaField-Bi-A9wP4.js → TextareaField-Di3uMtNN.js} +8 -8
  107. package/dist/assets/{TextareaField.stories-IC9YRmct.js → TextareaField.stories-DFrVVMtN.js} +1 -1
  108. package/dist/assets/{Toast.stories-Ce2zHmWW.js → Toast.stories-D4rvr5mq.js} +1 -1
  109. package/dist/assets/TokyoUILock-CUE2UpP8.js +1 -0
  110. package/dist/assets/{Tooltip-BbMZ4t9q.js → Tooltip--j8DCmLJ.js} +1 -1
  111. package/dist/assets/{Tooltip.stories-BH7-gDwn.js → Tooltip.stories-mWHRlqv8.js} +1 -1
  112. package/dist/assets/{Tooltip.tests.stories-YLVx7b98.js → Tooltip.tests.stories-xaUpyGEE.js} +1 -1
  113. package/dist/assets/axe-KozDj-05.js +30 -0
  114. package/dist/assets/{breakpoints-BfkEfMbw.js → breakpoints-C1DZdkak.js} +1 -1
  115. package/dist/assets/{breakpoints-CSOwlhiU.js → breakpoints-CKMjlF3s.js} +1 -1
  116. package/dist/assets/{breakpoints-2fMSmAVi.js → breakpoints-DXv9ifNm.js} +1 -1
  117. package/dist/assets/{changelog-D4Z9gpAU.js → changelog-DXlzZtLa.js} +164 -131
  118. package/dist/assets/{client-C1fTPCwG.js → client-CYxxc9KC.js} +1 -1
  119. package/dist/assets/{constants-2_-agSe-.js → constants-DVNhGTwE.js} +2 -2
  120. package/dist/assets/createRequiredContext-DqKkrhDd.js +241 -0
  121. package/dist/assets/entry-preview-Bj3Y8agB.js +10 -0
  122. package/dist/assets/{entry-preview-docs-BANZ_DRs.js → entry-preview-docs-BPlzFJFG.js} +2 -2
  123. package/dist/assets/{floating-ui.react-dom-CHDTbv7n.js → floating-ui.react-dom-B6FmGF3s.js} +1 -1
  124. package/dist/assets/{getTokenVar-BZgwkSp8.js → getTokenVar-BRt2X5rO.js} +1 -1
  125. package/dist/assets/{hover-hzsLb0mP.js → hover-COs8KLUI.js} +1 -1
  126. package/dist/assets/{hover-DNwEbkOR.js → hover-CfJVruTK.js} +1 -1
  127. package/dist/assets/{hover-CsTVkgV1.js → hover-Cy7Eox3Y.js} +1 -1
  128. package/dist/assets/{iframe-CWj9OKjo.js → iframe-CQTVRvvH.js} +18 -18
  129. package/dist/assets/index-BPCsOyHr.js +24 -0
  130. package/dist/assets/{index-DPGIb77J.js → index-Bch4g0SK.js} +1 -1
  131. package/dist/assets/index-C5uDgNEj.js +12 -0
  132. package/dist/assets/index-C6EASpUg.js +1 -0
  133. package/dist/assets/index-C9ZJlqdI.js +1 -0
  134. package/dist/assets/index-CA5R8PN9.js +8 -0
  135. package/dist/assets/{index-Ctq3gFTp.js → index-CY08ZUhp.js} +7 -7
  136. package/dist/assets/{index-DUXnyn-Y.js → index-CebKVvqm.js} +16 -16
  137. package/dist/assets/{index-Cxag6636.js → index-D21-dwfw.js} +1 -1
  138. package/dist/assets/index-DWSmmBvQ.js +12 -0
  139. package/dist/assets/{index-BPrLDK9Y.js → index-De-a_lfy.js} +1 -1
  140. package/dist/assets/{index-Y0mVPtHg.js → index-Djnd5IhU.js} +1 -1
  141. package/dist/assets/index-DrcC8Jul.js +7 -0
  142. package/dist/assets/{index-fALSPXxe.js → index-ZUOsecCC.js} +1 -1
  143. package/dist/assets/{intro-DgdQQN2S.js → intro-Cd9_GCdy.js} +1 -1
  144. package/dist/assets/{message-CToTEy-z.js → message-CSdaKtIj.js} +1 -1
  145. package/dist/assets/{migrating-from-less-CypRwYq3.js → migrating-from-less-B5ahFv2d.js} +1 -1
  146. package/dist/assets/playground-WZK9WFDf.css +1 -0
  147. package/dist/assets/playground.stories-LsAgjZgU.js +857 -0
  148. package/dist/assets/{preview-BTjEYo28.js → preview-D4qLoCiE.js} +1 -1
  149. package/dist/assets/preview-DA7QUfdZ.js +2 -0
  150. package/dist/assets/{preview-B3PTUHS7.js → preview-DPj7IDPD.js} +1 -1
  151. package/dist/assets/{preview-4uuOvD3n.js → preview-Rh2RpxtQ.js} +2 -2
  152. package/dist/assets/{preview-DnWcdrEZ.js → preview-qRpPiuhm.js} +2 -2
  153. package/dist/assets/{react-18-DfUnyR7e.js → react-18-vqCHxTgY.js} +1 -1
  154. package/dist/assets/{shared-strings-Bg7tW4tm.js → shared-strings-DFzxd8lM.js} +1 -1
  155. package/dist/assets/styled-components.browser.esm-BJAH3Qnc.js +2 -0
  156. package/dist/assets/{tokens-D0M6e07K.js → tokens-1GbBeOTN.js} +1 -1
  157. package/dist/assets/tokens-BoC65r7p.js +1 -0
  158. package/dist/assets/{tokens-D7bwo39d.js → tokens-CSYR8_6W.js} +1 -1
  159. package/dist/assets/{tokens-DbuzM4u9.js → tokens-DboIZ2E4.js} +1 -1
  160. package/dist/assets/{useIntlFormattedAggregatedDateTime-Zx_bxtfa.js → useIntlFormattedAggregatedDateTime-CTOxZyaF.js} +1 -1
  161. package/dist/assets/{useIntlFormattedCurrency-DbgTU34E.js → useIntlFormattedCurrency-CKTbRfXd.js} +1 -1
  162. package/dist/assets/{useIntlFormattedTime-ulNPTGyu.js → useIntlFormattedTime-D6quNZKT.js} +1 -1
  163. package/dist/assets/{usePortalElement-D8WArtaz.js → usePortalElement-BK-0FBHw.js} +1 -1
  164. package/dist/assets/{welcome-Cf7_knMk.js → welcome-B7wFifhG.js} +1 -1
  165. package/dist/assets/{zeroheight-BvaCHUX_.js → zeroheight-C2QkqLMf.js} +1 -1
  166. package/dist/iframe.html +1 -1
  167. package/dist/index.json +1 -1
  168. package/dist/preview-stats.json +3343 -3073
  169. package/dist/project.json +1 -1
  170. package/package.json +4 -4
  171. package/dist/assets/00.token-explorer-KIhVhPp7.js +0 -344
  172. package/dist/assets/30.icons.explorer-C3PdGI__.js +0 -73
  173. package/dist/assets/Badge-DXnHyVME.css +0 -1
  174. package/dist/assets/Badge.stories-Bk1jXWtz.js +0 -65
  175. package/dist/assets/Color-YHDXOIA2-BhKKyrEM.js +0 -1
  176. package/dist/assets/CountryFlag-BYnc9DA7.js +0 -49
  177. package/dist/assets/Dialog-B2G1UrP1.css +0 -1
  178. package/dist/assets/Dialog.stories-CI7zov84.js +0 -515
  179. package/dist/assets/RootProvider-CWDV9QnL.js +0 -1
  180. package/dist/assets/Steps-B_rpKUTa.css +0 -1
  181. package/dist/assets/Steps-IgJnFF2g.js +0 -26
  182. package/dist/assets/TokyoUILock-CENLMUf4.js +0 -1
  183. package/dist/assets/axe-mzYAM-sz.js +0 -30
  184. package/dist/assets/createRequiredContext-9__lNQrK.js +0 -241
  185. package/dist/assets/entry-preview-DFXqIYZm.js +0 -10
  186. package/dist/assets/index-BSV-0FpC.js +0 -1
  187. package/dist/assets/index-BnjE-6lp.js +0 -12
  188. package/dist/assets/index-C7hTFOIV.js +0 -24
  189. package/dist/assets/index-CXQShRbs.js +0 -8
  190. package/dist/assets/index-Cu4lwwaE.js +0 -1
  191. package/dist/assets/index-DhCCT3uz.js +0 -12
  192. package/dist/assets/index-p7qngmDT.js +0 -7
  193. package/dist/assets/playground-Dg8A_Ftj.css +0 -1
  194. package/dist/assets/playground.stories-C9cW4jxN.js +0 -857
  195. package/dist/assets/preview-BLkg3UNz.js +0 -2
  196. package/dist/assets/styled-components.browser.esm-BgpGX317.js +0 -2
  197. package/dist/assets/tokens-Xet-VKqC.js +0 -1
  198. /package/dist/assets/{Button-DwGJHj7Y.js → Button-CpB2zJ_2.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{r as i,R as Oe}from"./index-Cb9e4tly.js";import{j as d}from"./jsx-runtime-BTJTZTIL.js";import{r as Re,v as Te}from"./index-BPrLDK9Y.js";import{S as oe}from"./index-BlMeVLsf.js";import{R as Ae,h as Se}from"./Combination-IIMvWCmY.js";function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Y(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _e(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Y(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Y(e[r],null)}}}}function S(...e){return i.useCallback(_e(...e),e)}function we(e,t){const n=i.createContext(t),o=s=>{const{children:c,...a}=s,l=i.useMemo(()=>a,Object.values(a));return d.jsx(n.Provider,{value:l,children:c})};o.displayName=e+"Provider";function r(s){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Ie(e,t=[]){let n=[];function o(s,c){const a=i.createContext(c),l=n.length;n=[...n,c];const u=p=>{var h;const{scope:v,children:g,...b}=p,m=((h=v==null?void 0:v[e])==null?void 0:h[l])||a,C=i.useMemo(()=>b,Object.values(b));return d.jsx(m.Provider,{value:C,children:g})};u.displayName=s+"Provider";function f(p,v){var m;const g=((m=v==null?void 0:v[e])==null?void 0:m[l])||a,b=i.useContext(g);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,f]}const r=()=>{const s=n.map(c=>i.createContext(c));return function(a){const l=(a==null?void 0:a[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return r.scopeName=e,[o,Fe(r,...t)]}function Fe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const c=o.reduce((a,{useScope:l,scopeName:u})=>{const p=l(s)[`__scope${u}`];return{...a,...p}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var F=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},Me=Oe.useId||(()=>{}),Le=0;function U(e){const[t,n]=i.useState(Me());return F(()=>{n(o=>o??String(Le++))},[e]),e||(t?`radix-${t}`:"")}function T(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function je({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=Ue({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o,a=T(n),l=i.useCallback(u=>{if(s){const p=typeof u=="function"?u(e):u;p!==e&&a(p)}else r(u)},[s,e,r,a]);return[c,l]}function Ue({defaultProp:e,onChange:t}){const n=i.useState(e),[o]=n,r=i.useRef(o),s=T(t);return i.useEffect(()=>{r.current!==o&&(s(o),r.current=o)},[o,r,s]),n}var We=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],P=We.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?oe:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ke(e,t){e&&Re.flushSync(()=>e.dispatchEvent(t))}function Be(e,t=globalThis==null?void 0:globalThis.document){const n=T(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var $e="DismissableLayer",$="dismissableLayer.update",Ke="dismissableLayer.pointerDownOutside",Ge="dismissableLayer.focusOutside",X,re=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),se=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...l}=e,u=i.useContext(re),[f,p]=i.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=i.useState({}),b=S(t,E=>p(E)),m=Array.from(u.layers),[C]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=m.indexOf(C),x=f?m.indexOf(f):-1,D=u.layersWithOutsidePointerEventsDisabled.size>0,y=x>=h,_=qe(E=>{const w=E.target,H=[...u.branches].some(j=>j.contains(w));!y||H||(r==null||r(E),c==null||c(E),E.defaultPrevented||a==null||a())},v),q=He(E=>{const w=E.target;[...u.branches].some(j=>j.contains(w))||(s==null||s(E),c==null||c(E),E.defaultPrevented||a==null||a())},v);return Be(E=>{x===u.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},v),i.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(X=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Z(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=X)}},[f,v,n,u]),i.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Z())},[f,u]),i.useEffect(()=>{const E=()=>g({});return document.addEventListener($,E),()=>document.removeEventListener($,E)},[]),d.jsx(P.div,{...l,ref:b,style:{pointerEvents:D?y?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,q.onFocusCapture),onBlurCapture:R(e.onBlurCapture,q.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,_.onPointerDownCapture)})});se.displayName=$e;var ze="DismissableLayerBranch",Ve=i.forwardRef((e,t)=>{const n=i.useContext(re),o=i.useRef(null),r=S(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),d.jsx(P.div,{...e,ref:r})});Ve.displayName=ze;function qe(e,t=globalThis==null?void 0:globalThis.document){const n=T(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let l=function(){ie(Ke,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function He(e,t=globalThis==null?void 0:globalThis.document){const n=T(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&ie(Ge,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Z(){const e=new CustomEvent($);document.dispatchEvent(e)}function ie(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?ke(r,s):r.dispatchEvent(s)}var W="focusScope.autoFocusOnMount",k="focusScope.autoFocusOnUnmount",J={bubbles:!1,cancelable:!0},Ye="FocusScope",ae=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,l]=i.useState(null),u=T(r),f=T(s),p=i.useRef(null),v=S(t,m=>l(m)),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let m=function(D){if(g.paused||!a)return;const y=D.target;a.contains(y)?p.current=y:O(p.current,{select:!0})},C=function(D){if(g.paused||!a)return;const y=D.relatedTarget;y!==null&&(a.contains(y)||O(p.current,{select:!0}))},h=function(D){if(document.activeElement===document.body)for(const _ of D)_.removedNodes.length>0&&O(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",C);const x=new MutationObserver(h);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",C),x.disconnect()}}},[o,a,g.paused]),i.useEffect(()=>{if(a){ee.add(g);const m=document.activeElement;if(!a.contains(m)){const h=new CustomEvent(W,J);a.addEventListener(W,u),a.dispatchEvent(h),h.defaultPrevented||(Xe(tt(ce(a)),{select:!0}),document.activeElement===m&&O(a))}return()=>{a.removeEventListener(W,u),setTimeout(()=>{const h=new CustomEvent(k,J);a.addEventListener(k,f),a.dispatchEvent(h),h.defaultPrevented||O(m??document.body,{select:!0}),a.removeEventListener(k,f),ee.remove(g)},0)}}},[a,u,f,g]);const b=i.useCallback(m=>{if(!n&&!o||g.paused)return;const C=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,h=document.activeElement;if(C&&h){const x=m.currentTarget,[D,y]=Ze(x);D&&y?!m.shiftKey&&h===y?(m.preventDefault(),n&&O(D,{select:!0})):m.shiftKey&&h===D&&(m.preventDefault(),n&&O(y,{select:!0})):h===x&&m.preventDefault()}},[n,o,g.paused]);return d.jsx(P.div,{tabIndex:-1,...c,ref:v,onKeyDown:b})});ae.displayName=Ye;function Xe(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(O(o,{select:t}),document.activeElement!==n)return}function Ze(e){const t=ce(e),n=Q(t,e),o=Q(t.reverse(),e);return[n,o]}function ce(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Q(e,t){for(const n of e)if(!Je(n,{upTo:t}))return n}function Je(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Qe(e){return e instanceof HTMLInputElement&&"select"in e}function O(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qe(e)&&t&&e.select()}}var ee=et();function et(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=te(e,t),e.unshift(t)},remove(t){var n;e=te(e,t),(n=e[0])==null||n.resume()}}}function te(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function tt(e){return e.filter(t=>t.tagName!=="A")}var nt="Portal",ue=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);F(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?Te.createPortal(d.jsx(P.div,{...o,ref:t}),c):null});ue.displayName=nt;function ot(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var L=e=>{const{present:t,children:n}=e,o=rt(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=S(o.ref,st(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};L.displayName="Presence";function rt(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,l]=ot(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=I(o.current);s.current=a==="mounted"?u:"none"},[a]),F(()=>{const u=o.current,f=r.current;if(f!==e){const v=s.current,g=I(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&v!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),F(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=g=>{const m=I(o.current).includes(g.animationName);if(g.target===t&&m&&(l("ANIMATION_END"),!r.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},v=g=>{g.target===t&&(s.current=I(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function I(e){return(e==null?void 0:e.animationName)||"none"}function st(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var B=0;function it(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ne()),document.body.insertAdjacentElement("beforeend",e[1]??ne()),B++,()=>{B===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),B--}},[])}function ne(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var K="Dialog",[le,bt]=Ie(K),[at,N]=le(K),de=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:c=!0}=e,a=i.useRef(null),l=i.useRef(null),[u=!1,f]=je({prop:o,defaultProp:r,onChange:s});return d.jsx(at,{scope:t,triggerRef:a,contentRef:l,contentId:U(),titleId:U(),descriptionId:U(),open:u,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(p=>!p),[f]),modal:c,children:n})};de.displayName=K;var fe="DialogTrigger",me=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=N(fe,n),s=S(t,r.triggerRef);return d.jsx(P.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":V(r.open),...o,ref:s,onClick:R(e.onClick,r.onOpenToggle)})});me.displayName=fe;var G="DialogPortal",[ct,pe]=le(G,{forceMount:void 0}),ve=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=N(G,t);return d.jsx(ct,{scope:t,forceMount:n,children:i.Children.map(o,c=>d.jsx(L,{present:n||s.open,children:d.jsx(ue,{asChild:!0,container:r,children:c})}))})};ve.displayName=G;var M="DialogOverlay",ge=i.forwardRef((e,t)=>{const n=pe(M,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=N(M,e.__scopeDialog);return s.modal?d.jsx(L,{present:o||s.open,children:d.jsx(ut,{...r,ref:t})}):null});ge.displayName=M;var ut=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=N(M,n);return d.jsx(Ae,{as:oe,allowPinchZoom:!0,shards:[r.contentRef],children:d.jsx(P.div,{"data-state":V(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),A="DialogContent",Ee=i.forwardRef((e,t)=>{const n=pe(A,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=N(A,e.__scopeDialog);return d.jsx(L,{present:o||s.open,children:s.modal?d.jsx(lt,{...r,ref:t}):d.jsx(dt,{...r,ref:t})})});Ee.displayName=A;var lt=i.forwardRef((e,t)=>{const n=N(A,e.__scopeDialog),o=i.useRef(null),r=S(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return Se(s)},[]),d.jsx(he,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,a=c.button===0&&c.ctrlKey===!0;(c.button===2||a)&&s.preventDefault()}),onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault())})}),dt=i.forwardRef((e,t)=>{const n=N(A,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return d.jsx(he,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,a;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(o.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),he=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...c}=e,a=N(A,n),l=i.useRef(null),u=S(t,l);return it(),d.jsxs(d.Fragment,{children:[d.jsx(ae,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:d.jsx(se,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":V(a.open),...c,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(ft,{titleId:a.titleId}),d.jsx(pt,{contentRef:l,descriptionId:a.descriptionId})]})]})}),z="DialogTitle",ye=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=N(z,n);return d.jsx(P.h2,{id:r.titleId,...o,ref:t})});ye.displayName=z;var be="DialogDescription",Ce=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=N(be,n);return d.jsx(P.p,{id:r.descriptionId,...o,ref:t})});Ce.displayName=be;var De="DialogClose",Ne=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=N(De,n);return d.jsx(P.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Ne.displayName=De;function V(e){return e?"open":"closed"}var Pe="DialogTitleWarning",[Ct,xe]=we(Pe,{contentName:A,titleName:z,docsSlug:"dialog"}),ft=({titleId:e})=>{const t=xe(Pe),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1
+ import{r as i,R as Oe}from"./index-Cb9e4tly.js";import{j as d}from"./jsx-runtime-BTJTZTIL.js";import{r as Re,v as Te}from"./index-De-a_lfy.js";import{S as oe}from"./index-BlMeVLsf.js";import{R as Ae,h as Se}from"./Combination-IIMvWCmY.js";function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Y(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _e(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Y(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Y(e[r],null)}}}}function S(...e){return i.useCallback(_e(...e),e)}function we(e,t){const n=i.createContext(t),o=s=>{const{children:c,...a}=s,l=i.useMemo(()=>a,Object.values(a));return d.jsx(n.Provider,{value:l,children:c})};o.displayName=e+"Provider";function r(s){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Ie(e,t=[]){let n=[];function o(s,c){const a=i.createContext(c),l=n.length;n=[...n,c];const u=p=>{var h;const{scope:v,children:g,...b}=p,m=((h=v==null?void 0:v[e])==null?void 0:h[l])||a,C=i.useMemo(()=>b,Object.values(b));return d.jsx(m.Provider,{value:C,children:g})};u.displayName=s+"Provider";function f(p,v){var m;const g=((m=v==null?void 0:v[e])==null?void 0:m[l])||a,b=i.useContext(g);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,f]}const r=()=>{const s=n.map(c=>i.createContext(c));return function(a){const l=(a==null?void 0:a[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return r.scopeName=e,[o,Fe(r,...t)]}function Fe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const c=o.reduce((a,{useScope:l,scopeName:u})=>{const p=l(s)[`__scope${u}`];return{...a,...p}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var F=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},Me=Oe.useId||(()=>{}),Le=0;function U(e){const[t,n]=i.useState(Me());return F(()=>{n(o=>o??String(Le++))},[e]),e||(t?`radix-${t}`:"")}function T(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function je({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=Ue({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o,a=T(n),l=i.useCallback(u=>{if(s){const p=typeof u=="function"?u(e):u;p!==e&&a(p)}else r(u)},[s,e,r,a]);return[c,l]}function Ue({defaultProp:e,onChange:t}){const n=i.useState(e),[o]=n,r=i.useRef(o),s=T(t);return i.useEffect(()=>{r.current!==o&&(s(o),r.current=o)},[o,r,s]),n}var We=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],P=We.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?oe:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ke(e,t){e&&Re.flushSync(()=>e.dispatchEvent(t))}function Be(e,t=globalThis==null?void 0:globalThis.document){const n=T(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var $e="DismissableLayer",$="dismissableLayer.update",Ke="dismissableLayer.pointerDownOutside",Ge="dismissableLayer.focusOutside",X,re=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),se=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...l}=e,u=i.useContext(re),[f,p]=i.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=i.useState({}),b=S(t,E=>p(E)),m=Array.from(u.layers),[C]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=m.indexOf(C),x=f?m.indexOf(f):-1,D=u.layersWithOutsidePointerEventsDisabled.size>0,y=x>=h,_=qe(E=>{const w=E.target,H=[...u.branches].some(j=>j.contains(w));!y||H||(r==null||r(E),c==null||c(E),E.defaultPrevented||a==null||a())},v),q=He(E=>{const w=E.target;[...u.branches].some(j=>j.contains(w))||(s==null||s(E),c==null||c(E),E.defaultPrevented||a==null||a())},v);return Be(E=>{x===u.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},v),i.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(X=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Z(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=X)}},[f,v,n,u]),i.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Z())},[f,u]),i.useEffect(()=>{const E=()=>g({});return document.addEventListener($,E),()=>document.removeEventListener($,E)},[]),d.jsx(P.div,{...l,ref:b,style:{pointerEvents:D?y?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,q.onFocusCapture),onBlurCapture:R(e.onBlurCapture,q.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,_.onPointerDownCapture)})});se.displayName=$e;var ze="DismissableLayerBranch",Ve=i.forwardRef((e,t)=>{const n=i.useContext(re),o=i.useRef(null),r=S(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),d.jsx(P.div,{...e,ref:r})});Ve.displayName=ze;function qe(e,t=globalThis==null?void 0:globalThis.document){const n=T(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let l=function(){ie(Ke,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function He(e,t=globalThis==null?void 0:globalThis.document){const n=T(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&ie(Ge,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Z(){const e=new CustomEvent($);document.dispatchEvent(e)}function ie(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?ke(r,s):r.dispatchEvent(s)}var W="focusScope.autoFocusOnMount",k="focusScope.autoFocusOnUnmount",J={bubbles:!1,cancelable:!0},Ye="FocusScope",ae=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,l]=i.useState(null),u=T(r),f=T(s),p=i.useRef(null),v=S(t,m=>l(m)),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let m=function(D){if(g.paused||!a)return;const y=D.target;a.contains(y)?p.current=y:O(p.current,{select:!0})},C=function(D){if(g.paused||!a)return;const y=D.relatedTarget;y!==null&&(a.contains(y)||O(p.current,{select:!0}))},h=function(D){if(document.activeElement===document.body)for(const _ of D)_.removedNodes.length>0&&O(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",C);const x=new MutationObserver(h);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",C),x.disconnect()}}},[o,a,g.paused]),i.useEffect(()=>{if(a){ee.add(g);const m=document.activeElement;if(!a.contains(m)){const h=new CustomEvent(W,J);a.addEventListener(W,u),a.dispatchEvent(h),h.defaultPrevented||(Xe(tt(ce(a)),{select:!0}),document.activeElement===m&&O(a))}return()=>{a.removeEventListener(W,u),setTimeout(()=>{const h=new CustomEvent(k,J);a.addEventListener(k,f),a.dispatchEvent(h),h.defaultPrevented||O(m??document.body,{select:!0}),a.removeEventListener(k,f),ee.remove(g)},0)}}},[a,u,f,g]);const b=i.useCallback(m=>{if(!n&&!o||g.paused)return;const C=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,h=document.activeElement;if(C&&h){const x=m.currentTarget,[D,y]=Ze(x);D&&y?!m.shiftKey&&h===y?(m.preventDefault(),n&&O(D,{select:!0})):m.shiftKey&&h===D&&(m.preventDefault(),n&&O(y,{select:!0})):h===x&&m.preventDefault()}},[n,o,g.paused]);return d.jsx(P.div,{tabIndex:-1,...c,ref:v,onKeyDown:b})});ae.displayName=Ye;function Xe(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(O(o,{select:t}),document.activeElement!==n)return}function Ze(e){const t=ce(e),n=Q(t,e),o=Q(t.reverse(),e);return[n,o]}function ce(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Q(e,t){for(const n of e)if(!Je(n,{upTo:t}))return n}function Je(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Qe(e){return e instanceof HTMLInputElement&&"select"in e}function O(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qe(e)&&t&&e.select()}}var ee=et();function et(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=te(e,t),e.unshift(t)},remove(t){var n;e=te(e,t),(n=e[0])==null||n.resume()}}}function te(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function tt(e){return e.filter(t=>t.tagName!=="A")}var nt="Portal",ue=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);F(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?Te.createPortal(d.jsx(P.div,{...o,ref:t}),c):null});ue.displayName=nt;function ot(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var L=e=>{const{present:t,children:n}=e,o=rt(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=S(o.ref,st(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};L.displayName="Presence";function rt(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,l]=ot(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=I(o.current);s.current=a==="mounted"?u:"none"},[a]),F(()=>{const u=o.current,f=r.current;if(f!==e){const v=s.current,g=I(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&v!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),F(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=g=>{const m=I(o.current).includes(g.animationName);if(g.target===t&&m&&(l("ANIMATION_END"),!r.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},v=g=>{g.target===t&&(s.current=I(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function I(e){return(e==null?void 0:e.animationName)||"none"}function st(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var B=0;function it(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ne()),document.body.insertAdjacentElement("beforeend",e[1]??ne()),B++,()=>{B===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),B--}},[])}function ne(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var K="Dialog",[le,bt]=Ie(K),[at,N]=le(K),de=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:c=!0}=e,a=i.useRef(null),l=i.useRef(null),[u=!1,f]=je({prop:o,defaultProp:r,onChange:s});return d.jsx(at,{scope:t,triggerRef:a,contentRef:l,contentId:U(),titleId:U(),descriptionId:U(),open:u,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(p=>!p),[f]),modal:c,children:n})};de.displayName=K;var fe="DialogTrigger",me=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=N(fe,n),s=S(t,r.triggerRef);return d.jsx(P.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":V(r.open),...o,ref:s,onClick:R(e.onClick,r.onOpenToggle)})});me.displayName=fe;var G="DialogPortal",[ct,pe]=le(G,{forceMount:void 0}),ve=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=N(G,t);return d.jsx(ct,{scope:t,forceMount:n,children:i.Children.map(o,c=>d.jsx(L,{present:n||s.open,children:d.jsx(ue,{asChild:!0,container:r,children:c})}))})};ve.displayName=G;var M="DialogOverlay",ge=i.forwardRef((e,t)=>{const n=pe(M,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=N(M,e.__scopeDialog);return s.modal?d.jsx(L,{present:o||s.open,children:d.jsx(ut,{...r,ref:t})}):null});ge.displayName=M;var ut=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=N(M,n);return d.jsx(Ae,{as:oe,allowPinchZoom:!0,shards:[r.contentRef],children:d.jsx(P.div,{"data-state":V(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),A="DialogContent",Ee=i.forwardRef((e,t)=>{const n=pe(A,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=N(A,e.__scopeDialog);return d.jsx(L,{present:o||s.open,children:s.modal?d.jsx(lt,{...r,ref:t}):d.jsx(dt,{...r,ref:t})})});Ee.displayName=A;var lt=i.forwardRef((e,t)=>{const n=N(A,e.__scopeDialog),o=i.useRef(null),r=S(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return Se(s)},[]),d.jsx(he,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,a=c.button===0&&c.ctrlKey===!0;(c.button===2||a)&&s.preventDefault()}),onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault())})}),dt=i.forwardRef((e,t)=>{const n=N(A,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return d.jsx(he,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,a;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(o.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),he=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...c}=e,a=N(A,n),l=i.useRef(null),u=S(t,l);return it(),d.jsxs(d.Fragment,{children:[d.jsx(ae,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:d.jsx(se,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":V(a.open),...c,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(ft,{titleId:a.titleId}),d.jsx(pt,{contentRef:l,descriptionId:a.descriptionId})]})]})}),z="DialogTitle",ye=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=N(z,n);return d.jsx(P.h2,{id:r.titleId,...o,ref:t})});ye.displayName=z;var be="DialogDescription",Ce=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=N(be,n);return d.jsx(P.p,{id:r.descriptionId,...o,ref:t})});Ce.displayName=be;var De="DialogClose",Ne=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=N(De,n);return d.jsx(P.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Ne.displayName=De;function V(e){return e?"open":"closed"}var Pe="DialogTitleWarning",[Ct,xe]=we(Pe,{contentName:A,titleName:z,docsSlug:"dialog"}),ft=({titleId:e})=>{const t=xe(Pe),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
2
 
3
3
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
4
 
@@ -0,0 +1,12 @@
1
+ import{a as E,b as T,_ as $,c as B}from"./tslib.es6-C7pnyCjR.js";import{r as S}from"./index-Cb9e4tly.js";import"./hoist-non-react-statics.cjs-C-Qo8PK8.js";function Ne(e,t,r){if(r===void 0&&(r=Error),!e)throw new r(t)}var m;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(m||(m={}));var v;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(v||(v={}));var R;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(R||(R={}));function re(e){return e.type===v.literal}function Se(e){return e.type===v.argument}function le(e){return e.type===v.number}function fe(e){return e.type===v.date}function me(e){return e.type===v.time}function ce(e){return e.type===v.select}function pe(e){return e.type===v.plural}function Pe(e){return e.type===v.pound}function Ee(e){return e.type===v.tag}function ve(e){return!!(e&&typeof e=="object"&&e.type===R.number)}function W(e){return!!(e&&typeof e=="object"&&e.type===R.dateTime)}var xe=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Le=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Re(e){var t={};return e.replace(Le,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Ce=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Me(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Ce).filter(function(f){return f.length>0}),r=[],n=0,i=t;n<i.length;n++){var a=i[n],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],h=s.slice(1),u=0,l=h;u<l.length;u++){var c=l[u];if(c.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:h})}return r}function Oe(e){return e.replace(/^(.*?)-/,"")}var ne=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,be=/^(@+)?(\+|#+)?[rs]?$/g,De=/(\*)(0+)|(#+)(0+)|(0+)/g,ge=/^(0+)$/;function ie(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(be,function(r,n,i){return typeof i!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):i==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),t}function Te(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Ge(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!ge.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ae(e){var t={},r=Te(e);return r||t}function Ue(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Oe(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=E(E(E({},t),{notation:"scientific"}),i.options.reduce(function(h,u){return E(E({},h),ae(u))},{}));continue;case"engineering":t=E(E(E({},t),{notation:"engineering"}),i.options.reduce(function(h,u){return E(E({},h),ae(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(De,function(h,u,l,c,f,x){if(u)t.minimumIntegerDigits=l.length;else{if(c&&f)throw new Error("We currently do not support maximum integer digits");if(x)throw new Error("We currently do not support exact integer digits")}return""});continue}if(ge.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(ne.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(ne,function(h,u,l,c,f,x){return l==="*"?t.minimumFractionDigits=u.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:f&&x?(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length+x.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var a=i.options[0];a==="w"?t=E(E({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=E(E({},t),ie(a)));continue}if(be.test(i.stem)){t=E(E({},t),ie(i.stem));continue}var s=Te(i.stem);s&&(t=E(E({},t),s));var o=Ge(i.stem);o&&(t=E(E({},t),o))}return t}var F={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Fe(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var a=0;n+1<e.length&&e.charAt(n+1)===i;)a++,n++;var s=1+(a&1),o=a<2?1:3+(a>>1),h="a",u=we(t);for((u=="H"||u=="k")&&(o=0);o-- >0;)r+=h;for(;s-- >0;)r=u+r}else i==="J"?r+="H":r+=i}return r}function we(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=F[n||""]||F[r||""]||F["".concat(r,"-001")]||F["001"];return i[0]}var X,Ve=new RegExp("^".concat(xe.source,"*")),Xe=new RegExp("".concat(xe.source,"*$"));function p(e,t){return{start:e,end:t}}var ke=!!String.prototype.startsWith&&"_a".startsWith("a",1),We=!!String.fromCodePoint,Ze=!!Object.fromEntries,je=!!String.prototype.codePointAt,ze=!!String.prototype.trimStart,Je=!!String.prototype.trimEnd,qe=!!Number.isSafeInteger,Qe=qe?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Z=!0;try{var Ye=He("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Z=((X=Ye.exec("a"))===null||X===void 0?void 0:X[0])==="a"}catch{Z=!1}var se=ke?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},j=We?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},oe=Ze?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var a=i[n],s=a[0],o=a[1];r[s]=o}return r},de=je?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var i=t.charCodeAt(r),a;return i<55296||i>56319||r+1===n||(a=t.charCodeAt(r+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},$e=ze?function(t){return t.trimStart()}:function(t){return t.replace(Ve,"")},Ke=Je?function(t){return t.trimEnd()}:function(t){return t.replace(Xe,"")};function He(e,t){return new RegExp(e,t)}var z;if(Z){var he=He("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");z=function(t,r){var n;he.lastIndex=r;var i=he.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else z=function(t,r){for(var n=[];;){var i=de(t,r);if(i===void 0||ye(i)||nt(i))break;n.push(i),r+=i>=65536?2:1}return j.apply(void 0,n)};var et=(function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,n);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:v.pound,location:p(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(m.UNMATCHED_CLOSING_TAG,p(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&J(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:v.literal,value:"<".concat(i,"/>"),location:p(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,r,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!J(this.char()))return this.error(m.INVALID_TAG,p(o,this.clonePosition()));var h=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(m.UNMATCHED_CLOSING_TAG,p(h,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:v.tag,value:i,children:s,location:p(n,this.clonePosition())},err:null}:this.error(m.INVALID_TAG,p(o,this.clonePosition())))}else return this.error(m.UNCLOSED_TAG,p(n,this.clonePosition()))}else return this.error(m.INVALID_TAG,p(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&rt(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var a=this.tryParseQuote(r);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,r);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var h=p(n,this.clonePosition());return{val:{type:v.literal,value:i,location:h},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!tt(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return j.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),j(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,p(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(m.EMPTY_ARGUMENT,p(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(m.MALFORMED_ARGUMENT,p(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,p(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:v.argument,value:i,location:p(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,p(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(m.MALFORMED_ARGUMENT,p(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=z(this.message,r),i=r+n.length;this.bumpTo(i);var a=this.clonePosition(),s=p(t,a);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,h=this.clonePosition();switch(o){case"":return this.error(m.EXPECT_ARGUMENT_TYPE,p(s,h));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var f=Ke(c.val);if(f.length===0)return this.error(m.EXPECT_ARGUMENT_STYLE,p(this.clonePosition(),this.clonePosition()));var x=p(l,this.clonePosition());u={style:f,styleLocation:x}}var g=this.tryParseArgumentClose(i);if(g.err)return g;var d=p(i,this.clonePosition());if(u&&se(u==null?void 0:u.style,"::",0)){var A=$e(u.style.slice(2));if(o==="number"){var c=this.parseNumberSkeletonFromString(A,u.styleLocation);return c.err?c:{val:{type:v.number,value:n,location:d,style:c.val},err:null}}else{if(A.length===0)return this.error(m.EXPECT_DATE_TIME_SKELETON,d);var M=A;this.locale&&(M=Fe(A,this.locale));var f={type:R.dateTime,pattern:M,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Re(M):{}},L=o==="date"?v.date:v.time;return{val:{type:L,value:n,location:d,style:f},err:null}}}return{val:{type:o==="number"?v.number:o==="date"?v.date:v.time,value:n,location:d,style:(a=u==null?void 0:u.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var H=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(m.EXPECT_SELECT_ARGUMENT_OPTIONS,p(H,E({},H)));this.bumpSpace();var O=this.parseIdentifierIfPossible(),I=0;if(o!=="select"&&O.value==="offset"){if(!this.bumpIf(":"))return this.error(m.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,p(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(m.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,m.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),O=this.parseIdentifierIfPossible(),I=c.val}var U=this.tryParsePluralOrSelectOptions(t,o,r,O);if(U.err)return U;var g=this.tryParseArgumentClose(i);if(g.err)return g;var te=p(i,this.clonePosition());return o==="select"?{val:{type:v.select,value:n,options:oe(U.val),location:te},err:null}:{val:{type:v.plural,value:n,options:oe(U.val),offset:I,pluralType:o==="plural"?"cardinal":"ordinal",location:te},err:null}}default:return this.error(m.INVALID_ARGUMENT_TYPE,p(s,h))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,p(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(m.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,p(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=Me(t)}catch{return this.error(m.INVALID_NUMBER_SKELETON,r)}return{val:{type:R.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?Ue(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var a,s=!1,o=[],h=new Set,u=i.value,l=i.location;;){if(u.length===0){var c=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(m.EXPECT_PLURAL_ARGUMENT_SELECTOR,m.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;l=p(c,this.clonePosition()),u=this.message.slice(c.offset,this.offset())}else break}if(h.has(u))return this.error(r==="select"?m.DUPLICATE_SELECT_ARGUMENT_SELECTOR:m.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);u==="other"&&(s=!0),this.bumpSpace();var x=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?m.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:m.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,p(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(t+1,r,n);if(g.err)return g;var d=this.tryParseArgumentClose(x);if(d.err)return d;o.push([u,{value:g.val,location:p(x,this.clonePosition())}]),h.add(u),this.bumpSpace(),a=this.parseIdentifierIfPossible(),u=a.value,l=a.location}return o.length===0?this.error(r==="select"?m.EXPECT_SELECT_ARGUMENT_SELECTOR:m.EXPECT_PLURAL_ARGUMENT_SELECTOR,p(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(m.MISSING_OTHER_CLAUSE,p(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var h=p(i,this.clonePosition());return a?(s*=n,Qe(s)?{val:s,err:null}:this.error(r,h)):this.error(t,h)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=de(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(se(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ye(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e})();function J(e){return e>=97&&e<=122||e>=65&&e<=90}function tt(e){return J(e)||e===47}function rt(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function ye(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function nt(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function q(e){e.forEach(function(t){if(delete t.location,ce(t)||pe(t))for(var r in t.options)delete t.options[r].location,q(t.options[r].value);else le(t)&&ve(t.style)||(fe(t)||me(t))&&W(t.style)?delete t.style.location:Ee(t)&&q(t.children)})}function it(e,t){t===void 0&&(t={}),t=E({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new et(e,t).parse();if(r.err){var n=SyntaxError(m[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||q(r.val),r.val}function y(e,t){var r=t&&t.cache?t.cache:lt,n=t&&t.serializer?t.serializer:ut,i=t&&t.strategy?t.strategy:ot;return i(e,{cache:r,serializer:n})}function at(e){return e==null||typeof e=="number"||typeof e=="boolean"}function st(e,t,r,n){var i=at(n)?n:r(n),a=t.get(i);return typeof a>"u"&&(a=e.call(this,n),t.set(i,a)),a}function _e(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,n),t.set(i,a)),a}function Be(e,t,r,n,i){return r.bind(t,e,n,i)}function ot(e,t){var r=e.length===1?st:_e;return Be(e,this,r,t.cache.create(),t.serializer)}function ht(e,t){return Be(e,this,_e,t.cache.create(),t.serializer)}var ut=function(){return JSON.stringify(arguments)};function K(){this.cache=Object.create(null)}K.prototype.get=function(e){return this.cache[e]};K.prototype.set=function(e,t){this.cache[e]=t};var lt={create:function(){return new K}},_={variadic:ht},C;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(C||(C={}));var V=(function(e){T(t,e);function t(r,n,i){var a=e.call(this,r)||this;return a.code=n,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),ue=(function(e){T(t,e);function t(r,n,i,a){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),C.INVALID_VALUE,a)||this}return t})(V),ft=(function(e){T(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),C.INVALID_VALUE,i)||this}return t})(V),mt=(function(e){T(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),C.MISSING_VALUE,n)||this}return t})(V),b;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(b||(b={}));function ct(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==b.literal||r.type!==b.literal?t.push(r):n.value+=r.value,t},[])}function pt(e){return typeof e=="function"}function w(e,t,r,n,i,a,s){if(e.length===1&&re(e[0]))return[{type:b.literal,value:e[0].value}];for(var o=[],h=0,u=e;h<u.length;h++){var l=u[h];if(re(l)){o.push({type:b.literal,value:l.value});continue}if(Pe(l)){typeof a=="number"&&o.push({type:b.literal,value:r.getNumberFormat(t).format(a)});continue}var c=l.value;if(!(i&&c in i))throw new mt(c,s);var f=i[c];if(Se(l)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),o.push({type:typeof f=="string"?b.literal:b.object,value:f});continue}if(fe(l)){var x=typeof l.style=="string"?n.date[l.style]:W(l.style)?l.style.parsedOptions:void 0;o.push({type:b.literal,value:r.getDateTimeFormat(t,x).format(f)});continue}if(me(l)){var x=typeof l.style=="string"?n.time[l.style]:W(l.style)?l.style.parsedOptions:n.time.medium;o.push({type:b.literal,value:r.getDateTimeFormat(t,x).format(f)});continue}if(le(l)){var x=typeof l.style=="string"?n.number[l.style]:ve(l.style)?l.style.parsedOptions:void 0;x&&x.scale&&(f=f*(x.scale||1)),o.push({type:b.literal,value:r.getNumberFormat(t,x).format(f)});continue}if(Ee(l)){var g=l.children,d=l.value,A=i[d];if(!pt(A))throw new ft(d,"function",s);var M=w(g,t,r,n,i,a),L=A(M.map(function(I){return I.value}));Array.isArray(L)||(L=[L]),o.push.apply(o,L.map(function(I){return{type:typeof I=="string"?b.literal:b.object,value:I}}))}if(ce(l)){var H=l.options[f]||l.options.other;if(!H)throw new ue(l.value,f,Object.keys(l.options),s);o.push.apply(o,w(H.value,t,r,n,i));continue}if(pe(l)){var H=l.options["=".concat(f)];if(!H){if(!Intl.PluralRules)throw new V(`Intl.PluralRules is not available in this environment.
2
+ Try polyfilling it using "@formatjs/intl-pluralrules"
3
+ `,C.MISSING_INTL_API,s);var O=r.getPluralRules(t,{type:l.pluralType}).select(f-(l.offset||0));H=l.options[O]||l.options.other}if(!H)throw new ue(l.value,f,Object.keys(l.options),s);o.push.apply(o,w(H.value,t,r,n,i,f-(l.offset||0)));continue}}return ct(o)}function Et(e,t){return t?E(E(E({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=E(E({},e[n]),t[n]||{}),r},{})):e}function vt(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Et(e[n],t[n]),r},E({},e)):e}function k(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function xt(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:y(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,B([void 0],r,!1)))},{cache:k(e.number),strategy:_.variadic}),getDateTimeFormat:y(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,B([void 0],r,!1)))},{cache:k(e.dateTime),strategy:_.variadic}),getPluralRules:y(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,B([void 0],r,!1)))},{cache:k(e.pluralRules),strategy:_.variadic})}}var bt=(function(){function e(t,r,n,i){var a=this;if(r===void 0&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(h){var u=a.formatToParts(h);if(u.length===1)return u[0].value;var l=u.reduce(function(c,f){return!c.length||f.type!==b.literal||typeof c[c.length-1]!="string"?c.push(f.value):c[c.length-1]+=f.value,c},[]);return l.length<=1?l[0]||"":l},this.formatToParts=function(h){return w(a.ast,a.locales,a.formatters,a.formats,h,void 0,a.message)},this.resolvedOptions=function(){var h;return{locale:((h=a.resolvedLocale)===null||h===void 0?void 0:h.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var o=$(s,["formatters"]);this.ast=e.__parse(t,E(E({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=vt(e.formats,n),this.formatters=i&&i.formatters||xt(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=it,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})(),P;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(P||(P={}));var D=(function(e){T(t,e);function t(r,n,i){var a=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return a=e.call(this,"[@formatjs/intl Error ".concat(r,"] ").concat(n,`
4
+ `).concat(s?`
5
+ `.concat(s.message,`
6
+ `).concat(s.stack):""))||this,a.code=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t})(Error),gt=(function(e){T(t,e);function t(r,n){return e.call(this,P.UNSUPPORTED_FORMATTER,r,n)||this}return t})(D),Lt=(function(e){T(t,e);function t(r,n){return e.call(this,P.INVALID_CONFIG,r,n)||this}return t})(D),Rt=(function(e){T(t,e);function t(r,n){return e.call(this,P.MISSING_DATA,r,n)||this}return t})(D),Tt=(function(e){T(t,e);function t(r,n,i){var a=e.call(this,P.FORMAT_ERROR,"".concat(r,`
7
+ Locale: `).concat(n,`
8
+ `),i)||this;return a.locale=n,a}return t})(D),Ct=(function(e){T(t,e);function t(r,n,i,a){var s=e.call(this,"".concat(r,`
9
+ MessageID: `).concat(i==null?void 0:i.id,`
10
+ Default Message: `).concat(i==null?void 0:i.defaultMessage,`
11
+ Description: `).concat(i==null?void 0:i.description,`
12
+ `),n,a)||this;return s.descriptor=i,s.locale=n,s}return t})(Tt),Mt=(function(e){T(t,e);function t(r,n){var i=e.call(this,P.MISSING_TRANSLATION,'Missing message: "'.concat(r.id,'" for locale "').concat(n,'", using ').concat(r.defaultMessage?"default message (".concat(typeof r.defaultMessage=="string"?r.defaultMessage:r.defaultMessage.map(function(a){var s;return(s=a.value)!==null&&s!==void 0?s:JSON.stringify(a)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=r,i}return t})(D);function Ot(e,t,r){return r===void 0&&(r={}),t.reduce(function(n,i){return i in e?n[i]=e[i]:i in r&&(n[i]=r[i]),n},{})}var dt=function(e){},Ht=function(e){},yt={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:dt,onWarn:Ht};function _t(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function N(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Dt(e){e===void 0&&(e=_t());var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,i=y(function(){for(var o,h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];return new((o=Intl.DateTimeFormat).bind.apply(o,B([void 0],h,!1)))},{cache:N(e.dateTime),strategy:_.variadic}),a=y(function(){for(var o,h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];return new((o=Intl.NumberFormat).bind.apply(o,B([void 0],h,!1)))},{cache:N(e.number),strategy:_.variadic}),s=y(function(){for(var o,h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];return new((o=Intl.PluralRules).bind.apply(o,B([void 0],h,!1)))},{cache:N(e.pluralRules),strategy:_.variadic});return{getDateTimeFormat:i,getNumberFormat:a,getMessageFormat:y(function(o,h,u,l){return new bt(o,h,u,E({formatters:{getNumberFormat:a,getDateTimeFormat:i,getPluralRules:s}},l||{}))},{cache:N(e.message),strategy:_.variadic}),getRelativeTimeFormat:y(function(){for(var o=[],h=0;h<arguments.length;h++)o[h]=arguments[h];return new(t.bind.apply(t,B([void 0],o,!1)))},{cache:N(e.relativeTime),strategy:_.variadic}),getPluralRules:s,getListFormat:y(function(){for(var o=[],h=0;h<arguments.length;h++)o[h]=arguments[h];return new(r.bind.apply(r,B([void 0],o,!1)))},{cache:N(e.list),strategy:_.variadic}),getDisplayNames:y(function(){for(var o=[],h=0;h<arguments.length;h++)o[h]=arguments[h];return new(n.bind.apply(n,B([void 0],o,!1)))},{cache:N(e.displayNames),strategy:_.variadic})}}function Gt(e,t,r,n){var i=e&&e[t],a;if(i&&(a=i[r]),a)return a;n(new gt("No ".concat(t," format named: ").concat(r)))}function Bt(e){Ne(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var Ut=E(E({},yt),{textComponent:S.Fragment});function Ft(e){return function(t){return e(S.Children.toArray(t))}}function wt(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e),n=Object.keys(t),i=r.length;if(n.length!==i)return!1;for(var a=0;a<i;a++){var s=r[a];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var ee=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=S.createContext(null)):S.createContext(null);ee.Consumer;var At=ee.Provider,Vt=At,It=ee;function Ae(){var e=S.useContext(It);return Bt(e),e}var Q;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Q||(Q={}));var Y;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Y||(Y={}));function Ie(e){var t=function(r){var n=Ae(),i=r.value,a=r.children,s=$(r,["value","children"]),o=typeof i=="string"?new Date(i||0):i,h=e==="formatDate"?n.formatDateToParts(o,s):n.formatTimeToParts(o,s);return a(h)};return t.displayName=Y[e],t}function G(e){var t=function(r){var n=Ae(),i=r.value,a=r.children,s=$(r,["value","children"]),o=n[e](i,s);if(typeof a=="function")return a(o);var h=n.textComponent||S.Fragment;return S.createElement(h,null,o)};return t.displayName=Q[e],t}function Xt(e){return e}var kt=G("formatDate");G("formatTime");G("formatNumber");G("formatList");G("formatDisplayName");Ie("formatDate");Ie("formatTime");export{yt as D,C as E,kt as F,bt as I,Mt as M,Vt as P,v as T,Ct as a,Tt as b,V as c,Xt as d,Dt as e,Ot as f,Gt as g,Lt as h,Ne as i,Rt as j,_t as k,Bt as l,Ut as m,Ft as n,pt as o,wt as s,Ae as u};
@@ -1 +1 @@
1
- import{g as r}from"./_commonjsHelpers-Cpj98o6Y.js";import{r as o}from"./index-C7hTFOIV.js";var t=o();const m=r(t);export{t as r,m as v};
1
+ import{g as r}from"./_commonjsHelpers-Cpj98o6Y.js";import{r as o}from"./index-BPCsOyHr.js";var t=o();const m=r(t);export{t as r,m as v};
@@ -1 +1 @@
1
- import{r as i,R as Je}from"./index-Cb9e4tly.js";import{j as v}from"./jsx-runtime-BTJTZTIL.js";import{r as Qe,v as et}from"./index-BPrLDK9Y.js";import{S as tt,a as nt}from"./index-BlMeVLsf.js";import{u as rt,o as ot,s as st,f as it,a as at,b as ct,h as lt,l as ut,c as dt}from"./floating-ui.react-dom-CHDTbv7n.js";function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ue(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ft(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ue(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ue(e[o],null)}}}}function N(...e){return i.useCallback(ft(...e),e)}function pe(e,t=[]){let n=[];function r(s,a){const u=i.createContext(a),l=n.length;n=[...n,a];const c=f=>{var w;const{scope:h,children:p,...m}=f,y=((w=h==null?void 0:h[e])==null?void 0:w[l])||u,x=i.useMemo(()=>m,Object.values(m));return v.jsx(y.Provider,{value:x,children:p})};c.displayName=s+"Provider";function d(f,h){var y;const p=((y=h==null?void 0:h[e])==null?void 0:y[l])||u,m=i.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(u){const l=(u==null?void 0:u[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return o.scopeName=e,[r,pt(o,...t)]}function pt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((u,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...u,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ht=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],R=ht.reduce((e,t)=>{const n=i.forwardRef((r,o)=>{const{asChild:s,...a}=r,u=s?tt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vt(e,t){e&&Qe.flushSync(()=>e.dispatchEvent(t))}function L(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function mt(e,t=globalThis==null?void 0:globalThis.document){const n=L(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var yt="DismissableLayer",G="dismissableLayer.update",xt="dismissableLayer.pointerDownOutside",gt="dismissableLayer.focusOutside",de,he=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ve=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:u,...l}=e,c=i.useContext(he),[d,f]=i.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=i.useState({}),m=N(t,g=>f(g)),y=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(x),P=d?y.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,C=P>=w,T=Ct(g=>{const O=g.target,k=[...c.branches].some(M=>M.contains(O));!C||k||(o==null||o(g),a==null||a(g),g.defaultPrevented||u==null||u())},h),E=Et(g=>{const O=g.target;[...c.branches].some(M=>M.contains(O))||(s==null||s(g),a==null||a(g),g.defaultPrevented||u==null||u())},h);return mt(g=>{P===c.layers.size-1&&(r==null||r(g),!g.defaultPrevented&&u&&(g.preventDefault(),u()))},h),i.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(de=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),fe(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=de)}},[d,h,n,c]),i.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),fe())},[d,c]),i.useEffect(()=>{const g=()=>p({});return document.addEventListener(G,g),()=>document.removeEventListener(G,g)},[]),v.jsx(R.div,{...l,ref:m,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,E.onFocusCapture),onBlurCapture:A(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,T.onPointerDownCapture)})});ve.displayName=yt;var wt="DismissableLayerBranch",Pt=i.forwardRef((e,t)=>{const n=i.useContext(he),r=i.useRef(null),o=N(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),v.jsx(R.div,{...e,ref:o})});Pt.displayName=wt;function Ct(e,t=globalThis==null?void 0:globalThis.document){const n=L(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=u=>{if(u.target&&!r.current){let l=function(){me(xt,n,c,{discrete:!0})};const c={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Et(e,t=globalThis==null?void 0:globalThis.document){const n=L(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&me(gt,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fe(){const e=new CustomEvent(G);document.dispatchEvent(e)}function me(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?vt(o,s):o.dispatchEvent(s)}var S=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},bt=Je.useId||(()=>{}),Tt=0;function At(e){const[t,n]=i.useState(bt());return S(()=>{n(r=>r??String(Tt++))},[e]),t?`radix-${t}`:""}var Rt="Arrow",ye=i.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return v.jsx(R.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});ye.displayName=Rt;var Ot=ye;function St(e){const[t,n]=i.useState(void 0);return S(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,u;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,u=c.blockSize}else a=e.offsetWidth,u=e.offsetHeight;n({width:a,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var K="Popper",[xe,ge]=pe(K),[Nt,we]=xe(K),Pe=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return v.jsx(Nt,{scope:t,anchor:r,onAnchorChange:o,children:n})};Pe.displayName=K;var Ce="PopperAnchor",Ee=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=we(Ce,n),a=i.useRef(null),u=N(t,a);return i.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:v.jsx(R.div,{...o,ref:u})});Ee.displayName=Ce;var q="PopperContent",[Dt,_t]=xe(q),be=i.forwardRef((e,t)=>{var re,oe,se,ie,ae,ce;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...y}=e,x=we(q,n),[w,P]=i.useState(null),b=N(t,I=>P(I)),[C,T]=i.useState(null),E=St(C),g=(E==null?void 0:E.width)??0,O=(E==null?void 0:E.height)??0,k=r+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},ee=Array.isArray(c)?c:[c],$e=ee.length>0,W={padding:M,boundary:ee.filter(Mt),altBoundary:$e},{refs:He,floatingStyles:te,placement:Be,isPositioned:$,middlewareData:D}=rt({strategy:"fixed",placement:k,whileElementsMounted:(...I)=>dt(...I,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[ot({mainAxis:o+O,alignmentAxis:a}),l&&st({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?ut():void 0,...W}),l&&it({...W}),at({...W,apply:({elements:I,rects:le,availableWidth:Ve,availableHeight:Ke})=>{const{width:qe,height:Ze}=le.reference,B=I.floating.style;B.setProperty("--radix-popper-available-width",`${Ve}px`),B.setProperty("--radix-popper-available-height",`${Ke}px`),B.setProperty("--radix-popper-anchor-width",`${qe}px`),B.setProperty("--radix-popper-anchor-height",`${Ze}px`)}}),C&&ct({element:C,padding:u}),It({arrowWidth:g,arrowHeight:O}),h&&lt({strategy:"referenceHidden",...W})]}),[ne,Fe]=Re(Be),H=L(m);S(()=>{$&&(H==null||H())},[$,H]);const Ue=(re=D.arrow)==null?void 0:re.x,ze=(oe=D.arrow)==null?void 0:oe.y,Ye=((se=D.arrow)==null?void 0:se.centerOffset)!==0,[Ge,Xe]=i.useState();return S(()=>{w&&Xe(window.getComputedStyle(w).zIndex)},[w]),v.jsx("div",{ref:He.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:$?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ge,"--radix-popper-transform-origin":[(ie=D.transformOrigin)==null?void 0:ie.x,(ae=D.transformOrigin)==null?void 0:ae.y].join(" "),...((ce=D.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(Dt,{scope:n,placedSide:ne,onArrowChange:T,arrowX:Ue,arrowY:ze,shouldHideArrow:Ye,children:v.jsx(R.div,{"data-side":ne,"data-align":Fe,...y,ref:b,style:{...y.style,animation:$?void 0:"none"}})})})});be.displayName=q;var Te="PopperArrow",Lt={top:"bottom",right:"left",bottom:"top",left:"right"},Ae=i.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=_t(Te,r),a=Lt[s.placedSide];return v.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:v.jsx(Ot,{...o,ref:n,style:{...o.style,display:"block"}})})});Ae.displayName=Te;function Mt(e){return e!==null}var It=e=>({name:"transformOrigin",options:e,fn(t){var x,w,P;const{placement:n,rects:r,middlewareData:o}=t,a=((x=o.arrow)==null?void 0:x.centerOffset)!==0,u=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[c,d]=Re(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((w=o.arrow)==null?void 0:w.x)??0)+u/2,p=(((P=o.arrow)==null?void 0:P.y)??0)+l/2;let m="",y="";return c==="bottom"?(m=a?f:`${h}px`,y=`${-l}px`):c==="top"?(m=a?f:`${h}px`,y=`${r.floating.height+l}px`):c==="right"?(m=`${-l}px`,y=a?f:`${p}px`):c==="left"&&(m=`${r.floating.width+l}px`,y=a?f:`${p}px`),{data:{x:m,y}}}});function Re(e){const[t,n="center"]=e.split("-");return[t,n]}var jt=Pe,kt=Ee,Wt=be,$t=Ae,Ht="Portal",Oe=i.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[o,s]=i.useState(!1);S(()=>s(!0),[]);const a=n||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?et.createPortal(v.jsx(R.div,{...r,ref:t}),a):null});Oe.displayName=Ht;function Bt(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var Z=e=>{const{present:t,children:n}=e,r=Ft(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=N(r.ref,Ut(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};Z.displayName="Presence";function Ft(e){const[t,n]=i.useState(),r=i.useRef({}),o=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[u,l]=Bt(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const c=F(r.current);s.current=u==="mounted"?c:"none"},[u]),S(()=>{const c=r.current,d=o.current;if(d!==e){const h=s.current,p=F(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),S(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=p=>{const y=F(r.current).includes(p.animationName);if(p.target===t&&y&&(l("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=p=>{p.target===t&&(s.current=F(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:i.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function F(e){return(e==null?void 0:e.animationName)||"none"}function Ut(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function zt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Yt({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:r,u=L(n),l=i.useCallback(c=>{if(s){const f=typeof c=="function"?c(e):c;f!==e&&u(f)}else o(c)},[s,e,o,u]);return[a,l]}function Yt({defaultProp:e,onChange:t}){const n=i.useState(e),[r]=n,o=i.useRef(r),s=L(t);return i.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var Gt="VisuallyHidden",Se=i.forwardRef((e,t)=>v.jsx(R.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Se.displayName=Gt;var Xt=Se,[U,hn]=pe("Tooltip",[ge]),z=ge(),Ne="TooltipProvider",Vt=700,X="tooltip.open",[Kt,J]=U(Ne),De=e=>{const{__scopeTooltip:t,delayDuration:n=Vt,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,[a,u]=i.useState(!0),l=i.useRef(!1),c=i.useRef(0);return i.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),v.jsx(Kt,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(c.current),u(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:s})};De.displayName=Ne;var Y="Tooltip",[qt,j]=U(Y),_e=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:a,delayDuration:u}=e,l=J(Y,e.__scopeTooltip),c=z(t),[d,f]=i.useState(null),h=At(),p=i.useRef(0),m=a??l.disableHoverableContent,y=u??l.delayDuration,x=i.useRef(!1),[w=!1,P]=zt({prop:r,defaultProp:o,onChange:g=>{g?(l.onOpen(),document.dispatchEvent(new CustomEvent(X))):l.onClose(),s==null||s(g)}}),b=i.useMemo(()=>w?x.current?"delayed-open":"instant-open":"closed",[w]),C=i.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,P(!0)},[P]),T=i.useCallback(()=>{window.clearTimeout(p.current),p.current=0,P(!1)},[P]),E=i.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,P(!0),p.current=0},y)},[y,P]);return i.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),v.jsx(jt,{...c,children:v.jsx(qt,{scope:t,contentId:h,open:w,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayed?E():C()},[l.isOpenDelayed,E,C]),onTriggerLeave:i.useCallback(()=>{m?T():(window.clearTimeout(p.current),p.current=0)},[T,m]),onOpen:C,onClose:T,disableHoverableContent:m,children:n})})};_e.displayName=Y;var V="TooltipTrigger",Le=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=j(V,n),s=J(V,n),a=z(n),u=i.useRef(null),l=N(t,u,o.onTriggerChange),c=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>c.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),v.jsx(kt,{asChild:!0,...a,children:v.jsx(R.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:A(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:A(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:A(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:A(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:A(e.onBlur,o.onClose),onClick:A(e.onClick,o.onClose)})})});Le.displayName=V;var Q="TooltipPortal",[Zt,Jt]=U(Q,{forceMount:void 0}),Me=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=j(Q,t);return v.jsx(Zt,{scope:t,forceMount:n,children:v.jsx(Z,{present:n||s.open,children:v.jsx(Oe,{asChild:!0,container:o,children:r})})})};Me.displayName=Q;var _="TooltipContent",Ie=i.forwardRef((e,t)=>{const n=Jt(_,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=j(_,e.__scopeTooltip);return v.jsx(Z,{present:r||a.open,children:a.disableHoverableContent?v.jsx(je,{side:o,...s,ref:t}):v.jsx(Qt,{side:o,...s,ref:t})})}),Qt=i.forwardRef((e,t)=>{const n=j(_,e.__scopeTooltip),r=J(_,e.__scopeTooltip),o=i.useRef(null),s=N(t,o),[a,u]=i.useState(null),{trigger:l,onClose:c}=n,d=o.current,{onPointerInTransitChange:f}=r,h=i.useCallback(()=>{u(null),f(!1)},[f]),p=i.useCallback((m,y)=>{const x=m.currentTarget,w={x:m.clientX,y:m.clientY},P=nn(w,x.getBoundingClientRect()),b=rn(w,P),C=on(y.getBoundingClientRect()),T=an([...b,...C]);u(T),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(l&&d){const m=x=>p(x,d),y=x=>p(x,l);return l.addEventListener("pointerleave",m),d.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",m),d.removeEventListener("pointerleave",y)}}},[l,d,p,h]),i.useEffect(()=>{if(a){const m=y=>{const x=y.target,w={x:y.clientX,y:y.clientY},P=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),b=!sn(w,a);P?h():b&&(h(),c())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,d,a,c,h]),v.jsx(je,{...e,ref:s})}),[en,tn]=U(Y,{isInside:!1}),je=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...u}=e,l=j(_,n),c=z(n),{onClose:d}=l;return i.useEffect(()=>(document.addEventListener(X,d),()=>document.removeEventListener(X,d)),[d]),i.useEffect(()=>{if(l.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),v.jsx(ve,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:v.jsxs(Wt,{"data-state":l.stateAttribute,...c,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(nt,{children:r}),v.jsx(en,{scope:n,isInside:!0,children:v.jsx(Xt,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Ie.displayName=_;var ke="TooltipArrow",We=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=z(n);return tn(ke,n).isInside?null:v.jsx($t,{...o,...r,ref:t})});We.displayName=ke;function nn(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function rn(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function on(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function sn(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const u=t[s].x,l=t[s].y,c=t[a].x,d=t[a].y;l>r!=d>r&&n<(c-u)*(r-l)/(d-l)+u&&(o=!o)}return o}function an(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),cn(t)}function cn(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var vn=De,mn=_e,yn=Le,xn=Me,gn=Ie,wn=We;export{wn as A,gn as C,xn as P,mn as R,yn as T,vn as a};
1
+ import{r as i,R as Je}from"./index-Cb9e4tly.js";import{j as v}from"./jsx-runtime-BTJTZTIL.js";import{r as Qe,v as et}from"./index-De-a_lfy.js";import{S as tt,a as nt}from"./index-BlMeVLsf.js";import{u as rt,o as ot,s as st,f as it,a as at,b as ct,h as lt,l as ut,c as dt}from"./floating-ui.react-dom-B6FmGF3s.js";function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ue(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ft(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ue(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ue(e[o],null)}}}}function S(...e){return i.useCallback(ft(...e),e)}function pe(e,t=[]){let n=[];function r(s,a){const u=i.createContext(a),l=n.length;n=[...n,a];const c=f=>{var w;const{scope:h,children:p,...m}=f,y=((w=h==null?void 0:h[e])==null?void 0:w[l])||u,x=i.useMemo(()=>m,Object.values(m));return v.jsx(y.Provider,{value:x,children:p})};c.displayName=s+"Provider";function d(f,h){var y;const p=((y=h==null?void 0:h[e])==null?void 0:y[l])||u,m=i.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(u){const l=(u==null?void 0:u[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return o.scopeName=e,[r,pt(o,...t)]}function pt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((u,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...u,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ht=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],R=ht.reduce((e,t)=>{const n=i.forwardRef((r,o)=>{const{asChild:s,...a}=r,u=s?tt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vt(e,t){e&&Qe.flushSync(()=>e.dispatchEvent(t))}function L(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function mt(e,t=globalThis==null?void 0:globalThis.document){const n=L(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var yt="DismissableLayer",G="dismissableLayer.update",xt="dismissableLayer.pointerDownOutside",gt="dismissableLayer.focusOutside",de,he=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ve=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:u,...l}=e,c=i.useContext(he),[d,f]=i.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=i.useState({}),m=S(t,g=>f(g)),y=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(x),P=d?y.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,C=P>=w,T=Ct(g=>{const O=g.target,k=[...c.branches].some(M=>M.contains(O));!C||k||(o==null||o(g),a==null||a(g),g.defaultPrevented||u==null||u())},h),E=Et(g=>{const O=g.target;[...c.branches].some(M=>M.contains(O))||(s==null||s(g),a==null||a(g),g.defaultPrevented||u==null||u())},h);return mt(g=>{P===c.layers.size-1&&(r==null||r(g),!g.defaultPrevented&&u&&(g.preventDefault(),u()))},h),i.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(de=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),fe(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=de)}},[d,h,n,c]),i.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),fe())},[d,c]),i.useEffect(()=>{const g=()=>p({});return document.addEventListener(G,g),()=>document.removeEventListener(G,g)},[]),v.jsx(R.div,{...l,ref:m,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,E.onFocusCapture),onBlurCapture:A(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,T.onPointerDownCapture)})});ve.displayName=yt;var wt="DismissableLayerBranch",Pt=i.forwardRef((e,t)=>{const n=i.useContext(he),r=i.useRef(null),o=S(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),v.jsx(R.div,{...e,ref:o})});Pt.displayName=wt;function Ct(e,t=globalThis==null?void 0:globalThis.document){const n=L(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=u=>{if(u.target&&!r.current){let l=function(){me(xt,n,c,{discrete:!0})};const c={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Et(e,t=globalThis==null?void 0:globalThis.document){const n=L(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&me(gt,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fe(){const e=new CustomEvent(G);document.dispatchEvent(e)}function me(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?vt(o,s):o.dispatchEvent(s)}var N=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},bt=Je.useId||(()=>{}),Tt=0;function At(e){const[t,n]=i.useState(bt());return N(()=>{n(r=>r??String(Tt++))},[e]),t?`radix-${t}`:""}var Rt="Arrow",ye=i.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return v.jsx(R.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});ye.displayName=Rt;var Ot=ye;function Nt(e){const[t,n]=i.useState(void 0);return N(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,u;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,u=c.blockSize}else a=e.offsetWidth,u=e.offsetHeight;n({width:a,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var K="Popper",[xe,ge]=pe(K),[St,we]=xe(K),Pe=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return v.jsx(St,{scope:t,anchor:r,onAnchorChange:o,children:n})};Pe.displayName=K;var Ce="PopperAnchor",Ee=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=we(Ce,n),a=i.useRef(null),u=S(t,a);return i.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:v.jsx(R.div,{...o,ref:u})});Ee.displayName=Ce;var q="PopperContent",[Dt,_t]=xe(q),be=i.forwardRef((e,t)=>{var re,oe,se,ie,ae,ce;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...y}=e,x=we(q,n),[w,P]=i.useState(null),b=S(t,I=>P(I)),[C,T]=i.useState(null),E=Nt(C),g=(E==null?void 0:E.width)??0,O=(E==null?void 0:E.height)??0,k=r+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},ee=Array.isArray(c)?c:[c],$e=ee.length>0,W={padding:M,boundary:ee.filter(Mt),altBoundary:$e},{refs:He,floatingStyles:te,placement:Be,isPositioned:$,middlewareData:D}=rt({strategy:"fixed",placement:k,whileElementsMounted:(...I)=>dt(...I,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[ot({mainAxis:o+O,alignmentAxis:a}),l&&st({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?ut():void 0,...W}),l&&it({...W}),at({...W,apply:({elements:I,rects:le,availableWidth:Ve,availableHeight:Ke})=>{const{width:qe,height:Ze}=le.reference,B=I.floating.style;B.setProperty("--radix-popper-available-width",`${Ve}px`),B.setProperty("--radix-popper-available-height",`${Ke}px`),B.setProperty("--radix-popper-anchor-width",`${qe}px`),B.setProperty("--radix-popper-anchor-height",`${Ze}px`)}}),C&&ct({element:C,padding:u}),It({arrowWidth:g,arrowHeight:O}),h&&lt({strategy:"referenceHidden",...W})]}),[ne,Fe]=Re(Be),H=L(m);N(()=>{$&&(H==null||H())},[$,H]);const Ue=(re=D.arrow)==null?void 0:re.x,ze=(oe=D.arrow)==null?void 0:oe.y,Ye=((se=D.arrow)==null?void 0:se.centerOffset)!==0,[Ge,Xe]=i.useState();return N(()=>{w&&Xe(window.getComputedStyle(w).zIndex)},[w]),v.jsx("div",{ref:He.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:$?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ge,"--radix-popper-transform-origin":[(ie=D.transformOrigin)==null?void 0:ie.x,(ae=D.transformOrigin)==null?void 0:ae.y].join(" "),...((ce=D.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(Dt,{scope:n,placedSide:ne,onArrowChange:T,arrowX:Ue,arrowY:ze,shouldHideArrow:Ye,children:v.jsx(R.div,{"data-side":ne,"data-align":Fe,...y,ref:b,style:{...y.style,animation:$?void 0:"none"}})})})});be.displayName=q;var Te="PopperArrow",Lt={top:"bottom",right:"left",bottom:"top",left:"right"},Ae=i.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=_t(Te,r),a=Lt[s.placedSide];return v.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:v.jsx(Ot,{...o,ref:n,style:{...o.style,display:"block"}})})});Ae.displayName=Te;function Mt(e){return e!==null}var It=e=>({name:"transformOrigin",options:e,fn(t){var x,w,P;const{placement:n,rects:r,middlewareData:o}=t,a=((x=o.arrow)==null?void 0:x.centerOffset)!==0,u=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[c,d]=Re(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((w=o.arrow)==null?void 0:w.x)??0)+u/2,p=(((P=o.arrow)==null?void 0:P.y)??0)+l/2;let m="",y="";return c==="bottom"?(m=a?f:`${h}px`,y=`${-l}px`):c==="top"?(m=a?f:`${h}px`,y=`${r.floating.height+l}px`):c==="right"?(m=`${-l}px`,y=a?f:`${p}px`):c==="left"&&(m=`${r.floating.width+l}px`,y=a?f:`${p}px`),{data:{x:m,y}}}});function Re(e){const[t,n="center"]=e.split("-");return[t,n]}var jt=Pe,kt=Ee,Wt=be,$t=Ae,Ht="Portal",Oe=i.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[o,s]=i.useState(!1);N(()=>s(!0),[]);const a=n||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?et.createPortal(v.jsx(R.div,{...r,ref:t}),a):null});Oe.displayName=Ht;function Bt(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var Z=e=>{const{present:t,children:n}=e,r=Ft(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=S(r.ref,Ut(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};Z.displayName="Presence";function Ft(e){const[t,n]=i.useState(),r=i.useRef({}),o=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[u,l]=Bt(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const c=F(r.current);s.current=u==="mounted"?c:"none"},[u]),N(()=>{const c=r.current,d=o.current;if(d!==e){const h=s.current,p=F(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),N(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=p=>{const y=F(r.current).includes(p.animationName);if(p.target===t&&y&&(l("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=p=>{p.target===t&&(s.current=F(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:i.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function F(e){return(e==null?void 0:e.animationName)||"none"}function Ut(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function zt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Yt({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:r,u=L(n),l=i.useCallback(c=>{if(s){const f=typeof c=="function"?c(e):c;f!==e&&u(f)}else o(c)},[s,e,o,u]);return[a,l]}function Yt({defaultProp:e,onChange:t}){const n=i.useState(e),[r]=n,o=i.useRef(r),s=L(t);return i.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var Gt="VisuallyHidden",Ne=i.forwardRef((e,t)=>v.jsx(R.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ne.displayName=Gt;var Xt=Ne,[U]=pe("Tooltip",[ge]),z=ge(),Se="TooltipProvider",Vt=700,X="tooltip.open",[Kt,J]=U(Se),De=e=>{const{__scopeTooltip:t,delayDuration:n=Vt,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,[a,u]=i.useState(!0),l=i.useRef(!1),c=i.useRef(0);return i.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),v.jsx(Kt,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(c.current),u(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:s})};De.displayName=Se;var Y="Tooltip",[qt,j]=U(Y),_e=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:a,delayDuration:u}=e,l=J(Y,e.__scopeTooltip),c=z(t),[d,f]=i.useState(null),h=At(),p=i.useRef(0),m=a??l.disableHoverableContent,y=u??l.delayDuration,x=i.useRef(!1),[w=!1,P]=zt({prop:r,defaultProp:o,onChange:g=>{g?(l.onOpen(),document.dispatchEvent(new CustomEvent(X))):l.onClose(),s==null||s(g)}}),b=i.useMemo(()=>w?x.current?"delayed-open":"instant-open":"closed",[w]),C=i.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,P(!0)},[P]),T=i.useCallback(()=>{window.clearTimeout(p.current),p.current=0,P(!1)},[P]),E=i.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,P(!0),p.current=0},y)},[y,P]);return i.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),v.jsx(jt,{...c,children:v.jsx(qt,{scope:t,contentId:h,open:w,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayed?E():C()},[l.isOpenDelayed,E,C]),onTriggerLeave:i.useCallback(()=>{m?T():(window.clearTimeout(p.current),p.current=0)},[T,m]),onOpen:C,onClose:T,disableHoverableContent:m,children:n})})};_e.displayName=Y;var V="TooltipTrigger",Le=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=j(V,n),s=J(V,n),a=z(n),u=i.useRef(null),l=S(t,u,o.onTriggerChange),c=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>c.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),v.jsx(kt,{asChild:!0,...a,children:v.jsx(R.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:A(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:A(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:A(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:A(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:A(e.onBlur,o.onClose),onClick:A(e.onClick,o.onClose)})})});Le.displayName=V;var Q="TooltipPortal",[Zt,Jt]=U(Q,{forceMount:void 0}),Me=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=j(Q,t);return v.jsx(Zt,{scope:t,forceMount:n,children:v.jsx(Z,{present:n||s.open,children:v.jsx(Oe,{asChild:!0,container:o,children:r})})})};Me.displayName=Q;var _="TooltipContent",Ie=i.forwardRef((e,t)=>{const n=Jt(_,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=j(_,e.__scopeTooltip);return v.jsx(Z,{present:r||a.open,children:a.disableHoverableContent?v.jsx(je,{side:o,...s,ref:t}):v.jsx(Qt,{side:o,...s,ref:t})})}),Qt=i.forwardRef((e,t)=>{const n=j(_,e.__scopeTooltip),r=J(_,e.__scopeTooltip),o=i.useRef(null),s=S(t,o),[a,u]=i.useState(null),{trigger:l,onClose:c}=n,d=o.current,{onPointerInTransitChange:f}=r,h=i.useCallback(()=>{u(null),f(!1)},[f]),p=i.useCallback((m,y)=>{const x=m.currentTarget,w={x:m.clientX,y:m.clientY},P=nn(w,x.getBoundingClientRect()),b=rn(w,P),C=on(y.getBoundingClientRect()),T=an([...b,...C]);u(T),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(l&&d){const m=x=>p(x,d),y=x=>p(x,l);return l.addEventListener("pointerleave",m),d.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",m),d.removeEventListener("pointerleave",y)}}},[l,d,p,h]),i.useEffect(()=>{if(a){const m=y=>{const x=y.target,w={x:y.clientX,y:y.clientY},P=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),b=!sn(w,a);P?h():b&&(h(),c())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,d,a,c,h]),v.jsx(je,{...e,ref:s})}),[en,tn]=U(Y,{isInside:!1}),je=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...u}=e,l=j(_,n),c=z(n),{onClose:d}=l;return i.useEffect(()=>(document.addEventListener(X,d),()=>document.removeEventListener(X,d)),[d]),i.useEffect(()=>{if(l.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),v.jsx(ve,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:v.jsxs(Wt,{"data-state":l.stateAttribute,...c,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(nt,{children:r}),v.jsx(en,{scope:n,isInside:!0,children:v.jsx(Xt,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Ie.displayName=_;var ke="TooltipArrow",We=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=z(n);return tn(ke,n).isInside?null:v.jsx($t,{...o,...r,ref:t})});We.displayName=ke;function nn(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function rn(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function on(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function sn(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const u=t[s].x,l=t[s].y,c=t[a].x,d=t[a].y;l>r!=d>r&&n<(c-u)*(r-l)/(d-l)+u&&(o=!o)}return o}function an(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),cn(t)}function cn(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var hn=De,vn=_e,mn=Le,yn=Me,xn=Ie,gn=We;export{gn as A,xn as C,yn as P,vn as R,mn as T,hn as a};
@@ -0,0 +1,7 @@
1
+ import{r as a}from"./index-Cb9e4tly.js";import{j as c}from"./jsx-runtime-BTJTZTIL.js";import{c as y,R as G,P as W,O as k,W as B,C as Y,T as q,D as V,a as h,b as z}from"./index-D21-dwfw.js";import{a as J}from"./index-BlMeVLsf.js";function K(e,t=[]){let o=[];function n(s,i){const l=a.createContext(i),u=o.length;o=[...o,i];const p=v=>{var _;const{scope:f,children:x,...m}=v,D=((_=f==null?void 0:f[e])==null?void 0:_[u])||l,F=a.useMemo(()=>m,Object.values(m));return c.jsx(D.Provider,{value:F,children:x})};p.displayName=s+"Provider";function A(v,f){var D;const x=((D=f==null?void 0:f[e])==null?void 0:D[u])||l,m=a.useContext(x);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${v}\` must be used within \`${s}\``)}return[p,A]}const r=()=>{const s=o.map(i=>a.createContext(i));return function(l){const u=(l==null?void 0:l[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return r.scopeName=e,[n,Q(r,...t)]}function Q(...e){const t=e[0];if(e.length===1)return t;const o=()=>{const n=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const i=n.reduce((l,{useScope:u,scopeName:p})=>{const v=u(s)[`__scope${p}`];return{...l,...v}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return o.scopeName=t.scopeName,o}function C(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function U(...e){return t=>{let o=!1;const n=e.map(r=>{const s=C(r,t);return!o&&typeof s=="function"&&(o=!0),s});if(o)return()=>{for(let r=0;r<n.length;r++){const s=n[r];typeof s=="function"?s():C(e[r],null)}}}}function N(...e){return a.useCallback(U(...e),e)}function X(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e==null||e(r),o===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var P="AlertDialog",[Z]=K(P,[y]),d=y(),R=e=>{const{__scopeAlertDialog:t,...o}=e,n=d(t);return c.jsx(G,{...n,...o,modal:!0})};R.displayName=P;var H="AlertDialogTrigger",S=a.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...n}=e,r=d(o);return c.jsx(z,{...r,...n,ref:t})});S.displayName=H;var ee="AlertDialogPortal",b=e=>{const{__scopeAlertDialog:t,...o}=e,n=d(t);return c.jsx(W,{...n,...o})};b.displayName=ee;var te="AlertDialogOverlay",T=a.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...n}=e,r=d(o);return c.jsx(k,{...r,...n,ref:t})});T.displayName=te;var g="AlertDialogContent",[oe,re]=Z(g),O=a.forwardRef((e,t)=>{const{__scopeAlertDialog:o,children:n,...r}=e,s=d(o),i=a.useRef(null),l=N(t,i),u=a.useRef(null);return c.jsx(B,{contentName:g,titleName:j,docsSlug:"alert-dialog",children:c.jsx(oe,{scope:o,cancelRef:u,children:c.jsxs(Y,{role:"alertdialog",...s,...r,ref:l,onOpenAutoFocus:X(r.onOpenAutoFocus,p=>{var A;p.preventDefault(),(A=u.current)==null||A.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[c.jsx(J,{children:n}),c.jsx(ae,{contentRef:i})]})})})});O.displayName=g;var j="AlertDialogTitle",E=a.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...n}=e,r=d(o);return c.jsx(q,{...r,...n,ref:t})});E.displayName=j;var w="AlertDialogDescription",M=a.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...n}=e,r=d(o);return c.jsx(V,{...r,...n,ref:t})});M.displayName=w;var ne="AlertDialogAction",$=a.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...n}=e,r=d(o);return c.jsx(h,{...r,...n,ref:t})});$.displayName=ne;var I="AlertDialogCancel",L=a.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...n}=e,{cancelRef:r}=re(I,o),s=d(o),i=N(t,r);return c.jsx(h,{...s,...n,ref:i})});L.displayName=I;var ae=({contentRef:e})=>{const t=`\`${g}\` requires a description for the component to be accessible for screen reader users.
2
+
3
+ You can add a description to the \`${g}\` by passing a \`${w}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
+
5
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${g}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
6
+
7
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return a.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ue=R,pe=S,de=b,fe=T,ge=O,Ae=$,ve=L,me=E,De=M;export{Ae as A,ge as C,De as D,fe as O,de as P,ue as R,me as T,ve as a,pe as b};
@@ -1 +1 @@
1
- import{r as i,R as ut}from"./index-Cb9e4tly.js";import{j as v}from"./jsx-runtime-BTJTZTIL.js";import{r as dt,v as lt}from"./index-BPrLDK9Y.js";import{S as Pe}from"./index-BlMeVLsf.js";import{u as ft,o as pt,s as vt,f as mt,a as ht,b as gt,h as Pt,l as Et,c as yt}from"./floating-ui.react-dom-CHDTbv7n.js";import{h as xt,R as Ct}from"./Combination-IIMvWCmY.js";function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function de(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=de(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():de(e[r],null)}}}}function S(...e){return i.useCallback(bt(...e),e)}function Ee(e,t=[]){let n=[];function o(s,c){const a=i.createContext(c),d=n.length;n=[...n,c];const u=m=>{var g;const{scope:p,children:h,...E}=m,f=((g=p==null?void 0:p[e])==null?void 0:g[d])||a,x=i.useMemo(()=>E,Object.values(E));return v.jsx(f.Provider,{value:x,children:h})};u.displayName=s+"Provider";function l(m,p){var f;const h=((f=p==null?void 0:p[e])==null?void 0:f[d])||a,E=i.useContext(h);if(E)return E;if(c!==void 0)return c;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[u,l]}const r=()=>{const s=n.map(c=>i.createContext(c));return function(a){const d=(a==null?void 0:a[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return r.scopeName=e,[o,wt(r,...t)]}function wt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const c=o.reduce((a,{useScope:d,scopeName:u})=>{const m=d(s)[`__scope${u}`];return{...a,...m}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var At=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],A=At.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?Pe:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ot(e,t){e&&dt.flushSync(()=>e.dispatchEvent(t))}function N(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function Rt(e,t=globalThis==null?void 0:globalThis.document){const n=N(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Nt="DismissableLayer",G="dismissableLayer.update",St="dismissableLayer.pointerDownOutside",_t="dismissableLayer.focusOutside",le,ye=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xe=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...d}=e,u=i.useContext(ye),[l,m]=i.useState(null),p=(l==null?void 0:l.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=i.useState({}),E=S(t,P=>m(P)),f=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(x),C=l?f.indexOf(l):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,y=C>=g,M=Mt(P=>{const T=P.target,U=[...u.branches].some(L=>L.contains(T));!y||U||(r==null||r(P),c==null||c(P),P.defaultPrevented||a==null||a())},p),w=Dt(P=>{const T=P.target;[...u.branches].some(L=>L.contains(T))||(s==null||s(P),c==null||c(P),P.defaultPrevented||a==null||a())},p);return Rt(P=>{C===u.layers.size-1&&(o==null||o(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},p),i.useEffect(()=>{if(l)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(le=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(l)),u.layers.add(l),fe(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=le)}},[l,p,n,u]),i.useEffect(()=>()=>{l&&(u.layers.delete(l),u.layersWithOutsidePointerEventsDisabled.delete(l),fe())},[l,u]),i.useEffect(()=>{const P=()=>h({});return document.addEventListener(G,P),()=>document.removeEventListener(G,P)},[]),v.jsx(A.div,{...d,ref:E,style:{pointerEvents:b?y?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,w.onFocusCapture),onBlurCapture:R(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,M.onPointerDownCapture)})});xe.displayName=Nt;var Tt="DismissableLayerBranch",Ft=i.forwardRef((e,t)=>{const n=i.useContext(ye),o=i.useRef(null),r=S(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),v.jsx(A.div,{...e,ref:r})});Ft.displayName=Tt;function Mt(e,t=globalThis==null?void 0:globalThis.document){const n=N(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let d=function(){Ce(St,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=d,t.addEventListener("click",r.current,{once:!0})):d()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Dt(e,t=globalThis==null?void 0:globalThis.document){const n=N(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&Ce(_t,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function fe(){const e=new CustomEvent(G);document.dispatchEvent(e)}function Ce(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Ot(r,s):r.dispatchEvent(s)}var K=0;function It(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??pe()),document.body.insertAdjacentElement("beforeend",e[1]??pe()),K++,()=>{K===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),K--}},[])}function pe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Y="focusScope.autoFocusOnMount",X="focusScope.autoFocusOnUnmount",ve={bubbles:!1,cancelable:!0},Lt="FocusScope",be=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,d]=i.useState(null),u=N(r),l=N(s),m=i.useRef(null),p=S(t,f=>d(f)),h=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let f=function(b){if(h.paused||!a)return;const y=b.target;a.contains(y)?m.current=y:O(m.current,{select:!0})},x=function(b){if(h.paused||!a)return;const y=b.relatedTarget;y!==null&&(a.contains(y)||O(m.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const M of b)M.removedNodes.length>0&&O(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",x);const C=new MutationObserver(g);return a&&C.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",x),C.disconnect()}}},[o,a,h.paused]),i.useEffect(()=>{if(a){he.add(h);const f=document.activeElement;if(!a.contains(f)){const g=new CustomEvent(Y,ve);a.addEventListener(Y,u),a.dispatchEvent(g),g.defaultPrevented||(jt(Bt(we(a)),{select:!0}),document.activeElement===f&&O(a))}return()=>{a.removeEventListener(Y,u),setTimeout(()=>{const g=new CustomEvent(X,ve);a.addEventListener(X,l),a.dispatchEvent(g),g.defaultPrevented||O(f??document.body,{select:!0}),a.removeEventListener(X,l),he.remove(h)},0)}}},[a,u,l,h]);const E=i.useCallback(f=>{if(!n&&!o||h.paused)return;const x=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(x&&g){const C=f.currentTarget,[b,y]=kt(C);b&&y?!f.shiftKey&&g===y?(f.preventDefault(),n&&O(b,{select:!0})):f.shiftKey&&g===b&&(f.preventDefault(),n&&O(y,{select:!0})):g===C&&f.preventDefault()}},[n,o,h.paused]);return v.jsx(A.div,{tabIndex:-1,...c,ref:p,onKeyDown:E})});be.displayName=Lt;function jt(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(O(o,{select:t}),document.activeElement!==n)return}function kt(e){const t=we(e),n=me(t,e),o=me(t.reverse(),e);return[n,o]}function we(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function me(e,t){for(const n of e)if(!Ut(n,{upTo:t}))return n}function Ut(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wt(e){return e instanceof HTMLInputElement&&"select"in e}function O(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wt(e)&&t&&e.select()}}var he=$t();function $t(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ge(e,t),e.unshift(t)},remove(t){var n;e=ge(e,t),(n=e[0])==null||n.resume()}}}function ge(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Bt(e){return e.filter(t=>t.tagName!=="A")}var F=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},zt=ut.useId||(()=>{}),Ht=0;function Kt(e){const[t,n]=i.useState(zt());return F(()=>{n(o=>o??String(Ht++))},[e]),e||(t?`radix-${t}`:"")}var Yt="Arrow",Ae=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return v.jsx(A.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ae.displayName=Yt;var Xt=Ae;function Gt(e){const[t,n]=i.useState(void 0);return F(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let c,a;if("borderBoxSize"in s){const d=s.borderBoxSize,u=Array.isArray(d)?d[0]:d;c=u.inlineSize,a=u.blockSize}else c=e.offsetWidth,a=e.offsetHeight;n({width:c,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var V="Popper",[Oe,Re]=Ee(V),[Vt,Ne]=Oe(V),Se=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return v.jsx(Vt,{scope:t,anchor:o,onAnchorChange:r,children:n})};Se.displayName=V;var _e="PopperAnchor",Te=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Ne(_e,n),c=i.useRef(null),a=S(t,c);return i.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:v.jsx(A.div,{...r,ref:a})});Te.displayName=_e;var Z="PopperContent",[Zt,qt]=Oe(Z),Fe=i.forwardRef((e,t)=>{var oe,re,se,ae,ie,ce;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:c=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:E,...f}=e,x=Ne(Z,n),[g,C]=i.useState(null),b=S(t,j=>C(j)),[y,M]=i.useState(null),w=Gt(y),P=(w==null?void 0:w.width)??0,T=(w==null?void 0:w.height)??0,U=o+(s!=="center"?"-"+s:""),L=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},ee=Array.isArray(u)?u:[u],Ze=ee.length>0,W={padding:L,boundary:ee.filter(Qt),altBoundary:Ze},{refs:qe,floatingStyles:te,placement:Je,isPositioned:$,middlewareData:D}=ft({strategy:"fixed",placement:U,whileElementsMounted:(...j)=>yt(...j,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[pt({mainAxis:r+T,alignmentAxis:c}),d&&vt({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Et():void 0,...W}),d&&mt({...W}),ht({...W,apply:({elements:j,rects:ue,availableWidth:st,availableHeight:at})=>{const{width:it,height:ct}=ue.reference,z=j.floating.style;z.setProperty("--radix-popper-available-width",`${st}px`),z.setProperty("--radix-popper-available-height",`${at}px`),z.setProperty("--radix-popper-anchor-width",`${it}px`),z.setProperty("--radix-popper-anchor-height",`${ct}px`)}}),y&&gt({element:y,padding:a}),en({arrowWidth:P,arrowHeight:T}),p&&Pt({strategy:"referenceHidden",...W})]}),[ne,Qe]=Ie(Je),B=N(E);F(()=>{$&&(B==null||B())},[$,B]);const et=(oe=D.arrow)==null?void 0:oe.x,tt=(re=D.arrow)==null?void 0:re.y,nt=((se=D.arrow)==null?void 0:se.centerOffset)!==0,[ot,rt]=i.useState();return F(()=>{g&&rt(window.getComputedStyle(g).zIndex)},[g]),v.jsx("div",{ref:qe.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:$?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ot,"--radix-popper-transform-origin":[(ae=D.transformOrigin)==null?void 0:ae.x,(ie=D.transformOrigin)==null?void 0:ie.y].join(" "),...((ce=D.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(Zt,{scope:n,placedSide:ne,onArrowChange:M,arrowX:et,arrowY:tt,shouldHideArrow:nt,children:v.jsx(A.div,{"data-side":ne,"data-align":Qe,...f,ref:b,style:{...f.style,animation:$?void 0:"none"}})})})});Fe.displayName=Z;var Me="PopperArrow",Jt={top:"bottom",right:"left",bottom:"top",left:"right"},De=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=qt(Me,o),c=Jt[s.placedSide];return v.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:v.jsx(Xt,{...r,ref:n,style:{...r.style,display:"block"}})})});De.displayName=Me;function Qt(e){return e!==null}var en=e=>({name:"transformOrigin",options:e,fn(t){var x,g,C;const{placement:n,rects:o,middlewareData:r}=t,c=((x=r.arrow)==null?void 0:x.centerOffset)!==0,a=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[u,l]=Ie(n),m={start:"0%",center:"50%",end:"100%"}[l],p=(((g=r.arrow)==null?void 0:g.x)??0)+a/2,h=(((C=r.arrow)==null?void 0:C.y)??0)+d/2;let E="",f="";return u==="bottom"?(E=c?m:`${p}px`,f=`${-d}px`):u==="top"?(E=c?m:`${p}px`,f=`${o.floating.height+d}px`):u==="right"?(E=`${-d}px`,f=c?m:`${h}px`):u==="left"&&(E=`${o.floating.width+d}px`,f=c?m:`${h}px`),{data:{x:E,y:f}}}});function Ie(e){const[t,n="center"]=e.split("-");return[t,n]}var tn=Se,Le=Te,nn=Fe,on=De,rn="Portal",je=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);F(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?lt.createPortal(v.jsx(A.div,{...o,ref:t}),c):null});je.displayName=rn;function sn(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var q=e=>{const{present:t,children:n}=e,o=an(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=S(o.ref,cn(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};q.displayName="Presence";function an(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,d]=sn(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=H(o.current);s.current=a==="mounted"?u:"none"},[a]),F(()=>{const u=o.current,l=r.current;if(l!==e){const p=s.current,h=H(u);e?d("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(l&&p!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),F(()=>{if(t){let u;const l=t.ownerDocument.defaultView??window,m=h=>{const f=H(o.current).includes(h.animationName);if(h.target===t&&f&&(d("ANIMATION_END"),!r.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=h=>{h.target===t&&(s.current=H(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{l.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function H(e){return(e==null?void 0:e.animationName)||"none"}function cn(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function un({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=dn({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o,a=N(n),d=i.useCallback(u=>{if(s){const m=typeof u=="function"?u(e):u;m!==e&&a(m)}else r(u)},[s,e,r,a]);return[c,d]}function dn({defaultProp:e,onChange:t}){const n=i.useState(e),[o]=n,r=i.useRef(o),s=N(t);return i.useEffect(()=>{r.current!==o&&(s(o),r.current=o)},[o,r,s]),n}var J="Popover",[ke,wn]=Ee(J,[Re]),k=Re(),[ln,_]=ke(J),Ue=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:c=!1}=e,a=k(t),d=i.useRef(null),[u,l]=i.useState(!1),[m=!1,p]=un({prop:o,defaultProp:r,onChange:s});return v.jsx(tn,{...a,children:v.jsx(ln,{scope:t,contentId:Kt(),triggerRef:d,open:m,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>l(!0),[]),onCustomAnchorRemove:i.useCallback(()=>l(!1),[]),modal:c,children:n})})};Ue.displayName=J;var We="PopoverAnchor",$e=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=_(We,n),s=k(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:a}=r;return i.useEffect(()=>(c(),()=>a()),[c,a]),v.jsx(Le,{...s,...o,ref:t})});$e.displayName=We;var Be="PopoverTrigger",fn=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=_(Be,n),s=k(n),c=S(t,r.triggerRef),a=v.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Ve(r.open),...o,ref:c,onClick:R(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:v.jsx(Le,{asChild:!0,...s,children:a})});fn.displayName=Be;var Q="PopoverPortal",[pn,vn]=ke(Q,{forceMount:void 0}),ze=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=_(Q,t);return v.jsx(pn,{scope:t,forceMount:n,children:v.jsx(q,{present:n||s.open,children:v.jsx(je,{asChild:!0,container:r,children:o})})})};ze.displayName=Q;var I="PopoverContent",He=i.forwardRef((e,t)=>{const n=vn(I,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=_(I,e.__scopePopover);return v.jsx(q,{present:o||s.open,children:s.modal?v.jsx(mn,{...r,ref:t}):v.jsx(hn,{...r,ref:t})})});He.displayName=I;var mn=i.forwardRef((e,t)=>{const n=_(I,e.__scopePopover),o=i.useRef(null),r=S(t,o),s=i.useRef(!1);return i.useEffect(()=>{const c=o.current;if(c)return xt(c)},[]),v.jsx(Ct,{as:Pe,allowPinchZoom:!0,children:v.jsx(Ke,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,c=>{var a;c.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,c=>{const a=c.detail.originalEvent,d=a.button===0&&a.ctrlKey===!0,u=a.button===2||d;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:R(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),hn=i.forwardRef((e,t)=>{const n=_(I,e.__scopePopover),o=i.useRef(!1),r=i.useRef(!1);return v.jsx(Ke,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,a;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(o.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Ke=i.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:l,...m}=e,p=_(I,n),h=k(n);return It(),v.jsx(be,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:v.jsx(xe,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:l,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:v.jsx(nn,{"data-state":Ve(p.open),role:"dialog",id:p.contentId,...h,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ye="PopoverClose",Xe=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=_(Ye,n);return v.jsx(A.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Xe.displayName=Ye;var gn="PopoverArrow",Ge=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=k(n);return v.jsx(on,{...r,...o,ref:t})});Ge.displayName=gn;function Ve(e){return e?"open":"closed"}var An=Ue,On=$e,Rn=ze,Nn=He,Sn=Xe,_n=Ge;export{On as A,Nn as C,Rn as P,An as R,Sn as a,_n as b};
1
+ import{r as i,R as ut}from"./index-Cb9e4tly.js";import{j as v}from"./jsx-runtime-BTJTZTIL.js";import{r as dt,v as lt}from"./index-De-a_lfy.js";import{S as Pe}from"./index-BlMeVLsf.js";import{u as ft,o as pt,s as vt,f as mt,a as ht,b as gt,h as Pt,l as Et,c as yt}from"./floating-ui.react-dom-B6FmGF3s.js";import{h as xt,R as Ct}from"./Combination-IIMvWCmY.js";function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function de(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=de(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():de(e[r],null)}}}}function S(...e){return i.useCallback(bt(...e),e)}function Ee(e,t=[]){let n=[];function o(s,c){const a=i.createContext(c),d=n.length;n=[...n,c];const u=m=>{var g;const{scope:p,children:h,...E}=m,f=((g=p==null?void 0:p[e])==null?void 0:g[d])||a,x=i.useMemo(()=>E,Object.values(E));return v.jsx(f.Provider,{value:x,children:h})};u.displayName=s+"Provider";function l(m,p){var f;const h=((f=p==null?void 0:p[e])==null?void 0:f[d])||a,E=i.useContext(h);if(E)return E;if(c!==void 0)return c;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[u,l]}const r=()=>{const s=n.map(c=>i.createContext(c));return function(a){const d=(a==null?void 0:a[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return r.scopeName=e,[o,wt(r,...t)]}function wt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const c=o.reduce((a,{useScope:d,scopeName:u})=>{const m=d(s)[`__scope${u}`];return{...a,...m}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var At=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],A=At.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?Pe:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ot(e,t){e&&dt.flushSync(()=>e.dispatchEvent(t))}function N(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function Rt(e,t=globalThis==null?void 0:globalThis.document){const n=N(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Nt="DismissableLayer",G="dismissableLayer.update",St="dismissableLayer.pointerDownOutside",_t="dismissableLayer.focusOutside",le,ye=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xe=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...d}=e,u=i.useContext(ye),[l,m]=i.useState(null),p=(l==null?void 0:l.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=i.useState({}),E=S(t,P=>m(P)),f=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(x),C=l?f.indexOf(l):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,y=C>=g,M=Mt(P=>{const T=P.target,U=[...u.branches].some(L=>L.contains(T));!y||U||(r==null||r(P),c==null||c(P),P.defaultPrevented||a==null||a())},p),w=Dt(P=>{const T=P.target;[...u.branches].some(L=>L.contains(T))||(s==null||s(P),c==null||c(P),P.defaultPrevented||a==null||a())},p);return Rt(P=>{C===u.layers.size-1&&(o==null||o(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},p),i.useEffect(()=>{if(l)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(le=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(l)),u.layers.add(l),fe(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=le)}},[l,p,n,u]),i.useEffect(()=>()=>{l&&(u.layers.delete(l),u.layersWithOutsidePointerEventsDisabled.delete(l),fe())},[l,u]),i.useEffect(()=>{const P=()=>h({});return document.addEventListener(G,P),()=>document.removeEventListener(G,P)},[]),v.jsx(A.div,{...d,ref:E,style:{pointerEvents:b?y?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,w.onFocusCapture),onBlurCapture:R(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,M.onPointerDownCapture)})});xe.displayName=Nt;var Tt="DismissableLayerBranch",Ft=i.forwardRef((e,t)=>{const n=i.useContext(ye),o=i.useRef(null),r=S(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),v.jsx(A.div,{...e,ref:r})});Ft.displayName=Tt;function Mt(e,t=globalThis==null?void 0:globalThis.document){const n=N(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let d=function(){Ce(St,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=d,t.addEventListener("click",r.current,{once:!0})):d()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Dt(e,t=globalThis==null?void 0:globalThis.document){const n=N(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&Ce(_t,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function fe(){const e=new CustomEvent(G);document.dispatchEvent(e)}function Ce(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Ot(r,s):r.dispatchEvent(s)}var K=0;function It(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??pe()),document.body.insertAdjacentElement("beforeend",e[1]??pe()),K++,()=>{K===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),K--}},[])}function pe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Y="focusScope.autoFocusOnMount",X="focusScope.autoFocusOnUnmount",ve={bubbles:!1,cancelable:!0},Lt="FocusScope",be=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,d]=i.useState(null),u=N(r),l=N(s),m=i.useRef(null),p=S(t,f=>d(f)),h=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let f=function(b){if(h.paused||!a)return;const y=b.target;a.contains(y)?m.current=y:O(m.current,{select:!0})},x=function(b){if(h.paused||!a)return;const y=b.relatedTarget;y!==null&&(a.contains(y)||O(m.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const M of b)M.removedNodes.length>0&&O(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",x);const C=new MutationObserver(g);return a&&C.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",x),C.disconnect()}}},[o,a,h.paused]),i.useEffect(()=>{if(a){he.add(h);const f=document.activeElement;if(!a.contains(f)){const g=new CustomEvent(Y,ve);a.addEventListener(Y,u),a.dispatchEvent(g),g.defaultPrevented||(jt(Bt(we(a)),{select:!0}),document.activeElement===f&&O(a))}return()=>{a.removeEventListener(Y,u),setTimeout(()=>{const g=new CustomEvent(X,ve);a.addEventListener(X,l),a.dispatchEvent(g),g.defaultPrevented||O(f??document.body,{select:!0}),a.removeEventListener(X,l),he.remove(h)},0)}}},[a,u,l,h]);const E=i.useCallback(f=>{if(!n&&!o||h.paused)return;const x=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(x&&g){const C=f.currentTarget,[b,y]=kt(C);b&&y?!f.shiftKey&&g===y?(f.preventDefault(),n&&O(b,{select:!0})):f.shiftKey&&g===b&&(f.preventDefault(),n&&O(y,{select:!0})):g===C&&f.preventDefault()}},[n,o,h.paused]);return v.jsx(A.div,{tabIndex:-1,...c,ref:p,onKeyDown:E})});be.displayName=Lt;function jt(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(O(o,{select:t}),document.activeElement!==n)return}function kt(e){const t=we(e),n=me(t,e),o=me(t.reverse(),e);return[n,o]}function we(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function me(e,t){for(const n of e)if(!Ut(n,{upTo:t}))return n}function Ut(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wt(e){return e instanceof HTMLInputElement&&"select"in e}function O(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wt(e)&&t&&e.select()}}var he=$t();function $t(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ge(e,t),e.unshift(t)},remove(t){var n;e=ge(e,t),(n=e[0])==null||n.resume()}}}function ge(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Bt(e){return e.filter(t=>t.tagName!=="A")}var F=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},zt=ut.useId||(()=>{}),Ht=0;function Kt(e){const[t,n]=i.useState(zt());return F(()=>{n(o=>o??String(Ht++))},[e]),e||(t?`radix-${t}`:"")}var Yt="Arrow",Ae=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return v.jsx(A.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ae.displayName=Yt;var Xt=Ae;function Gt(e){const[t,n]=i.useState(void 0);return F(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let c,a;if("borderBoxSize"in s){const d=s.borderBoxSize,u=Array.isArray(d)?d[0]:d;c=u.inlineSize,a=u.blockSize}else c=e.offsetWidth,a=e.offsetHeight;n({width:c,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var V="Popper",[Oe,Re]=Ee(V),[Vt,Ne]=Oe(V),Se=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return v.jsx(Vt,{scope:t,anchor:o,onAnchorChange:r,children:n})};Se.displayName=V;var _e="PopperAnchor",Te=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Ne(_e,n),c=i.useRef(null),a=S(t,c);return i.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:v.jsx(A.div,{...r,ref:a})});Te.displayName=_e;var Z="PopperContent",[Zt,qt]=Oe(Z),Fe=i.forwardRef((e,t)=>{var oe,re,se,ae,ie,ce;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:c=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:E,...f}=e,x=Ne(Z,n),[g,C]=i.useState(null),b=S(t,j=>C(j)),[y,M]=i.useState(null),w=Gt(y),P=(w==null?void 0:w.width)??0,T=(w==null?void 0:w.height)??0,U=o+(s!=="center"?"-"+s:""),L=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},ee=Array.isArray(u)?u:[u],Ze=ee.length>0,W={padding:L,boundary:ee.filter(Qt),altBoundary:Ze},{refs:qe,floatingStyles:te,placement:Je,isPositioned:$,middlewareData:D}=ft({strategy:"fixed",placement:U,whileElementsMounted:(...j)=>yt(...j,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[pt({mainAxis:r+T,alignmentAxis:c}),d&&vt({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Et():void 0,...W}),d&&mt({...W}),ht({...W,apply:({elements:j,rects:ue,availableWidth:st,availableHeight:at})=>{const{width:it,height:ct}=ue.reference,z=j.floating.style;z.setProperty("--radix-popper-available-width",`${st}px`),z.setProperty("--radix-popper-available-height",`${at}px`),z.setProperty("--radix-popper-anchor-width",`${it}px`),z.setProperty("--radix-popper-anchor-height",`${ct}px`)}}),y&&gt({element:y,padding:a}),en({arrowWidth:P,arrowHeight:T}),p&&Pt({strategy:"referenceHidden",...W})]}),[ne,Qe]=Ie(Je),B=N(E);F(()=>{$&&(B==null||B())},[$,B]);const et=(oe=D.arrow)==null?void 0:oe.x,tt=(re=D.arrow)==null?void 0:re.y,nt=((se=D.arrow)==null?void 0:se.centerOffset)!==0,[ot,rt]=i.useState();return F(()=>{g&&rt(window.getComputedStyle(g).zIndex)},[g]),v.jsx("div",{ref:qe.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:$?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ot,"--radix-popper-transform-origin":[(ae=D.transformOrigin)==null?void 0:ae.x,(ie=D.transformOrigin)==null?void 0:ie.y].join(" "),...((ce=D.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(Zt,{scope:n,placedSide:ne,onArrowChange:M,arrowX:et,arrowY:tt,shouldHideArrow:nt,children:v.jsx(A.div,{"data-side":ne,"data-align":Qe,...f,ref:b,style:{...f.style,animation:$?void 0:"none"}})})})});Fe.displayName=Z;var Me="PopperArrow",Jt={top:"bottom",right:"left",bottom:"top",left:"right"},De=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=qt(Me,o),c=Jt[s.placedSide];return v.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:v.jsx(Xt,{...r,ref:n,style:{...r.style,display:"block"}})})});De.displayName=Me;function Qt(e){return e!==null}var en=e=>({name:"transformOrigin",options:e,fn(t){var x,g,C;const{placement:n,rects:o,middlewareData:r}=t,c=((x=r.arrow)==null?void 0:x.centerOffset)!==0,a=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[u,l]=Ie(n),m={start:"0%",center:"50%",end:"100%"}[l],p=(((g=r.arrow)==null?void 0:g.x)??0)+a/2,h=(((C=r.arrow)==null?void 0:C.y)??0)+d/2;let E="",f="";return u==="bottom"?(E=c?m:`${p}px`,f=`${-d}px`):u==="top"?(E=c?m:`${p}px`,f=`${o.floating.height+d}px`):u==="right"?(E=`${-d}px`,f=c?m:`${h}px`):u==="left"&&(E=`${o.floating.width+d}px`,f=c?m:`${h}px`),{data:{x:E,y:f}}}});function Ie(e){const[t,n="center"]=e.split("-");return[t,n]}var tn=Se,Le=Te,nn=Fe,on=De,rn="Portal",je=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);F(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?lt.createPortal(v.jsx(A.div,{...o,ref:t}),c):null});je.displayName=rn;function sn(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var q=e=>{const{present:t,children:n}=e,o=an(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=S(o.ref,cn(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};q.displayName="Presence";function an(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,d]=sn(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=H(o.current);s.current=a==="mounted"?u:"none"},[a]),F(()=>{const u=o.current,l=r.current;if(l!==e){const p=s.current,h=H(u);e?d("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(l&&p!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),F(()=>{if(t){let u;const l=t.ownerDocument.defaultView??window,m=h=>{const f=H(o.current).includes(h.animationName);if(h.target===t&&f&&(d("ANIMATION_END"),!r.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=h=>{h.target===t&&(s.current=H(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{l.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function H(e){return(e==null?void 0:e.animationName)||"none"}function cn(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function un({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=dn({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o,a=N(n),d=i.useCallback(u=>{if(s){const m=typeof u=="function"?u(e):u;m!==e&&a(m)}else r(u)},[s,e,r,a]);return[c,d]}function dn({defaultProp:e,onChange:t}){const n=i.useState(e),[o]=n,r=i.useRef(o),s=N(t);return i.useEffect(()=>{r.current!==o&&(s(o),r.current=o)},[o,r,s]),n}var J="Popover",[ke]=Ee(J,[Re]),k=Re(),[ln,_]=ke(J),Ue=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:c=!1}=e,a=k(t),d=i.useRef(null),[u,l]=i.useState(!1),[m=!1,p]=un({prop:o,defaultProp:r,onChange:s});return v.jsx(tn,{...a,children:v.jsx(ln,{scope:t,contentId:Kt(),triggerRef:d,open:m,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>l(!0),[]),onCustomAnchorRemove:i.useCallback(()=>l(!1),[]),modal:c,children:n})})};Ue.displayName=J;var We="PopoverAnchor",$e=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=_(We,n),s=k(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:a}=r;return i.useEffect(()=>(c(),()=>a()),[c,a]),v.jsx(Le,{...s,...o,ref:t})});$e.displayName=We;var Be="PopoverTrigger",fn=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=_(Be,n),s=k(n),c=S(t,r.triggerRef),a=v.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Ve(r.open),...o,ref:c,onClick:R(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:v.jsx(Le,{asChild:!0,...s,children:a})});fn.displayName=Be;var Q="PopoverPortal",[pn,vn]=ke(Q,{forceMount:void 0}),ze=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=_(Q,t);return v.jsx(pn,{scope:t,forceMount:n,children:v.jsx(q,{present:n||s.open,children:v.jsx(je,{asChild:!0,container:r,children:o})})})};ze.displayName=Q;var I="PopoverContent",He=i.forwardRef((e,t)=>{const n=vn(I,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=_(I,e.__scopePopover);return v.jsx(q,{present:o||s.open,children:s.modal?v.jsx(mn,{...r,ref:t}):v.jsx(hn,{...r,ref:t})})});He.displayName=I;var mn=i.forwardRef((e,t)=>{const n=_(I,e.__scopePopover),o=i.useRef(null),r=S(t,o),s=i.useRef(!1);return i.useEffect(()=>{const c=o.current;if(c)return xt(c)},[]),v.jsx(Ct,{as:Pe,allowPinchZoom:!0,children:v.jsx(Ke,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,c=>{var a;c.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,c=>{const a=c.detail.originalEvent,d=a.button===0&&a.ctrlKey===!0,u=a.button===2||d;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:R(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),hn=i.forwardRef((e,t)=>{const n=_(I,e.__scopePopover),o=i.useRef(!1),r=i.useRef(!1);return v.jsx(Ke,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,a;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(o.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Ke=i.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:l,...m}=e,p=_(I,n),h=k(n);return It(),v.jsx(be,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:v.jsx(xe,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:l,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:v.jsx(nn,{"data-state":Ve(p.open),role:"dialog",id:p.contentId,...h,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ye="PopoverClose",Xe=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=_(Ye,n);return v.jsx(A.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Xe.displayName=Ye;var gn="PopoverArrow",Ge=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=k(n);return v.jsx(on,{...r,...o,ref:t})});Ge.displayName=gn;function Ve(e){return e?"open":"closed"}var wn=Ue,An=$e,On=ze,Rn=He,Nn=Xe,Sn=Ge;export{An as A,Rn as C,On as P,wn as R,Nn as a,Sn as b};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as r}from"./index-BN6VMYqa.js";import{M as t}from"./index-DUXnyn-Y.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-CWj9OKjo.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";function o(s){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...r(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Guides/Custom Components/StyledComponents/Intro"}),`
1
+ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as r}from"./index-BN6VMYqa.js";import{M as t}from"./index-CebKVvqm.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-CQTVRvvH.js";import"./index-De-a_lfy.js";import"./index-BPCsOyHr.js";import"./index-C9ZJlqdI.js";import"./index-CA5R8PN9.js";import"./index-DrFu-skq.js";function o(s){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...r(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Guides/Custom Components/StyledComponents/Intro"}),`
2
2
  `,e.jsx(n.h1,{id:"developing-custom-components-with-styledcomponents",children:"Developing custom components with StyledComponents"}),`
3
3
  `,e.jsxs(n.p,{children:["Make sure you read ",e.jsx(n.a,{href:"/story/guides-custom-components-introduction--page",children:"Guide: Developing custom components with DS primitives"})]}),`
4
4
  `,e.jsx(n.h2,{id:"guidelines",children:"Guidelines"}),`
@@ -1 +1 @@
1
- import{_ as u}from"./tslib.es6-C7pnyCjR.js";import{r as a}from"./index-Cb9e4tly.js";import{u as F,s as g}from"./index-DhCCT3uz.js";function x(e,r){var n=e.values,s=u(e,["values"]),i=r.values,o=u(r,["values"]);return g(i,n)&&g(s,o)}function v(e){var r=F(),n=r.formatMessage,s=r.textComponent,i=s===void 0?a.Fragment:s,o=e.id,f=e.description,c=e.defaultMessage,M=e.values,l=e.children,m=e.tagName,d=m===void 0?i:m,h=e.ignoreTag,y={id:o,description:f,defaultMessage:c},t=n(y,M,{ignoreTag:h});return typeof l=="function"?l(Array.isArray(t)?t:[t]):d?a.createElement(d,null,a.Children.toArray(t)):a.createElement(a.Fragment,null,t)}v.displayName="FormattedMessage";var E=a.memo(v,x);E.displayName="MemoizedFormattedMessage";export{E as M};
1
+ import{_ as u}from"./tslib.es6-C7pnyCjR.js";import{r as a}from"./index-Cb9e4tly.js";import{u as F,s as g}from"./index-DWSmmBvQ.js";function x(e,r){var n=e.values,s=u(e,["values"]),i=r.values,o=u(r,["values"]);return g(i,n)&&g(s,o)}function v(e){var r=F(),n=r.formatMessage,s=r.textComponent,i=s===void 0?a.Fragment:s,o=e.id,f=e.description,c=e.defaultMessage,M=e.values,l=e.children,m=e.tagName,d=m===void 0?i:m,h=e.ignoreTag,y={id:o,description:f,defaultMessage:c},t=n(y,M,{ignoreTag:h});return typeof l=="function"?l(Array.isArray(t)?t:[t]):d?a.createElement(d,null,a.Children.toArray(t)):a.createElement(a.Fragment,null,t)}v.displayName="FormattedMessage";var E=a.memo(v,x);E.displayName="MemoizedFormattedMessage";export{E as M};
@@ -1,4 +1,4 @@
1
- import{j as n}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as i}from"./index-BN6VMYqa.js";import{M as r}from"./index-DUXnyn-Y.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-CWj9OKjo.js";import"./index-BPrLDK9Y.js";import"./index-C7hTFOIV.js";import"./index-Cu4lwwaE.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";function s(o){const e={code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",...i(),...o.components};return n.jsxs(n.Fragment,{children:[n.jsx(r,{title:"Guides/Custom Components/Scss/Migrating from LESS"}),`
1
+ import{j as n}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as i}from"./index-BN6VMYqa.js";import{M as r}from"./index-CebKVvqm.js";import"./index-ChsGqxH_.js";import"./index-Cb9e4tly.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-CQTVRvvH.js";import"./index-De-a_lfy.js";import"./index-BPCsOyHr.js";import"./index-C9ZJlqdI.js";import"./index-CA5R8PN9.js";import"./index-DrFu-skq.js";function s(o){const e={code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",...i(),...o.components};return n.jsxs(n.Fragment,{children:[n.jsx(r,{title:"Guides/Custom Components/Scss/Migrating from LESS"}),`
2
2
  `,n.jsx(e.h1,{id:"migrating-from-less",children:"Migrating from LESS"}),`
3
3
  `,n.jsx(e.h2,{id:"imports",children:"Imports"}),`
4
4
  `,n.jsxs(e.p,{children:["Update imports to use ",n.jsx(e.code,{children:"@use"})," at-rule and remove .less extension:"]}),`