@nimbus-ds/patterns 1.13.0 → 1.14.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.
- package/CHANGELOG.md +6 -0
- package/dist/CHANGELOG.md +6 -0
- package/dist/ProductDataList/index.d.ts +195 -0
- package/dist/ProductDataList/index.js +2 -0
- package/dist/index.d.ts +125 -0
- package/dist/index.js +1 -1
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Nimbus is an open-source Design System created by Tiendanube / Nuvesmhop’s team to empower and enhance more stories every day, with simplicity, accessibility, consistency and performance.
|
|
4
4
|
|
|
5
|
+
## 2025-04-25 `1.14.0`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Added `ProductDataList` component. ([#111](https://github.com/TiendaNube/nimbus-patterns/pull/111) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
|
|
5
11
|
## 2025-04-25 `1.13.0`
|
|
6
12
|
|
|
7
13
|
#### 🎉 New features
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Nimbus is an open-source Design System created by Tiendanube / Nuvesmhop’s team to empower and enhance more stories every day, with simplicity, accessibility, consistency and performance.
|
|
4
4
|
|
|
5
|
+
## 2025-04-25 `1.14.0`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Added `ProductDataList` component. ([#111](https://github.com/TiendaNube/nimbus-patterns/pull/111) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
|
|
5
11
|
## 2025-04-25 `1.13.0`
|
|
6
12
|
|
|
7
13
|
#### 🎉 New features
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v8.0.0
|
|
2
|
+
|
|
3
|
+
import { DndContextProps, DragEndEvent, DragOverEvent, DragOverlayProps, DragStartEvent, PointerSensorOptions, UniqueIdentifier } from '@dnd-kit/core';
|
|
4
|
+
import { BoxProps } from '@nimbus-ds/components';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Properties specific to the ProductDataListItem component
|
|
10
|
+
*/
|
|
11
|
+
export interface ProductDataListItemProperties {
|
|
12
|
+
/**
|
|
13
|
+
* The id of the product
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
/**
|
|
17
|
+
* The title of the product
|
|
18
|
+
*/
|
|
19
|
+
title: string;
|
|
20
|
+
/**
|
|
21
|
+
* The image URL of the product
|
|
22
|
+
*/
|
|
23
|
+
imageUrl?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Alternative text for the product image
|
|
26
|
+
*/
|
|
27
|
+
imageAlt?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the item is draggable
|
|
30
|
+
*/
|
|
31
|
+
isDraggable?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Callback fired when remove button is clicked
|
|
34
|
+
*/
|
|
35
|
+
onRemove?: () => void;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the item has a divider
|
|
38
|
+
*/
|
|
39
|
+
withDivider?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Additional content to be rendered
|
|
42
|
+
*/
|
|
43
|
+
children?: ReactNode;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Props that can be passed to the ProductDataListItem component
|
|
47
|
+
*/
|
|
48
|
+
export type ProductDataListItemProps = ProductDataListItemProperties;
|
|
49
|
+
export declare const ProductDataListItem: React.FC<ProductDataListItemProps>;
|
|
50
|
+
declare const orientation: {
|
|
51
|
+
readonly vertical: "vertical";
|
|
52
|
+
readonly horizontal: "horizontal";
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Base type for items that can be sorted
|
|
56
|
+
*/
|
|
57
|
+
export type SortableItemType = {
|
|
58
|
+
/** Unique identifier for the sortable item */
|
|
59
|
+
id: UniqueIdentifier;
|
|
60
|
+
};
|
|
61
|
+
export type InternalDndContextSettings = Omit<DndContextProps, "children" | "sensors" | "collisionDetection" | "onDragStart" | "onDragOver" | "onDragEnd">;
|
|
62
|
+
/**
|
|
63
|
+
* Properties specific to the Sortable component
|
|
64
|
+
*/
|
|
65
|
+
export interface SortableProperties<T extends SortableItemType> {
|
|
66
|
+
/** The children components */
|
|
67
|
+
children: ReactNode;
|
|
68
|
+
/** Whether to disable sorting functionality */
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
/** The items to be sorted */
|
|
71
|
+
items: T[];
|
|
72
|
+
/** Callback fired when items are reordered */
|
|
73
|
+
onReorder: (items: T[]) => void;
|
|
74
|
+
/** Callback fired when drag starts */
|
|
75
|
+
onDragStart?: (event: DragStartEvent) => void;
|
|
76
|
+
/** Callback fired during drag */
|
|
77
|
+
onDragOver?: (event: DragOverEvent) => void;
|
|
78
|
+
/** Callback fired when drag ends */
|
|
79
|
+
onDragEnd?: (event: DragEndEvent) => void;
|
|
80
|
+
/** The orientation of the sortable list */
|
|
81
|
+
orientation?: typeof orientation.vertical | typeof orientation.horizontal;
|
|
82
|
+
/**
|
|
83
|
+
* Custom sensor options for drag detection
|
|
84
|
+
* @example
|
|
85
|
+
* ```tsx
|
|
86
|
+
* <Sortable
|
|
87
|
+
* sensorOptions={{
|
|
88
|
+
* activationConstraint: {
|
|
89
|
+
* distance: 20, // Allow movements up to 20px
|
|
90
|
+
* delay: 150, // Wait 150ms before canceling
|
|
91
|
+
* tolerance: 5 // Tolerate 5px of movement
|
|
92
|
+
* }
|
|
93
|
+
* }}
|
|
94
|
+
* >
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
sensorOptions?: PointerSensorOptions;
|
|
98
|
+
/** Configuration for the drag overlay appearance and behavior */
|
|
99
|
+
overlaySettings?: Omit<DragOverlayProps, "wrapperElement" | "style">;
|
|
100
|
+
/** Settings for the DndContext */
|
|
101
|
+
dndContextSettings?: Omit<InternalDndContextSettings, "accessibility">;
|
|
102
|
+
/** Render function for the dragged item overlay */
|
|
103
|
+
renderOverlay?: (item: T) => ReactNode;
|
|
104
|
+
}
|
|
105
|
+
export type SortableProps<T extends SortableItemType> = SortableProperties<T> & {
|
|
106
|
+
/** Configuration for the drag overlay appearance and behavior */
|
|
107
|
+
overlaySettings?: DragOverlayProps;
|
|
108
|
+
/** Settings for the DndContext */
|
|
109
|
+
dndContextSettings?: InternalDndContextSettings;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Properties specific to the ProductDataListProducts component
|
|
113
|
+
*
|
|
114
|
+
* @template T - The type of each sortable item in the list
|
|
115
|
+
*/
|
|
116
|
+
export interface ProductDataListProductsProperties<T extends SortableItemType> {
|
|
117
|
+
/**
|
|
118
|
+
* The array of items to be rendered and sorted in the list.
|
|
119
|
+
*/
|
|
120
|
+
items: T[];
|
|
121
|
+
/**
|
|
122
|
+
* Callback fired when the order of items changes.
|
|
123
|
+
*
|
|
124
|
+
* @param items - The reordered array of items
|
|
125
|
+
*/
|
|
126
|
+
onReorder: (items: T[]) => void;
|
|
127
|
+
/**
|
|
128
|
+
* If true, enables drag-and-drop sorting for the list items.
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
sortable?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Function to render each item in the list.
|
|
134
|
+
*
|
|
135
|
+
* @param item - The item to render
|
|
136
|
+
* @param index - The index of the item in the list
|
|
137
|
+
* @returns The rendered node for the item
|
|
138
|
+
*/
|
|
139
|
+
renderItem: (item: T, index: number) => ReactNode;
|
|
140
|
+
/**
|
|
141
|
+
* Additional properties to pass to the sortable container.
|
|
142
|
+
*/
|
|
143
|
+
sortableProps?: object;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Props that can be passed to the ProductDataListProducts component, including sortable and layout properties.
|
|
147
|
+
*
|
|
148
|
+
* @template T - The type of each sortable item in the list
|
|
149
|
+
*/
|
|
150
|
+
export type ProductDataListProductsProps<T extends SortableItemType> = ProductDataListProductsProperties<T> & {
|
|
151
|
+
/**
|
|
152
|
+
* Additional properties for the sortable container, omitting core sortable and layout props.
|
|
153
|
+
*/
|
|
154
|
+
sortableProps?: Omit<SortableProps<T>, "items" | "onReorder" | "orientation" | "disabled" | "renderOverlay" | "children">;
|
|
155
|
+
} & Omit<BoxProps, "my" | "display" | "flexDirection" | "gap">;
|
|
156
|
+
export declare function ProductDataListProducts<T extends SortableItemType>({ sortable, items, onReorder, renderItem, sortableProps, children, ...props }: ProductDataListProductsProps<T>): React.ReactElement;
|
|
157
|
+
export declare namespace ProductDataListProducts {
|
|
158
|
+
var displayName: string;
|
|
159
|
+
}
|
|
160
|
+
export type ProductDataListSectionProperties = PropsWithChildren<{
|
|
161
|
+
title?: ReactNode;
|
|
162
|
+
description?: ReactNode;
|
|
163
|
+
content?: ReactNode;
|
|
164
|
+
link: ReactNode;
|
|
165
|
+
}>;
|
|
166
|
+
export type ProductDataListSectionProps = ProductDataListSectionProperties & Omit<BoxProps, "padding" | "display" | "flexDirection" | "gap">;
|
|
167
|
+
export declare const ProductDataListSection: React.FC<ProductDataListSectionProps>;
|
|
168
|
+
export type ProductDataListItemDividerProperties = Pick<BoxProps, "borderTopWidth" | "borderBottomWidth" | "borderColor" | "borderStyle" | "width" | "id">;
|
|
169
|
+
export declare const ProductDataListItemDivider: React.FC<ProductDataListItemDividerProperties>;
|
|
170
|
+
/**
|
|
171
|
+
* Properties specific to the ProductDataList component
|
|
172
|
+
*/
|
|
173
|
+
export interface ProductDataListProperties {
|
|
174
|
+
/**
|
|
175
|
+
* The content to be rendered inside the list
|
|
176
|
+
*/
|
|
177
|
+
children: ReactNode;
|
|
178
|
+
/**
|
|
179
|
+
* Optional title for the list section
|
|
180
|
+
*/
|
|
181
|
+
title?: ReactNode;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Props that can be passed to the ProductDataList component
|
|
185
|
+
*/
|
|
186
|
+
export type ProductDataListProps = ProductDataListProperties & Omit<BoxProps, "padding" | "display" | "flexDirection" | "gap">;
|
|
187
|
+
export interface ProductDataListComponents {
|
|
188
|
+
Products: typeof ProductDataListProducts;
|
|
189
|
+
Item: typeof ProductDataListItem;
|
|
190
|
+
Section: typeof ProductDataListSection;
|
|
191
|
+
ItemDivider: typeof ProductDataListItemDivider;
|
|
192
|
+
}
|
|
193
|
+
export declare const ProductDataList: React.FC<ProductDataListProps> & ProductDataListComponents;
|
|
194
|
+
|
|
195
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/components"),require("@nimbus-ds/icons"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/components","@nimbus-ds/icons","react-dom"],t):"object"==typeof exports?exports["@nimbus-ds/patterns"]=t(require("react"),require("@nimbus-ds/components"),require("@nimbus-ds/icons"),require("react-dom")):e["@nimbus-ds/patterns"]=t(e.react,e["@nimbus-ds/components"],e["@nimbus-ds/icons"],e["react-dom"])}(global,((e,t,n,r)=>(()=>{"use strict";var o={1540:(e,t,n)=>{n.r(t),n.d(t,{AutoScrollActivator:()=>xe,DndContext:()=>Qe,DragOverlay:()=>bt,KeyboardCode:()=>ie,KeyboardSensor:()=>ue,MeasuringFrequency:()=>Ie,MeasuringStrategy:()=>Ce,MouseSensor:()=>me,PointerSensor:()=>ge,TouchSensor:()=>we,TraversalOrder:()=>Se,applyModifiers:()=>Ve,closestCenter:()=>R,closestCorners:()=>O,defaultAnnouncements:()=>v,defaultCoordinates:()=>y,defaultDropAnimation:()=>vt,defaultDropAnimationSideEffects:()=>ft,defaultKeyboardCoordinateGetter:()=>ce,defaultScreenReaderInstructions:()=>f,getClientRect:()=>B,getFirstCollision:()=>C,getScrollableAncestors:()=>F,pointerWithin:()=>L,rectIntersection:()=>P,useDndContext:()=>nt,useDndMonitor:()=>d,useDraggable:()=>tt,useDroppable:()=>it,useSensor:()=>b,useSensors:()=>m});var r=n(8156),o=n.n(r),i=n(7111),a=n(2851);const l={display:"none"};function s(e){let{id:t,value:n}=e;return o().createElement("div",{id:t,style:l},n)}function c(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return o().createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const u=(0,r.createContext)(null);function d(e){const t=(0,r.useContext)(u);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}const f={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},v={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function p(e){let{announcements:t=v,container:n,hiddenTextDescribedById:l,screenReaderInstructions:u=f}=e;const{announce:p,announcement:g}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),h=(0,a.useUniqueId)("DndLiveRegion"),[b,m]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{m(!0)}),[]),d((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;p(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&p(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;p(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;p(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;p(t.onDragCancel({active:n,over:r}))}})),[p,t])),!b)return null;const y=o().createElement(o().Fragment,null,o().createElement(s,{id:l,value:u.draggable}),o().createElement(c,{id:h,announcement:g}));return n?(0,i.createPortal)(y,n):y}var g;function h(){}function b(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(g||(g={}));const y=Object.freeze({x:0,y:0});function w(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function x(e,t){const n=(0,a.getEventCoordinates)(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function S(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function D(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function E(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function C(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function I(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const R=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=I(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=w(I(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(S)},O=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=E(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=E(r),a=o.reduce(((e,t,r)=>e+w(n[r],t)),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(S)};function _(e,t){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,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const P=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=_(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(D)};function M(e,t){const{top:n,left:r,bottom:o,right:i}=t;return n<=e.y&&e.y<=o&&r<=e.x&&e.x<=i}const L=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const o=[];for(const e of t){const{id:t}=e,i=n.get(t);if(i&&M(r,i)){const n=E(i).reduce(((e,t)=>e+w(r,t)),0),a=Number((n/4).toFixed(4));o.push({id:t,data:{droppableContainer:e,value:a}})}}return o.sort(S)};function N(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:y}function T(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const j=T(1);function A(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const k={ignoreTransform:!1};function B(e,t){void 0===t&&(t=k);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,a.getWindow)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=A(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),c=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s}}(n,t,r))}const{top:r,left:o,width:i,height:l,bottom:s,right:c}=n;return{top:r,left:o,width:i,height:l,bottom:s,right:c}}function z(e){return B(e,{ignoreTransform:!0})}function F(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,a.isDocument)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,a.isHTMLElement)(o)||(0,a.isSVGElement)(o))return n;if(n.includes(o))return n;const i=(0,a.getWindow)(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=(0,a.getWindow)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=(0,a.getWindow)(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function K(e){const[t]=F(e,1);return null!=t?t:null}function U(e){return a.canUseDOM&&e?(0,a.isWindow)(e)?e:(0,a.isNode)(e)?(0,a.isDocument)(e)||e===(0,a.getOwnerDocument)(e).scrollingElement?window:(0,a.isHTMLElement)(e)?e:null:null:null}function W(e){return(0,a.isWindow)(e)?e.scrollX:e.scrollLeft}function Y(e){return(0,a.isWindow)(e)?e.scrollY:e.scrollTop}function H(e){return{x:W(e),y:Y(e)}}var X;function q(e){return!(!a.canUseDOM||!e)&&e===document.scrollingElement}function V(e){const t={x:0,y:0},n=q(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(X||(X={}));const G={x:.2,y:.2};function J(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=G);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=V(e),v={x:0,y:0},p={x:0,y:0},g=t.height*o.y,h=t.width*o.x;return!c&&i<=t.top+g?(v.y=X.Backward,p.y=r*Math.abs((t.top+g-i)/g)):!u&&s>=t.bottom-g&&(v.y=X.Forward,p.y=r*Math.abs((t.bottom-g-s)/g)),!f&&l>=t.right-h?(v.x=X.Forward,p.x=r*Math.abs((t.right-h-l)/h)):!d&&a<=t.left+h&&(v.x=X.Backward,p.x=r*Math.abs((t.left+h-a)/h)),{direction:v,speed:p}}function Q(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Z(e){return e.reduce(((e,t)=>(0,a.add)(e,H(t))),y)}function $(e,t){if(void 0===t&&(t=B),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);K(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ee=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+W(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+Y(t)),0)}]];class te{constructor(e,t){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;const n=F(t),r=Z(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of ee)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ne{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function re(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?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}var oe,ie;function ae(e){e.preventDefault()}function le(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(oe||(oe={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(ie||(ie={}));const se={start:[ie.Space,ie.Enter],cancel:[ie.Esc],end:[ie.Space,ie.Enter,ie.Tab]},ce=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ie.Right:return{...n,x:n.x+25};case ie.Left:return{...n,x:n.x-25};case ie.Down:return{...n,y:n.y+25};case ie.Up:return{...n,y:n.y-25}}};class ue{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new ne((0,a.getOwnerDocument)(t)),this.windowListeners=new ne((0,a.getWindow)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(oe.Resize,this.handleCancel),this.windowListeners.add(oe.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(oe.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&$(n),t(y)}handleKeyDown(e){if((0,a.isKeyboardEvent)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=se,coordinateGetter:i=ce,scrollBehavior:l="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:y;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=(0,a.subtract)(d,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:c,maxScroll:u,minScroll:f}=V(n),v=Q(n),p={x:Math.min(o===ie.Right?v.right-v.width/2:v.right,Math.max(o===ie.Right?v.left:v.left+v.width/2,d.x)),y:Math.min(o===ie.Down?v.bottom-v.height/2:v.bottom,Math.max(o===ie.Down?v.top:v.top+v.height/2,d.y))},g=o===ie.Right&&!a||o===ie.Left&&!s,h=o===ie.Down&&!c||o===ie.Up&&!i;if(g&&p.x!==d.x){const e=n.scrollLeft+t.x,i=o===ie.Right&&e<=u.x||o===ie.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});r.x=i?n.scrollLeft-e:o===ie.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:l});break}if(h&&p.y!==d.y){const e=n.scrollTop+t.y,i=o===ie.Down&&e<=u.y||o===ie.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});r.y=i?n.scrollTop-e:o===ie.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:l});break}}this.handleMove(e,(0,a.add)((0,a.subtract)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function de(e){return Boolean(e&&"distance"in e)}function fe(e){return Boolean(e&&"delay"in e)}ue.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=se,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class ve{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,a.getWindow)(e);return e instanceof t?e:(0,a.getOwnerDocument)(e)}(e.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=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=(0,a.getOwnerDocument)(i),this.documentListeners=new ne(this.document),this.listeners=new ne(n),this.windowListeners=new ne((0,a.getWindow)(i)),this.initialCoordinates=null!=(r=(0,a.getEventCoordinates)(o))?r:y,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()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(oe.Resize,this.handleCancel),this.windowListeners.add(oe.DragStart,ae),this.windowListeners.add(oe.VisibilityChange,this.handleCancel),this.windowListeners.add(oe.ContextMenu,ae),this.documentListeners.add(oe.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(fe(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(de(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(oe.Click,le,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(oe.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:l}}=o;if(!r)return;const s=null!=(t=(0,a.getEventCoordinates)(e))?t:y,c=(0,a.subtract)(r,s);if(!n&&l){if(de(l)){if(null!=l.tolerance&&re(c,l.tolerance))return this.handleCancel();if(re(c,l.distance))return this.handleStart()}return fe(l)&&re(c,l.tolerance)?this.handleCancel():void this.handlePending(l,c)}e.cancelable&&e.preventDefault(),i(s)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===ie.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const pe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ge extends ve{constructor(e){const{event:t}=e,n=(0,a.getOwnerDocument)(t.target);super(e,pe,n)}}ge.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const he={move:{name:"mousemove"},end:{name:"mouseup"}};var be;!function(e){e[e.RightClick=2]="RightClick"}(be||(be={}));class me extends ve{constructor(e){super(e,he,(0,a.getOwnerDocument)(e.event.target))}}me.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==be.RightClick&&(null==r||r({event:n}),!0)}}];const ye={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class we extends ve{constructor(e){super(e,ye)}static setup(){return window.addEventListener(ye.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ye.move.name,e)};function e(){}}}var xe,Se;function De(e){let{acceleration:t,activator:n=xe.Pointer,canScroll:o,draggingRect:i,enabled:l,interval:s=5,order:c=Se.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:f,delta:v,threshold:p}=e;const g=function(e){let{delta:t,disabled:n}=e;const r=(0,a.usePrevious)(t);return(0,a.useLazyMemo)((e=>{if(n||!r||!e)return Ee;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[X.Backward]:e.x[X.Backward]||-1===o.x,[X.Forward]:e.x[X.Forward]||1===o.x},y:{[X.Backward]:e.y[X.Backward]||-1===o.y,[X.Forward]:e.y[X.Forward]||1===o.y}}}),[n,t,r])}({delta:v,disabled:!l}),[h,b]=(0,a.useInterval)(),m=(0,r.useRef)({x:0,y:0}),y=(0,r.useRef)({x:0,y:0}),w=(0,r.useMemo)((()=>{switch(n){case xe.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case xe.DraggableRect:return i}}),[n,i,u]),x=(0,r.useRef)(null),S=(0,r.useCallback)((()=>{const e=x.current;if(!e)return;const t=m.current.x*y.current.x,n=m.current.y*y.current.y;e.scrollBy(t,n)}),[]),D=(0,r.useMemo)((()=>c===Se.TreeOrder?[...d].reverse():d),[c,d]);(0,r.useEffect)((()=>{if(l&&d.length&&w){for(const e of D){if(!1===(null==o?void 0:o(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:a}=J(e,r,w,t,p);for(const e of["x","y"])g[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return b(),x.current=e,h(S,s),m.current=a,void(y.current=i)}m.current={x:0,y:0},y.current={x:0,y:0},b()}else b()}),[t,S,o,b,l,s,JSON.stringify(w),JSON.stringify(g),h,d,D,f,JSON.stringify(p)])}we.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(xe||(xe={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Se||(Se={}));const Ee={x:{[X.Backward]:!1,[X.Forward]:!1},y:{[X.Backward]:!1,[X.Forward]:!1}};var Ce,Ie;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Ce||(Ce={})),function(e){e.Optimized="optimized"}(Ie||(Ie={}));const Re=new Map;function Oe(e,t){return(0,a.useLazyMemo)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function _e(e){let{callback:t,disabled:n}=e;const o=(0,a.useEvent)(t),i=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return(0,r.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function Pe(e){return new te(B(e),e)}function Me(e,t,n){void 0===t&&(t=Pe);const[o,i]=(0,r.useState)(null);function l(){i((r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}))}const s=function(e){let{callback:t,disabled:n}=e;const o=(0,a.useEvent)(t),i=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return(0,r.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){l();break}}}}),c=_e({callback:l});return(0,a.useIsomorphicLayoutEffect)((()=>{l(),e?(null==c||c.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==s||s.disconnect())}),[e]),o}const Le=[];function Ne(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==y;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,a.subtract)(e,n.current):y}function Te(e){return(0,r.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const je=[];function Ae(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,a.isHTMLElement)(t)?t:e}const ke=[{sensor:ge,options:{}},{sensor:ue,options:{}}],Be={current:{}},ze={draggable:{measure:z},droppable:{measure:z,strategy:Ce.WhileDragging,frequency:Ie.Optimized},dragOverlay:{measure:B}};class Fe extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ke={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Fe,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:h},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ze,measureDroppableContainers:h,windowRect:null,measuringScheduled:!1},Ue={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:h,draggableNodes:new Map,over:null,measureDroppableContainers:h},We=(0,r.createContext)(Ue),Ye=(0,r.createContext)(Ke);function He(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Fe}}}function Xe(e,t){switch(t.type){case g.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case g.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case g.DragEnd:case g.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case g.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Fe(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case g.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Fe(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case g.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Fe(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function qe(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=(0,r.useContext)(We),l=(0,a.usePrevious)(o),s=(0,a.usePrevious)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!o&&l&&null!=s){if(!(0,a.isKeyboardEvent)(l))return;if(document.activeElement===l.target)return;const e=i.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,a.findFirstFocusableNode)(e);if(t){t.focus();break}}}))}}),[o,t,i,s,l]),null}function Ve(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Ge=(0,r.createContext)({...y,scaleX:1,scaleY:1});var Je;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Je||(Je={}));const Qe=(0,r.memo)((function(e){var t,n,l,s;let{id:c,accessibility:d,autoScroll:f=!0,children:v,sensors:h=ke,collisionDetection:b=P,measuring:m,modifiers:w,...x}=e;const S=(0,r.useReducer)(Xe,void 0,He),[D,E]=S,[I,R]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[O,_]=(0,r.useState)(Je.Uninitialized),M=O===Je.Initialized,{draggable:{active:L,nodes:T,translate:A},droppable:{containers:k}}=D,z=null!=L?T.get(L):null,W=(0,r.useRef)({initial:null,translated:null}),Y=(0,r.useMemo)((()=>{var e;return null!=L?{id:L,data:null!=(e=null==z?void 0:z.data)?e:Be,rect:W}:null}),[L,z]),X=(0,r.useRef)(null),[V,G]=(0,r.useState)(null),[J,Q]=(0,r.useState)(null),$=(0,a.useLatestValue)(x,Object.values(x)),ee=(0,a.useUniqueId)("DndDescribedBy",c),ne=(0,r.useMemo)((()=>k.getEnabled()),[k]),re=(oe=m,(0,r.useMemo)((()=>({draggable:{...ze.draggable,...null==oe?void 0:oe.draggable},droppable:{...ze.droppable,...null==oe?void 0:oe.droppable},dragOverlay:{...ze.dragOverlay,...null==oe?void 0:oe.dragOverlay}})),[null==oe?void 0:oe.draggable,null==oe?void 0:oe.droppable,null==oe?void 0:oe.dragOverlay]));var oe;const{droppableRects:ie,measureDroppableContainers:ae,measuringScheduled:le}=function(e,t){let{dragging:n,dependencies:o,config:i}=t;const[l,s]=(0,r.useState)(null),{frequency:c,measure:u,strategy:d}=i,f=(0,r.useRef)(e),v=function(){switch(d){case Ce.Always:return!1;case Ce.BeforeDragging:return n;default:return!n}}(),p=(0,a.useLatestValue)(v),g=(0,r.useCallback)((function(e){void 0===e&&(e=[]),p.current||s((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[p]),h=(0,r.useRef)(null),b=(0,a.useLazyMemo)((t=>{if(v&&!n)return Re;if(!t||t===Re||f.current!==e||null!=l){const t=new Map;for(let n of e){if(!n)continue;if(l&&l.length>0&&!l.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new te(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,l,n,v,u]);return(0,r.useEffect)((()=>{f.current=e}),[e]),(0,r.useEffect)((()=>{v||g()}),[n,v]),(0,r.useEffect)((()=>{l&&l.length>0&&s(null)}),[JSON.stringify(l)]),(0,r.useEffect)((()=>{v||"number"!=typeof c||null!==h.current||(h.current=setTimeout((()=>{g(),h.current=null}),c))}),[c,v,g,...o]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:null!=l}}(ne,{dragging:M,dependencies:[A.x,A.y],config:re.droppable}),se=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return(0,a.useLazyMemo)((e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(T,L),ce=(0,r.useMemo)((()=>J?(0,a.getEventCoordinates)(J):null),[J]),ue=function(){const e=!1===(null==V?void 0:V.autoScrollEnabled),t="object"==typeof f?!1===f.enabled:!1===f,n=M&&!e&&!t;if("object"==typeof f)return{...f,enabled:n};return{enabled:n}}(),de=function(e,t){return Oe(e,t)}(se,re.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const l=(0,r.useRef)(!1),{x:s,y:c}="boolean"==typeof i?{x:i,y:i}:i;(0,a.useIsomorphicLayoutEffect)((()=>{if(!s&&!c||!t)return void(l.current=!1);if(l.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=N(n(e),o);if(s||(r.x=0),c||(r.y=0),l.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=K(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,s,c,o,n])}({activeNode:null!=L?T.get(L):null,config:ue.layoutShiftCompensation,initialRect:de,measure:re.draggable.measure});const fe=Me(se,re.draggable.measure,de),ve=Me(se?se.parentElement:null),pe=(0,r.useRef)({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:ie,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ge=k.getNodeFor(null==(t=pe.current.over)?void 0:t.id),he=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),i=_e({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,a.isHTMLElement)(n)){o((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),l=(0,r.useCallback)((e=>{const n=Ae(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),o(n?t(n):null)}),[t,i]),[s,c]=(0,a.useNodeRef)(l);return(0,r.useMemo)((()=>({nodeRef:s,rect:n,setRef:c})),[n,s,c])}({measure:re.dragOverlay.measure}),be=null!=(n=he.nodeRef.current)?n:se,me=M?null!=(l=he.rect)?l:fe:null,ye=Boolean(he.nodeRef.current&&he.rect),we=N(xe=ye?null:fe,Oe(xe));var xe;const Se=Te(be?(0,a.getWindow)(be):null),Ee=function(e){const t=(0,r.useRef)(e),n=(0,a.useLazyMemo)((n=>e?n&&n!==Le&&e&&t.current&&e.parentNode===t.current.parentNode?n:F(e):Le),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(M?null!=ge?ge:se:null),Ie=function(e,t){void 0===t&&(t=B);const[n]=e,o=Te(n?(0,a.getWindow)(n):null),[i,l]=(0,r.useState)(je);function s(){l((()=>e.length?e.map((e=>q(e)?o:new te(t(e),e))):je))}const c=_e({callback:s});return(0,a.useIsomorphicLayoutEffect)((()=>{null==c||c.disconnect(),s(),e.forEach((e=>null==c?void 0:c.observe(e)))}),[e]),i}(Ee),Pe=Ve(w,{transform:{x:A.x-we.x,y:A.y-we.y,scaleX:1,scaleY:1},activatorEvent:J,active:Y,activeNodeRect:fe,containerNodeRect:ve,draggingNodeRect:me,over:pe.current.over,overlayNodeRect:he.rect,scrollableAncestors:Ee,scrollableAncestorRects:Ie,windowRect:Se}),Fe=ce?(0,a.add)(ce,A):null,Ke=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),i=(0,r.useCallback)((e=>{const t=U(e.target);t&&n((e=>e?(e.set(t,H(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=o.current;if(e!==t){r(t);const a=e.map((e=>{const t=U(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,H(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=U(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,a.add)(e,t)),y):Z(e):y),[e,t])}(Ee),Ue=Ne(Ke),Qe=Ne(Ke,[fe]),Ze=(0,a.add)(Pe,Ue),$e=me?j(me,Pe):null,et=Y&&$e?b({active:Y,collisionRect:$e,droppableRects:ie,droppableContainers:ne,pointerCoordinates:Fe}):null,tt=C(et,"id"),[nt,rt]=(0,r.useState)(null),ot=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ye?Pe:(0,a.add)(Pe,Qe),null!=(s=null==nt?void 0:nt.rect)?s:null,fe),it=(0,r.useRef)(null),at=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==X.current)return;const o=T.get(X.current);if(!o)return;const a=e.nativeEvent,l=new n({active:X.current,activeNode:o,event:a,options:r,context:pe,onAbort(e){if(!T.get(e))return;const{onDragAbort:t}=$.current,n={id:e};null==t||t(n),I({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!T.get(e))return;const{onDragPending:o}=$.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),I({type:"onDragPending",event:i})},onStart(e){const t=X.current;if(null==t)return;const n=T.get(t);if(!n)return;const{onDragStart:r}=$.current,o={activatorEvent:a,active:{id:t,data:n.data,rect:W}};(0,i.unstable_batchedUpdates)((()=>{null==r||r(o),_(Je.Initializing),E({type:g.DragStart,initialCoordinates:e,active:t}),I({type:"onDragStart",event:o}),G(it.current),Q(a)}))},onMove(e){E({type:g.DragMove,coordinates:e})},onEnd:s(g.DragEnd),onCancel:s(g.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=pe.current;let l=null;if(t&&o){const{cancelDrop:i}=$.current;if(l={activatorEvent:a,active:t,collisions:n,delta:o,over:r},e===g.DragEnd&&"function"==typeof i){await Promise.resolve(i(l))&&(e=g.DragCancel)}}X.current=null,(0,i.unstable_batchedUpdates)((()=>{E({type:e}),_(Je.Uninitialized),rt(null),G(null),Q(null),it.current=null;const t=e===g.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=$.current[t];null==e||e(l),I({type:t,event:l})}}))}}it.current=l}),[T]),lt=(0,r.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=T.get(r);if(null!==X.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},X.current=r,at(n,t))}),[T,at]),st=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(h,lt);!function(e){(0,r.useEffect)((()=>{if(!a.canUseDOM)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(h),(0,a.useIsomorphicLayoutEffect)((()=>{fe&&O===Je.Initializing&&_(Je.Initialized)}),[fe,O]),(0,r.useEffect)((()=>{const{onDragMove:e}=$.current,{active:t,activatorEvent:n,collisions:r,over:o}=pe.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:Ze.x,y:Ze.y},over:o};(0,i.unstable_batchedUpdates)((()=>{null==e||e(a),I({type:"onDragMove",event:a})}))}),[Ze.x,Ze.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=pe.current;if(!e||null==X.current||!t||!o)return;const{onDragOver:a}=$.current,l=r.get(tt),s=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};(0,i.unstable_batchedUpdates)((()=>{rt(s),null==a||a(c),I({type:"onDragOver",event:c})}))}),[tt]),(0,a.useIsomorphicLayoutEffect)((()=>{pe.current={activatorEvent:J,active:Y,activeNode:se,collisionRect:$e,collisions:et,droppableRects:ie,draggableNodes:T,draggingNode:be,draggingNodeRect:me,droppableContainers:k,over:nt,scrollableAncestors:Ee,scrollAdjustedTranslate:Ze},W.current={initial:me,translated:$e}}),[Y,se,et,$e,T,be,me,ie,k,nt,Ee,Ze]),De({...ue,delta:A,draggingRect:$e,pointerCoordinates:Fe,scrollableAncestors:Ee,scrollableAncestorRects:Ie});const ct=(0,r.useMemo)((()=>({active:Y,activeNode:se,activeNodeRect:fe,activatorEvent:J,collisions:et,containerNodeRect:ve,dragOverlay:he,draggableNodes:T,droppableContainers:k,droppableRects:ie,over:nt,measureDroppableContainers:ae,scrollableAncestors:Ee,scrollableAncestorRects:Ie,measuringConfiguration:re,measuringScheduled:le,windowRect:Se})),[Y,se,fe,J,et,ve,he,T,k,ie,nt,ae,Ee,Ie,re,le,Se]),ut=(0,r.useMemo)((()=>({activatorEvent:J,activators:st,active:Y,activeNodeRect:fe,ariaDescribedById:{draggable:ee},dispatch:E,draggableNodes:T,over:nt,measureDroppableContainers:ae})),[J,st,Y,fe,E,ee,T,nt,ae]);return o().createElement(u.Provider,{value:R},o().createElement(We.Provider,{value:ut},o().createElement(Ye.Provider,{value:ct},o().createElement(Ge.Provider,{value:ot},v)),o().createElement(qe,{disabled:!1===(null==d?void 0:d.restoreFocus)})),o().createElement(p,{...d,hiddenTextDescribedById:ee}))})),Ze=(0,r.createContext)(null),$e="button",et="Draggable";function tt(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const l=(0,a.useUniqueId)(et),{activators:s,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:f,draggableNodes:v,over:p}=(0,r.useContext)(We),{role:g=$e,roleDescription:h="draggable",tabIndex:b=0}=null!=i?i:{},m=(null==u?void 0:u.id)===t,y=(0,r.useContext)(m?Ge:Ze),[w,x]=(0,a.useNodeRef)(),[S,D]=(0,a.useNodeRef)(),E=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(s,t),C=(0,a.useLatestValue)(n);(0,a.useIsomorphicLayoutEffect)((()=>(v.set(t,{id:t,key:l,node:w,activatorNode:S,data:C}),()=>{const e=v.get(t);e&&e.key===l&&v.delete(t)})),[v,t]);return{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,r.useMemo)((()=>({role:g,tabIndex:b,"aria-disabled":o,"aria-pressed":!(!m||g!==$e)||void 0,"aria-roledescription":h,"aria-describedby":f.draggable})),[o,g,b,m,h,f.draggable]),isDragging:m,listeners:o?void 0:E,node:w,over:p,setNodeRef:x,setActivatorNodeRef:D,transform:y}}function nt(){return(0,r.useContext)(Ye)}const rt="Droppable",ot={timeout:25};function it(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const l=(0,a.useUniqueId)(rt),{active:s,dispatch:c,over:u,measureDroppableContainers:d}=(0,r.useContext)(We),f=(0,r.useRef)({disabled:n}),v=(0,r.useRef)(!1),p=(0,r.useRef)(null),h=(0,r.useRef)(null),{disabled:b,updateMeasurementsFor:m,timeout:y}={...ot,...i},w=(0,a.useLatestValue)(null!=m?m:o),x=_e({callback:(0,r.useCallback)((()=>{v.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout((()=>{d(Array.isArray(w.current)?w.current:[w.current]),h.current=null}),y)):v.current=!0}),[y]),disabled:b||!s}),S=(0,r.useCallback)(((e,t)=>{x&&(t&&(x.unobserve(t),v.current=!1),e&&x.observe(e))}),[x]),[D,E]=(0,a.useNodeRef)(S),C=(0,a.useLatestValue)(t);return(0,r.useEffect)((()=>{x&&D.current&&(x.disconnect(),v.current=!1,x.observe(D.current))}),[D,x]),(0,r.useEffect)((()=>(c({type:g.RegisterDroppable,element:{id:o,key:l,disabled:n,node:D,rect:p,data:C}}),()=>c({type:g.UnregisterDroppable,key:l,id:o}))),[o]),(0,r.useEffect)((()=>{n!==f.current.disabled&&(c({type:g.SetDroppableDisabled,id:o,key:l,disabled:n}),f.current.disabled=n)}),[o,l,n,c]),{active:s,rect:p,isOver:(null==u?void 0:u.id)===o,node:D,over:u,setNodeRef:E}}function at(e){let{animation:t,children:n}=e;const[i,l]=(0,r.useState)(null),[s,c]=(0,r.useState)(null),u=(0,a.usePrevious)(n);return n||i||!u||l(u),(0,a.useIsomorphicLayoutEffect)((()=>{if(!s)return;const e=null==i?void 0:i.key,n=null==i?void 0:i.props.id;null!=e&&null!=n?Promise.resolve(t(n,s)).then((()=>{l(null)})):l(null)}),[t,i,s]),o().createElement(o().Fragment,null,n,i?(0,r.cloneElement)(i,{ref:c}):null)}const lt={x:0,y:0,scaleX:1,scaleY:1};function st(e){let{children:t}=e;return o().createElement(We.Provider,{value:Ue},o().createElement(Ge.Provider,{value:lt},t))}const ct={position:"fixed",touchAction:"none"},ut=e=>(0,a.isKeyboardEvent)(e)?"transform 250ms ease":void 0,dt=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:l,className:s,rect:c,style:u,transform:d,transition:f=ut}=e;if(!c)return null;const v=i?d:{...d,scaleX:1,scaleY:1},p={...ct,width:c.width,height:c.height,top:c.top,left:c.left,transform:a.CSS.Transform.toString(v),transformOrigin:i&&r?x(r,c):void 0,transition:"function"==typeof f?f(r):f,...u};return o().createElement(n,{className:s,style:p,ref:t},l)})),ft=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(null!=i&&i.active)for(const[e,t]of Object.entries(i.active))void 0!==t&&(o[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=i&&i.dragOverlay)for(const[e,t]of Object.entries(i.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(o))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},vt={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:a.CSS.Transform.toString(t)},{transform:a.CSS.Transform.toString(n)}]},sideEffects:ft({styles:{active:{opacity:"0"}}})};function pt(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return(0,a.useEvent)(((e,i)=>{if(null===t)return;const l=n.get(e);if(!l)return;const s=l.node.current;if(!s)return;const c=Ae(i);if(!c)return;const{transform:u}=(0,a.getWindow)(i).getComputedStyle(i),d=A(u);if(!d)return;const f="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...vt,...e};return e=>{let{active:i,dragOverlay:a,transform:l,...s}=e;if(!t)return;const c={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},u={scaleX:1!==l.scaleX?i.rect.width*l.scaleX/a.rect.width:1,scaleY:1!==l.scaleY?i.rect.height*l.scaleY/a.rect.height:1},d={x:l.x-c.x,y:l.y-c.y,...u},f=o({...s,active:i,dragOverlay:a,transform:{initial:l,final:d}}),[v]=f,p=f[f.length-1];if(JSON.stringify(v)===JSON.stringify(p))return;const g=null==r?void 0:r({active:i,dragOverlay:a,...s}),h=a.node.animate(f,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{h.onfinish=()=>{null==g||g(),e()}}))}}(t);return $(s,o.draggable.measure),f({active:{id:e,data:l.data,node:s,rect:o.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:o,transform:d})}))}let gt=0;function ht(e){return(0,r.useMemo)((()=>{if(null!=e)return gt++,gt}),[e])}const bt=o().memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:l,modifiers:s,wrapperElement:c="div",className:u,zIndex:d=999}=e;const{activatorEvent:f,active:v,activeNodeRect:p,containerNodeRect:g,draggableNodes:h,droppableContainers:b,dragOverlay:m,over:y,measuringConfiguration:w,scrollableAncestors:x,scrollableAncestorRects:S,windowRect:D}=nt(),E=(0,r.useContext)(Ge),C=ht(null==v?void 0:v.id),I=Ve(s,{activatorEvent:f,active:v,activeNodeRect:p,containerNodeRect:g,draggingNodeRect:m.rect,over:y,overlayNodeRect:m.rect,scrollableAncestors:x,scrollableAncestorRects:S,transform:E,windowRect:D}),R=Oe(p),O=pt({config:i,draggableNodes:h,droppableContainers:b,measuringConfiguration:w}),_=R?m.setRef:void 0;return o().createElement(st,null,o().createElement(at,{animation:O},v&&C?o().createElement(dt,{key:C,id:v.id,ref:_,as:c,activatorEvent:f,adjustScale:t,className:u,transition:l,rect:R,style:{zIndex:d,...a},transform:I},n):null))}))},6548:(e,t,n)=>{n.r(t),n.d(t,{SortableContext:()=>y,arrayMove:()=>l,arraySwap:()=>s,defaultAnimateLayoutChanges:()=>x,defaultNewIndexGetter:()=>w,hasSortableData:()=>R,horizontalListSortingStrategy:()=>f,rectSortingStrategy:()=>v,rectSwappingStrategy:()=>p,sortableKeyboardCoordinates:()=>_,useSortable:()=>I,verticalListSortingStrategy:()=>h});var r=n(8156),o=n.n(r),i=n(1540),a=n(2851);function l(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function s(e,t,n){const r=e.slice();return r[t]=e[n],r[n]=e[t],r}function c(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function u(e){return null!==e&&e>=0}const d={scaleX:1,scaleY:1},f=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:i,index:a}=e;const l=null!=(t=n[o])?t:r;if(!l)return null;const s=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];if(!r||!o&&!i)return 0;if(n<t)return o?r.left-(o.left+o.width):i.left-(r.left+r.width);return i?i.left-(r.left+r.width):r.left-(o.left+o.width)}(n,a,o);if(a===o){const e=n[i];return e?{x:o<i?e.left+e.width-(l.left+l.width):e.left-l.left,y:0,...d}:null}return a>o&&a<=i?{x:-l.width-s,y:0,...d}:a<o&&a>=i?{x:l.width+s,y:0,...d}:{x:0,y:0,...d}};const v=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=l(t,r,n),a=t[o],s=i[o];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},p=e=>{let t,n,{activeIndex:r,index:o,rects:i,overIndex:a}=e;return o===r&&(t=i[o],n=i[a]),o===a&&(t=i[o],n=i[r]),n&&t?{x:n.left-t.left,y:n.top-t.top,scaleX:n.width/t.width,scaleY:n.height/t.height}:null},g={scaleX:1,scaleY:1},h=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const l=null!=(t=i[n])?t:r;if(!l)return null;if(o===n){const e=i[a];return e?{x:0,y:n<a?e.top+e.height-(l.top+l.height):e.top-l.top,...g}:null}const s=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];if(!r)return 0;if(n<t)return o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0;return i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0}(i,o,n);return o>n&&o<=a?{x:0,y:-l.height-s,...g}:o<n&&o>=a?{x:0,y:l.height+s,...g}:{x:0,y:0,...g}};const b="Sortable",m=o().createContext({activeIndex:-1,containerId:b,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:v,disabled:{draggable:!1,droppable:!1}});function y(e){let{children:t,id:n,items:l,strategy:s=v,disabled:u=!1}=e;const{active:d,dragOverlay:f,droppableRects:p,over:g,measureDroppableContainers:h}=(0,i.useDndContext)(),y=(0,a.useUniqueId)(b,n),w=Boolean(null!==f.rect),x=(0,r.useMemo)((()=>l.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[l]),S=null!=d,D=d?x.indexOf(d.id):-1,E=g?x.indexOf(g.id):-1,C=(0,r.useRef)(x),I=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(x,C.current),R=-1!==E&&-1===D||I,O=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);(0,a.useIsomorphicLayoutEffect)((()=>{I&&S&&h(x)}),[I,x,S,h]),(0,r.useEffect)((()=>{C.current=x}),[x]);const _=(0,r.useMemo)((()=>({activeIndex:D,containerId:y,disabled:O,disableTransforms:R,items:x,overIndex:E,useDragOverlay:w,sortedRects:c(x,p),strategy:s})),[D,y,O.draggable,O.droppable,R,x,E,p,w,s]);return o().createElement(m.Provider,{value:_},t)}const w=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return l(n,r,o).indexOf(t)},x=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!(!c||!r)&&((l===i||o!==a)&&(!!n||a!==o&&t===s))},S={duration:200,easing:"ease"},D="transform",E=a.CSS.Transition.toString({property:D,duration:0,easing:"linear"}),C={roleDescription:"sortable"};function I(e){let{animateLayoutChanges:t=x,attributes:n,disabled:o,data:l,getNewIndex:s=w,id:c,strategy:d,resizeObserverConfig:f,transition:v=S}=e;const{items:p,containerId:g,activeIndex:h,disabled:b,disableTransforms:y,sortedRects:I,overIndex:R,useDragOverlay:O,strategy:_}=(0,r.useContext)(m),P=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(o,b),M=p.indexOf(c),L=(0,r.useMemo)((()=>({sortable:{containerId:g,index:M,items:p},...l})),[g,l,M,p]),N=(0,r.useMemo)((()=>p.slice(p.indexOf(c))),[p,c]),{rect:T,node:j,isOver:A,setNodeRef:k}=(0,i.useDroppable)({id:c,data:L,disabled:P.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...f}}),{active:B,activatorEvent:z,activeNodeRect:F,attributes:K,setNodeRef:U,listeners:W,isDragging:Y,over:H,setActivatorNodeRef:X,transform:q}=(0,i.useDraggable)({id:c,data:L,attributes:{...C,...n},disabled:P.draggable}),V=(0,a.useCombinedRefs)(k,U),G=Boolean(B),J=G&&!y&&u(h)&&u(R),Q=!O&&Y,Z=Q&&J?q:null,$=J?null!=Z?Z:(null!=d?d:_)({rects:I,activeNodeRect:F,activeIndex:h,overIndex:R,index:M}):null,ee=u(h)&&u(R)?s({id:c,items:p,activeIndex:h,overIndex:R}):M,te=null==B?void 0:B.id,ne=(0,r.useRef)({activeId:te,items:p,newIndex:ee,containerId:g}),re=p!==ne.current.items,oe=t({active:B,containerId:g,isDragging:Y,isSorting:G,id:c,index:M,items:p,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:v,wasDragging:null!=ne.current.activeId}),ie=function(e){let{disabled:t,index:n,node:o,rect:l}=e;const[s,c]=(0,r.useState)(null),u=(0,r.useRef)(n);return(0,a.useIsomorphicLayoutEffect)((()=>{if(!t&&n!==u.current&&o.current){const e=l.current;if(e){const t=(0,i.getClientRect)(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==u.current&&(u.current=n)}),[t,n,o,l]),(0,r.useEffect)((()=>{s&&c(null)}),[s]),s}({disabled:!oe,index:M,node:j,rect:T});return(0,r.useEffect)((()=>{G&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),g!==ne.current.containerId&&(ne.current.containerId=g),p!==ne.current.items&&(ne.current.items=p)}),[G,ee,g,p]),(0,r.useEffect)((()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout((()=>{ne.current.activeId=te}),50);return()=>clearTimeout(e)}),[te]),{active:B,activeIndex:h,attributes:K,data:L,rect:T,index:M,newIndex:ee,items:p,isOver:A,isSorting:G,isDragging:Y,listeners:W,node:j,overIndex:R,over:H,setNodeRef:V,setActivatorNodeRef:X,setDroppableNodeRef:k,setDraggableNodeRef:U,transform:null!=ie?ie:$,transition:function(){if(ie||re&&ne.current.newIndex===M)return E;if(Q&&!(0,a.isKeyboardEvent)(z)||!v)return;if(G||oe)return a.CSS.Transition.toString({...v,property:D});return}()}}function R(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const O=[i.KeyboardCode.Down,i.KeyboardCode.Right,i.KeyboardCode.Up,i.KeyboardCode.Left],_=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:l,over:s,scrollableAncestors:c}}=t;if(O.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];l.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const a=o.get(n.id);if(a)switch(e.code){case i.KeyboardCode.Down:r.top<a.top&&t.push(n);break;case i.KeyboardCode.Up:r.top>a.top&&t.push(n);break;case i.KeyboardCode.Left:r.left>a.left&&t.push(n);break;case i.KeyboardCode.Right:r.left<a.left&&t.push(n)}}));const u=(0,i.closestCorners)({active:n,collisionRect:r,droppableRects:o,droppableContainers:t,pointerCoordinates:null});let d=(0,i.getFirstCollision)(u,"id");if(d===(null==s?void 0:s.id)&&u.length>1&&(d=u[1].id),null!=d){const e=l.get(n.id),t=l.get(d),s=t?o.get(t.id):null,u=null==t?void 0:t.node.current;if(u&&s&&e&&t){const n=(0,i.getScrollableAncestors)(u).some(((e,t)=>c[t]!==e)),o=P(e,t),l=function(e,t){if(!R(e)||!R(t))return!1;if(!P(e,t))return!1;return e.data.current.sortable.index<t.data.current.sortable.index}(e,t),d=n||!o?{x:0,y:0}:{x:l?r.width-s.width:0,y:l?r.height-s.height:0},f={x:s.left,y:s.top};return d.x&&d.y?f:(0,a.subtract)(f,d)}}}};function P(e,t){return!(!R(e)||!R(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}},2851:(e,t,n)=>{n.r(t),n.d(t,{CSS:()=>_,add:()=>D,canUseDOM:()=>i,findFirstFocusableNode:()=>M,getEventCoordinates:()=>O,getOwnerDocument:()=>f,getWindow:()=>s,hasViewportRelativeCoordinates:()=>C,isDocument:()=>c,isHTMLElement:()=>u,isKeyboardEvent:()=>I,isNode:()=>l,isSVGElement:()=>d,isTouchEvent:()=>R,isWindow:()=>a,subtract:()=>E,useCombinedRefs:()=>o,useEvent:()=>p,useInterval:()=>g,useIsomorphicLayoutEffect:()=>v,useLatestValue:()=>h,useLazyMemo:()=>b,useNodeRef:()=>m,usePrevious:()=>y,useUniqueId:()=>x});var r=n(8156);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}const i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function l(e){return"nodeType"in e}function s(e){var t,n;return e?a(e)?e:l(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=s(e);return e instanceof t}function u(e){return!a(e)&&e instanceof s(e).HTMLElement}function d(e){return e instanceof s(e).SVGElement}function f(e){return e?a(e)?e.document:l(e)?c(e)?e:u(e)||d(e)?e.ownerDocument:document:document:document}const v=i?r.useLayoutEffect:r.useEffect;function p(e){const t=(0,r.useRef)(e);return v((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function g(){const e=(0,r.useRef)(null);return[(0,r.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function h(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return v((()=>{n.current!==e&&(n.current=e)}),t),n}function b(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function m(e){const t=p(e),n=(0,r.useRef)(null),o=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function y(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let w={};function x(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[e]=n,e+"-"+n}),[e,t])}function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const D=S(1),E=S(-1);function C(e){return"clientX"in e&&"clientY"in e}function I(e){if(!e)return!1;const{KeyboardEvent:t}=s(e.target);return t&&e instanceof t}function R(e){if(!e)return!1;const{TouchEvent:t}=s(e.target);return t&&e instanceof t}function O(e){if(R(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return C(e)?{x:e.clientX,y:e.clientY}:null}const _=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_.Translate.toString(e),_.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),P="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function M(e){return e.matches(P)?e:e.querySelector(P)}},3454:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDataList=void 0;const r=n(5163).__importDefault(n(8156)),o=n(5280),i=n(385),a=({children:e,title:t,...n})=>r.default.createElement(o.Box,{padding:"4",display:"flex",flexDirection:"column",gap:"4",...n},t&&r.default.createElement(o.Title,{as:"h4"},t),e);t.ProductDataList=a,a.Item=i.ProductDataListItem,a.Products=i.ProductDataListProducts,a.Section=i.ProductDataListSection,a.ItemDivider=i.ProductDataListItemDivider,a.displayName="ProductDataList",a.Item.displayName="ProductDataList.Item",a.Products.displayName="ProductDataList.Products",a.ItemDivider.displayName="ProductDataList.ItemDivider",a.Section.displayName="ProductDataList.Section"},3289:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(5163);r.__exportStar(n(3660),t),r.__exportStar(n(385),t)},985:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDataListItem=void 0;const r=n(5163).__importDefault(n(8156)),o=n(5280),i=n(3215),a=n(7880),l=n(8583),s=({id:e,title:t,imageUrl:n,imageAlt:s,isDraggable:c=!1,withDivider:u=!1,onRemove:d,children:f})=>{const v=r.default.createElement(o.Box,{display:"flex",flexDirection:"column",gap:"2"},r.default.createElement(o.Box,{display:"flex",alignItems:"center",gap:"3",px:"2"},c&&r.default.createElement(o.Box,{as:"span",className:"handle",cursor:"grab"},r.default.createElement(a.Sortable.ItemHandle,null,r.default.createElement(o.Box,{display:"flex",alignItems:"center",justifyContent:"center"},r.default.createElement(o.Text,null,r.default.createElement(i.DragDotsIcon,{size:"small"}))))),n&&r.default.createElement(o.Box,{width:"12",height:"12",borderRadius:"1"},r.default.createElement(o.Thumbnail,{src:n,alt:s||t,width:"56px",height:"56px"})),r.default.createElement(o.Box,{flex:"1",display:"flex",flexDirection:"column",gap:"1"},r.default.createElement(o.Text,null,t),f),d&&r.default.createElement(o.Box,{justifyContent:"flex-end"},r.default.createElement(o.IconButton,{source:r.default.createElement(i.TrashIcon,null),size:"2rem",onClick:d}))),u&&r.default.createElement(l.ProductDataListItemDivider,{"data-testid":"divider"}));return c?r.default.createElement(a.Sortable.Item,{key:e,id:e,handle:!0},v):v};t.ProductDataListItem=s,s.displayName="ProductDataList.Item"},2919:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDataListItem=void 0;var r=n(985);Object.defineProperty(t,"ProductDataListItem",{enumerable:!0,get:function(){return r.ProductDataListItem}})},8583:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDataListItemDivider=void 0;const r=n(5163).__importDefault(n(8156)),o=n(5280);t.ProductDataListItemDivider=({...e})=>r.default.createElement(o.Box,{borderTopWidth:"1",borderBottomWidth:"none",borderColor:"neutral-surfaceHighlight",borderStyle:"solid",...e})},892:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDataListItemDivider=void 0;var r=n(8583);Object.defineProperty(t,"ProductDataListItemDivider",{enumerable:!0,get:function(){return r.ProductDataListItemDivider}})},4017:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDataListProducts=void 0;const r=n(5163).__importStar(n(8156)),o=n(5280),i=n(7880),a=n(892);function l({sortable:e,items:t,onReorder:n,renderItem:l,sortableProps:s,children:c,...u}){const[d,f]=(0,r.useState)(null);return r.default.createElement(i.Sortable,{...s,items:t,onReorder:n,orientation:"vertical",disabled:!e,renderOverlay:e=>r.default.createElement(o.Box,{display:"flex",flexDirection:"column",backgroundColor:"neutral-background",boxShadow:"3",paddingTop:"2"},l(e,0)),onDragStart:e=>{f(e.active.id),s?.onDragStart?.(e)},onDragEnd:e=>{f(null),s?.onDragEnd?.(e)}},r.default.createElement(o.Box,{display:"flex",flexDirection:"column",gap:"2",overflowY:"auto",maxHeight:"370px",...u},c,r.default.createElement(a.ProductDataListItemDivider,null),t.map(((e,t)=>r.default.createElement(r.default.Fragment,{key:e.id},r.default.createElement("div",{"aria-hidden":d===e.id,style:{opacity:d===e.id?0:1}},l(e,t)))))))}t.ProductDataListProducts=l,l.displayName="ProductDataList.Products"},1820:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDataListProducts=void 0;var r=n(4017);Object.defineProperty(t,"ProductDataListProducts",{enumerable:!0,get:function(){return r.ProductDataListProducts}})},4735:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDataListSection=void 0;const r=n(5163).__importDefault(n(8156)),o=n(5280);t.ProductDataListSection=({title:e,description:t,content:n,link:i,children:a,...l})=>r.default.createElement(o.Box,{display:"flex",flexDirection:"column",gap:"4",...l},r.default.createElement(o.Box,{display:"flex",flexDirection:"column",gap:"4"},r.default.createElement(o.Box,{display:"flex",flexDirection:"column",gap:"1"},e&&r.default.createElement(o.Text,{fontSize:"highlight"},e),t&&r.default.createElement(o.Text,{color:"neutral-textLow"},t),n),i),a)},3549:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDataListSection=void 0;var r=n(4735);Object.defineProperty(t,"ProductDataListSection",{enumerable:!0,get:function(){return r.ProductDataListSection}})},385:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(5163);r.__exportStar(n(2919),t),r.__exportStar(n(1820),t),r.__exportStar(n(3549),t),r.__exportStar(n(892),t)},3660:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDataList=void 0;var r=n(3454);Object.defineProperty(t,"ProductDataList",{enumerable:!0,get:function(){return r.ProductDataList}})},977:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_OVERLAY_SETTINGS=t.orientation=void 0,t.orientation={vertical:"vertical",horizontal:"horizontal"},t.DEFAULT_OVERLAY_SETTINGS={dropAnimation:{duration:0,easing:"ease"}}},8753:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Sortable=void 0;const r=n(5163).__importStar(n(8156)),o=n(1540),i=n(6548),a=n(421),l=n(977);function s({items:e,onReorder:t,orientation:n="vertical",sensorOptions:a,onDragStart:s,onDragOver:c,onDragEnd:u,disabled:d=!1,children:f,overlaySettings:v=l.DEFAULT_OVERLAY_SETTINGS,renderOverlay:p,dndContextSettings:g}){const[h,b]=(0,r.useState)(null),m=h?e.find((e=>e.id===h)):null,y=(0,o.useSensors)((0,o.useSensor)(o.PointerSensor,{activationConstraint:{distance:8},...a}),(0,o.useSensor)(o.KeyboardSensor,{coordinateGetter:i.sortableKeyboardCoordinates,...a})),w=(0,r.useMemo)((()=>"vertical"===n?i.verticalListSortingStrategy:i.horizontalListSortingStrategy),[n]);return d?r.default.createElement(r.default.Fragment,null,f):r.default.createElement(o.DndContext,{sensors:y,collisionDetection:o.closestCenter,onDragStart:e=>{b(e.active.id),s?.(e)},onDragOver:c,onDragEnd:n=>{const{active:r,over:o}=n;if(o&&r.id!==o.id){const n=e.findIndex((e=>e.id===r.id)),i=e.findIndex((e=>e.id===o.id)),a=[...e],[l]=a.splice(n,1);a.splice(i,0,l),t(a)}b(null),u?.(n)},...g},r.default.createElement(i.SortableContext,{items:e.map((e=>e.id)),strategy:w},f),r.default.createElement(o.DragOverlay,{...v},m&&p?p(m):null))}t.Sortable=s,s.Item=a.SortableItem,s.ItemHandle=a.SortableItemHandle,s.displayName="Sortable",s.Item.displayName="Sortable.Item",s.ItemHandle.displayName="Sortable.ItemHandle"},6456:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortableItem=void 0;const r=n(5163).__importStar(n(8156)),o=n(6548),i=n(2851),a=n(3750);t.SortableItem=({id:e,disabled:t=!1,handle:n=!1,children:l,renderItem:s})=>{const{attributes:c,listeners:u,setNodeRef:d,setActivatorNodeRef:f,transform:v,transition:p,isDragging:g}=(0,o.useSortable)({id:e,disabled:t}),h=(0,r.useMemo)((()=>({transform:i.CSS.Transform.toString(v),transition:p,touchAction:"none"})),[v,p]),b=(0,r.useMemo)((()=>({setActivatorNodeRef:f,attributes:c,listeners:u})),[f,c,u]);return s?s({isDragging:g,attributes:c,listeners:n?void 0:u,setNodeRef:d,style:h}):r.default.createElement(a.SortableItemContext.Provider,{value:b},r.default.createElement("div",{ref:d,style:h,...!n&&{...c,...u}},l))}},3750:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useSortableItemContext=t.SortableItemContext=void 0;const r=n(8156);t.SortableItemContext=(0,r.createContext)(null);t.useSortableItemContext=()=>{const e=(0,r.useContext)(t.SortableItemContext);if(!e)throw new Error("useSortableItemContext must be used within a SortableItem");return e}},1882:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortableItem=void 0;var r=n(6456);Object.defineProperty(t,"SortableItem",{enumerable:!0,get:function(){return r.SortableItem}})},3429:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortableItemHandle=void 0;const r=n(5163).__importDefault(n(8156)),o=n(5280),i=n(3750),a=({children:e})=>{const{setActivatorNodeRef:t,attributes:n,listeners:a}=(0,i.useSortableItemContext)();return r.default.createElement(o.Box,{...n,...a,ref:t,cursor:"grab"},e)};t.SortableItemHandle=a,a.displayName="SortableItemHandle"},2595:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortableItemHandle=void 0;var r=n(3429);Object.defineProperty(t,"SortableItemHandle",{enumerable:!0,get:function(){return r.SortableItemHandle}})},421:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(5163);r.__exportStar(n(1882),t),r.__exportStar(n(2595),t)},7880:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Sortable=void 0;const r=n(8753);var o=n(8753);Object.defineProperty(t,"Sortable",{enumerable:!0,get:function(){return o.Sortable}}),t.default=r.Sortable},5163:(e,t,n)=>{n.r(t),n.d(t,{__assign:()=>i,__asyncDelegator:()=>C,__asyncGenerator:()=>E,__asyncValues:()=>I,__await:()=>D,__awaiter:()=>p,__classPrivateFieldGet:()=>M,__classPrivateFieldIn:()=>N,__classPrivateFieldSet:()=>L,__createBinding:()=>h,__decorate:()=>l,__esDecorate:()=>c,__exportStar:()=>b,__extends:()=>o,__generator:()=>g,__importDefault:()=>P,__importStar:()=>_,__makeTemplateObject:()=>R,__metadata:()=>v,__param:()=>s,__propKey:()=>d,__read:()=>y,__rest:()=>a,__runInitializers:()=>u,__setFunctionName:()=>f,__spread:()=>w,__spreadArray:()=>S,__spreadArrays:()=>x,__values:()=>m});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function l(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,s=r.kind,c="getter"===s?"get":"setter"===s?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),f=!1,v=n.length-1;v>=0;v--){var p={};for(var g in r)p[g]="access"===g?{}:r[g];for(var g in r.access)p.access[g]=r.access[g];p.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var h=(0,n[v])("accessor"===s?{get:d.get,set:d.set}:d[c],p);if("accessor"===s){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw new TypeError("Object expected");(l=a(h.get))&&(d.get=l),(l=a(h.set))&&(d.set=l),(l=a(h.init))&&o.push(l)}else(l=a(h))&&("field"===s?o.push(l):d[c]=l)}u&&Object.defineProperty(u,r.name,d),f=!0}function u(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function v(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))}function g(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}var h=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function b(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||h(t,e,n)}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function x(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)r[o]=i[a];return r}function S(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function D(e){return this instanceof D?(this.v=e,this):new D(e)}function E(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||l(e,t)}))})}function l(e,t){try{(n=o[e](t)).value instanceof D?Promise.resolve(n.value.v).then(s,c):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function s(e){l("next",e)}function c(e){l("throw",e)}function u(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function C(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:D(e[r](t)),done:!1}:o?o(t):t}:o}}function I(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=m(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function R(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var O=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&h(t,e,n);return O(t,e),t}function P(e){return e&&e.__esModule?e:{default:e}}function M(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function L(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},5280:e=>{e.exports=t},3215:e=>{e.exports=n},8156:t=>{t.exports=e},7111:e=>{e.exports=r}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return o[e](n,n.exports,a),n.exports}return a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a(3289)})()));
|
package/dist/index.d.ts
CHANGED
|
@@ -1105,5 +1105,130 @@ export declare namespace Sortable {
|
|
|
1105
1105
|
};
|
|
1106
1106
|
var displayName: string;
|
|
1107
1107
|
}
|
|
1108
|
+
/**
|
|
1109
|
+
* Properties specific to the ProductDataListItem component
|
|
1110
|
+
*/
|
|
1111
|
+
export interface ProductDataListItemProperties {
|
|
1112
|
+
/**
|
|
1113
|
+
* The id of the product
|
|
1114
|
+
*/
|
|
1115
|
+
id: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* The title of the product
|
|
1118
|
+
*/
|
|
1119
|
+
title: string;
|
|
1120
|
+
/**
|
|
1121
|
+
* The image URL of the product
|
|
1122
|
+
*/
|
|
1123
|
+
imageUrl?: string;
|
|
1124
|
+
/**
|
|
1125
|
+
* Alternative text for the product image
|
|
1126
|
+
*/
|
|
1127
|
+
imageAlt?: string;
|
|
1128
|
+
/**
|
|
1129
|
+
* Whether the item is draggable
|
|
1130
|
+
*/
|
|
1131
|
+
isDraggable?: boolean;
|
|
1132
|
+
/**
|
|
1133
|
+
* Callback fired when remove button is clicked
|
|
1134
|
+
*/
|
|
1135
|
+
onRemove?: () => void;
|
|
1136
|
+
/**
|
|
1137
|
+
* Whether the item has a divider
|
|
1138
|
+
*/
|
|
1139
|
+
withDivider?: boolean;
|
|
1140
|
+
/**
|
|
1141
|
+
* Additional content to be rendered
|
|
1142
|
+
*/
|
|
1143
|
+
children?: ReactNode;
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* Props that can be passed to the ProductDataListItem component
|
|
1147
|
+
*/
|
|
1148
|
+
export type ProductDataListItemProps = ProductDataListItemProperties;
|
|
1149
|
+
declare const ProductDataListItem: React.FC<ProductDataListItemProps>;
|
|
1150
|
+
/**
|
|
1151
|
+
* Properties specific to the ProductDataListProducts component
|
|
1152
|
+
*
|
|
1153
|
+
* @template T - The type of each sortable item in the list
|
|
1154
|
+
*/
|
|
1155
|
+
export interface ProductDataListProductsProperties<T extends SortableItemType> {
|
|
1156
|
+
/**
|
|
1157
|
+
* The array of items to be rendered and sorted in the list.
|
|
1158
|
+
*/
|
|
1159
|
+
items: T[];
|
|
1160
|
+
/**
|
|
1161
|
+
* Callback fired when the order of items changes.
|
|
1162
|
+
*
|
|
1163
|
+
* @param items - The reordered array of items
|
|
1164
|
+
*/
|
|
1165
|
+
onReorder: (items: T[]) => void;
|
|
1166
|
+
/**
|
|
1167
|
+
* If true, enables drag-and-drop sorting for the list items.
|
|
1168
|
+
* @default false
|
|
1169
|
+
*/
|
|
1170
|
+
sortable?: boolean;
|
|
1171
|
+
/**
|
|
1172
|
+
* Function to render each item in the list.
|
|
1173
|
+
*
|
|
1174
|
+
* @param item - The item to render
|
|
1175
|
+
* @param index - The index of the item in the list
|
|
1176
|
+
* @returns The rendered node for the item
|
|
1177
|
+
*/
|
|
1178
|
+
renderItem: (item: T, index: number) => ReactNode;
|
|
1179
|
+
/**
|
|
1180
|
+
* Additional properties to pass to the sortable container.
|
|
1181
|
+
*/
|
|
1182
|
+
sortableProps?: object;
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Props that can be passed to the ProductDataListProducts component, including sortable and layout properties.
|
|
1186
|
+
*
|
|
1187
|
+
* @template T - The type of each sortable item in the list
|
|
1188
|
+
*/
|
|
1189
|
+
export type ProductDataListProductsProps<T extends SortableItemType> = ProductDataListProductsProperties<T> & {
|
|
1190
|
+
/**
|
|
1191
|
+
* Additional properties for the sortable container, omitting core sortable and layout props.
|
|
1192
|
+
*/
|
|
1193
|
+
sortableProps?: Omit<SortableProps<T>, "items" | "onReorder" | "orientation" | "disabled" | "renderOverlay" | "children">;
|
|
1194
|
+
} & Omit<BoxProps, "my" | "display" | "flexDirection" | "gap">;
|
|
1195
|
+
declare function ProductDataListProducts<T extends SortableItemType>({ sortable, items, onReorder, renderItem, sortableProps, children, ...props }: ProductDataListProductsProps<T>): React.ReactElement;
|
|
1196
|
+
declare namespace ProductDataListProducts {
|
|
1197
|
+
var displayName: string;
|
|
1198
|
+
}
|
|
1199
|
+
export type ProductDataListSectionProperties = PropsWithChildren<{
|
|
1200
|
+
title?: ReactNode;
|
|
1201
|
+
description?: ReactNode;
|
|
1202
|
+
content?: ReactNode;
|
|
1203
|
+
link: ReactNode;
|
|
1204
|
+
}>;
|
|
1205
|
+
export type ProductDataListSectionProps = ProductDataListSectionProperties & Omit<BoxProps, "padding" | "display" | "flexDirection" | "gap">;
|
|
1206
|
+
declare const ProductDataListSection: React.FC<ProductDataListSectionProps>;
|
|
1207
|
+
export type ProductDataListItemDividerProperties = Pick<BoxProps, "borderTopWidth" | "borderBottomWidth" | "borderColor" | "borderStyle" | "width" | "id">;
|
|
1208
|
+
declare const ProductDataListItemDivider: React.FC<ProductDataListItemDividerProperties>;
|
|
1209
|
+
/**
|
|
1210
|
+
* Properties specific to the ProductDataList component
|
|
1211
|
+
*/
|
|
1212
|
+
export interface ProductDataListProperties {
|
|
1213
|
+
/**
|
|
1214
|
+
* The content to be rendered inside the list
|
|
1215
|
+
*/
|
|
1216
|
+
children: ReactNode;
|
|
1217
|
+
/**
|
|
1218
|
+
* Optional title for the list section
|
|
1219
|
+
*/
|
|
1220
|
+
title?: ReactNode;
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* Props that can be passed to the ProductDataList component
|
|
1224
|
+
*/
|
|
1225
|
+
export type ProductDataListProps = ProductDataListProperties & Omit<BoxProps, "padding" | "display" | "flexDirection" | "gap">;
|
|
1226
|
+
export interface ProductDataListComponents {
|
|
1227
|
+
Products: typeof ProductDataListProducts;
|
|
1228
|
+
Item: typeof ProductDataListItem;
|
|
1229
|
+
Section: typeof ProductDataListSection;
|
|
1230
|
+
ItemDivider: typeof ProductDataListItemDivider;
|
|
1231
|
+
}
|
|
1232
|
+
export declare const ProductDataList: React.FC<ProductDataListProps> & ProductDataListComponents;
|
|
1108
1233
|
|
|
1109
1234
|
export {};
|