@dmsi/wedgekit-react 1.0.1 → 2.0.1

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 (282) hide show
  1. package/dist/classNames.d.ts +1 -0
  2. package/dist/classNames.d.ts.map +1 -1
  3. package/dist/classNames.js +150 -0
  4. package/dist/components/AccessCard.js +63 -0
  5. package/dist/components/AccessCardGroup.js +73 -0
  6. package/dist/components/AccessChangerTabItem.js +51 -0
  7. package/dist/components/Accordion.js +99 -0
  8. package/dist/components/Alert.d.ts.map +1 -1
  9. package/dist/components/Alert.js +78 -0
  10. package/dist/components/Breadcrumbs.js +111 -0
  11. package/dist/components/Button.js +137 -0
  12. package/dist/components/CalendarRange.js +405 -0
  13. package/dist/components/Caption.js +99 -0
  14. package/dist/components/Card.js +50 -0
  15. package/dist/components/Checkbox.js +108 -0
  16. package/dist/components/CompactImagesPreview.d.ts.map +1 -1
  17. package/dist/components/CompactImagesPreview.js +120 -0
  18. package/dist/components/ContentTab.js +68 -0
  19. package/dist/components/ContentTabs.js +96 -0
  20. package/dist/components/DMSiLogo.js +54 -0
  21. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +27 -0
  22. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +79 -0
  23. package/dist/components/DataGrid/PinnedColumns.d.ts +9 -2
  24. package/dist/components/DataGrid/PinnedColumns.d.ts.map +1 -1
  25. package/dist/components/DataGrid/PinnedColumns.js +165 -0
  26. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts +18 -0
  27. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts.map +1 -0
  28. package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
  29. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts +39 -0
  30. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts.map +1 -0
  31. package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
  32. package/dist/components/DataGrid/SummaryRow/index.d.ts +18 -0
  33. package/dist/components/DataGrid/SummaryRow/index.d.ts.map +1 -0
  34. package/dist/components/DataGrid/SummaryRow/index.js +86 -0
  35. package/dist/components/DataGrid/TableBody/GroupRow.d.ts +18 -0
  36. package/dist/components/DataGrid/TableBody/GroupRow.d.ts.map +1 -0
  37. package/dist/components/DataGrid/TableBody/GroupRow.js +243 -0
  38. package/dist/components/DataGrid/TableBody/LoadingCell.js +33 -0
  39. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts +3 -2
  40. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts.map +1 -1
  41. package/dist/components/DataGrid/TableBody/TableBodyRow.js +136 -0
  42. package/dist/components/DataGrid/TableBody/index.d.ts +3 -1
  43. package/dist/components/DataGrid/TableBody/index.d.ts.map +1 -1
  44. package/dist/components/DataGrid/TableBody/index.js +161 -0
  45. package/dist/components/DataGrid/index.d.ts +1 -1
  46. package/dist/components/DataGrid/index.d.ts.map +1 -1
  47. package/dist/components/DataGrid/index.js +696 -0
  48. package/dist/components/DataGrid/types.d.ts +141 -1
  49. package/dist/components/DataGrid/types.d.ts.map +1 -1
  50. package/dist/components/DataGrid/utils.d.ts +2 -0
  51. package/dist/components/DataGrid/utils.d.ts.map +1 -1
  52. package/dist/components/DataGrid/utils.js +20 -0
  53. package/dist/components/DataGridCell.d.ts +5 -2
  54. package/dist/components/DataGridCell.d.ts.map +1 -1
  55. package/dist/components/DataGridCell.js +412 -0
  56. package/dist/components/DataTable.js +700 -0
  57. package/dist/components/DateInput.js +193 -0
  58. package/dist/components/DateRangeInput.js +368 -0
  59. package/dist/components/DebugJson.js +28 -0
  60. package/dist/components/Display.js +46 -0
  61. package/dist/components/EditingContext.js +34 -0
  62. package/dist/components/EmblaCarousel/ArrowButtons.js +83 -0
  63. package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +12 -0
  64. package/dist/components/EmblaCarousel/index.js +153 -0
  65. package/dist/components/EmblaCarousel/usePrevNextButtons.js +21 -0
  66. package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +15 -0
  67. package/dist/components/EmptyCartIcon.js +25 -0
  68. package/dist/components/FilterGroup.d.ts +5 -3
  69. package/dist/components/FilterGroup.d.ts.map +1 -1
  70. package/dist/components/FilterGroup.js +198 -0
  71. package/dist/components/FullViewportBox.js +19 -0
  72. package/dist/components/Grid.js +54 -0
  73. package/dist/components/Heading.js +50 -0
  74. package/dist/components/HorizontalDivider.js +20 -0
  75. package/dist/components/Icon.d.ts +5 -2
  76. package/dist/components/Icon.d.ts.map +1 -1
  77. package/dist/components/Icon.js +73 -0
  78. package/dist/components/ImagePlaceholder.js +22 -0
  79. package/dist/components/Input.d.ts +11 -9
  80. package/dist/components/Input.d.ts.map +1 -1
  81. package/dist/components/Input.js +469 -0
  82. package/dist/components/InputGroup.js +45 -0
  83. package/dist/components/Label.js +37 -0
  84. package/dist/components/Link.js +69 -0
  85. package/dist/components/List.js +12 -0
  86. package/dist/components/ListGroup.d.ts.map +1 -1
  87. package/dist/components/ListGroup.js +54 -0
  88. package/dist/components/LiveChatComponent.js +25 -0
  89. package/dist/components/LoadingScrim.js +22 -0
  90. package/dist/components/LogoAgilityTopBar.js +90 -0
  91. package/dist/components/LogoDMSiTopBar.js +54 -0
  92. package/dist/components/LogoMillworkTopBar.js +196 -0
  93. package/dist/components/MainBar.js +58 -0
  94. package/dist/components/MaxViewportBox.js +19 -0
  95. package/dist/components/Menu.d.ts.map +1 -1
  96. package/dist/components/Menu.js +202 -0
  97. package/dist/components/MenuOption.js +161 -0
  98. package/dist/components/MobileDataGrid/ColumnList.js +85 -0
  99. package/dist/components/MobileDataGrid/ColumnSelector/index.js +100 -0
  100. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -1
  101. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +6 -0
  102. package/dist/components/MobileDataGrid/GridContextProvider/index.js +80 -0
  103. package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +11 -0
  104. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
  105. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts +2 -1
  106. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts.map +1 -1
  107. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
  108. package/dist/components/MobileDataGrid/MobileDataGridHeader.d.ts.map +1 -1
  109. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
  110. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
  111. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.d.ts.map +1 -1
  112. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
  113. package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
  114. package/dist/components/MobileDataGrid/index.d.ts +1 -1
  115. package/dist/components/MobileDataGrid/index.d.ts.map +1 -1
  116. package/dist/components/MobileDataGrid/index.js +78 -0
  117. package/dist/components/MobileNavMenu.d.ts.map +1 -1
  118. package/dist/components/MobileNavMenu.js +173 -0
  119. package/dist/components/Modal.d.ts +1 -2
  120. package/dist/components/Modal.d.ts.map +1 -1
  121. package/dist/components/Modal.js +201 -0
  122. package/dist/components/ModalButtons.d.ts.map +1 -1
  123. package/dist/components/ModalButtons.js +57 -0
  124. package/dist/components/ModalContent.d.ts +1 -2
  125. package/dist/components/ModalContent.d.ts.map +1 -1
  126. package/dist/components/ModalContent.js +24 -0
  127. package/dist/components/ModalHeader.js +74 -0
  128. package/dist/components/ModalScrim.js +32 -0
  129. package/dist/components/NavigationTab.js +72 -0
  130. package/dist/components/NavigationTabs.js +45 -0
  131. package/dist/components/NestedMenu.d.ts.map +1 -1
  132. package/dist/components/NestedMenu.js +119 -0
  133. package/dist/components/Notification.js +91 -0
  134. package/dist/components/OptionPill.d.ts +2 -1
  135. package/dist/components/OptionPill.d.ts.map +1 -1
  136. package/dist/components/OptionPill.js +103 -0
  137. package/dist/components/OrderCheckIcon.js +28 -0
  138. package/dist/components/PDFViewer/DownloadIcon.js +25 -0
  139. package/dist/components/PDFViewer/PDFElement.js +77 -0
  140. package/dist/components/PDFViewer/PDFNavigation.js +64 -0
  141. package/dist/components/PDFViewer/PDFPage.js +28 -0
  142. package/dist/components/PDFViewer/index.d.ts.map +1 -1
  143. package/dist/components/PDFViewer/index.js +124 -0
  144. package/dist/components/Pagination.d.ts.map +1 -1
  145. package/dist/components/Pagination.js +117 -0
  146. package/dist/components/Paragraph.js +43 -0
  147. package/dist/components/Password.js +47 -0
  148. package/dist/components/ProductImagePreview/CarouselPagination.js +48 -0
  149. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts +2 -1
  150. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts.map +1 -1
  151. package/dist/components/ProductImagePreview/MobileImageCarousel.js +146 -0
  152. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts +2 -1
  153. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -1
  154. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +138 -0
  155. package/dist/components/ProductImagePreview/Thumbnail.d.ts +2 -1
  156. package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -1
  157. package/dist/components/ProductImagePreview/Thumbnail.js +46 -0
  158. package/dist/components/ProductImagePreview/ZoomWindow.js +74 -0
  159. package/dist/components/ProductImagePreview/index.d.ts.map +1 -1
  160. package/dist/components/ProductImagePreview/index.js +189 -0
  161. package/dist/components/ProductImagePreview/useProductImagePreview.js +85 -0
  162. package/dist/components/ProjectBar.d.ts +1 -1
  163. package/dist/components/ProjectBar.js +54 -0
  164. package/dist/components/Radio.js +113 -0
  165. package/dist/components/Search.js +89 -0
  166. package/dist/components/SearchResultImage/index.js +26 -0
  167. package/dist/components/Select.js +122 -0
  168. package/dist/components/SideMenu.js +24 -0
  169. package/dist/components/SideMenuGroup.js +80 -0
  170. package/dist/components/SideMenuItem.js +79 -0
  171. package/dist/components/SimpleTable.js +60 -0
  172. package/dist/components/SkeletonParagraph.js +24 -0
  173. package/dist/components/Spinner.d.ts +1 -1
  174. package/dist/components/Spinner.d.ts.map +1 -1
  175. package/dist/components/Spinner.js +30 -0
  176. package/dist/components/Stack.js +174 -0
  177. package/dist/components/StatusPill.js +44 -0
  178. package/dist/components/Stepper.js +138 -0
  179. package/dist/components/Subheader.d.ts +2 -1
  180. package/dist/components/Subheader.d.ts.map +1 -1
  181. package/dist/components/Subheader.js +41 -0
  182. package/dist/components/Surface.js +30 -0
  183. package/dist/components/Swatch.js +1498 -0
  184. package/dist/components/Textarea.js +106 -0
  185. package/dist/components/Theme.d.ts +1 -1
  186. package/dist/components/Theme.d.ts.map +1 -1
  187. package/dist/components/Theme.js +25 -0
  188. package/dist/components/Time.d.ts +2 -1
  189. package/dist/components/Time.d.ts.map +1 -1
  190. package/dist/components/Time.js +225 -0
  191. package/dist/components/Toast.d.ts +4 -3
  192. package/dist/components/Toast.d.ts.map +1 -1
  193. package/dist/components/Toast.js +170 -0
  194. package/dist/components/Tooltip.js +102 -0
  195. package/dist/components/TopBar.d.ts.map +1 -1
  196. package/dist/components/TopBar.js +119 -0
  197. package/dist/components/Upload.js +107 -0
  198. package/dist/components/WorldpayIframe.d.ts.map +1 -1
  199. package/dist/components/WorldpayIframe.js +19 -0
  200. package/dist/hooks/useEditCell.js +23 -0
  201. package/dist/hooks/useInfiniteScroll.js +25 -0
  202. package/dist/hooks/useKeydown.js +20 -0
  203. package/dist/hooks/useMatchesMedia.js +15 -0
  204. package/dist/hooks/useMenuSystem.js +186 -0
  205. package/dist/hooks/useMounted.js +9 -0
  206. package/dist/hooks/useTableLayout/computeColumns.js +59 -0
  207. package/dist/hooks/useTableLayout/storage.js +64 -0
  208. package/dist/hooks/useTableLayout/useTableLayout.js +163 -0
  209. package/dist/index.js +249 -52864
  210. package/dist/lib/loadFonts.js +11 -0
  211. package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
  212. package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2299 -0
  213. package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
  214. package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +367 -0
  215. package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
  216. package/dist/node_modules/@headlessui/react/dist/components/description/description.js +45 -0
  217. package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
  218. package/dist/node_modules/@headlessui/react/dist/components/label/label.js +62 -0
  219. package/dist/node_modules/@headlessui/react/dist/components/switch/switch.js +56 -0
  220. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
  221. package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +10 -0
  222. package/dist/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
  223. package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
  224. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
  225. package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
  226. package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
  227. package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
  228. package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +7 -0
  229. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +16 -0
  230. package/dist/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
  231. package/dist/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
  232. package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
  233. package/dist/node_modules/@headlessui/react/dist/internal/id.js +8 -0
  234. package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +19 -0
  235. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
  236. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
  237. package/dist/node_modules/@headlessui/react/dist/utils/dom.js +34 -0
  238. package/dist/node_modules/@headlessui/react/dist/utils/env.js +34 -0
  239. package/dist/node_modules/@headlessui/react/dist/utils/form.js +32 -0
  240. package/dist/node_modules/@headlessui/react/dist/utils/match.js +11 -0
  241. package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
  242. package/dist/node_modules/@headlessui/react/dist/utils/owner.js +8 -0
  243. package/dist/node_modules/@headlessui/react/dist/utils/render.js +126 -0
  244. package/dist/node_modules/@js-temporal/polyfill/dist/index.esm.js +3913 -0
  245. package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +83 -0
  246. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
  247. package/dist/node_modules/@react-aria/interactions/dist/useFocus.js +31 -0
  248. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +99 -0
  249. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js +59 -0
  250. package/dist/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
  251. package/dist/node_modules/@react-aria/interactions/dist/utils.js +68 -0
  252. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +32 -0
  253. package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
  254. package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
  255. package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
  256. package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
  257. package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
  258. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
  259. package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
  260. package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
  261. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +94 -0
  262. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
  263. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1954 -0
  264. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +575 -0
  265. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  266. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  267. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
  268. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
  269. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
  270. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
  271. package/dist/node_modules/jsbi/dist/jsbi.js +1040 -0
  272. package/dist/node_modules/react-use/esm/usePrevious.js +10 -0
  273. package/dist/static/no-results-image.png.js +4 -0
  274. package/dist/styles.css +1 -1
  275. package/dist/utils/date-patch-dashes.js +28 -0
  276. package/dist/utils/date.js +95 -0
  277. package/dist/utils/formatting.js +22 -0
  278. package/dist/utils/index.js +4 -0
  279. package/dist/utils/mergeObjectArrays.js +18 -0
  280. package/dist/utils.js +20 -0
  281. package/package.json +1 -1
  282. /package/dist/{pdf-l6QfMa5e.js → node_modules/pdfjs-dist/build/pdf.js} +0 -0
