@purpur/library 9.10.0 → 10.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 (520) hide show
  1. package/CHANGELOG.json +124 -0
  2. package/CHANGELOG.md +53 -1
  3. package/dist/LICENSE.txt +270 -175
  4. package/dist/{RichText-BAVZadzi.js → RichText-B865Qkzj.js} +2 -2
  5. package/dist/{RichText-BAVZadzi.js.map → RichText-B865Qkzj.js.map} +1 -1
  6. package/dist/{RichText-D4vznH1B.mjs → RichText-CPkBwXNI.mjs} +3 -3
  7. package/dist/{RichText-D4vznH1B.mjs.map → RichText-CPkBwXNI.mjs.map} +1 -1
  8. package/dist/accordion-aEZas0k1.mjs +122 -0
  9. package/dist/accordion-aEZas0k1.mjs.map +1 -0
  10. package/dist/accordion-zwsF1oUj.js +2 -0
  11. package/dist/accordion-zwsF1oUj.js.map +1 -0
  12. package/dist/accordion.cjs.js +1 -1
  13. package/dist/accordion.es.js +1 -1
  14. package/dist/button-C5CYysw5.js +2 -0
  15. package/dist/button-C5CYysw5.js.map +1 -0
  16. package/dist/button-mHw_J7JU.mjs +106 -0
  17. package/dist/button-mHw_J7JU.mjs.map +1 -0
  18. package/dist/button.cjs.js +1 -1
  19. package/dist/button.es.js +1 -1
  20. package/dist/{calendar-Cru-p6gC.mjs → calendar-DTL_g0ue.mjs} +4 -14
  21. package/dist/{calendar-Cru-p6gC.mjs.map → calendar-DTL_g0ue.mjs.map} +1 -1
  22. package/dist/{calendar-DDR8CQYo.js → calendar-DVOrK53J.js} +2 -2
  23. package/dist/{calendar-DDR8CQYo.js.map → calendar-DVOrK53J.js.map} +1 -1
  24. package/dist/calendar.cjs.js +1 -1
  25. package/dist/calendar.es.js +1 -1
  26. package/dist/{card-t2ZkZ82G.mjs → card-C0yhMN5d.mjs} +3 -3
  27. package/dist/card-C0yhMN5d.mjs.map +1 -0
  28. package/dist/{card-pdsBEJif.js → card-CIlY38WI.js} +2 -2
  29. package/dist/card-CIlY38WI.js.map +1 -0
  30. package/dist/card.cjs.js +1 -1
  31. package/dist/card.es.js +1 -1
  32. package/dist/{carousel-BIKcwvYz.mjs → carousel-Dq9yzk_-.mjs} +2 -2
  33. package/dist/{carousel-BIKcwvYz.mjs.map → carousel-Dq9yzk_-.mjs.map} +1 -1
  34. package/dist/{carousel-DnSaLDZf.js → carousel-j-s6M1hu.js} +2 -2
  35. package/dist/{carousel-DnSaLDZf.js.map → carousel-j-s6M1hu.js.map} +1 -1
  36. package/dist/carousel.cjs.js +1 -1
  37. package/dist/carousel.es.js +1 -1
  38. package/dist/{chat-field-Wjvh2J6C.js → chat-field-CLAjIHlM.js} +2 -2
  39. package/dist/{chat-field-Wjvh2J6C.js.map → chat-field-CLAjIHlM.js.map} +1 -1
  40. package/dist/{chat-field-CVF4DooY.mjs → chat-field-nxFRXoQx.mjs} +2 -2
  41. package/dist/{chat-field-CVF4DooY.mjs.map → chat-field-nxFRXoQx.mjs.map} +1 -1
  42. package/dist/chat-field.cjs.js +1 -1
  43. package/dist/chat-field.es.js +1 -1
  44. package/dist/{chip-group-B775zvKD.js → chip-group-BLuG0MC6.js} +2 -2
  45. package/dist/{chip-group-B775zvKD.js.map → chip-group-BLuG0MC6.js.map} +1 -1
  46. package/dist/{chip-group-xuOe7nL3.mjs → chip-group-Bo4kJ8Vq.mjs} +2 -2
  47. package/dist/{chip-group-xuOe7nL3.mjs.map → chip-group-Bo4kJ8Vq.mjs.map} +1 -1
  48. package/dist/chip-group.cjs.js +1 -1
  49. package/dist/chip-group.es.js +1 -1
  50. package/dist/color-dot-BEE5rKco.js.map +1 -1
  51. package/dist/color-dot-Dz9yzVX3.mjs.map +1 -1
  52. package/dist/{comparison-table-Dtqxz8vL.js → comparison-table-CRWRijfG.js} +2 -2
  53. package/dist/{comparison-table-Dtqxz8vL.js.map → comparison-table-CRWRijfG.js.map} +1 -1
  54. package/dist/{comparison-table-D1evE0ri.mjs → comparison-table-DYaRaP9Z.mjs} +3 -3
  55. package/dist/{comparison-table-D1evE0ri.mjs.map → comparison-table-DYaRaP9Z.mjs.map} +1 -1
  56. package/dist/comparison-table.cjs.js +1 -1
  57. package/dist/comparison-table.es.js +1 -1
  58. package/dist/components/accordion/src/accordion-item.d.ts +3 -3
  59. package/dist/components/accordion/src/accordion-item.d.ts.map +1 -1
  60. package/dist/components/accordion/src/accordion.d.ts +3 -7
  61. package/dist/components/accordion/src/accordion.d.ts.map +1 -1
  62. package/dist/components/accordion/src/accordion.visual.fixtures.d.ts.map +1 -1
  63. package/dist/components/alert-badge/src/alert-badge.d.ts +1 -1
  64. package/dist/components/avatar/src/avatar.d.ts +1 -1
  65. package/dist/components/badge/src/badge.d.ts +1 -1
  66. package/dist/components/button/src/button.d.ts +7 -8
  67. package/dist/components/button/src/button.d.ts.map +1 -1
  68. package/dist/components/button/src/button.visual.fixtures.d.ts +1 -1
  69. package/dist/components/calendar/src/calendar.d.ts.map +1 -1
  70. package/dist/components/card/src/card-content-container.d.ts +1 -1
  71. package/dist/components/card/src/card-content.d.ts +1 -1
  72. package/dist/components/card/src/card-cta.d.ts +1 -1
  73. package/dist/components/card/src/card-heading.d.ts +4 -4
  74. package/dist/components/card/src/card-heading.d.ts.map +1 -1
  75. package/dist/components/card/src/card-media-layout.d.ts +1 -1
  76. package/dist/components/card/src/card-media.d.ts +1 -1
  77. package/dist/components/card/src/card-root.d.ts +1 -1
  78. package/dist/components/checkbox/src/checkbox.d.ts +1 -1
  79. package/dist/components/color-dot/src/color-dot.d.ts +2 -1
  80. package/dist/components/color-dot/src/color-dot.d.ts.map +1 -1
  81. package/dist/components/content-block/src/content-block-group.d.ts +1 -1
  82. package/dist/components/content-block/src/content-block.d.ts +3 -3
  83. package/dist/components/content-block/src/content-block.d.ts.map +1 -1
  84. package/dist/components/country-flag-icon/src/all-country-flag-assets.d.ts +0 -1
  85. package/dist/components/country-flag-icon/src/all-country-flag-assets.d.ts.map +1 -1
  86. package/dist/components/country-flag-icon/src/country-flag-icon.d.ts +2 -2
  87. package/dist/components/cta-link/src/cta-link.d.ts +10 -10
  88. package/dist/components/date-picker/src/date-picker.d.ts +5 -5
  89. package/dist/components/date-range-field/src/date-range-field.d.ts +2 -2
  90. package/dist/components/date-range-field/src/date-range-field.d.ts.map +1 -1
  91. package/dist/components/dismissable-chip-group/src/dismissable-chip-group-item.d.ts +1 -1
  92. package/dist/components/dismissable-chip-group/src/dismissable-chip-group.d.ts +4 -4
  93. package/dist/components/dismissable-chip-group/src/dismissable-chip-group.d.ts.map +1 -1
  94. package/dist/components/drawer/src/drawer-container.d.ts +1 -1
  95. package/dist/components/drawer/src/drawer-container.d.ts.map +1 -1
  96. package/dist/components/drawer/src/drawer-content.d.ts +2 -2
  97. package/dist/components/drawer/src/drawer-frame.d.ts +1 -1
  98. package/dist/components/drawer/src/drawer-handle.d.ts +1 -1
  99. package/dist/components/drawer/src/drawer-header.d.ts +1 -1
  100. package/dist/components/drawer/src/drawer-scroll-area.d.ts +1 -1
  101. package/dist/components/drawer/src/drawer.context.d.ts +2 -0
  102. package/dist/components/drawer/src/drawer.context.d.ts.map +1 -1
  103. package/dist/components/drawer/src/drawer.d.ts +2 -0
  104. package/dist/components/drawer/src/drawer.d.ts.map +1 -1
  105. package/dist/components/dropdown/src/dropdown-combobox.d.ts +2 -34
  106. package/dist/components/dropdown/src/dropdown-combobox.d.ts.map +1 -1
  107. package/dist/components/dropdown/src/dropdown-select.d.ts +2 -34
  108. package/dist/components/dropdown/src/dropdown-select.d.ts.map +1 -1
  109. package/dist/components/dropdown/src/dropdown-shared.d.ts +2 -1
  110. package/dist/components/dropdown/src/dropdown-shared.d.ts.map +1 -1
  111. package/dist/components/dropdown/src/dropdown.types.d.ts +24 -13
  112. package/dist/components/dropdown/src/dropdown.types.d.ts.map +1 -1
  113. package/dist/components/dropdown/src/useDropdown.d.ts +1 -1
  114. package/dist/components/dropdown/src/useDropdown.d.ts.map +1 -1
  115. package/dist/components/dropdown/src/useDropdownFilter.d.ts.map +1 -1
  116. package/dist/components/dropdown/src/useDropdownInput.d.ts.map +1 -1
  117. package/dist/components/field-error-text/src/field-error-text.d.ts +2 -2
  118. package/dist/components/file-upload/src/file-upload-button.d.ts +22 -0
  119. package/dist/components/file-upload/src/file-upload-button.d.ts.map +1 -0
  120. package/dist/components/file-upload/src/file-upload-drag-and-drop.d.ts +10 -0
  121. package/dist/components/file-upload/src/file-upload-drag-and-drop.d.ts.map +1 -0
  122. package/dist/components/file-upload/src/file-upload-file-name-label.d.ts +8 -0
  123. package/dist/components/file-upload/src/file-upload-file-name-label.d.ts.map +1 -0
  124. package/dist/components/file-upload/src/file-upload-icon.d.ts +8 -0
  125. package/dist/components/file-upload/src/file-upload-icon.d.ts.map +1 -0
  126. package/dist/components/file-upload/src/file-upload-types.d.ts +82 -0
  127. package/dist/components/file-upload/src/file-upload-types.d.ts.map +1 -0
  128. package/dist/components/file-upload/src/file-upload-utils.d.ts +7 -0
  129. package/dist/components/file-upload/src/file-upload-utils.d.ts.map +1 -0
  130. package/dist/components/file-upload/src/file-upload.d.ts +6 -0
  131. package/dist/components/file-upload/src/file-upload.d.ts.map +1 -0
  132. package/dist/components/file-upload/src/file-upload.visual.fixtures.d.ts +14 -0
  133. package/dist/components/file-upload/src/file-upload.visual.fixtures.d.ts.map +1 -0
  134. package/dist/components/footer/src/footer-navigation.d.ts +1 -1
  135. package/dist/components/footer/src/footer.d.ts +3 -3
  136. package/dist/components/grid/src/grid.item.d.ts +1 -1
  137. package/dist/components/heading/src/heading.d.ts +20 -2
  138. package/dist/components/heading/src/heading.d.ts.map +1 -1
  139. package/dist/components/hero-banner/src/hero-banner-actions.d.ts +1 -1
  140. package/dist/components/hero-banner/src/hero-banner-media.d.ts +1 -1
  141. package/dist/components/hero-banner/src/hero-banner-types.d.ts +2 -2
  142. package/dist/components/hero-banner/src/hero-banner-types.d.ts.map +1 -1
  143. package/dist/components/hero-banner/src/hero-banner.d.ts +1 -1
  144. package/dist/components/hero-banner/src/hero-banner.d.ts.map +1 -1
  145. package/dist/components/icon/src/icon.d.ts +2 -2
  146. package/dist/components/label/src/label.d.ts +1 -1
  147. package/dist/components/listbox/src/listbox-item.d.ts +1 -1
  148. package/dist/components/loading/src/loading-illustrative.d.ts +1 -1
  149. package/dist/components/logo/src/logo.types.d.ts +2 -2
  150. package/dist/components/modal/src/modal-content.d.ts +1 -1
  151. package/dist/components/modal/src/modal-content.d.ts.map +1 -1
  152. package/dist/components/notification-banner/src/notification-banner.d.ts +5 -5
  153. package/dist/components/notification-banner/src/notification-banner.d.ts.map +1 -1
  154. package/dist/components/pagination/src/pagination-page-selector.d.ts +2 -2
  155. package/dist/components/pagination/src/pagination-page-trigger.d.ts +1 -1
  156. package/dist/components/pagination/src/pagination-step-trigger.d.ts +2 -2
  157. package/dist/components/pagination/src/pagination-truncation-separator.d.ts +1 -1
  158. package/dist/components/pagination/src/types.d.ts +1 -1
  159. package/dist/components/pagination/src/use-page-options.hook.d.ts +1 -1
  160. package/dist/components/pagination/src/use-page-size-options.hook.d.ts +1 -1
  161. package/dist/components/password-field/src/password-strength-indicator.d.ts +1 -1
  162. package/dist/components/password-field/src/password-strength.d.ts +2 -2
  163. package/dist/components/promotion-card/src/promotion-card.d.ts +9 -9
  164. package/dist/components/promotion-card/src/promotion-card.d.ts.map +1 -1
  165. package/dist/components/quantity-selector/src/quantity-selector-button.d.ts +2 -3
  166. package/dist/components/quantity-selector/src/quantity-selector-button.d.ts.map +1 -1
  167. package/dist/components/quantity-selector/src/quantity-selector.d.ts +2 -5
  168. package/dist/components/quantity-selector/src/quantity-selector.d.ts.map +1 -1
  169. package/dist/components/radio-card-group/src/radio-card-group.d.ts +2 -2
  170. package/dist/components/radio-card-group/src/radio-card-item.d.ts +1 -1
  171. package/dist/components/rich-text/src/types.d.ts +3 -3
  172. package/dist/components/search-field/src/search-field.d.ts +6 -6
  173. package/dist/components/skeleton/src/skeleton.d.ts +1 -1
  174. package/dist/components/spinner/src/spinner.d.ts +2 -2
  175. package/dist/components/stepper/src/stepper-container.d.ts +1 -1
  176. package/dist/components/stepper/src/stepper-content.d.ts +1 -1
  177. package/dist/components/stepper/src/{stepper-button.d.ts → stepper-link.d.ts} +5 -4
  178. package/dist/components/stepper/src/stepper-link.d.ts.map +1 -0
  179. package/dist/components/stepper/src/stepper-nav-items.d.ts +1 -0
  180. package/dist/components/stepper/src/stepper-nav-items.d.ts.map +1 -1
  181. package/dist/components/stepper/src/stepper.d.ts.map +1 -1
  182. package/dist/components/stepper/src/types.d.ts +2 -2
  183. package/dist/components/stepper/src/types.d.ts.map +1 -1
  184. package/dist/components/stepper/src/use-content-focus.hook.d.ts.map +1 -1
  185. package/dist/components/table/src/cell-types/button-group-cell.d.ts +3 -3
  186. package/dist/components/table/src/draggable-table.d.ts.map +1 -1
  187. package/dist/components/table/src/table-column-header-cell.d.ts +1 -2
  188. package/dist/components/table/src/table-column-header-cell.d.ts.map +1 -1
  189. package/dist/components/table/src/table-content.d.ts +1 -1
  190. package/dist/components/table/src/table-headers.d.ts +2 -3
  191. package/dist/components/table/src/table-headers.d.ts.map +1 -1
  192. package/dist/components/table/src/table-settings-drawer.d.ts +11 -20
  193. package/dist/components/table/src/table-settings-drawer.d.ts.map +1 -1
  194. package/dist/components/table/src/table.d.ts +2 -9
  195. package/dist/components/table/src/table.d.ts.map +1 -1
  196. package/dist/components/table/src/test-utils/helpers.d.ts +10 -19
  197. package/dist/components/table/src/test-utils/helpers.d.ts.map +1 -1
  198. package/dist/components/table/src/test-utils/table-data.d.ts +3 -3
  199. package/dist/components/tabs/src/tab-content.d.ts +3 -1
  200. package/dist/components/tabs/src/tab-content.d.ts.map +1 -1
  201. package/dist/components/text-area/src/text-area.d.ts +1 -1
  202. package/dist/components/text-field/src/text-field-ai.d.ts +4 -4
  203. package/dist/components/text-field/src/text-field-base.d.ts +4 -4
  204. package/dist/components/text-field/src/text-field.d.ts +5 -5
  205. package/dist/components/text-spacing/src/text-spacing.d.ts +2 -2
  206. package/dist/components/tooltip/src/tooltip.d.ts +4 -6
  207. package/dist/components/tooltip/src/tooltip.d.ts.map +1 -1
  208. package/dist/components-metadata.js +20 -10
  209. package/dist/{content-block-CDMrz41K.mjs → content-block-BCM0I3Y2.mjs} +2 -2
  210. package/dist/content-block-BCM0I3Y2.mjs.map +1 -0
  211. package/dist/{content-block-DyYAnL2e.js → content-block-DQppQumZ.js} +2 -2
  212. package/dist/content-block-DQppQumZ.js.map +1 -0
  213. package/dist/content-block.cjs.js +1 -1
  214. package/dist/content-block.es.js +1 -1
  215. package/dist/core.esm-BmIwrKkJ.js +6 -0
  216. package/dist/core.esm-BmIwrKkJ.js.map +1 -0
  217. package/dist/core.esm-CKGHpLM_.mjs +2892 -0
  218. package/dist/core.esm-CKGHpLM_.mjs.map +1 -0
  219. package/dist/country-flag-icon/LICENSE.txt +11 -0
  220. package/dist/country-flag-icon/all-country-flag-assets.cjs.js +1 -1
  221. package/dist/country-flag-icon/all-country-flag-assets.cjs.js.map +1 -1
  222. package/dist/country-flag-icon/all-country-flag-assets.d.ts +0 -1
  223. package/dist/country-flag-icon/all-country-flag-assets.d.ts.map +1 -1
  224. package/dist/country-flag-icon/all-country-flag-assets.es.js +0 -1
  225. package/dist/country-flag-icon/all-country-flag-assets.es.js.map +1 -1
  226. package/dist/country-flag-icon/dynamic-country-flag-icon.cjs.js +2 -0
  227. package/dist/country-flag-icon/dynamic-country-flag-icon.cjs.js.map +1 -0
  228. package/dist/country-flag-icon/dynamic-country-flag-icon.es.js +366 -0
  229. package/dist/country-flag-icon/dynamic-country-flag-icon.es.js.map +1 -0
  230. package/dist/{date-field-hA79n6mP.js → date-field-CtpWDaSh.js} +2 -2
  231. package/dist/{date-field-hA79n6mP.js.map → date-field-CtpWDaSh.js.map} +1 -1
  232. package/dist/{date-field-DVp_RMNm.mjs → date-field-_rCuf15v.mjs} +2 -2
  233. package/dist/{date-field-DVp_RMNm.mjs.map → date-field-_rCuf15v.mjs.map} +1 -1
  234. package/dist/date-field.cjs.js +1 -1
  235. package/dist/date-field.es.js +1 -1
  236. package/dist/{date-picker-Dzoo_hhQ.js → date-picker-BYlszX1W.js} +2 -2
  237. package/dist/{date-picker-Dzoo_hhQ.js.map → date-picker-BYlszX1W.js.map} +1 -1
  238. package/dist/{date-picker-B8ta-Q8V.mjs → date-picker-sqcNAplg.mjs} +6 -6
  239. package/dist/{date-picker-B8ta-Q8V.mjs.map → date-picker-sqcNAplg.mjs.map} +1 -1
  240. package/dist/date-picker.cjs.js +1 -1
  241. package/dist/date-picker.es.js +1 -1
  242. package/dist/date-range-field-B33XeBW8.js +2 -0
  243. package/dist/date-range-field-B33XeBW8.js.map +1 -0
  244. package/dist/{date-range-field-BZUjfftV.mjs → date-range-field-BmjQeiOv.mjs} +23 -23
  245. package/dist/date-range-field-BmjQeiOv.mjs.map +1 -0
  246. package/dist/date-range-field.cjs.js +1 -1
  247. package/dist/date-range-field.es.js +1 -1
  248. package/dist/{dismissable-chip-group-2updhyuR.js → dismissable-chip-group-5ALErhD2.js} +2 -2
  249. package/dist/dismissable-chip-group-5ALErhD2.js.map +1 -0
  250. package/dist/{dismissable-chip-group-Cfs2s2BH.mjs → dismissable-chip-group-DMNU7g5e.mjs} +3 -3
  251. package/dist/dismissable-chip-group-DMNU7g5e.mjs.map +1 -0
  252. package/dist/dismissable-chip-group.cjs.js +1 -1
  253. package/dist/dismissable-chip-group.es.js +1 -1
  254. package/dist/{drawer-cIUx6WSZ.mjs → drawer-Chx3H8EU.mjs} +241 -233
  255. package/dist/drawer-Chx3H8EU.mjs.map +1 -0
  256. package/dist/drawer-oFJcxW58.js +2 -0
  257. package/dist/drawer-oFJcxW58.js.map +1 -0
  258. package/dist/drawer.cjs.js +1 -1
  259. package/dist/drawer.es.js +1 -1
  260. package/dist/dropdown-Bn7WvsL2.js +2 -0
  261. package/dist/dropdown-Bn7WvsL2.js.map +1 -0
  262. package/dist/dropdown-CrufJnb4.mjs +945 -0
  263. package/dist/dropdown-CrufJnb4.mjs.map +1 -0
  264. package/dist/dropdown.cjs.js +1 -1
  265. package/dist/dropdown.es.js +1 -1
  266. package/dist/file-upload-Ctw6LCTU.mjs +589 -0
  267. package/dist/file-upload-Ctw6LCTU.mjs.map +1 -0
  268. package/dist/file-upload-MvNuX4ks.js +2 -0
  269. package/dist/file-upload-MvNuX4ks.js.map +1 -0
  270. package/dist/file-upload.cjs.js +2 -0
  271. package/dist/file-upload.cjs.js.map +1 -0
  272. package/dist/file-upload.es.js +5 -0
  273. package/dist/file-upload.es.js.map +1 -0
  274. package/dist/{floating-ui.react-dom-EredA301.mjs → floating-ui.react-dom-1kwKo24Z.mjs} +15 -15
  275. package/dist/{floating-ui.react-dom-EredA301.mjs.map → floating-ui.react-dom-1kwKo24Z.mjs.map} +1 -1
  276. package/dist/footer-Bbemct3Z.js +2 -0
  277. package/dist/footer-Bbemct3Z.js.map +1 -0
  278. package/dist/{footer-D-2b7UIB.mjs → footer-DkVmTd-f.mjs} +25 -25
  279. package/dist/footer-DkVmTd-f.mjs.map +1 -0
  280. package/dist/footer.cjs.js +1 -1
  281. package/dist/footer.es.js +1 -1
  282. package/dist/{heading-xwBuT_-9.mjs → heading-BG7JTFO1.mjs} +25 -24
  283. package/dist/heading-BG7JTFO1.mjs.map +1 -0
  284. package/dist/{heading-drD5ugCC.js → heading-BPeRwNYu.js} +2 -2
  285. package/dist/heading-BPeRwNYu.js.map +1 -0
  286. package/dist/heading.cjs.js +1 -1
  287. package/dist/heading.es.js +6 -5
  288. package/dist/{hero-banner-n9K-Jsdz.mjs → hero-banner-ChDoFRhq.mjs} +4 -4
  289. package/dist/hero-banner-ChDoFRhq.mjs.map +1 -0
  290. package/dist/{hero-banner--v-ezYMr.js → hero-banner-Mag1OwL4.js} +2 -2
  291. package/dist/hero-banner-Mag1OwL4.js.map +1 -0
  292. package/dist/hero-banner.cjs.js +1 -1
  293. package/dist/hero-banner.es.js +1 -1
  294. package/dist/index-BPY_9ddu.js +2 -0
  295. package/dist/index-BPY_9ddu.js.map +1 -0
  296. package/dist/index-Fewa56cA.mjs +440 -0
  297. package/dist/index-Fewa56cA.mjs.map +1 -0
  298. package/dist/libraries/library/src/calendar.d.ts +1 -1
  299. package/dist/libraries/library/src/card.d.ts +1 -1
  300. package/dist/libraries/library/src/container.d.ts +1 -1
  301. package/dist/libraries/library/src/content-block.d.ts +1 -1
  302. package/dist/libraries/library/src/dismissable-chip-group.d.ts +1 -1
  303. package/dist/libraries/library/src/drawer.d.ts +1 -1
  304. package/dist/libraries/library/src/file-upload.d.ts +6 -0
  305. package/dist/libraries/library/src/file-upload.d.ts.map +1 -0
  306. package/dist/libraries/library/src/library.d.ts +2 -1
  307. package/dist/libraries/library/src/library.d.ts.map +1 -1
  308. package/dist/libraries/library/src/notification-banner.d.ts +1 -1
  309. package/dist/libraries/library/src/notification.d.ts +1 -1
  310. package/dist/libraries/library/src/password-field.d.ts +6 -2
  311. package/dist/libraries/library/src/password-field.d.ts.map +1 -1
  312. package/dist/libraries/library/src/radio-button-group.d.ts +1 -1
  313. package/dist/libraries/library/src/radio-card-group.d.ts +1 -1
  314. package/dist/libraries/library/src/spinner.d.ts +1 -1
  315. package/dist/libraries/library/src/stepper.d.ts +1 -1
  316. package/dist/libraries/library/src/tooltip.d.ts +1 -1
  317. package/dist/libraries/library/src/visually-hidden.d.ts +1 -1
  318. package/dist/libraries/theme/src/ThemeProvider.d.ts +1 -1
  319. package/dist/library.cjs.js +1 -1
  320. package/dist/library.es.js +603 -601
  321. package/dist/library.es.js.map +1 -1
  322. package/dist/link-Dzqd0QuD.js +2 -0
  323. package/dist/{link-DhWVrkTz.js.map → link-Dzqd0QuD.js.map} +1 -1
  324. package/dist/link-ccCdDvBc.mjs +72 -0
  325. package/dist/{link-DY5WLpyc.mjs.map → link-ccCdDvBc.mjs.map} +1 -1
  326. package/dist/link.cjs.js +1 -1
  327. package/dist/link.es.js +1 -1
  328. package/dist/main-B501z9Ql.js +2 -0
  329. package/dist/main-B501z9Ql.js.map +1 -0
  330. package/dist/main-L71Sqg3s.mjs +1016 -0
  331. package/dist/main-L71Sqg3s.mjs.map +1 -0
  332. package/dist/{modal-D0Qxrvx5.js → modal-CXOYUsJm.js} +2 -2
  333. package/dist/modal-CXOYUsJm.js.map +1 -0
  334. package/dist/{modal-Bu1Zv5Ic.mjs → modal-Pwvhrzn-.mjs} +31 -31
  335. package/dist/modal-Pwvhrzn-.mjs.map +1 -0
  336. package/dist/modal.cjs.js +1 -1
  337. package/dist/modal.es.js +1 -1
  338. package/dist/{notification-D2oClkX2.js → notification-BkM2vLzI.js} +2 -2
  339. package/dist/{notification-D2oClkX2.js.map → notification-BkM2vLzI.js.map} +1 -1
  340. package/dist/{notification-DiVdy6E_.mjs → notification-Cbn0UN1p.mjs} +3 -3
  341. package/dist/{notification-DiVdy6E_.mjs.map → notification-Cbn0UN1p.mjs.map} +1 -1
  342. package/dist/notification-banner-B9RhXAZ8.js +2 -0
  343. package/dist/notification-banner-B9RhXAZ8.js.map +1 -0
  344. package/dist/{notification-banner-CZTQZ5Le.mjs → notification-banner-C4NVekCZ.mjs} +5 -5
  345. package/dist/notification-banner-C4NVekCZ.mjs.map +1 -0
  346. package/dist/notification-banner.cjs.js +1 -1
  347. package/dist/notification-banner.es.js +1 -1
  348. package/dist/notification.cjs.js +1 -1
  349. package/dist/notification.es.js +1 -1
  350. package/dist/password-field-Cy_E-D_G.mjs +200 -0
  351. package/dist/password-field-Cy_E-D_G.mjs.map +1 -0
  352. package/dist/password-field-lKyWHjQS.js +2 -0
  353. package/dist/password-field-lKyWHjQS.js.map +1 -0
  354. package/dist/password-field.cjs.js +2 -0
  355. package/dist/password-field.cjs.js.map +1 -0
  356. package/dist/password-field.es.js +6 -0
  357. package/dist/password-field.es.js.map +1 -0
  358. package/dist/popover-B6ntmuEK.mjs +614 -0
  359. package/dist/popover-B6ntmuEK.mjs.map +1 -0
  360. package/dist/popover-DJHMEFXP.js +2 -0
  361. package/dist/popover-DJHMEFXP.js.map +1 -0
  362. package/dist/popover.cjs.js +1 -1
  363. package/dist/popover.es.js +1 -1
  364. package/dist/{product-card-CxfHfJVV.mjs → product-card-BMseoNrG.mjs} +3 -3
  365. package/dist/{product-card-CxfHfJVV.mjs.map → product-card-BMseoNrG.mjs.map} +1 -1
  366. package/dist/{product-card-XxBwuxM-.js → product-card-D0jX5-up.js} +2 -2
  367. package/dist/{product-card-XxBwuxM-.js.map → product-card-D0jX5-up.js.map} +1 -1
  368. package/dist/product-card.cjs.js +1 -1
  369. package/dist/product-card.es.js +1 -1
  370. package/dist/{promotion-card-C1UoxzcV.js → promotion-card-B3mz__m7.js} +2 -2
  371. package/dist/promotion-card-B3mz__m7.js.map +1 -0
  372. package/dist/{promotion-card-CooYPpFo.mjs → promotion-card-Co6qAkTZ.mjs} +5 -5
  373. package/dist/promotion-card-Co6qAkTZ.mjs.map +1 -0
  374. package/dist/promotion-card.cjs.js +1 -1
  375. package/dist/promotion-card.es.js +1 -1
  376. package/dist/purpur.css +1 -1
  377. package/dist/quantity-selector-Cy0aJGGX.js +2 -0
  378. package/dist/quantity-selector-Cy0aJGGX.js.map +1 -0
  379. package/dist/quantity-selector-k6ZaVrk1.mjs +162 -0
  380. package/dist/quantity-selector-k6ZaVrk1.mjs.map +1 -0
  381. package/dist/quantity-selector.cjs.js +1 -1
  382. package/dist/quantity-selector.es.js +2 -3
  383. package/dist/{radio-button-group-D_F6kWD6.mjs → radio-button-group-DjiTo3b1.mjs} +2 -2
  384. package/dist/{radio-button-group-D_F6kWD6.mjs.map → radio-button-group-DjiTo3b1.mjs.map} +1 -1
  385. package/dist/{radio-button-group-CdUrC7h9.js → radio-button-group-uCRGh1H5.js} +2 -2
  386. package/dist/{radio-button-group-CdUrC7h9.js.map → radio-button-group-uCRGh1H5.js.map} +1 -1
  387. package/dist/radio-button-group.cjs.js +1 -1
  388. package/dist/radio-button-group.es.js +1 -1
  389. package/dist/{radio-card-group-B9_jOJnM.mjs → radio-card-group-DoM7qYO1.mjs} +2 -2
  390. package/dist/{radio-card-group-B9_jOJnM.mjs.map → radio-card-group-DoM7qYO1.mjs.map} +1 -1
  391. package/dist/{radio-card-group-DcdGkfOp.js → radio-card-group-_9wJC-s3.js} +2 -2
  392. package/dist/{radio-card-group-DcdGkfOp.js.map → radio-card-group-_9wJC-s3.js.map} +1 -1
  393. package/dist/radio-card-group.cjs.js +1 -1
  394. package/dist/radio-card-group.es.js +1 -1
  395. package/dist/rich-text.cjs.js +1 -1
  396. package/dist/rich-text.es.js +1 -1
  397. package/dist/{search-field-afhtC6q5.mjs → search-field-BTJtRyw5.mjs} +3 -3
  398. package/dist/{search-field-afhtC6q5.mjs.map → search-field-BTJtRyw5.mjs.map} +1 -1
  399. package/dist/{search-field-WJBtiK0K.js → search-field-nzVXak1a.js} +2 -2
  400. package/dist/{search-field-WJBtiK0K.js.map → search-field-nzVXak1a.js.map} +1 -1
  401. package/dist/search-field.cjs.js +1 -1
  402. package/dist/search-field.es.js +1 -1
  403. package/dist/stepper-D59T-Y2_.mjs +469 -0
  404. package/dist/stepper-D59T-Y2_.mjs.map +1 -0
  405. package/dist/stepper-Dao4XaDV.js +2 -0
  406. package/dist/stepper-Dao4XaDV.js.map +1 -0
  407. package/dist/stepper.cjs.js +1 -1
  408. package/dist/stepper.es.js +1 -1
  409. package/dist/table-DRSgesQ4.mjs +4545 -0
  410. package/dist/table-DRSgesQ4.mjs.map +1 -0
  411. package/dist/table-zBs9JALh.js +5 -0
  412. package/dist/table-zBs9JALh.js.map +1 -0
  413. package/dist/table.cjs.js +1 -1
  414. package/dist/table.es.js +1 -1
  415. package/dist/tabs-D2__wbCs.js +2 -0
  416. package/dist/tabs-D2__wbCs.js.map +1 -0
  417. package/dist/tabs-DOG5g2wf.mjs +440 -0
  418. package/dist/tabs-DOG5g2wf.mjs.map +1 -0
  419. package/dist/tabs.cjs.js +1 -1
  420. package/dist/tabs.es.js +1 -1
  421. package/dist/{text-field-VW8ObP83.js → text-field-BSgqJjpv.js} +2 -2
  422. package/dist/text-field-BSgqJjpv.js.map +1 -0
  423. package/dist/{text-field-D0e-cRbG.mjs → text-field-MQHeITxy.mjs} +3 -3
  424. package/dist/text-field-MQHeITxy.mjs.map +1 -0
  425. package/dist/text-field.cjs.js +1 -1
  426. package/dist/text-field.es.js +1 -1
  427. package/dist/tooltip-DeP1UsPW.js +2 -0
  428. package/dist/{tooltip-B-11qk-0.js.map → tooltip-DeP1UsPW.js.map} +1 -1
  429. package/dist/{tooltip-DngYHn5W.mjs → tooltip-bqdd2lJL.mjs} +347 -309
  430. package/dist/{tooltip-DngYHn5W.mjs.map → tooltip-bqdd2lJL.mjs.map} +1 -1
  431. package/dist/tooltip.cjs.js +1 -1
  432. package/dist/tooltip.es.js +1 -1
  433. package/package.json +21 -26
  434. package/scripts/generate.mts +1 -4
  435. package/src/aliases.ts +8 -4
  436. package/src/entries.js +2 -1
  437. package/src/{autocomplete.ts → file-upload.ts} +1 -1
  438. package/src/library.ts +2 -2
  439. package/src/password-field.ts +0 -1
  440. package/src/purpur.css +4 -0
  441. package/dist/accordion-B6OoQ4uZ.mjs +0 -128
  442. package/dist/accordion-B6OoQ4uZ.mjs.map +0 -1
  443. package/dist/accordion-BfpN5h4C.js +0 -2
  444. package/dist/accordion-BfpN5h4C.js.map +0 -1
  445. package/dist/autocomplete-BX1KDZqL.js +0 -2
  446. package/dist/autocomplete-BX1KDZqL.js.map +0 -1
  447. package/dist/autocomplete-CmLzmWp4.mjs +0 -228
  448. package/dist/autocomplete-CmLzmWp4.mjs.map +0 -1
  449. package/dist/autocomplete.cjs.js +0 -2
  450. package/dist/autocomplete.cjs.js.map +0 -1
  451. package/dist/autocomplete.es.js +0 -6
  452. package/dist/autocomplete.es.js.map +0 -1
  453. package/dist/button-4-yWOgtD.mjs +0 -109
  454. package/dist/button-4-yWOgtD.mjs.map +0 -1
  455. package/dist/button-DmybVApa.js +0 -2
  456. package/dist/button-DmybVApa.js.map +0 -1
  457. package/dist/card-pdsBEJif.js.map +0 -1
  458. package/dist/card-t2ZkZ82G.mjs.map +0 -1
  459. package/dist/components/autocomplete/src/autocomplete.d.ts +0 -18
  460. package/dist/components/autocomplete/src/autocomplete.d.ts.map +0 -1
  461. package/dist/components/autocomplete/src/useAutocomplete.d.ts +0 -59
  462. package/dist/components/autocomplete/src/useAutocomplete.d.ts.map +0 -1
  463. package/dist/components/autocomplete/src/utils.d.ts +0 -7
  464. package/dist/components/autocomplete/src/utils.d.ts.map +0 -1
  465. package/dist/components/stepper/src/stepper-button.d.ts.map +0 -1
  466. package/dist/content-block-CDMrz41K.mjs.map +0 -1
  467. package/dist/content-block-DyYAnL2e.js.map +0 -1
  468. package/dist/date-range-field-BZUjfftV.mjs.map +0 -1
  469. package/dist/date-range-field-Dqqgj41u.js +0 -2
  470. package/dist/date-range-field-Dqqgj41u.js.map +0 -1
  471. package/dist/dismissable-chip-group-2updhyuR.js.map +0 -1
  472. package/dist/dismissable-chip-group-Cfs2s2BH.mjs.map +0 -1
  473. package/dist/drawer-DyLQfvEh.js +0 -2
  474. package/dist/drawer-DyLQfvEh.js.map +0 -1
  475. package/dist/drawer-cIUx6WSZ.mjs.map +0 -1
  476. package/dist/dropdown-C8VsfTQw.mjs +0 -936
  477. package/dist/dropdown-C8VsfTQw.mjs.map +0 -1
  478. package/dist/dropdown-p4R2yCnJ.js +0 -2
  479. package/dist/dropdown-p4R2yCnJ.js.map +0 -1
  480. package/dist/footer-Cn1-zG1v.js +0 -2
  481. package/dist/footer-Cn1-zG1v.js.map +0 -1
  482. package/dist/footer-D-2b7UIB.mjs.map +0 -1
  483. package/dist/heading-drD5ugCC.js.map +0 -1
  484. package/dist/heading-xwBuT_-9.mjs.map +0 -1
  485. package/dist/hero-banner--v-ezYMr.js.map +0 -1
  486. package/dist/hero-banner-n9K-Jsdz.mjs.map +0 -1
  487. package/dist/libraries/library/src/autocomplete.d.ts +0 -6
  488. package/dist/libraries/library/src/autocomplete.d.ts.map +0 -1
  489. package/dist/link-DY5WLpyc.mjs +0 -72
  490. package/dist/link-DhWVrkTz.js +0 -2
  491. package/dist/modal-Bu1Zv5Ic.mjs.map +0 -1
  492. package/dist/modal-D0Qxrvx5.js.map +0 -1
  493. package/dist/notification-banner-BxHwTFnH.js +0 -2
  494. package/dist/notification-banner-BxHwTFnH.js.map +0 -1
  495. package/dist/notification-banner-CZTQZ5Le.mjs.map +0 -1
  496. package/dist/popover-CY75TnbA.js +0 -2
  497. package/dist/popover-CY75TnbA.js.map +0 -1
  498. package/dist/popover-wiiwtqWE.mjs +0 -1043
  499. package/dist/popover-wiiwtqWE.mjs.map +0 -1
  500. package/dist/promotion-card-C1UoxzcV.js.map +0 -1
  501. package/dist/promotion-card-CooYPpFo.mjs.map +0 -1
  502. package/dist/quantity-selector-BEYMDsBM.js +0 -2
  503. package/dist/quantity-selector-BEYMDsBM.js.map +0 -1
  504. package/dist/quantity-selector-Cp-e5xKJ.mjs +0 -172
  505. package/dist/quantity-selector-Cp-e5xKJ.mjs.map +0 -1
  506. package/dist/stepper-20s8dnPA.mjs +0 -449
  507. package/dist/stepper-20s8dnPA.mjs.map +0 -1
  508. package/dist/stepper-VDiR2I8F.js +0 -2
  509. package/dist/stepper-VDiR2I8F.js.map +0 -1
  510. package/dist/table-B5ZitZoL.js +0 -9
  511. package/dist/table-B5ZitZoL.js.map +0 -1
  512. package/dist/table-CNIL-60s.mjs +0 -7428
  513. package/dist/table-CNIL-60s.mjs.map +0 -1
  514. package/dist/tabs-Bye5lgZ1.mjs +0 -424
  515. package/dist/tabs-Bye5lgZ1.mjs.map +0 -1
  516. package/dist/tabs-D-nfZHIA.js +0 -2
  517. package/dist/tabs-D-nfZHIA.js.map +0 -1
  518. package/dist/text-field-D0e-cRbG.mjs.map +0 -1
  519. package/dist/text-field-VW8ObP83.js.map +0 -1
  520. package/dist/tooltip-B-11qk-0.js +0 -2
