@lanaco/lnc-react-ui 4.0.11 → 4.0.13

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/dist/Kanban.cjs CHANGED
@@ -1,15 +1,15 @@
1
- "use strict";const Y=require("react/jsx-runtime"),u=require("react"),Et=require("./index-Ct1N7fF4.cjs"),U=require("./index-BIlhCoy2.cjs"),ce=require("./utils-DTAPpJXU.cjs"),or=require("./index-CSXL784P.cjs"),_t=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),Ln=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),Cr=require("./KanbanCard-DV3VnSUi.cjs"),oi=require("./index-DBXXH_TD.cjs"),Pt=require("./_commonjsHelpers-DKOUU3wS.cjs"),ii=require("./KanbanHeader.cjs"),si=require("./useUpdateEffect-BtMgpgIV.cjs");var ai=function(e){u.useEffect(e,[])};function li(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.useMemo(()=>o=>{t.forEach(i=>i(o))},t)}const hn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function It(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function $n(e){return"nodeType"in e}function we(e){var t,n;return e?It(e)?e:$n(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Bn(e){const{Document:t}=we(e);return e instanceof t}function Ft(e){return It(e)?!1:e instanceof we(e).HTMLElement}function Sr(e){return e instanceof we(e).SVGElement}function Ot(e){return e?It(e)?e.document:$n(e)?Bn(e)?e:Ft(e)||Sr(e)?e.ownerDocument:document:document:document}const Xe=hn?u.useLayoutEffect:u.useEffect;function pn(e){const t=u.useRef(e);return Xe(()=>{t.current=e}),u.useCallback(function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t.current==null?void 0:t.current(...o)},[])}function ci(){const e=u.useRef(null),t=u.useCallback((o,i)=>{e.current=setInterval(o,i)},[]),n=u.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function zt(e,t){t===void 0&&(t=[e]);const n=u.useRef(e);return Xe(()=>{n.current!==e&&(n.current=e)},t),n}function Kt(e,t){const n=u.useRef();return u.useMemo(()=>{const o=e(n.current);return n.current=o,o},[...t])}function an(e){const t=pn(e),n=u.useRef(null),o=u.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,o]}function ln(e){const t=u.useRef();return u.useEffect(()=>{t.current=e},[e]),t.current}let Dn={};function kt(e,t){return u.useMemo(()=>{if(t)return t;const n=Dn[e]==null?0:Dn[e]+1;return Dn[e]=n,e+"-"+n},[e,t])}function Dr(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((a,l)=>{const c=Object.entries(l);for(const[f,d]of c){const p=a[f];p!=null&&(a[f]=p+e*d)}return a},{...t})}}const At=Dr(1),cn=Dr(-1);function ui(e){return"clientX"in e&&"clientY"in e}function vn(e){if(!e)return!1;const{KeyboardEvent:t}=we(e.target);return t&&e instanceof t}function di(e){if(!e)return!1;const{TouchEvent:t}=we(e.target);return t&&e instanceof t}function un(e){if(di(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return ui(e)?{x:e.clientX,y:e.clientY}:null}const gt=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[gt.Translate.toString(e),gt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),ir="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function fi(e){return e.matches(ir)?e:e.querySelector(ir)}const gi={display:"none"};function hi(e){let{id:t,value:n}=e;return u.createElement("div",{id:t,style:gi},n)}function pi(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;const i={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"};return u.createElement("div",{id:t,style:i,role:"status","aria-live":o,"aria-atomic":!0},n)}function vi(){const[e,t]=u.useState("");return{announce:u.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const Rr=u.createContext(null);function bi(e){const t=u.useContext(Rr);u.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function yi(){const[e]=u.useState(()=>new Set),t=u.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[u.useCallback(o=>{let{type:i,event:a}=o;e.forEach(l=>{var c;return(c=l[i])==null?void 0:c.call(l,a)})},[e]),t]}const mi={draggable:`
1
+ "use strict";const oe=require("react/jsx-runtime"),d=require("react"),Vt=require("./index-Ct1N7fF4.cjs"),Q=require("./index-BIlhCoy2.cjs"),we=require("./utils-DTAPpJXU.cjs"),Zr=require("./index-CSXL784P.cjs"),en=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),zr=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),bo=require("./KanbanCard-DV3VnSUi.cjs"),Dt=require("./_commonjsHelpers-DKOUU3wS.cjs"),ii=require("./KanbanHeader.cjs"),si=require("./useUpdateEffect-BtMgpgIV.cjs");var ai=function(e){d.useEffect(e,[])};function ci(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d.useMemo(()=>o=>{t.forEach(s=>s(o))},t)}const Un=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function tn(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Hr(e){return"nodeType"in e}function Ke(e){var t,n;return e?tn(e)?e:Hr(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Kr(e){const{Document:t}=Ke(e);return e instanceof t}function hn(e){return tn(e)?!1:e instanceof Ke(e).HTMLElement}function yo(e){return e instanceof Ke(e).SVGElement}function nn(e){return e?tn(e)?e.document:Hr(e)?Kr(e)?e:hn(e)||yo(e)?e.ownerDocument:document:document:document}const bt=Un?d.useLayoutEffect:d.useEffect;function kn(e){const t=d.useRef(e);return bt(()=>{t.current=e}),d.useCallback(function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return t.current==null?void 0:t.current(...o)},[])}function li(){const e=d.useRef(null),t=d.useCallback((o,s)=>{e.current=setInterval(o,s)},[]),n=d.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function gn(e,t){t===void 0&&(t=[e]);const n=d.useRef(e);return bt(()=>{n.current!==e&&(n.current=e)},t),n}function pn(e,t){const n=d.useRef();return d.useMemo(()=>{const o=e(n.current);return n.current=o,o},[...t])}function jn(e){const t=kn(e),n=d.useRef(null),o=d.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,o]}function $n(e){const t=d.useRef();return d.useEffect(()=>{t.current=e},[e]),t.current}let Tr={};function vn(e,t){return d.useMemo(()=>{if(t)return t;const n=Tr[e]==null?0:Tr[e]+1;return Tr[e]=n,e+"-"+n},[e,t])}function mo(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];return o.reduce((c,l)=>{const u=Object.entries(l);for(const[h,f]of u){const b=c[h];b!=null&&(c[h]=b+e*f)}return c},{...t})}}const Zt=mo(1),Bn=mo(-1);function ui(e){return"clientX"in e&&"clientY"in e}function Xn(e){if(!e)return!1;const{KeyboardEvent:t}=Ke(e.target);return t&&e instanceof t}function di(e){if(!e)return!1;const{TouchEvent:t}=Ke(e.target);return t&&e instanceof t}function Fn(e){if(di(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return ui(e)?{x:e.clientX,y:e.clientY}:null}const Gt=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[Gt.Translate.toString(e),Gt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),Qr="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function fi(e){return e.matches(Qr)?e:e.querySelector(Qr)}const gi={display:"none"};function hi(e){let{id:t,value:n}=e;return d.createElement("div",{id:t,style:gi},n)}function pi(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;const s={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"};return d.createElement("div",{id:t,style:s,role:"status","aria-live":o,"aria-atomic":!0},n)}function vi(){const[e,t]=d.useState("");return{announce:d.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const xo=d.createContext(null);function bi(e){const t=d.useContext(xo);d.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function yi(){const[e]=d.useState(()=>new Set),t=d.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[d.useCallback(o=>{let{type:s,event:c}=o;e.forEach(l=>{var u;return(u=l[s])==null?void 0:u.call(l,c)})},[e]),t]}const mi={draggable:`
2
2
  To pick up a draggable item, press the space bar.
3
3
  While dragging, use the arrow keys to move the item.
4
4
  Press space again to drop the item in its new position, or press escape to cancel.
5
- `},xi={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 wi(e){let{announcements:t=xi,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=mi}=e;const{announce:a,announcement:l}=vi(),c=kt("DndLiveRegion"),[f,d]=u.useState(!1);if(u.useEffect(()=>{d(!0)},[]),bi(u.useMemo(()=>({onDragStart(h){let{active:w}=h;a(t.onDragStart({active:w}))},onDragMove(h){let{active:w,over:y}=h;t.onDragMove&&a(t.onDragMove({active:w,over:y}))},onDragOver(h){let{active:w,over:y}=h;a(t.onDragOver({active:w,over:y}))},onDragEnd(h){let{active:w,over:y}=h;a(t.onDragEnd({active:w,over:y}))},onDragCancel(h){let{active:w,over:y}=h;a(t.onDragCancel({active:w,over:y}))}}),[a,t])),!f)return null;const p=u.createElement(u.Fragment,null,u.createElement(hi,{id:o,value:i.draggable}),u.createElement(pi,{id:c,announcement:l}));return n?Et.reactDomExports.createPortal(p,n):p}var ie;(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"})(ie||(ie={}));function dn(){}function Rn(e,t){return u.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Ci(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.useMemo(()=>[...t].filter(o=>o!=null),[...t])}const Ge=Object.freeze({x:0,y:0});function jn(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Si(e,t){const n=un(e);if(!n)return"0 0";const o={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return o.x+"% "+o.y+"%"}function zn(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function Di(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function _n(e){let{left:t,top:n,height:o,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+o},{x:t+i,y:n+o}]}function Fn(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function sr(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const ar=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=sr(t,t.left,t.top),a=[];for(const l of o){const{id:c}=l,f=n.get(c);if(f){const d=jn(sr(f),i);a.push({id:c,data:{droppableContainer:l,value:d}})}}return a.sort(zn)},Ri=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=_n(t),a=[];for(const l of o){const{id:c}=l,f=n.get(c);if(f){const d=_n(f),p=i.reduce((w,y,A)=>w+jn(d[A],y),0),h=Number((p/4).toFixed(4));a.push({id:c,data:{droppableContainer:l,value:h}})}}return a.sort(zn)};function Ei(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),l=i-o,c=a-n;if(o<i&&n<a){const f=t.width*t.height,d=e.width*e.height,p=l*c,h=p/(f+d-p);return Number(h.toFixed(4))}return 0}const Er=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const a of o){const{id:l}=a,c=n.get(l);if(c){const f=Ei(c,t);f>0&&i.push({id:l,data:{droppableContainer:a,value:f}})}}return i.sort(Di)};function Ai(e,t){const{top:n,left:o,bottom:i,right:a}=t;return n<=e.y&&e.y<=i&&o<=e.x&&e.x<=a}const Ti=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:o}=e;if(!o)return[];const i=[];for(const a of t){const{id:l}=a,c=n.get(l);if(c&&Ai(o,c)){const d=_n(c).reduce((h,w)=>h+jn(o,w),0),p=Number((d/4).toFixed(4));i.push({id:l,data:{droppableContainer:a,value:p}})}}return i.sort(zn)};function _i(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Ar(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ge}function Ii(e){return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return i.reduce((l,c)=>({...l,top:l.top+e*c.y,bottom:l.bottom+e*c.y,left:l.left+e*c.x,right:l.right+e*c.x}),{...n})}}const Oi=Ii(1);function Tr(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]}}else 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}function Mi(e,t,n){const o=Tr(t);if(!o)return e;const{scaleX:i,scaleY:a,x:l,y:c}=o,f=e.left-l-(1-i)*parseFloat(n),d=e.top-c-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),p=i?e.width/i:e.width,h=a?e.height/a:e.height;return{width:p,height:h,top:d,right:f+p,bottom:d+h,left:f}}const Ni={ignoreTransform:!1};function Mt(e,t){t===void 0&&(t=Ni);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:p}=we(e).getComputedStyle(e);d&&(n=Mi(n,d,p))}const{top:o,left:i,width:a,height:l,bottom:c,right:f}=n;return{top:o,left:i,width:a,height:l,bottom:c,right:f}}function lr(e){return Mt(e,{ignoreTransform:!0})}function Pi(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Li(e,t){return t===void 0&&(t=we(e).getComputedStyle(e)),t.position==="fixed"}function $i(e,t){t===void 0&&(t=we(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function Kn(e,t){const n=[];function o(i){if(t!=null&&n.length>=t||!i)return n;if(Bn(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Ft(i)||Sr(i)||n.includes(i))return n;const a=we(e).getComputedStyle(i);return i!==e&&$i(i,a)&&n.push(i),Li(i,a)?n:o(i.parentNode)}return e?o(e):n}function _r(e){const[t]=Kn(e,1);return t??null}function En(e){return!hn||!e?null:It(e)?e:$n(e)?Bn(e)||e===Ot(e).scrollingElement?window:Ft(e)?e:null:null}function Ir(e){return It(e)?e.scrollX:e.scrollLeft}function Or(e){return It(e)?e.scrollY:e.scrollTop}function In(e){return{x:Ir(e),y:Or(e)}}var ue;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ue||(ue={}));function Mr(e){return!hn||!e?!1:e===document.scrollingElement}function Nr(e){const t={x:0,y:0},n=Mr(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,l=e.scrollTop>=o.y,c=e.scrollLeft>=o.x;return{isTop:i,isLeft:a,isBottom:l,isRight:c,maxScroll:o,minScroll:t}}const Bi={x:.2,y:.2};function ji(e,t,n,o,i){let{top:a,left:l,right:c,bottom:f}=n;o===void 0&&(o=10),i===void 0&&(i=Bi);const{isTop:d,isBottom:p,isLeft:h,isRight:w}=Nr(e),y={x:0,y:0},A={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!d&&a<=t.top+b.height?(y.y=ue.Backward,A.y=o*Math.abs((t.top+b.height-a)/b.height)):!p&&f>=t.bottom-b.height&&(y.y=ue.Forward,A.y=o*Math.abs((t.bottom-b.height-f)/b.height)),!w&&c>=t.right-b.width?(y.x=ue.Forward,A.x=o*Math.abs((t.right-b.width-c)/b.width)):!h&&l<=t.left+b.width&&(y.x=ue.Backward,A.x=o*Math.abs((t.left+b.width-l)/b.width)),{direction:y,speed:A}}function zi(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:l}=window;return{top:0,left:0,right:a,bottom:l,width:a,height:l}}const{top:t,left:n,right:o,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Pr(e){return e.reduce((t,n)=>At(t,In(n)),Ge)}function Fi(e){return e.reduce((t,n)=>t+Ir(n),0)}function Ki(e){return e.reduce((t,n)=>t+Or(n),0)}function Lr(e,t){if(t===void 0&&(t=Mt),!e)return;const{top:n,left:o,bottom:i,right:a}=t(e);_r(e)&&(i<=0||a<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ki=[["x",["left","right"],Fi],["y",["top","bottom"],Ki]];class kn{constructor(t,n){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 o=Kn(n),i=Pr(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,l,c]of ki)for(const f of l)Object.defineProperty(this,f,{get:()=>{const d=c(o),p=i[a]-d;return this.rect[f]+p},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Lt{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=t}add(t,n,o){var i;(i=this.target)==null||i.addEventListener(t,n,o),this.listeners.push([t,n,o])}}function Hi(e){const{EventTarget:t}=we(e);return e instanceof t?e:Ot(e)}function An(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t?o>t.y:!1}var Be;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Be||(Be={}));function cr(e){e.preventDefault()}function Ui(e){e.stopPropagation()}var L;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(L||(L={}));const $r={start:[L.Space,L.Enter],cancel:[L.Esc],end:[L.Space,L.Enter]},Xi=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case L.Right:return{...n,x:n.x+25};case L.Left:return{...n,x:n.x-25};case L.Down:return{...n,y:n.y+25};case L.Up:return{...n,y:n.y-25}}};class Hn{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Lt(Ot(n)),this.windowListeners=new Lt(we(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Be.Resize,this.handleCancel),this.windowListeners.add(Be.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Be.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&Lr(o),n(Ge)}handleKeyDown(t){if(vn(t)){const{active:n,context:o,options:i}=this.props,{keyboardCodes:a=$r,coordinateGetter:l=Xi,scrollBehavior:c="smooth"}=i,{code:f}=t;if(a.end.includes(f)){this.handleEnd(t);return}if(a.cancel.includes(f)){this.handleCancel(t);return}const{collisionRect:d}=o.current,p=d?{x:d.left,y:d.top}:Ge;this.referenceCoordinates||(this.referenceCoordinates=p);const h=l(t,{active:n,context:o.current,currentCoordinates:p});if(h){const w=cn(h,p),y={x:0,y:0},{scrollableAncestors:A}=o.current;for(const b of A){const C=t.code,{isTop:R,isRight:T,isLeft:D,isBottom:E,maxScroll:M,minScroll:_}=Nr(b),O=zi(b),P={x:Math.min(C===L.Right?O.right-O.width/2:O.right,Math.max(C===L.Right?O.left:O.left+O.width/2,h.x)),y:Math.min(C===L.Down?O.bottom-O.height/2:O.bottom,Math.max(C===L.Down?O.top:O.top+O.height/2,h.y))},K=C===L.Right&&!T||C===L.Left&&!D,k=C===L.Down&&!E||C===L.Up&&!R;if(K&&P.x!==h.x){const j=b.scrollLeft+w.x,ee=C===L.Right&&j<=M.x||C===L.Left&&j>=_.x;if(ee&&!w.y){b.scrollTo({left:j,behavior:c});return}ee?y.x=b.scrollLeft-j:y.x=C===L.Right?b.scrollLeft-M.x:b.scrollLeft-_.x,y.x&&b.scrollBy({left:-y.x,behavior:c});break}else if(k&&P.y!==h.y){const j=b.scrollTop+w.y,ee=C===L.Down&&j<=M.y||C===L.Up&&j>=_.y;if(ee&&!w.x){b.scrollTo({top:j,behavior:c});return}ee?y.y=b.scrollTop-j:y.y=C===L.Down?b.scrollTop-M.y:b.scrollTop-_.y,y.y&&b.scrollBy({top:-y.y,behavior:c});break}}this.handleMove(t,At(cn(h,this.referenceCoordinates),y))}}}handleMove(t,n){const{onMove:o}=this.props;t.preventDefault(),o(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Hn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=$r,onActivation:i}=t,{active:a}=n;const{code:l}=e.nativeEvent;if(o.start.includes(l)){const c=a.activatorNode.current;return c&&e.target!==c?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function ur(e){return!!(e&&"distance"in e)}function dr(e){return!!(e&&"delay"in e)}class Un{constructor(t,n,o){var i;o===void 0&&(o=Hi(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;const{event:a}=t,{target:l}=a;this.props=t,this.events=n,this.document=Ot(l),this.documentListeners=new Lt(this.document),this.listeners=new Lt(o),this.windowListeners=new Lt(we(l)),this.initialCoordinates=(i=un(a))!=null?i:Ge,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:t,props:{options:{activationConstraint:n,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Be.Resize,this.handleCancel),this.windowListeners.add(Be.DragStart,cr),this.windowListeners.add(Be.VisibilityChange,this.handleCancel),this.windowListeners.add(Be.ContextMenu,cr),this.documentListeners.add(Be.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(dr(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(ur(n))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Be.Click,Ui,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Be.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:i,props:a}=this,{onMove:l,options:{activationConstraint:c}}=a;if(!i)return;const f=(n=un(t))!=null?n:Ge,d=cn(i,f);if(!o&&c){if(ur(c)){if(c.tolerance!=null&&An(d,c.tolerance))return this.handleCancel();if(An(d,c.distance))return this.handleStart()}return dr(c)&&An(d,c.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),l(f)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===L.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Gi={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Br extends Un{constructor(t){const{event:n}=t,o=Ot(n.target);super(t,Gi,o)}}Br.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!n.isPrimary||n.button!==0?!1:(o==null||o({event:n}),!0)}}];const Yi={move:{name:"mousemove"},end:{name:"mouseup"}};var On;(function(e){e[e.RightClick=2]="RightClick"})(On||(On={}));class jr extends Un{constructor(t){super(t,Yi,Ot(t.event.target))}}jr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===On.RightClick?!1:(o==null||o({event:n}),!0)}}];const Tn={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class zr extends Un{constructor(t){super(t,Tn)}static setup(){return window.addEventListener(Tn.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Tn.move.name,t)};function t(){}}}zr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:i}=n;return i.length>1?!1:(o==null||o({event:n}),!0)}}];var $t;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})($t||($t={}));var fn;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(fn||(fn={}));function Wi(e){let{acceleration:t,activator:n=$t.Pointer,canScroll:o,draggingRect:i,enabled:a,interval:l=5,order:c=fn.TreeOrder,pointerCoordinates:f,scrollableAncestors:d,scrollableAncestorRects:p,delta:h,threshold:w}=e;const y=Ji({delta:h,disabled:!a}),[A,b]=ci(),C=u.useRef({x:0,y:0}),R=u.useRef({x:0,y:0}),T=u.useMemo(()=>{switch(n){case $t.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case $t.DraggableRect:return i}},[n,i,f]),D=u.useRef(null),E=u.useCallback(()=>{const _=D.current;if(!_)return;const O=C.current.x*R.current.x,P=C.current.y*R.current.y;_.scrollBy(O,P)},[]),M=u.useMemo(()=>c===fn.TreeOrder?[...d].reverse():d,[c,d]);u.useEffect(()=>{if(!a||!d.length||!T){b();return}for(const _ of M){if((o==null?void 0:o(_))===!1)continue;const O=d.indexOf(_),P=p[O];if(!P)continue;const{direction:K,speed:k}=ji(_,P,T,t,w);for(const j of["x","y"])y[j][K[j]]||(k[j]=0,K[j]=0);if(k.x>0||k.y>0){b(),D.current=_,A(E,l),C.current=k,R.current=K;return}}C.current={x:0,y:0},R.current={x:0,y:0},b()},[t,E,o,b,a,l,JSON.stringify(T),JSON.stringify(y),A,d,M,p,JSON.stringify(w)])}const qi={x:{[ue.Backward]:!1,[ue.Forward]:!1},y:{[ue.Backward]:!1,[ue.Forward]:!1}};function Ji(e){let{delta:t,disabled:n}=e;const o=ln(t);return Kt(i=>{if(n||!o||!i)return qi;const a={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[ue.Backward]:i.x[ue.Backward]||a.x===-1,[ue.Forward]:i.x[ue.Forward]||a.x===1},y:{[ue.Backward]:i.y[ue.Backward]||a.y===-1,[ue.Forward]:i.y[ue.Forward]||a.y===1}}},[n,t,o])}function Vi(e,t){const n=t!=null?e.get(t):void 0,o=n?n.node.current:null;return Kt(i=>{var a;return t==null?null:(a=o??i)!=null?a:null},[o,t])}function Qi(e,t){return u.useMemo(()=>e.reduce((n,o)=>{const{sensor:i}=o,a=i.activators.map(l=>({eventName:l.eventName,handler:t(l.handler,o)}));return[...n,...a]},[]),[e,t])}var Tt;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Tt||(Tt={}));var Mn;(function(e){e.Optimized="optimized"})(Mn||(Mn={}));const fr=new Map;function Zi(e,t){let{dragging:n,dependencies:o,config:i}=t;const[a,l]=u.useState(null),{frequency:c,measure:f,strategy:d}=i,p=u.useRef(e),h=C(),w=zt(h),y=u.useCallback(function(R){R===void 0&&(R=[]),!w.current&&l(T=>T===null?R:T.concat(R.filter(D=>!T.includes(D))))},[w]),A=u.useRef(null),b=Kt(R=>{if(h&&!n)return fr;if(!R||R===fr||p.current!==e||a!=null){const T=new Map;for(let D of e){if(!D)continue;if(a&&a.length>0&&!a.includes(D.id)&&D.rect.current){T.set(D.id,D.rect.current);continue}const E=D.node.current,M=E?new kn(f(E),E):null;D.rect.current=M,M&&T.set(D.id,M)}return T}return R},[e,a,n,h,f]);return u.useEffect(()=>{p.current=e},[e]),u.useEffect(()=>{h||y()},[n,h]),u.useEffect(()=>{a&&a.length>0&&l(null)},[JSON.stringify(a)]),u.useEffect(()=>{h||typeof c!="number"||A.current!==null||(A.current=setTimeout(()=>{y(),A.current=null},c))},[c,h,y,...o]),{droppableRects:b,measureDroppableContainers:y,measuringScheduled:a!=null};function C(){switch(d){case Tt.Always:return!1;case Tt.BeforeDragging:return n;default:return!n}}}function Xn(e,t){return Kt(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function es(e,t){return Xn(e,t)}function ts(e){let{callback:t,disabled:n}=e;const o=pn(t),i=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(o)},[o,n]);return u.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function bn(e){let{callback:t,disabled:n}=e;const o=pn(t),i=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(o)},[n]);return u.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function ns(e){return new kn(Mt(e),e)}function gr(e,t,n){t===void 0&&(t=ns);const[o,i]=u.useState(null);function a(){i(f=>{if(!e)return null;if(e.isConnected===!1){var d;return(d=f??n)!=null?d:null}const p=t(e);return JSON.stringify(f)===JSON.stringify(p)?f:p})}const l=ts({callback(f){if(e)for(const d of f){const{type:p,target:h}=d;if(p==="childList"&&h instanceof HTMLElement&&h.contains(e)){a();break}}}}),c=bn({callback:a});return Xe(()=>{a(),e?(c==null||c.observe(e),l==null||l.observe(document.body,{childList:!0,subtree:!0})):(c==null||c.disconnect(),l==null||l.disconnect())},[e]),o}function rs(e){const t=Xn(e);return Ar(e,t)}const hr=[];function os(e){const t=u.useRef(e),n=Kt(o=>e?o&&o!==hr&&e&&t.current&&e.parentNode===t.current.parentNode?o:Kn(e):hr,[e]);return u.useEffect(()=>{t.current=e},[e]),n}function is(e){const[t,n]=u.useState(null),o=u.useRef(e),i=u.useCallback(a=>{const l=En(a.target);l&&n(c=>c?(c.set(l,In(l)),new Map(c)):null)},[]);return u.useEffect(()=>{const a=o.current;if(e!==a){l(a);const c=e.map(f=>{const d=En(f);return d?(d.addEventListener("scroll",i,{passive:!0}),[d,In(d)]):null}).filter(f=>f!=null);n(c.length?new Map(c):null),o.current=e}return()=>{l(e),l(a)};function l(c){c.forEach(f=>{const d=En(f);d==null||d.removeEventListener("scroll",i)})}},[i,e]),u.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,l)=>At(a,l),Ge):Pr(e):Ge,[e,t])}function pr(e,t){t===void 0&&(t=[]);const n=u.useRef(null);return u.useEffect(()=>{n.current=null},t),u.useEffect(()=>{const o=e!==Ge;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?cn(e,n.current):Ge}function ss(e){u.useEffect(()=>{if(!hn)return;const t=e.map(n=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function as(e,t){return u.useMemo(()=>e.reduce((n,o)=>{let{eventName:i,handler:a}=o;return n[i]=l=>{a(l,t)},n},{}),[e,t])}function Fr(e){return u.useMemo(()=>e?Pi(e):null,[e])}const vr=[];function ls(e,t){t===void 0&&(t=Mt);const[n]=e,o=Fr(n?we(n):null),[i,a]=u.useState(vr);function l(){a(()=>e.length?e.map(f=>Mr(f)?o:new kn(t(f),f)):vr)}const c=bn({callback:l});return Xe(()=>{c==null||c.disconnect(),l(),e.forEach(f=>c==null?void 0:c.observe(f))},[e]),i}function Kr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ft(t)?t:e}function cs(e){let{measure:t}=e;const[n,o]=u.useState(null),i=u.useCallback(d=>{for(const{target:p}of d)if(Ft(p)){o(h=>{const w=t(p);return h?{...h,width:w.width,height:w.height}:w});break}},[t]),a=bn({callback:i}),l=u.useCallback(d=>{const p=Kr(d);a==null||a.disconnect(),p&&(a==null||a.observe(p)),o(p?t(p):null)},[t,a]),[c,f]=an(l);return u.useMemo(()=>({nodeRef:c,rect:n,setRef:f}),[n,c,f])}const us=[{sensor:Br,options:{}},{sensor:Hn,options:{}}],ds={current:{}},sn={draggable:{measure:lr},droppable:{measure:lr,strategy:Tt.WhileDragging,frequency:Mn.Optimized},dragOverlay:{measure:Mt}};class Bt extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,o;return(n=(o=this.get(t))==null?void 0:o.node.current)!=null?n:void 0}}const fs={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Bt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:dn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:sn,measureDroppableContainers:dn,windowRect:null,measuringScheduled:!1},kr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:dn,draggableNodes:new Map,over:null,measureDroppableContainers:dn},Ht=u.createContext(kr),Hr=u.createContext(fs);function gs(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Bt}}}function hs(e,t){switch(t.type){case ie.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ie.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ie.DragEnd:case ie.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ie.RegisterDroppable:{const{element:n}=t,{id:o}=n,i=new Bt(e.droppable.containers);return i.set(o,n),{...e,droppable:{...e.droppable,containers:i}}}case ie.SetDroppableDisabled:{const{id:n,key:o,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||o!==a.key)return e;const l=new Bt(e.droppable.containers);return l.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:l}}}case ie.UnregisterDroppable:{const{id:n,key:o}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const a=new Bt(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function ps(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=u.useContext(Ht),a=ln(o),l=ln(n==null?void 0:n.id);return u.useEffect(()=>{if(!t&&!o&&a&&l!=null){if(!vn(a)||document.activeElement===a.target)return;const c=i.get(l);if(!c)return;const{activatorNode:f,node:d}=c;if(!f.current&&!d.current)return;requestAnimationFrame(()=>{for(const p of[f.current,d.current]){if(!p)continue;const h=fi(p);if(h){h.focus();break}}})}},[o,t,i,l,a]),null}function Ur(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...o}),n):n}function vs(e){return u.useMemo(()=>({draggable:{...sn.draggable,...e==null?void 0:e.draggable},droppable:{...sn.droppable,...e==null?void 0:e.droppable},dragOverlay:{...sn.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function bs(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const a=u.useRef(!1),{x:l,y:c}=typeof i=="boolean"?{x:i,y:i}:i;Xe(()=>{if(!l&&!c||!t){a.current=!1;return}if(a.current||!o)return;const d=t==null?void 0:t.node.current;if(!d||d.isConnected===!1)return;const p=n(d),h=Ar(p,o);if(l||(h.x=0),c||(h.y=0),a.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const w=_r(d);w&&w.scrollBy({top:h.y,left:h.x})}},[t,l,c,o,n])}const yn=u.createContext({...Ge,scaleX:1,scaleY:1});var ft;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ft||(ft={}));const ys=u.memo(function(t){var n,o,i,a;let{id:l,accessibility:c,autoScroll:f=!0,children:d,sensors:p=us,collisionDetection:h=Er,measuring:w,modifiers:y,...A}=t;const b=u.useReducer(hs,void 0,gs),[C,R]=b,[T,D]=yi(),[E,M]=u.useState(ft.Uninitialized),_=E===ft.Initialized,{draggable:{active:O,nodes:P,translate:K},droppable:{containers:k}}=C,j=O!=null?P.get(O):null,ee=u.useRef({initial:null,translated:null}),J=u.useMemo(()=>{var G;return O!=null?{id:O,data:(G=j==null?void 0:j.data)!=null?G:ds,rect:ee}:null},[O,j]),Ce=u.useRef(null),[je,F]=u.useState(null),[W,Oe]=u.useState(null),Te=zt(A,Object.values(A)),se=kt("DndDescribedBy",l),Me=u.useMemo(()=>k.getEnabled(),[k]),q=vs(w),{droppableRects:ve,measureDroppableContainers:ze,measuringScheduled:Je}=Zi(Me,{dragging:_,dependencies:[K.x,K.y],config:q.droppable}),V=Vi(P,O),Ve=u.useMemo(()=>W?un(W):null,[W]),Ne=Ke(),ae=es(V,q.draggable.measure);bs({activeNode:O!=null?P.get(O):null,config:Ne.layoutShiftCompensation,initialRect:ae,measure:q.draggable.measure});const B=gr(V,q.draggable.measure,ae),Qe=gr(V?V.parentElement:null),Se=u.useRef({activatorEvent:null,active:null,activeNode:V,collisionRect:null,collisions:null,droppableRects:ve,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ye=k.getNodeFor((n=Se.current.over)==null?void 0:n.id),$=cs({measure:q.dragOverlay.measure}),We=(o=$.nodeRef.current)!=null?o:V,Fe=_?(i=$.rect)!=null?i:B:null,ht=!!($.nodeRef.current&&$.rect),De=rs(ht?null:B),qe=Fr(We?we(We):null),v=os(_?Ye??V:null),x=ls(v),N=Ur(y,{transform:{x:K.x-De.x,y:K.y-De.y,scaleX:1,scaleY:1},activatorEvent:W,active:J,activeNodeRect:B,containerNodeRect:Qe,draggingNodeRect:Fe,over:Se.current.over,overlayNodeRect:$.rect,scrollableAncestors:v,scrollableAncestorRects:x,windowRect:qe}),X=Ve?At(Ve,K):null,H=is(v),le=pr(H),Q=pr(H,[B]),te=At(N,le),de=Fe?Oi(Fe,N):null,ge=J&&de?h({active:J,collisionRect:de,droppableRects:ve,droppableContainers:Me,pointerCoordinates:X}):null,Ze=Fn(ge,"id"),[Z,_e]=u.useState(null),pt=ht?N:At(N,Q),ne=_i(pt,(a=Z==null?void 0:Z.rect)!=null?a:null,B),re=u.useRef(null),Ie=u.useCallback((G,be)=>{let{sensor:he,options:ke}=be;if(Ce.current==null)return;const Re=P.get(Ce.current);if(!Re)return;const ye=G.nativeEvent,Pe=new he({active:Ce.current,activeNode:Re,event:ye,options:ke,context:Se,onStart(me){const He=Ce.current;if(He==null)return;const tt=P.get(He);if(!tt)return;const{onDragStart:at}=Te.current,lt={activatorEvent:ye,active:{id:He,data:tt.data,rect:ee}};Et.reactDomExports.unstable_batchedUpdates(()=>{at==null||at(lt),M(ft.Initializing),R({type:ie.DragStart,initialCoordinates:me,active:He}),T({type:"onDragStart",event:lt}),F(re.current),Oe(ye)})},onMove(me){R({type:ie.DragMove,coordinates:me})},onEnd:st(ie.DragEnd),onCancel:st(ie.DragCancel)});re.current=Pe;function st(me){return async function(){const{active:tt,collisions:at,over:lt,scrollAdjustedTranslate:ct}=Se.current;let vt=null;if(tt&&ct){const{cancelDrop:bt}=Te.current;vt={activatorEvent:ye,active:tt,collisions:at,delta:ct,over:lt},me===ie.DragEnd&&typeof bt=="function"&&await Promise.resolve(bt(vt))&&(me=ie.DragCancel)}Ce.current=null,Et.reactDomExports.unstable_batchedUpdates(()=>{R({type:me}),M(ft.Uninitialized),_e(null),F(null),Oe(null),re.current=null;const bt=me===ie.DragEnd?"onDragEnd":"onDragCancel";if(vt){const Nt=Te.current[bt];Nt==null||Nt(vt),T({type:bt,event:vt})}})}}},[P]),et=u.useCallback((G,be)=>(he,ke)=>{const Re=he.nativeEvent,ye=P.get(ke);if(Ce.current!==null||!ye||Re.dndKit||Re.defaultPrevented)return;const Pe={active:ye};G(he,be.options,Pe)===!0&&(Re.dndKit={capturedBy:be.sensor},Ce.current=ke,Ie(he,be))},[P,Ie]),St=Qi(p,et);ss(p),Xe(()=>{B&&E===ft.Initializing&&M(ft.Initialized)},[B,E]),u.useEffect(()=>{const{onDragMove:G}=Te.current,{active:be,activatorEvent:he,collisions:ke,over:Re}=Se.current;if(!be||!he)return;const ye={active:be,activatorEvent:he,collisions:ke,delta:{x:te.x,y:te.y},over:Re};Et.reactDomExports.unstable_batchedUpdates(()=>{G==null||G(ye),T({type:"onDragMove",event:ye})})},[te.x,te.y]),u.useEffect(()=>{const{active:G,activatorEvent:be,collisions:he,droppableContainers:ke,scrollAdjustedTranslate:Re}=Se.current;if(!G||Ce.current==null||!be||!Re)return;const{onDragOver:ye}=Te.current,Pe=ke.get(Ze),st=Pe&&Pe.rect.current?{id:Pe.id,rect:Pe.rect.current,data:Pe.data,disabled:Pe.disabled}:null,me={active:G,activatorEvent:be,collisions:he,delta:{x:Re.x,y:Re.y},over:st};Et.reactDomExports.unstable_batchedUpdates(()=>{_e(st),ye==null||ye(me),T({type:"onDragOver",event:me})})},[Ze]),Xe(()=>{Se.current={activatorEvent:W,active:J,activeNode:V,collisionRect:de,collisions:ge,droppableRects:ve,draggableNodes:P,draggingNode:We,draggingNodeRect:Fe,droppableContainers:k,over:Z,scrollableAncestors:v,scrollAdjustedTranslate:te},ee.current={initial:Fe,translated:de}},[J,V,ge,de,P,We,Fe,ve,k,Z,v,te]),Wi({...Ne,delta:K,draggingRect:de,pointerCoordinates:X,scrollableAncestors:v,scrollableAncestorRects:x});const Ut=u.useMemo(()=>({active:J,activeNode:V,activeNodeRect:B,activatorEvent:W,collisions:ge,containerNodeRect:Qe,dragOverlay:$,draggableNodes:P,droppableContainers:k,droppableRects:ve,over:Z,measureDroppableContainers:ze,scrollableAncestors:v,scrollableAncestorRects:x,measuringConfiguration:q,measuringScheduled:Je,windowRect:qe}),[J,V,B,W,ge,Qe,$,P,k,ve,Z,ze,v,x,q,Je,qe]),Xt=u.useMemo(()=>({activatorEvent:W,activators:St,active:J,activeNodeRect:B,ariaDescribedById:{draggable:se},dispatch:R,draggableNodes:P,over:Z,measureDroppableContainers:ze}),[W,St,J,B,R,se,P,Z,ze]);return u.createElement(Rr.Provider,{value:D},u.createElement(Ht.Provider,{value:Xt},u.createElement(Hr.Provider,{value:Ut},u.createElement(yn.Provider,{value:ne},d)),u.createElement(ps,{disabled:(c==null?void 0:c.restoreFocus)===!1})),u.createElement(wi,{...c,hiddenTextDescribedById:se}));function Ke(){const G=(je==null?void 0:je.autoScrollEnabled)===!1,be=typeof f=="object"?f.enabled===!1:f===!1,he=_&&!G&&!be;return typeof f=="object"?{...f,enabled:he}:{enabled:he}}}),ms=u.createContext(null),br="button",xs="Draggable";function ws(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const a=kt(xs),{activators:l,activatorEvent:c,active:f,activeNodeRect:d,ariaDescribedById:p,draggableNodes:h,over:w}=u.useContext(Ht),{role:y=br,roleDescription:A="draggable",tabIndex:b=0}=i??{},C=(f==null?void 0:f.id)===t,R=u.useContext(C?yn:ms),[T,D]=an(),[E,M]=an(),_=as(l,t),O=zt(n);Xe(()=>(h.set(t,{id:t,key:a,node:T,activatorNode:E,data:O}),()=>{const K=h.get(t);K&&K.key===a&&h.delete(t)}),[h,t]);const P=u.useMemo(()=>({role:y,tabIndex:b,"aria-disabled":o,"aria-pressed":C&&y===br?!0:void 0,"aria-roledescription":A,"aria-describedby":p.draggable}),[o,y,b,C,A,p.draggable]);return{active:f,activatorEvent:c,activeNodeRect:d,attributes:P,isDragging:C,listeners:o?void 0:_,node:T,over:w,setNodeRef:D,setActivatorNodeRef:M,transform:R}}function Xr(){return u.useContext(Hr)}const Cs="Droppable",Ss={timeout:25};function Ds(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const a=kt(Cs),{active:l,dispatch:c,over:f,measureDroppableContainers:d}=u.useContext(Ht),p=u.useRef({disabled:n}),h=u.useRef(!1),w=u.useRef(null),y=u.useRef(null),{disabled:A,updateMeasurementsFor:b,timeout:C}={...Ss,...i},R=zt(b??o),T=u.useCallback(()=>{if(!h.current){h.current=!0;return}y.current!=null&&clearTimeout(y.current),y.current=setTimeout(()=>{d(Array.isArray(R.current)?R.current:[R.current]),y.current=null},C)},[C]),D=bn({callback:T,disabled:A||!l}),E=u.useCallback((P,K)=>{D&&(K&&(D.unobserve(K),h.current=!1),P&&D.observe(P))},[D]),[M,_]=an(E),O=zt(t);return u.useEffect(()=>{!D||!M.current||(D.disconnect(),h.current=!1,D.observe(M.current))},[M,D]),u.useEffect(()=>(c({type:ie.RegisterDroppable,element:{id:o,key:a,disabled:n,node:M,rect:w,data:O}}),()=>c({type:ie.UnregisterDroppable,key:a,id:o})),[o]),u.useEffect(()=>{n!==p.current.disabled&&(c({type:ie.SetDroppableDisabled,id:o,key:a,disabled:n}),p.current.disabled=n)},[o,a,n,c]),{active:l,rect:w,isOver:(f==null?void 0:f.id)===o,node:M,over:f,setNodeRef:_}}function Rs(e){let{animation:t,children:n}=e;const[o,i]=u.useState(null),[a,l]=u.useState(null),c=ln(n);return!n&&!o&&c&&i(c),Xe(()=>{if(!a)return;const f=o==null?void 0:o.key,d=o==null?void 0:o.props.id;if(f==null||d==null){i(null);return}Promise.resolve(t(d,a)).then(()=>{i(null)})},[t,o,a]),u.createElement(u.Fragment,null,n,o?u.cloneElement(o,{ref:l}):null)}const Es={x:0,y:0,scaleX:1,scaleY:1};function As(e){let{children:t}=e;return u.createElement(Ht.Provider,{value:kr},u.createElement(yn.Provider,{value:Es},t))}const Ts={position:"fixed",touchAction:"none"},_s=e=>vn(e)?"transform 250ms ease":void 0,Is=u.forwardRef((e,t)=>{let{as:n,activatorEvent:o,adjustScale:i,children:a,className:l,rect:c,style:f,transform:d,transition:p=_s}=e;if(!c)return null;const h=i?d:{...d,scaleX:1,scaleY:1},w={...Ts,width:c.width,height:c.height,top:c.top,left:c.left,transform:gt.Transform.toString(h),transformOrigin:i&&o?Si(o,c):void 0,transition:typeof p=="function"?p(o):p,...f};return u.createElement(n,{className:l,style:w,ref:t},a)}),Gr=e=>t=>{let{active:n,dragOverlay:o}=t;const i={},{styles:a,className:l}=e;if(a!=null&&a.active)for(const[c,f]of Object.entries(a.active))f!==void 0&&(i[c]=n.node.style.getPropertyValue(c),n.node.style.setProperty(c,f));if(a!=null&&a.dragOverlay)for(const[c,f]of Object.entries(a.dragOverlay))f!==void 0&&o.node.style.setProperty(c,f);return l!=null&&l.active&&n.node.classList.add(l.active),l!=null&&l.dragOverlay&&o.node.classList.add(l.dragOverlay),function(){for(const[f,d]of Object.entries(i))n.node.style.setProperty(f,d);l!=null&&l.active&&n.node.classList.remove(l.active)}},Os=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:gt.Transform.toString(t)},{transform:gt.Transform.toString(n)}]},Ms={duration:250,easing:"ease",keyframes:Os,sideEffects:Gr({styles:{active:{opacity:"0"}}})};function Ns(e){let{config:t,draggableNodes:n,droppableContainers:o,measuringConfiguration:i}=e;return pn((a,l)=>{if(t===null)return;const c=n.get(a);if(!c)return;const f=c.node.current;if(!f)return;const d=Kr(l);if(!d)return;const{transform:p}=we(l).getComputedStyle(l),h=Tr(p);if(!h)return;const w=typeof t=="function"?t:Ps(t);return Lr(f,i.draggable.measure),w({active:{id:a,data:c.data,node:f,rect:i.draggable.measure(f)},draggableNodes:n,dragOverlay:{node:l,rect:i.dragOverlay.measure(d)},droppableContainers:o,measuringConfiguration:i,transform:h})})}function Ps(e){const{duration:t,easing:n,sideEffects:o,keyframes:i}={...Ms,...e};return a=>{let{active:l,dragOverlay:c,transform:f,...d}=a;if(!t)return;const p={x:c.rect.left-l.rect.left,y:c.rect.top-l.rect.top},h={scaleX:f.scaleX!==1?l.rect.width*f.scaleX/c.rect.width:1,scaleY:f.scaleY!==1?l.rect.height*f.scaleY/c.rect.height:1},w={x:f.x-p.x,y:f.y-p.y,...h},y=i({...d,active:l,dragOverlay:c,transform:{initial:f,final:w}}),[A]=y,b=y[y.length-1];if(JSON.stringify(A)===JSON.stringify(b))return;const C=o==null?void 0:o({active:l,dragOverlay:c,...d}),R=c.node.animate(y,{duration:t,easing:n,fill:"forwards"});return new Promise(T=>{R.onfinish=()=>{C==null||C(),T()}})}}let yr=0;function Ls(e){return u.useMemo(()=>{if(e!=null)return yr++,yr},[e])}const $s=u.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:i,transition:a,modifiers:l,wrapperElement:c="div",className:f,zIndex:d=999}=e;const{activatorEvent:p,active:h,activeNodeRect:w,containerNodeRect:y,draggableNodes:A,droppableContainers:b,dragOverlay:C,over:R,measuringConfiguration:T,scrollableAncestors:D,scrollableAncestorRects:E,windowRect:M}=Xr(),_=u.useContext(yn),O=Ls(h==null?void 0:h.id),P=Ur(l,{activatorEvent:p,active:h,activeNodeRect:w,containerNodeRect:y,draggingNodeRect:C.rect,over:R,overlayNodeRect:C.rect,scrollableAncestors:D,scrollableAncestorRects:E,transform:_,windowRect:M}),K=Xn(w),k=Ns({config:o,draggableNodes:A,droppableContainers:b,measuringConfiguration:T}),j=K?C.setRef:void 0;return u.createElement(As,null,u.createElement(Rs,{animation:k},h&&O?u.createElement(Is,{key:O,id:h.id,ref:j,as:c,activatorEvent:p,adjustScale:t,className:f,transition:a,rect:K,style:{zIndex:d,...i},transform:P},n):null))});function jt(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function Bs(e,t){return e.reduce((n,o,i)=>{const a=t.get(o);return a&&(n[i]=a),n},Array(e.length))}function nn(e){return e!==null&&e>=0}function js(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}function zs(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const rn={scaleX:1,scaleY:1},Fs=e=>{var t;let{rects:n,activeNodeRect:o,activeIndex:i,overIndex:a,index:l}=e;const c=(t=n[i])!=null?t:o;if(!c)return null;const f=Ks(n,l,i);if(l===i){const d=n[a];return d?{x:i<a?d.left+d.width-(c.left+c.width):d.left-c.left,y:0,...rn}:null}return l>i&&l<=a?{x:-c.width-f,y:0,...rn}:l<i&&l>=a?{x:c.width+f,y:0,...rn}:{x:0,y:0,...rn}};function Ks(e,t,n){const o=e[t],i=e[t-1],a=e[t+1];return!o||!i&&!a?0:n<t?i?o.left-(i.left+i.width):a.left-(o.left+o.width):a?a.left-(o.left+o.width):o.left-(i.left+i.width)}const Yr=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const a=jt(t,o,n),l=t[i],c=a[i];return!c||!l?null:{x:c.left-l.left,y:c.top-l.top,scaleX:c.width/l.width,scaleY:c.height/l.height}},on={scaleX:1,scaleY:1},mr=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:i,rects:a,overIndex:l}=e;const c=(t=a[n])!=null?t:o;if(!c)return null;if(i===n){const d=a[l];return d?{x:0,y:n<l?d.top+d.height-(c.top+c.height):d.top-c.top,...on}:null}const f=ks(a,i,n);return i>n&&i<=l?{x:0,y:-c.height-f,...on}:i<n&&i>=l?{x:0,y:c.height+f,...on}:{x:0,y:0,...on}};function ks(e,t,n){const o=e[t],i=e[t-1],a=e[t+1];return o?n<t?i?o.top-(i.top+i.height):a?a.top-(o.top+o.height):0:a?a.top-(o.top+o.height):i?o.top-(i.top+i.height):0:0}const Wr="Sortable",qr=u.createContext({activeIndex:-1,containerId:Wr,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Yr,disabled:{draggable:!1,droppable:!1}});function xr(e){let{children:t,id:n,items:o,strategy:i=Yr,disabled:a=!1}=e;const{active:l,dragOverlay:c,droppableRects:f,over:d,measureDroppableContainers:p}=Xr(),h=kt(Wr,n),w=c.rect!==null,y=u.useMemo(()=>o.map(_=>typeof _=="object"&&"id"in _?_.id:_),[o]),A=l!=null,b=l?y.indexOf(l.id):-1,C=d?y.indexOf(d.id):-1,R=u.useRef(y),T=!js(y,R.current),D=C!==-1&&b===-1||T,E=zs(a);Xe(()=>{T&&A&&p(y)},[T,y,A,p]),u.useEffect(()=>{R.current=y},[y]);const M=u.useMemo(()=>({activeIndex:b,containerId:h,disabled:E,disableTransforms:D,items:y,overIndex:C,useDragOverlay:w,sortedRects:Bs(y,f),strategy:i}),[b,h,E.draggable,E.droppable,D,y,C,f,w,i]);return u.createElement(qr.Provider,{value:M},t)}const Hs=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return jt(n,o,i).indexOf(t)},Jr=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:i,items:a,newIndex:l,previousItems:c,previousContainerId:f,transition:d}=e;return!d||!o||c!==a&&i===l?!1:n?!0:l!==i&&t===f},Us={duration:200,easing:"ease"},Vr="transform",Xs=gt.Transition.toString({property:Vr,duration:0,easing:"linear"}),Gs={roleDescription:"sortable"};function Ys(e){let{disabled:t,index:n,node:o,rect:i}=e;const[a,l]=u.useState(null),c=u.useRef(n);return Xe(()=>{if(!t&&n!==c.current&&o.current){const f=i.current;if(f){const d=Mt(o.current,{ignoreTransform:!0}),p={x:f.left-d.left,y:f.top-d.top,scaleX:f.width/d.width,scaleY:f.height/d.height};(p.x||p.y)&&l(p)}}n!==c.current&&(c.current=n)},[t,n,o,i]),u.useEffect(()=>{a&&l(null)},[a]),a}function Qr(e){let{animateLayoutChanges:t=Jr,attributes:n,disabled:o,data:i,getNewIndex:a=Hs,id:l,strategy:c,resizeObserverConfig:f,transition:d=Us}=e;const{items:p,containerId:h,activeIndex:w,disabled:y,disableTransforms:A,sortedRects:b,overIndex:C,useDragOverlay:R,strategy:T}=u.useContext(qr),D=Ws(o,y),E=p.indexOf(l),M=u.useMemo(()=>({sortable:{containerId:h,index:E,items:p},...i}),[h,i,E,p]),_=u.useMemo(()=>p.slice(p.indexOf(l)),[p,l]),{rect:O,node:P,isOver:K,setNodeRef:k}=Ds({id:l,data:M,disabled:D.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...f}}),{active:j,activatorEvent:ee,activeNodeRect:J,attributes:Ce,setNodeRef:je,listeners:F,isDragging:W,over:Oe,setActivatorNodeRef:Te,transform:se}=ws({id:l,data:M,attributes:{...Gs,...n},disabled:D.draggable}),Me=li(k,je),q=!!j,ve=q&&!A&&nn(w)&&nn(C),ze=!R&&W,Je=ze&&ve?se:null,Ve=ve?Je??(c??T)({rects:b,activeNodeRect:J,activeIndex:w,overIndex:C,index:E}):null,Ne=nn(w)&&nn(C)?a({id:l,items:p,activeIndex:w,overIndex:C}):E,ae=j==null?void 0:j.id,B=u.useRef({activeId:ae,items:p,newIndex:Ne,containerId:h}),Qe=p!==B.current.items,Se=t({active:j,containerId:h,isDragging:W,isSorting:q,id:l,index:E,items:p,newIndex:B.current.newIndex,previousItems:B.current.items,previousContainerId:B.current.containerId,transition:d,wasDragging:B.current.activeId!=null}),Ye=Ys({disabled:!Se,index:E,node:P,rect:O});return u.useEffect(()=>{q&&B.current.newIndex!==Ne&&(B.current.newIndex=Ne),h!==B.current.containerId&&(B.current.containerId=h),p!==B.current.items&&(B.current.items=p)},[q,Ne,h,p]),u.useEffect(()=>{if(ae===B.current.activeId)return;if(ae&&!B.current.activeId){B.current.activeId=ae;return}const We=setTimeout(()=>{B.current.activeId=ae},50);return()=>clearTimeout(We)},[ae]),{active:j,activeIndex:w,attributes:Ce,data:M,rect:O,index:E,newIndex:Ne,items:p,isOver:K,isSorting:q,isDragging:W,listeners:F,node:P,overIndex:C,over:Oe,setNodeRef:Me,setActivatorNodeRef:Te,setDroppableNodeRef:k,setDraggableNodeRef:je,transform:Ye??Ve,transition:$()};function $(){if(Ye||Qe&&B.current.newIndex===E)return Xs;if(!(ze&&!vn(ee)||!d)&&(q||Se))return gt.Transition.toString({...d,property:Vr})}}function Ws(e,t){var n,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(o=e==null?void 0:e.droppable)!=null?o:t.droppable}}L.Down,L.Right,L.Up,L.Left;const qs=e=>e;function wr(e,t=qs){return[...new Array(e)].map((n,o)=>t(o))}const Js=[L.Down,L.Right,L.Up,L.Left],Vs=(e,{context:{active:t,droppableRects:n,droppableContainers:o,collisionRect:i}})=>{var a;if(Js.includes(e.code)){if(e.preventDefault(),!t||!i)return;const l=[];o.getEnabled().forEach(d=>{var w;if(!d||d!=null&&d.disabled)return;const p=n.get(d.id);if(!p)return;const h=d.data.current;if(h){const{type:y,children:A}=h;if(y==="container"&&(A==null?void 0:A.length)>0&&((w=t.data.current)==null?void 0:w.type)!=="container")return}switch(e.code){case L.Down:i.top<p.top&&l.push(d);break;case L.Up:i.top>p.top&&l.push(d);break;case L.Left:i.left>=p.left+p.width&&l.push(d);break;case L.Right:i.left+i.width<=p.left&&l.push(d);break}});const c=Ri({active:t,collisionRect:i,droppableRects:n,droppableContainers:l,pointerCoordinates:null}),f=Fn(c,"id");if(f!=null){const d=o.get(f),p=d==null?void 0:d.node.current,h=d==null?void 0:d.rect.current;if(p&&h)return d.id==="placeholder"?{x:h.left+(h.width-i.width)/2,y:h.top+(h.height-i.height)/2}:((a=d.data.current)==null?void 0:a.type)==="container"?{x:h.left+20,y:h.top+74}:{x:h.left,y:h.top}}}},Qs="_Wrapper_37o6x_33",Zs="_fadeIn_37o6x_41",ea="_dragOverlay_37o6x_44",ta="_Item_37o6x_53",na="_withHandle_37o6x_79",ra="_dragging_37o6x_83",oa="_disabled_37o6x_91",ia="_pop_37o6x_1",sa="_color_37o6x_110",aa="_Remove_37o6x_123",la="_Actions_37o6x_129",Ue={Wrapper:Qs,fadeIn:Zs,dragOverlay:ea,Item:ta,withHandle:na,dragging:ra,disabled:oa,pop:ia,color:sa,Remove:aa,Actions:la},ca=_t.newStyled.div`
5
+ `},xi={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 wi(e){let{announcements:t=xi,container:n,hiddenTextDescribedById:o,screenReaderInstructions:s=mi}=e;const{announce:c,announcement:l}=vi(),u=vn("DndLiveRegion"),[h,f]=d.useState(!1);if(d.useEffect(()=>{f(!0)},[]),bi(d.useMemo(()=>({onDragStart(v){let{active:_}=v;c(t.onDragStart({active:_}))},onDragMove(v){let{active:_,over:w}=v;t.onDragMove&&c(t.onDragMove({active:_,over:w}))},onDragOver(v){let{active:_,over:w}=v;c(t.onDragOver({active:_,over:w}))},onDragEnd(v){let{active:_,over:w}=v;c(t.onDragEnd({active:_,over:w}))},onDragCancel(v){let{active:_,over:w}=v;c(t.onDragCancel({active:_,over:w}))}}),[c,t])),!h)return null;const b=d.createElement(d.Fragment,null,d.createElement(hi,{id:o,value:s.draggable}),d.createElement(pi,{id:u,announcement:l}));return n?Vt.reactDomExports.createPortal(b,n):b}var ye;(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"})(ye||(ye={}));function zn(){}function Or(e,t){return d.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Ci(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d.useMemo(()=>[...t].filter(o=>o!=null),[...t])}const yt=Object.freeze({x:0,y:0});function Gr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Si(e,t){const n=Fn(e);if(!n)return"0 0";const o={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return o.x+"% "+o.y+"%"}function Ur(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function _i(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function Pr(e){let{left:t,top:n,height:o,width:s}=e;return[{x:t,y:n},{x:t+s,y:n},{x:t,y:n+o},{x:t+s,y:n+o}]}function kr(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function eo(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const to=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const s=eo(t,t.left,t.top),c=[];for(const l of o){const{id:u}=l,h=n.get(u);if(h){const f=Gr(eo(h),s);c.push({id:u,data:{droppableContainer:l,value:f}})}}return c.sort(Ur)},Di=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const s=Pr(t),c=[];for(const l of o){const{id:u}=l,h=n.get(u);if(h){const f=Pr(h),b=s.reduce((_,w,I)=>_+Gr(f[I],w),0),v=Number((b/4).toFixed(4));c.push({id:u,data:{droppableContainer:l,value:v}})}}return c.sort(Ur)};function Ri(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),s=Math.min(t.left+t.width,e.left+e.width),c=Math.min(t.top+t.height,e.top+e.height),l=s-o,u=c-n;if(o<s&&n<c){const h=t.width*t.height,f=e.width*e.height,b=l*u,v=b/(h+f-b);return Number(v.toFixed(4))}return 0}const wo=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const s=[];for(const c of o){const{id:l}=c,u=n.get(l);if(u){const h=Ri(u,t);h>0&&s.push({id:l,data:{droppableContainer:c,value:h}})}}return s.sort(_i)};function Ei(e,t){const{top:n,left:o,bottom:s,right:c}=t;return n<=e.y&&e.y<=s&&o<=e.x&&e.x<=c}const Ai=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:o}=e;if(!o)return[];const s=[];for(const c of t){const{id:l}=c,u=n.get(l);if(u&&Ei(o,u)){const f=Pr(u).reduce((v,_)=>v+Gr(o,_),0),b=Number((f/4).toFixed(4));s.push({id:l,data:{droppableContainer:c,value:b}})}}return s.sort(Ur)};function Ti(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Co(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:yt}function Oi(e){return function(n){for(var o=arguments.length,s=new Array(o>1?o-1:0),c=1;c<o;c++)s[c-1]=arguments[c];return s.reduce((l,u)=>({...l,top:l.top+e*u.y,bottom:l.bottom+e*u.y,left:l.left+e*u.x,right:l.right+e*u.x}),{...n})}}const Ii=Oi(1);function So(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]}}else 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}function Mi(e,t,n){const o=So(t);if(!o)return e;const{scaleX:s,scaleY:c,x:l,y:u}=o,h=e.left-l-(1-s)*parseFloat(n),f=e.top-u-(1-c)*parseFloat(n.slice(n.indexOf(" ")+1)),b=s?e.width/s:e.width,v=c?e.height/c:e.height;return{width:b,height:v,top:f,right:h+b,bottom:f+v,left:h}}const Ni={ignoreTransform:!1};function rn(e,t){t===void 0&&(t=Ni);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:f,transformOrigin:b}=Ke(e).getComputedStyle(e);f&&(n=Mi(n,f,b))}const{top:o,left:s,width:c,height:l,bottom:u,right:h}=n;return{top:o,left:s,width:c,height:l,bottom:u,right:h}}function no(e){return rn(e,{ignoreTransform:!0})}function Pi(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Li(e,t){return t===void 0&&(t=Ke(e).getComputedStyle(e)),t.position==="fixed"}function ji(e,t){t===void 0&&(t=Ke(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const c=t[s];return typeof c=="string"?n.test(c):!1})}function Xr(e,t){const n=[];function o(s){if(t!=null&&n.length>=t||!s)return n;if(Kr(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!hn(s)||yo(s)||n.includes(s))return n;const c=Ke(e).getComputedStyle(s);return s!==e&&ji(s,c)&&n.push(s),Li(s,c)?n:o(s.parentNode)}return e?o(e):n}function _o(e){const[t]=Xr(e,1);return t??null}function Ir(e){return!Un||!e?null:tn(e)?e:Hr(e)?Kr(e)||e===nn(e).scrollingElement?window:hn(e)?e:null:null}function Do(e){return tn(e)?e.scrollX:e.scrollLeft}function Ro(e){return tn(e)?e.scrollY:e.scrollTop}function Lr(e){return{x:Do(e),y:Ro(e)}}var Ce;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ce||(Ce={}));function Eo(e){return!Un||!e?!1:e===document.scrollingElement}function Ao(e){const t={x:0,y:0},n=Eo(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},s=e.scrollTop<=t.y,c=e.scrollLeft<=t.x,l=e.scrollTop>=o.y,u=e.scrollLeft>=o.x;return{isTop:s,isLeft:c,isBottom:l,isRight:u,maxScroll:o,minScroll:t}}const $i={x:.2,y:.2};function Bi(e,t,n,o,s){let{top:c,left:l,right:u,bottom:h}=n;o===void 0&&(o=10),s===void 0&&(s=$i);const{isTop:f,isBottom:b,isLeft:v,isRight:_}=Ao(e),w={x:0,y:0},I={x:0,y:0},x={height:t.height*s.y,width:t.width*s.x};return!f&&c<=t.top+x.height?(w.y=Ce.Backward,I.y=o*Math.abs((t.top+x.height-c)/x.height)):!b&&h>=t.bottom-x.height&&(w.y=Ce.Forward,I.y=o*Math.abs((t.bottom-x.height-h)/x.height)),!_&&u>=t.right-x.width?(w.x=Ce.Forward,I.x=o*Math.abs((t.right-x.width-u)/x.width)):!v&&l<=t.left+x.width&&(w.x=Ce.Backward,I.x=o*Math.abs((t.left+x.width-l)/x.width)),{direction:w,speed:I}}function Fi(e){if(e===document.scrollingElement){const{innerWidth:c,innerHeight:l}=window;return{top:0,left:0,right:c,bottom:l,width:c,height:l}}const{top:t,left:n,right:o,bottom:s}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:s,width:e.clientWidth,height:e.clientHeight}}function To(e){return e.reduce((t,n)=>Zt(t,Lr(n)),yt)}function zi(e){return e.reduce((t,n)=>t+Do(n),0)}function Hi(e){return e.reduce((t,n)=>t+Ro(n),0)}function Oo(e,t){if(t===void 0&&(t=rn),!e)return;const{top:n,left:o,bottom:s,right:c}=t(e);_o(e)&&(s<=0||c<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ki=[["x",["left","right"],zi],["y",["top","bottom"],Hi]];class Yr{constructor(t,n){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 o=Xr(n),s=To(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[c,l,u]of Ki)for(const h of l)Object.defineProperty(this,h,{get:()=>{const f=u(o),b=s[c]-f;return this.rect[h]+b},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ln{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=t}add(t,n,o){var s;(s=this.target)==null||s.addEventListener(t,n,o),this.listeners.push([t,n,o])}}function Gi(e){const{EventTarget:t}=Ke(e);return e instanceof t?e:nn(e)}function Mr(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t?o>t.y:!1}var ut;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ut||(ut={}));function ro(e){e.preventDefault()}function Ui(e){e.stopPropagation()}var H;(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"})(H||(H={}));const Io={start:[H.Space,H.Enter],cancel:[H.Esc],end:[H.Space,H.Enter,H.Tab]},ki=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case H.Right:return{...n,x:n.x+25};case H.Left:return{...n,x:n.x-25};case H.Down:return{...n,y:n.y+25};case H.Up:return{...n,y:n.y-25}}};class Wr{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new ln(nn(n)),this.windowListeners=new ln(Ke(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ut.Resize,this.handleCancel),this.windowListeners.add(ut.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ut.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&Oo(o),n(yt)}handleKeyDown(t){if(Xn(t)){const{active:n,context:o,options:s}=this.props,{keyboardCodes:c=Io,coordinateGetter:l=ki,scrollBehavior:u="smooth"}=s,{code:h}=t;if(c.end.includes(h)){this.handleEnd(t);return}if(c.cancel.includes(h)){this.handleCancel(t);return}const{collisionRect:f}=o.current,b=f?{x:f.left,y:f.top}:yt;this.referenceCoordinates||(this.referenceCoordinates=b);const v=l(t,{active:n,context:o.current,currentCoordinates:b});if(v){const _=Bn(v,b),w={x:0,y:0},{scrollableAncestors:I}=o.current;for(const x of I){const D=t.code,{isTop:A,isRight:M,isLeft:T,isBottom:O,maxScroll:L,minScroll:N}=Ao(x),P=Fi(x),$={x:Math.min(D===H.Right?P.right-P.width/2:P.right,Math.max(D===H.Right?P.left:P.left+P.width/2,v.x)),y:Math.min(D===H.Down?P.bottom-P.height/2:P.bottom,Math.max(D===H.Down?P.top:P.top+P.height/2,v.y))},Y=D===H.Right&&!M||D===H.Left&&!T,W=D===H.Down&&!O||D===H.Up&&!A;if(Y&&$.x!==v.x){const K=x.scrollLeft+_.x,ie=D===H.Right&&K<=L.x||D===H.Left&&K>=N.x;if(ie&&!_.y){x.scrollTo({left:K,behavior:u});return}ie?w.x=x.scrollLeft-K:w.x=D===H.Right?x.scrollLeft-L.x:x.scrollLeft-N.x,w.x&&x.scrollBy({left:-w.x,behavior:u});break}else if(W&&$.y!==v.y){const K=x.scrollTop+_.y,ie=D===H.Down&&K<=L.y||D===H.Up&&K>=N.y;if(ie&&!_.x){x.scrollTo({top:K,behavior:u});return}ie?w.y=x.scrollTop-K:w.y=D===H.Down?x.scrollTop-L.y:x.scrollTop-N.y,w.y&&x.scrollBy({top:-w.y,behavior:u});break}}this.handleMove(t,Zt(Bn(v,this.referenceCoordinates),w))}}}handleMove(t,n){const{onMove:o}=this.props;t.preventDefault(),o(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Wr.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=Io,onActivation:s}=t,{active:c}=n;const{code:l}=e.nativeEvent;if(o.start.includes(l)){const u=c.activatorNode.current;return u&&e.target!==u?!1:(e.preventDefault(),s==null||s({event:e.nativeEvent}),!0)}return!1}}];function oo(e){return!!(e&&"distance"in e)}function io(e){return!!(e&&"delay"in e)}class qr{constructor(t,n,o){var s;o===void 0&&(o=Gi(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;const{event:c}=t,{target:l}=c;this.props=t,this.events=n,this.document=nn(l),this.documentListeners=new ln(this.document),this.listeners=new ln(o),this.windowListeners=new ln(Ke(l)),this.initialCoordinates=(s=Fn(c))!=null?s:yt,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:t,props:{options:{activationConstraint:n,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(ut.Resize,this.handleCancel),this.windowListeners.add(ut.DragStart,ro),this.windowListeners.add(ut.VisibilityChange,this.handleCancel),this.windowListeners.add(ut.ContextMenu,ro),this.documentListeners.add(ut.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(io(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(oo(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:o,onPending:s}=this.props;s(o,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(ut.Click,Ui,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ut.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:s,props:c}=this,{onMove:l,options:{activationConstraint:u}}=c;if(!s)return;const h=(n=Fn(t))!=null?n:yt,f=Bn(s,h);if(!o&&u){if(oo(u)){if(u.tolerance!=null&&Mr(f,u.tolerance))return this.handleCancel();if(Mr(f,u.distance))return this.handleStart()}if(io(u)&&Mr(f,u.tolerance))return this.handleCancel();this.handlePending(u,f);return}t.cancelable&&t.preventDefault(),l(h)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===H.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Xi={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Mo extends qr{constructor(t){const{event:n}=t,o=nn(n.target);super(t,Xi,o)}}Mo.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!n.isPrimary||n.button!==0?!1:(o==null||o({event:n}),!0)}}];const Yi={move:{name:"mousemove"},end:{name:"mouseup"}};var jr;(function(e){e[e.RightClick=2]="RightClick"})(jr||(jr={}));class No extends qr{constructor(t){super(t,Yi,nn(t.event.target))}}No.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===jr.RightClick?!1:(o==null||o({event:n}),!0)}}];const Nr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Po extends qr{constructor(t){super(t,Nr)}static setup(){return window.addEventListener(Nr.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Nr.move.name,t)};function t(){}}}Po.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:s}=n;return s.length>1?!1:(o==null||o({event:n}),!0)}}];var un;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(un||(un={}));var Hn;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Hn||(Hn={}));function Wi(e){let{acceleration:t,activator:n=un.Pointer,canScroll:o,draggingRect:s,enabled:c,interval:l=5,order:u=Hn.TreeOrder,pointerCoordinates:h,scrollableAncestors:f,scrollableAncestorRects:b,delta:v,threshold:_}=e;const w=Ji({delta:v,disabled:!c}),[I,x]=li(),D=d.useRef({x:0,y:0}),A=d.useRef({x:0,y:0}),M=d.useMemo(()=>{switch(n){case un.Pointer:return h?{top:h.y,bottom:h.y,left:h.x,right:h.x}:null;case un.DraggableRect:return s}},[n,s,h]),T=d.useRef(null),O=d.useCallback(()=>{const N=T.current;if(!N)return;const P=D.current.x*A.current.x,$=D.current.y*A.current.y;N.scrollBy(P,$)},[]),L=d.useMemo(()=>u===Hn.TreeOrder?[...f].reverse():f,[u,f]);d.useEffect(()=>{if(!c||!f.length||!M){x();return}for(const N of L){if((o==null?void 0:o(N))===!1)continue;const P=f.indexOf(N),$=b[P];if(!$)continue;const{direction:Y,speed:W}=Bi(N,$,M,t,_);for(const K of["x","y"])w[K][Y[K]]||(W[K]=0,Y[K]=0);if(W.x>0||W.y>0){x(),T.current=N,I(O,l),D.current=W,A.current=Y;return}}D.current={x:0,y:0},A.current={x:0,y:0},x()},[t,O,o,x,c,l,JSON.stringify(M),JSON.stringify(w),I,f,L,b,JSON.stringify(_)])}const qi={x:{[Ce.Backward]:!1,[Ce.Forward]:!1},y:{[Ce.Backward]:!1,[Ce.Forward]:!1}};function Ji(e){let{delta:t,disabled:n}=e;const o=$n(t);return pn(s=>{if(n||!o||!s)return qi;const c={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Ce.Backward]:s.x[Ce.Backward]||c.x===-1,[Ce.Forward]:s.x[Ce.Forward]||c.x===1},y:{[Ce.Backward]:s.y[Ce.Backward]||c.y===-1,[Ce.Forward]:s.y[Ce.Forward]||c.y===1}}},[n,t,o])}function Vi(e,t){const n=t!=null?e.get(t):void 0,o=n?n.node.current:null;return pn(s=>{var c;return t==null?null:(c=o??s)!=null?c:null},[o,t])}function Zi(e,t){return d.useMemo(()=>e.reduce((n,o)=>{const{sensor:s}=o,c=s.activators.map(l=>({eventName:l.eventName,handler:t(l.handler,o)}));return[...n,...c]},[]),[e,t])}var Qt;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Qt||(Qt={}));var $r;(function(e){e.Optimized="optimized"})($r||($r={}));const so=new Map;function Qi(e,t){let{dragging:n,dependencies:o,config:s}=t;const[c,l]=d.useState(null),{frequency:u,measure:h,strategy:f}=s,b=d.useRef(e),v=D(),_=gn(v),w=d.useCallback(function(A){A===void 0&&(A=[]),!_.current&&l(M=>M===null?A:M.concat(A.filter(T=>!M.includes(T))))},[_]),I=d.useRef(null),x=pn(A=>{if(v&&!n)return so;if(!A||A===so||b.current!==e||c!=null){const M=new Map;for(let T of e){if(!T)continue;if(c&&c.length>0&&!c.includes(T.id)&&T.rect.current){M.set(T.id,T.rect.current);continue}const O=T.node.current,L=O?new Yr(h(O),O):null;T.rect.current=L,L&&M.set(T.id,L)}return M}return A},[e,c,n,v,h]);return d.useEffect(()=>{b.current=e},[e]),d.useEffect(()=>{v||w()},[n,v]),d.useEffect(()=>{c&&c.length>0&&l(null)},[JSON.stringify(c)]),d.useEffect(()=>{v||typeof u!="number"||I.current!==null||(I.current=setTimeout(()=>{w(),I.current=null},u))},[u,v,w,...o]),{droppableRects:x,measureDroppableContainers:w,measuringScheduled:c!=null};function D(){switch(f){case Qt.Always:return!1;case Qt.BeforeDragging:return n;default:return!n}}}function Jr(e,t){return pn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function es(e,t){return Jr(e,t)}function ts(e){let{callback:t,disabled:n}=e;const o=kn(t),s=d.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:c}=window;return new c(o)},[o,n]);return d.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function Yn(e){let{callback:t,disabled:n}=e;const o=kn(t),s=d.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:c}=window;return new c(o)},[n]);return d.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function ns(e){return new Yr(rn(e),e)}function ao(e,t,n){t===void 0&&(t=ns);const[o,s]=d.useState(null);function c(){s(h=>{if(!e)return null;if(e.isConnected===!1){var f;return(f=h??n)!=null?f:null}const b=t(e);return JSON.stringify(h)===JSON.stringify(b)?h:b})}const l=ts({callback(h){if(e)for(const f of h){const{type:b,target:v}=f;if(b==="childList"&&v instanceof HTMLElement&&v.contains(e)){c();break}}}}),u=Yn({callback:c});return bt(()=>{c(),e?(u==null||u.observe(e),l==null||l.observe(document.body,{childList:!0,subtree:!0})):(u==null||u.disconnect(),l==null||l.disconnect())},[e]),o}function rs(e){const t=Jr(e);return Co(e,t)}const co=[];function os(e){const t=d.useRef(e),n=pn(o=>e?o&&o!==co&&e&&t.current&&e.parentNode===t.current.parentNode?o:Xr(e):co,[e]);return d.useEffect(()=>{t.current=e},[e]),n}function is(e){const[t,n]=d.useState(null),o=d.useRef(e),s=d.useCallback(c=>{const l=Ir(c.target);l&&n(u=>u?(u.set(l,Lr(l)),new Map(u)):null)},[]);return d.useEffect(()=>{const c=o.current;if(e!==c){l(c);const u=e.map(h=>{const f=Ir(h);return f?(f.addEventListener("scroll",s,{passive:!0}),[f,Lr(f)]):null}).filter(h=>h!=null);n(u.length?new Map(u):null),o.current=e}return()=>{l(e),l(c)};function l(u){u.forEach(h=>{const f=Ir(h);f==null||f.removeEventListener("scroll",s)})}},[s,e]),d.useMemo(()=>e.length?t?Array.from(t.values()).reduce((c,l)=>Zt(c,l),yt):To(e):yt,[e,t])}function lo(e,t){t===void 0&&(t=[]);const n=d.useRef(null);return d.useEffect(()=>{n.current=null},t),d.useEffect(()=>{const o=e!==yt;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?Bn(e,n.current):yt}function ss(e){d.useEffect(()=>{if(!Un)return;const t=e.map(n=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function as(e,t){return d.useMemo(()=>e.reduce((n,o)=>{let{eventName:s,handler:c}=o;return n[s]=l=>{c(l,t)},n},{}),[e,t])}function Lo(e){return d.useMemo(()=>e?Pi(e):null,[e])}const uo=[];function cs(e,t){t===void 0&&(t=rn);const[n]=e,o=Lo(n?Ke(n):null),[s,c]=d.useState(uo);function l(){c(()=>e.length?e.map(h=>Eo(h)?o:new Yr(t(h),h)):uo)}const u=Yn({callback:l});return bt(()=>{u==null||u.disconnect(),l(),e.forEach(h=>u==null?void 0:u.observe(h))},[e]),s}function jo(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return hn(t)?t:e}function ls(e){let{measure:t}=e;const[n,o]=d.useState(null),s=d.useCallback(f=>{for(const{target:b}of f)if(hn(b)){o(v=>{const _=t(b);return v?{...v,width:_.width,height:_.height}:_});break}},[t]),c=Yn({callback:s}),l=d.useCallback(f=>{const b=jo(f);c==null||c.disconnect(),b&&(c==null||c.observe(b)),o(b?t(b):null)},[t,c]),[u,h]=jn(l);return d.useMemo(()=>({nodeRef:u,rect:n,setRef:h}),[n,u,h])}const us=[{sensor:Mo,options:{}},{sensor:Wr,options:{}}],ds={current:{}},Ln={draggable:{measure:no},droppable:{measure:no,strategy:Qt.WhileDragging,frequency:$r.Optimized},dragOverlay:{measure:rn}};class dn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,o;return(n=(o=this.get(t))==null?void 0:o.node.current)!=null?n:void 0}}const fs={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new dn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:zn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ln,measureDroppableContainers:zn,windowRect:null,measuringScheduled:!1},$o={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:zn,draggableNodes:new Map,over:null,measureDroppableContainers:zn},bn=d.createContext($o),Bo=d.createContext(fs);function gs(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new dn}}}function hs(e,t){switch(t.type){case ye.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ye.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ye.DragEnd:case ye.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ye.RegisterDroppable:{const{element:n}=t,{id:o}=n,s=new dn(e.droppable.containers);return s.set(o,n),{...e,droppable:{...e.droppable,containers:s}}}case ye.SetDroppableDisabled:{const{id:n,key:o,disabled:s}=t,c=e.droppable.containers.get(n);if(!c||o!==c.key)return e;const l=new dn(e.droppable.containers);return l.set(n,{...c,disabled:s}),{...e,droppable:{...e.droppable,containers:l}}}case ye.UnregisterDroppable:{const{id:n,key:o}=t,s=e.droppable.containers.get(n);if(!s||o!==s.key)return e;const c=new dn(e.droppable.containers);return c.delete(n),{...e,droppable:{...e.droppable,containers:c}}}default:return e}}function ps(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:s}=d.useContext(bn),c=$n(o),l=$n(n==null?void 0:n.id);return d.useEffect(()=>{if(!t&&!o&&c&&l!=null){if(!Xn(c)||document.activeElement===c.target)return;const u=s.get(l);if(!u)return;const{activatorNode:h,node:f}=u;if(!h.current&&!f.current)return;requestAnimationFrame(()=>{for(const b of[h.current,f.current]){if(!b)continue;const v=fi(b);if(v){v.focus();break}}})}},[o,t,s,l,c]),null}function Fo(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((s,c)=>c({transform:s,...o}),n):n}function vs(e){return d.useMemo(()=>({draggable:{...Ln.draggable,...e==null?void 0:e.draggable},droppable:{...Ln.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Ln.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function bs(e){let{activeNode:t,measure:n,initialRect:o,config:s=!0}=e;const c=d.useRef(!1),{x:l,y:u}=typeof s=="boolean"?{x:s,y:s}:s;bt(()=>{if(!l&&!u||!t){c.current=!1;return}if(c.current||!o)return;const f=t==null?void 0:t.node.current;if(!f||f.isConnected===!1)return;const b=n(f),v=Co(b,o);if(l||(v.x=0),u||(v.y=0),c.current=!0,Math.abs(v.x)>0||Math.abs(v.y)>0){const _=_o(f);_&&_.scrollBy({top:v.y,left:v.x})}},[t,l,u,o,n])}const Wn=d.createContext({...yt,scaleX:1,scaleY:1});var Kt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Kt||(Kt={}));const ys=d.memo(function(t){var n,o,s,c;let{id:l,accessibility:u,autoScroll:h=!0,children:f,sensors:b=us,collisionDetection:v=wo,measuring:_,modifiers:w,...I}=t;const x=d.useReducer(hs,void 0,gs),[D,A]=x,[M,T]=yi(),[O,L]=d.useState(Kt.Uninitialized),N=O===Kt.Initialized,{draggable:{active:P,nodes:$,translate:Y},droppable:{containers:W}}=D,K=P!=null?$.get(P):null,ie=d.useRef({initial:null,translated:null}),ee=d.useMemo(()=>{var q;return P!=null?{id:P,data:(q=K==null?void 0:K.data)!=null?q:ds,rect:ie}:null},[P,K]),Se=d.useRef(null),[Ge,k]=d.useState(null),[te,Ue]=d.useState(null),_e=gn(I,Object.values(I)),B=vn("DndDescribedBy",l),ke=d.useMemo(()=>W.getEnabled(),[W]),ne=vs(_),{droppableRects:Z,measureDroppableContainers:Xe,measuringScheduled:nt}=Qi(ke,{dragging:N,dependencies:[Y.x,Y.y],config:ne.droppable}),se=Vi($,P),dt=d.useMemo(()=>te?Fn(te):null,[te]),Ye=Be(),fe=es(se,ne.draggable.measure);bs({activeNode:P!=null?$.get(P):null,config:Ye.layoutShiftCompensation,initialRect:fe,measure:ne.draggable.measure});const G=ao(se,ne.draggable.measure,fe),rt=ao(se?se.parentElement:null),Te=d.useRef({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:Z,draggableNodes:$,draggingNode:null,draggingNodeRect:null,droppableContainers:W,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ot=W.getNodeFor((n=Te.current.over)==null?void 0:n.id),z=ls({measure:ne.dragOverlay.measure}),Ve=(o=z.nodeRef.current)!=null?o:se,Le=N?(s=z.rect)!=null?s:G:null,mt=!!(z.nodeRef.current&&z.rect),Oe=rs(mt?null:G),it=Lo(Ve?Ke(Ve):null),m=os(N?ot??se:null),C=cs(m),F=Fo(w,{transform:{x:Y.x-Oe.x,y:Y.y-Oe.y,scaleX:1,scaleY:1},activatorEvent:te,active:ee,activeNodeRect:G,containerNodeRect:rt,draggingNodeRect:Le,over:Te.current.over,overlayNodeRect:z.rect,scrollableAncestors:m,scrollableAncestorRects:C,windowRect:it}),V=dt?Zt(dt,Y):null,U=is(m),re=lo(U),ae=lo(U,[G]),ce=Zt(F,re),ge=Le?Ii(Le,F):null,pe=ee&&ge?v({active:ee,collisionRect:ge,droppableRects:Z,droppableContainers:ke,pointerCoordinates:V}):null,ft=kr(pe,"id"),[le,je]=d.useState(null),Rt=mt?F:Zt(F,ae),ue=Ti(Rt,(c=le==null?void 0:le.rect)!=null?c:null,G),de=d.useRef(null),$e=d.useCallback((q,De)=>{let{sensor:me,options:Qe}=De;if(Se.current==null)return;const Ie=$.get(Se.current);if(!Ie)return;const Re=q.nativeEvent,Fe=new me({active:Se.current,activeNode:Ie,event:Re,options:Qe,context:Te,onAbort(J){if(!$.get(J))return;const{onDragAbort:Ne}=_e.current,ze={id:J};Ne==null||Ne(ze),M({type:"onDragAbort",event:ze})},onPending(J,Me,Ne,ze){if(!$.get(J))return;const{onDragPending:et}=_e.current,he={id:J,constraint:Me,initialCoordinates:Ne,offset:ze};et==null||et(he),M({type:"onDragPending",event:he})},onStart(J){const Me=Se.current;if(Me==null)return;const Ne=$.get(Me);if(!Ne)return;const{onDragStart:ze}=_e.current,ht={activatorEvent:Re,active:{id:Me,data:Ne.data,rect:ie}};Vt.reactDomExports.unstable_batchedUpdates(()=>{ze==null||ze(ht),L(Kt.Initializing),A({type:ye.DragStart,initialCoordinates:J,active:Me}),M({type:"onDragStart",event:ht}),k(de.current),Ue(Re)})},onMove(J){A({type:ye.DragMove,coordinates:J})},onEnd:gt(ye.DragEnd),onCancel:gt(ye.DragCancel)});de.current=Fe;function gt(J){return async function(){const{active:Ne,collisions:ze,over:ht,scrollAdjustedTranslate:et}=Te.current;let he=null;if(Ne&&et){const{cancelDrop:Et}=_e.current;he={activatorEvent:Re,active:Ne,collisions:ze,delta:et,over:ht},J===ye.DragEnd&&typeof Et=="function"&&await Promise.resolve(Et(he))&&(J=ye.DragCancel)}Se.current=null,Vt.reactDomExports.unstable_batchedUpdates(()=>{A({type:J}),L(Kt.Uninitialized),je(null),k(null),Ue(null),de.current=null;const Et=J===ye.DragEnd?"onDragEnd":"onDragCancel";if(he){const Ut=_e.current[Et];Ut==null||Ut(he),M({type:Et,event:he})}})}}},[$]),Ze=d.useCallback((q,De)=>(me,Qe)=>{const Ie=me.nativeEvent,Re=$.get(Qe);if(Se.current!==null||!Re||Ie.dndKit||Ie.defaultPrevented)return;const Fe={active:Re};q(me,De.options,Fe)===!0&&(Ie.dndKit={capturedBy:De.sensor},Se.current=Qe,$e(me,De))},[$,$e]),st=Zi(b,Ze);ss(b),bt(()=>{G&&O===Kt.Initializing&&L(Kt.Initialized)},[G,O]),d.useEffect(()=>{const{onDragMove:q}=_e.current,{active:De,activatorEvent:me,collisions:Qe,over:Ie}=Te.current;if(!De||!me)return;const Re={active:De,activatorEvent:me,collisions:Qe,delta:{x:ce.x,y:ce.y},over:Ie};Vt.reactDomExports.unstable_batchedUpdates(()=>{q==null||q(Re),M({type:"onDragMove",event:Re})})},[ce.x,ce.y]),d.useEffect(()=>{const{active:q,activatorEvent:De,collisions:me,droppableContainers:Qe,scrollAdjustedTranslate:Ie}=Te.current;if(!q||Se.current==null||!De||!Ie)return;const{onDragOver:Re}=_e.current,Fe=Qe.get(ft),gt=Fe&&Fe.rect.current?{id:Fe.id,rect:Fe.rect.current,data:Fe.data,disabled:Fe.disabled}:null,J={active:q,activatorEvent:De,collisions:me,delta:{x:Ie.x,y:Ie.y},over:gt};Vt.reactDomExports.unstable_batchedUpdates(()=>{je(gt),Re==null||Re(J),M({type:"onDragOver",event:J})})},[ft]),bt(()=>{Te.current={activatorEvent:te,active:ee,activeNode:se,collisionRect:ge,collisions:pe,droppableRects:Z,draggableNodes:$,draggingNode:Ve,draggingNodeRect:Le,droppableContainers:W,over:le,scrollableAncestors:m,scrollAdjustedTranslate:ce},ie.current={initial:Le,translated:ge}},[ee,se,pe,ge,$,Ve,Le,Z,W,le,m,ce]),Wi({...Ye,delta:Y,draggingRect:ge,pointerCoordinates:V,scrollableAncestors:m,scrollableAncestorRects:C});const Pt=d.useMemo(()=>({active:ee,activeNode:se,activeNodeRect:G,activatorEvent:te,collisions:pe,containerNodeRect:rt,dragOverlay:z,draggableNodes:$,droppableContainers:W,droppableRects:Z,over:le,measureDroppableContainers:Xe,scrollableAncestors:m,scrollableAncestorRects:C,measuringConfiguration:ne,measuringScheduled:nt,windowRect:it}),[ee,se,G,te,pe,rt,z,$,W,Z,le,Xe,m,C,ne,nt,it]),Lt=d.useMemo(()=>({activatorEvent:te,activators:st,active:ee,activeNodeRect:G,ariaDescribedById:{draggable:B},dispatch:A,draggableNodes:$,over:le,measureDroppableContainers:Xe}),[te,st,ee,G,A,B,$,le,Xe]);return d.createElement(xo.Provider,{value:T},d.createElement(bn.Provider,{value:Lt},d.createElement(Bo.Provider,{value:Pt},d.createElement(Wn.Provider,{value:ue},f)),d.createElement(ps,{disabled:(u==null?void 0:u.restoreFocus)===!1})),d.createElement(wi,{...u,hiddenTextDescribedById:B}));function Be(){const q=(Ge==null?void 0:Ge.autoScrollEnabled)===!1,De=typeof h=="object"?h.enabled===!1:h===!1,me=N&&!q&&!De;return typeof h=="object"?{...h,enabled:me}:{enabled:me}}}),ms=d.createContext(null),fo="button",xs="Draggable";function ws(e){let{id:t,data:n,disabled:o=!1,attributes:s}=e;const c=vn(xs),{activators:l,activatorEvent:u,active:h,activeNodeRect:f,ariaDescribedById:b,draggableNodes:v,over:_}=d.useContext(bn),{role:w=fo,roleDescription:I="draggable",tabIndex:x=0}=s??{},D=(h==null?void 0:h.id)===t,A=d.useContext(D?Wn:ms),[M,T]=jn(),[O,L]=jn(),N=as(l,t),P=gn(n);bt(()=>(v.set(t,{id:t,key:c,node:M,activatorNode:O,data:P}),()=>{const Y=v.get(t);Y&&Y.key===c&&v.delete(t)}),[v,t]);const $=d.useMemo(()=>({role:w,tabIndex:x,"aria-disabled":o,"aria-pressed":D&&w===fo?!0:void 0,"aria-roledescription":I,"aria-describedby":b.draggable}),[o,w,x,D,I,b.draggable]);return{active:h,activatorEvent:u,activeNodeRect:f,attributes:$,isDragging:D,listeners:o?void 0:N,node:M,over:_,setNodeRef:T,setActivatorNodeRef:L,transform:A}}function zo(){return d.useContext(Bo)}const Cs="Droppable",Ss={timeout:25};function _s(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:s}=e;const c=vn(Cs),{active:l,dispatch:u,over:h,measureDroppableContainers:f}=d.useContext(bn),b=d.useRef({disabled:n}),v=d.useRef(!1),_=d.useRef(null),w=d.useRef(null),{disabled:I,updateMeasurementsFor:x,timeout:D}={...Ss,...s},A=gn(x??o),M=d.useCallback(()=>{if(!v.current){v.current=!0;return}w.current!=null&&clearTimeout(w.current),w.current=setTimeout(()=>{f(Array.isArray(A.current)?A.current:[A.current]),w.current=null},D)},[D]),T=Yn({callback:M,disabled:I||!l}),O=d.useCallback(($,Y)=>{T&&(Y&&(T.unobserve(Y),v.current=!1),$&&T.observe($))},[T]),[L,N]=jn(O),P=gn(t);return d.useEffect(()=>{!T||!L.current||(T.disconnect(),v.current=!1,T.observe(L.current))},[L,T]),d.useEffect(()=>(u({type:ye.RegisterDroppable,element:{id:o,key:c,disabled:n,node:L,rect:_,data:P}}),()=>u({type:ye.UnregisterDroppable,key:c,id:o})),[o]),d.useEffect(()=>{n!==b.current.disabled&&(u({type:ye.SetDroppableDisabled,id:o,key:c,disabled:n}),b.current.disabled=n)},[o,c,n,u]),{active:l,rect:_,isOver:(h==null?void 0:h.id)===o,node:L,over:h,setNodeRef:N}}function Ds(e){let{animation:t,children:n}=e;const[o,s]=d.useState(null),[c,l]=d.useState(null),u=$n(n);return!n&&!o&&u&&s(u),bt(()=>{if(!c)return;const h=o==null?void 0:o.key,f=o==null?void 0:o.props.id;if(h==null||f==null){s(null);return}Promise.resolve(t(f,c)).then(()=>{s(null)})},[t,o,c]),d.createElement(d.Fragment,null,n,o?d.cloneElement(o,{ref:l}):null)}const Rs={x:0,y:0,scaleX:1,scaleY:1};function Es(e){let{children:t}=e;return d.createElement(bn.Provider,{value:$o},d.createElement(Wn.Provider,{value:Rs},t))}const As={position:"fixed",touchAction:"none"},Ts=e=>Xn(e)?"transform 250ms ease":void 0,Os=d.forwardRef((e,t)=>{let{as:n,activatorEvent:o,adjustScale:s,children:c,className:l,rect:u,style:h,transform:f,transition:b=Ts}=e;if(!u)return null;const v=s?f:{...f,scaleX:1,scaleY:1},_={...As,width:u.width,height:u.height,top:u.top,left:u.left,transform:Gt.Transform.toString(v),transformOrigin:s&&o?Si(o,u):void 0,transition:typeof b=="function"?b(o):b,...h};return d.createElement(n,{className:l,style:_,ref:t},c)}),Ho=e=>t=>{let{active:n,dragOverlay:o}=t;const s={},{styles:c,className:l}=e;if(c!=null&&c.active)for(const[u,h]of Object.entries(c.active))h!==void 0&&(s[u]=n.node.style.getPropertyValue(u),n.node.style.setProperty(u,h));if(c!=null&&c.dragOverlay)for(const[u,h]of Object.entries(c.dragOverlay))h!==void 0&&o.node.style.setProperty(u,h);return l!=null&&l.active&&n.node.classList.add(l.active),l!=null&&l.dragOverlay&&o.node.classList.add(l.dragOverlay),function(){for(const[h,f]of Object.entries(s))n.node.style.setProperty(h,f);l!=null&&l.active&&n.node.classList.remove(l.active)}},Is=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Gt.Transform.toString(t)},{transform:Gt.Transform.toString(n)}]},Ms={duration:250,easing:"ease",keyframes:Is,sideEffects:Ho({styles:{active:{opacity:"0"}}})};function Ns(e){let{config:t,draggableNodes:n,droppableContainers:o,measuringConfiguration:s}=e;return kn((c,l)=>{if(t===null)return;const u=n.get(c);if(!u)return;const h=u.node.current;if(!h)return;const f=jo(l);if(!f)return;const{transform:b}=Ke(l).getComputedStyle(l),v=So(b);if(!v)return;const _=typeof t=="function"?t:Ps(t);return Oo(h,s.draggable.measure),_({active:{id:c,data:u.data,node:h,rect:s.draggable.measure(h)},draggableNodes:n,dragOverlay:{node:l,rect:s.dragOverlay.measure(f)},droppableContainers:o,measuringConfiguration:s,transform:v})})}function Ps(e){const{duration:t,easing:n,sideEffects:o,keyframes:s}={...Ms,...e};return c=>{let{active:l,dragOverlay:u,transform:h,...f}=c;if(!t)return;const b={x:u.rect.left-l.rect.left,y:u.rect.top-l.rect.top},v={scaleX:h.scaleX!==1?l.rect.width*h.scaleX/u.rect.width:1,scaleY:h.scaleY!==1?l.rect.height*h.scaleY/u.rect.height:1},_={x:h.x-b.x,y:h.y-b.y,...v},w=s({...f,active:l,dragOverlay:u,transform:{initial:h,final:_}}),[I]=w,x=w[w.length-1];if(JSON.stringify(I)===JSON.stringify(x))return;const D=o==null?void 0:o({active:l,dragOverlay:u,...f}),A=u.node.animate(w,{duration:t,easing:n,fill:"forwards"});return new Promise(M=>{A.onfinish=()=>{D==null||D(),M()}})}}let go=0;function Ls(e){return d.useMemo(()=>{if(e!=null)return go++,go},[e])}const js=d.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:s,transition:c,modifiers:l,wrapperElement:u="div",className:h,zIndex:f=999}=e;const{activatorEvent:b,active:v,activeNodeRect:_,containerNodeRect:w,draggableNodes:I,droppableContainers:x,dragOverlay:D,over:A,measuringConfiguration:M,scrollableAncestors:T,scrollableAncestorRects:O,windowRect:L}=zo(),N=d.useContext(Wn),P=Ls(v==null?void 0:v.id),$=Fo(l,{activatorEvent:b,active:v,activeNodeRect:_,containerNodeRect:w,draggingNodeRect:D.rect,over:A,overlayNodeRect:D.rect,scrollableAncestors:T,scrollableAncestorRects:O,transform:N,windowRect:L}),Y=Jr(_),W=Ns({config:o,draggableNodes:I,droppableContainers:x,measuringConfiguration:M}),K=Y?D.setRef:void 0;return d.createElement(Es,null,d.createElement(Ds,{animation:W},v&&P?d.createElement(Os,{key:P,id:v.id,ref:K,as:u,activatorEvent:b,adjustScale:t,className:h,transition:c,rect:Y,style:{zIndex:f,...s},transform:$},n):null))});function fn(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function $s(e,t){return e.reduce((n,o,s)=>{const c=t.get(o);return c&&(n[s]=c),n},Array(e.length))}function Mn(e){return e!==null&&e>=0}function Bs(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}function Fs(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Nn={scaleX:1,scaleY:1},zs=e=>{var t;let{rects:n,activeNodeRect:o,activeIndex:s,overIndex:c,index:l}=e;const u=(t=n[s])!=null?t:o;if(!u)return null;const h=Hs(n,l,s);if(l===s){const f=n[c];return f?{x:s<c?f.left+f.width-(u.left+u.width):f.left-u.left,y:0,...Nn}:null}return l>s&&l<=c?{x:-u.width-h,y:0,...Nn}:l<s&&l>=c?{x:u.width+h,y:0,...Nn}:{x:0,y:0,...Nn}};function Hs(e,t,n){const o=e[t],s=e[t-1],c=e[t+1];return!o||!s&&!c?0:n<t?s?o.left-(s.left+s.width):c.left-(o.left+o.width):c?c.left-(o.left+o.width):o.left-(s.left+s.width)}const Ko=e=>{let{rects:t,activeIndex:n,overIndex:o,index:s}=e;const c=fn(t,o,n),l=t[s],u=c[s];return!u||!l?null:{x:u.left-l.left,y:u.top-l.top,scaleX:u.width/l.width,scaleY:u.height/l.height}},Pn={scaleX:1,scaleY:1},ho=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:s,rects:c,overIndex:l}=e;const u=(t=c[n])!=null?t:o;if(!u)return null;if(s===n){const f=c[l];return f?{x:0,y:n<l?f.top+f.height-(u.top+u.height):f.top-u.top,...Pn}:null}const h=Ks(c,s,n);return s>n&&s<=l?{x:0,y:-u.height-h,...Pn}:s<n&&s>=l?{x:0,y:u.height+h,...Pn}:{x:0,y:0,...Pn}};function Ks(e,t,n){const o=e[t],s=e[t-1],c=e[t+1];return o?n<t?s?o.top-(s.top+s.height):c?c.top-(o.top+o.height):0:c?c.top-(o.top+o.height):s?o.top-(s.top+s.height):0:0}const Go="Sortable",Uo=d.createContext({activeIndex:-1,containerId:Go,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ko,disabled:{draggable:!1,droppable:!1}});function po(e){let{children:t,id:n,items:o,strategy:s=Ko,disabled:c=!1}=e;const{active:l,dragOverlay:u,droppableRects:h,over:f,measureDroppableContainers:b}=zo(),v=vn(Go,n),_=u.rect!==null,w=d.useMemo(()=>o.map(N=>typeof N=="object"&&"id"in N?N.id:N),[o]),I=l!=null,x=l?w.indexOf(l.id):-1,D=f?w.indexOf(f.id):-1,A=d.useRef(w),M=!Bs(w,A.current),T=D!==-1&&x===-1||M,O=Fs(c);bt(()=>{M&&I&&b(w)},[M,w,I,b]),d.useEffect(()=>{A.current=w},[w]);const L=d.useMemo(()=>({activeIndex:x,containerId:v,disabled:O,disableTransforms:T,items:w,overIndex:D,useDragOverlay:_,sortedRects:$s(w,h),strategy:s}),[x,v,O.draggable,O.droppable,T,w,D,h,_,s]);return d.createElement(Uo.Provider,{value:L},t)}const Gs=e=>{let{id:t,items:n,activeIndex:o,overIndex:s}=e;return fn(n,o,s).indexOf(t)},ko=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:s,items:c,newIndex:l,previousItems:u,previousContainerId:h,transition:f}=e;return!f||!o||u!==c&&s===l?!1:n?!0:l!==s&&t===h},Us={duration:200,easing:"ease"},Xo="transform",ks=Gt.Transition.toString({property:Xo,duration:0,easing:"linear"}),Xs={roleDescription:"sortable"};function Ys(e){let{disabled:t,index:n,node:o,rect:s}=e;const[c,l]=d.useState(null),u=d.useRef(n);return bt(()=>{if(!t&&n!==u.current&&o.current){const h=s.current;if(h){const f=rn(o.current,{ignoreTransform:!0}),b={x:h.left-f.left,y:h.top-f.top,scaleX:h.width/f.width,scaleY:h.height/f.height};(b.x||b.y)&&l(b)}}n!==u.current&&(u.current=n)},[t,n,o,s]),d.useEffect(()=>{c&&l(null)},[c]),c}function Yo(e){let{animateLayoutChanges:t=ko,attributes:n,disabled:o,data:s,getNewIndex:c=Gs,id:l,strategy:u,resizeObserverConfig:h,transition:f=Us}=e;const{items:b,containerId:v,activeIndex:_,disabled:w,disableTransforms:I,sortedRects:x,overIndex:D,useDragOverlay:A,strategy:M}=d.useContext(Uo),T=Ws(o,w),O=b.indexOf(l),L=d.useMemo(()=>({sortable:{containerId:v,index:O,items:b},...s}),[v,s,O,b]),N=d.useMemo(()=>b.slice(b.indexOf(l)),[b,l]),{rect:P,node:$,isOver:Y,setNodeRef:W}=_s({id:l,data:L,disabled:T.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...h}}),{active:K,activatorEvent:ie,activeNodeRect:ee,attributes:Se,setNodeRef:Ge,listeners:k,isDragging:te,over:Ue,setActivatorNodeRef:_e,transform:B}=ws({id:l,data:L,attributes:{...Xs,...n},disabled:T.draggable}),ke=ci(W,Ge),ne=!!K,Z=ne&&!I&&Mn(_)&&Mn(D),Xe=!A&&te,nt=Xe&&Z?B:null,dt=Z?nt??(u??M)({rects:x,activeNodeRect:ee,activeIndex:_,overIndex:D,index:O}):null,Ye=Mn(_)&&Mn(D)?c({id:l,items:b,activeIndex:_,overIndex:D}):O,fe=K==null?void 0:K.id,G=d.useRef({activeId:fe,items:b,newIndex:Ye,containerId:v}),rt=b!==G.current.items,Te=t({active:K,containerId:v,isDragging:te,isSorting:ne,id:l,index:O,items:b,newIndex:G.current.newIndex,previousItems:G.current.items,previousContainerId:G.current.containerId,transition:f,wasDragging:G.current.activeId!=null}),ot=Ys({disabled:!Te,index:O,node:$,rect:P});return d.useEffect(()=>{ne&&G.current.newIndex!==Ye&&(G.current.newIndex=Ye),v!==G.current.containerId&&(G.current.containerId=v),b!==G.current.items&&(G.current.items=b)},[ne,Ye,v,b]),d.useEffect(()=>{if(fe===G.current.activeId)return;if(fe&&!G.current.activeId){G.current.activeId=fe;return}const Ve=setTimeout(()=>{G.current.activeId=fe},50);return()=>clearTimeout(Ve)},[fe]),{active:K,activeIndex:_,attributes:Se,data:L,rect:P,index:O,newIndex:Ye,items:b,isOver:Y,isSorting:ne,isDragging:te,listeners:k,node:$,overIndex:D,over:Ue,setNodeRef:ke,setActivatorNodeRef:_e,setDroppableNodeRef:W,setDraggableNodeRef:Ge,transform:ot??dt,transition:z()};function z(){if(ot||rt&&G.current.newIndex===O)return ks;if(!(Xe&&!Xn(ie)||!f)&&(ne||Te))return Gt.Transition.toString({...f,property:Xo})}}function Ws(e,t){var n,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(o=e==null?void 0:e.droppable)!=null?o:t.droppable}}H.Down,H.Right,H.Up,H.Left;const qs=e=>e;function vo(e,t=qs){return[...new Array(e)].map((n,o)=>t(o))}const Js=[H.Down,H.Right,H.Up,H.Left],Vs=(e,{context:{active:t,droppableRects:n,droppableContainers:o,collisionRect:s}})=>{var c;if(Js.includes(e.code)){if(e.preventDefault(),!t||!s)return;const l=[];o.getEnabled().forEach(f=>{var _;if(!f||f!=null&&f.disabled)return;const b=n.get(f.id);if(!b)return;const v=f.data.current;if(v){const{type:w,children:I}=v;if(w==="container"&&(I==null?void 0:I.length)>0&&((_=t.data.current)==null?void 0:_.type)!=="container")return}switch(e.code){case H.Down:s.top<b.top&&l.push(f);break;case H.Up:s.top>b.top&&l.push(f);break;case H.Left:s.left>=b.left+b.width&&l.push(f);break;case H.Right:s.left+s.width<=b.left&&l.push(f);break}});const u=Di({active:t,collisionRect:s,droppableRects:n,droppableContainers:l,pointerCoordinates:null}),h=kr(u,"id");if(h!=null){const f=o.get(h),b=f==null?void 0:f.node.current,v=f==null?void 0:f.rect.current;if(b&&v)return f.id==="placeholder"?{x:v.left+(v.width-s.width)/2,y:v.top+(v.height-s.height)/2}:((c=f.data.current)==null?void 0:c.type)==="container"?{x:v.left+20,y:v.top+74}:{x:v.left,y:v.top}}}},Zs="_Wrapper_37o6x_33",Qs="_fadeIn_37o6x_41",ea="_dragOverlay_37o6x_44",ta="_Item_37o6x_53",na="_withHandle_37o6x_79",ra="_dragging_37o6x_83",oa="_disabled_37o6x_91",ia="_pop_37o6x_1",sa="_color_37o6x_110",aa="_Remove_37o6x_123",ca="_Actions_37o6x_129",vt={Wrapper:Zs,fadeIn:Qs,dragOverlay:ea,Item:ta,withHandle:na,dragging:ra,disabled:oa,pop:ia,color:sa,Remove:aa,Actions:ca},la=en.newStyled.div`
6
6
  font-family: ${e=>{var t,n;return(n=(t=e.theme)==null?void 0:t.typography)==null?void 0:n.fontFamily}};
7
- background-color: ${e=>ce.getColorRgbaValue(e.theme,"KanbanCard",e.color?"primary":e.color,"enabled","background")};
8
- color: ${e=>ce.getColorRgbaValue(e.theme,"KanbanCard",e.color?"primary":e.color,"enabled","text")};
7
+ background-color: ${e=>we.getColorRgbaValue(e.theme,"KanbanCard",e.color?"primary":e.color,"enabled","background")};
8
+ color: ${e=>we.getColorRgbaValue(e.theme,"KanbanCard",e.color?"primary":e.color,"enabled","text")};
9
9
  &:hover .Actions > * {
10
10
  opacity: 1 !important;
11
11
  }
12
- `,Nn=u.memo(u.forwardRef(({cardProps:e,color:t,dragOverlay:n,dragging:o,disabled:i,fadeIn:a,handle:l,handleProps:c,height:f,index:d,listeners:p,onRemove:h,renderItem:w,sorting:y,transition:A,transform:b,value:C,wrapperStyle:R,className:T,style:D,children:E,...M},_)=>{const O=Ln.useTheme();return u.useEffect(()=>{if(n)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[n]),w?w({dragOverlay:!!n,dragging:!!o,sorting:!!y,index:d,fadeIn:!!a,listeners:p,ref:_,style:D,transform:b,transition:A,value:C}):Y.jsx("li",{className:or.classNames(Ue.Wrapper,a&&Ue.fadeIn,y&&Ue.sorting,n&&Ue.dragOverlay),style:{...R,transition:[A,R==null?void 0:R.transition].filter(Boolean).join(", "),"--translate-x":b?`${Math.round(b.x)}px`:void 0,"--translate-y":b?`${Math.round(b.y)}px`:void 0,"--scale-x":b!=null&&b.scaleX?`${b.scaleX}`:void 0,"--scale-y":b!=null&&b.scaleY?`${b.scaleY}`:void 0,"--index":d,"--color":t},ref:_,children:Y.jsxs(ca,{theme:O,color:t,className:or.classNames(Ue.Item,o&&Ue.dragging,l&&Ue.withHandle,n&&Ue.dragOverlay,i&&Ue.disabled,t&&Ue.color)+" "+T,style:e==null?void 0:e.style,"data-cypress":"draggable-item",...l?void 0:p,...M,tabIndex:l?void 0:0,children:[E,Y.jsx("span",{className:Ue.Actions})]})})})),ua=_t.newStyled.div`
12
+ `,Br=d.memo(d.forwardRef(({cardProps:e,color:t,dragOverlay:n,dragging:o,disabled:s,fadeIn:c,handle:l,handleProps:u,height:h,index:f,listeners:b,onRemove:v,renderItem:_,sorting:w,transition:I,transform:x,value:D,wrapperStyle:A,className:M,style:T,children:O,...L},N)=>{const P=zr.useTheme();return d.useEffect(()=>{if(n)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[n]),_?_({dragOverlay:!!n,dragging:!!o,sorting:!!w,index:f,fadeIn:!!c,listeners:b,ref:N,style:T,transform:x,transition:I,value:D}):oe.jsx("li",{className:Zr.classNames(vt.Wrapper,c&&vt.fadeIn,w&&vt.sorting,n&&vt.dragOverlay),style:{...A,transition:[I,A==null?void 0:A.transition].filter(Boolean).join(", "),"--translate-x":x?`${Math.round(x.x)}px`:void 0,"--translate-y":x?`${Math.round(x.y)}px`:void 0,"--scale-x":x!=null&&x.scaleX?`${x.scaleX}`:void 0,"--scale-y":x!=null&&x.scaleY?`${x.scaleY}`:void 0,"--index":f,"--color":t},ref:N,children:oe.jsxs(la,{theme:P,color:t,className:Zr.classNames(vt.Item,o&&vt.dragging,l&&vt.withHandle,n&&vt.dragOverlay,s&&vt.disabled,t&&vt.color)+" "+M,style:e==null?void 0:e.style,"data-cypress":"draggable-item",...l?void 0:b,...L,tabIndex:l?void 0:0,children:[O,oe.jsx("span",{className:vt.Actions})]})})})),ua=en.newStyled.div`
13
13
  display: flex;
14
14
  flex: 1;
15
15
  flex-direction: column;
@@ -50,8 +50,8 @@
50
50
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0), 0 0px 0px 2px #4c9ffe;
51
51
  }
52
52
 
53
- background-color: ${e=>ce.getColorRgbaValue(e.theme,"Kanban",e.color,"enabled","background")};
54
- `,da=_t.newStyled.div`
53
+ background-color: ${e=>we.getColorRgbaValue(e.theme,"Kanban",e.color,"enabled","background")};
54
+ `,da=en.newStyled.div`
55
55
  display: flex;
56
56
  padding: 5px 20px;
57
57
  padding-left: 8px;
@@ -61,12 +61,12 @@
61
61
  border-top-left-radius: 5px;
62
62
  border-top-right-radius: 5px;
63
63
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
64
- background-color: ${e=>ce.getColorRgbaValue(e.theme,"KanbanHeader",e.color,"enabled","background")};
65
- color: ${e=>ce.getColorRgbaValue(e.theme,"KanbanHeader",e.color?"primary":e.color,"enabled","text")};
64
+ background-color: ${e=>we.getColorRgbaValue(e.theme,"KanbanHeader",e.color,"enabled","background")};
65
+ color: ${e=>we.getColorRgbaValue(e.theme,"KanbanHeader",e.color?"primary":e.color,"enabled","text")};
66
66
  &:hover .Actions > * {
67
67
  opacity: 1 !important;
68
68
  }
69
- `,fa=_t.newStyled.div`
69
+ `,fa=en.newStyled.div`
70
70
  display: flex;
71
71
 
72
72
  & > *:first-of-type:not(:last-of-type) {
@@ -76,10 +76,10 @@
76
76
  & > *:first-of-type:not(:last-of-type):focus-visible {
77
77
  opacity: 1;
78
78
  }
79
- `,Zr=u.forwardRef((e,t)=>{const{children:n,containerId:o,renderFooterContent:i,columns:a=1,handleProps:l,horizontal:c,hover:f,onClick:d,onRemove:p,label:h,placeholder:w,maxContainerHeight:y,style:A,scrollable:b,shadow:C,unstyled:R,size:T,color:D,...E}=e,M=Ln.useTheme();return Y.jsxs(ua,{...E,ref:t,style:{...A,"--columns":a},unstyled:R,horizontal:c,hover:f,scrollable:b,shadow:C,onClick:d,tabIndex:d?0:void 0,maxContainerHeight:y,color:D,theme:M,children:[h?Y.jsxs(da,{theme:M,color:D,children:[Y.jsx(fa,{className:"Actions",children:Y.jsx(Cr.Handle,{...l})}),h]}):null,Y.jsx("ul",{children:n}),i(o)]})});var gn={exports:{}};gn.exports;(function(e,t){var n=200,o="Expected a function",i="__lodash_hash_undefined__",a=1,l=2,c=1/0,f=9007199254740991,d=17976931348623157e292,p=NaN,h="[object Arguments]",w="[object Array]",y="[object Boolean]",A="[object Date]",b="[object Error]",C="[object Function]",R="[object GeneratorFunction]",T="[object Map]",D="[object Number]",E="[object Object]",M="[object Promise]",_="[object RegExp]",O="[object Set]",P="[object String]",K="[object Symbol]",k="[object WeakMap]",j="[object ArrayBuffer]",ee="[object DataView]",J="[object Float32Array]",Ce="[object Float64Array]",je="[object Int8Array]",F="[object Int16Array]",W="[object Int32Array]",Oe="[object Uint8Array]",Te="[object Uint8ClampedArray]",se="[object Uint16Array]",Me="[object Uint32Array]",q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ve=/^\w*$/,ze=/^\./,Je=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V=/[\\^$.*+?()[\]{}|]/g,Ve=/^\s+|\s+$/g,Ne=/\\(\\)?/g,ae=/^[-+]0x[0-9a-f]+$/i,B=/^0b[01]+$/i,Qe=/^\[object .+?Constructor\]$/,Se=/^0o[0-7]+$/i,Ye=/^(?:0|[1-9]\d*)$/,$={};$[J]=$[Ce]=$[je]=$[F]=$[W]=$[Oe]=$[Te]=$[se]=$[Me]=!0,$[h]=$[w]=$[j]=$[y]=$[ee]=$[A]=$[b]=$[C]=$[T]=$[D]=$[E]=$[_]=$[O]=$[P]=$[k]=!1;var We=parseInt,Fe=typeof Pt.commonjsGlobal=="object"&&Pt.commonjsGlobal&&Pt.commonjsGlobal.Object===Object&&Pt.commonjsGlobal,ht=typeof self=="object"&&self&&self.Object===Object&&self,De=Fe||ht||Function("return this")(),qe=t&&!t.nodeType&&t,v=qe&&!0&&e&&!e.nodeType&&e,x=v&&v.exports===qe,N=x&&Fe.process,X=function(){try{return N&&N.binding("util")}catch{}}(),H=X&&X.isTypedArray;function le(r,s){for(var g=-1,m=r?r.length:0;++g<m;)if(s(r[g],g,r))return!0;return!1}function Q(r,s,g,m){for(var I=r.length,S=g+-1;++S<I;)if(s(r[S],S,r))return S;return-1}function te(r){return function(s){return s==null?void 0:s[r]}}function de(r,s){for(var g=-1,m=Array(r);++g<r;)m[g]=s(g);return m}function ge(r){return function(s){return r(s)}}function Ze(r,s){return r==null?void 0:r[s]}function Z(r){var s=!1;if(r!=null&&typeof r.toString!="function")try{s=!!(r+"")}catch{}return s}function _e(r){var s=-1,g=Array(r.size);return r.forEach(function(m,I){g[++s]=[I,m]}),g}function pt(r,s){return function(g){return r(s(g))}}function ne(r){var s=-1,g=Array(r.size);return r.forEach(function(m){g[++s]=m}),g}var re=Array.prototype,Ie=Function.prototype,et=Object.prototype,St=De["__core-js_shared__"],Ut=function(){var r=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Xt=Ie.toString,Ke=et.hasOwnProperty,G=et.toString,be=RegExp("^"+Xt.call(Ke).replace(V,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),he=De.Symbol,ke=De.Uint8Array,Re=et.propertyIsEnumerable,ye=re.splice,Pe=pt(Object.keys,Object),st=Math.max,me=Dt(De,"DataView"),He=Dt(De,"Map"),tt=Dt(De,"Promise"),at=Dt(De,"Set"),lt=Dt(De,"WeakMap"),ct=Dt(Object,"create"),vt=mt(me),bt=mt(He),Nt=mt(tt),to=mt(at),no=mt(lt),Gt=he?he.prototype:void 0,mn=Gt?Gt.valueOf:void 0,Gn=Gt?Gt.toString:void 0;function yt(r){var s=-1,g=r?r.length:0;for(this.clear();++s<g;){var m=r[s];this.set(m[0],m[1])}}function ro(){this.__data__=ct?ct(null):{}}function oo(r){return this.has(r)&&delete this.__data__[r]}function io(r){var s=this.__data__;if(ct){var g=s[r];return g===i?void 0:g}return Ke.call(s,r)?s[r]:void 0}function so(r){var s=this.__data__;return ct?s[r]!==void 0:Ke.call(s,r)}function ao(r,s){var g=this.__data__;return g[r]=ct&&s===void 0?i:s,this}yt.prototype.clear=ro,yt.prototype.delete=oo,yt.prototype.get=io,yt.prototype.has=so,yt.prototype.set=ao;function nt(r){var s=-1,g=r?r.length:0;for(this.clear();++s<g;){var m=r[s];this.set(m[0],m[1])}}function lo(){this.__data__=[]}function co(r){var s=this.__data__,g=Wt(s,r);if(g<0)return!1;var m=s.length-1;return g==m?s.pop():ye.call(s,g,1),!0}function uo(r){var s=this.__data__,g=Wt(s,r);return g<0?void 0:s[g][1]}function fo(r){return Wt(this.__data__,r)>-1}function go(r,s){var g=this.__data__,m=Wt(g,r);return m<0?g.push([r,s]):g[m][1]=s,this}nt.prototype.clear=lo,nt.prototype.delete=co,nt.prototype.get=uo,nt.prototype.has=fo,nt.prototype.set=go;function rt(r){var s=-1,g=r?r.length:0;for(this.clear();++s<g;){var m=r[s];this.set(m[0],m[1])}}function ho(){this.__data__={hash:new yt,map:new(He||nt),string:new yt}}function po(r){return qt(this,r).delete(r)}function vo(r){return qt(this,r).get(r)}function bo(r){return qt(this,r).has(r)}function yo(r,s){return qt(this,r).set(r,s),this}rt.prototype.clear=ho,rt.prototype.delete=po,rt.prototype.get=vo,rt.prototype.has=bo,rt.prototype.set=yo;function Yt(r){var s=-1,g=r?r.length:0;for(this.__data__=new rt;++s<g;)this.add(r[s])}function mo(r){return this.__data__.set(r,i),this}function xo(r){return this.__data__.has(r)}Yt.prototype.add=Yt.prototype.push=mo,Yt.prototype.has=xo;function ot(r){this.__data__=new nt(r)}function wo(){this.__data__=new nt}function Co(r){return this.__data__.delete(r)}function So(r){return this.__data__.get(r)}function Do(r){return this.__data__.has(r)}function Ro(r,s){var g=this.__data__;if(g instanceof nt){var m=g.__data__;if(!He||m.length<n-1)return m.push([r,s]),this;g=this.__data__=new rt(m)}return g.set(r,s),this}ot.prototype.clear=wo,ot.prototype.delete=Co,ot.prototype.get=So,ot.prototype.has=Do,ot.prototype.set=Ro;function Eo(r,s){var g=xt(r)||er(r)?de(r.length,String):[],m=g.length,I=!!m;for(var S in r)Ke.call(r,S)&&!(I&&(S=="length"||Jn(S,m)))&&g.push(S);return g}function Wt(r,s){for(var g=r.length;g--;)if(Zn(r[g][0],s))return g;return-1}function Yn(r,s){s=Jt(s,r)?[s]:Wn(s);for(var g=0,m=s.length;r!=null&&g<m;)r=r[Vt(s[g++])];return g&&g==m?r:void 0}function Ao(r){return G.call(r)}function To(r,s){return r!=null&&s in Object(r)}function xn(r,s,g,m,I){return r===s?!0:r==null||s==null||!Rt(r)&&!Qt(s)?r!==r&&s!==s:_o(r,s,xn,g,m,I)}function _o(r,s,g,m,I,S){var z=xt(r),fe=xt(s),oe=w,pe=w;z||(oe=ut(r),oe=oe==h?E:oe),fe||(pe=ut(s),pe=pe==h?E:pe);var Ee=oe==E&&!Z(r),Ae=pe==E&&!Z(s),xe=oe==pe;if(xe&&!Ee)return S||(S=new ot),z||qo(r)?qn(r,s,g,m,I,S):zo(r,s,oe,g,m,I,S);if(!(I&l)){var Le=Ee&&Ke.call(r,"__wrapped__"),$e=Ae&&Ke.call(s,"__wrapped__");if(Le||$e){var dt=Le?r.value():r,it=$e?s.value():s;return S||(S=new ot),g(dt,it,m,I,S)}}return xe?(S||(S=new ot),Fo(r,s,g,m,I,S)):!1}function Io(r,s,g,m){var I=g.length,S=I;if(r==null)return!S;for(r=Object(r);I--;){var z=g[I];if(z[2]?z[1]!==r[z[0]]:!(z[0]in r))return!1}for(;++I<S;){z=g[I];var fe=z[0],oe=r[fe],pe=z[1];if(z[2]){if(oe===void 0&&!(fe in r))return!1}else{var Ee=new ot,Ae;if(!(Ae===void 0?xn(pe,oe,m,a|l,Ee):Ae))return!1}}return!0}function Oo(r){if(!Rt(r)||Uo(r))return!1;var s=nr(r)||Z(r)?be:Qe;return s.test(mt(r))}function Mo(r){return Qt(r)&&Cn(r.length)&&!!$[G.call(r)]}function No(r){return typeof r=="function"?r:r==null?ni:typeof r=="object"?xt(r)?$o(r[0],r[1]):Lo(r):ri(r)}function Po(r){if(!Xo(r))return Pe(r);var s=[];for(var g in Object(r))Ke.call(r,g)&&g!="constructor"&&s.push(g);return s}function Lo(r){var s=Ko(r);return s.length==1&&s[0][2]?Qn(s[0][0],s[0][1]):function(g){return g===r||Io(g,r,s)}}function $o(r,s){return Jt(r)&&Vn(s)?Qn(Vt(r),s):function(g){var m=ei(g,r);return m===void 0&&m===s?ti(g,r):xn(s,m,void 0,a|l)}}function Bo(r){return function(s){return Yn(s,r)}}function jo(r){if(typeof r=="string")return r;if(Zt(r))return Gn?Gn.call(r):"";var s=r+"";return s=="0"&&1/r==-c?"-0":s}function Wn(r){return xt(r)?r:Go(r)}function qn(r,s,g,m,I,S){var z=I&l,fe=r.length,oe=s.length;if(fe!=oe&&!(z&&oe>fe))return!1;var pe=S.get(r);if(pe&&S.get(s))return pe==s;var Ee=-1,Ae=!0,xe=I&a?new Yt:void 0;for(S.set(r,s),S.set(s,r);++Ee<fe;){var Le=r[Ee],$e=s[Ee];if(m)var dt=z?m($e,Le,Ee,s,r,S):m(Le,$e,Ee,r,s,S);if(dt!==void 0){if(dt)continue;Ae=!1;break}if(xe){if(!le(s,function(it,wt){if(!xe.has(wt)&&(Le===it||g(Le,it,m,I,S)))return xe.add(wt)})){Ae=!1;break}}else if(!(Le===$e||g(Le,$e,m,I,S))){Ae=!1;break}}return S.delete(r),S.delete(s),Ae}function zo(r,s,g,m,I,S,z){switch(g){case ee:if(r.byteLength!=s.byteLength||r.byteOffset!=s.byteOffset)return!1;r=r.buffer,s=s.buffer;case j:return!(r.byteLength!=s.byteLength||!m(new ke(r),new ke(s)));case y:case A:case D:return Zn(+r,+s);case b:return r.name==s.name&&r.message==s.message;case _:case P:return r==s+"";case T:var fe=_e;case O:var oe=S&l;if(fe||(fe=ne),r.size!=s.size&&!oe)return!1;var pe=z.get(r);if(pe)return pe==s;S|=a,z.set(r,s);var Ee=qn(fe(r),fe(s),m,I,S,z);return z.delete(r),Ee;case K:if(mn)return mn.call(r)==mn.call(s)}return!1}function Fo(r,s,g,m,I,S){var z=I&l,fe=Sn(r),oe=fe.length,pe=Sn(s),Ee=pe.length;if(oe!=Ee&&!z)return!1;for(var Ae=oe;Ae--;){var xe=fe[Ae];if(!(z?xe in s:Ke.call(s,xe)))return!1}var Le=S.get(r);if(Le&&S.get(s))return Le==s;var $e=!0;S.set(r,s),S.set(s,r);for(var dt=z;++Ae<oe;){xe=fe[Ae];var it=r[xe],wt=s[xe];if(m)var rr=z?m(wt,it,xe,s,r,S):m(it,wt,xe,r,s,S);if(!(rr===void 0?it===wt||g(it,wt,m,I,S):rr)){$e=!1;break}dt||(dt=xe=="constructor")}if($e&&!dt){var en=r.constructor,tn=s.constructor;en!=tn&&"constructor"in r&&"constructor"in s&&!(typeof en=="function"&&en instanceof en&&typeof tn=="function"&&tn instanceof tn)&&($e=!1)}return S.delete(r),S.delete(s),$e}function qt(r,s){var g=r.__data__;return Ho(s)?g[typeof s=="string"?"string":"hash"]:g.map}function Ko(r){for(var s=Sn(r),g=s.length;g--;){var m=s[g],I=r[m];s[g]=[m,I,Vn(I)]}return s}function Dt(r,s){var g=Ze(r,s);return Oo(g)?g:void 0}var ut=Ao;(me&&ut(new me(new ArrayBuffer(1)))!=ee||He&&ut(new He)!=T||tt&&ut(tt.resolve())!=M||at&&ut(new at)!=O||lt&&ut(new lt)!=k)&&(ut=function(r){var s=G.call(r),g=s==E?r.constructor:void 0,m=g?mt(g):void 0;if(m)switch(m){case vt:return ee;case bt:return T;case Nt:return M;case to:return O;case no:return k}return s});function ko(r,s,g){s=Jt(s,r)?[s]:Wn(s);for(var m,I=-1,z=s.length;++I<z;){var S=Vt(s[I]);if(!(m=r!=null&&g(r,S)))break;r=r[S]}if(m)return m;var z=r?r.length:0;return!!z&&Cn(z)&&Jn(S,z)&&(xt(r)||er(r))}function Jn(r,s){return s=s??f,!!s&&(typeof r=="number"||Ye.test(r))&&r>-1&&r%1==0&&r<s}function Jt(r,s){if(xt(r))return!1;var g=typeof r;return g=="number"||g=="symbol"||g=="boolean"||r==null||Zt(r)?!0:ve.test(r)||!q.test(r)||s!=null&&r in Object(s)}function Ho(r){var s=typeof r;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?r!=="__proto__":r===null}function Uo(r){return!!Ut&&Ut in r}function Xo(r){var s=r&&r.constructor,g=typeof s=="function"&&s.prototype||et;return r===g}function Vn(r){return r===r&&!Rt(r)}function Qn(r,s){return function(g){return g==null?!1:g[r]===s&&(s!==void 0||r in Object(g))}}var Go=wn(function(r){r=Zo(r);var s=[];return ze.test(r)&&s.push(""),r.replace(Je,function(g,m,I,S){s.push(I?S.replace(Ne,"$1"):m||g)}),s});function Vt(r){if(typeof r=="string"||Zt(r))return r;var s=r+"";return s=="0"&&1/r==-c?"-0":s}function mt(r){if(r!=null){try{return Xt.call(r)}catch{}try{return r+""}catch{}}return""}function Yo(r,s,g){var m=r?r.length:0;if(!m)return-1;var I=g==null?0:Vo(g);return I<0&&(I=st(m+I,0)),Q(r,No(s),I)}function wn(r,s){if(typeof r!="function"||s&&typeof s!="function")throw new TypeError(o);var g=function(){var m=arguments,I=s?s.apply(this,m):m[0],S=g.cache;if(S.has(I))return S.get(I);var z=r.apply(this,m);return g.cache=S.set(I,z),z};return g.cache=new(wn.Cache||rt),g}wn.Cache=rt;function Zn(r,s){return r===s||r!==r&&s!==s}function er(r){return Wo(r)&&Ke.call(r,"callee")&&(!Re.call(r,"callee")||G.call(r)==h)}var xt=Array.isArray;function tr(r){return r!=null&&Cn(r.length)&&!nr(r)}function Wo(r){return Qt(r)&&tr(r)}function nr(r){var s=Rt(r)?G.call(r):"";return s==C||s==R}function Cn(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=f}function Rt(r){var s=typeof r;return!!r&&(s=="object"||s=="function")}function Qt(r){return!!r&&typeof r=="object"}function Zt(r){return typeof r=="symbol"||Qt(r)&&G.call(r)==K}var qo=H?ge(H):Mo;function Jo(r){if(!r)return r===0?r:0;if(r=Qo(r),r===c||r===-c){var s=r<0?-1:1;return s*d}return r===r?r:0}function Vo(r){var s=Jo(r),g=s%1;return s===s?g?s-g:s:0}function Qo(r){if(typeof r=="number")return r;if(Zt(r))return p;if(Rt(r)){var s=typeof r.valueOf=="function"?r.valueOf():r;r=Rt(s)?s+"":s}if(typeof r!="string")return r===0?r:+r;r=r.replace(Ve,"");var g=B.test(r);return g||Se.test(r)?We(r.slice(2),g?2:8):ae.test(r)?p:+r}function Zo(r){return r==null?"":jo(r)}function ei(r,s,g){var m=r==null?void 0:Yn(r,s);return m===void 0?g:m}function ti(r,s){return r!=null&&ko(r,s,To)}function Sn(r){return tr(r)?Eo(r):Po(r)}function ni(r){return r}function ri(r){return Jt(r)?te(Vt(r)):Bo(r)}e.exports=Yo})(gn,gn.exports);var ga=gn.exports;const Ct=Pt.getDefaultExportFromCjs(ga),ha=_t.newStyled.div``,pa=_t.newStyled.div`
79
+ `,Wo=d.forwardRef((e,t)=>{const{children:n,containerId:o,renderFooterContent:s,columns:c=1,handleProps:l,horizontal:u,hover:h,onClick:f,onRemove:b,label:v,placeholder:_,maxContainerHeight:w,style:I,scrollable:x,shadow:D,unstyled:A,size:M,color:T,...O}=e,L=zr.useTheme();return oe.jsxs(ua,{...O,ref:t,style:{...I,"--columns":c},unstyled:A,horizontal:u,hover:h,scrollable:x,shadow:D,onClick:f,tabIndex:f?0:void 0,maxContainerHeight:w,color:T,theme:L,children:[v?oe.jsxs(da,{theme:L,color:T,children:[oe.jsx(fa,{className:"Actions",children:oe.jsx(bo.Handle,{...l})}),v]}):null,oe.jsx("ul",{children:n}),s(o)]})});var Kn={exports:{}};Kn.exports;(function(e,t){var n=200,o="__lodash_hash_undefined__",s=9007199254740991,c="[object Arguments]",l="[object Array]",u="[object Boolean]",h="[object Date]",f="[object Error]",b="[object Function]",v="[object GeneratorFunction]",_="[object Map]",w="[object Number]",I="[object Object]",x="[object Promise]",D="[object RegExp]",A="[object Set]",M="[object String]",T="[object Symbol]",O="[object WeakMap]",L="[object ArrayBuffer]",N="[object DataView]",P="[object Float32Array]",$="[object Float64Array]",Y="[object Int8Array]",W="[object Int16Array]",K="[object Int32Array]",ie="[object Uint8Array]",ee="[object Uint8ClampedArray]",Se="[object Uint16Array]",Ge="[object Uint32Array]",k=/[\\^$.*+?()[\]{}|]/g,te=/\w*$/,Ue=/^\[object .+?Constructor\]$/,_e=/^(?:0|[1-9]\d*)$/,B={};B[c]=B[l]=B[L]=B[N]=B[u]=B[h]=B[P]=B[$]=B[Y]=B[W]=B[K]=B[_]=B[w]=B[I]=B[D]=B[A]=B[M]=B[T]=B[ie]=B[ee]=B[Se]=B[Ge]=!0,B[f]=B[b]=B[O]=!1;var ke=typeof Dt.commonjsGlobal=="object"&&Dt.commonjsGlobal&&Dt.commonjsGlobal.Object===Object&&Dt.commonjsGlobal,ne=typeof self=="object"&&self&&self.Object===Object&&self,Z=ke||ne||Function("return this")(),Xe=t&&!t.nodeType&&t,nt=Xe&&!0&&e&&!e.nodeType&&e,se=nt&&nt.exports===Xe;function dt(i,g){return i.set(g[0],g[1]),i}function Ye(i,g){return i.add(g),i}function fe(i,g){for(var y=-1,R=i?i.length:0;++y<R&&g(i[y],y,i)!==!1;);return i}function G(i,g){for(var y=-1,R=g.length,ve=i.length;++y<R;)i[ve+y]=g[y];return i}function rt(i,g,y,R){for(var ve=-1,xe=i?i.length:0;++ve<xe;)y=g(y,i[ve],ve,i);return y}function Te(i,g){for(var y=-1,R=Array(i);++y<i;)R[y]=g(y);return R}function ot(i,g){return i==null?void 0:i[g]}function z(i){var g=!1;if(i!=null&&typeof i.toString!="function")try{g=!!(i+"")}catch{}return g}function Ve(i){var g=-1,y=Array(i.size);return i.forEach(function(R,ve){y[++g]=[ve,R]}),y}function Le(i,g){return function(y){return i(g(y))}}function mt(i){var g=-1,y=Array(i.size);return i.forEach(function(R){y[++g]=R}),y}var Oe=Array.prototype,it=Function.prototype,m=Object.prototype,C=Z["__core-js_shared__"],F=function(){var i=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),V=it.toString,U=m.hasOwnProperty,re=m.toString,ae=RegExp("^"+V.call(U).replace(k,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ce=se?Z.Buffer:void 0,ge=Z.Symbol,pe=Z.Uint8Array,ft=Le(Object.getPrototypeOf,Object),le=Object.create,je=m.propertyIsEnumerable,Rt=Oe.splice,ue=Object.getOwnPropertySymbols,de=ce?ce.isBuffer:void 0,$e=Le(Object.keys,Object),Ze=Bt(Z,"DataView"),st=Bt(Z,"Map"),Pt=Bt(Z,"Promise"),Lt=Bt(Z,"Set"),Be=Bt(Z,"WeakMap"),q=Bt(Object,"create"),De=wt(Ze),me=wt(st),Qe=wt(Pt),Ie=wt(Lt),Re=wt(Be),Fe=ge?ge.prototype:void 0,gt=Fe?Fe.valueOf:void 0;function J(i){var g=-1,y=i?i.length:0;for(this.clear();++g<y;){var R=i[g];this.set(R[0],R[1])}}function Me(){this.__data__=q?q(null):{}}function Ne(i){return this.has(i)&&delete this.__data__[i]}function ze(i){var g=this.__data__;if(q){var y=g[i];return y===o?void 0:y}return U.call(g,i)?g[i]:void 0}function ht(i){var g=this.__data__;return q?g[i]!==void 0:U.call(g,i)}function et(i,g){var y=this.__data__;return y[i]=q&&g===void 0?o:g,this}J.prototype.clear=Me,J.prototype.delete=Ne,J.prototype.get=ze,J.prototype.has=ht,J.prototype.set=et;function he(i){var g=-1,y=i?i.length:0;for(this.clear();++g<y;){var R=i[g];this.set(R[0],R[1])}}function Et(){this.__data__=[]}function Ut(i){var g=this.__data__,y=We(g,i);if(y<0)return!1;var R=g.length-1;return y==R?g.pop():Rt.call(g,y,1),!0}function qn(i){var g=this.__data__,y=We(g,i);return y<0?void 0:g[y][1]}function Jn(i){return We(this.__data__,i)>-1}function Yt(i,g){var y=this.__data__,R=We(y,i);return R<0?y.push([i,g]):y[R][1]=g,this}he.prototype.clear=Et,he.prototype.delete=Ut,he.prototype.get=qn,he.prototype.has=Jn,he.prototype.set=Yt;function xt(i){var g=-1,y=i?i.length:0;for(this.clear();++g<y;){var R=i[g];this.set(R[0],R[1])}}function yn(){this.__data__={hash:new J,map:new(st||he),string:new J}}function At(i){return $t(this,i).delete(i)}function Vn(i){return $t(this,i).get(i)}function Zn(i){return $t(this,i).has(i)}function Qn(i,g){return $t(this,i).set(i,g),this}xt.prototype.clear=yn,xt.prototype.delete=At,xt.prototype.get=Vn,xt.prototype.has=Zn,xt.prototype.set=Qn;function jt(i){this.__data__=new he(i)}function er(){this.__data__=new he}function pt(i){return this.__data__.delete(i)}function tr(i){return this.__data__.get(i)}function nr(i){return this.__data__.has(i)}function rr(i,g){var y=this.__data__;if(y instanceof he){var R=y.__data__;if(!st||R.length<n-1)return R.push([i,g]),this;y=this.__data__=new xt(R)}return y.set(i,g),this}jt.prototype.clear=er,jt.prototype.delete=pt,jt.prototype.get=tr,jt.prototype.has=nr,jt.prototype.set=rr;function or(i,g){var y=Ft(i)||Dr(i)?Te(i.length,String):[],R=y.length,ve=!!R;for(var xe in i)U.call(i,xe)&&!(ve&&(xe=="length"||Cr(xe,R)))&&y.push(xe);return y}function mn(i,g,y){var R=i[g];(!(U.call(i,g)&&Sn(R,y))||y===void 0&&!(g in i))&&(i[g]=y)}function We(i,g){for(var y=i.length;y--;)if(Sn(i[y][0],g))return y;return-1}function ir(i,g){return i&&sn(g,an(g),i)}function on(i,g,y,R,ve,xe,at){var Ee;if(R&&(Ee=xe?R(i,ve,xe,at):R(i)),Ee!==void 0)return Ee;if(!Ot(i))return i;var St=Ft(i);if(St){if(Ee=mr(i),!g)return qt(i,Ee)}else{var It=Tt(i),An=It==b||It==v;if(Ct(i))return ur(i,g);if(It==I||It==c||An&&!xe){if(z(i))return xe?i:{};if(Ee=xr(An?{}:i),!g)return br(i,ir(Ee,i))}else{if(!B[It])return xe?i:{};Ee=wr(i,It,on,g)}}at||(at=new jt);var cn=at.get(i);if(cn)return cn;if(at.set(i,Ee),!St)var Jt=y?yr(i):an(i);return fe(Jt||i,function(_t,Mt){Jt&&(Mt=_t,_t=i[Mt]),mn(Ee,Mt,on(_t,g,y,R,Mt,i,at))}),Ee}function sr(i){return Ot(i)?le(i):{}}function ar(i,g,y){var R=g(i);return Ft(i)?R:G(R,y(i))}function cr(i){return re.call(i)}function Wt(i){if(!Ot(i)||_r(i))return!1;var g=Dn(i)||z(i)?ae:Ue;return g.test(wt(i))}function lr(i){if(!wn(i))return $e(i);var g=[];for(var y in Object(i))U.call(i,y)&&y!="constructor"&&g.push(y);return g}function ur(i,g){if(g)return i.slice();var y=new i.constructor(i.length);return i.copy(y),y}function tt(i){var g=new i.constructor(i.byteLength);return new pe(g).set(new pe(i)),g}function dr(i,g){var y=g?tt(i.buffer):i.buffer;return new i.constructor(y,i.byteOffset,i.byteLength)}function fr(i,g,y){var R=g?y(Ve(i),!0):Ve(i);return rt(R,dt,new i.constructor)}function gr(i){var g=new i.constructor(i.source,te.exec(i));return g.lastIndex=i.lastIndex,g}function hr(i,g,y){var R=g?y(mt(i),!0):mt(i);return rt(R,Ye,new i.constructor)}function pr(i){return gt?Object(gt.call(i)):{}}function vr(i,g){var y=g?tt(i.buffer):i.buffer;return new i.constructor(y,i.byteOffset,i.length)}function qt(i,g){var y=-1,R=i.length;for(g||(g=Array(R));++y<R;)g[y]=i[y];return g}function sn(i,g,y,R){y||(y={});for(var ve=-1,xe=g.length;++ve<xe;){var at=g[ve],Ee=void 0;mn(y,at,Ee===void 0?i[at]:Ee)}return y}function br(i,g){return sn(i,xn(i),g)}function yr(i){return ar(i,an,xn)}function $t(i,g){var y=i.__data__;return Sr(g)?y[typeof g=="string"?"string":"hash"]:y.map}function Bt(i,g){var y=ot(i,g);return Wt(y)?y:void 0}var xn=ue?Le(ue,Object):Er,Tt=cr;(Ze&&Tt(new Ze(new ArrayBuffer(1)))!=N||st&&Tt(new st)!=_||Pt&&Tt(Pt.resolve())!=x||Lt&&Tt(new Lt)!=A||Be&&Tt(new Be)!=O)&&(Tt=function(i){var g=re.call(i),y=g==I?i.constructor:void 0,R=y?wt(y):void 0;if(R)switch(R){case De:return N;case me:return _;case Qe:return x;case Ie:return A;case Re:return O}return g});function mr(i){var g=i.length,y=i.constructor(g);return g&&typeof i[0]=="string"&&U.call(i,"index")&&(y.index=i.index,y.input=i.input),y}function xr(i){return typeof i.constructor=="function"&&!wn(i)?sr(ft(i)):{}}function wr(i,g,y,R){var ve=i.constructor;switch(g){case L:return tt(i);case u:case h:return new ve(+i);case N:return dr(i,R);case P:case $:case Y:case W:case K:case ie:case ee:case Se:case Ge:return vr(i,R);case _:return fr(i,R,y);case w:case M:return new ve(i);case D:return gr(i);case A:return hr(i,R,y);case T:return pr(i)}}function Cr(i,g){return g=g??s,!!g&&(typeof i=="number"||_e.test(i))&&i>-1&&i%1==0&&i<g}function Sr(i){var g=typeof i;return g=="string"||g=="number"||g=="symbol"||g=="boolean"?i!=="__proto__":i===null}function _r(i){return!!F&&F in i}function wn(i){var g=i&&i.constructor,y=typeof g=="function"&&g.prototype||m;return i===y}function wt(i){if(i!=null){try{return V.call(i)}catch{}try{return i+""}catch{}}return""}function Cn(i){return on(i,!0,!0)}function Sn(i,g){return i===g||i!==i&&g!==g}function Dr(i){return zt(i)&&U.call(i,"callee")&&(!je.call(i,"callee")||re.call(i)==c)}var Ft=Array.isArray;function _n(i){return i!=null&&Rn(i.length)&&!Dn(i)}function zt(i){return Rr(i)&&_n(i)}var Ct=de||En;function Dn(i){var g=Ot(i)?re.call(i):"";return g==b||g==v}function Rn(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=s}function Ot(i){var g=typeof i;return!!i&&(g=="object"||g=="function")}function Rr(i){return!!i&&typeof i=="object"}function an(i){return _n(i)?or(i):lr(i)}function Er(){return[]}function En(){return!1}e.exports=Cn})(Kn,Kn.exports);var ga=Kn.exports;const ha=Dt.getDefaultExportFromCjs(ga);var Gn={exports:{}};Gn.exports;(function(e,t){var n=200,o="Expected a function",s="__lodash_hash_undefined__",c=1,l=2,u=1/0,h=9007199254740991,f=17976931348623157e292,b=NaN,v="[object Arguments]",_="[object Array]",w="[object Boolean]",I="[object Date]",x="[object Error]",D="[object Function]",A="[object GeneratorFunction]",M="[object Map]",T="[object Number]",O="[object Object]",L="[object Promise]",N="[object RegExp]",P="[object Set]",$="[object String]",Y="[object Symbol]",W="[object WeakMap]",K="[object ArrayBuffer]",ie="[object DataView]",ee="[object Float32Array]",Se="[object Float64Array]",Ge="[object Int8Array]",k="[object Int16Array]",te="[object Int32Array]",Ue="[object Uint8Array]",_e="[object Uint8ClampedArray]",B="[object Uint16Array]",ke="[object Uint32Array]",ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,Xe=/^\./,nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,se=/[\\^$.*+?()[\]{}|]/g,dt=/^\s+|\s+$/g,Ye=/\\(\\)?/g,fe=/^[-+]0x[0-9a-f]+$/i,G=/^0b[01]+$/i,rt=/^\[object .+?Constructor\]$/,Te=/^0o[0-7]+$/i,ot=/^(?:0|[1-9]\d*)$/,z={};z[ee]=z[Se]=z[Ge]=z[k]=z[te]=z[Ue]=z[_e]=z[B]=z[ke]=!0,z[v]=z[_]=z[K]=z[w]=z[ie]=z[I]=z[x]=z[D]=z[M]=z[T]=z[O]=z[N]=z[P]=z[$]=z[W]=!1;var Ve=parseInt,Le=typeof Dt.commonjsGlobal=="object"&&Dt.commonjsGlobal&&Dt.commonjsGlobal.Object===Object&&Dt.commonjsGlobal,mt=typeof self=="object"&&self&&self.Object===Object&&self,Oe=Le||mt||Function("return this")(),it=t&&!t.nodeType&&t,m=it&&!0&&e&&!e.nodeType&&e,C=m&&m.exports===it,F=C&&Le.process,V=function(){try{return F&&F.binding("util")}catch{}}(),U=V&&V.isTypedArray;function re(r,a){for(var p=-1,S=r?r.length:0;++p<S;)if(a(r[p],p,r))return!0;return!1}function ae(r,a,p,S){for(var j=r.length,E=p+-1;++E<j;)if(a(r[E],E,r))return E;return-1}function ce(r){return function(a){return a==null?void 0:a[r]}}function ge(r,a){for(var p=-1,S=Array(r);++p<r;)S[p]=a(p);return S}function pe(r){return function(a){return r(a)}}function ft(r,a){return r==null?void 0:r[a]}function le(r){var a=!1;if(r!=null&&typeof r.toString!="function")try{a=!!(r+"")}catch{}return a}function je(r){var a=-1,p=Array(r.size);return r.forEach(function(S,j){p[++a]=[j,S]}),p}function Rt(r,a){return function(p){return r(a(p))}}function ue(r){var a=-1,p=Array(r.size);return r.forEach(function(S){p[++a]=S}),p}var de=Array.prototype,$e=Function.prototype,Ze=Object.prototype,st=Oe["__core-js_shared__"],Pt=function(){var r=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Lt=$e.toString,Be=Ze.hasOwnProperty,q=Ze.toString,De=RegExp("^"+Lt.call(Be).replace(se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me=Oe.Symbol,Qe=Oe.Uint8Array,Ie=Ze.propertyIsEnumerable,Re=de.splice,Fe=Rt(Object.keys,Object),gt=Math.max,J=zt(Oe,"DataView"),Me=zt(Oe,"Map"),Ne=zt(Oe,"Promise"),ze=zt(Oe,"Set"),ht=zt(Oe,"WeakMap"),et=zt(Object,"create"),he=R(J),Et=R(Me),Ut=R(Ne),qn=R(ze),Jn=R(ht),Yt=me?me.prototype:void 0,xt=Yt?Yt.valueOf:void 0,yn=Yt?Yt.toString:void 0;function At(r){var a=-1,p=r?r.length:0;for(this.clear();++a<p;){var S=r[a];this.set(S[0],S[1])}}function Vn(){this.__data__=et?et(null):{}}function Zn(r){return this.has(r)&&delete this.__data__[r]}function Qn(r){var a=this.__data__;if(et){var p=a[r];return p===s?void 0:p}return Be.call(a,r)?a[r]:void 0}function jt(r){var a=this.__data__;return et?a[r]!==void 0:Be.call(a,r)}function er(r,a){var p=this.__data__;return p[r]=et&&a===void 0?s:a,this}At.prototype.clear=Vn,At.prototype.delete=Zn,At.prototype.get=Qn,At.prototype.has=jt,At.prototype.set=er;function pt(r){var a=-1,p=r?r.length:0;for(this.clear();++a<p;){var S=r[a];this.set(S[0],S[1])}}function tr(){this.__data__=[]}function nr(r){var a=this.__data__,p=qt(a,r);if(p<0)return!1;var S=a.length-1;return p==S?a.pop():Re.call(a,p,1),!0}function rr(r){var a=this.__data__,p=qt(a,r);return p<0?void 0:a[p][1]}function or(r){return qt(this.__data__,r)>-1}function mn(r,a){var p=this.__data__,S=qt(p,r);return S<0?p.push([r,a]):p[S][1]=a,this}pt.prototype.clear=tr,pt.prototype.delete=nr,pt.prototype.get=rr,pt.prototype.has=or,pt.prototype.set=mn;function We(r){var a=-1,p=r?r.length:0;for(this.clear();++a<p;){var S=r[a];this.set(S[0],S[1])}}function ir(){this.__data__={hash:new At,map:new(Me||pt),string:new At}}function on(r){return Ft(this,r).delete(r)}function sr(r){return Ft(this,r).get(r)}function ar(r){return Ft(this,r).has(r)}function cr(r,a){return Ft(this,r).set(r,a),this}We.prototype.clear=ir,We.prototype.delete=on,We.prototype.get=sr,We.prototype.has=ar,We.prototype.set=cr;function Wt(r){var a=-1,p=r?r.length:0;for(this.__data__=new We;++a<p;)this.add(r[a])}function lr(r){return this.__data__.set(r,s),this}function ur(r){return this.__data__.has(r)}Wt.prototype.add=Wt.prototype.push=lr,Wt.prototype.has=ur;function tt(r){this.__data__=new pt(r)}function dr(){this.__data__=new pt}function fr(r){return this.__data__.delete(r)}function gr(r){return this.__data__.get(r)}function hr(r){return this.__data__.has(r)}function pr(r,a){var p=this.__data__;if(p instanceof pt){var S=p.__data__;if(!Me||S.length<n-1)return S.push([r,a]),this;p=this.__data__=new We(S)}return p.set(r,a),this}tt.prototype.clear=dr,tt.prototype.delete=fr,tt.prototype.get=gr,tt.prototype.has=hr,tt.prototype.set=pr;function vr(r,a){var p=St(r)||Ee(r)?ge(r.length,String):[],S=p.length,j=!!S;for(var E in r)Be.call(r,E)&&!(j&&(E=="length"||Rn(E,S)))&&p.push(E);return p}function qt(r,a){for(var p=r.length;p--;)if(at(r[p][0],a))return p;return-1}function sn(r,a){a=Ot(a,r)?[a]:wt(a);for(var p=0,S=a.length;r!=null&&p<S;)r=r[y(a[p++])];return p&&p==S?r:void 0}function br(r){return q.call(r)}function yr(r,a){return r!=null&&a in Object(r)}function $t(r,a,p,S,j){return r===a?!0:r==null||a==null||!_t(r)&&!Mt(a)?r!==r&&a!==a:Bt(r,a,$t,p,S,j)}function Bt(r,a,p,S,j,E){var X=St(r),Ae=St(a),be=_,Pe=_;X||(be=Ct(r),be=be==v?O:be),Ae||(Pe=Ct(a),Pe=Pe==v?O:Pe);var qe=be==O&&!le(r),Je=Pe==O&&!le(a),He=be==Pe;if(He&&!qe)return E||(E=new tt),X||Jo(r)?Cn(r,a,p,S,j,E):Sn(r,a,be,p,S,j,E);if(!(j&l)){var ct=qe&&Be.call(r,"__wrapped__"),lt=Je&&Be.call(a,"__wrapped__");if(ct||lt){var Ht=ct?r.value():r,Nt=lt?a.value():a;return E||(E=new tt),p(Ht,Nt,S,j,E)}}return He?(E||(E=new tt),Dr(r,a,p,S,j,E)):!1}function xn(r,a,p,S){var j=p.length,E=j;if(r==null)return!E;for(r=Object(r);j--;){var X=p[j];if(X[2]?X[1]!==r[X[0]]:!(X[0]in r))return!1}for(;++j<E;){X=p[j];var Ae=X[0],be=r[Ae],Pe=X[1];if(X[2]){if(be===void 0&&!(Ae in r))return!1}else{var qe=new tt,Je;if(!(Je===void 0?$t(Pe,be,S,c|l,qe):Je))return!1}}return!0}function Tt(r){if(!_t(r)||an(r))return!1;var a=cn(r)||le(r)?De:rt;return a.test(R(r))}function mr(r){return Mt(r)&&Jt(r.length)&&!!z[q.call(r)]}function xr(r){return typeof r=="function"?r:r==null?ri:typeof r=="object"?St(r)?Sr(r[0],r[1]):Cr(r):oi(r)}function wr(r){if(!Er(r))return Fe(r);var a=[];for(var p in Object(r))Be.call(r,p)&&p!="constructor"&&a.push(p);return a}function Cr(r){var a=_n(r);return a.length==1&&a[0][2]?i(a[0][0],a[0][1]):function(p){return p===r||xn(p,r,a)}}function Sr(r,a){return Ot(r)&&En(a)?i(y(r),a):function(p){var S=ti(p,r);return S===void 0&&S===a?ni(p,r):$t(a,S,void 0,c|l)}}function _r(r){return function(a){return sn(a,r)}}function wn(r){if(typeof r=="string")return r;if(Tn(r))return yn?yn.call(r):"";var a=r+"";return a=="0"&&1/r==-u?"-0":a}function wt(r){return St(r)?r:g(r)}function Cn(r,a,p,S,j,E){var X=j&l,Ae=r.length,be=a.length;if(Ae!=be&&!(X&&be>Ae))return!1;var Pe=E.get(r);if(Pe&&E.get(a))return Pe==a;var qe=-1,Je=!0,He=j&c?new Wt:void 0;for(E.set(r,a),E.set(a,r);++qe<Ae;){var ct=r[qe],lt=a[qe];if(S)var Ht=X?S(lt,ct,qe,a,r,E):S(ct,lt,qe,r,a,E);if(Ht!==void 0){if(Ht)continue;Je=!1;break}if(He){if(!re(a,function(Nt,kt){if(!He.has(kt)&&(ct===Nt||p(ct,Nt,S,j,E)))return He.add(kt)})){Je=!1;break}}else if(!(ct===lt||p(ct,lt,S,j,E))){Je=!1;break}}return E.delete(r),E.delete(a),Je}function Sn(r,a,p,S,j,E,X){switch(p){case ie:if(r.byteLength!=a.byteLength||r.byteOffset!=a.byteOffset)return!1;r=r.buffer,a=a.buffer;case K:return!(r.byteLength!=a.byteLength||!S(new Qe(r),new Qe(a)));case w:case I:case T:return at(+r,+a);case x:return r.name==a.name&&r.message==a.message;case N:case $:return r==a+"";case M:var Ae=je;case P:var be=E&l;if(Ae||(Ae=ue),r.size!=a.size&&!be)return!1;var Pe=X.get(r);if(Pe)return Pe==a;E|=c,X.set(r,a);var qe=Cn(Ae(r),Ae(a),S,j,E,X);return X.delete(r),qe;case Y:if(xt)return xt.call(r)==xt.call(a)}return!1}function Dr(r,a,p,S,j,E){var X=j&l,Ae=Ar(r),be=Ae.length,Pe=Ar(a),qe=Pe.length;if(be!=qe&&!X)return!1;for(var Je=be;Je--;){var He=Ae[Je];if(!(X?He in a:Be.call(a,He)))return!1}var ct=E.get(r);if(ct&&E.get(a))return ct==a;var lt=!0;E.set(r,a),E.set(a,r);for(var Ht=X;++Je<be;){He=Ae[Je];var Nt=r[He],kt=a[He];if(S)var Vr=X?S(kt,Nt,He,a,r,E):S(Nt,kt,He,r,a,E);if(!(Vr===void 0?Nt===kt||p(Nt,kt,S,j,E):Vr)){lt=!1;break}Ht||(Ht=He=="constructor")}if(lt&&!Ht){var On=r.constructor,In=a.constructor;On!=In&&"constructor"in r&&"constructor"in a&&!(typeof On=="function"&&On instanceof On&&typeof In=="function"&&In instanceof In)&&(lt=!1)}return E.delete(r),E.delete(a),lt}function Ft(r,a){var p=r.__data__;return Rr(a)?p[typeof a=="string"?"string":"hash"]:p.map}function _n(r){for(var a=Ar(r),p=a.length;p--;){var S=a[p],j=r[S];a[p]=[S,j,En(j)]}return a}function zt(r,a){var p=ft(r,a);return Tt(p)?p:void 0}var Ct=br;(J&&Ct(new J(new ArrayBuffer(1)))!=ie||Me&&Ct(new Me)!=M||Ne&&Ct(Ne.resolve())!=L||ze&&Ct(new ze)!=P||ht&&Ct(new ht)!=W)&&(Ct=function(r){var a=q.call(r),p=a==O?r.constructor:void 0,S=p?R(p):void 0;if(S)switch(S){case he:return ie;case Et:return M;case Ut:return L;case qn:return P;case Jn:return W}return a});function Dn(r,a,p){a=Ot(a,r)?[a]:wt(a);for(var S,j=-1,X=a.length;++j<X;){var E=y(a[j]);if(!(S=r!=null&&p(r,E)))break;r=r[E]}if(S)return S;var X=r?r.length:0;return!!X&&Jt(X)&&Rn(E,X)&&(St(r)||Ee(r))}function Rn(r,a){return a=a??h,!!a&&(typeof r=="number"||ot.test(r))&&r>-1&&r%1==0&&r<a}function Ot(r,a){if(St(r))return!1;var p=typeof r;return p=="number"||p=="symbol"||p=="boolean"||r==null||Tn(r)?!0:Z.test(r)||!ne.test(r)||a!=null&&r in Object(a)}function Rr(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function an(r){return!!Pt&&Pt in r}function Er(r){var a=r&&r.constructor,p=typeof a=="function"&&a.prototype||Ze;return r===p}function En(r){return r===r&&!_t(r)}function i(r,a){return function(p){return p==null?!1:p[r]===a&&(a!==void 0||r in Object(p))}}var g=xe(function(r){r=ei(r);var a=[];return Xe.test(r)&&a.push(""),r.replace(nt,function(p,S,j,E){a.push(j?E.replace(Ye,"$1"):S||p)}),a});function y(r){if(typeof r=="string"||Tn(r))return r;var a=r+"";return a=="0"&&1/r==-u?"-0":a}function R(r){if(r!=null){try{return Lt.call(r)}catch{}try{return r+""}catch{}}return""}function ve(r,a,p){var S=r?r.length:0;if(!S)return-1;var j=p==null?0:Zo(p);return j<0&&(j=gt(S+j,0)),ae(r,xr(a),j)}function xe(r,a){if(typeof r!="function"||a&&typeof a!="function")throw new TypeError(o);var p=function(){var S=arguments,j=a?a.apply(this,S):S[0],E=p.cache;if(E.has(j))return E.get(j);var X=r.apply(this,S);return p.cache=E.set(j,X),X};return p.cache=new(xe.Cache||We),p}xe.Cache=We;function at(r,a){return r===a||r!==r&&a!==a}function Ee(r){return An(r)&&Be.call(r,"callee")&&(!Ie.call(r,"callee")||q.call(r)==v)}var St=Array.isArray;function It(r){return r!=null&&Jt(r.length)&&!cn(r)}function An(r){return Mt(r)&&It(r)}function cn(r){var a=_t(r)?q.call(r):"";return a==D||a==A}function Jt(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=h}function _t(r){var a=typeof r;return!!r&&(a=="object"||a=="function")}function Mt(r){return!!r&&typeof r=="object"}function Tn(r){return typeof r=="symbol"||Mt(r)&&q.call(r)==Y}var Jo=U?pe(U):mr;function Vo(r){if(!r)return r===0?r:0;if(r=Qo(r),r===u||r===-u){var a=r<0?-1:1;return a*f}return r===r?r:0}function Zo(r){var a=Vo(r),p=a%1;return a===a?p?a-p:a:0}function Qo(r){if(typeof r=="number")return r;if(Tn(r))return b;if(_t(r)){var a=typeof r.valueOf=="function"?r.valueOf():r;r=_t(a)?a+"":a}if(typeof r!="string")return r===0?r:+r;r=r.replace(dt,"");var p=G.test(r);return p||Te.test(r)?Ve(r.slice(2),p?2:8):fe.test(r)?b:+r}function ei(r){return r==null?"":wn(r)}function ti(r,a,p){var S=r==null?void 0:sn(r,a);return S===void 0?p:S}function ni(r,a){return r!=null&&Dn(r,a,yr)}function Ar(r){return It(r)?vr(r):wr(r)}function ri(r){return r}function oi(r){return Ot(r)?ce(y(r)):_r(r)}e.exports=ve})(Gn,Gn.exports);var pa=Gn.exports;const Xt=Dt.getDefaultExportFromCjs(pa),va=en.newStyled.div``,ba=en.newStyled.div`
80
80
  box-sizing: border-box;
81
81
  display: flex;
82
82
  flex-direction: ${e=>e.verticalDisplay?"column":"row"};
83
83
  ${e=>e.horizontalDisplay==!1&&"flex-wrap: wrap;"}
84
84
  overflow: auto;
85
- `,va=e=>Jr({...e,wasDragging:!0}),ba={sideEffects:Gr({styles:{active:{opacity:"0.5"}}})},ya=()=>{const[e,t]=u.useState(!1);return u.useEffect(()=>{const n=setTimeout(()=>t(!0),500);return()=>clearTimeout(n)},[]),e},Pn=(e,t)=>{if(e)return ce.getColorRgbaValue(t,"KanbanCard",e,"enabled","highlight")},ma=({children:e,containerId:t,columns:n=1,disabled:o,id:i,items:a,className:l,renderFooterContent:c,maxContainerHeight:f,style:d,...p})=>{var E;const{active:h,attributes:w,isDragging:y,listeners:A,over:b,setNodeRef:C,transition:R,transform:T}=Qr({id:i,data:{type:"container",children:a},animateLayoutChanges:va}),D=b?i===b.id&&((E=h==null?void 0:h.data.current)==null?void 0:E.type)!=="container"||a.includes(b.id):!1;return Y.jsx(Zr,{ref:o?void 0:C,style:{...d,transition:R,transform:gt.Translate.toString(T),opacity:y?.5:void 0},className:l,hover:D,handleProps:{...w,...A},containerId:t,renderFooterContent:c,maxContainerHeight:f,...p,children:e})},xa=({disabled:e,id:t,item:n,index:o,renderItem:i,style:a={},containerId:l,getIndex:c,wrapperStyle:f,cardProps:d,theme:p,renderContent:h,color:w})=>{const{setNodeRef:y,setActivatorNodeRef:A,listeners:b,isDragging:C,isSorting:R,over:T,overIndex:D,transform:E,transition:M,attributes:_}=Qr({id:t}),O=ya(),P=C&&!O;return Y.jsx(Nn,{ref:e?void 0:y,cardProps:d,value:t,dragging:C,sorting:R,handle:(d==null?void 0:d.handle)!==!1,handleProps:{..._,...b},index:o,wrapperStyle:f({index:o}),style:{...a,index:o,value:t,isDragging:C,isSorting:R,overIndex:T?c(T.id):D,containerId:l},color:Pn(n==null?void 0:n.color,p),transition:M,transform:E,fadeIn:P,listeners:b,renderItem:i,children:h(n==null?void 0:n.content,t,{...d,handleProps:{..._,...b},item:n,containerId:l})})},eo=u.forwardRef((e,t)=>{const{horizontalDisplay:n=!1,verticalDisplay:o=!1,adjustScale:i=!1,itemCount:a=5,cancelDrop:l,columns:c,handle:f=!1,containerStyle:d,coordinateGetter:p=Vs,getItemStyles:h=v=>({...v}),wrapperStyle:w=v=>({...v}),minimal:y=!1,modifiers:A,renderItem:b,strategy:C=mr,scrollable:R,maxContainerHeight:T,cardProps:D,headerProps:E,footerProps:M,data:_=[],columnInfo:O={},onColumnMoved:P=()=>{},onCardMoved:K=()=>{},onCardChangedColumns:k=()=>{},color:j="primary",size:ee="small",children:J,...Ce}=e,je=Ln.useTheme(),[F,W]=u.useState(()=>_??{A:wr(a,v=>`A${v+1}`),B:wr(a,v=>`B${v+1}`)}),[Oe,Te]=u.useState(Object.keys(_)),[se,Me]=u.useState(null),q=u.useRef(null),ve=u.useRef(!1),ze=se?Oe.includes(se):!1,Je=u.useCallback(v=>{var H;if(se&&se in F)return ar({...v,droppableContainers:v.droppableContainers.filter(le=>le.id in F)});const x=Ti(v),N=x.length>0?x:Er(v);let X=Fn(N,"id");if(X!=null){if(X in F){const le=F[X];le.length>0&&(X=(H=ar({...v,droppableContainers:v.droppableContainers.filter(Q=>Q.id!==X&&le.map(te=>te.id).includes(Q.id))})[0])==null?void 0:H.id)}return q.current=X,[{id:X}]}return ve.current&&(q.current=se),q.current?[{id:q.current}]:[]},[se,F]),[V,Ve]=u.useState([]),Ne=Ci(Rn(jr),Rn(zr),Rn(Hn,{coordinateGetter:p}));ai(()=>{W(_),Te(Object.keys(_))}),si.useUpdateEffect(()=>{W(_),Te(Object.keys(_))},[_]),u.useEffect(()=>{requestAnimationFrame(()=>{ve.current=!1})},[F]);const ae=v=>v in F?v:Object.keys(F).find(x=>F[x].map(N=>N.id).includes(v)),B=v=>{const x=ae(v);return x?Ct(F[x],N=>N.id==v):-1},Qe=()=>{V&&W(V),Me(null),Ve(null)},Se=v=>{Me(v.active.id),Ve(F)},Ye=v=>{const{active:x,over:N}=v,X=N==null?void 0:N.id;if(X==null||x.id in F)return;const H=ae(X),le=ae(x.id);!H||!le||le!==H&&W(Q=>{const te=Q[le],de=Q[H],ge=Ct(de,_e=>_e.id==X),Ze=Ct(te,_e=>_e.id==x.id);let Z;if(X in Q)Z=de.length+1;else{const pt=N&&x.rect.current.translated&&x.rect.current.translated.top>N.rect.top+N.rect.height?1:0;Z=ge>=0?ge+pt:de.length+1}return k(x.id),ve.current=!0,{...Q,[le]:Q[le].filter(_e=>_e.id!=x.id),[H]:[...Q[H].slice(0,Z),Q[le][Ze],...Q[H].slice(Z,Q[H].length)]}})},$=v=>{const{active:x,over:N}=v;var X=!1,H=oi.cloneDeep(F);x.id in F&&(N!=null&&N.id)&&Te(ne=>{X=!0;const re=ne.indexOf(x.id),Ie=ne.indexOf(N.id);var et=jt(ne,re,Ie);return x.id!==N.id&&P(v,et),et});const le=ae(x.id);if(!le){Me(null);return}const Q=N==null?void 0:N.id;if(Q==null){Me(null);return}const te=ae(Q);if(te){const ne=Ct(F[le],Ie=>Ie.id==x.id),re=Ct(F[te],Ie=>Ie.id==Q);ne!==re&&(H={...H,[te]:jt(H[te],ne,re)},W(Ie=>({...Ie,[te]:jt(Ie[te],ne,re)})))}if(!X){var de,ge=null,Ze,Z=-1,_e=Object.keys(V),pt=Object.keys(H);_e.forEach(ne=>{if(V[ne].map(re=>re.id.toString()).includes(x.id.toString())){de=ne,Ze=Ct(V[ne],re=>re.id==x.id);return}}),pt.forEach(ne=>{if(H[ne].map(re=>re.id.toString()).includes(x.id.toString())){ge=ne,Z=Ct(H[ne],re=>re.id==x.id);return}}),de===ge&&Ze!==Z&&K(v,H,ge),de!==ge&&k(v,H,ge,de)}Me(null)},We=v=>{var x=null;return Oe.forEach(N=>{F[N].forEach(X=>{if(X.id==v){x=X;return}})}),Y.jsx(Nn,{value:v,handle:f,cardProps:D,style:h({containerId:ae(v),overIndex:-1,index:B(v),value:v,isSorting:!0,isDragging:!0,isDragOverlay:!0}),color:Pn(x==null?void 0:x.color,je),wrapperStyle:w({index:0}),renderItem:b,dragOverlay:!0,children:qe(x==null?void 0:x.content,v,{...D,item:x})||{name:v}})},Fe=v=>Y.jsx(Zr,{label:ht(v),columns:c,style:{height:"100%"},shadow:!0,unstyled:!1,containerId:v,renderFooterContent:De,children:F[v].map((x,N)=>Y.jsx(Nn,{cardProps:D,value:x.id,handle:f,style:h({containerId:v,overIndex:-1,index:B(x),value:x,isDragging:!1,isSorting:!1,isDragOverlay:!1}),color:Pn(x==null?void 0:x.color,je),wrapperStyle:w({index:N}),renderItem:b,children:qe(x==null?void 0:x.content,x==null?void 0:x.id,{...D,item:x,containerId:v})},x.id))}),ht=v=>{let x=c==null?void 0:c.find(N=>N.id==(v==null?void 0:v.toString()));return ce.renderCustomElement(ce.getCustomRenderById("KANBAN_HEADER",v,J),{...E,item:{[v]:F[v]},column:x},x==null?void 0:x.header,!0)||ce.renderCustomElement(ce.getCustomRenderById("KANBAN_HEADER",null,J),{...E,item:{[v]:F[v]},column:x},x==null?void 0:x.header,!0)||Y.jsx(ii,{id:v,color:j,size:ee,item:{[v]:F[v]},column:x,...E,children:x==null?void 0:x.header})},De=v=>ce.renderCustomElement(ce.getCustomRenderById("KANBAN_FOOTER",v,J),{...M,id:v},null)||ce.renderCustomElement(ce.getCustomRenderById("KANBAN_FOOTER",null,J),{...M,id:v},null),qe=(v,x,N)=>ce.renderCustomElement(ce.getCustomRenderById("KANBAN_CARD",x,J),{...N},v,!0)||ce.renderCustomElement(ce.getCustomRenderById("KANBAN_CARD",null,J),{...N},v,!0)||Y.jsx(Cr.KanbanCard,{color:j,size:ee,...N,children:v});return Y.jsx(ha,{ref:t,...Ce,children:Y.jsxs(ys,{measuring:{droppable:{strategy:Tt.Always}},sensors:Ne,collisionDetection:Je,modifiers:A,cancelDrop:l,onDragCancel:Qe,onDragStart:Se,onDragOver:Ye,onDragEnd:$,children:[Y.jsx(pa,{horizontalDisplay:n,verticalDisplay:o,children:Y.jsx(xr,{items:[...Oe],strategy:o?mr:Fs,children:Oe.map(v=>Y.jsx(ma,{id:v,label:y?void 0:ht(v),items:F[v],color:j,scrollable:R,style:d,unstyled:y,containerId:v,renderFooterContent:De,maxContainerHeight:T,...E,children:Y.jsx(xr,{items:F[v],strategy:C,children:F[v].map((x,N)=>Y.jsx(xa,{disabled:ze||(x==null?void 0:x.disabled),id:x.id,item:x,index:N,style:h,wrapperStyle:w,renderItem:b,containerId:v,getIndex:B,cardProps:D,theme:je,renderContent:qe},x.id))})},v))})}),Et.reactDomExports.createPortal(Y.jsx($s,{adjustScale:i,dropAnimation:ba,children:se?Oe.includes(se)?Fe(se):We(se):null}),document.body)]})})});eo.propTypes={horizontalDisplay:U.PropTypes.bool,verticalDisplay:U.PropTypes.bool,adjustScale:U.PropTypes.bool,itemCount:U.PropTypes.bool,cancelDrop:U.PropTypes.func,columns:U.PropTypes.array,handle:U.PropTypes.bool,getItemStyles:U.PropTypes.func,wrapperStyle:U.PropTypes.func,minimal:U.PropTypes.bool,renderItem:U.PropTypes.func,scrollable:U.PropTypes.bool,cardProps:U.PropTypes.any,headerProps:U.PropTypes.any,footerProps:U.PropTypes.any,data:U.PropTypes.object,columnInfo:U.PropTypes.object,onColumnMoved:U.PropTypes.func,onCardMoved:U.PropTypes.func,onCardChangedColumns:U.PropTypes.func,maxContainerHeight:U.PropTypes.string,className:U.PropTypes.string,style:U.PropTypes.object,color:U.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:U.PropTypes.oneOf(["small","medium","large"])};module.exports=eo;
85
+ `,ya=e=>ko({...e,wasDragging:!0}),ma={sideEffects:Ho({styles:{active:{opacity:"0.5"}}})},xa=()=>{const[e,t]=d.useState(!1);return d.useEffect(()=>{const n=setTimeout(()=>t(!0),500);return()=>clearTimeout(n)},[]),e},Fr=(e,t)=>{if(e)return we.getColorRgbaValue(t,"KanbanCard",e,"enabled","highlight")},wa=({children:e,containerId:t,columns:n=1,disabled:o,id:s,items:c,className:l,renderFooterContent:u,maxContainerHeight:h,style:f,...b})=>{var O;const{active:v,attributes:_,isDragging:w,listeners:I,over:x,setNodeRef:D,transition:A,transform:M}=Yo({id:s,data:{type:"container",children:c},animateLayoutChanges:ya}),T=x?s===x.id&&((O=v==null?void 0:v.data.current)==null?void 0:O.type)!=="container"||c.includes(x.id):!1;return oe.jsx(Wo,{ref:o?void 0:D,style:{...f,transition:A,transform:Gt.Translate.toString(M),opacity:w?.5:void 0},className:l,hover:T,handleProps:{..._,...I},containerId:t,renderFooterContent:u,maxContainerHeight:h,...b,children:e})},Ca=({disabled:e,id:t,item:n,index:o,renderItem:s,style:c={},containerId:l,getIndex:u,wrapperStyle:h,cardProps:f,theme:b,renderContent:v,color:_})=>{const{setNodeRef:w,setActivatorNodeRef:I,listeners:x,isDragging:D,isSorting:A,over:M,overIndex:T,transform:O,transition:L,attributes:N}=Yo({id:t}),P=xa(),$=D&&!P;return oe.jsx(Br,{ref:e?void 0:w,cardProps:f,value:t,dragging:D,sorting:A,handle:(f==null?void 0:f.handle)!==!1,handleProps:{...N,...x},index:o,wrapperStyle:h({index:o}),style:{...c,index:o,value:t,isDragging:D,isSorting:A,overIndex:M?u(M.id):T,containerId:l},color:Fr(n==null?void 0:n.color,b),transition:L,transform:O,fadeIn:$,listeners:x,renderItem:s,children:v(n==null?void 0:n.content,t,{...f,handleProps:{...N,...x},item:n,containerId:l})})},qo=d.forwardRef((e,t)=>{const{horizontalDisplay:n=!1,verticalDisplay:o=!1,adjustScale:s=!1,itemCount:c=5,cancelDrop:l,columns:u,handle:h=!1,containerStyle:f,coordinateGetter:b=Vs,getItemStyles:v=m=>({...m}),wrapperStyle:_=m=>({...m}),minimal:w=!1,modifiers:I,renderItem:x,strategy:D=ho,scrollable:A,maxContainerHeight:M,cardProps:T,headerProps:O,footerProps:L,data:N=[],columnInfo:P={},onColumnMoved:$=()=>{},onCardMoved:Y=()=>{},onCardChangedColumns:W=()=>{},color:K="primary",size:ie="small",children:ee,...Se}=e,Ge=zr.useTheme(),[k,te]=d.useState(()=>N??{A:vo(c,m=>`A${m+1}`),B:vo(c,m=>`B${m+1}`)}),[Ue,_e]=d.useState(Object.keys(N)),[B,ke]=d.useState(null),ne=d.useRef(null),Z=d.useRef(!1),Xe=B?Ue.includes(B):!1,nt=d.useCallback(m=>{var U;if(B&&B in k)return to({...m,droppableContainers:m.droppableContainers.filter(re=>re.id in k)});const C=Ai(m),F=C.length>0?C:wo(m);let V=kr(F,"id");if(V!=null){if(V in k){const re=k[V];re.length>0&&(V=(U=to({...m,droppableContainers:m.droppableContainers.filter(ae=>ae.id!==V&&re.map(ce=>ce.id).includes(ae.id))})[0])==null?void 0:U.id)}return ne.current=V,[{id:V}]}return Z.current&&(ne.current=B),ne.current?[{id:ne.current}]:[]},[B,k]),[se,dt]=d.useState([]),Ye=Ci(Or(No),Or(Po),Or(Wr,{coordinateGetter:b}));ai(()=>{te(N),_e(Object.keys(N))}),si.useUpdateEffect(()=>{te(N),_e(Object.keys(N))},[N]),d.useEffect(()=>{requestAnimationFrame(()=>{Z.current=!1})},[k]);const fe=m=>m in k?m:Object.keys(k).find(C=>k[C].map(F=>F.id).includes(m)),G=m=>{const C=fe(m);return C?Xt(k[C],F=>F.id==m):-1},rt=()=>{se&&te(se),ke(null),dt(null)},Te=m=>{ke(m.active.id),dt(k)},ot=m=>{const{active:C,over:F}=m,V=F==null?void 0:F.id;if(V==null||C.id in k)return;const U=fe(V),re=fe(C.id);!U||!re||re!==U&&te(ae=>{const ce=ae[re],ge=ae[U],pe=Xt(ge,je=>je.id==V),ft=Xt(ce,je=>je.id==C.id);let le;if(V in ae)le=ge.length+1;else{const Rt=F&&C.rect.current.translated&&C.rect.current.translated.top>F.rect.top+F.rect.height?1:0;le=pe>=0?pe+Rt:ge.length+1}return W(C.id),Z.current=!0,{...ae,[re]:ae[re].filter(je=>je.id!=C.id),[U]:[...ae[U].slice(0,le),ae[re][ft],...ae[U].slice(le,ae[U].length)]}})},z=m=>{const{active:C,over:F}=m;var V=!1,U=ha(k);C.id in k&&(F!=null&&F.id)&&_e(ue=>{V=!0;const de=ue.indexOf(C.id),$e=ue.indexOf(F.id);var Ze=fn(ue,de,$e);return C.id!==F.id&&$(m,Ze),Ze});const re=fe(C.id);if(!re){ke(null);return}const ae=F==null?void 0:F.id;if(ae==null){ke(null);return}const ce=fe(ae);if(ce){const ue=Xt(k[re],$e=>$e.id==C.id),de=Xt(k[ce],$e=>$e.id==ae);ue!==de&&(U={...U,[ce]:fn(U[ce],ue,de)},te($e=>({...$e,[ce]:fn($e[ce],ue,de)})))}if(!V){var ge,pe=null,ft,le=-1,je=Object.keys(se),Rt=Object.keys(U);je.forEach(ue=>{if(se[ue].map(de=>de.id.toString()).includes(C.id.toString())){ge=ue,ft=Xt(se[ue],de=>de.id==C.id);return}}),Rt.forEach(ue=>{if(U[ue].map(de=>de.id.toString()).includes(C.id.toString())){pe=ue,le=Xt(U[ue],de=>de.id==C.id);return}}),ge===pe&&ft!==le&&Y(m,U,pe),ge!==pe&&W(m,U,pe,ge)}ke(null)},Ve=m=>{var C=null;return Ue.forEach(F=>{k[F].forEach(V=>{if(V.id==m){C=V;return}})}),oe.jsx(Br,{value:m,handle:h,cardProps:T,style:v({containerId:fe(m),overIndex:-1,index:G(m),value:m,isSorting:!0,isDragging:!0,isDragOverlay:!0}),color:Fr(C==null?void 0:C.color,Ge),wrapperStyle:_({index:0}),renderItem:x,dragOverlay:!0,children:it(C==null?void 0:C.content,m,{...T,item:C})||{name:m}})},Le=m=>oe.jsx(Wo,{label:mt(m),columns:u,style:{height:"100%"},shadow:!0,unstyled:!1,containerId:m,renderFooterContent:Oe,children:k[m].map((C,F)=>oe.jsx(Br,{cardProps:T,value:C.id,handle:h,style:v({containerId:m,overIndex:-1,index:G(C),value:C,isDragging:!1,isSorting:!1,isDragOverlay:!1}),color:Fr(C==null?void 0:C.color,Ge),wrapperStyle:_({index:F}),renderItem:x,children:it(C==null?void 0:C.content,C==null?void 0:C.id,{...T,item:C,containerId:m})},C.id))}),mt=m=>{let C=u==null?void 0:u.find(F=>F.id==(m==null?void 0:m.toString()));return we.renderCustomElement(we.getCustomRenderById("KANBAN_HEADER",m,ee),{...O,item:{[m]:k[m]},column:C},C==null?void 0:C.header,!0)||we.renderCustomElement(we.getCustomRenderById("KANBAN_HEADER",null,ee),{...O,item:{[m]:k[m]},column:C},C==null?void 0:C.header,!0)||oe.jsx(ii,{id:m,color:K,size:ie,item:{[m]:k[m]},column:C,...O,children:C==null?void 0:C.header})},Oe=m=>we.renderCustomElement(we.getCustomRenderById("KANBAN_FOOTER",m,ee),{...L,id:m},null)||we.renderCustomElement(we.getCustomRenderById("KANBAN_FOOTER",null,ee),{...L,id:m},null),it=(m,C,F)=>we.renderCustomElement(we.getCustomRenderById("KANBAN_CARD",C,ee),{...F},m,!0)||we.renderCustomElement(we.getCustomRenderById("KANBAN_CARD",null,ee),{...F},m,!0)||oe.jsx(bo.KanbanCard,{color:K,size:ie,...F,children:m});return oe.jsx(va,{ref:t,...Se,children:oe.jsxs(ys,{measuring:{droppable:{strategy:Qt.Always}},sensors:Ye,collisionDetection:nt,modifiers:I,cancelDrop:l,onDragCancel:rt,onDragStart:Te,onDragOver:ot,onDragEnd:z,children:[oe.jsx(ba,{horizontalDisplay:n,verticalDisplay:o,children:oe.jsx(po,{items:[...Ue],strategy:o?ho:zs,children:Ue.map(m=>oe.jsx(wa,{id:m,label:w?void 0:mt(m),items:k[m],color:K,scrollable:A,style:f,unstyled:w,containerId:m,renderFooterContent:Oe,maxContainerHeight:M,...O,children:oe.jsx(po,{items:k[m],strategy:D,children:k[m].map((C,F)=>oe.jsx(Ca,{disabled:Xe||(C==null?void 0:C.disabled),id:C.id,item:C,index:F,style:v,wrapperStyle:_,renderItem:x,containerId:m,getIndex:G,cardProps:T,theme:Ge,renderContent:it},C.id))})},m))})}),Vt.reactDomExports.createPortal(oe.jsx(js,{adjustScale:s,dropAnimation:ma,children:B?Ue.includes(B)?Le(B):Ve(B):null}),document.body)]})})});qo.propTypes={horizontalDisplay:Q.PropTypes.bool,verticalDisplay:Q.PropTypes.bool,adjustScale:Q.PropTypes.bool,itemCount:Q.PropTypes.bool,cancelDrop:Q.PropTypes.func,columns:Q.PropTypes.array,handle:Q.PropTypes.bool,getItemStyles:Q.PropTypes.func,wrapperStyle:Q.PropTypes.func,minimal:Q.PropTypes.bool,renderItem:Q.PropTypes.func,scrollable:Q.PropTypes.bool,cardProps:Q.PropTypes.any,headerProps:Q.PropTypes.any,footerProps:Q.PropTypes.any,data:Q.PropTypes.object,columnInfo:Q.PropTypes.object,onColumnMoved:Q.PropTypes.func,onCardMoved:Q.PropTypes.func,onCardChangedColumns:Q.PropTypes.func,maxContainerHeight:Q.PropTypes.string,className:Q.PropTypes.string,style:Q.PropTypes.object,color:Q.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:Q.PropTypes.oneOf(["small","medium","large"])};module.exports=qo;