@@ -0,0 +1,2299 @@
1
+ import q, { createContext as Oe, useMemo as A, memo as dn, useReducer as fn, useState as K, useRef as L, useCallback as Y, useEffect as R, useContext as be } from "react";
2
+ import { unstable_batchedUpdates as Be, createPortal as hn } from "react-dom";
3
+ import { useLatestValue as Ae, useUniqueId as Xe, getEventCoordinates as et, getWindow as Z, add as pe, useIsomorphicLayoutEffect as we, getOwnerDocument as ye, isKeyboardEvent as Ft, subtract as Fe, useLazyMemo as Ne, isHTMLElement as Ke, useNodeRef as $e, canUseDOM as it, useInterval as gn, usePrevious as tt, findFirstFocusableNode as vn, useEvent as $t, isWindow as st, isNode as pn, isDocument as Wt, isSVGElement as bn } from "../../utilities/dist/utilities.esm.js";
4
+ import { useAnnouncement as wn, HiddenText as yn, LiveRegion as mn } from "../../accessibility/dist/accessibility.esm.js";
5
+ const Ut = /* @__PURE__ */ Oe(null);
6
+ function Dn(e) {
7
+ const t = be(Ut);
8
+ R(() => {
9
+ if (!t)
10
+ throw new Error("useDndMonitor must be used within a children of <DndContext>");
11
+ return t(e);
12
+ }, [e, t]);
13
+ }
14
+ function xn() {
15
+ const [e] = K(() => /* @__PURE__ */ new Set()), t = Y((r) => (e.add(r), () => e.delete(r)), [e]);
16
+ return [Y((r) => {
17
+ let {
18
+ type: i,
19
+ event: o
20
+ } = r;
21
+ e.forEach((l) => {
22
+ var s;
23
+ return (s = l[i]) == null ? void 0 : s.call(l, o);
24
+ });
25
+ }, [e]), t];
26
+ }
27
+ const Cn = {
28
+ draggable: `
29
+ To pick up a draggable item, press the space bar.
30
+ While dragging, use the arrow keys to move the item.
31
+ Press space again to drop the item in its new position, or press escape to cancel.
32
+ `
33
+ }, Sn = {
34
+ onDragStart(e) {
35
+ let {
36
+ active: t
37
+ } = e;
38
+ return "Picked up draggable item " + t.id + ".";
39
+ },
40
+ onDragOver(e) {
41
+ let {
42
+ active: t,
43
+ over: n
44
+ } = e;
45
+ return n ? "Draggable item " + t.id + " was moved over droppable area " + n.id + "." : "Draggable item " + t.id + " is no longer over a droppable area.";
46
+ },
47
+ onDragEnd(e) {
48
+ let {
49
+ active: t,
50
+ over: n
51
+ } = e;
52
+ return n ? "Draggable item " + t.id + " was dropped over droppable area " + n.id : "Draggable item " + t.id + " was dropped.";
53
+ },
54
+ onDragCancel(e) {
55
+ let {
56
+ active: t
57
+ } = e;
58
+ return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
59
+ }
60
+ };
61
+ function Rn(e) {
62
+ let {
63
+ announcements: t = Sn,
64
+ container: n,
65
+ hiddenTextDescribedById: r,
66
+ screenReaderInstructions: i = Cn
67
+ } = e;
68
+ const {
69
+ announce: o,
70
+ announcement: l
71
+ } = wn(), s = Xe("DndLiveRegion"), [a, c] = K(!1);
72
+ if (R(() => {
73
+ c(!0);
74
+ }, []), Dn(A(() => ({
75
+ onDragStart(u) {
76
+ let {
77
+ active: g
78
+ } = u;
79
+ o(t.onDragStart({
80
+ active: g
81
+ }));
82
+ },
83
+ onDragMove(u) {
84
+ let {
85
+ active: g,
86
+ over: f
87
+ } = u;
88
+ t.onDragMove && o(t.onDragMove({
89
+ active: g,
90
+ over: f
91
+ }));
92
+ },
93
+ onDragOver(u) {
94
+ let {
95
+ active: g,
96
+ over: f
97
+ } = u;
98
+ o(t.onDragOver({
99
+ active: g,
100
+ over: f
101
+ }));
102
+ },
103
+ onDragEnd(u) {
104
+ let {
105
+ active: g,
106
+ over: f
107
+ } = u;
108
+ o(t.onDragEnd({
109
+ active: g,
110
+ over: f
111
+ }));
112
+ },
113
+ onDragCancel(u) {
114
+ let {
115
+ active: g,
116
+ over: f
117
+ } = u;
118
+ o(t.onDragCancel({
119
+ active: g,
120
+ over: f
121
+ }));
122
+ }
123
+ }), [o, t])), !a)
124
+ return null;
125
+ const d = q.createElement(q.Fragment, null, q.createElement(yn, {
126
+ id: r,
127
+ value: i.draggable
128
+ }), q.createElement(mn, {
129
+ id: s,
130
+ announcement: l
131
+ }));
132
+ return n ? hn(d, n) : d;
133
+ }
134
+ var E;
135
+ (function(e) {
136
+ e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
137
+ })(E || (E = {}));
138
+ function We() {
139
+ }
140
+ function Br(e, t) {
141
+ return A(
142
+ () => ({
143
+ sensor: e,
144
+ options: t ?? {}
145
+ }),
146
+ // eslint-disable-next-line react-hooks/exhaustive-deps
147
+ [e, t]
148
+ );
149
+ }
150
+ function Pr() {
151
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
152
+ t[n] = arguments[n];
153
+ return A(
154
+ () => [...t].filter((r) => r != null),
155
+ // eslint-disable-next-line react-hooks/exhaustive-deps
156
+ [...t]
157
+ );
158
+ }
159
+ const j = /* @__PURE__ */ Object.freeze({
160
+ x: 0,
161
+ y: 0
162
+ });
163
+ function En(e, t) {
164
+ return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
165
+ }
166
+ function An(e, t) {
167
+ let {
168
+ data: {
169
+ value: n
170
+ }
171
+ } = e, {
172
+ data: {
173
+ value: r
174
+ }
175
+ } = t;
176
+ return n - r;
177
+ }
178
+ function Mn(e, t) {
179
+ let {
180
+ data: {
181
+ value: n
182
+ }
183
+ } = e, {
184
+ data: {
185
+ value: r
186
+ }
187
+ } = t;
188
+ return r - n;
189
+ }
190
+ function On(e, t) {
191
+ if (!e || e.length === 0)
192
+ return null;
193
+ const [n] = e;
194
+ return n[t];
195
+ }
196
+ function At(e, t, n) {
197
+ return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
198
+ x: t + e.width * 0.5,
199
+ y: n + e.height * 0.5
200
+ };
201
+ }
202
+ const Fr = (e) => {
203
+ let {
204
+ collisionRect: t,
205
+ droppableRects: n,
206
+ droppableContainers: r
207
+ } = e;
208
+ const i = At(t, t.left, t.top), o = [];
209
+ for (const l of r) {
210
+ const {
211
+ id: s
212
+ } = l, a = n.get(s);
213
+ if (a) {
214
+ const c = En(At(a), i);
215
+ o.push({
216
+ id: s,
217
+ data: {
218
+ droppableContainer: l,
219
+ value: c
220
+ }
221
+ });
222
+ }
223
+ }
224
+ return o.sort(An);
225
+ };
226
+ function Nn(e, t) {
227
+ const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), i = Math.min(t.left + t.width, e.left + e.width), o = Math.min(t.top + t.height, e.top + e.height), l = i - r, s = o - n;
228
+ if (r < i && n < o) {
229
+ const a = t.width * t.height, c = e.width * e.height, d = l * s, u = d / (a + c - d);
230
+ return Number(u.toFixed(4));
231
+ }
232
+ return 0;
233
+ }
234
+ const Tn = (e) => {
235
+ let {
236
+ collisionRect: t,
237
+ droppableRects: n,
238
+ droppableContainers: r
239
+ } = e;
240
+ const i = [];
241
+ for (const o of r) {
242
+ const {
243
+ id: l
244
+ } = o, s = n.get(l);
245
+ if (s) {
246
+ const a = Nn(s, t);
247
+ a > 0 && i.push({
248
+ id: l,
249
+ data: {
250
+ droppableContainer: o,
251
+ value: a
252
+ }
253
+ });
254
+ }
255
+ }
256
+ return i.sort(Mn);
257
+ };
258
+ function Ln(e, t, n) {
259
+ return {
260
+ ...e,
261
+ scaleX: t && n ? t.width / n.width : 1,
262
+ scaleY: t && n ? t.height / n.height : 1
263
+ };
264
+ }
265
+ function Xt(e, t) {
266
+ return e && t ? {
267
+ x: e.left - t.left,
268
+ y: e.top - t.top
269
+ } : j;
270
+ }
271
+ function In(e) {
272
+ return function(n) {
273
+ for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
274
+ i[o - 1] = arguments[o];
275
+ return i.reduce((l, s) => ({
276
+ ...l,
277
+ top: l.top + e * s.y,
278
+ bottom: l.bottom + e * s.y,
279
+ left: l.left + e * s.x,
280
+ right: l.right + e * s.x
281
+ }), {
282
+ ...n
283
+ });
284
+ };
285
+ }
286
+ const kn = /* @__PURE__ */ In(1);
287
+ function zn(e) {
288
+ if (e.startsWith("matrix3d(")) {
289
+ const t = e.slice(9, -1).split(/, /);
290
+ return {
291
+ x: +t[12],
292
+ y: +t[13],
293
+ scaleX: +t[0],
294
+ scaleY: +t[5]
295
+ };
296
+ } else if (e.startsWith("matrix(")) {
297
+ const t = e.slice(7, -1).split(/, /);
298
+ return {
299
+ x: +t[4],
300
+ y: +t[5],
301
+ scaleX: +t[0],
302
+ scaleY: +t[3]
303
+ };
304
+ }
305
+ return null;
306
+ }
307
+ function Bn(e, t, n) {
308
+ const r = zn(t);
309
+ if (!r)
310
+ return e;
311
+ const {
312
+ scaleX: i,
313
+ scaleY: o,
314
+ x: l,
315
+ y: s
316
+ } = r, a = e.left - l - (1 - i) * parseFloat(n), c = e.top - s - (1 - o) * parseFloat(n.slice(n.indexOf(" ") + 1)), d = i ? e.width / i : e.width, u = o ? e.height / o : e.height;
317
+ return {
318
+ width: d,
319
+ height: u,
320
+ top: c,
321
+ right: a + d,
322
+ bottom: c + u,
323
+ left: a
324
+ };
325
+ }
326
+ const Pn = {
327
+ ignoreTransform: !1
328
+ };
329
+ function Te(e, t) {
330
+ t === void 0 && (t = Pn);
331
+ let n = e.getBoundingClientRect();
332
+ if (t.ignoreTransform) {
333
+ const {
334
+ transform: c,
335
+ transformOrigin: d
336
+ } = Z(e).getComputedStyle(e);
337
+ c && (n = Bn(n, c, d));
338
+ }
339
+ const {
340
+ top: r,
341
+ left: i,
342
+ width: o,
343
+ height: l,
344
+ bottom: s,
345
+ right: a
346
+ } = n;
347
+ return {
348
+ top: r,
349
+ left: i,
350
+ width: o,
351
+ height: l,
352
+ bottom: s,
353
+ right: a
354
+ };
355
+ }
356
+ function Mt(e) {
357
+ return Te(e, {
358
+ ignoreTransform: !0
359
+ });
360
+ }
361
+ function Fn(e) {
362
+ const t = e.innerWidth, n = e.innerHeight;
363
+ return {
364
+ top: 0,
365
+ left: 0,
366
+ right: t,
367
+ bottom: n,
368
+ width: t,
369
+ height: n
370
+ };
371
+ }
372
+ function $n(e, t) {
373
+ return t === void 0 && (t = Z(e).getComputedStyle(e)), t.position === "fixed";
374
+ }
375
+ function Wn(e, t) {
376
+ t === void 0 && (t = Z(e).getComputedStyle(e));
377
+ const n = /(auto|scroll|overlay)/;
378
+ return ["overflow", "overflowX", "overflowY"].some((i) => {
379
+ const o = t[i];
380
+ return typeof o == "string" ? n.test(o) : !1;
381
+ });
382
+ }
383
+ function lt(e, t) {
384
+ const n = [];
385
+ function r(i) {
386
+ if (t != null && n.length >= t || !i)
387
+ return n;
388
+ if (Wt(i) && i.scrollingElement != null && !n.includes(i.scrollingElement))
389
+ return n.push(i.scrollingElement), n;
390
+ if (!Ke(i) || bn(i) || n.includes(i))
391
+ return n;
392
+ const o = Z(e).getComputedStyle(i);
393
+ return i !== e && Wn(i, o) && n.push(i), $n(i, o) ? n : r(i.parentNode);
394
+ }
395
+ return e ? r(e) : n;
396
+ }
397
+ function Kt(e) {
398
+ const [t] = lt(e, 1);
399
+ return t ?? null;
400
+ }
401
+ function Ge(e) {
402
+ return !it || !e ? null : st(e) ? e : pn(e) ? Wt(e) || e === ye(e).scrollingElement ? window : Ke(e) ? e : null : null;
403
+ }
404
+ function Yt(e) {
405
+ return st(e) ? e.scrollX : e.scrollLeft;
406
+ }
407
+ function jt(e) {
408
+ return st(e) ? e.scrollY : e.scrollTop;
409
+ }
410
+ function nt(e) {
411
+ return {
412
+ x: Yt(e),
413
+ y: jt(e)
414
+ };
415
+ }
416
+ var N;
417
+ (function(e) {
418
+ e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
419
+ })(N || (N = {}));
420
+ function Ht(e) {
421
+ return !it || !e ? !1 : e === document.scrollingElement;
422
+ }
423
+ function _t(e) {
424
+ const t = {
425
+ x: 0,
426
+ y: 0
427
+ }, n = Ht(e) ? {
428
+ height: window.innerHeight,
429
+ width: window.innerWidth
430
+ } : {
431
+ height: e.clientHeight,
432
+ width: e.clientWidth
433
+ }, r = {
434
+ x: e.scrollWidth - n.width,
435
+ y: e.scrollHeight - n.height
436
+ }, i = e.scrollTop <= t.y, o = e.scrollLeft <= t.x, l = e.scrollTop >= r.y, s = e.scrollLeft >= r.x;
437
+ return {
438
+ isTop: i,
439
+ isLeft: o,
440
+ isBottom: l,
441
+ isRight: s,
442
+ maxScroll: r,
443
+ minScroll: t
444
+ };
445
+ }
446
+ const Un = {
447
+ x: 0.2,
448
+ y: 0.2
449
+ };
450
+ function Xn(e, t, n, r, i) {
451
+ let {
452
+ top: o,
453
+ left: l,
454
+ right: s,
455
+ bottom: a
456
+ } = n;
457
+ r === void 0 && (r = 10), i === void 0 && (i = Un);
458
+ const {
459
+ isTop: c,
460
+ isBottom: d,
461
+ isLeft: u,
462
+ isRight: g
463
+ } = _t(e), f = {
464
+ x: 0,
465
+ y: 0
466
+ }, C = {
467
+ x: 0,
468
+ y: 0
469
+ }, h = {
470
+ height: t.height * i.y,
471
+ width: t.width * i.x
472
+ };
473
+ return !c && o <= t.top + h.height ? (f.y = N.Backward, C.y = r * Math.abs((t.top + h.height - o) / h.height)) : !d && a >= t.bottom - h.height && (f.y = N.Forward, C.y = r * Math.abs((t.bottom - h.height - a) / h.height)), !g && s >= t.right - h.width ? (f.x = N.Forward, C.x = r * Math.abs((t.right - h.width - s) / h.width)) : !u && l <= t.left + h.width && (f.x = N.Backward, C.x = r * Math.abs((t.left + h.width - l) / h.width)), {
474
+ direction: f,
475
+ speed: C
476
+ };
477
+ }
478
+ function Kn(e) {
479
+ if (e === document.scrollingElement) {
480
+ const {
481
+ innerWidth: o,
482
+ innerHeight: l
483
+ } = window;
484
+ return {
485
+ top: 0,
486
+ left: 0,
487
+ right: o,
488
+ bottom: l,
489
+ width: o,
490
+ height: l
491
+ };
492
+ }
493
+ const {
494
+ top: t,
495
+ left: n,
496
+ right: r,
497
+ bottom: i
498
+ } = e.getBoundingClientRect();
499
+ return {
500
+ top: t,
501
+ left: n,
502
+ right: r,
503
+ bottom: i,
504
+ width: e.clientWidth,
505
+ height: e.clientHeight
506
+ };
507
+ }
508
+ function qt(e) {
509
+ return e.reduce((t, n) => pe(t, nt(n)), j);
510
+ }
511
+ function Yn(e) {
512
+ return e.reduce((t, n) => t + Yt(n), 0);
513
+ }
514
+ function jn(e) {
515
+ return e.reduce((t, n) => t + jt(n), 0);
516
+ }
517
+ function Hn(e, t) {
518
+ if (t === void 0 && (t = Te), !e)
519
+ return;
520
+ const {
521
+ top: n,
522
+ left: r,
523
+ bottom: i,
524
+ right: o
525
+ } = t(e);
526
+ Kt(e) && (i <= 0 || o <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
527
+ block: "center",
528
+ inline: "center"
529
+ });
530
+ }
531
+ const _n = [["x", ["left", "right"], Yn], ["y", ["top", "bottom"], jn]];
532
+ class at {
533
+ constructor(t, n) {
534
+ 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;
535
+ const r = lt(n), i = qt(r);
536
+ this.rect = {
537
+ ...t
538
+ }, this.width = t.width, this.height = t.height;
539
+ for (const [o, l, s] of _n)
540
+ for (const a of l)
541
+ Object.defineProperty(this, a, {
542
+ get: () => {
543
+ const c = s(r), d = i[o] - c;
544
+ return this.rect[a] + d;
545
+ },
546
+ enumerable: !0
547
+ });
548
+ Object.defineProperty(this, "rect", {
549
+ enumerable: !1
550
+ });
551
+ }
552
+ }
553
+ class Se {
554
+ constructor(t) {
555
+ this.target = void 0, this.listeners = [], this.removeAll = () => {
556
+ this.listeners.forEach((n) => {
557
+ var r;
558
+ return (r = this.target) == null ? void 0 : r.removeEventListener(...n);
559
+ });
560
+ }, this.target = t;
561
+ }
562
+ add(t, n, r) {
563
+ var i;
564
+ (i = this.target) == null || i.addEventListener(t, n, r), this.listeners.push([t, n, r]);
565
+ }
566
+ }
567
+ function qn(e) {
568
+ const {
569
+ EventTarget: t
570
+ } = Z(e);
571
+ return e instanceof t ? e : ye(e);
572
+ }
573
+ function Qe(e, t) {
574
+ const n = Math.abs(e.x), r = Math.abs(e.y);
575
+ 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;
576
+ }
577
+ var W;
578
+ (function(e) {
579
+ e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
580
+ })(W || (W = {}));
581
+ function Ot(e) {
582
+ e.preventDefault();
583
+ }
584
+ function Jn(e) {
585
+ e.stopPropagation();
586
+ }
587
+ var m;
588
+ (function(e) {
589
+ e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
590
+ })(m || (m = {}));
591
+ const Jt = {
592
+ start: [m.Space, m.Enter],
593
+ cancel: [m.Esc],
594
+ end: [m.Space, m.Enter, m.Tab]
595
+ }, Vn = (e, t) => {
596
+ let {
597
+ currentCoordinates: n
598
+ } = t;
599
+ switch (e.code) {
600
+ case m.Right:
601
+ return {
602
+ ...n,
603
+ x: n.x + 25
604
+ };
605
+ case m.Left:
606
+ return {
607
+ ...n,
608
+ x: n.x - 25
609
+ };
610
+ case m.Down:
611
+ return {
612
+ ...n,
613
+ y: n.y + 25
614
+ };
615
+ case m.Up:
616
+ return {
617
+ ...n,
618
+ y: n.y - 25
619
+ };
620
+ }
621
+ };
622
+ class Vt {
623
+ constructor(t) {
624
+ this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
625
+ const {
626
+ event: {
627
+ target: n
628
+ }
629
+ } = t;
630
+ this.props = t, this.listeners = new Se(ye(n)), this.windowListeners = new Se(Z(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
631
+ }
632
+ attach() {
633
+ this.handleStart(), this.windowListeners.add(W.Resize, this.handleCancel), this.windowListeners.add(W.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(W.Keydown, this.handleKeyDown));
634
+ }
635
+ handleStart() {
636
+ const {
637
+ activeNode: t,
638
+ onStart: n
639
+ } = this.props, r = t.node.current;
640
+ r && Hn(r), n(j);
641
+ }
642
+ handleKeyDown(t) {
643
+ if (Ft(t)) {
644
+ const {
645
+ active: n,
646
+ context: r,
647
+ options: i
648
+ } = this.props, {
649
+ keyboardCodes: o = Jt,
650
+ coordinateGetter: l = Vn,
651
+ scrollBehavior: s = "smooth"
652
+ } = i, {
653
+ code: a
654
+ } = t;
655
+ if (o.end.includes(a)) {
656
+ this.handleEnd(t);
657
+ return;
658
+ }
659
+ if (o.cancel.includes(a)) {
660
+ this.handleCancel(t);
661
+ return;
662
+ }
663
+ const {
664
+ collisionRect: c
665
+ } = r.current, d = c ? {
666
+ x: c.left,
667
+ y: c.top
668
+ } : j;
669
+ this.referenceCoordinates || (this.referenceCoordinates = d);
670
+ const u = l(t, {
671
+ active: n,
672
+ context: r.current,
673
+ currentCoordinates: d
674
+ });
675
+ if (u) {
676
+ const g = Fe(u, d), f = {
677
+ x: 0,
678
+ y: 0
679
+ }, {
680
+ scrollableAncestors: C
681
+ } = r.current;
682
+ for (const h of C) {
683
+ const v = t.code, {
684
+ isTop: y,
685
+ isRight: D,
686
+ isLeft: w,
687
+ isBottom: I,
688
+ maxScroll: x,
689
+ minScroll: S
690
+ } = _t(h), b = Kn(h), p = {
691
+ x: Math.min(v === m.Right ? b.right - b.width / 2 : b.right, Math.max(v === m.Right ? b.left : b.left + b.width / 2, u.x)),
692
+ y: Math.min(v === m.Down ? b.bottom - b.height / 2 : b.bottom, Math.max(v === m.Down ? b.top : b.top + b.height / 2, u.y))
693
+ }, M = v === m.Right && !D || v === m.Left && !w, z = v === m.Down && !I || v === m.Up && !y;
694
+ if (M && p.x !== u.x) {
695
+ const O = h.scrollLeft + g.x, J = v === m.Right && O <= x.x || v === m.Left && O >= S.x;
696
+ if (J && !g.y) {
697
+ h.scrollTo({
698
+ left: O,
699
+ behavior: s
700
+ });
701
+ return;
702
+ }
703
+ J ? f.x = h.scrollLeft - O : f.x = v === m.Right ? h.scrollLeft - x.x : h.scrollLeft - S.x, f.x && h.scrollBy({
704
+ left: -f.x,
705
+ behavior: s
706
+ });
707
+ break;
708
+ } else if (z && p.y !== u.y) {
709
+ const O = h.scrollTop + g.y, J = v === m.Down && O <= x.y || v === m.Up && O >= S.y;
710
+ if (J && !g.x) {
711
+ h.scrollTo({
712
+ top: O,
713
+ behavior: s
714
+ });
715
+ return;
716
+ }
717
+ J ? f.y = h.scrollTop - O : f.y = v === m.Down ? h.scrollTop - x.y : h.scrollTop - S.y, f.y && h.scrollBy({
718
+ top: -f.y,
719
+ behavior: s
720
+ });
721
+ break;
722
+ }
723
+ }
724
+ this.handleMove(t, pe(Fe(u, this.referenceCoordinates), f));
725
+ }
726
+ }
727
+ }
728
+ handleMove(t, n) {
729
+ const {
730
+ onMove: r
731
+ } = this.props;
732
+ t.preventDefault(), r(n);
733
+ }
734
+ handleEnd(t) {
735
+ const {
736
+ onEnd: n
737
+ } = this.props;
738
+ t.preventDefault(), this.detach(), n();
739
+ }
740
+ handleCancel(t) {
741
+ const {
742
+ onCancel: n
743
+ } = this.props;
744
+ t.preventDefault(), this.detach(), n();
745
+ }
746
+ detach() {
747
+ this.listeners.removeAll(), this.windowListeners.removeAll();
748
+ }
749
+ }
750
+ Vt.activators = [{
751
+ eventName: "onKeyDown",
752
+ handler: (e, t, n) => {
753
+ let {
754
+ keyboardCodes: r = Jt,
755
+ onActivation: i
756
+ } = t, {
757
+ active: o
758
+ } = n;
759
+ const {
760
+ code: l
761
+ } = e.nativeEvent;
762
+ if (r.start.includes(l)) {
763
+ const s = o.activatorNode.current;
764
+ return s && e.target !== s ? !1 : (e.preventDefault(), i?.({
765
+ event: e.nativeEvent
766
+ }), !0);
767
+ }
768
+ return !1;
769
+ }
770
+ }];
771
+ function Nt(e) {
772
+ return !!(e && "distance" in e);
773
+ }
774
+ function Tt(e) {
775
+ return !!(e && "delay" in e);
776
+ }
777
+ class ct {
778
+ constructor(t, n, r) {
779
+ var i;
780
+ r === void 0 && (r = qn(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;
781
+ const {
782
+ event: o
783
+ } = t, {
784
+ target: l
785
+ } = o;
786
+ this.props = t, this.events = n, this.document = ye(l), this.documentListeners = new Se(this.document), this.listeners = new Se(r), this.windowListeners = new Se(Z(l)), this.initialCoordinates = (i = et(o)) != null ? i : j, 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();
787
+ }
788
+ attach() {
789
+ const {
790
+ events: t,
791
+ props: {
792
+ options: {
793
+ activationConstraint: n,
794
+ bypassActivationConstraint: r
795
+ }
796
+ }
797
+ } = this;
798
+ if (this.listeners.add(t.move.name, this.handleMove, {
799
+ passive: !1
800
+ }), 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, Ot), this.windowListeners.add(W.VisibilityChange, this.handleCancel), this.windowListeners.add(W.ContextMenu, Ot), this.documentListeners.add(W.Keydown, this.handleKeydown), n) {
801
+ if (r != null && r({
802
+ event: this.props.event,
803
+ activeNode: this.props.activeNode,
804
+ options: this.props.options
805
+ }))
806
+ return this.handleStart();
807
+ if (Tt(n)) {
808
+ this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
809
+ return;
810
+ }
811
+ if (Nt(n)) {
812
+ this.handlePending(n);
813
+ return;
814
+ }
815
+ }
816
+ this.handleStart();
817
+ }
818
+ detach() {
819
+ this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
820
+ }
821
+ handlePending(t, n) {
822
+ const {
823
+ active: r,
824
+ onPending: i
825
+ } = this.props;
826
+ i(r, t, this.initialCoordinates, n);
827
+ }
828
+ handleStart() {
829
+ const {
830
+ initialCoordinates: t
831
+ } = this, {
832
+ onStart: n
833
+ } = this.props;
834
+ t && (this.activated = !0, this.documentListeners.add(W.Click, Jn, {
835
+ capture: !0
836
+ }), this.removeTextSelection(), this.documentListeners.add(W.SelectionChange, this.removeTextSelection), n(t));
837
+ }
838
+ handleMove(t) {
839
+ var n;
840
+ const {
841
+ activated: r,
842
+ initialCoordinates: i,
843
+ props: o
844
+ } = this, {
845
+ onMove: l,
846
+ options: {
847
+ activationConstraint: s
848
+ }
849
+ } = o;
850
+ if (!i)
851
+ return;
852
+ const a = (n = et(t)) != null ? n : j, c = Fe(i, a);
853
+ if (!r && s) {
854
+ if (Nt(s)) {
855
+ if (s.tolerance != null && Qe(c, s.tolerance))
856
+ return this.handleCancel();
857
+ if (Qe(c, s.distance))
858
+ return this.handleStart();
859
+ }
860
+ if (Tt(s) && Qe(c, s.tolerance))
861
+ return this.handleCancel();
862
+ this.handlePending(s, c);
863
+ return;
864
+ }
865
+ t.cancelable && t.preventDefault(), l(a);
866
+ }
867
+ handleEnd() {
868
+ const {
869
+ onAbort: t,
870
+ onEnd: n
871
+ } = this.props;
872
+ this.detach(), this.activated || t(this.props.active), n();
873
+ }
874
+ handleCancel() {
875
+ const {
876
+ onAbort: t,
877
+ onCancel: n
878
+ } = this.props;
879
+ this.detach(), this.activated || t(this.props.active), n();
880
+ }
881
+ handleKeydown(t) {
882
+ t.code === m.Esc && this.handleCancel();
883
+ }
884
+ removeTextSelection() {
885
+ var t;
886
+ (t = this.document.getSelection()) == null || t.removeAllRanges();
887
+ }
888
+ }
889
+ const Gn = {
890
+ cancel: {
891
+ name: "pointercancel"
892
+ },
893
+ move: {
894
+ name: "pointermove"
895
+ },
896
+ end: {
897
+ name: "pointerup"
898
+ }
899
+ };
900
+ class Gt extends ct {
901
+ constructor(t) {
902
+ const {
903
+ event: n
904
+ } = t, r = ye(n.target);
905
+ super(t, Gn, r);
906
+ }
907
+ }
908
+ Gt.activators = [{
909
+ eventName: "onPointerDown",
910
+ handler: (e, t) => {
911
+ let {
912
+ nativeEvent: n
913
+ } = e, {
914
+ onActivation: r
915
+ } = t;
916
+ return !n.isPrimary || n.button !== 0 ? !1 : (r?.({
917
+ event: n
918
+ }), !0);
919
+ }
920
+ }];
921
+ const Qn = {
922
+ move: {
923
+ name: "mousemove"
924
+ },
925
+ end: {
926
+ name: "mouseup"
927
+ }
928
+ };
929
+ var rt;
930
+ (function(e) {
931
+ e[e.RightClick = 2] = "RightClick";
932
+ })(rt || (rt = {}));
933
+ class Zn extends ct {
934
+ constructor(t) {
935
+ super(t, Qn, ye(t.event.target));
936
+ }
937
+ }
938
+ Zn.activators = [{
939
+ eventName: "onMouseDown",
940
+ handler: (e, t) => {
941
+ let {
942
+ nativeEvent: n
943
+ } = e, {
944
+ onActivation: r
945
+ } = t;
946
+ return n.button === rt.RightClick ? !1 : (r?.({
947
+ event: n
948
+ }), !0);
949
+ }
950
+ }];
951
+ const Ze = {
952
+ cancel: {
953
+ name: "touchcancel"
954
+ },
955
+ move: {
956
+ name: "touchmove"
957
+ },
958
+ end: {
959
+ name: "touchend"
960
+ }
961
+ };
962
+ class er extends ct {
963
+ constructor(t) {
964
+ super(t, Ze);
965
+ }
966
+ static setup() {
967
+ return window.addEventListener(Ze.move.name, t, {
968
+ capture: !1,
969
+ passive: !1
970
+ }), function() {
971
+ window.removeEventListener(Ze.move.name, t);
972
+ };
973
+ function t() {
974
+ }
975
+ }
976
+ }
977
+ er.activators = [{
978
+ eventName: "onTouchStart",
979
+ handler: (e, t) => {
980
+ let {
981
+ nativeEvent: n
982
+ } = e, {
983
+ onActivation: r
984
+ } = t;
985
+ const {
986
+ touches: i
987
+ } = n;
988
+ return i.length > 1 ? !1 : (r?.({
989
+ event: n
990
+ }), !0);
991
+ }
992
+ }];
993
+ var Re;
994
+ (function(e) {
995
+ e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
996
+ })(Re || (Re = {}));
997
+ var Ue;
998
+ (function(e) {
999
+ e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
1000
+ })(Ue || (Ue = {}));
1001
+ function tr(e) {
1002
+ let {
1003
+ acceleration: t,
1004
+ activator: n = Re.Pointer,
1005
+ canScroll: r,
1006
+ draggingRect: i,
1007
+ enabled: o,
1008
+ interval: l = 5,
1009
+ order: s = Ue.TreeOrder,
1010
+ pointerCoordinates: a,
1011
+ scrollableAncestors: c,
1012
+ scrollableAncestorRects: d,
1013
+ delta: u,
1014
+ threshold: g
1015
+ } = e;
1016
+ const f = rr({
1017
+ delta: u,
1018
+ disabled: !o
1019
+ }), [C, h] = gn(), v = L({
1020
+ x: 0,
1021
+ y: 0
1022
+ }), y = L({
1023
+ x: 0,
1024
+ y: 0
1025
+ }), D = A(() => {
1026
+ switch (n) {
1027
+ case Re.Pointer:
1028
+ return a ? {
1029
+ top: a.y,
1030
+ bottom: a.y,
1031
+ left: a.x,
1032
+ right: a.x
1033
+ } : null;
1034
+ case Re.DraggableRect:
1035
+ return i;
1036
+ }
1037
+ }, [n, i, a]), w = L(null), I = Y(() => {
1038
+ const S = w.current;
1039
+ if (!S)
1040
+ return;
1041
+ const b = v.current.x * y.current.x, p = v.current.y * y.current.y;
1042
+ S.scrollBy(b, p);
1043
+ }, []), x = A(() => s === Ue.TreeOrder ? [...c].reverse() : c, [s, c]);
1044
+ R(
1045
+ () => {
1046
+ if (!o || !c.length || !D) {
1047
+ h();
1048
+ return;
1049
+ }
1050
+ for (const S of x) {
1051
+ if (r?.(S) === !1)
1052
+ continue;
1053
+ const b = c.indexOf(S), p = d[b];
1054
+ if (!p)
1055
+ continue;
1056
+ const {
1057
+ direction: M,
1058
+ speed: z
1059
+ } = Xn(S, p, D, t, g);
1060
+ for (const O of ["x", "y"])
1061
+ f[O][M[O]] || (z[O] = 0, M[O] = 0);
1062
+ if (z.x > 0 || z.y > 0) {
1063
+ h(), w.current = S, C(I, l), v.current = z, y.current = M;
1064
+ return;
1065
+ }
1066
+ }
1067
+ v.current = {
1068
+ x: 0,
1069
+ y: 0
1070
+ }, y.current = {
1071
+ x: 0,
1072
+ y: 0
1073
+ }, h();
1074
+ },
1075
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1076
+ [
1077
+ t,
1078
+ I,
1079
+ r,
1080
+ h,
1081
+ o,
1082
+ l,
1083
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1084
+ JSON.stringify(D),
1085
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1086
+ JSON.stringify(f),
1087
+ C,
1088
+ c,
1089
+ x,
1090
+ d,
1091
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1092
+ JSON.stringify(g)
1093
+ ]
1094
+ );
1095
+ }
1096
+ const nr = {
1097
+ x: {
1098
+ [N.Backward]: !1,
1099
+ [N.Forward]: !1
1100
+ },
1101
+ y: {
1102
+ [N.Backward]: !1,
1103
+ [N.Forward]: !1
1104
+ }
1105
+ };
1106
+ function rr(e) {
1107
+ let {
1108
+ delta: t,
1109
+ disabled: n
1110
+ } = e;
1111
+ const r = tt(t);
1112
+ return Ne((i) => {
1113
+ if (n || !r || !i)
1114
+ return nr;
1115
+ const o = {
1116
+ x: Math.sign(t.x - r.x),
1117
+ y: Math.sign(t.y - r.y)
1118
+ };
1119
+ return {
1120
+ x: {
1121
+ [N.Backward]: i.x[N.Backward] || o.x === -1,
1122
+ [N.Forward]: i.x[N.Forward] || o.x === 1
1123
+ },
1124
+ y: {
1125
+ [N.Backward]: i.y[N.Backward] || o.y === -1,
1126
+ [N.Forward]: i.y[N.Forward] || o.y === 1
1127
+ }
1128
+ };
1129
+ }, [n, t, r]);
1130
+ }
1131
+ function or(e, t) {
1132
+ const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
1133
+ return Ne((i) => {
1134
+ var o;
1135
+ return t == null ? null : (o = r ?? i) != null ? o : null;
1136
+ }, [r, t]);
1137
+ }
1138
+ function ir(e, t) {
1139
+ return A(() => e.reduce((n, r) => {
1140
+ const {
1141
+ sensor: i
1142
+ } = r, o = i.activators.map((l) => ({
1143
+ eventName: l.eventName,
1144
+ handler: t(l.handler, r)
1145
+ }));
1146
+ return [...n, ...o];
1147
+ }, []), [e, t]);
1148
+ }
1149
+ var Me;
1150
+ (function(e) {
1151
+ e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
1152
+ })(Me || (Me = {}));
1153
+ var ot;
1154
+ (function(e) {
1155
+ e.Optimized = "optimized";
1156
+ })(ot || (ot = {}));
1157
+ const Lt = /* @__PURE__ */ new Map();
1158
+ function sr(e, t) {
1159
+ let {
1160
+ dragging: n,
1161
+ dependencies: r,
1162
+ config: i
1163
+ } = t;
1164
+ const [o, l] = K(null), {
1165
+ frequency: s,
1166
+ measure: a,
1167
+ strategy: c
1168
+ } = i, d = L(e), u = v(), g = Ae(u), f = Y(function(y) {
1169
+ y === void 0 && (y = []), !g.current && l((D) => D === null ? y : D.concat(y.filter((w) => !D.includes(w))));
1170
+ }, [g]), C = L(null), h = Ne((y) => {
1171
+ if (u && !n)
1172
+ return Lt;
1173
+ if (!y || y === Lt || d.current !== e || o != null) {
1174
+ const D = /* @__PURE__ */ new Map();
1175
+ for (let w of e) {
1176
+ if (!w)
1177
+ continue;
1178
+ if (o && o.length > 0 && !o.includes(w.id) && w.rect.current) {
1179
+ D.set(w.id, w.rect.current);
1180
+ continue;
1181
+ }
1182
+ const I = w.node.current, x = I ? new at(a(I), I) : null;
1183
+ w.rect.current = x, x && D.set(w.id, x);
1184
+ }
1185
+ return D;
1186
+ }
1187
+ return y;
1188
+ }, [e, o, n, u, a]);
1189
+ return R(() => {
1190
+ d.current = e;
1191
+ }, [e]), R(
1192
+ () => {
1193
+ u || f();
1194
+ },
1195
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1196
+ [n, u]
1197
+ ), R(
1198
+ () => {
1199
+ o && o.length > 0 && l(null);
1200
+ },
1201
+ //eslint-disable-next-line react-hooks/exhaustive-deps
1202
+ [JSON.stringify(o)]
1203
+ ), R(
1204
+ () => {
1205
+ u || typeof s != "number" || C.current !== null || (C.current = setTimeout(() => {
1206
+ f(), C.current = null;
1207
+ }, s));
1208
+ },
1209
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1210
+ [s, u, f, ...r]
1211
+ ), {
1212
+ droppableRects: h,
1213
+ measureDroppableContainers: f,
1214
+ measuringScheduled: o != null
1215
+ };
1216
+ function v() {
1217
+ switch (c) {
1218
+ case Me.Always:
1219
+ return !1;
1220
+ case Me.BeforeDragging:
1221
+ return n;
1222
+ default:
1223
+ return !n;
1224
+ }
1225
+ }
1226
+ }
1227
+ function Qt(e, t) {
1228
+ return Ne((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
1229
+ }
1230
+ function lr(e, t) {
1231
+ return Qt(e, t);
1232
+ }
1233
+ function ar(e) {
1234
+ let {
1235
+ callback: t,
1236
+ disabled: n
1237
+ } = e;
1238
+ const r = $t(t), i = A(() => {
1239
+ if (n || typeof window > "u" || typeof window.MutationObserver > "u")
1240
+ return;
1241
+ const {
1242
+ MutationObserver: o
1243
+ } = window;
1244
+ return new o(r);
1245
+ }, [r, n]);
1246
+ return R(() => () => i?.disconnect(), [i]), i;
1247
+ }
1248
+ function Ye(e) {
1249
+ let {
1250
+ callback: t,
1251
+ disabled: n
1252
+ } = e;
1253
+ const r = $t(t), i = A(
1254
+ () => {
1255
+ if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
1256
+ return;
1257
+ const {
1258
+ ResizeObserver: o
1259
+ } = window;
1260
+ return new o(r);
1261
+ },
1262
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1263
+ [n]
1264
+ );
1265
+ return R(() => () => i?.disconnect(), [i]), i;
1266
+ }
1267
+ function cr(e) {
1268
+ return new at(Te(e), e);
1269
+ }
1270
+ function It(e, t, n) {
1271
+ t === void 0 && (t = cr);
1272
+ const [r, i] = K(null);
1273
+ function o() {
1274
+ i((a) => {
1275
+ if (!e)
1276
+ return null;
1277
+ if (e.isConnected === !1) {
1278
+ var c;
1279
+ return (c = a ?? n) != null ? c : null;
1280
+ }
1281
+ const d = t(e);
1282
+ return JSON.stringify(a) === JSON.stringify(d) ? a : d;
1283
+ });
1284
+ }
1285
+ const l = ar({
1286
+ callback(a) {
1287
+ if (e)
1288
+ for (const c of a) {
1289
+ const {
1290
+ type: d,
1291
+ target: u
1292
+ } = c;
1293
+ if (d === "childList" && u instanceof HTMLElement && u.contains(e)) {
1294
+ o();
1295
+ break;
1296
+ }
1297
+ }
1298
+ }
1299
+ }), s = Ye({
1300
+ callback: o
1301
+ });
1302
+ return we(() => {
1303
+ o(), e ? (s?.observe(e), l?.observe(document.body, {
1304
+ childList: !0,
1305
+ subtree: !0
1306
+ })) : (s?.disconnect(), l?.disconnect());
1307
+ }, [e]), r;
1308
+ }
1309
+ function ur(e) {
1310
+ const t = Qt(e);
1311
+ return Xt(e, t);
1312
+ }
1313
+ const kt = [];
1314
+ function dr(e) {
1315
+ const t = L(e), n = Ne((r) => e ? r && r !== kt && e && t.current && e.parentNode === t.current.parentNode ? r : lt(e) : kt, [e]);
1316
+ return R(() => {
1317
+ t.current = e;
1318
+ }, [e]), n;
1319
+ }
1320
+ function fr(e) {
1321
+ const [t, n] = K(null), r = L(e), i = Y((o) => {
1322
+ const l = Ge(o.target);
1323
+ l && n((s) => s ? (s.set(l, nt(l)), new Map(s)) : null);
1324
+ }, []);
1325
+ return R(() => {
1326
+ const o = r.current;
1327
+ if (e !== o) {
1328
+ l(o);
1329
+ const s = e.map((a) => {
1330
+ const c = Ge(a);
1331
+ return c ? (c.addEventListener("scroll", i, {
1332
+ passive: !0
1333
+ }), [c, nt(c)]) : null;
1334
+ }).filter((a) => a != null);
1335
+ n(s.length ? new Map(s) : null), r.current = e;
1336
+ }
1337
+ return () => {
1338
+ l(e), l(o);
1339
+ };
1340
+ function l(s) {
1341
+ s.forEach((a) => {
1342
+ const c = Ge(a);
1343
+ c?.removeEventListener("scroll", i);
1344
+ });
1345
+ }
1346
+ }, [i, e]), A(() => e.length ? t ? Array.from(t.values()).reduce((o, l) => pe(o, l), j) : qt(e) : j, [e, t]);
1347
+ }
1348
+ function zt(e, t) {
1349
+ t === void 0 && (t = []);
1350
+ const n = L(null);
1351
+ return R(
1352
+ () => {
1353
+ n.current = null;
1354
+ },
1355
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1356
+ t
1357
+ ), R(() => {
1358
+ const r = e !== j;
1359
+ r && !n.current && (n.current = e), !r && n.current && (n.current = null);
1360
+ }, [e]), n.current ? Fe(e, n.current) : j;
1361
+ }
1362
+ function hr(e) {
1363
+ R(
1364
+ () => {
1365
+ if (!it)
1366
+ return;
1367
+ const t = e.map((n) => {
1368
+ let {
1369
+ sensor: r
1370
+ } = n;
1371
+ return r.setup == null ? void 0 : r.setup();
1372
+ });
1373
+ return () => {
1374
+ for (const n of t)
1375
+ n?.();
1376
+ };
1377
+ },
1378
+ // TO-DO: Sensors length could theoretically change which would not be a valid dependency
1379
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1380
+ e.map((t) => {
1381
+ let {
1382
+ sensor: n
1383
+ } = t;
1384
+ return n;
1385
+ })
1386
+ );
1387
+ }
1388
+ function gr(e, t) {
1389
+ return A(() => e.reduce((n, r) => {
1390
+ let {
1391
+ eventName: i,
1392
+ handler: o
1393
+ } = r;
1394
+ return n[i] = (l) => {
1395
+ o(l, t);
1396
+ }, n;
1397
+ }, {}), [e, t]);
1398
+ }
1399
+ function Zt(e) {
1400
+ return A(() => e ? Fn(e) : null, [e]);
1401
+ }
1402
+ const Bt = [];
1403
+ function vr(e, t) {
1404
+ t === void 0 && (t = Te);
1405
+ const [n] = e, r = Zt(n ? Z(n) : null), [i, o] = K(Bt);
1406
+ function l() {
1407
+ o(() => e.length ? e.map((a) => Ht(a) ? r : new at(t(a), a)) : Bt);
1408
+ }
1409
+ const s = Ye({
1410
+ callback: l
1411
+ });
1412
+ return we(() => {
1413
+ s?.disconnect(), l(), e.forEach((a) => s?.observe(a));
1414
+ }, [e]), i;
1415
+ }
1416
+ function pr(e) {
1417
+ if (!e)
1418
+ return null;
1419
+ if (e.children.length > 1)
1420
+ return e;
1421
+ const t = e.children[0];
1422
+ return Ke(t) ? t : e;
1423
+ }
1424
+ function br(e) {
1425
+ let {
1426
+ measure: t
1427
+ } = e;
1428
+ const [n, r] = K(null), i = Y((c) => {
1429
+ for (const {
1430
+ target: d
1431
+ } of c)
1432
+ if (Ke(d)) {
1433
+ r((u) => {
1434
+ const g = t(d);
1435
+ return u ? {
1436
+ ...u,
1437
+ width: g.width,
1438
+ height: g.height
1439
+ } : g;
1440
+ });
1441
+ break;
1442
+ }
1443
+ }, [t]), o = Ye({
1444
+ callback: i
1445
+ }), l = Y((c) => {
1446
+ const d = pr(c);
1447
+ o?.disconnect(), d && o?.observe(d), r(d ? t(d) : null);
1448
+ }, [t, o]), [s, a] = $e(l);
1449
+ return A(() => ({
1450
+ nodeRef: s,
1451
+ rect: n,
1452
+ setRef: a
1453
+ }), [n, s, a]);
1454
+ }
1455
+ const wr = [{
1456
+ sensor: Gt,
1457
+ options: {}
1458
+ }, {
1459
+ sensor: Vt,
1460
+ options: {}
1461
+ }], yr = {
1462
+ current: {}
1463
+ }, Pe = {
1464
+ draggable: {
1465
+ measure: Mt
1466
+ },
1467
+ droppable: {
1468
+ measure: Mt,
1469
+ strategy: Me.WhileDragging,
1470
+ frequency: ot.Optimized
1471
+ },
1472
+ dragOverlay: {
1473
+ measure: Te
1474
+ }
1475
+ };
1476
+ class Ee extends Map {
1477
+ get(t) {
1478
+ var n;
1479
+ return t != null && (n = super.get(t)) != null ? n : void 0;
1480
+ }
1481
+ toArray() {
1482
+ return Array.from(this.values());
1483
+ }
1484
+ getEnabled() {
1485
+ return this.toArray().filter((t) => {
1486
+ let {
1487
+ disabled: n
1488
+ } = t;
1489
+ return !n;
1490
+ });
1491
+ }
1492
+ getNodeFor(t) {
1493
+ var n, r;
1494
+ return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
1495
+ }
1496
+ }
1497
+ const mr = {
1498
+ activatorEvent: null,
1499
+ active: null,
1500
+ activeNode: null,
1501
+ activeNodeRect: null,
1502
+ collisions: null,
1503
+ containerNodeRect: null,
1504
+ draggableNodes: /* @__PURE__ */ new Map(),
1505
+ droppableRects: /* @__PURE__ */ new Map(),
1506
+ droppableContainers: /* @__PURE__ */ new Ee(),
1507
+ over: null,
1508
+ dragOverlay: {
1509
+ nodeRef: {
1510
+ current: null
1511
+ },
1512
+ rect: null,
1513
+ setRef: We
1514
+ },
1515
+ scrollableAncestors: [],
1516
+ scrollableAncestorRects: [],
1517
+ measuringConfiguration: Pe,
1518
+ measureDroppableContainers: We,
1519
+ windowRect: null,
1520
+ measuringScheduled: !1
1521
+ }, Dr = {
1522
+ activatorEvent: null,
1523
+ activators: [],
1524
+ active: null,
1525
+ activeNodeRect: null,
1526
+ ariaDescribedById: {
1527
+ draggable: ""
1528
+ },
1529
+ dispatch: We,
1530
+ draggableNodes: /* @__PURE__ */ new Map(),
1531
+ over: null,
1532
+ measureDroppableContainers: We
1533
+ }, je = /* @__PURE__ */ Oe(Dr), en = /* @__PURE__ */ Oe(mr);
1534
+ function xr() {
1535
+ return {
1536
+ draggable: {
1537
+ active: null,
1538
+ initialCoordinates: {
1539
+ x: 0,
1540
+ y: 0
1541
+ },
1542
+ nodes: /* @__PURE__ */ new Map(),
1543
+ translate: {
1544
+ x: 0,
1545
+ y: 0
1546
+ }
1547
+ },
1548
+ droppable: {
1549
+ containers: new Ee()
1550
+ }
1551
+ };
1552
+ }
1553
+ function Cr(e, t) {
1554
+ switch (t.type) {
1555
+ case E.DragStart:
1556
+ return {
1557
+ ...e,
1558
+ draggable: {
1559
+ ...e.draggable,
1560
+ initialCoordinates: t.initialCoordinates,
1561
+ active: t.active
1562
+ }
1563
+ };
1564
+ case E.DragMove:
1565
+ return e.draggable.active == null ? e : {
1566
+ ...e,
1567
+ draggable: {
1568
+ ...e.draggable,
1569
+ translate: {
1570
+ x: t.coordinates.x - e.draggable.initialCoordinates.x,
1571
+ y: t.coordinates.y - e.draggable.initialCoordinates.y
1572
+ }
1573
+ }
1574
+ };
1575
+ case E.DragEnd:
1576
+ case E.DragCancel:
1577
+ return {
1578
+ ...e,
1579
+ draggable: {
1580
+ ...e.draggable,
1581
+ active: null,
1582
+ initialCoordinates: {
1583
+ x: 0,
1584
+ y: 0
1585
+ },
1586
+ translate: {
1587
+ x: 0,
1588
+ y: 0
1589
+ }
1590
+ }
1591
+ };
1592
+ case E.RegisterDroppable: {
1593
+ const {
1594
+ element: n
1595
+ } = t, {
1596
+ id: r
1597
+ } = n, i = new Ee(e.droppable.containers);
1598
+ return i.set(r, n), {
1599
+ ...e,
1600
+ droppable: {
1601
+ ...e.droppable,
1602
+ containers: i
1603
+ }
1604
+ };
1605
+ }
1606
+ case E.SetDroppableDisabled: {
1607
+ const {
1608
+ id: n,
1609
+ key: r,
1610
+ disabled: i
1611
+ } = t, o = e.droppable.containers.get(n);
1612
+ if (!o || r !== o.key)
1613
+ return e;
1614
+ const l = new Ee(e.droppable.containers);
1615
+ return l.set(n, {
1616
+ ...o,
1617
+ disabled: i
1618
+ }), {
1619
+ ...e,
1620
+ droppable: {
1621
+ ...e.droppable,
1622
+ containers: l
1623
+ }
1624
+ };
1625
+ }
1626
+ case E.UnregisterDroppable: {
1627
+ const {
1628
+ id: n,
1629
+ key: r
1630
+ } = t, i = e.droppable.containers.get(n);
1631
+ if (!i || r !== i.key)
1632
+ return e;
1633
+ const o = new Ee(e.droppable.containers);
1634
+ return o.delete(n), {
1635
+ ...e,
1636
+ droppable: {
1637
+ ...e.droppable,
1638
+ containers: o
1639
+ }
1640
+ };
1641
+ }
1642
+ default:
1643
+ return e;
1644
+ }
1645
+ }
1646
+ function Sr(e) {
1647
+ let {
1648
+ disabled: t
1649
+ } = e;
1650
+ const {
1651
+ active: n,
1652
+ activatorEvent: r,
1653
+ draggableNodes: i
1654
+ } = be(je), o = tt(r), l = tt(n?.id);
1655
+ return R(() => {
1656
+ if (!t && !r && o && l != null) {
1657
+ if (!Ft(o) || document.activeElement === o.target)
1658
+ return;
1659
+ const s = i.get(l);
1660
+ if (!s)
1661
+ return;
1662
+ const {
1663
+ activatorNode: a,
1664
+ node: c
1665
+ } = s;
1666
+ if (!a.current && !c.current)
1667
+ return;
1668
+ requestAnimationFrame(() => {
1669
+ for (const d of [a.current, c.current]) {
1670
+ if (!d)
1671
+ continue;
1672
+ const u = vn(d);
1673
+ if (u) {
1674
+ u.focus();
1675
+ break;
1676
+ }
1677
+ }
1678
+ });
1679
+ }
1680
+ }, [r, t, i, l, o]), null;
1681
+ }
1682
+ function Rr(e, t) {
1683
+ let {
1684
+ transform: n,
1685
+ ...r
1686
+ } = t;
1687
+ return e != null && e.length ? e.reduce((i, o) => o({
1688
+ transform: i,
1689
+ ...r
1690
+ }), n) : n;
1691
+ }
1692
+ function Er(e) {
1693
+ return A(
1694
+ () => ({
1695
+ draggable: {
1696
+ ...Pe.draggable,
1697
+ ...e?.draggable
1698
+ },
1699
+ droppable: {
1700
+ ...Pe.droppable,
1701
+ ...e?.droppable
1702
+ },
1703
+ dragOverlay: {
1704
+ ...Pe.dragOverlay,
1705
+ ...e?.dragOverlay
1706
+ }
1707
+ }),
1708
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1709
+ [e?.draggable, e?.droppable, e?.dragOverlay]
1710
+ );
1711
+ }
1712
+ function Ar(e) {
1713
+ let {
1714
+ activeNode: t,
1715
+ measure: n,
1716
+ initialRect: r,
1717
+ config: i = !0
1718
+ } = e;
1719
+ const o = L(!1), {
1720
+ x: l,
1721
+ y: s
1722
+ } = typeof i == "boolean" ? {
1723
+ x: i,
1724
+ y: i
1725
+ } : i;
1726
+ we(() => {
1727
+ if (!l && !s || !t) {
1728
+ o.current = !1;
1729
+ return;
1730
+ }
1731
+ if (o.current || !r)
1732
+ return;
1733
+ const c = t?.node.current;
1734
+ if (!c || c.isConnected === !1)
1735
+ return;
1736
+ const d = n(c), u = Xt(d, r);
1737
+ if (l || (u.x = 0), s || (u.y = 0), o.current = !0, Math.abs(u.x) > 0 || Math.abs(u.y) > 0) {
1738
+ const g = Kt(c);
1739
+ g && g.scrollBy({
1740
+ top: u.y,
1741
+ left: u.x
1742
+ });
1743
+ }
1744
+ }, [t, l, s, r, n]);
1745
+ }
1746
+ const tn = /* @__PURE__ */ Oe({
1747
+ ...j,
1748
+ scaleX: 1,
1749
+ scaleY: 1
1750
+ });
1751
+ var se;
1752
+ (function(e) {
1753
+ e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
1754
+ })(se || (se = {}));
1755
+ const $r = /* @__PURE__ */ dn(function(t) {
1756
+ var n, r, i, o;
1757
+ let {
1758
+ id: l,
1759
+ accessibility: s,
1760
+ autoScroll: a = !0,
1761
+ children: c,
1762
+ sensors: d = wr,
1763
+ collisionDetection: u = Tn,
1764
+ measuring: g,
1765
+ modifiers: f,
1766
+ ...C
1767
+ } = t;
1768
+ const h = fn(Cr, void 0, xr), [v, y] = h, [D, w] = xn(), [I, x] = K(se.Uninitialized), S = I === se.Initialized, {
1769
+ draggable: {
1770
+ active: b,
1771
+ nodes: p,
1772
+ translate: M
1773
+ },
1774
+ droppable: {
1775
+ containers: z
1776
+ }
1777
+ } = v, O = b != null ? p.get(b) : null, J = L({
1778
+ initial: null,
1779
+ translated: null
1780
+ }), V = A(() => {
1781
+ var k;
1782
+ return b != null ? {
1783
+ id: b,
1784
+ // It's possible for the active node to unmount while dragging
1785
+ data: (k = O?.data) != null ? k : yr,
1786
+ rect: J
1787
+ } : null;
1788
+ }, [b, O]), ee = L(null), [ut, dt] = K(null), [G, ft] = K(null), le = Ae(C, Object.values(C)), He = Xe("DndDescribedBy", l), ht = A(() => z.getEnabled(), [z]), ae = Er(g), {
1789
+ droppableRects: de,
1790
+ measureDroppableContainers: Le,
1791
+ measuringScheduled: gt
1792
+ } = sr(ht, {
1793
+ dragging: S,
1794
+ dependencies: [M.x, M.y],
1795
+ config: ae.droppable
1796
+ }), U = or(p, b), vt = A(() => G ? et(G) : null, [G]), pt = un(), bt = lr(U, ae.draggable.measure);
1797
+ Ar({
1798
+ activeNode: b != null ? p.get(b) : null,
1799
+ config: pt.layoutShiftCompensation,
1800
+ initialRect: bt,
1801
+ measure: ae.draggable.measure
1802
+ });
1803
+ const X = It(U, ae.draggable.measure, bt), _e = It(U ? U.parentElement : null), ce = L({
1804
+ activatorEvent: null,
1805
+ active: null,
1806
+ activeNode: U,
1807
+ collisionRect: null,
1808
+ collisions: null,
1809
+ droppableRects: de,
1810
+ draggableNodes: p,
1811
+ draggingNode: null,
1812
+ draggingNodeRect: null,
1813
+ droppableContainers: z,
1814
+ over: null,
1815
+ scrollableAncestors: [],
1816
+ scrollAdjustedTranslate: null
1817
+ }), wt = z.getNodeFor((n = ce.current.over) == null ? void 0 : n.id), ue = br({
1818
+ measure: ae.dragOverlay.measure
1819
+ }), Ie = (r = ue.nodeRef.current) != null ? r : U, fe = S ? (i = ue.rect) != null ? i : X : null, yt = !!(ue.nodeRef.current && ue.rect), mt = ur(yt ? null : X), qe = Zt(Ie ? Z(Ie) : null), te = dr(S ? wt ?? U : null), ke = vr(te), ze = Rr(f, {
1820
+ transform: {
1821
+ x: M.x - mt.x,
1822
+ y: M.y - mt.y,
1823
+ scaleX: 1,
1824
+ scaleY: 1
1825
+ },
1826
+ activatorEvent: G,
1827
+ active: V,
1828
+ activeNodeRect: X,
1829
+ containerNodeRect: _e,
1830
+ draggingNodeRect: fe,
1831
+ over: ce.current.over,
1832
+ overlayNodeRect: ue.rect,
1833
+ scrollableAncestors: te,
1834
+ scrollableAncestorRects: ke,
1835
+ windowRect: qe
1836
+ }), Dt = vt ? pe(vt, M) : null, xt = fr(te), nn = zt(xt), rn = zt(xt, [X]), he = pe(ze, nn), ge = fe ? kn(fe, ze) : null, me = V && ge ? u({
1837
+ active: V,
1838
+ collisionRect: ge,
1839
+ droppableRects: de,
1840
+ droppableContainers: ht,
1841
+ pointerCoordinates: Dt
1842
+ }) : null, Ct = On(me, "id"), [ne, St] = K(null), on = yt ? ze : pe(ze, rn), sn = Ln(on, (o = ne?.rect) != null ? o : null, X), Je = L(null), Rt = Y(
1843
+ (k, B) => {
1844
+ let {
1845
+ sensor: P,
1846
+ options: re
1847
+ } = B;
1848
+ if (ee.current == null)
1849
+ return;
1850
+ const $ = p.get(ee.current);
1851
+ if (!$)
1852
+ return;
1853
+ const F = k.nativeEvent, H = new P({
1854
+ active: ee.current,
1855
+ activeNode: $,
1856
+ event: F,
1857
+ options: re,
1858
+ // Sensors need to be instantiated with refs for arguments that change over time
1859
+ // otherwise they are frozen in time with the stale arguments
1860
+ context: ce,
1861
+ onAbort(T) {
1862
+ if (!p.get(T))
1863
+ return;
1864
+ const {
1865
+ onDragAbort: _
1866
+ } = le.current, Q = {
1867
+ id: T
1868
+ };
1869
+ _?.(Q), D({
1870
+ type: "onDragAbort",
1871
+ event: Q
1872
+ });
1873
+ },
1874
+ onPending(T, oe, _, Q) {
1875
+ if (!p.get(T))
1876
+ return;
1877
+ const {
1878
+ onDragPending: xe
1879
+ } = le.current, ie = {
1880
+ id: T,
1881
+ constraint: oe,
1882
+ initialCoordinates: _,
1883
+ offset: Q
1884
+ };
1885
+ xe?.(ie), D({
1886
+ type: "onDragPending",
1887
+ event: ie
1888
+ });
1889
+ },
1890
+ onStart(T) {
1891
+ const oe = ee.current;
1892
+ if (oe == null)
1893
+ return;
1894
+ const _ = p.get(oe);
1895
+ if (!_)
1896
+ return;
1897
+ const {
1898
+ onDragStart: Q
1899
+ } = le.current, De = {
1900
+ activatorEvent: F,
1901
+ active: {
1902
+ id: oe,
1903
+ data: _.data,
1904
+ rect: J
1905
+ }
1906
+ };
1907
+ Be(() => {
1908
+ Q?.(De), x(se.Initializing), y({
1909
+ type: E.DragStart,
1910
+ initialCoordinates: T,
1911
+ active: oe
1912
+ }), D({
1913
+ type: "onDragStart",
1914
+ event: De
1915
+ }), dt(Je.current), ft(F);
1916
+ });
1917
+ },
1918
+ onMove(T) {
1919
+ y({
1920
+ type: E.DragMove,
1921
+ coordinates: T
1922
+ });
1923
+ },
1924
+ onEnd: ve(E.DragEnd),
1925
+ onCancel: ve(E.DragCancel)
1926
+ });
1927
+ Je.current = H;
1928
+ function ve(T) {
1929
+ return async function() {
1930
+ const {
1931
+ active: _,
1932
+ collisions: Q,
1933
+ over: De,
1934
+ scrollAdjustedTranslate: xe
1935
+ } = ce.current;
1936
+ let ie = null;
1937
+ if (_ && xe) {
1938
+ const {
1939
+ cancelDrop: Ce
1940
+ } = le.current;
1941
+ ie = {
1942
+ activatorEvent: F,
1943
+ active: _,
1944
+ collisions: Q,
1945
+ delta: xe,
1946
+ over: De
1947
+ }, T === E.DragEnd && typeof Ce == "function" && await Promise.resolve(Ce(ie)) && (T = E.DragCancel);
1948
+ }
1949
+ ee.current = null, Be(() => {
1950
+ y({
1951
+ type: T
1952
+ }), x(se.Uninitialized), St(null), dt(null), ft(null), Je.current = null;
1953
+ const Ce = T === E.DragEnd ? "onDragEnd" : "onDragCancel";
1954
+ if (ie) {
1955
+ const Ve = le.current[Ce];
1956
+ Ve?.(ie), D({
1957
+ type: Ce,
1958
+ event: ie
1959
+ });
1960
+ }
1961
+ });
1962
+ };
1963
+ }
1964
+ },
1965
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1966
+ [p]
1967
+ ), ln = Y((k, B) => (P, re) => {
1968
+ const $ = P.nativeEvent, F = p.get(re);
1969
+ if (
1970
+ // Another sensor is already instantiating
1971
+ ee.current !== null || // No active draggable
1972
+ !F || // Event has already been captured
1973
+ $.dndKit || $.defaultPrevented
1974
+ )
1975
+ return;
1976
+ const H = {
1977
+ active: F
1978
+ };
1979
+ k(P, B.options, H) === !0 && ($.dndKit = {
1980
+ capturedBy: B.sensor
1981
+ }, ee.current = re, Rt(P, B));
1982
+ }, [p, Rt]), Et = ir(d, ln);
1983
+ hr(d), we(() => {
1984
+ X && I === se.Initializing && x(se.Initialized);
1985
+ }, [X, I]), R(
1986
+ () => {
1987
+ const {
1988
+ onDragMove: k
1989
+ } = le.current, {
1990
+ active: B,
1991
+ activatorEvent: P,
1992
+ collisions: re,
1993
+ over: $
1994
+ } = ce.current;
1995
+ if (!B || !P)
1996
+ return;
1997
+ const F = {
1998
+ active: B,
1999
+ activatorEvent: P,
2000
+ collisions: re,
2001
+ delta: {
2002
+ x: he.x,
2003
+ y: he.y
2004
+ },
2005
+ over: $
2006
+ };
2007
+ Be(() => {
2008
+ k?.(F), D({
2009
+ type: "onDragMove",
2010
+ event: F
2011
+ });
2012
+ });
2013
+ },
2014
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2015
+ [he.x, he.y]
2016
+ ), R(
2017
+ () => {
2018
+ const {
2019
+ active: k,
2020
+ activatorEvent: B,
2021
+ collisions: P,
2022
+ droppableContainers: re,
2023
+ scrollAdjustedTranslate: $
2024
+ } = ce.current;
2025
+ if (!k || ee.current == null || !B || !$)
2026
+ return;
2027
+ const {
2028
+ onDragOver: F
2029
+ } = le.current, H = re.get(Ct), ve = H && H.rect.current ? {
2030
+ id: H.id,
2031
+ rect: H.rect.current,
2032
+ data: H.data,
2033
+ disabled: H.disabled
2034
+ } : null, T = {
2035
+ active: k,
2036
+ activatorEvent: B,
2037
+ collisions: P,
2038
+ delta: {
2039
+ x: $.x,
2040
+ y: $.y
2041
+ },
2042
+ over: ve
2043
+ };
2044
+ Be(() => {
2045
+ St(ve), F?.(T), D({
2046
+ type: "onDragOver",
2047
+ event: T
2048
+ });
2049
+ });
2050
+ },
2051
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2052
+ [Ct]
2053
+ ), we(() => {
2054
+ ce.current = {
2055
+ activatorEvent: G,
2056
+ active: V,
2057
+ activeNode: U,
2058
+ collisionRect: ge,
2059
+ collisions: me,
2060
+ droppableRects: de,
2061
+ draggableNodes: p,
2062
+ draggingNode: Ie,
2063
+ draggingNodeRect: fe,
2064
+ droppableContainers: z,
2065
+ over: ne,
2066
+ scrollableAncestors: te,
2067
+ scrollAdjustedTranslate: he
2068
+ }, J.current = {
2069
+ initial: fe,
2070
+ translated: ge
2071
+ };
2072
+ }, [V, U, me, ge, p, Ie, fe, de, z, ne, te, he]), tr({
2073
+ ...pt,
2074
+ delta: M,
2075
+ draggingRect: ge,
2076
+ pointerCoordinates: Dt,
2077
+ scrollableAncestors: te,
2078
+ scrollableAncestorRects: ke
2079
+ });
2080
+ const an = A(() => ({
2081
+ active: V,
2082
+ activeNode: U,
2083
+ activeNodeRect: X,
2084
+ activatorEvent: G,
2085
+ collisions: me,
2086
+ containerNodeRect: _e,
2087
+ dragOverlay: ue,
2088
+ draggableNodes: p,
2089
+ droppableContainers: z,
2090
+ droppableRects: de,
2091
+ over: ne,
2092
+ measureDroppableContainers: Le,
2093
+ scrollableAncestors: te,
2094
+ scrollableAncestorRects: ke,
2095
+ measuringConfiguration: ae,
2096
+ measuringScheduled: gt,
2097
+ windowRect: qe
2098
+ }), [V, U, X, G, me, _e, ue, p, z, de, ne, Le, te, ke, ae, gt, qe]), cn = A(() => ({
2099
+ activatorEvent: G,
2100
+ activators: Et,
2101
+ active: V,
2102
+ activeNodeRect: X,
2103
+ ariaDescribedById: {
2104
+ draggable: He
2105
+ },
2106
+ dispatch: y,
2107
+ draggableNodes: p,
2108
+ over: ne,
2109
+ measureDroppableContainers: Le
2110
+ }), [G, Et, V, X, y, He, p, ne, Le]);
2111
+ return q.createElement(Ut.Provider, {
2112
+ value: w
2113
+ }, q.createElement(je.Provider, {
2114
+ value: cn
2115
+ }, q.createElement(en.Provider, {
2116
+ value: an
2117
+ }, q.createElement(tn.Provider, {
2118
+ value: sn
2119
+ }, c)), q.createElement(Sr, {
2120
+ disabled: s?.restoreFocus === !1
2121
+ })), q.createElement(Rn, {
2122
+ ...s,
2123
+ hiddenTextDescribedById: He
2124
+ }));
2125
+ function un() {
2126
+ const k = ut?.autoScrollEnabled === !1, B = typeof a == "object" ? a.enabled === !1 : a === !1, P = S && !k && !B;
2127
+ return typeof a == "object" ? {
2128
+ ...a,
2129
+ enabled: P
2130
+ } : {
2131
+ enabled: P
2132
+ };
2133
+ }
2134
+ }), Mr = /* @__PURE__ */ Oe(null), Pt = "button", Or = "Draggable";
2135
+ function Wr(e) {
2136
+ let {
2137
+ id: t,
2138
+ data: n,
2139
+ disabled: r = !1,
2140
+ attributes: i
2141
+ } = e;
2142
+ const o = Xe(Or), {
2143
+ activators: l,
2144
+ activatorEvent: s,
2145
+ active: a,
2146
+ activeNodeRect: c,
2147
+ ariaDescribedById: d,
2148
+ draggableNodes: u,
2149
+ over: g
2150
+ } = be(je), {
2151
+ role: f = Pt,
2152
+ roleDescription: C = "draggable",
2153
+ tabIndex: h = 0
2154
+ } = i ?? {}, v = a?.id === t, y = be(v ? tn : Mr), [D, w] = $e(), [I, x] = $e(), S = gr(l, t), b = Ae(n);
2155
+ we(
2156
+ () => (u.set(t, {
2157
+ id: t,
2158
+ key: o,
2159
+ node: D,
2160
+ activatorNode: I,
2161
+ data: b
2162
+ }), () => {
2163
+ const M = u.get(t);
2164
+ M && M.key === o && u.delete(t);
2165
+ }),
2166
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2167
+ [u, t]
2168
+ );
2169
+ const p = A(() => ({
2170
+ role: f,
2171
+ tabIndex: h,
2172
+ "aria-disabled": r,
2173
+ "aria-pressed": v && f === Pt ? !0 : void 0,
2174
+ "aria-roledescription": C,
2175
+ "aria-describedby": d.draggable
2176
+ }), [r, f, h, v, C, d.draggable]);
2177
+ return {
2178
+ active: a,
2179
+ activatorEvent: s,
2180
+ activeNodeRect: c,
2181
+ attributes: p,
2182
+ isDragging: v,
2183
+ listeners: r ? void 0 : S,
2184
+ node: D,
2185
+ over: g,
2186
+ setNodeRef: w,
2187
+ setActivatorNodeRef: x,
2188
+ transform: y
2189
+ };
2190
+ }
2191
+ function Ur() {
2192
+ return be(en);
2193
+ }
2194
+ const Nr = "Droppable", Tr = {
2195
+ timeout: 25
2196
+ };
2197
+ function Xr(e) {
2198
+ let {
2199
+ data: t,
2200
+ disabled: n = !1,
2201
+ id: r,
2202
+ resizeObserverConfig: i
2203
+ } = e;
2204
+ const o = Xe(Nr), {
2205
+ active: l,
2206
+ dispatch: s,
2207
+ over: a,
2208
+ measureDroppableContainers: c
2209
+ } = be(je), d = L({
2210
+ disabled: n
2211
+ }), u = L(!1), g = L(null), f = L(null), {
2212
+ disabled: C,
2213
+ updateMeasurementsFor: h,
2214
+ timeout: v
2215
+ } = {
2216
+ ...Tr,
2217
+ ...i
2218
+ }, y = Ae(h ?? r), D = Y(
2219
+ () => {
2220
+ if (!u.current) {
2221
+ u.current = !0;
2222
+ return;
2223
+ }
2224
+ f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
2225
+ c(Array.isArray(y.current) ? y.current : [y.current]), f.current = null;
2226
+ }, v);
2227
+ },
2228
+ //eslint-disable-next-line react-hooks/exhaustive-deps
2229
+ [v]
2230
+ ), w = Ye({
2231
+ callback: D,
2232
+ disabled: C || !l
2233
+ }), I = Y((p, M) => {
2234
+ w && (M && (w.unobserve(M), u.current = !1), p && w.observe(p));
2235
+ }, [w]), [x, S] = $e(I), b = Ae(t);
2236
+ return R(() => {
2237
+ !w || !x.current || (w.disconnect(), u.current = !1, w.observe(x.current));
2238
+ }, [x, w]), R(
2239
+ () => (s({
2240
+ type: E.RegisterDroppable,
2241
+ element: {
2242
+ id: r,
2243
+ key: o,
2244
+ disabled: n,
2245
+ node: x,
2246
+ rect: g,
2247
+ data: b
2248
+ }
2249
+ }), () => s({
2250
+ type: E.UnregisterDroppable,
2251
+ key: o,
2252
+ id: r
2253
+ })),
2254
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2255
+ [r]
2256
+ ), R(() => {
2257
+ n !== d.current.disabled && (s({
2258
+ type: E.SetDroppableDisabled,
2259
+ id: r,
2260
+ key: o,
2261
+ disabled: n
2262
+ }), d.current.disabled = n);
2263
+ }, [r, o, n, s]), {
2264
+ active: l,
2265
+ rect: g,
2266
+ isOver: a?.id === r,
2267
+ node: x,
2268
+ over: a,
2269
+ setNodeRef: S
2270
+ };
2271
+ }
2272
+ export {
2273
+ Re as AutoScrollActivator,
2274
+ $r as DndContext,
2275
+ m as KeyboardCode,
2276
+ Vt as KeyboardSensor,
2277
+ ot as MeasuringFrequency,
2278
+ Me as MeasuringStrategy,
2279
+ Zn as MouseSensor,
2280
+ Gt as PointerSensor,
2281
+ er as TouchSensor,
2282
+ Ue as TraversalOrder,
2283
+ Rr as applyModifiers,
2284
+ Fr as closestCenter,
2285
+ Sn as defaultAnnouncements,
2286
+ j as defaultCoordinates,
2287
+ Vn as defaultKeyboardCoordinateGetter,
2288
+ Cn as defaultScreenReaderInstructions,
2289
+ Te as getClientRect,
2290
+ On as getFirstCollision,
2291
+ lt as getScrollableAncestors,
2292
+ Tn as rectIntersection,
2293
+ Ur as useDndContext,
2294
+ Dn as useDndMonitor,
2295
+ Wr as useDraggable,
2296
+ Xr as useDroppable,
2297
+ Br as useSensor,
2298
+ Pr as useSensors
2299
+ };