@@ -0,0 +1,2892 @@
1
+ import N, { useMemo as R, useRef as E, useCallback as B, useLayoutEffect as En, useEffect as A, useState as j, createContext as Me, useContext as fe, memo as An, useReducer as On, cloneElement as Nn, forwardRef as Tn } from "react";
2
+ import { unstable_batchedUpdates as Xe, createPortal as Mn } from "react-dom";
3
+ function so() {
4
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
5
+ t[n] = arguments[n];
6
+ return R(
7
+ () => (r) => {
8
+ t.forEach((o) => o(r));
9
+ },
10
+ // eslint-disable-next-line react-hooks/exhaustive-deps
11
+ t
12
+ );
13
+ }
14
+ const qe = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
15
+ function me(e) {
16
+ const t = Object.prototype.toString.call(e);
17
+ return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
18
+ t === "[object global]";
19
+ }
20
+ function dt(e) {
21
+ return "nodeType" in e;
22
+ }
23
+ function F(e) {
24
+ var t, n;
25
+ return e ? me(e) ? e : dt(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
26
+ }
27
+ function ft(e) {
28
+ const {
29
+ Document: t
30
+ } = F(e);
31
+ return e instanceof t;
32
+ }
33
+ function Le(e) {
34
+ return me(e) ? !1 : e instanceof F(e).HTMLElement;
35
+ }
36
+ function Jt(e) {
37
+ return e instanceof F(e).SVGElement;
38
+ }
39
+ function we(e) {
40
+ return e ? me(e) ? e.document : dt(e) ? ft(e) ? e : Le(e) || Jt(e) ? e.ownerDocument : document : document : document;
41
+ }
42
+ const ee = qe ? En : A;
43
+ function Je(e) {
44
+ const t = E(e);
45
+ return ee(() => {
46
+ t.current = e;
47
+ }), B(function() {
48
+ for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
49
+ r[o] = arguments[o];
50
+ return t.current == null ? void 0 : t.current(...r);
51
+ }, []);
52
+ }
53
+ function Ln() {
54
+ const e = E(null), t = B((r, o) => {
55
+ e.current = setInterval(r, o);
56
+ }, []), n = B(() => {
57
+ e.current !== null && (clearInterval(e.current), e.current = null);
58
+ }, []);
59
+ return [t, n];
60
+ }
61
+ function Oe(e, t) {
62
+ t === void 0 && (t = [e]);
63
+ const n = E(e);
64
+ return ee(() => {
65
+ n.current !== e && (n.current = e);
66
+ }, t), n;
67
+ }
68
+ function Ie(e, t) {
69
+ const n = E();
70
+ return R(
71
+ () => {
72
+ const r = e(n.current);
73
+ return n.current = r, r;
74
+ },
75
+ // eslint-disable-next-line react-hooks/exhaustive-deps
76
+ [...t]
77
+ );
78
+ }
79
+ function $e(e) {
80
+ const t = Je(e), n = E(null), r = B(
81
+ (o) => {
82
+ o !== n.current && t?.(o, n.current), n.current = o;
83
+ },
84
+ //eslint-disable-next-line
85
+ []
86
+ );
87
+ return [n, r];
88
+ }
89
+ function Ke(e) {
90
+ const t = E();
91
+ return A(() => {
92
+ t.current = e;
93
+ }, [e]), t.current;
94
+ }
95
+ let ot = {};
96
+ function Ge(e, t) {
97
+ return R(() => {
98
+ if (t)
99
+ return t;
100
+ const n = ot[e] == null ? 0 : ot[e] + 1;
101
+ return ot[e] = n, e + "-" + n;
102
+ }, [e, t]);
103
+ }
104
+ function Gt(e) {
105
+ return function(t) {
106
+ for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
107
+ r[o - 1] = arguments[o];
108
+ return r.reduce((i, a) => {
109
+ const s = Object.entries(a);
110
+ for (const [l, c] of s) {
111
+ const d = i[l];
112
+ d != null && (i[l] = d + e * c);
113
+ }
114
+ return i;
115
+ }, {
116
+ ...t
117
+ });
118
+ };
119
+ }
120
+ const ye = /* @__PURE__ */ Gt(1), We = /* @__PURE__ */ Gt(-1);
121
+ function In(e) {
122
+ return "clientX" in e && "clientY" in e;
123
+ }
124
+ function ht(e) {
125
+ if (!e)
126
+ return !1;
127
+ const {
128
+ KeyboardEvent: t
129
+ } = F(e.target);
130
+ return t && e instanceof t;
131
+ }
132
+ function Pn(e) {
133
+ if (!e)
134
+ return !1;
135
+ const {
136
+ TouchEvent: t
137
+ } = F(e.target);
138
+ return t && e instanceof t;
139
+ }
140
+ function Ue(e) {
141
+ if (Pn(e)) {
142
+ if (e.touches && e.touches.length) {
143
+ const {
144
+ clientX: t,
145
+ clientY: n
146
+ } = e.touches[0];
147
+ return {
148
+ x: t,
149
+ y: n
150
+ };
151
+ } else if (e.changedTouches && e.changedTouches.length) {
152
+ const {
153
+ clientX: t,
154
+ clientY: n
155
+ } = e.changedTouches[0];
156
+ return {
157
+ x: t,
158
+ y: n
159
+ };
160
+ }
161
+ }
162
+ return In(e) ? {
163
+ x: e.clientX,
164
+ y: e.clientY
165
+ } : null;
166
+ }
167
+ const Ne = /* @__PURE__ */ Object.freeze({
168
+ Translate: {
169
+ toString(e) {
170
+ if (!e)
171
+ return;
172
+ const {
173
+ x: t,
174
+ y: n
175
+ } = e;
176
+ return "translate3d(" + (t ? Math.round(t) : 0) + "px, " + (n ? Math.round(n) : 0) + "px, 0)";
177
+ }
178
+ },
179
+ Scale: {
180
+ toString(e) {
181
+ if (!e)
182
+ return;
183
+ const {
184
+ scaleX: t,
185
+ scaleY: n
186
+ } = e;
187
+ return "scaleX(" + t + ") scaleY(" + n + ")";
188
+ }
189
+ },
190
+ Transform: {
191
+ toString(e) {
192
+ if (e)
193
+ return [Ne.Translate.toString(e), Ne.Scale.toString(e)].join(" ");
194
+ }
195
+ },
196
+ Transition: {
197
+ toString(e) {
198
+ let {
199
+ property: t,
200
+ duration: n,
201
+ easing: r
202
+ } = e;
203
+ return t + " " + n + "ms " + r;
204
+ }
205
+ }
206
+ }), kt = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
207
+ function kn(e) {
208
+ return e.matches(kt) ? e : e.querySelector(kt);
209
+ }
210
+ const zn = {
211
+ display: "none"
212
+ };
213
+ function Bn(e) {
214
+ let {
215
+ id: t,
216
+ value: n
217
+ } = e;
218
+ return N.createElement("div", {
219
+ id: t,
220
+ style: zn
221
+ }, n);
222
+ }
223
+ function Fn(e) {
224
+ let {
225
+ id: t,
226
+ announcement: n,
227
+ ariaLiveType: r = "assertive"
228
+ } = e;
229
+ const o = {
230
+ position: "fixed",
231
+ top: 0,
232
+ left: 0,
233
+ width: 1,
234
+ height: 1,
235
+ margin: -1,
236
+ border: 0,
237
+ padding: 0,
238
+ overflow: "hidden",
239
+ clip: "rect(0 0 0 0)",
240
+ clipPath: "inset(100%)",
241
+ whiteSpace: "nowrap"
242
+ };
243
+ return N.createElement("div", {
244
+ id: t,
245
+ style: o,
246
+ role: "status",
247
+ "aria-live": r,
248
+ "aria-atomic": !0
249
+ }, n);
250
+ }
251
+ function jn() {
252
+ const [e, t] = j("");
253
+ return {
254
+ announce: B((r) => {
255
+ r != null && t(r);
256
+ }, []),
257
+ announcement: e
258
+ };
259
+ }
260
+ const Qt = /* @__PURE__ */ Me(null);
261
+ function Xn(e) {
262
+ const t = fe(Qt);
263
+ A(() => {
264
+ if (!t)
265
+ throw new Error("useDndMonitor must be used within a children of <DndContext>");
266
+ return t(e);
267
+ }, [e, t]);
268
+ }
269
+ function Yn() {
270
+ const [e] = j(() => /* @__PURE__ */ new Set()), t = B((r) => (e.add(r), () => e.delete(r)), [e]);
271
+ return [B((r) => {
272
+ let {
273
+ type: o,
274
+ event: i
275
+ } = r;
276
+ e.forEach((a) => {
277
+ var s;
278
+ return (s = a[o]) == null ? void 0 : s.call(a, i);
279
+ });
280
+ }, [e]), t];
281
+ }
282
+ const $n = {
283
+ draggable: `
284
+ To pick up a draggable item, press the space bar.
285
+ While dragging, use the arrow keys to move the item.
286
+ Press space again to drop the item in its new position, or press escape to cancel.
287
+ `
288
+ }, Kn = {
289
+ onDragStart(e) {
290
+ let {
291
+ active: t
292
+ } = e;
293
+ return "Picked up draggable item " + t.id + ".";
294
+ },
295
+ onDragOver(e) {
296
+ let {
297
+ active: t,
298
+ over: n
299
+ } = e;
300
+ return n ? "Draggable item " + t.id + " was moved over droppable area " + n.id + "." : "Draggable item " + t.id + " is no longer over a droppable area.";
301
+ },
302
+ onDragEnd(e) {
303
+ let {
304
+ active: t,
305
+ over: n
306
+ } = e;
307
+ return n ? "Draggable item " + t.id + " was dropped over droppable area " + n.id : "Draggable item " + t.id + " was dropped.";
308
+ },
309
+ onDragCancel(e) {
310
+ let {
311
+ active: t
312
+ } = e;
313
+ return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
314
+ }
315
+ };
316
+ function Wn(e) {
317
+ let {
318
+ announcements: t = Kn,
319
+ container: n,
320
+ hiddenTextDescribedById: r,
321
+ screenReaderInstructions: o = $n
322
+ } = e;
323
+ const {
324
+ announce: i,
325
+ announcement: a
326
+ } = jn(), s = Ge("DndLiveRegion"), [l, c] = j(!1);
327
+ if (A(() => {
328
+ c(!0);
329
+ }, []), Xn(R(() => ({
330
+ onDragStart(u) {
331
+ let {
332
+ active: h
333
+ } = u;
334
+ i(t.onDragStart({
335
+ active: h
336
+ }));
337
+ },
338
+ onDragMove(u) {
339
+ let {
340
+ active: h,
341
+ over: f
342
+ } = u;
343
+ t.onDragMove && i(t.onDragMove({
344
+ active: h,
345
+ over: f
346
+ }));
347
+ },
348
+ onDragOver(u) {
349
+ let {
350
+ active: h,
351
+ over: f
352
+ } = u;
353
+ i(t.onDragOver({
354
+ active: h,
355
+ over: f
356
+ }));
357
+ },
358
+ onDragEnd(u) {
359
+ let {
360
+ active: h,
361
+ over: f
362
+ } = u;
363
+ i(t.onDragEnd({
364
+ active: h,
365
+ over: f
366
+ }));
367
+ },
368
+ onDragCancel(u) {
369
+ let {
370
+ active: h,
371
+ over: f
372
+ } = u;
373
+ i(t.onDragCancel({
374
+ active: h,
375
+ over: f
376
+ }));
377
+ }
378
+ }), [i, t])), !l)
379
+ return null;
380
+ const d = N.createElement(N.Fragment, null, N.createElement(Bn, {
381
+ id: r,
382
+ value: o.draggable
383
+ }), N.createElement(Fn, {
384
+ id: s,
385
+ announcement: a
386
+ }));
387
+ return n ? Mn(d, n) : d;
388
+ }
389
+ var M;
390
+ (function(e) {
391
+ e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
392
+ })(M || (M = {}));
393
+ function He() {
394
+ }
395
+ function ao(e, t) {
396
+ return R(
397
+ () => ({
398
+ sensor: e,
399
+ options: t ?? {}
400
+ }),
401
+ // eslint-disable-next-line react-hooks/exhaustive-deps
402
+ [e, t]
403
+ );
404
+ }
405
+ function lo() {
406
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
407
+ t[n] = arguments[n];
408
+ return R(
409
+ () => [...t].filter((r) => r != null),
410
+ // eslint-disable-next-line react-hooks/exhaustive-deps
411
+ [...t]
412
+ );
413
+ }
414
+ const V = /* @__PURE__ */ Object.freeze({
415
+ x: 0,
416
+ y: 0
417
+ });
418
+ function Zt(e, t) {
419
+ return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
420
+ }
421
+ function Un(e, t) {
422
+ const n = Ue(e);
423
+ if (!n)
424
+ return "0 0";
425
+ const r = {
426
+ x: (n.x - t.left) / t.width * 100,
427
+ y: (n.y - t.top) / t.height * 100
428
+ };
429
+ return r.x + "% " + r.y + "%";
430
+ }
431
+ function _t(e, t) {
432
+ let {
433
+ data: {
434
+ value: n
435
+ }
436
+ } = e, {
437
+ data: {
438
+ value: r
439
+ }
440
+ } = t;
441
+ return n - r;
442
+ }
443
+ function Hn(e, t) {
444
+ let {
445
+ data: {
446
+ value: n
447
+ }
448
+ } = e, {
449
+ data: {
450
+ value: r
451
+ }
452
+ } = t;
453
+ return r - n;
454
+ }
455
+ function zt(e) {
456
+ let {
457
+ left: t,
458
+ top: n,
459
+ height: r,
460
+ width: o
461
+ } = e;
462
+ return [{
463
+ x: t,
464
+ y: n
465
+ }, {
466
+ x: t + o,
467
+ y: n
468
+ }, {
469
+ x: t,
470
+ y: n + r
471
+ }, {
472
+ x: t + o,
473
+ y: n + r
474
+ }];
475
+ }
476
+ function Vn(e, t) {
477
+ if (!e || e.length === 0)
478
+ return null;
479
+ const [n] = e;
480
+ return n[t];
481
+ }
482
+ function Bt(e, t, n) {
483
+ return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
484
+ x: t + e.width * 0.5,
485
+ y: n + e.height * 0.5
486
+ };
487
+ }
488
+ const co = (e) => {
489
+ let {
490
+ collisionRect: t,
491
+ droppableRects: n,
492
+ droppableContainers: r
493
+ } = e;
494
+ const o = Bt(t, t.left, t.top), i = [];
495
+ for (const a of r) {
496
+ const {
497
+ id: s
498
+ } = a, l = n.get(s);
499
+ if (l) {
500
+ const c = Zt(Bt(l), o);
501
+ i.push({
502
+ id: s,
503
+ data: {
504
+ droppableContainer: a,
505
+ value: c
506
+ }
507
+ });
508
+ }
509
+ }
510
+ return i.sort(_t);
511
+ }, uo = (e) => {
512
+ let {
513
+ collisionRect: t,
514
+ droppableRects: n,
515
+ droppableContainers: r
516
+ } = e;
517
+ const o = zt(t), i = [];
518
+ for (const a of r) {
519
+ const {
520
+ id: s
521
+ } = a, l = n.get(s);
522
+ if (l) {
523
+ const c = zt(l), d = o.reduce((h, f, D) => h + Zt(c[D], f), 0), u = Number((d / 4).toFixed(4));
524
+ i.push({
525
+ id: s,
526
+ data: {
527
+ droppableContainer: a,
528
+ value: u
529
+ }
530
+ });
531
+ }
532
+ }
533
+ return i.sort(_t);
534
+ };
535
+ function qn(e, t) {
536
+ const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), a = o - r, s = i - n;
537
+ if (r < o && n < i) {
538
+ const l = t.width * t.height, c = e.width * e.height, d = a * s, u = d / (l + c - d);
539
+ return Number(u.toFixed(4));
540
+ }
541
+ return 0;
542
+ }
543
+ const Jn = (e) => {
544
+ let {
545
+ collisionRect: t,
546
+ droppableRects: n,
547
+ droppableContainers: r
548
+ } = e;
549
+ const o = [];
550
+ for (const i of r) {
551
+ const {
552
+ id: a
553
+ } = i, s = n.get(a);
554
+ if (s) {
555
+ const l = qn(s, t);
556
+ l > 0 && o.push({
557
+ id: a,
558
+ data: {
559
+ droppableContainer: i,
560
+ value: l
561
+ }
562
+ });
563
+ }
564
+ }
565
+ return o.sort(Hn);
566
+ };
567
+ function Gn(e, t, n) {
568
+ return {
569
+ ...e,
570
+ scaleX: t && n ? t.width / n.width : 1,
571
+ scaleY: t && n ? t.height / n.height : 1
572
+ };
573
+ }
574
+ function en(e, t) {
575
+ return e && t ? {
576
+ x: e.left - t.left,
577
+ y: e.top - t.top
578
+ } : V;
579
+ }
580
+ function Qn(e) {
581
+ return function(n) {
582
+ for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
583
+ o[i - 1] = arguments[i];
584
+ return o.reduce((a, s) => ({
585
+ ...a,
586
+ top: a.top + e * s.y,
587
+ bottom: a.bottom + e * s.y,
588
+ left: a.left + e * s.x,
589
+ right: a.right + e * s.x
590
+ }), {
591
+ ...n
592
+ });
593
+ };
594
+ }
595
+ const Zn = /* @__PURE__ */ Qn(1);
596
+ function tn(e) {
597
+ if (e.startsWith("matrix3d(")) {
598
+ const t = e.slice(9, -1).split(/, /);
599
+ return {
600
+ x: +t[12],
601
+ y: +t[13],
602
+ scaleX: +t[0],
603
+ scaleY: +t[5]
604
+ };
605
+ } else if (e.startsWith("matrix(")) {
606
+ const t = e.slice(7, -1).split(/, /);
607
+ return {
608
+ x: +t[4],
609
+ y: +t[5],
610
+ scaleX: +t[0],
611
+ scaleY: +t[3]
612
+ };
613
+ }
614
+ return null;
615
+ }
616
+ function _n(e, t, n) {
617
+ const r = tn(t);
618
+ if (!r)
619
+ return e;
620
+ const {
621
+ scaleX: o,
622
+ scaleY: i,
623
+ x: a,
624
+ y: s
625
+ } = r, l = e.left - a - (1 - o) * parseFloat(n), c = e.top - s - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), d = o ? e.width / o : e.width, u = i ? e.height / i : e.height;
626
+ return {
627
+ width: d,
628
+ height: u,
629
+ top: c,
630
+ right: l + d,
631
+ bottom: c + u,
632
+ left: l
633
+ };
634
+ }
635
+ const er = {
636
+ ignoreTransform: !1
637
+ };
638
+ function Pe(e, t) {
639
+ t === void 0 && (t = er);
640
+ let n = e.getBoundingClientRect();
641
+ if (t.ignoreTransform) {
642
+ const {
643
+ transform: c,
644
+ transformOrigin: d
645
+ } = F(e).getComputedStyle(e);
646
+ c && (n = _n(n, c, d));
647
+ }
648
+ const {
649
+ top: r,
650
+ left: o,
651
+ width: i,
652
+ height: a,
653
+ bottom: s,
654
+ right: l
655
+ } = n;
656
+ return {
657
+ top: r,
658
+ left: o,
659
+ width: i,
660
+ height: a,
661
+ bottom: s,
662
+ right: l
663
+ };
664
+ }
665
+ function Ft(e) {
666
+ return Pe(e, {
667
+ ignoreTransform: !0
668
+ });
669
+ }
670
+ function tr(e) {
671
+ const t = e.innerWidth, n = e.innerHeight;
672
+ return {
673
+ top: 0,
674
+ left: 0,
675
+ right: t,
676
+ bottom: n,
677
+ width: t,
678
+ height: n
679
+ };
680
+ }
681
+ function nr(e, t) {
682
+ return t === void 0 && (t = F(e).getComputedStyle(e)), t.position === "fixed";
683
+ }
684
+ function rr(e, t) {
685
+ t === void 0 && (t = F(e).getComputedStyle(e));
686
+ const n = /(auto|scroll|overlay)/;
687
+ return ["overflow", "overflowX", "overflowY"].some((o) => {
688
+ const i = t[o];
689
+ return typeof i == "string" ? n.test(i) : !1;
690
+ });
691
+ }
692
+ function gt(e, t) {
693
+ const n = [];
694
+ function r(o) {
695
+ if (t != null && n.length >= t || !o)
696
+ return n;
697
+ if (ft(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
698
+ return n.push(o.scrollingElement), n;
699
+ if (!Le(o) || Jt(o) || n.includes(o))
700
+ return n;
701
+ const i = F(e).getComputedStyle(o);
702
+ return o !== e && rr(o, i) && n.push(o), nr(o, i) ? n : r(o.parentNode);
703
+ }
704
+ return e ? r(e) : n;
705
+ }
706
+ function nn(e) {
707
+ const [t] = gt(e, 1);
708
+ return t ?? null;
709
+ }
710
+ function it(e) {
711
+ return !qe || !e ? null : me(e) ? e : dt(e) ? ft(e) || e === we(e).scrollingElement ? window : Le(e) ? e : null : null;
712
+ }
713
+ function rn(e) {
714
+ return me(e) ? e.scrollX : e.scrollLeft;
715
+ }
716
+ function on(e) {
717
+ return me(e) ? e.scrollY : e.scrollTop;
718
+ }
719
+ function lt(e) {
720
+ return {
721
+ x: rn(e),
722
+ y: on(e)
723
+ };
724
+ }
725
+ var I;
726
+ (function(e) {
727
+ e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
728
+ })(I || (I = {}));
729
+ function sn(e) {
730
+ return !qe || !e ? !1 : e === document.scrollingElement;
731
+ }
732
+ function an(e) {
733
+ const t = {
734
+ x: 0,
735
+ y: 0
736
+ }, n = sn(e) ? {
737
+ height: window.innerHeight,
738
+ width: window.innerWidth
739
+ } : {
740
+ height: e.clientHeight,
741
+ width: e.clientWidth
742
+ }, r = {
743
+ x: e.scrollWidth - n.width,
744
+ y: e.scrollHeight - n.height
745
+ }, o = e.scrollTop <= t.y, i = e.scrollLeft <= t.x, a = e.scrollTop >= r.y, s = e.scrollLeft >= r.x;
746
+ return {
747
+ isTop: o,
748
+ isLeft: i,
749
+ isBottom: a,
750
+ isRight: s,
751
+ maxScroll: r,
752
+ minScroll: t
753
+ };
754
+ }
755
+ const or = {
756
+ x: 0.2,
757
+ y: 0.2
758
+ };
759
+ function ir(e, t, n, r, o) {
760
+ let {
761
+ top: i,
762
+ left: a,
763
+ right: s,
764
+ bottom: l
765
+ } = n;
766
+ r === void 0 && (r = 10), o === void 0 && (o = or);
767
+ const {
768
+ isTop: c,
769
+ isBottom: d,
770
+ isLeft: u,
771
+ isRight: h
772
+ } = an(e), f = {
773
+ x: 0,
774
+ y: 0
775
+ }, D = {
776
+ x: 0,
777
+ y: 0
778
+ }, g = {
779
+ height: t.height * o.y,
780
+ width: t.width * o.x
781
+ };
782
+ return !c && i <= t.top + g.height ? (f.y = I.Backward, D.y = r * Math.abs((t.top + g.height - i) / g.height)) : !d && l >= t.bottom - g.height && (f.y = I.Forward, D.y = r * Math.abs((t.bottom - g.height - l) / g.height)), !h && s >= t.right - g.width ? (f.x = I.Forward, D.x = r * Math.abs((t.right - g.width - s) / g.width)) : !u && a <= t.left + g.width && (f.x = I.Backward, D.x = r * Math.abs((t.left + g.width - a) / g.width)), {
783
+ direction: f,
784
+ speed: D
785
+ };
786
+ }
787
+ function sr(e) {
788
+ if (e === document.scrollingElement) {
789
+ const {
790
+ innerWidth: i,
791
+ innerHeight: a
792
+ } = window;
793
+ return {
794
+ top: 0,
795
+ left: 0,
796
+ right: i,
797
+ bottom: a,
798
+ width: i,
799
+ height: a
800
+ };
801
+ }
802
+ const {
803
+ top: t,
804
+ left: n,
805
+ right: r,
806
+ bottom: o
807
+ } = e.getBoundingClientRect();
808
+ return {
809
+ top: t,
810
+ left: n,
811
+ right: r,
812
+ bottom: o,
813
+ width: e.clientWidth,
814
+ height: e.clientHeight
815
+ };
816
+ }
817
+ function ln(e) {
818
+ return e.reduce((t, n) => ye(t, lt(n)), V);
819
+ }
820
+ function ar(e) {
821
+ return e.reduce((t, n) => t + rn(n), 0);
822
+ }
823
+ function lr(e) {
824
+ return e.reduce((t, n) => t + on(n), 0);
825
+ }
826
+ function cn(e, t) {
827
+ if (t === void 0 && (t = Pe), !e)
828
+ return;
829
+ const {
830
+ top: n,
831
+ left: r,
832
+ bottom: o,
833
+ right: i
834
+ } = t(e);
835
+ nn(e) && (o <= 0 || i <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
836
+ block: "center",
837
+ inline: "center"
838
+ });
839
+ }
840
+ const cr = [["x", ["left", "right"], ar], ["y", ["top", "bottom"], lr]];
841
+ class vt {
842
+ constructor(t, n) {
843
+ this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
844
+ const r = gt(n), o = ln(r);
845
+ this.rect = {
846
+ ...t
847
+ }, this.width = t.width, this.height = t.height;
848
+ for (const [i, a, s] of cr)
849
+ for (const l of a)
850
+ Object.defineProperty(this, l, {
851
+ get: () => {
852
+ const c = s(r), d = o[i] - c;
853
+ return this.rect[l] + d;
854
+ },
855
+ enumerable: !0
856
+ });
857
+ Object.defineProperty(this, "rect", {
858
+ enumerable: !1
859
+ });
860
+ }
861
+ }
862
+ class Re {
863
+ constructor(t) {
864
+ this.target = void 0, this.listeners = [], this.removeAll = () => {
865
+ this.listeners.forEach((n) => {
866
+ var r;
867
+ return (r = this.target) == null ? void 0 : r.removeEventListener(...n);
868
+ });
869
+ }, this.target = t;
870
+ }
871
+ add(t, n, r) {
872
+ var o;
873
+ (o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
874
+ }
875
+ }
876
+ function ur(e) {
877
+ const {
878
+ EventTarget: t
879
+ } = F(e);
880
+ return e instanceof t ? e : we(e);
881
+ }
882
+ function st(e, t) {
883
+ const n = Math.abs(e.x), r = Math.abs(e.y);
884
+ return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
885
+ }
886
+ var W;
887
+ (function(e) {
888
+ e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
889
+ })(W || (W = {}));
890
+ function jt(e) {
891
+ e.preventDefault();
892
+ }
893
+ function dr(e) {
894
+ e.stopPropagation();
895
+ }
896
+ var x;
897
+ (function(e) {
898
+ e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
899
+ })(x || (x = {}));
900
+ const un = {
901
+ start: [x.Space, x.Enter],
902
+ cancel: [x.Esc],
903
+ end: [x.Space, x.Enter, x.Tab]
904
+ }, fr = (e, t) => {
905
+ let {
906
+ currentCoordinates: n
907
+ } = t;
908
+ switch (e.code) {
909
+ case x.Right:
910
+ return {
911
+ ...n,
912
+ x: n.x + 25
913
+ };
914
+ case x.Left:
915
+ return {
916
+ ...n,
917
+ x: n.x - 25
918
+ };
919
+ case x.Down:
920
+ return {
921
+ ...n,
922
+ y: n.y + 25
923
+ };
924
+ case x.Up:
925
+ return {
926
+ ...n,
927
+ y: n.y - 25
928
+ };
929
+ }
930
+ };
931
+ class dn {
932
+ constructor(t) {
933
+ this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
934
+ const {
935
+ event: {
936
+ target: n
937
+ }
938
+ } = t;
939
+ this.props = t, this.listeners = new Re(we(n)), this.windowListeners = new Re(F(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
940
+ }
941
+ attach() {
942
+ this.handleStart(), this.windowListeners.add(W.Resize, this.handleCancel), this.windowListeners.add(W.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(W.Keydown, this.handleKeyDown));
943
+ }
944
+ handleStart() {
945
+ const {
946
+ activeNode: t,
947
+ onStart: n
948
+ } = this.props, r = t.node.current;
949
+ r && cn(r), n(V);
950
+ }
951
+ handleKeyDown(t) {
952
+ if (ht(t)) {
953
+ const {
954
+ active: n,
955
+ context: r,
956
+ options: o
957
+ } = this.props, {
958
+ keyboardCodes: i = un,
959
+ coordinateGetter: a = fr,
960
+ scrollBehavior: s = "smooth"
961
+ } = o, {
962
+ code: l
963
+ } = t;
964
+ if (i.end.includes(l)) {
965
+ this.handleEnd(t);
966
+ return;
967
+ }
968
+ if (i.cancel.includes(l)) {
969
+ this.handleCancel(t);
970
+ return;
971
+ }
972
+ const {
973
+ collisionRect: c
974
+ } = r.current, d = c ? {
975
+ x: c.left,
976
+ y: c.top
977
+ } : V;
978
+ this.referenceCoordinates || (this.referenceCoordinates = d);
979
+ const u = a(t, {
980
+ active: n,
981
+ context: r.current,
982
+ currentCoordinates: d
983
+ });
984
+ if (u) {
985
+ const h = We(u, d), f = {
986
+ x: 0,
987
+ y: 0
988
+ }, {
989
+ scrollableAncestors: D
990
+ } = r.current;
991
+ for (const g of D) {
992
+ const v = t.code, {
993
+ isTop: y,
994
+ isRight: w,
995
+ isLeft: m,
996
+ isBottom: L,
997
+ maxScroll: C,
998
+ minScroll: S
999
+ } = an(g), p = sr(g), b = {
1000
+ x: Math.min(v === x.Right ? p.right - p.width / 2 : p.right, Math.max(v === x.Right ? p.left : p.left + p.width / 2, u.x)),
1001
+ y: Math.min(v === x.Down ? p.bottom - p.height / 2 : p.bottom, Math.max(v === x.Down ? p.top : p.top + p.height / 2, u.y))
1002
+ }, O = v === x.Right && !w || v === x.Left && !m, P = v === x.Down && !L || v === x.Up && !y;
1003
+ if (O && b.x !== u.x) {
1004
+ const T = g.scrollLeft + h.x, G = v === x.Right && T <= C.x || v === x.Left && T >= S.x;
1005
+ if (G && !h.y) {
1006
+ g.scrollTo({
1007
+ left: T,
1008
+ behavior: s
1009
+ });
1010
+ return;
1011
+ }
1012
+ G ? f.x = g.scrollLeft - T : f.x = v === x.Right ? g.scrollLeft - C.x : g.scrollLeft - S.x, f.x && g.scrollBy({
1013
+ left: -f.x,
1014
+ behavior: s
1015
+ });
1016
+ break;
1017
+ } else if (P && b.y !== u.y) {
1018
+ const T = g.scrollTop + h.y, G = v === x.Down && T <= C.y || v === x.Up && T >= S.y;
1019
+ if (G && !h.x) {
1020
+ g.scrollTo({
1021
+ top: T,
1022
+ behavior: s
1023
+ });
1024
+ return;
1025
+ }
1026
+ G ? f.y = g.scrollTop - T : f.y = v === x.Down ? g.scrollTop - C.y : g.scrollTop - S.y, f.y && g.scrollBy({
1027
+ top: -f.y,
1028
+ behavior: s
1029
+ });
1030
+ break;
1031
+ }
1032
+ }
1033
+ this.handleMove(t, ye(We(u, this.referenceCoordinates), f));
1034
+ }
1035
+ }
1036
+ }
1037
+ handleMove(t, n) {
1038
+ const {
1039
+ onMove: r
1040
+ } = this.props;
1041
+ t.preventDefault(), r(n);
1042
+ }
1043
+ handleEnd(t) {
1044
+ const {
1045
+ onEnd: n
1046
+ } = this.props;
1047
+ t.preventDefault(), this.detach(), n();
1048
+ }
1049
+ handleCancel(t) {
1050
+ const {
1051
+ onCancel: n
1052
+ } = this.props;
1053
+ t.preventDefault(), this.detach(), n();
1054
+ }
1055
+ detach() {
1056
+ this.listeners.removeAll(), this.windowListeners.removeAll();
1057
+ }
1058
+ }
1059
+ dn.activators = [{
1060
+ eventName: "onKeyDown",
1061
+ handler: (e, t, n) => {
1062
+ let {
1063
+ keyboardCodes: r = un,
1064
+ onActivation: o
1065
+ } = t, {
1066
+ active: i
1067
+ } = n;
1068
+ const {
1069
+ code: a
1070
+ } = e.nativeEvent;
1071
+ if (r.start.includes(a)) {
1072
+ const s = i.activatorNode.current;
1073
+ return s && e.target !== s ? !1 : (e.preventDefault(), o?.({
1074
+ event: e.nativeEvent
1075
+ }), !0);
1076
+ }
1077
+ return !1;
1078
+ }
1079
+ }];
1080
+ function Xt(e) {
1081
+ return !!(e && "distance" in e);
1082
+ }
1083
+ function Yt(e) {
1084
+ return !!(e && "delay" in e);
1085
+ }
1086
+ class pt {
1087
+ constructor(t, n, r) {
1088
+ var o;
1089
+ r === void 0 && (r = ur(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
1090
+ const {
1091
+ event: i
1092
+ } = t, {
1093
+ target: a
1094
+ } = i;
1095
+ this.props = t, this.events = n, this.document = we(a), this.documentListeners = new Re(this.document), this.listeners = new Re(r), this.windowListeners = new Re(F(a)), this.initialCoordinates = (o = Ue(i)) != null ? o : V, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
1096
+ }
1097
+ attach() {
1098
+ const {
1099
+ events: t,
1100
+ props: {
1101
+ options: {
1102
+ activationConstraint: n,
1103
+ bypassActivationConstraint: r
1104
+ }
1105
+ }
1106
+ } = this;
1107
+ if (this.listeners.add(t.move.name, this.handleMove, {
1108
+ passive: !1
1109
+ }), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(W.Resize, this.handleCancel), this.windowListeners.add(W.DragStart, jt), this.windowListeners.add(W.VisibilityChange, this.handleCancel), this.windowListeners.add(W.ContextMenu, jt), this.documentListeners.add(W.Keydown, this.handleKeydown), n) {
1110
+ if (r != null && r({
1111
+ event: this.props.event,
1112
+ activeNode: this.props.activeNode,
1113
+ options: this.props.options
1114
+ }))
1115
+ return this.handleStart();
1116
+ if (Yt(n)) {
1117
+ this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
1118
+ return;
1119
+ }
1120
+ if (Xt(n)) {
1121
+ this.handlePending(n);
1122
+ return;
1123
+ }
1124
+ }
1125
+ this.handleStart();
1126
+ }
1127
+ detach() {
1128
+ this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
1129
+ }
1130
+ handlePending(t, n) {
1131
+ const {
1132
+ active: r,
1133
+ onPending: o
1134
+ } = this.props;
1135
+ o(r, t, this.initialCoordinates, n);
1136
+ }
1137
+ handleStart() {
1138
+ const {
1139
+ initialCoordinates: t
1140
+ } = this, {
1141
+ onStart: n
1142
+ } = this.props;
1143
+ t && (this.activated = !0, this.documentListeners.add(W.Click, dr, {
1144
+ capture: !0
1145
+ }), this.removeTextSelection(), this.documentListeners.add(W.SelectionChange, this.removeTextSelection), n(t));
1146
+ }
1147
+ handleMove(t) {
1148
+ var n;
1149
+ const {
1150
+ activated: r,
1151
+ initialCoordinates: o,
1152
+ props: i
1153
+ } = this, {
1154
+ onMove: a,
1155
+ options: {
1156
+ activationConstraint: s
1157
+ }
1158
+ } = i;
1159
+ if (!o)
1160
+ return;
1161
+ const l = (n = Ue(t)) != null ? n : V, c = We(o, l);
1162
+ if (!r && s) {
1163
+ if (Xt(s)) {
1164
+ if (s.tolerance != null && st(c, s.tolerance))
1165
+ return this.handleCancel();
1166
+ if (st(c, s.distance))
1167
+ return this.handleStart();
1168
+ }
1169
+ if (Yt(s) && st(c, s.tolerance))
1170
+ return this.handleCancel();
1171
+ this.handlePending(s, c);
1172
+ return;
1173
+ }
1174
+ t.cancelable && t.preventDefault(), a(l);
1175
+ }
1176
+ handleEnd() {
1177
+ const {
1178
+ onAbort: t,
1179
+ onEnd: n
1180
+ } = this.props;
1181
+ this.detach(), this.activated || t(this.props.active), n();
1182
+ }
1183
+ handleCancel() {
1184
+ const {
1185
+ onAbort: t,
1186
+ onCancel: n
1187
+ } = this.props;
1188
+ this.detach(), this.activated || t(this.props.active), n();
1189
+ }
1190
+ handleKeydown(t) {
1191
+ t.code === x.Esc && this.handleCancel();
1192
+ }
1193
+ removeTextSelection() {
1194
+ var t;
1195
+ (t = this.document.getSelection()) == null || t.removeAllRanges();
1196
+ }
1197
+ }
1198
+ const hr = {
1199
+ cancel: {
1200
+ name: "pointercancel"
1201
+ },
1202
+ move: {
1203
+ name: "pointermove"
1204
+ },
1205
+ end: {
1206
+ name: "pointerup"
1207
+ }
1208
+ };
1209
+ class fn extends pt {
1210
+ constructor(t) {
1211
+ const {
1212
+ event: n
1213
+ } = t, r = we(n.target);
1214
+ super(t, hr, r);
1215
+ }
1216
+ }
1217
+ fn.activators = [{
1218
+ eventName: "onPointerDown",
1219
+ handler: (e, t) => {
1220
+ let {
1221
+ nativeEvent: n
1222
+ } = e, {
1223
+ onActivation: r
1224
+ } = t;
1225
+ return !n.isPrimary || n.button !== 0 ? !1 : (r?.({
1226
+ event: n
1227
+ }), !0);
1228
+ }
1229
+ }];
1230
+ const gr = {
1231
+ move: {
1232
+ name: "mousemove"
1233
+ },
1234
+ end: {
1235
+ name: "mouseup"
1236
+ }
1237
+ };
1238
+ var ct;
1239
+ (function(e) {
1240
+ e[e.RightClick = 2] = "RightClick";
1241
+ })(ct || (ct = {}));
1242
+ class vr extends pt {
1243
+ constructor(t) {
1244
+ super(t, gr, we(t.event.target));
1245
+ }
1246
+ }
1247
+ vr.activators = [{
1248
+ eventName: "onMouseDown",
1249
+ handler: (e, t) => {
1250
+ let {
1251
+ nativeEvent: n
1252
+ } = e, {
1253
+ onActivation: r
1254
+ } = t;
1255
+ return n.button === ct.RightClick ? !1 : (r?.({
1256
+ event: n
1257
+ }), !0);
1258
+ }
1259
+ }];
1260
+ const at = {
1261
+ cancel: {
1262
+ name: "touchcancel"
1263
+ },
1264
+ move: {
1265
+ name: "touchmove"
1266
+ },
1267
+ end: {
1268
+ name: "touchend"
1269
+ }
1270
+ };
1271
+ class pr extends pt {
1272
+ constructor(t) {
1273
+ super(t, at);
1274
+ }
1275
+ static setup() {
1276
+ return window.addEventListener(at.move.name, t, {
1277
+ capture: !1,
1278
+ passive: !1
1279
+ }), function() {
1280
+ window.removeEventListener(at.move.name, t);
1281
+ };
1282
+ function t() {
1283
+ }
1284
+ }
1285
+ }
1286
+ pr.activators = [{
1287
+ eventName: "onTouchStart",
1288
+ handler: (e, t) => {
1289
+ let {
1290
+ nativeEvent: n
1291
+ } = e, {
1292
+ onActivation: r
1293
+ } = t;
1294
+ const {
1295
+ touches: o
1296
+ } = n;
1297
+ return o.length > 1 ? !1 : (r?.({
1298
+ event: n
1299
+ }), !0);
1300
+ }
1301
+ }];
1302
+ var Ee;
1303
+ (function(e) {
1304
+ e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
1305
+ })(Ee || (Ee = {}));
1306
+ var Ve;
1307
+ (function(e) {
1308
+ e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
1309
+ })(Ve || (Ve = {}));
1310
+ function br(e) {
1311
+ let {
1312
+ acceleration: t,
1313
+ activator: n = Ee.Pointer,
1314
+ canScroll: r,
1315
+ draggingRect: o,
1316
+ enabled: i,
1317
+ interval: a = 5,
1318
+ order: s = Ve.TreeOrder,
1319
+ pointerCoordinates: l,
1320
+ scrollableAncestors: c,
1321
+ scrollableAncestorRects: d,
1322
+ delta: u,
1323
+ threshold: h
1324
+ } = e;
1325
+ const f = mr({
1326
+ delta: u,
1327
+ disabled: !i
1328
+ }), [D, g] = Ln(), v = E({
1329
+ x: 0,
1330
+ y: 0
1331
+ }), y = E({
1332
+ x: 0,
1333
+ y: 0
1334
+ }), w = R(() => {
1335
+ switch (n) {
1336
+ case Ee.Pointer:
1337
+ return l ? {
1338
+ top: l.y,
1339
+ bottom: l.y,
1340
+ left: l.x,
1341
+ right: l.x
1342
+ } : null;
1343
+ case Ee.DraggableRect:
1344
+ return o;
1345
+ }
1346
+ }, [n, o, l]), m = E(null), L = B(() => {
1347
+ const S = m.current;
1348
+ if (!S)
1349
+ return;
1350
+ const p = v.current.x * y.current.x, b = v.current.y * y.current.y;
1351
+ S.scrollBy(p, b);
1352
+ }, []), C = R(() => s === Ve.TreeOrder ? [...c].reverse() : c, [s, c]);
1353
+ A(
1354
+ () => {
1355
+ if (!i || !c.length || !w) {
1356
+ g();
1357
+ return;
1358
+ }
1359
+ for (const S of C) {
1360
+ if (r?.(S) === !1)
1361
+ continue;
1362
+ const p = c.indexOf(S), b = d[p];
1363
+ if (!b)
1364
+ continue;
1365
+ const {
1366
+ direction: O,
1367
+ speed: P
1368
+ } = ir(S, b, w, t, h);
1369
+ for (const T of ["x", "y"])
1370
+ f[T][O[T]] || (P[T] = 0, O[T] = 0);
1371
+ if (P.x > 0 || P.y > 0) {
1372
+ g(), m.current = S, D(L, a), v.current = P, y.current = O;
1373
+ return;
1374
+ }
1375
+ }
1376
+ v.current = {
1377
+ x: 0,
1378
+ y: 0
1379
+ }, y.current = {
1380
+ x: 0,
1381
+ y: 0
1382
+ }, g();
1383
+ },
1384
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1385
+ [
1386
+ t,
1387
+ L,
1388
+ r,
1389
+ g,
1390
+ i,
1391
+ a,
1392
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1393
+ JSON.stringify(w),
1394
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1395
+ JSON.stringify(f),
1396
+ D,
1397
+ c,
1398
+ C,
1399
+ d,
1400
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1401
+ JSON.stringify(h)
1402
+ ]
1403
+ );
1404
+ }
1405
+ const yr = {
1406
+ x: {
1407
+ [I.Backward]: !1,
1408
+ [I.Forward]: !1
1409
+ },
1410
+ y: {
1411
+ [I.Backward]: !1,
1412
+ [I.Forward]: !1
1413
+ }
1414
+ };
1415
+ function mr(e) {
1416
+ let {
1417
+ delta: t,
1418
+ disabled: n
1419
+ } = e;
1420
+ const r = Ke(t);
1421
+ return Ie((o) => {
1422
+ if (n || !r || !o)
1423
+ return yr;
1424
+ const i = {
1425
+ x: Math.sign(t.x - r.x),
1426
+ y: Math.sign(t.y - r.y)
1427
+ };
1428
+ return {
1429
+ x: {
1430
+ [I.Backward]: o.x[I.Backward] || i.x === -1,
1431
+ [I.Forward]: o.x[I.Forward] || i.x === 1
1432
+ },
1433
+ y: {
1434
+ [I.Backward]: o.y[I.Backward] || i.y === -1,
1435
+ [I.Forward]: o.y[I.Forward] || i.y === 1
1436
+ }
1437
+ };
1438
+ }, [n, t, r]);
1439
+ }
1440
+ function wr(e, t) {
1441
+ const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
1442
+ return Ie((o) => {
1443
+ var i;
1444
+ return t == null ? null : (i = r ?? o) != null ? i : null;
1445
+ }, [r, t]);
1446
+ }
1447
+ function Dr(e, t) {
1448
+ return R(() => e.reduce((n, r) => {
1449
+ const {
1450
+ sensor: o
1451
+ } = r, i = o.activators.map((a) => ({
1452
+ eventName: a.eventName,
1453
+ handler: t(a.handler, r)
1454
+ }));
1455
+ return [...n, ...i];
1456
+ }, []), [e, t]);
1457
+ }
1458
+ var Te;
1459
+ (function(e) {
1460
+ e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
1461
+ })(Te || (Te = {}));
1462
+ var ut;
1463
+ (function(e) {
1464
+ e.Optimized = "optimized";
1465
+ })(ut || (ut = {}));
1466
+ const $t = /* @__PURE__ */ new Map();
1467
+ function xr(e, t) {
1468
+ let {
1469
+ dragging: n,
1470
+ dependencies: r,
1471
+ config: o
1472
+ } = t;
1473
+ const [i, a] = j(null), {
1474
+ frequency: s,
1475
+ measure: l,
1476
+ strategy: c
1477
+ } = o, d = E(e), u = v(), h = Oe(u), f = B(function(y) {
1478
+ y === void 0 && (y = []), !h.current && a((w) => w === null ? y : w.concat(y.filter((m) => !w.includes(m))));
1479
+ }, [h]), D = E(null), g = Ie((y) => {
1480
+ if (u && !n)
1481
+ return $t;
1482
+ if (!y || y === $t || d.current !== e || i != null) {
1483
+ const w = /* @__PURE__ */ new Map();
1484
+ for (let m of e) {
1485
+ if (!m)
1486
+ continue;
1487
+ if (i && i.length > 0 && !i.includes(m.id) && m.rect.current) {
1488
+ w.set(m.id, m.rect.current);
1489
+ continue;
1490
+ }
1491
+ const L = m.node.current, C = L ? new vt(l(L), L) : null;
1492
+ m.rect.current = C, C && w.set(m.id, C);
1493
+ }
1494
+ return w;
1495
+ }
1496
+ return y;
1497
+ }, [e, i, n, u, l]);
1498
+ return A(() => {
1499
+ d.current = e;
1500
+ }, [e]), A(
1501
+ () => {
1502
+ u || f();
1503
+ },
1504
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1505
+ [n, u]
1506
+ ), A(
1507
+ () => {
1508
+ i && i.length > 0 && a(null);
1509
+ },
1510
+ //eslint-disable-next-line react-hooks/exhaustive-deps
1511
+ [JSON.stringify(i)]
1512
+ ), A(
1513
+ () => {
1514
+ u || typeof s != "number" || D.current !== null || (D.current = setTimeout(() => {
1515
+ f(), D.current = null;
1516
+ }, s));
1517
+ },
1518
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1519
+ [s, u, f, ...r]
1520
+ ), {
1521
+ droppableRects: g,
1522
+ measureDroppableContainers: f,
1523
+ measuringScheduled: i != null
1524
+ };
1525
+ function v() {
1526
+ switch (c) {
1527
+ case Te.Always:
1528
+ return !1;
1529
+ case Te.BeforeDragging:
1530
+ return n;
1531
+ default:
1532
+ return !n;
1533
+ }
1534
+ }
1535
+ }
1536
+ function bt(e, t) {
1537
+ return Ie((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
1538
+ }
1539
+ function Cr(e, t) {
1540
+ return bt(e, t);
1541
+ }
1542
+ function Sr(e) {
1543
+ let {
1544
+ callback: t,
1545
+ disabled: n
1546
+ } = e;
1547
+ const r = Je(t), o = R(() => {
1548
+ if (n || typeof window > "u" || typeof window.MutationObserver > "u")
1549
+ return;
1550
+ const {
1551
+ MutationObserver: i
1552
+ } = window;
1553
+ return new i(r);
1554
+ }, [r, n]);
1555
+ return A(() => () => o?.disconnect(), [o]), o;
1556
+ }
1557
+ function Qe(e) {
1558
+ let {
1559
+ callback: t,
1560
+ disabled: n
1561
+ } = e;
1562
+ const r = Je(t), o = R(
1563
+ () => {
1564
+ if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
1565
+ return;
1566
+ const {
1567
+ ResizeObserver: i
1568
+ } = window;
1569
+ return new i(r);
1570
+ },
1571
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1572
+ [n]
1573
+ );
1574
+ return A(() => () => o?.disconnect(), [o]), o;
1575
+ }
1576
+ function Rr(e) {
1577
+ return new vt(Pe(e), e);
1578
+ }
1579
+ function Kt(e, t, n) {
1580
+ t === void 0 && (t = Rr);
1581
+ const [r, o] = j(null);
1582
+ function i() {
1583
+ o((l) => {
1584
+ if (!e)
1585
+ return null;
1586
+ if (e.isConnected === !1) {
1587
+ var c;
1588
+ return (c = l ?? n) != null ? c : null;
1589
+ }
1590
+ const d = t(e);
1591
+ return JSON.stringify(l) === JSON.stringify(d) ? l : d;
1592
+ });
1593
+ }
1594
+ const a = Sr({
1595
+ callback(l) {
1596
+ if (e)
1597
+ for (const c of l) {
1598
+ const {
1599
+ type: d,
1600
+ target: u
1601
+ } = c;
1602
+ if (d === "childList" && u instanceof HTMLElement && u.contains(e)) {
1603
+ i();
1604
+ break;
1605
+ }
1606
+ }
1607
+ }
1608
+ }), s = Qe({
1609
+ callback: i
1610
+ });
1611
+ return ee(() => {
1612
+ i(), e ? (s?.observe(e), a?.observe(document.body, {
1613
+ childList: !0,
1614
+ subtree: !0
1615
+ })) : (s?.disconnect(), a?.disconnect());
1616
+ }, [e]), r;
1617
+ }
1618
+ function Er(e) {
1619
+ const t = bt(e);
1620
+ return en(e, t);
1621
+ }
1622
+ const Wt = [];
1623
+ function Ar(e) {
1624
+ const t = E(e), n = Ie((r) => e ? r && r !== Wt && e && t.current && e.parentNode === t.current.parentNode ? r : gt(e) : Wt, [e]);
1625
+ return A(() => {
1626
+ t.current = e;
1627
+ }, [e]), n;
1628
+ }
1629
+ function Or(e) {
1630
+ const [t, n] = j(null), r = E(e), o = B((i) => {
1631
+ const a = it(i.target);
1632
+ a && n((s) => s ? (s.set(a, lt(a)), new Map(s)) : null);
1633
+ }, []);
1634
+ return A(() => {
1635
+ const i = r.current;
1636
+ if (e !== i) {
1637
+ a(i);
1638
+ const s = e.map((l) => {
1639
+ const c = it(l);
1640
+ return c ? (c.addEventListener("scroll", o, {
1641
+ passive: !0
1642
+ }), [c, lt(c)]) : null;
1643
+ }).filter((l) => l != null);
1644
+ n(s.length ? new Map(s) : null), r.current = e;
1645
+ }
1646
+ return () => {
1647
+ a(e), a(i);
1648
+ };
1649
+ function a(s) {
1650
+ s.forEach((l) => {
1651
+ const c = it(l);
1652
+ c?.removeEventListener("scroll", o);
1653
+ });
1654
+ }
1655
+ }, [o, e]), R(() => e.length ? t ? Array.from(t.values()).reduce((i, a) => ye(i, a), V) : ln(e) : V, [e, t]);
1656
+ }
1657
+ function Ut(e, t) {
1658
+ t === void 0 && (t = []);
1659
+ const n = E(null);
1660
+ return A(
1661
+ () => {
1662
+ n.current = null;
1663
+ },
1664
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1665
+ t
1666
+ ), A(() => {
1667
+ const r = e !== V;
1668
+ r && !n.current && (n.current = e), !r && n.current && (n.current = null);
1669
+ }, [e]), n.current ? We(e, n.current) : V;
1670
+ }
1671
+ function Nr(e) {
1672
+ A(
1673
+ () => {
1674
+ if (!qe)
1675
+ return;
1676
+ const t = e.map((n) => {
1677
+ let {
1678
+ sensor: r
1679
+ } = n;
1680
+ return r.setup == null ? void 0 : r.setup();
1681
+ });
1682
+ return () => {
1683
+ for (const n of t)
1684
+ n?.();
1685
+ };
1686
+ },
1687
+ // TO-DO: Sensors length could theoretically change which would not be a valid dependency
1688
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1689
+ e.map((t) => {
1690
+ let {
1691
+ sensor: n
1692
+ } = t;
1693
+ return n;
1694
+ })
1695
+ );
1696
+ }
1697
+ function Tr(e, t) {
1698
+ return R(() => e.reduce((n, r) => {
1699
+ let {
1700
+ eventName: o,
1701
+ handler: i
1702
+ } = r;
1703
+ return n[o] = (a) => {
1704
+ i(a, t);
1705
+ }, n;
1706
+ }, {}), [e, t]);
1707
+ }
1708
+ function hn(e) {
1709
+ return R(() => e ? tr(e) : null, [e]);
1710
+ }
1711
+ const Ht = [];
1712
+ function Mr(e, t) {
1713
+ t === void 0 && (t = Pe);
1714
+ const [n] = e, r = hn(n ? F(n) : null), [o, i] = j(Ht);
1715
+ function a() {
1716
+ i(() => e.length ? e.map((l) => sn(l) ? r : new vt(t(l), l)) : Ht);
1717
+ }
1718
+ const s = Qe({
1719
+ callback: a
1720
+ });
1721
+ return ee(() => {
1722
+ s?.disconnect(), a(), e.forEach((l) => s?.observe(l));
1723
+ }, [e]), o;
1724
+ }
1725
+ function gn(e) {
1726
+ if (!e)
1727
+ return null;
1728
+ if (e.children.length > 1)
1729
+ return e;
1730
+ const t = e.children[0];
1731
+ return Le(t) ? t : e;
1732
+ }
1733
+ function Lr(e) {
1734
+ let {
1735
+ measure: t
1736
+ } = e;
1737
+ const [n, r] = j(null), o = B((c) => {
1738
+ for (const {
1739
+ target: d
1740
+ } of c)
1741
+ if (Le(d)) {
1742
+ r((u) => {
1743
+ const h = t(d);
1744
+ return u ? {
1745
+ ...u,
1746
+ width: h.width,
1747
+ height: h.height
1748
+ } : h;
1749
+ });
1750
+ break;
1751
+ }
1752
+ }, [t]), i = Qe({
1753
+ callback: o
1754
+ }), a = B((c) => {
1755
+ const d = gn(c);
1756
+ i?.disconnect(), d && i?.observe(d), r(d ? t(d) : null);
1757
+ }, [t, i]), [s, l] = $e(a);
1758
+ return R(() => ({
1759
+ nodeRef: s,
1760
+ rect: n,
1761
+ setRef: l
1762
+ }), [n, s, l]);
1763
+ }
1764
+ const Ir = [{
1765
+ sensor: fn,
1766
+ options: {}
1767
+ }, {
1768
+ sensor: dn,
1769
+ options: {}
1770
+ }], Pr = {
1771
+ current: {}
1772
+ }, Ye = {
1773
+ draggable: {
1774
+ measure: Ft
1775
+ },
1776
+ droppable: {
1777
+ measure: Ft,
1778
+ strategy: Te.WhileDragging,
1779
+ frequency: ut.Optimized
1780
+ },
1781
+ dragOverlay: {
1782
+ measure: Pe
1783
+ }
1784
+ };
1785
+ class Ae extends Map {
1786
+ get(t) {
1787
+ var n;
1788
+ return t != null && (n = super.get(t)) != null ? n : void 0;
1789
+ }
1790
+ toArray() {
1791
+ return Array.from(this.values());
1792
+ }
1793
+ getEnabled() {
1794
+ return this.toArray().filter((t) => {
1795
+ let {
1796
+ disabled: n
1797
+ } = t;
1798
+ return !n;
1799
+ });
1800
+ }
1801
+ getNodeFor(t) {
1802
+ var n, r;
1803
+ return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
1804
+ }
1805
+ }
1806
+ const kr = {
1807
+ activatorEvent: null,
1808
+ active: null,
1809
+ activeNode: null,
1810
+ activeNodeRect: null,
1811
+ collisions: null,
1812
+ containerNodeRect: null,
1813
+ draggableNodes: /* @__PURE__ */ new Map(),
1814
+ droppableRects: /* @__PURE__ */ new Map(),
1815
+ droppableContainers: /* @__PURE__ */ new Ae(),
1816
+ over: null,
1817
+ dragOverlay: {
1818
+ nodeRef: {
1819
+ current: null
1820
+ },
1821
+ rect: null,
1822
+ setRef: He
1823
+ },
1824
+ scrollableAncestors: [],
1825
+ scrollableAncestorRects: [],
1826
+ measuringConfiguration: Ye,
1827
+ measureDroppableContainers: He,
1828
+ windowRect: null,
1829
+ measuringScheduled: !1
1830
+ }, vn = {
1831
+ activatorEvent: null,
1832
+ activators: [],
1833
+ active: null,
1834
+ activeNodeRect: null,
1835
+ ariaDescribedById: {
1836
+ draggable: ""
1837
+ },
1838
+ dispatch: He,
1839
+ draggableNodes: /* @__PURE__ */ new Map(),
1840
+ over: null,
1841
+ measureDroppableContainers: He
1842
+ }, ke = /* @__PURE__ */ Me(vn), pn = /* @__PURE__ */ Me(kr);
1843
+ function zr() {
1844
+ return {
1845
+ draggable: {
1846
+ active: null,
1847
+ initialCoordinates: {
1848
+ x: 0,
1849
+ y: 0
1850
+ },
1851
+ nodes: /* @__PURE__ */ new Map(),
1852
+ translate: {
1853
+ x: 0,
1854
+ y: 0
1855
+ }
1856
+ },
1857
+ droppable: {
1858
+ containers: new Ae()
1859
+ }
1860
+ };
1861
+ }
1862
+ function Br(e, t) {
1863
+ switch (t.type) {
1864
+ case M.DragStart:
1865
+ return {
1866
+ ...e,
1867
+ draggable: {
1868
+ ...e.draggable,
1869
+ initialCoordinates: t.initialCoordinates,
1870
+ active: t.active
1871
+ }
1872
+ };
1873
+ case M.DragMove:
1874
+ return e.draggable.active == null ? e : {
1875
+ ...e,
1876
+ draggable: {
1877
+ ...e.draggable,
1878
+ translate: {
1879
+ x: t.coordinates.x - e.draggable.initialCoordinates.x,
1880
+ y: t.coordinates.y - e.draggable.initialCoordinates.y
1881
+ }
1882
+ }
1883
+ };
1884
+ case M.DragEnd:
1885
+ case M.DragCancel:
1886
+ return {
1887
+ ...e,
1888
+ draggable: {
1889
+ ...e.draggable,
1890
+ active: null,
1891
+ initialCoordinates: {
1892
+ x: 0,
1893
+ y: 0
1894
+ },
1895
+ translate: {
1896
+ x: 0,
1897
+ y: 0
1898
+ }
1899
+ }
1900
+ };
1901
+ case M.RegisterDroppable: {
1902
+ const {
1903
+ element: n
1904
+ } = t, {
1905
+ id: r
1906
+ } = n, o = new Ae(e.droppable.containers);
1907
+ return o.set(r, n), {
1908
+ ...e,
1909
+ droppable: {
1910
+ ...e.droppable,
1911
+ containers: o
1912
+ }
1913
+ };
1914
+ }
1915
+ case M.SetDroppableDisabled: {
1916
+ const {
1917
+ id: n,
1918
+ key: r,
1919
+ disabled: o
1920
+ } = t, i = e.droppable.containers.get(n);
1921
+ if (!i || r !== i.key)
1922
+ return e;
1923
+ const a = new Ae(e.droppable.containers);
1924
+ return a.set(n, {
1925
+ ...i,
1926
+ disabled: o
1927
+ }), {
1928
+ ...e,
1929
+ droppable: {
1930
+ ...e.droppable,
1931
+ containers: a
1932
+ }
1933
+ };
1934
+ }
1935
+ case M.UnregisterDroppable: {
1936
+ const {
1937
+ id: n,
1938
+ key: r
1939
+ } = t, o = e.droppable.containers.get(n);
1940
+ if (!o || r !== o.key)
1941
+ return e;
1942
+ const i = new Ae(e.droppable.containers);
1943
+ return i.delete(n), {
1944
+ ...e,
1945
+ droppable: {
1946
+ ...e.droppable,
1947
+ containers: i
1948
+ }
1949
+ };
1950
+ }
1951
+ default:
1952
+ return e;
1953
+ }
1954
+ }
1955
+ function Fr(e) {
1956
+ let {
1957
+ disabled: t
1958
+ } = e;
1959
+ const {
1960
+ active: n,
1961
+ activatorEvent: r,
1962
+ draggableNodes: o
1963
+ } = fe(ke), i = Ke(r), a = Ke(n?.id);
1964
+ return A(() => {
1965
+ if (!t && !r && i && a != null) {
1966
+ if (!ht(i) || document.activeElement === i.target)
1967
+ return;
1968
+ const s = o.get(a);
1969
+ if (!s)
1970
+ return;
1971
+ const {
1972
+ activatorNode: l,
1973
+ node: c
1974
+ } = s;
1975
+ if (!l.current && !c.current)
1976
+ return;
1977
+ requestAnimationFrame(() => {
1978
+ for (const d of [l.current, c.current]) {
1979
+ if (!d)
1980
+ continue;
1981
+ const u = kn(d);
1982
+ if (u) {
1983
+ u.focus();
1984
+ break;
1985
+ }
1986
+ }
1987
+ });
1988
+ }
1989
+ }, [r, t, o, a, i]), null;
1990
+ }
1991
+ function bn(e, t) {
1992
+ let {
1993
+ transform: n,
1994
+ ...r
1995
+ } = t;
1996
+ return e != null && e.length ? e.reduce((o, i) => i({
1997
+ transform: o,
1998
+ ...r
1999
+ }), n) : n;
2000
+ }
2001
+ function jr(e) {
2002
+ return R(
2003
+ () => ({
2004
+ draggable: {
2005
+ ...Ye.draggable,
2006
+ ...e?.draggable
2007
+ },
2008
+ droppable: {
2009
+ ...Ye.droppable,
2010
+ ...e?.droppable
2011
+ },
2012
+ dragOverlay: {
2013
+ ...Ye.dragOverlay,
2014
+ ...e?.dragOverlay
2015
+ }
2016
+ }),
2017
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2018
+ [e?.draggable, e?.droppable, e?.dragOverlay]
2019
+ );
2020
+ }
2021
+ function Xr(e) {
2022
+ let {
2023
+ activeNode: t,
2024
+ measure: n,
2025
+ initialRect: r,
2026
+ config: o = !0
2027
+ } = e;
2028
+ const i = E(!1), {
2029
+ x: a,
2030
+ y: s
2031
+ } = typeof o == "boolean" ? {
2032
+ x: o,
2033
+ y: o
2034
+ } : o;
2035
+ ee(() => {
2036
+ if (!a && !s || !t) {
2037
+ i.current = !1;
2038
+ return;
2039
+ }
2040
+ if (i.current || !r)
2041
+ return;
2042
+ const c = t?.node.current;
2043
+ if (!c || c.isConnected === !1)
2044
+ return;
2045
+ const d = n(c), u = en(d, r);
2046
+ if (a || (u.x = 0), s || (u.y = 0), i.current = !0, Math.abs(u.x) > 0 || Math.abs(u.y) > 0) {
2047
+ const h = nn(c);
2048
+ h && h.scrollBy({
2049
+ top: u.y,
2050
+ left: u.x
2051
+ });
2052
+ }
2053
+ }, [t, a, s, r, n]);
2054
+ }
2055
+ const Ze = /* @__PURE__ */ Me({
2056
+ ...V,
2057
+ scaleX: 1,
2058
+ scaleY: 1
2059
+ });
2060
+ var ae;
2061
+ (function(e) {
2062
+ e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
2063
+ })(ae || (ae = {}));
2064
+ const fo = /* @__PURE__ */ An(function(t) {
2065
+ var n, r, o, i;
2066
+ let {
2067
+ id: a,
2068
+ accessibility: s,
2069
+ autoScroll: l = !0,
2070
+ children: c,
2071
+ sensors: d = Ir,
2072
+ collisionDetection: u = Jn,
2073
+ measuring: h,
2074
+ modifiers: f,
2075
+ ...D
2076
+ } = t;
2077
+ const g = On(Br, void 0, zr), [v, y] = g, [w, m] = Yn(), [L, C] = j(ae.Uninitialized), S = L === ae.Initialized, {
2078
+ draggable: {
2079
+ active: p,
2080
+ nodes: b,
2081
+ translate: O
2082
+ },
2083
+ droppable: {
2084
+ containers: P
2085
+ }
2086
+ } = v, T = p != null ? b.get(p) : null, G = E({
2087
+ initial: null,
2088
+ translated: null
2089
+ }), Q = R(() => {
2090
+ var z;
2091
+ return p != null ? {
2092
+ id: p,
2093
+ // It's possible for the active node to unmount while dragging
2094
+ data: (z = T?.data) != null ? z : Pr,
2095
+ rect: G
2096
+ } : null;
2097
+ }, [p, T]), te = E(null), [yt, mt] = j(null), [Z, wt] = j(null), le = Oe(D, Object.values(D)), _e = Ge("DndDescribedBy", a), Dt = R(() => P.getEnabled(), [P]), ce = jr(h), {
2098
+ droppableRects: he,
2099
+ measureDroppableContainers: ze,
2100
+ measuringScheduled: xt
2101
+ } = xr(Dt, {
2102
+ dragging: S,
2103
+ dependencies: [O.x, O.y],
2104
+ config: ce.droppable
2105
+ }), U = wr(b, p), Ct = R(() => Z ? Ue(Z) : null, [Z]), St = Rn(), Rt = Cr(U, ce.draggable.measure);
2106
+ Xr({
2107
+ activeNode: p != null ? b.get(p) : null,
2108
+ config: St.layoutShiftCompensation,
2109
+ initialRect: Rt,
2110
+ measure: ce.draggable.measure
2111
+ });
2112
+ const H = Kt(U, ce.draggable.measure, Rt), et = Kt(U ? U.parentElement : null), ue = E({
2113
+ activatorEvent: null,
2114
+ active: null,
2115
+ activeNode: U,
2116
+ collisionRect: null,
2117
+ collisions: null,
2118
+ droppableRects: he,
2119
+ draggableNodes: b,
2120
+ draggingNode: null,
2121
+ draggingNodeRect: null,
2122
+ droppableContainers: P,
2123
+ over: null,
2124
+ scrollableAncestors: [],
2125
+ scrollAdjustedTranslate: null
2126
+ }), Et = P.getNodeFor((n = ue.current.over) == null ? void 0 : n.id), de = Lr({
2127
+ measure: ce.dragOverlay.measure
2128
+ }), Be = (r = de.nodeRef.current) != null ? r : U, ge = S ? (o = de.rect) != null ? o : H : null, At = !!(de.nodeRef.current && de.rect), Ot = Er(At ? null : H), tt = hn(Be ? F(Be) : null), ne = Ar(S ? Et ?? U : null), Fe = Mr(ne), je = bn(f, {
2129
+ transform: {
2130
+ x: O.x - Ot.x,
2131
+ y: O.y - Ot.y,
2132
+ scaleX: 1,
2133
+ scaleY: 1
2134
+ },
2135
+ activatorEvent: Z,
2136
+ active: Q,
2137
+ activeNodeRect: H,
2138
+ containerNodeRect: et,
2139
+ draggingNodeRect: ge,
2140
+ over: ue.current.over,
2141
+ overlayNodeRect: de.rect,
2142
+ scrollableAncestors: ne,
2143
+ scrollableAncestorRects: Fe,
2144
+ windowRect: tt
2145
+ }), Nt = Ct ? ye(Ct, O) : null, Tt = Or(ne), yn = Ut(Tt), mn = Ut(Tt, [H]), ve = ye(je, yn), pe = ge ? Zn(ge, je) : null, De = Q && pe ? u({
2146
+ active: Q,
2147
+ collisionRect: pe,
2148
+ droppableRects: he,
2149
+ droppableContainers: Dt,
2150
+ pointerCoordinates: Nt
2151
+ }) : null, Mt = Vn(De, "id"), [re, Lt] = j(null), wn = At ? je : ye(je, mn), Dn = Gn(wn, (i = re?.rect) != null ? i : null, H), nt = E(null), It = B(
2152
+ (z, X) => {
2153
+ let {
2154
+ sensor: Y,
2155
+ options: oe
2156
+ } = X;
2157
+ if (te.current == null)
2158
+ return;
2159
+ const K = b.get(te.current);
2160
+ if (!K)
2161
+ return;
2162
+ const $ = z.nativeEvent, q = new Y({
2163
+ active: te.current,
2164
+ activeNode: K,
2165
+ event: $,
2166
+ options: oe,
2167
+ // Sensors need to be instantiated with refs for arguments that change over time
2168
+ // otherwise they are frozen in time with the stale arguments
2169
+ context: ue,
2170
+ onAbort(k) {
2171
+ if (!b.get(k))
2172
+ return;
2173
+ const {
2174
+ onDragAbort: J
2175
+ } = le.current, _ = {
2176
+ id: k
2177
+ };
2178
+ J?.(_), w({
2179
+ type: "onDragAbort",
2180
+ event: _
2181
+ });
2182
+ },
2183
+ onPending(k, ie, J, _) {
2184
+ if (!b.get(k))
2185
+ return;
2186
+ const {
2187
+ onDragPending: Ce
2188
+ } = le.current, se = {
2189
+ id: k,
2190
+ constraint: ie,
2191
+ initialCoordinates: J,
2192
+ offset: _
2193
+ };
2194
+ Ce?.(se), w({
2195
+ type: "onDragPending",
2196
+ event: se
2197
+ });
2198
+ },
2199
+ onStart(k) {
2200
+ const ie = te.current;
2201
+ if (ie == null)
2202
+ return;
2203
+ const J = b.get(ie);
2204
+ if (!J)
2205
+ return;
2206
+ const {
2207
+ onDragStart: _
2208
+ } = le.current, xe = {
2209
+ activatorEvent: $,
2210
+ active: {
2211
+ id: ie,
2212
+ data: J.data,
2213
+ rect: G
2214
+ }
2215
+ };
2216
+ Xe(() => {
2217
+ _?.(xe), C(ae.Initializing), y({
2218
+ type: M.DragStart,
2219
+ initialCoordinates: k,
2220
+ active: ie
2221
+ }), w({
2222
+ type: "onDragStart",
2223
+ event: xe
2224
+ }), mt(nt.current), wt($);
2225
+ });
2226
+ },
2227
+ onMove(k) {
2228
+ y({
2229
+ type: M.DragMove,
2230
+ coordinates: k
2231
+ });
2232
+ },
2233
+ onEnd: be(M.DragEnd),
2234
+ onCancel: be(M.DragCancel)
2235
+ });
2236
+ nt.current = q;
2237
+ function be(k) {
2238
+ return async function() {
2239
+ const {
2240
+ active: J,
2241
+ collisions: _,
2242
+ over: xe,
2243
+ scrollAdjustedTranslate: Ce
2244
+ } = ue.current;
2245
+ let se = null;
2246
+ if (J && Ce) {
2247
+ const {
2248
+ cancelDrop: Se
2249
+ } = le.current;
2250
+ se = {
2251
+ activatorEvent: $,
2252
+ active: J,
2253
+ collisions: _,
2254
+ delta: Ce,
2255
+ over: xe
2256
+ }, k === M.DragEnd && typeof Se == "function" && await Promise.resolve(Se(se)) && (k = M.DragCancel);
2257
+ }
2258
+ te.current = null, Xe(() => {
2259
+ y({
2260
+ type: k
2261
+ }), C(ae.Uninitialized), Lt(null), mt(null), wt(null), nt.current = null;
2262
+ const Se = k === M.DragEnd ? "onDragEnd" : "onDragCancel";
2263
+ if (se) {
2264
+ const rt = le.current[Se];
2265
+ rt?.(se), w({
2266
+ type: Se,
2267
+ event: se
2268
+ });
2269
+ }
2270
+ });
2271
+ };
2272
+ }
2273
+ },
2274
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2275
+ [b]
2276
+ ), xn = B((z, X) => (Y, oe) => {
2277
+ const K = Y.nativeEvent, $ = b.get(oe);
2278
+ if (
2279
+ // Another sensor is already instantiating
2280
+ te.current !== null || // No active draggable
2281
+ !$ || // Event has already been captured
2282
+ K.dndKit || K.defaultPrevented
2283
+ )
2284
+ return;
2285
+ const q = {
2286
+ active: $
2287
+ };
2288
+ z(Y, X.options, q) === !0 && (K.dndKit = {
2289
+ capturedBy: X.sensor
2290
+ }, te.current = oe, It(Y, X));
2291
+ }, [b, It]), Pt = Dr(d, xn);
2292
+ Nr(d), ee(() => {
2293
+ H && L === ae.Initializing && C(ae.Initialized);
2294
+ }, [H, L]), A(
2295
+ () => {
2296
+ const {
2297
+ onDragMove: z
2298
+ } = le.current, {
2299
+ active: X,
2300
+ activatorEvent: Y,
2301
+ collisions: oe,
2302
+ over: K
2303
+ } = ue.current;
2304
+ if (!X || !Y)
2305
+ return;
2306
+ const $ = {
2307
+ active: X,
2308
+ activatorEvent: Y,
2309
+ collisions: oe,
2310
+ delta: {
2311
+ x: ve.x,
2312
+ y: ve.y
2313
+ },
2314
+ over: K
2315
+ };
2316
+ Xe(() => {
2317
+ z?.($), w({
2318
+ type: "onDragMove",
2319
+ event: $
2320
+ });
2321
+ });
2322
+ },
2323
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2324
+ [ve.x, ve.y]
2325
+ ), A(
2326
+ () => {
2327
+ const {
2328
+ active: z,
2329
+ activatorEvent: X,
2330
+ collisions: Y,
2331
+ droppableContainers: oe,
2332
+ scrollAdjustedTranslate: K
2333
+ } = ue.current;
2334
+ if (!z || te.current == null || !X || !K)
2335
+ return;
2336
+ const {
2337
+ onDragOver: $
2338
+ } = le.current, q = oe.get(Mt), be = q && q.rect.current ? {
2339
+ id: q.id,
2340
+ rect: q.rect.current,
2341
+ data: q.data,
2342
+ disabled: q.disabled
2343
+ } : null, k = {
2344
+ active: z,
2345
+ activatorEvent: X,
2346
+ collisions: Y,
2347
+ delta: {
2348
+ x: K.x,
2349
+ y: K.y
2350
+ },
2351
+ over: be
2352
+ };
2353
+ Xe(() => {
2354
+ Lt(be), $?.(k), w({
2355
+ type: "onDragOver",
2356
+ event: k
2357
+ });
2358
+ });
2359
+ },
2360
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2361
+ [Mt]
2362
+ ), ee(() => {
2363
+ ue.current = {
2364
+ activatorEvent: Z,
2365
+ active: Q,
2366
+ activeNode: U,
2367
+ collisionRect: pe,
2368
+ collisions: De,
2369
+ droppableRects: he,
2370
+ draggableNodes: b,
2371
+ draggingNode: Be,
2372
+ draggingNodeRect: ge,
2373
+ droppableContainers: P,
2374
+ over: re,
2375
+ scrollableAncestors: ne,
2376
+ scrollAdjustedTranslate: ve
2377
+ }, G.current = {
2378
+ initial: ge,
2379
+ translated: pe
2380
+ };
2381
+ }, [Q, U, De, pe, b, Be, ge, he, P, re, ne, ve]), br({
2382
+ ...St,
2383
+ delta: O,
2384
+ draggingRect: pe,
2385
+ pointerCoordinates: Nt,
2386
+ scrollableAncestors: ne,
2387
+ scrollableAncestorRects: Fe
2388
+ });
2389
+ const Cn = R(() => ({
2390
+ active: Q,
2391
+ activeNode: U,
2392
+ activeNodeRect: H,
2393
+ activatorEvent: Z,
2394
+ collisions: De,
2395
+ containerNodeRect: et,
2396
+ dragOverlay: de,
2397
+ draggableNodes: b,
2398
+ droppableContainers: P,
2399
+ droppableRects: he,
2400
+ over: re,
2401
+ measureDroppableContainers: ze,
2402
+ scrollableAncestors: ne,
2403
+ scrollableAncestorRects: Fe,
2404
+ measuringConfiguration: ce,
2405
+ measuringScheduled: xt,
2406
+ windowRect: tt
2407
+ }), [Q, U, H, Z, De, et, de, b, P, he, re, ze, ne, Fe, ce, xt, tt]), Sn = R(() => ({
2408
+ activatorEvent: Z,
2409
+ activators: Pt,
2410
+ active: Q,
2411
+ activeNodeRect: H,
2412
+ ariaDescribedById: {
2413
+ draggable: _e
2414
+ },
2415
+ dispatch: y,
2416
+ draggableNodes: b,
2417
+ over: re,
2418
+ measureDroppableContainers: ze
2419
+ }), [Z, Pt, Q, H, y, _e, b, re, ze]);
2420
+ return N.createElement(Qt.Provider, {
2421
+ value: m
2422
+ }, N.createElement(ke.Provider, {
2423
+ value: Sn
2424
+ }, N.createElement(pn.Provider, {
2425
+ value: Cn
2426
+ }, N.createElement(Ze.Provider, {
2427
+ value: Dn
2428
+ }, c)), N.createElement(Fr, {
2429
+ disabled: s?.restoreFocus === !1
2430
+ })), N.createElement(Wn, {
2431
+ ...s,
2432
+ hiddenTextDescribedById: _e
2433
+ }));
2434
+ function Rn() {
2435
+ const z = yt?.autoScrollEnabled === !1, X = typeof l == "object" ? l.enabled === !1 : l === !1, Y = S && !z && !X;
2436
+ return typeof l == "object" ? {
2437
+ ...l,
2438
+ enabled: Y
2439
+ } : {
2440
+ enabled: Y
2441
+ };
2442
+ }
2443
+ }), Yr = /* @__PURE__ */ Me(null), Vt = "button", $r = "Draggable";
2444
+ function ho(e) {
2445
+ let {
2446
+ id: t,
2447
+ data: n,
2448
+ disabled: r = !1,
2449
+ attributes: o
2450
+ } = e;
2451
+ const i = Ge($r), {
2452
+ activators: a,
2453
+ activatorEvent: s,
2454
+ active: l,
2455
+ activeNodeRect: c,
2456
+ ariaDescribedById: d,
2457
+ draggableNodes: u,
2458
+ over: h
2459
+ } = fe(ke), {
2460
+ role: f = Vt,
2461
+ roleDescription: D = "draggable",
2462
+ tabIndex: g = 0
2463
+ } = o ?? {}, v = l?.id === t, y = fe(v ? Ze : Yr), [w, m] = $e(), [L, C] = $e(), S = Tr(a, t), p = Oe(n);
2464
+ ee(
2465
+ () => (u.set(t, {
2466
+ id: t,
2467
+ key: i,
2468
+ node: w,
2469
+ activatorNode: L,
2470
+ data: p
2471
+ }), () => {
2472
+ const O = u.get(t);
2473
+ O && O.key === i && u.delete(t);
2474
+ }),
2475
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2476
+ [u, t]
2477
+ );
2478
+ const b = R(() => ({
2479
+ role: f,
2480
+ tabIndex: g,
2481
+ "aria-disabled": r,
2482
+ "aria-pressed": v && f === Vt ? !0 : void 0,
2483
+ "aria-roledescription": D,
2484
+ "aria-describedby": d.draggable
2485
+ }), [r, f, g, v, D, d.draggable]);
2486
+ return {
2487
+ active: l,
2488
+ activatorEvent: s,
2489
+ activeNodeRect: c,
2490
+ attributes: b,
2491
+ isDragging: v,
2492
+ listeners: r ? void 0 : S,
2493
+ node: w,
2494
+ over: h,
2495
+ setNodeRef: m,
2496
+ setActivatorNodeRef: C,
2497
+ transform: y
2498
+ };
2499
+ }
2500
+ function Kr() {
2501
+ return fe(pn);
2502
+ }
2503
+ const Wr = "Droppable", Ur = {
2504
+ timeout: 25
2505
+ };
2506
+ function go(e) {
2507
+ let {
2508
+ data: t,
2509
+ disabled: n = !1,
2510
+ id: r,
2511
+ resizeObserverConfig: o
2512
+ } = e;
2513
+ const i = Ge(Wr), {
2514
+ active: a,
2515
+ dispatch: s,
2516
+ over: l,
2517
+ measureDroppableContainers: c
2518
+ } = fe(ke), d = E({
2519
+ disabled: n
2520
+ }), u = E(!1), h = E(null), f = E(null), {
2521
+ disabled: D,
2522
+ updateMeasurementsFor: g,
2523
+ timeout: v
2524
+ } = {
2525
+ ...Ur,
2526
+ ...o
2527
+ }, y = Oe(g ?? r), w = B(
2528
+ () => {
2529
+ if (!u.current) {
2530
+ u.current = !0;
2531
+ return;
2532
+ }
2533
+ f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
2534
+ c(Array.isArray(y.current) ? y.current : [y.current]), f.current = null;
2535
+ }, v);
2536
+ },
2537
+ //eslint-disable-next-line react-hooks/exhaustive-deps
2538
+ [v]
2539
+ ), m = Qe({
2540
+ callback: w,
2541
+ disabled: D || !a
2542
+ }), L = B((b, O) => {
2543
+ m && (O && (m.unobserve(O), u.current = !1), b && m.observe(b));
2544
+ }, [m]), [C, S] = $e(L), p = Oe(t);
2545
+ return A(() => {
2546
+ !m || !C.current || (m.disconnect(), u.current = !1, m.observe(C.current));
2547
+ }, [C, m]), A(
2548
+ () => (s({
2549
+ type: M.RegisterDroppable,
2550
+ element: {
2551
+ id: r,
2552
+ key: i,
2553
+ disabled: n,
2554
+ node: C,
2555
+ rect: h,
2556
+ data: p
2557
+ }
2558
+ }), () => s({
2559
+ type: M.UnregisterDroppable,
2560
+ key: i,
2561
+ id: r
2562
+ })),
2563
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2564
+ [r]
2565
+ ), A(() => {
2566
+ n !== d.current.disabled && (s({
2567
+ type: M.SetDroppableDisabled,
2568
+ id: r,
2569
+ key: i,
2570
+ disabled: n
2571
+ }), d.current.disabled = n);
2572
+ }, [r, i, n, s]), {
2573
+ active: a,
2574
+ rect: h,
2575
+ isOver: l?.id === r,
2576
+ node: C,
2577
+ over: l,
2578
+ setNodeRef: S
2579
+ };
2580
+ }
2581
+ function Hr(e) {
2582
+ let {
2583
+ animation: t,
2584
+ children: n
2585
+ } = e;
2586
+ const [r, o] = j(null), [i, a] = j(null), s = Ke(n);
2587
+ return !n && !r && s && o(s), ee(() => {
2588
+ if (!i)
2589
+ return;
2590
+ const l = r?.key, c = r?.props.id;
2591
+ if (l == null || c == null) {
2592
+ o(null);
2593
+ return;
2594
+ }
2595
+ Promise.resolve(t(c, i)).then(() => {
2596
+ o(null);
2597
+ });
2598
+ }, [t, r, i]), N.createElement(N.Fragment, null, n, r ? Nn(r, {
2599
+ ref: a
2600
+ }) : null);
2601
+ }
2602
+ const Vr = {
2603
+ x: 0,
2604
+ y: 0,
2605
+ scaleX: 1,
2606
+ scaleY: 1
2607
+ };
2608
+ function qr(e) {
2609
+ let {
2610
+ children: t
2611
+ } = e;
2612
+ return N.createElement(ke.Provider, {
2613
+ value: vn
2614
+ }, N.createElement(Ze.Provider, {
2615
+ value: Vr
2616
+ }, t));
2617
+ }
2618
+ const Jr = {
2619
+ position: "fixed",
2620
+ touchAction: "none"
2621
+ }, Gr = (e) => ht(e) ? "transform 250ms ease" : void 0, Qr = /* @__PURE__ */ Tn((e, t) => {
2622
+ let {
2623
+ as: n,
2624
+ activatorEvent: r,
2625
+ adjustScale: o,
2626
+ children: i,
2627
+ className: a,
2628
+ rect: s,
2629
+ style: l,
2630
+ transform: c,
2631
+ transition: d = Gr
2632
+ } = e;
2633
+ if (!s)
2634
+ return null;
2635
+ const u = o ? c : {
2636
+ ...c,
2637
+ scaleX: 1,
2638
+ scaleY: 1
2639
+ }, h = {
2640
+ ...Jr,
2641
+ width: s.width,
2642
+ height: s.height,
2643
+ top: s.top,
2644
+ left: s.left,
2645
+ transform: Ne.Transform.toString(u),
2646
+ transformOrigin: o && r ? Un(r, s) : void 0,
2647
+ transition: typeof d == "function" ? d(r) : d,
2648
+ ...l
2649
+ };
2650
+ return N.createElement(n, {
2651
+ className: a,
2652
+ style: h,
2653
+ ref: t
2654
+ }, i);
2655
+ }), Zr = (e) => (t) => {
2656
+ let {
2657
+ active: n,
2658
+ dragOverlay: r
2659
+ } = t;
2660
+ const o = {}, {
2661
+ styles: i,
2662
+ className: a
2663
+ } = e;
2664
+ if (i != null && i.active)
2665
+ for (const [s, l] of Object.entries(i.active))
2666
+ l !== void 0 && (o[s] = n.node.style.getPropertyValue(s), n.node.style.setProperty(s, l));
2667
+ if (i != null && i.dragOverlay)
2668
+ for (const [s, l] of Object.entries(i.dragOverlay))
2669
+ l !== void 0 && r.node.style.setProperty(s, l);
2670
+ return a != null && a.active && n.node.classList.add(a.active), a != null && a.dragOverlay && r.node.classList.add(a.dragOverlay), function() {
2671
+ for (const [l, c] of Object.entries(o))
2672
+ n.node.style.setProperty(l, c);
2673
+ a != null && a.active && n.node.classList.remove(a.active);
2674
+ };
2675
+ }, _r = (e) => {
2676
+ let {
2677
+ transform: {
2678
+ initial: t,
2679
+ final: n
2680
+ }
2681
+ } = e;
2682
+ return [{
2683
+ transform: Ne.Transform.toString(t)
2684
+ }, {
2685
+ transform: Ne.Transform.toString(n)
2686
+ }];
2687
+ }, eo = {
2688
+ duration: 250,
2689
+ easing: "ease",
2690
+ keyframes: _r,
2691
+ sideEffects: /* @__PURE__ */ Zr({
2692
+ styles: {
2693
+ active: {
2694
+ opacity: "0"
2695
+ }
2696
+ }
2697
+ })
2698
+ };
2699
+ function to(e) {
2700
+ let {
2701
+ config: t,
2702
+ draggableNodes: n,
2703
+ droppableContainers: r,
2704
+ measuringConfiguration: o
2705
+ } = e;
2706
+ return Je((i, a) => {
2707
+ if (t === null)
2708
+ return;
2709
+ const s = n.get(i);
2710
+ if (!s)
2711
+ return;
2712
+ const l = s.node.current;
2713
+ if (!l)
2714
+ return;
2715
+ const c = gn(a);
2716
+ if (!c)
2717
+ return;
2718
+ const {
2719
+ transform: d
2720
+ } = F(a).getComputedStyle(a), u = tn(d);
2721
+ if (!u)
2722
+ return;
2723
+ const h = typeof t == "function" ? t : no(t);
2724
+ return cn(l, o.draggable.measure), h({
2725
+ active: {
2726
+ id: i,
2727
+ data: s.data,
2728
+ node: l,
2729
+ rect: o.draggable.measure(l)
2730
+ },
2731
+ draggableNodes: n,
2732
+ dragOverlay: {
2733
+ node: a,
2734
+ rect: o.dragOverlay.measure(c)
2735
+ },
2736
+ droppableContainers: r,
2737
+ measuringConfiguration: o,
2738
+ transform: u
2739
+ });
2740
+ });
2741
+ }
2742
+ function no(e) {
2743
+ const {
2744
+ duration: t,
2745
+ easing: n,
2746
+ sideEffects: r,
2747
+ keyframes: o
2748
+ } = {
2749
+ ...eo,
2750
+ ...e
2751
+ };
2752
+ return (i) => {
2753
+ let {
2754
+ active: a,
2755
+ dragOverlay: s,
2756
+ transform: l,
2757
+ ...c
2758
+ } = i;
2759
+ if (!t)
2760
+ return;
2761
+ const d = {
2762
+ x: s.rect.left - a.rect.left,
2763
+ y: s.rect.top - a.rect.top
2764
+ }, u = {
2765
+ scaleX: l.scaleX !== 1 ? a.rect.width * l.scaleX / s.rect.width : 1,
2766
+ scaleY: l.scaleY !== 1 ? a.rect.height * l.scaleY / s.rect.height : 1
2767
+ }, h = {
2768
+ x: l.x - d.x,
2769
+ y: l.y - d.y,
2770
+ ...u
2771
+ }, f = o({
2772
+ ...c,
2773
+ active: a,
2774
+ dragOverlay: s,
2775
+ transform: {
2776
+ initial: l,
2777
+ final: h
2778
+ }
2779
+ }), [D] = f, g = f[f.length - 1];
2780
+ if (JSON.stringify(D) === JSON.stringify(g))
2781
+ return;
2782
+ const v = r?.({
2783
+ active: a,
2784
+ dragOverlay: s,
2785
+ ...c
2786
+ }), y = s.node.animate(f, {
2787
+ duration: t,
2788
+ easing: n,
2789
+ fill: "forwards"
2790
+ });
2791
+ return new Promise((w) => {
2792
+ y.onfinish = () => {
2793
+ v?.(), w();
2794
+ };
2795
+ });
2796
+ };
2797
+ }
2798
+ let qt = 0;
2799
+ function ro(e) {
2800
+ return R(() => {
2801
+ if (e != null)
2802
+ return qt++, qt;
2803
+ }, [e]);
2804
+ }
2805
+ const vo = /* @__PURE__ */ N.memo((e) => {
2806
+ let {
2807
+ adjustScale: t = !1,
2808
+ children: n,
2809
+ dropAnimation: r,
2810
+ style: o,
2811
+ transition: i,
2812
+ modifiers: a,
2813
+ wrapperElement: s = "div",
2814
+ className: l,
2815
+ zIndex: c = 999
2816
+ } = e;
2817
+ const {
2818
+ activatorEvent: d,
2819
+ active: u,
2820
+ activeNodeRect: h,
2821
+ containerNodeRect: f,
2822
+ draggableNodes: D,
2823
+ droppableContainers: g,
2824
+ dragOverlay: v,
2825
+ over: y,
2826
+ measuringConfiguration: w,
2827
+ scrollableAncestors: m,
2828
+ scrollableAncestorRects: L,
2829
+ windowRect: C
2830
+ } = Kr(), S = fe(Ze), p = ro(u?.id), b = bn(a, {
2831
+ activatorEvent: d,
2832
+ active: u,
2833
+ activeNodeRect: h,
2834
+ containerNodeRect: f,
2835
+ draggingNodeRect: v.rect,
2836
+ over: y,
2837
+ overlayNodeRect: v.rect,
2838
+ scrollableAncestors: m,
2839
+ scrollableAncestorRects: L,
2840
+ transform: S,
2841
+ windowRect: C
2842
+ }), O = bt(h), P = to({
2843
+ config: r,
2844
+ draggableNodes: D,
2845
+ droppableContainers: g,
2846
+ measuringConfiguration: w
2847
+ }), T = O ? v.setRef : void 0;
2848
+ return N.createElement(qr, null, N.createElement(Hr, {
2849
+ animation: P
2850
+ }, u && p ? N.createElement(Qr, {
2851
+ key: p,
2852
+ id: u.id,
2853
+ ref: T,
2854
+ as: s,
2855
+ activatorEvent: d,
2856
+ adjustScale: t,
2857
+ className: l,
2858
+ transition: i,
2859
+ rect: O,
2860
+ style: {
2861
+ zIndex: c,
2862
+ ...o
2863
+ },
2864
+ transform: b
2865
+ }, n) : null));
2866
+ });
2867
+ export {
2868
+ Ne as C,
2869
+ fo as D,
2870
+ x as K,
2871
+ Te as M,
2872
+ fn as P,
2873
+ pr as T,
2874
+ Kr as a,
2875
+ Ge as b,
2876
+ ee as c,
2877
+ ho as d,
2878
+ so as e,
2879
+ uo as f,
2880
+ Pe as g,
2881
+ Vn as h,
2882
+ ht as i,
2883
+ gt as j,
2884
+ lo as k,
2885
+ ao as l,
2886
+ co as m,
2887
+ vo as n,
2888
+ dn as o,
2889
+ We as s,
2890
+ go as u
2891
+ };
2892
+ //# sourceMappingURL=core.esm-CKGHpLM_.mjs.map