@nocobase/app 1.6.32 → 1.6.34
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/client/{8322.9f2262bc.async.js → 8322.f0183d7f.async.js} +18 -18
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.tpl +1 -1
- package/dist/client/npm._at_dnd-kit.72e72910.async.js +5 -0
- package/dist/client/npm._at_formily.767cec20.async.js +96 -0
- package/dist/client/{npm._at_rc-component.43f95f42.async.js → npm._at_rc-component.80492f90.async.js} +1 -1
- package/dist/client/{npm.antd.483a9a61.async.js → npm.antd.067726e5.async.js} +7 -7
- package/dist/client/{npm.rc-menu.adf5ade6.async.js → npm.rc-menu.d085c10c.async.js} +1 -1
- package/dist/client/{npm.rc-tree.f61b7d87.async.js → npm.rc-tree.9e735086.async.js} +1 -1
- package/dist/client/p__index.f8e5185c.async.js +1640 -0
- package/dist/client/{umi.21d5dc54.js → umi.4ca8dcf6.js} +2 -2
- package/package.json +6 -6
- package/dist/client/npm._at_dnd-kit.209d0158.async.js +0 -9
- package/dist/client/npm._at_formily.31a4282a.async.js +0 -100
- package/dist/client/p__index.620d7d1e.async.js +0 -1640
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4989],{42617:function(fn,Le,ae){ae.r(Le),ae.d(Le,{HiddenText:function(){return v},LiveRegion:function(){return De},useAnnouncement:function(){return Ue}});var l=ae(67294);const ge={display:"none"};function v(ye){let{id:K,value:we}=ye;return l.createElement("div",{id:K,style:ge},we)}function De(ye){let{id:K,announcement:we,ariaLiveType:xe="assertive"}=ye;const se={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return l.createElement("div",{id:K,style:se,role:"status","aria-live":xe,"aria-atomic":!0},we)}function Ue(){const[ye,K]=(0,l.useState)("");return{announce:(0,l.useCallback)(xe=>{xe!=null&&K(xe)},[]),announcement:ye}}},94697:function(fn,Le,ae){ae.r(Le),ae.d(Le,{AutoScrollActivator:function(){return Qe},DndContext:function(){return sn},DragOverlay:function(){return zn},KeyboardCode:function(){return le},KeyboardSensor:function(){return An},MeasuringFrequency:function(){return dt},MeasuringStrategy:function(){return H},MouseSensor:function(){return In},PointerSensor:function(){return On},TouchSensor:function(){return Hn},TraversalOrder:function(){return rt},applyModifiers:function(){return on},closestCenter:function(){return pt},closestCorners:function(){return Tt},defaultAnnouncements:function(){return ye},defaultCoordinates:function(){return Oe},defaultDropAnimation:function(){return Vn},getClientRect:function(){return Y},getFirstCollision:function(){return vt},getScrollableAncestors:function(){return Ie},pointerWithin:function(){return C},rectIntersection:function(){return d},useDndContext:function(){return Pn},useDndMonitor:function(){return Rt},useDraggable:function(){return an},useDroppable:function(){return hr},useSensor:function(){return sr},useSensors:function(){return ir}});var l=ae(67294),ge=ae(73935),v=ae(24285),De=ae(42617);const Ue={draggable:`
|
|
2
|
-
To pick up a draggable item, press the space bar.
|
|
3
|
-
While dragging, use the arrow keys to move the item.
|
|
4
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
5
|
-
`},ye={onDragStart(n){return`Picked up draggable item ${n}.`},onDragOver(n,o){return o?`Draggable item ${n} was moved over droppable area ${o}.`:`Draggable item ${n} is no longer over a droppable area.`},onDragEnd(n,o){return o?`Draggable item ${n} was dropped over droppable area ${o}`:`Draggable item ${n} was dropped.`},onDragCancel(n){return`Dragging was cancelled. Draggable item ${n} was dropped.`}};var K;(function(n){n.DragStart="dragStart",n.DragMove="dragMove",n.DragEnd="dragEnd",n.DragCancel="dragCancel",n.DragOver="dragOver",n.RegisterDroppable="registerDroppable",n.SetDroppableDisabled="setDroppableDisabled",n.UnregisterDroppable="unregisterDroppable"})(K||(K={}));function we(...n){}class xe extends Map{get(o){var c;return o!=null&&(c=super.get(o))!=null?c:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(({disabled:o})=>!o)}getNodeFor(o){var c,f;return(c=(f=this.get(o))==null?void 0:f.node.current)!=null?c:void 0}}const se={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:{},droppableRects:new Map,droppableContainers:new xe,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:we},scrollableAncestors:[],scrollableAncestorRects:[],measureDroppableContainers:we,windowRect:null,measuringScheduled:!1},k={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:we,draggableNodes:{},over:null,measureDroppableContainers:we},F=(0,l.createContext)(k),ce=(0,l.createContext)(se);function _e(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:{},translate:{x:0,y:0}},droppable:{containers:new xe}}}function Se(n,o){switch(o.type){case K.DragStart:return{...n,draggable:{...n.draggable,initialCoordinates:o.initialCoordinates,active:o.active}};case K.DragMove:return n.draggable.active?{...n,draggable:{...n.draggable,translate:{x:o.coordinates.x-n.draggable.initialCoordinates.x,y:o.coordinates.y-n.draggable.initialCoordinates.y}}}:n;case K.DragEnd:case K.DragCancel:return{...n,draggable:{...n.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case K.RegisterDroppable:{const{element:c}=o,{id:f}=c,p=new xe(n.droppable.containers);return p.set(f,c),{...n,droppable:{...n.droppable,containers:p}}}case K.SetDroppableDisabled:{const{id:c,key:f,disabled:p}=o,m=n.droppable.containers.get(c);if(!m||f!==m.key)return n;const x=new xe(n.droppable.containers);return x.set(c,{...m,disabled:p}),{...n,droppable:{...n.droppable,containers:x}}}case K.UnregisterDroppable:{const{id:c,key:f}=o,p=n.droppable.containers.get(c);if(!p||f!==p.key)return n;const m=new xe(n.droppable.containers);return m.delete(c),{...n,droppable:{...n.droppable,containers:m}}}default:return n}}const je=(0,l.createContext)({type:null,event:null});function Rt({onDragStart:n,onDragMove:o,onDragOver:c,onDragEnd:f,onDragCancel:p}){const m=(0,l.useContext)(je),x=(0,l.useRef)(m);(0,l.useEffect)(()=>{if(m!==x.current){const{type:S,event:E}=m;switch(S){case K.DragStart:n==null||n(E);break;case K.DragMove:o==null||o(E);break;case K.DragOver:c==null||c(E);break;case K.DragCancel:p==null||p(E);break;case K.DragEnd:f==null||f(E);break}x.current=m}},[m,n,o,c,f,p])}function et({announcements:n=ye,hiddenTextDescribedById:o,screenReaderInstructions:c}){const{announce:f,announcement:p}=(0,De.useAnnouncement)(),m=(0,v.useUniqueId)("DndLiveRegion"),[x,S]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{S(!0)},[]),Rt((0,l.useMemo)(()=>({onDragStart({active:E}){f(n.onDragStart(E.id))},onDragMove({active:E,over:O}){n.onDragMove&&f(n.onDragMove(E.id,O==null?void 0:O.id))},onDragOver({active:E,over:O}){f(n.onDragOver(E.id,O==null?void 0:O.id))},onDragEnd({active:E,over:O}){f(n.onDragEnd(E.id,O==null?void 0:O.id))},onDragCancel({active:E}){f(n.onDragCancel(E.id))}}),[f,n])),x?(0,ge.createPortal)(l.createElement(l.Fragment,null,l.createElement(De.HiddenText,{id:o,value:c.draggable}),l.createElement(De.LiveRegion,{id:m,announcement:p})),document.body):null}const Oe=Object.freeze({x:0,y:0});function Xe(n,o){return Math.sqrt(Math.pow(n.x-o.x,2)+Math.pow(n.y-o.y,2))}function Ot(n,o){const c=(0,v.getEventCoordinates)(n);if(!c)return"0 0";const f={x:(c.x-o.left)/o.width*100,y:(c.y-o.top)/o.height*100};return`${f.x}% ${f.y}%`}function lt({data:{value:n}},{data:{value:o}}){return n-o}function Dt({data:{value:n}},{data:{value:o}}){return o-n}function xt({left:n,top:o,height:c,width:f}){return[{x:n,y:o},{x:n+f,y:o},{x:n,y:o+c},{x:n+f,y:o+c}]}function vt(n,o){if(!n||n.length===0)return null;const[c]=n;return o?c[o]:c}function It(n,o=n.left,c=n.top){return{x:o+n.width*.5,y:c+n.height*.5}}const pt=({collisionRect:n,droppableContainers:o})=>{const c=It(n,n.left,n.top),f=[];for(const p of o){const{id:m,rect:{current:x}}=p;if(x){const S=Xe(It(x),c);f.push({id:m,data:{droppableContainer:p,value:S}})}}return f.sort(lt)},Tt=({collisionRect:n,droppableContainers:o})=>{const c=xt(n),f=[];for(const p of o){const{id:m,rect:{current:x}}=p;if(x){const S=xt(x),E=c.reduce((I,L,Q)=>I+Xe(S[Q],L),0),O=Number((E/4).toFixed(4));f.push({id:m,data:{droppableContainer:p,value:O}})}}return f.sort(lt)};function Vt(n,o){const c=Math.max(o.top,n.top),f=Math.max(o.left,n.left),p=Math.min(o.left+o.width,n.left+n.width),m=Math.min(o.top+o.height,n.top+n.height),x=p-f,S=m-c;if(f<p&&c<m){const E=o.width*o.height,O=n.width*n.height,I=x*S,L=I/(E+O-I);return Number(L.toFixed(4))}return 0}const d=({collisionRect:n,droppableContainers:o})=>{const c=[];for(const f of o){const{id:p,rect:{current:m}}=f;if(m){const x=Vt(m,n);x>0&&c.push({id:p,data:{droppableContainer:f,value:x}})}}return c.sort(Dt)};function w(n,o){const{top:c,left:f,bottom:p,right:m}=o;return c<=n.y&&n.y<=p&&f<=n.x&&n.x<=m}const C=({droppableContainers:n,pointerCoordinates:o})=>{if(!o)return[];const c=[];for(const f of n){const{id:p,rect:{current:m}}=f;if(m&&w(o,m)){const S=xt(m).reduce((O,I)=>O+Xe(o,I),0),E=Number((S/4).toFixed(4));c.push({id:p,data:{droppableContainer:f,value:E}})}}return c.sort(lt)};function D(n,o,c){return{...n,scaleX:o&&c?o.width/c.width:1,scaleY:o&&c?o.height/c.height:1}}function M(n,o){return n&&o?{x:n.left-o.left,y:n.top-o.top}:Oe}function T(n){return function(c,...f){return f.reduce((p,m)=>({...p,top:p.top+n*m.y,bottom:p.bottom+n*m.y,left:p.left+n*m.x,right:p.right+n*m.x}),{...c})}}const U=T(1);function he(n,o,c){let f,p,m,x,S;if(o.startsWith("matrix3d("))f=o.slice(9,-1).split(/, /),p=+f[0],m=+f[5],x=+f[12],S=+f[13];else if(o.startsWith("matrix("))f=o.slice(7,-1).split(/, /),p=+f[0],m=+f[3],x=+f[4],S=+f[5];else return n;const E=n.left-x-(1-p)*parseFloat(c),O=n.top-S-(1-m)*parseFloat(c.slice(c.indexOf(" ")+1)),I=p?n.width/p:n.width,L=m?n.height/m:n.height;return{width:I,height:L,top:O,right:E+I,bottom:O+L,left:E}}const W={ignoreTransform:!1};function Y(n,o=W){let c=n.getBoundingClientRect();if(o.ignoreTransform){const{getComputedStyle:O}=(0,v.getWindow)(n),{transform:I,transformOrigin:L}=O(n);I&&(c=he(c,I,L))}const{top:f,left:p,width:m,height:x,bottom:S,right:E}=c;return{top:f,left:p,width:m,height:x,bottom:S,right:E}}function ve(n){return Y(n,{ignoreTransform:!0})}function ze(n){const o=n.innerWidth,c=n.innerHeight;return{top:0,left:0,right:o,bottom:c,width:o,height:c}}function Ee(n,o=(0,v.getWindow)(n).getComputedStyle(n)){return o.position==="fixed"}function Ye(n,o=(0,v.getWindow)(n).getComputedStyle(n)){const c=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].find(p=>{const m=o[p];return typeof m=="string"?c.test(m):!1})!=null}function Ie(n){const o=[];function c(f){if(!f)return o;if((0,v.isDocument)(f)&&f.scrollingElement!=null&&!o.includes(f.scrollingElement))return o.push(f.scrollingElement),o;if(!(0,v.isHTMLElement)(f)||(0,v.isSVGElement)(f)||o.includes(f))return o;const{getComputedStyle:p}=(0,v.getWindow)(f),m=p(f);return f!==n&&Ye(f,m)&&o.push(f),Ee(f,m)?o:c(f.parentNode)}return n?c(n):o}function $e(n){return!v.canUseDOM||!n?null:(0,v.isWindow)(n)?n:(0,v.isNode)(n)?(0,v.isDocument)(n)||n===(0,v.getOwnerDocument)(n).scrollingElement?window:(0,v.isHTMLElement)(n)?n:null:null}function He(n){return(0,v.isWindow)(n)?n.scrollX:n.scrollLeft}function ee(n){return(0,v.isWindow)(n)?n.scrollY:n.scrollTop}function Je(n){return{x:He(n),y:ee(n)}}var Ve;(function(n){n[n.Forward=1]="Forward",n[n.Backward=-1]="Backward"})(Ve||(Ve={}));function tt(n){const o={x:0,y:0},c={x:n.scrollWidth-n.clientWidth,y:n.scrollHeight-n.clientHeight},f=n.scrollTop<=o.y,p=n.scrollLeft<=o.x,m=n.scrollTop>=c.y,x=n.scrollLeft>=c.x;return{isTop:f,isLeft:p,isBottom:m,isRight:x,maxScroll:c,minScroll:o}}function Gt(n){return!v.canUseDOM||!n?!1:n===document.scrollingElement}const gn={x:.2,y:.2};function Lt(n,o,{top:c,left:f,right:p,bottom:m},x=10,S=gn){const{clientHeight:E,clientWidth:O}=n,I=Gt(n)?{top:0,left:0,right:O,bottom:E,width:O,height:E}:o,{isTop:L,isBottom:Q,isLeft:_,isRight:q}=tt(n),j={x:0,y:0},oe={x:0,y:0},z={height:I.height*S.y,width:I.width*S.x};return!L&&c<=I.top+z.height?(j.y=Ve.Backward,oe.y=x*Math.abs((I.top+z.height-c)/z.height)):!Q&&m>=I.bottom-z.height&&(j.y=Ve.Forward,oe.y=x*Math.abs((I.bottom-z.height-m)/z.height)),!q&&p>=I.right-z.width?(j.x=Ve.Forward,oe.x=x*Math.abs((I.right-z.width-p)/z.width)):!_&&f<=I.left+z.width&&(j.x=Ve.Backward,oe.x=x*Math.abs((I.left+z.width-f)/z.width)),{direction:j,speed:oe}}function bt(n){if(n===document.scrollingElement){const{innerWidth:m,innerHeight:x}=window;return{top:0,left:0,right:m,bottom:x,width:m,height:x}}const{top:o,left:c,right:f,bottom:p}=n.getBoundingClientRect();return{top:o,left:c,right:f,bottom:p,width:n.clientWidth,height:n.clientHeight}}function qt(n){return n.reduce((o,c)=>(0,v.add)(o,Je(c)),Oe)}function Jt(n){return n.reduce((o,c)=>o+He(c),0)}function hn(n){return n.reduce((o,c)=>o+ee(c),0)}const St=[["x",["left","right"],Jt],["y",["top","bottom"],hn]];class nt{constructor(o,c){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 f=Ie(c),p=qt(f);this.rect={...o},this.width=o.width,this.height=o.height;for(const[m,x,S]of St)for(const E of x)Object.defineProperty(this,E,{get:()=>{const O=S(f),I=p[m]-O;return this.rect[E]+I},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}var Qe;(function(n){n[n.Pointer=0]="Pointer",n[n.DraggableRect=1]="DraggableRect"})(Qe||(Qe={}));var rt;(function(n){n[n.TreeOrder=0]="TreeOrder",n[n.ReversedTreeOrder=1]="ReversedTreeOrder"})(rt||(rt={}));function Pe({acceleration:n,activator:o=Qe.Pointer,canScroll:c,draggingRect:f,enabled:p,interval:m=5,order:x=rt.TreeOrder,pointerCoordinates:S,scrollableAncestors:E,scrollableAncestorRects:O,threshold:I}){const[L,Q]=(0,v.useInterval)(),_=(0,l.useRef)({x:1,y:1}),q=(0,l.useMemo)(()=>{switch(o){case Qe.Pointer:return S?{top:S.y,bottom:S.y,left:S.x,right:S.x}:null;case Qe.DraggableRect:return f}return null},[o,f,S]),j=(0,l.useRef)(Oe),oe=(0,l.useRef)(null),z=(0,l.useCallback)(()=>{const te=oe.current;if(!te)return;const ue=_.current.x*j.current.x,me=_.current.y*j.current.y;te.scrollBy(ue,me)},[]),Me=(0,l.useMemo)(()=>x===rt.TreeOrder?[...E].reverse():E,[x,E]);(0,l.useEffect)(()=>{if(!p||!E.length||!q){Q();return}for(const te of Me){if((c==null?void 0:c(te))===!1)continue;const ue=E.indexOf(te),me=O[ue];if(!me)continue;const{direction:de,speed:Ne}=Lt(te,me,q,n,I);if(Ne.x>0||Ne.y>0){Q(),oe.current=te,L(z,m),_.current=Ne,j.current=de;return}}_.current={x:0,y:0},j.current={x:0,y:0},Q()},[n,z,c,Q,p,m,JSON.stringify(q),L,E,Me,O,JSON.stringify(I)])}function Qt(n,o){const c=o!==null?n[o]:void 0,f=c?c.node.current:null;return(0,v.useLazyMemo)(p=>{var m;return o===null?null:(m=f??p)!=null?m:null},[f,o])}function ut(n,o){return(0,l.useMemo)(()=>n.reduce((c,f)=>{const{sensor:p}=f,m=p.activators.map(x=>({eventName:x.eventName,handler:o(x.handler,f)}));return[...c,...m]},[]),[n,o])}var H;(function(n){n[n.Always=0]="Always",n[n.BeforeDragging=1]="BeforeDragging",n[n.WhileDragging=2]="WhileDragging"})(H||(H={}));var dt;(function(n){n.Optimized="optimized"})(dt||(dt={}));const Pt=new Map,vn={measure:ve,strategy:H.WhileDragging,frequency:dt.Optimized};function Zt(n,{dragging:o,dependencies:c,config:f}){const[p,m]=(0,l.useState)(null),x=p!=null,{frequency:S,measure:E,strategy:O}={...vn,...f},I=(0,l.useRef)(n),L=(0,l.useCallback)((oe=[])=>m(z=>z?z.concat(oe):oe),[]),Q=(0,l.useRef)(null),_=j(),q=(0,v.useLazyMemo)(oe=>{if(_&&!o)return Pt;const z=p;if(!oe||oe===Pt||I.current!==n||z!=null){const Me=new Map;for(let te of n){if(!te)continue;if(z&&z.length>0&&!z.includes(te.id)&&te.rect.current){Me.set(te.id,te.rect.current);continue}const ue=te.node.current,me=ue?new nt(E(ue),ue):null;te.rect.current=me,me&&Me.set(te.id,me)}return Me}return oe},[n,p,o,_,E]);return(0,l.useEffect)(()=>{I.current=n},[n]),(0,l.useEffect)(()=>{_||requestAnimationFrame(()=>L())},[o,_]),(0,l.useEffect)(()=>{x&&m(null)},[x]),(0,l.useEffect)(()=>{_||typeof S!="number"||Q.current!==null||(Q.current=setTimeout(()=>{L(),Q.current=null},S))},[S,_,L,...c]),{droppableRects:q,measureDroppableContainers:L,measuringScheduled:x};function j(){switch(O){case H.Always:return!1;case H.BeforeDragging:return o;default:return!o}}}function ot({onResize:n,disabled:o}){const c=(0,l.useMemo)(()=>{if(o||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:f}=window;return new f(n)},[o,n]);return(0,l.useEffect)(()=>()=>c==null?void 0:c.disconnect(),[c]),c}function ft(n){const[o,c]=(0,l.useState)(null),f=(0,l.useRef)(n),p=(0,l.useCallback)(m=>{const x=$e(m.target);x&&c(S=>S?(S.set(x,Je(x)),new Map(S)):null)},[]);return(0,l.useEffect)(()=>{const m=f.current;if(n!==m){x(m);const S=n.map(E=>{const O=$e(E);return O?(O.addEventListener("scroll",p,{passive:!0}),[O,Je(O)]):null}).filter(E=>E!=null);c(S.length?new Map(S):null),f.current=n}return()=>{x(n),x(m)};function x(S){S.forEach(E=>{const O=$e(E);O==null||O.removeEventListener("scroll",p)})}},[p,n]),(0,l.useMemo)(()=>n.length?o?Array.from(o.values()).reduce((m,x)=>(0,v.add)(m,x),Oe):qt(n):Oe,[n,o])}const Ae=[];function en(n){const o=(0,l.useRef)(n),c=(0,v.useLazyMemo)(f=>n?f&&n&&o.current&&n.parentNode===o.current.parentNode?f:Ie(n):Ae,[n]);return(0,l.useEffect)(()=>{o.current=n},[n]),c}function tn(n){(0,l.useEffect)(()=>{if(!v.canUseDOM)return;const o=n.map(({sensor:c})=>c.setup==null?void 0:c.setup());return()=>{for(const c of o)c==null||c()}},n.map(({sensor:o})=>o))}function mt(n,o){return(0,l.useMemo)(()=>n.reduce((c,{eventName:f,handler:p})=>(c[f]=m=>{p(m,o)},c),{}),[n,o])}const pn=kt(ve),bn=nn(ve);function En(n,o,c){const f=(0,l.useRef)(n);return(0,v.useLazyMemo)(p=>n?c||!p&&n||n!==f.current?(0,v.isHTMLElement)(n)&&n.parentNode==null?null:new nt(o(n),n):p??null:null,[n,c,o])}function kt(n){return(o,c)=>En(o,n,c)}function nn(n){const o=[];return function(f,p){const m=(0,l.useRef)(f);return(0,v.useLazyMemo)(x=>f.length?p||!x&&f.length||f!==m.current?f.map(S=>new nt(n(S),S)):x??o:o,[f,p])}}function or(n){return(0,l.useMemo)(()=>n?ze(n):null,[n])}function Mn(n){if(!n)return null;if(n.children.length>1)return n;const o=n.children[0];return(0,v.isHTMLElement)(o)?o:n}function jn({measure:n=Y}){const[o,c]=(0,l.useState)(null),f=(0,l.useCallback)(E=>{for(const{target:O}of E)if((0,v.isHTMLElement)(O)){c(I=>{const L=n(O);return I?{...I,width:L.width,height:L.height}:L});break}},[n]),p=ot({onResize:f}),m=(0,l.useCallback)(E=>{const O=Mn(E);p==null||p.disconnect(),O&&(p==null||p.observe(O)),c(O?n(O):null)},[n,p]),[x,S]=(0,v.useNodeRef)(m);return(0,l.useMemo)(()=>({nodeRef:x,rect:o,setRef:S}),[o,x,S])}function sr(n,o){return(0,l.useMemo)(()=>({sensor:n,options:o??{}}),[n,o])}function ir(...n){return(0,l.useMemo)(()=>[...n].filter(o=>o!=null),[...n])}class st{constructor(o){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(c=>{var f;return(f=this.target)==null?void 0:f.removeEventListener(...c)})},this.target=o}add(o,c,f){var p;(p=this.target)==null||p.addEventListener(o,c,f),this.listeners.push([o,c,f])}}function mn(n){const{EventTarget:o}=(0,v.getWindow)(n);return n instanceof o?n:(0,v.getOwnerDocument)(n)}function rn(n,o){const c=Math.abs(n.x),f=Math.abs(n.y);return typeof o=="number"?Math.sqrt(c**2+f**2)>o:"x"in o&&"y"in o?c>o.x&&f>o.y:"x"in o?c>o.x:"y"in o?f>o.y:!1}var Ge;(function(n){n.Click="click",n.DragStart="dragstart",n.Keydown="keydown",n.ContextMenu="contextmenu",n.Resize="resize",n.SelectionChange="selectionchange",n.VisibilityChange="visibilitychange"})(Ge||(Ge={}));function yn(n){n.preventDefault()}function ar(n){n.stopPropagation()}var le;(function(n){n.Space="Space",n.Down="ArrowDown",n.Right="ArrowRight",n.Left="ArrowLeft",n.Up="ArrowUp",n.Esc="Escape",n.Enter="Enter"})(le||(le={}));const zt={start:[le.Space,le.Enter],cancel:[le.Esc],end:[le.Space,le.Enter]},Xn=(n,{currentCoordinates:o})=>{switch(n.code){case le.Right:return{...o,x:o.x+25};case le.Left:return{...o,x:o.x-25};case le.Down:return{...o,y:o.y+25};case le.Up:return{...o,y:o.y-25}}};class An{constructor(o){this.props=void 0,this.autoScrollEnabled=!1,this.coordinates=Oe,this.listeners=void 0,this.windowListeners=void 0,this.props=o;const{event:{target:c}}=o;this.props=o,this.listeners=new st((0,v.getOwnerDocument)(c)),this.windowListeners=new st((0,v.getWindow)(c)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ge.Resize,this.handleCancel),this.windowListeners.add(Ge.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ge.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:o,onStart:c}=this.props;if(!o.node.current)throw new Error("Active draggable node is undefined");const f=ve(o.node.current),p={x:f.left,y:f.top};this.coordinates=p,c(p)}handleKeyDown(o){if((0,v.isKeyboardEvent)(o)){const{coordinates:c}=this,{active:f,context:p,options:m}=this.props,{keyboardCodes:x=zt,coordinateGetter:S=Xn,scrollBehavior:E="smooth"}=m,{code:O}=o;if(x.end.includes(O)){this.handleEnd(o);return}if(x.cancel.includes(O)){this.handleCancel(o);return}const I=S(o,{active:f,context:p.current,currentCoordinates:c});if(I){const L={x:0,y:0},{scrollableAncestors:Q}=p.current;for(const _ of Q){const q=o.code,j=(0,v.subtract)(I,c),{isTop:oe,isRight:z,isLeft:Me,isBottom:te,maxScroll:ue,minScroll:me}=tt(_),de=bt(_),Ne={x:Math.min(q===le.Right?de.right-de.width/2:de.right,Math.max(q===le.Right?de.left:de.left+de.width/2,I.x)),y:Math.min(q===le.Down?de.bottom-de.height/2:de.bottom,Math.max(q===le.Down?de.top:de.top+de.height/2,I.y))},Et=q===le.Right&&!z||q===le.Left&&!Me,Re=q===le.Down&&!te||q===le.Up&&!oe;if(Et&&Ne.x!==I.x){if(q===le.Right&&_.scrollLeft+j.x<=ue.x||q===le.Left&&_.scrollLeft+j.x>=me.x){_.scrollBy({left:j.x,behavior:E});return}L.x=q===le.Right?_.scrollLeft-ue.x:_.scrollLeft-me.x,_.scrollBy({left:-L.x,behavior:E});break}else if(Re&&Ne.y!==I.y){if(q===le.Down&&_.scrollTop+j.y<=ue.y||q===le.Up&&_.scrollTop+j.y>=me.y){_.scrollBy({top:j.y,behavior:E});return}L.y=q===le.Down?_.scrollTop-ue.y:_.scrollTop-me.y,_.scrollBy({top:-L.y,behavior:E});break}}this.handleMove(o,(0,v.add)(I,L))}}}handleMove(o,c){const{onMove:f}=this.props;o.preventDefault(),f(c),this.coordinates=c}handleEnd(o){const{onEnd:c}=this.props;o.preventDefault(),this.detach(),c()}handleCancel(o){const{onCancel:c}=this.props;o.preventDefault(),this.detach(),c()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}An.activators=[{eventName:"onKeyDown",handler:(n,{keyboardCodes:o=zt,onActivation:c})=>{const{code:f}=n.nativeEvent;return o.start.includes(f)?(n.preventDefault(),c==null||c({event:n.nativeEvent}),!0):!1}}];function Yn(n){return!!(n&&"distance"in n)}function wn(n){return!!(n&&"delay"in n)}class Nn{constructor(o,c,f=mn(o.event.target)){var p;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=o,this.events=c;const{event:m}=o,{target:x}=m;this.props=o,this.events=c,this.document=(0,v.getOwnerDocument)(x),this.documentListeners=new st(this.document),this.listeners=new st(f),this.windowListeners=new st((0,v.getWindow)(x)),this.initialCoordinates=(p=(0,v.getEventCoordinates)(m))!=null?p:Oe,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:o,props:{options:{activationConstraint:c}}}=this;if(this.listeners.add(o.move.name,this.handleMove,{passive:!1}),this.listeners.add(o.end.name,this.handleEnd),this.windowListeners.add(Ge.Resize,this.handleCancel),this.windowListeners.add(Ge.DragStart,yn),this.windowListeners.add(Ge.VisibilityChange,this.handleCancel),this.windowListeners.add(Ge.ContextMenu,yn),this.documentListeners.add(Ge.Keydown,this.handleKeydown),c){if(Yn(c))return;if(wn(c)){this.timeoutId=setTimeout(this.handleStart,c.delay);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:o}=this,{onStart:c}=this.props;o&&(this.activated=!0,this.documentListeners.add(Ge.Click,ar,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ge.SelectionChange,this.removeTextSelection),c(o))}handleMove(o){var c;const{activated:f,initialCoordinates:p,props:m}=this,{onMove:x,options:{activationConstraint:S}}=m;if(!p)return;const E=(c=(0,v.getEventCoordinates)(o))!=null?c:Oe,O=(0,v.subtract)(p,E);if(!f&&S){if(wn(S))return rn(O,S.tolerance)?this.handleCancel():void 0;if(Yn(S))return S.tolerance!=null&&rn(O,S.tolerance)?this.handleCancel():rn(O,S.distance)?this.handleStart():void 0}o.cancelable&&o.preventDefault(),x(E)}handleEnd(){const{onEnd:o}=this.props;this.detach(),o()}handleCancel(){const{onCancel:o}=this.props;this.detach(),o()}handleKeydown(o){o.code===le.Esc&&this.handleCancel()}removeTextSelection(){var o;(o=this.document.getSelection())==null||o.removeAllRanges()}}const cr={move:{name:"pointermove"},end:{name:"pointerup"}};class On extends Nn{constructor(o){const{event:c}=o,f=(0,v.getOwnerDocument)(c.target);super(o,cr,f)}}On.activators=[{eventName:"onPointerDown",handler:({nativeEvent:n},{onActivation:o})=>!n.isPrimary||n.button!==0?!1:(o==null||o({event:n}),!0)}];const lr={move:{name:"mousemove"},end:{name:"mouseup"}};var Cn;(function(n){n[n.RightClick=2]="RightClick"})(Cn||(Cn={}));class In extends Nn{constructor(o){super(o,lr,(0,v.getOwnerDocument)(o.event.target))}}In.activators=[{eventName:"onMouseDown",handler:({nativeEvent:n},{onActivation:o})=>n.button===Cn.RightClick?!1:(o==null||o({event:n}),!0)}];const Bt={move:{name:"touchmove"},end:{name:"touchend"}};class Hn extends Nn{constructor(o){super(o,Bt)}static setup(){return window.addEventListener(Bt.move.name,o,{capture:!1,passive:!1}),function(){window.removeEventListener(Bt.move.name,o)};function o(){}}}Hn.activators=[{eventName:"onTouchStart",handler:({nativeEvent:n},{onActivation:o})=>{const{touches:c}=n;return c.length>1?!1:(o==null||o({event:n}),!0)}}];function on(n,{transform:o,...c}){return n!=null&&n.length?n.reduce((f,p)=>p({transform:f,...c}),o):o}const ur=[{sensor:On,options:{}},{sensor:An,options:{}}],dr={current:{}},Rn=(0,l.createContext)({...Oe,scaleX:1,scaleY:1}),sn=(0,l.memo)(function({id:o,autoScroll:c=!0,announcements:f,children:p,sensors:m=ur,collisionDetection:x=d,measuring:S,modifiers:E,screenReaderInstructions:O=Ue,...I}){var L,Q,_,q,j,oe,z;const Me=(0,l.useReducer)(Se,void 0,_e),[te,ue]=Me,[me,de]=(0,l.useState)(()=>({type:null,event:null})),[Ne,Et]=(0,l.useState)(!1),{draggable:{active:Re,nodes:Ce,translate:Fe},droppable:{containers:ke}}=te,it=Re?Ce[Re]:null,Ft=(0,l.useRef)({initial:null,translated:null}),Be=(0,l.useMemo)(()=>{var $;return Re!=null?{id:Re,data:($=it==null?void 0:it.data)!=null?$:dr,rect:Ft}:null},[Re,it]),qe=(0,l.useRef)(null),[Mt,at]=(0,l.useState)(null),[ct,gt]=(0,l.useState)(null),At=(0,v.useLatestValue)(I,Object.values(I)),cn=(0,v.useUniqueId)("DndDescribedBy",o),Bn=(0,l.useMemo)(()=>ke.getEnabled(),[ke]),{droppableRects:Wt,measureDroppableContainers:ln,measuringScheduled:$n}=Zt(Bn,{dragging:Ne,dependencies:[Fe.x,Fe.y],config:S==null?void 0:S.droppable}),Ze=Qt(Ce,Re),Fn=ct?(0,v.getEventCoordinates)(ct):null,We=En(Ze,(L=S==null||(Q=S.draggable)==null?void 0:Q.measure)!=null?L:ve),Dn=pn(Ze?Ze.parentElement:null),yt=(0,l.useRef)({active:null,activeNode:Ze,collisionRect:null,collisions:null,droppableRects:Wt,draggableNodes:Ce,draggingNode:null,draggingNodeRect:null,droppableContainers:ke,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Wn=ke.getNodeFor((_=yt.current.over)==null?void 0:_.id),ht=jn({measure:S==null||(q=S.dragOverlay)==null?void 0:q.measure}),Kt=(j=ht.nodeRef.current)!=null?j:Ze,Nt=(oe=ht.rect)!=null?oe:We,Ut=(0,l.useRef)(null),Gn=Ut.current,e=Nt===We?M(We,Gn):Oe,t=or(Kt?Kt.ownerDocument.defaultView:null),r=en(Re?Wn??Kt:null),s=bn(r),i=on(E,{transform:{x:Fe.x-e.x,y:Fe.y-e.y,scaleX:1,scaleY:1},activatorEvent:ct,active:Be,activeNodeRect:We,containerNodeRect:Dn,draggingNodeRect:Nt,over:yt.current.over,overlayNodeRect:ht.rect,scrollableAncestors:r,scrollableAncestorRects:s,windowRect:t}),a=Fn?(0,v.add)(Fn,Fe):null,u=ft(r),g=(0,v.add)(i,u),h=Nt?U(Nt,i):null,b=Be&&h?x({active:Be,collisionRect:h,droppableContainers:Bn,pointerCoordinates:a}):null,R=vt(b,"id"),[y,A]=(0,l.useState)(null),N=D(i,(z=y==null?void 0:y.rect)!=null?z:null,We),Z=(0,l.useCallback)(($,{sensor:X,options:G})=>{if(!qe.current)return;const J=Ce[qe.current];if(!J)return;const fe=new X({active:qe.current,activeNode:J,event:$.nativeEvent,options:G,context:yt,onStart(be){const ie=qe.current;if(!ie)return;const Ke=Ce[ie];if(!Ke)return;const{onDragStart:_t}=At.current,jt={active:{id:ie,data:Ke.data,rect:Ft}};(0,ge.unstable_batchedUpdates)(()=>{ue({type:K.DragStart,initialCoordinates:be,active:ie}),de({type:K.DragStart,event:jt})}),_t==null||_t(jt)},onMove(be){ue({type:K.DragMove,coordinates:be})},onEnd:pe(K.DragEnd),onCancel:pe(K.DragCancel)});(0,ge.unstable_batchedUpdates)(()=>{at(fe),gt($.nativeEvent)});function pe(be){return async function(){const{active:Ke,collisions:_t,over:jt,scrollAdjustedTranslate:un}=yt.current;let wt=null;if(Ke&&un){const{cancelDrop:Ct}=At.current;wt={active:Ke,collisions:_t,delta:un,over:jt},be===K.DragEnd&&typeof Ct=="function"&&await Promise.resolve(Ct(wt))&&(be=K.DragCancel)}qe.current=null,(0,ge.unstable_batchedUpdates)(()=>{if(ue({type:be}),A(null),Et(!1),at(null),gt(null),wt&&de({type:be,event:wt}),wt){const{onDragCancel:Ct,onDragEnd:xn}=At.current,Sn=be===K.DragEnd?xn:Ct;Sn==null||Sn(wt)}})}}},[Ce]),P=(0,l.useCallback)(($,X)=>(G,J)=>{const fe=G.nativeEvent;qe.current!==null||fe.dndKit||fe.defaultPrevented||$(G,X.options)===!0&&(fe.dndKit={capturedBy:X.sensor},qe.current=J,Z(G,X))},[Z]),B=ut(m,P);tn(m),(0,l.useEffect)(()=>{Re!=null&&Et(!0)},[Re]),(0,l.useEffect)(()=>{Be||(Ut.current=null),Be&&We&&!Ut.current&&(Ut.current=We)},[We,Be]),(0,l.useEffect)(()=>{const{onDragMove:$}=At.current,{active:X,collisions:G,over:J}=yt.current;if(!X)return;const fe={active:X,collisions:G,delta:{x:g.x,y:g.y},over:J};de({type:K.DragMove,event:fe}),$==null||$(fe)},[g.x,g.y]),(0,l.useEffect)(()=>{const{active:$,collisions:X,droppableContainers:G,scrollAdjustedTranslate:J}=yt.current;if(!$||!qe.current||!J)return;const{onDragOver:fe}=At.current,pe=G.get(R),be=pe&&pe.rect.current?{id:pe.id,rect:pe.rect.current,data:pe.data,disabled:pe.disabled}:null,ie={active:$,collisions:X,delta:{x:J.x,y:J.y},over:be};(0,ge.unstable_batchedUpdates)(()=>{A(be),de({type:K.DragOver,event:ie}),fe==null||fe(ie)})},[R]),(0,v.useIsomorphicLayoutEffect)(()=>{yt.current={active:Be,activeNode:Ze,collisionRect:h,collisions:b,droppableRects:Wt,draggableNodes:Ce,draggingNode:Kt,draggingNodeRect:Nt,droppableContainers:ke,over:y,scrollableAncestors:r,scrollAdjustedTranslate:g},Ft.current={initial:Nt,translated:h}},[Be,Ze,b,h,Ce,Kt,Nt,Wt,ke,y,r,g]),Pe({...V(),draggingRect:h,pointerCoordinates:a,scrollableAncestors:r,scrollableAncestorRects:s});const ne=(0,l.useMemo)(()=>({active:Be,activeNode:Ze,activeNodeRect:We,activatorEvent:ct,collisions:b,containerNodeRect:Dn,dragOverlay:ht,draggableNodes:Ce,droppableContainers:ke,droppableRects:Wt,over:y,measureDroppableContainers:ln,scrollableAncestors:r,scrollableAncestorRects:s,measuringScheduled:$n,windowRect:t}),[Be,Ze,We,ct,b,Dn,ht,Ce,ke,Wt,y,ln,r,s,$n,t]),re=(0,l.useMemo)(()=>({activatorEvent:ct,activators:B,active:Be,activeNodeRect:We,ariaDescribedById:{draggable:cn},dispatch:ue,draggableNodes:Ce,over:y,measureDroppableContainers:ln}),[ct,B,Be,We,ue,cn,Ce,y,ln]);return l.createElement(je.Provider,{value:me},l.createElement(F.Provider,{value:re},l.createElement(ce.Provider,{value:ne},l.createElement(Rn.Provider,{value:N},p))),l.createElement(et,{announcements:f,hiddenTextDescribedById:cn,screenReaderInstructions:O}));function V(){const $=(Mt==null?void 0:Mt.autoScrollEnabled)===!1,X=typeof c=="object"?c.enabled===!1:c===!1,G=!$&&!X;return typeof c=="object"?{...c,enabled:G}:{enabled:G}}}),$t=(0,l.createContext)(null),Tn="button",Ln="Droppable";function an({id:n,data:o,disabled:c=!1,attributes:f}){const p=(0,v.useUniqueId)(Ln),{activators:m,activatorEvent:x,active:S,activeNodeRect:E,ariaDescribedById:O,draggableNodes:I,over:L}=(0,l.useContext)(F),{role:Q=Tn,roleDescription:_="draggable",tabIndex:q=0}=f??{},j=(S==null?void 0:S.id)===n,oe=(0,l.useContext)(j?Rn:$t),[z,Me]=(0,v.useNodeRef)(),te=mt(m,n),ue=(0,v.useLatestValue)(o);(0,v.useIsomorphicLayoutEffect)(()=>(I[n]={id:n,key:p,node:z,data:ue},()=>{const de=I[n];de&&de.key===p&&delete I[n]}),[I,n]);const me=(0,l.useMemo)(()=>({role:Q,tabIndex:q,"aria-pressed":j&&Q===Tn?!0:void 0,"aria-roledescription":_,"aria-describedby":O.draggable}),[Q,q,j,_,O.draggable]);return{active:S,activatorEvent:x,activeNodeRect:E,attributes:me,isDragging:j,listeners:c?void 0:te,node:z,over:L,setNodeRef:Me,transform:oe}}function Pn(){return(0,l.useContext)(ce)}const fr="Droppable",gr={timeout:25};function hr({data:n,disabled:o=!1,id:c,resizeObserverConfig:f}){const p=(0,v.useUniqueId)(fr),{active:m,dispatch:x,over:S,measureDroppableContainers:E}=(0,l.useContext)(F),O=(0,l.useRef)(!1),I=(0,l.useRef)(null),L=(0,l.useRef)(null),{disabled:Q,updateMeasurementsFor:_,timeout:q}={...gr,...f},j=(0,v.useLatestValue)(_??c),oe=(0,l.useCallback)(()=>{if(!O.current){O.current=!0;return}L.current!=null&&clearTimeout(L.current),L.current=setTimeout(()=>{E(typeof j.current=="string"?[j.current]:j.current),L.current=null},q)},[q]),z=ot({onResize:oe,disabled:Q||!m}),Me=(0,l.useCallback)((de,Ne)=>{z&&(Ne&&(z.unobserve(Ne),O.current=!1),de&&z.observe(de))},[z]),[te,ue]=(0,v.useNodeRef)(Me),me=(0,v.useLatestValue)(n);return(0,l.useEffect)(()=>{!z||!te.current||(z.disconnect(),O.current=!1,z.observe(te.current))},[te,z]),(0,v.useIsomorphicLayoutEffect)(()=>(x({type:K.RegisterDroppable,element:{id:c,key:p,disabled:o,node:te,rect:I,data:me}}),()=>x({type:K.UnregisterDroppable,key:p,id:c})),[c]),(0,l.useEffect)(()=>{x({type:K.SetDroppableDisabled,id:c,key:p,disabled:o})},[o]),{active:m,rect:I,isOver:(S==null?void 0:S.id)===c,node:te,over:S,setNodeRef:ue}}const Vn={duration:250,easing:"ease",dragSourceOpacity:0};function vr({animate:n,adjustScale:o,activeId:c,draggableNodes:f,duration:p,dragSourceOpacity:m,easing:x,node:S,transform:E}){const[O,I]=(0,l.useState)(!1);return(0,v.useIsomorphicLayoutEffect)(()=>{var L;if(!n||!c||!x||!p){n&&I(!0);return}const Q=(L=f[c])==null?void 0:L.node.current;if(E&&S&&Q&&Q.parentNode!==null){const _=Mn(S);if(_){const q=_.getBoundingClientRect(),j=ve(Q),oe={x:q.left-j.left,y:q.top-j.top};if(Math.abs(oe.x)||Math.abs(oe.y)){const z={scaleX:o?j.width*E.scaleX/q.width:1,scaleY:o?j.height*E.scaleY/q.height:1},Me=v.CSS.Transform.toString({x:E.x-oe.x,y:E.y-oe.y,...z}),te=Q.style.opacity;m!=null&&(Q.style.opacity=`${m}`);const ue=S.animate([{transform:v.CSS.Transform.toString(E)},{transform:Me}],{easing:x,duration:p});ue.onfinish=()=>{S.style.display="none",I(!0),Q&&m!=null&&(Q.style.opacity=te)};return}}}I(!0)},[n,c,o,f,p,x,m,S,E]),(0,v.useIsomorphicLayoutEffect)(()=>{O&&I(!1)},[O]),O}const pr={x:0,y:0,scaleX:1,scaleY:1},kn=n=>(0,v.isKeyboardEvent)(n)?"transform 250ms ease":void 0,zn=l.memo(({adjustScale:n=!1,children:o,dropAnimation:c=Vn,style:f,transition:p=kn,modifiers:m,wrapperElement:x="div",className:S,zIndex:E=999})=>{var O,I;const{active:L,activeNodeRect:Q,containerNodeRect:_,draggableNodes:q,activatorEvent:j,over:oe,dragOverlay:z,scrollableAncestors:Me,scrollableAncestorRects:te,windowRect:ue}=Pn(),me=(0,l.useContext)(Rn),de=on(m,{activatorEvent:j,active:L,activeNodeRect:Q,containerNodeRect:_,draggingNodeRect:z.rect,over:oe,overlayNodeRect:z.rect,scrollableAncestors:Me,scrollableAncestorRects:te,transform:me,windowRect:ue}),Ne=L!==null,Et=n?de:{...de,scaleX:1,scaleY:1},Re=(0,v.useLazyMemo)(gt=>Ne?gt||(Q?{...Q}:null):null,[Ne,Q]),Ce=Re?{position:"fixed",width:Re.width,height:Re.height,top:Re.top,left:Re.left,zIndex:E,transform:v.CSS.Transform.toString(Et),touchAction:"none",transformOrigin:n&&j?Ot(j,Re):void 0,transition:typeof p=="function"?p(j):p,...f}:void 0,Fe=Ne?{style:Ce,children:o,className:S,transform:Et}:void 0,ke=(0,l.useRef)(Fe),it=Fe??ke.current,{children:Ft,transform:Be,...qe}=it??{},Mt=(0,l.useRef)((O=L==null?void 0:L.id)!=null?O:null),at=vr({animate:!!(c&&Mt.current&&!L),adjustScale:n,activeId:Mt.current,draggableNodes:q,duration:c==null?void 0:c.duration,easing:c==null?void 0:c.easing,dragSourceOpacity:c==null?void 0:c.dragSourceOpacity,node:z.nodeRef.current,transform:(I=ke.current)==null?void 0:I.transform}),ct=!!(Ft&&(o||c&&!at));return(0,l.useEffect)(()=>{if((L==null?void 0:L.id)!==Mt.current){var gt;Mt.current=(gt=L==null?void 0:L.id)!=null?gt:null}L&&ke.current!==Fe&&(ke.current=Fe)},[L,Fe]),(0,l.useEffect)(()=>{at&&(ke.current=void 0)},[at]),ct?l.createElement(F.Provider,{value:k},l.createElement(Rn.Provider,{value:pr},l.createElement(x,{...qe,ref:z.setRef},Ft))):null})},32339:function(fn,Le,ae){ae.r(Le),ae.d(Le,{createSnapModifier:function(){return ge},restrictToFirstScrollableAncestor:function(){return ye},restrictToHorizontalAxis:function(){return v},restrictToParentElement:function(){return Ue},restrictToVerticalAxis:function(){return K},restrictToWindowEdges:function(){return we},snapCenterToCursor:function(){return xe}});var l=ae(24285);function ge(se){return k=>{let{transform:F}=k;return{...F,x:Math.ceil(F.x/se)*se,y:Math.ceil(F.y/se)*se}}}const v=se=>{let{transform:k}=se;return{...k,y:0}};function De(se,k,F){const ce={...se};return k.top+se.y<=F.top?ce.y=F.top-k.top:k.bottom+se.y>=F.top+F.height&&(ce.y=F.top+F.height-k.bottom),k.left+se.x<=F.left?ce.x=F.left-k.left:k.right+se.x>=F.left+F.width&&(ce.x=F.left+F.width-k.right),ce}const Ue=se=>{let{containerNodeRect:k,draggingNodeRect:F,transform:ce}=se;return!F||!k?ce:De(ce,F,k)},ye=se=>{let{draggingNodeRect:k,transform:F,scrollableAncestorRects:ce}=se;const _e=ce[0];return!k||!_e?F:De(F,k,_e)},K=se=>{let{transform:k}=se;return{...k,x:0}},we=se=>{let{transform:k,draggingNodeRect:F,windowRect:ce}=se;return!F||!ce?k:De(k,F,ce)},xe=se=>{let{activatorEvent:k,draggingNodeRect:F,transform:ce}=se;if(F&&k){const _e=(0,l.getEventCoordinates)(k);if(!_e)return ce;const Se=_e.x-F.left,je=_e.y-F.top;return{...ce,x:ce.x+Se-F.width/2,y:ce.y+je-F.height/2}}return ce}},50690:function(fn,Le,ae){ae.d(Le,{Fo:function(){return Bn},nB:function(){return yt},qw:function(){return ct}});var l=ae(67294),ge=ae(73935),v=ae(24285),De=ae(42617);const Ue=null;function ye(e){const t=useContext(Ue);useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function K(){const[e]=useState(()=>new Set),t=useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[useCallback(s=>{let{type:i,event:a}=s;e.forEach(u=>{var g;return(g=u[i])==null?void 0:g.call(u,a)})},[e]),t]}const we={draggable:`
|
|
6
|
-
To pick up a draggable item, press the space bar.
|
|
7
|
-
While dragging, use the arrow keys to move the item.
|
|
8
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
9
|
-
`},xe={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function se(e){let{announcements:t=xe,container:r,hiddenTextDescribedById:s,screenReaderInstructions:i=we}=e;const{announce:a,announcement:u}=useAnnouncement(),g=useUniqueId("DndLiveRegion"),[h,b]=useState(!1);if(useEffect(()=>{b(!0)},[]),ye(useMemo(()=>({onDragStart(y){let{active:A}=y;a(t.onDragStart({active:A}))},onDragMove(y){let{active:A,over:N}=y;t.onDragMove&&a(t.onDragMove({active:A,over:N}))},onDragOver(y){let{active:A,over:N}=y;a(t.onDragOver({active:A,over:N}))},onDragEnd(y){let{active:A,over:N}=y;a(t.onDragEnd({active:A,over:N}))},onDragCancel(y){let{active:A,over:N}=y;a(t.onDragCancel({active:A,over:N}))}}),[a,t])),!h)return null;const R=React.createElement(React.Fragment,null,React.createElement(HiddenText,{id:s,value:i.draggable}),React.createElement(LiveRegion,{id:g,announcement:u}));return r?createPortal(R,r):R}var k;(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"})(k||(k={}));function F(){}function ce(e,t){return useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function _e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return useMemo(()=>[...t].filter(s=>s!=null),[...t])}const Se=Object.freeze({x:0,y:0});function je(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Rt(e,t){const r=getEventCoordinates(e);if(!r)return"0 0";const s={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return s.x+"% "+s.y+"%"}function et(e,t){let{data:{value:r}}=e,{data:{value:s}}=t;return r-s}function Oe(e,t){let{data:{value:r}}=e,{data:{value:s}}=t;return s-r}function Xe(e){let{left:t,top:r,height:s,width:i}=e;return[{x:t,y:r},{x:t+i,y:r},{x:t,y:r+s},{x:t+i,y:r+s}]}function Ot(e,t){if(!e||e.length===0)return null;const[r]=e;return t?r[t]:r}function lt(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const Dt=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:s}=e;const i=lt(t,t.left,t.top),a=[];for(const u of s){const{id:g}=u,h=r.get(g);if(h){const b=je(lt(h),i);a.push({id:g,data:{droppableContainer:u,value:b}})}}return a.sort(et)},xt=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:s}=e;const i=Xe(t),a=[];for(const u of s){const{id:g}=u,h=r.get(g);if(h){const b=Xe(h),R=i.reduce((A,N,Z)=>A+je(b[Z],N),0),y=Number((R/4).toFixed(4));a.push({id:g,data:{droppableContainer:u,value:y}})}}return a.sort(et)};function vt(e,t){const r=Math.max(t.top,e.top),s=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),u=i-s,g=a-r;if(s<i&&r<a){const h=t.width*t.height,b=e.width*e.height,R=u*g,y=R/(h+b-R);return Number(y.toFixed(4))}return 0}const It=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:s}=e;const i=[];for(const a of s){const{id:u}=a,g=r.get(u);if(g){const h=vt(g,t);h>0&&i.push({id:u,data:{droppableContainer:a,value:h}})}}return i.sort(Oe)};function pt(e,t){const{top:r,left:s,bottom:i,right:a}=t;return r<=e.y&&e.y<=i&&s<=e.x&&e.x<=a}const Tt=e=>{let{droppableContainers:t,droppableRects:r,pointerCoordinates:s}=e;if(!s)return[];const i=[];for(const a of t){const{id:u}=a,g=r.get(u);if(g&&pt(s,g)){const b=Xe(g).reduce((y,A)=>y+je(s,A),0),R=Number((b/4).toFixed(4));i.push({id:u,data:{droppableContainer:a,value:R}})}}return i.sort(et)};function Vt(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function d(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Se}function w(e){return function(r){for(var s=arguments.length,i=new Array(s>1?s-1:0),a=1;a<s;a++)i[a-1]=arguments[a];return i.reduce((u,g)=>({...u,top:u.top+e*g.y,bottom:u.bottom+e*g.y,left:u.left+e*g.x,right:u.right+e*g.x}),{...r})}}const C=null;function D(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 M(e,t,r){const s=D(t);if(!s)return e;const{scaleX:i,scaleY:a,x:u,y:g}=s,h=e.left-u-(1-i)*parseFloat(r),b=e.top-g-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),R=i?e.width/i:e.width,y=a?e.height/a:e.height;return{width:R,height:y,top:b,right:h+R,bottom:b+y,left:h}}const T={ignoreTransform:!1};function U(e,t){t===void 0&&(t=T);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:b,transformOrigin:R}=(0,v.getWindow)(e).getComputedStyle(e);b&&(r=M(r,b,R))}const{top:s,left:i,width:a,height:u,bottom:g,right:h}=r;return{top:s,left:i,width:a,height:u,bottom:g,right:h}}function he(e){return U(e,{ignoreTransform:!0})}function W(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function Y(e,t){return t===void 0&&(t=(0,v.getWindow)(e).getComputedStyle(e)),t.position==="fixed"}function ve(e,t){t===void 0&&(t=(0,v.getWindow)(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?r.test(a):!1})}function ze(e,t){const r=[];function s(i){if(t!=null&&r.length>=t||!i)return r;if((0,v.isDocument)(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!(0,v.isHTMLElement)(i)||(0,v.isSVGElement)(i)||r.includes(i))return r;const a=(0,v.getWindow)(e).getComputedStyle(i);return i!==e&&ve(i,a)&&r.push(i),Y(i,a)?r:s(i.parentNode)}return e?s(e):r}function Ee(e){const[t]=ze(e,1);return t??null}function Ye(e){return!canUseDOM||!e?null:isWindow(e)?e:isNode(e)?isDocument(e)||e===getOwnerDocument(e).scrollingElement?window:isHTMLElement(e)?e:null:null}function Ie(e){return(0,v.isWindow)(e)?e.scrollX:e.scrollLeft}function $e(e){return(0,v.isWindow)(e)?e.scrollY:e.scrollTop}function He(e){return{x:Ie(e),y:$e(e)}}var ee;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ee||(ee={}));function Je(e){return!v.canUseDOM||!e?!1:e===document.scrollingElement}function Ve(e){const t={x:0,y:0},r=Je(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,u=e.scrollTop>=s.y,g=e.scrollLeft>=s.x;return{isTop:i,isLeft:a,isBottom:u,isRight:g,maxScroll:s,minScroll:t}}const tt={x:.2,y:.2};function Gt(e,t,r,s,i){let{top:a,left:u,right:g,bottom:h}=r;s===void 0&&(s=10),i===void 0&&(i=tt);const{isTop:b,isBottom:R,isLeft:y,isRight:A}=Ve(e),N={x:0,y:0},Z={x:0,y:0},P={height:t.height*i.y,width:t.width*i.x};return!b&&a<=t.top+P.height?(N.y=ee.Backward,Z.y=s*Math.abs((t.top+P.height-a)/P.height)):!R&&h>=t.bottom-P.height&&(N.y=ee.Forward,Z.y=s*Math.abs((t.bottom-P.height-h)/P.height)),!A&&g>=t.right-P.width?(N.x=ee.Forward,Z.x=s*Math.abs((t.right-P.width-g)/P.width)):!y&&u<=t.left+P.width&&(N.x=ee.Backward,Z.x=s*Math.abs((t.left+P.width-u)/P.width)),{direction:N,speed:Z}}function gn(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:u}=window;return{top:0,left:0,right:a,bottom:u,width:a,height:u}}const{top:t,left:r,right:s,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:s,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Lt(e){return e.reduce((t,r)=>add(t,He(r)),Se)}function bt(e){return e.reduce((t,r)=>t+Ie(r),0)}function qt(e){return e.reduce((t,r)=>t+$e(r),0)}function Jt(e,t){if(t===void 0&&(t=U),!e)return;const{top:r,left:s,bottom:i,right:a}=t(e);Ee(e)&&(i<=0||a<=0||r>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const hn=[["x",["left","right"],bt],["y",["top","bottom"],qt]];class St{constructor(t,r){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 s=ze(r),i=Lt(s);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,u,g]of hn)for(const h of u)Object.defineProperty(this,h,{get:()=>{const b=g(s),R=i[a]-b;return this.rect[h]+R},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class nt{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...r)})},this.target=t}add(t,r,s){var i;(i=this.target)==null||i.addEventListener(t,r,s),this.listeners.push([t,r,s])}}function Qe(e){const{EventTarget:t}=(0,v.getWindow)(e);return e instanceof t?e:(0,v.getOwnerDocument)(e)}function rt(e,t){const r=Math.abs(e.x),s=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+s**2)>t:"x"in t&&"y"in t?r>t.x&&s>t.y:"x"in t?r>t.x:"y"in t?s>t.y:!1}var Pe;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Pe||(Pe={}));function Qt(e){e.preventDefault()}function ut(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"})(H||(H={}));const dt={start:[H.Space,H.Enter],cancel:[H.Esc],end:[H.Space,H.Enter]},Pt=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case H.Right:return{...r,x:r.x+25};case H.Left:return{...r,x:r.x-25};case H.Down:return{...r,y:r.y+25};case H.Up:return{...r,y:r.y-25}}};class vn{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:r}}=t;this.props=t,this.listeners=new nt((0,v.getOwnerDocument)(r)),this.windowListeners=new nt((0,v.getWindow)(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Pe.Resize,this.handleCancel),this.windowListeners.add(Pe.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Pe.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,s=t.node.current;s&&Jt(s),r(Se)}handleKeyDown(t){if((0,v.isKeyboardEvent)(t)){const{active:r,context:s,options:i}=this.props,{keyboardCodes:a=dt,coordinateGetter:u=Pt,scrollBehavior:g="smooth"}=i,{code:h}=t;if(a.end.includes(h)){this.handleEnd(t);return}if(a.cancel.includes(h)){this.handleCancel(t);return}const{collisionRect:b}=s.current,R=b?{x:b.left,y:b.top}:Se;this.referenceCoordinates||(this.referenceCoordinates=R);const y=u(t,{active:r,context:s.current,currentCoordinates:R});if(y){const A=(0,v.subtract)(y,R),N={x:0,y:0},{scrollableAncestors:Z}=s.current;for(const P of Z){const B=t.code,{isTop:ne,isRight:re,isLeft:V,isBottom:$,maxScroll:X,minScroll:G}=Ve(P),J=gn(P),fe={x:Math.min(B===H.Right?J.right-J.width/2:J.right,Math.max(B===H.Right?J.left:J.left+J.width/2,y.x)),y:Math.min(B===H.Down?J.bottom-J.height/2:J.bottom,Math.max(B===H.Down?J.top:J.top+J.height/2,y.y))},pe=B===H.Right&&!re||B===H.Left&&!V,be=B===H.Down&&!$||B===H.Up&&!ne;if(pe&&fe.x!==y.x){const ie=P.scrollLeft+A.x,Ke=B===H.Right&&ie<=X.x||B===H.Left&&ie>=G.x;if(Ke&&!A.y){P.scrollTo({left:ie,behavior:g});return}Ke?N.x=P.scrollLeft-ie:N.x=B===H.Right?P.scrollLeft-X.x:P.scrollLeft-G.x,N.x&&P.scrollBy({left:-N.x,behavior:g});break}else if(be&&fe.y!==y.y){const ie=P.scrollTop+A.y,Ke=B===H.Down&&ie<=X.y||B===H.Up&&ie>=G.y;if(Ke&&!A.x){P.scrollTo({top:ie,behavior:g});return}Ke?N.y=P.scrollTop-ie:N.y=B===H.Down?P.scrollTop-X.y:P.scrollTop-G.y,N.y&&P.scrollBy({top:-N.y,behavior:g});break}}this.handleMove(t,(0,v.add)((0,v.subtract)(y,this.referenceCoordinates),N))}}}handleMove(t,r){const{onMove:s}=this.props;t.preventDefault(),s(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}vn.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:s=dt,onActivation:i}=t,{active:a}=r;const{code:u}=e.nativeEvent;if(s.start.includes(u)){const g=a.activatorNode.current;return g&&e.target!==g?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Zt(e){return!!(e&&"distance"in e)}function ot(e){return!!(e&&"delay"in e)}class ft{constructor(t,r,s){var i;s===void 0&&(s=Qe(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=r;const{event:a}=t,{target:u}=a;this.props=t,this.events=r,this.document=(0,v.getOwnerDocument)(u),this.documentListeners=new nt(this.document),this.listeners=new nt(s),this.windowListeners=new nt((0,v.getWindow)(u)),this.initialCoordinates=(i=(0,v.getEventCoordinates)(a))!=null?i:Se,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:r,bypassActivationConstraint:s}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Pe.Resize,this.handleCancel),this.windowListeners.add(Pe.DragStart,Qt),this.windowListeners.add(Pe.VisibilityChange,this.handleCancel),this.windowListeners.add(Pe.ContextMenu,Qt),this.documentListeners.add(Pe.Keydown,this.handleKeydown),r){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ot(r)){this.timeoutId=setTimeout(this.handleStart,r.delay);return}if(Zt(r))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:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(Pe.Click,ut,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Pe.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:s,initialCoordinates:i,props:a}=this,{onMove:u,options:{activationConstraint:g}}=a;if(!i)return;const h=(r=(0,v.getEventCoordinates)(t))!=null?r:Se,b=(0,v.subtract)(i,h);if(!s&&g){if(Zt(g)){if(g.tolerance!=null&&rt(b,g.tolerance))return this.handleCancel();if(rt(b,g.distance))return this.handleStart()}return ot(g)&&rt(b,g.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),u(h)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===H.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Ae={move:{name:"pointermove"},end:{name:"pointerup"}};class en extends ft{constructor(t){const{event:r}=t,s=(0,v.getOwnerDocument)(r.target);super(t,Ae,s)}}en.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:s}=t;return!r.isPrimary||r.button!==0?!1:(s==null||s({event:r}),!0)}}];const tn={move:{name:"mousemove"},end:{name:"mouseup"}};var mt;(function(e){e[e.RightClick=2]="RightClick"})(mt||(mt={}));class pn extends ft{constructor(t){super(t,tn,(0,v.getOwnerDocument)(t.event.target))}}pn.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:s}=t;return r.button===mt.RightClick?!1:(s==null||s({event:r}),!0)}}];const bn={move:{name:"touchmove"},end:{name:"touchend"}};class En extends ft{constructor(t){super(t,bn)}static setup(){return window.addEventListener(bn.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(bn.move.name,t)};function t(){}}}En.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:s}=t;const{touches:i}=r;return i.length>1?!1:(s==null||s({event:r}),!0)}}];var kt;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(kt||(kt={}));var nn;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(nn||(nn={}));function or(e){let{acceleration:t,activator:r=kt.Pointer,canScroll:s,draggingRect:i,enabled:a,interval:u=5,order:g=nn.TreeOrder,pointerCoordinates:h,scrollableAncestors:b,scrollableAncestorRects:R,delta:y,threshold:A}=e;const N=jn({delta:y,disabled:!a}),[Z,P]=useInterval(),B=useRef({x:0,y:0}),ne=useRef({x:0,y:0}),re=useMemo(()=>{switch(r){case kt.Pointer:return h?{top:h.y,bottom:h.y,left:h.x,right:h.x}:null;case kt.DraggableRect:return i}},[r,i,h]),V=useRef(null),$=useCallback(()=>{const G=V.current;if(!G)return;const J=B.current.x*ne.current.x,fe=B.current.y*ne.current.y;G.scrollBy(J,fe)},[]),X=useMemo(()=>g===nn.TreeOrder?[...b].reverse():b,[g,b]);useEffect(()=>{if(!a||!b.length||!re){P();return}for(const G of X){if((s==null?void 0:s(G))===!1)continue;const J=b.indexOf(G),fe=R[J];if(!fe)continue;const{direction:pe,speed:be}=Gt(G,fe,re,t,A);for(const ie of["x","y"])N[ie][pe[ie]]||(be[ie]=0,pe[ie]=0);if(be.x>0||be.y>0){P(),V.current=G,Z($,u),B.current=be,ne.current=pe;return}}B.current={x:0,y:0},ne.current={x:0,y:0},P()},[t,$,s,P,a,u,JSON.stringify(re),JSON.stringify(N),Z,b,X,R,JSON.stringify(A)])}const Mn={x:{[ee.Backward]:!1,[ee.Forward]:!1},y:{[ee.Backward]:!1,[ee.Forward]:!1}};function jn(e){let{delta:t,disabled:r}=e;const s=usePrevious(t);return useLazyMemo(i=>{if(r||!s||!i)return Mn;const a={x:Math.sign(t.x-s.x),y:Math.sign(t.y-s.y)};return{x:{[ee.Backward]:i.x[ee.Backward]||a.x===-1,[ee.Forward]:i.x[ee.Forward]||a.x===1},y:{[ee.Backward]:i.y[ee.Backward]||a.y===-1,[ee.Forward]:i.y[ee.Forward]||a.y===1}}},[r,t,s])}function sr(e,t){const r=t!==null?e.get(t):void 0,s=r?r.node.current:null;return useLazyMemo(i=>{var a;return t===null?null:(a=s??i)!=null?a:null},[s,t])}function ir(e,t){return useMemo(()=>e.reduce((r,s)=>{const{sensor:i}=s,a=i.activators.map(u=>({eventName:u.eventName,handler:t(u.handler,s)}));return[...r,...a]},[]),[e,t])}var st;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(st||(st={}));var mn;(function(e){e.Optimized="optimized"})(mn||(mn={}));const rn=new Map;function Ge(e,t){let{dragging:r,dependencies:s,config:i}=t;const[a,u]=useState(null),{frequency:g,measure:h,strategy:b}=i,R=useRef(e),y=B(),A=useLatestValue(y),N=useCallback(function(ne){ne===void 0&&(ne=[]),!A.current&&u(re=>re===null?ne:re.concat(ne.filter(V=>!re.includes(V))))},[A]),Z=useRef(null),P=useLazyMemo(ne=>{if(y&&!r)return rn;if(!ne||ne===rn||R.current!==e||a!=null){const re=new Map;for(let V of e){if(!V)continue;if(a&&a.length>0&&!a.includes(V.id)&&V.rect.current){re.set(V.id,V.rect.current);continue}const $=V.node.current,X=$?new St(h($),$):null;V.rect.current=X,X&&re.set(V.id,X)}return re}return ne},[e,a,r,y,h]);return useEffect(()=>{R.current=e},[e]),useEffect(()=>{y||N()},[r,y]),useEffect(()=>{a&&a.length>0&&u(null)},[JSON.stringify(a)]),useEffect(()=>{y||typeof g!="number"||Z.current!==null||(Z.current=setTimeout(()=>{N(),Z.current=null},g))},[g,y,N,...s]),{droppableRects:P,measureDroppableContainers:N,measuringScheduled:a!=null};function B(){switch(b){case st.Always:return!1;case st.BeforeDragging:return r;default:return!r}}}function yn(e,t){return useLazyMemo(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function ar(e,t){return yn(e,t)}function le(e){let{callback:t,disabled:r}=e;const s=useEvent(t),i=useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(s)},[s,r]);return useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function zt(e){let{callback:t,disabled:r}=e;const s=(0,v.useEvent)(t),i=(0,l.useMemo)(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(s)},[r]);return(0,l.useEffect)(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Xn(e){return new St(U(e),e)}function An(e,t,r){t===void 0&&(t=Xn);const[s,i]=useReducer(g,null),a=le({callback(h){if(e)for(const b of h){const{type:R,target:y}=b;if(R==="childList"&&y instanceof HTMLElement&&y.contains(e)){i();break}}}}),u=zt({callback:i});return useIsomorphicLayoutEffect(()=>{i(),e?(u==null||u.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(u==null||u.disconnect(),a==null||a.disconnect())},[e]),s;function g(h){if(!e)return null;if(e.isConnected===!1){var b;return(b=h??r)!=null?b:null}const R=t(e);return JSON.stringify(h)===JSON.stringify(R)?h:R}}function Yn(e){const t=yn(e);return d(e,t)}const wn=null;function Nn(e){const t=useRef(e),r=useLazyMemo(s=>e?s&&s!==wn&&e&&t.current&&e.parentNode===t.current.parentNode?s:ze(e):wn,[e]);return useEffect(()=>{t.current=e},[e]),r}function cr(e){const[t,r]=useState(null),s=useRef(e),i=useCallback(a=>{const u=Ye(a.target);u&&r(g=>g?(g.set(u,He(u)),new Map(g)):null)},[]);return useEffect(()=>{const a=s.current;if(e!==a){u(a);const g=e.map(h=>{const b=Ye(h);return b?(b.addEventListener("scroll",i,{passive:!0}),[b,He(b)]):null}).filter(h=>h!=null);r(g.length?new Map(g):null),s.current=e}return()=>{u(e),u(a)};function u(g){g.forEach(h=>{const b=Ye(h);b==null||b.removeEventListener("scroll",i)})}},[i,e]),useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,u)=>add(a,u),Se):Lt(e):Se,[e,t])}function On(e,t){t===void 0&&(t=[]);const r=useRef(null);return useEffect(()=>{r.current=null},t),useEffect(()=>{const s=e!==Se;s&&!r.current&&(r.current=e),!s&&r.current&&(r.current=null)},[e]),r.current?subtract(e,r.current):Se}function lr(e){useEffect(()=>{if(!canUseDOM)return;const t=e.map(r=>{let{sensor:s}=r;return s.setup==null?void 0:s.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function Cn(e,t){return(0,l.useMemo)(()=>e.reduce((r,s)=>{let{eventName:i,handler:a}=s;return r[i]=u=>{a(u,t)},r},{}),[e,t])}function In(e){return useMemo(()=>e?W(e):null,[e])}const Bt=null;function Hn(e,t){t===void 0&&(t=U);const[r]=e,s=In(r?getWindow(r):null),[i,a]=useReducer(g,Bt),u=zt({callback:a});return e.length>0&&i===Bt&&a(),useIsomorphicLayoutEffect(()=>{e.length?e.forEach(h=>u==null?void 0:u.observe(h)):(u==null||u.disconnect(),a())},[e]),i;function g(){return e.length?e.map(h=>Je(h)?s:new St(t(h),h)):Bt}}function on(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return isHTMLElement(t)?t:e}function ur(e){let{measure:t}=e;const[r,s]=useState(null),i=useCallback(b=>{for(const{target:R}of b)if(isHTMLElement(R)){s(y=>{const A=t(R);return y?{...y,width:A.width,height:A.height}:A});break}},[t]),a=zt({callback:i}),u=useCallback(b=>{const R=on(b);a==null||a.disconnect(),R&&(a==null||a.observe(R)),s(R?t(R):null)},[t,a]),[g,h]=useNodeRef(u);return useMemo(()=>({nodeRef:g,rect:r,setRef:h}),[r,g,h])}const dr=[{sensor:en,options:{}},{sensor:vn,options:{}}],Rn={current:{}},sn={draggable:{measure:he},droppable:{measure:he,strategy:st.WhileDragging,frequency:mn.Optimized},dragOverlay:{measure:U}};class $t extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,s;return(r=(s=this.get(t))==null?void 0:s.node.current)!=null?r:void 0}}const Tn={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new $t,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:F},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:sn,measureDroppableContainers:F,windowRect:null,measuringScheduled:!1},Ln={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:F,draggableNodes:new Map,over:null,measureDroppableContainers:F},an=(0,l.createContext)(Ln),Pn=(0,l.createContext)(Tn);function fr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new $t}}}function gr(e,t){switch(t.type){case k.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case k.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case k.DragEnd:case k.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case k.RegisterDroppable:{const{element:r}=t,{id:s}=r,i=new $t(e.droppable.containers);return i.set(s,r),{...e,droppable:{...e.droppable,containers:i}}}case k.SetDroppableDisabled:{const{id:r,key:s,disabled:i}=t,a=e.droppable.containers.get(r);if(!a||s!==a.key)return e;const u=new $t(e.droppable.containers);return u.set(r,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:u}}}case k.UnregisterDroppable:{const{id:r,key:s}=t,i=e.droppable.containers.get(r);if(!i||s!==i.key)return e;const a=new $t(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function hr(e){let{disabled:t}=e;const{active:r,activatorEvent:s,draggableNodes:i}=useContext(an),a=usePrevious(s),u=usePrevious(r==null?void 0:r.id);return useEffect(()=>{if(!t&&!s&&a&&u!=null){if(!isKeyboardEvent(a)||document.activeElement===a.target)return;const g=i.get(u);if(!g)return;const{activatorNode:h,node:b}=g;if(!h.current&&!b.current)return;requestAnimationFrame(()=>{for(const R of[h.current,b.current]){if(!R)continue;const y=findFirstFocusableNode(R);if(y){y.focus();break}}})}},[s,t,i,u,a]),null}function Vn(e,t){let{transform:r,...s}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...s}),r):r}function vr(e){return 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 pr(e){let{activeNode:t,measure:r,initialRect:s,config:i=!0}=e;const a=useRef(!1),{x:u,y:g}=typeof i=="boolean"?{x:i,y:i}:i;useIsomorphicLayoutEffect(()=>{if(!u&&!g||!t){a.current=!1;return}if(a.current||!s)return;const b=t==null?void 0:t.node.current;if(!b||b.isConnected===!1)return;const R=r(b),y=d(R,s);if(u||(y.x=0),g||(y.y=0),a.current=!0,Math.abs(y.x)>0||Math.abs(y.y)>0){const A=Ee(b);A&&A.scrollBy({top:y.y,left:y.x})}},[t,u,g,s,r])}const kn=(0,l.createContext)({...Se,scaleX:1,scaleY:1});var zn;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(zn||(zn={}));const n=null,o=(0,l.createContext)(null),c="button",f="Droppable";function p(e){let{id:t,data:r,disabled:s=!1,attributes:i}=e;const a=(0,v.useUniqueId)(f),{activators:u,activatorEvent:g,active:h,activeNodeRect:b,ariaDescribedById:R,draggableNodes:y,over:A}=(0,l.useContext)(an),{role:N=c,roleDescription:Z="draggable",tabIndex:P=0}=i??{},B=(h==null?void 0:h.id)===t,ne=(0,l.useContext)(B?kn:o),[re,V]=(0,v.useNodeRef)(),[$,X]=(0,v.useNodeRef)(),G=Cn(u,t),J=(0,v.useLatestValue)(r);(0,v.useIsomorphicLayoutEffect)(()=>(y.set(t,{id:t,key:a,node:re,activatorNode:$,data:J}),()=>{const pe=y.get(t);pe&&pe.key===a&&y.delete(t)}),[y,t]);const fe=(0,l.useMemo)(()=>({role:N,tabIndex:P,"aria-disabled":s,"aria-pressed":B&&N===c?!0:void 0,"aria-roledescription":Z,"aria-describedby":R.draggable}),[s,N,P,B,Z,R.draggable]);return{active:h,activatorEvent:g,activeNodeRect:b,attributes:fe,isDragging:B,listeners:s?void 0:G,node:re,over:A,setNodeRef:V,setActivatorNodeRef:X,transform:ne}}function m(){return(0,l.useContext)(Pn)}const x="Droppable",S={timeout:25};function E(e){let{data:t,disabled:r=!1,id:s,resizeObserverConfig:i}=e;const a=(0,v.useUniqueId)(x),{active:u,dispatch:g,over:h,measureDroppableContainers:b}=(0,l.useContext)(an),R=(0,l.useRef)({disabled:r}),y=(0,l.useRef)(!1),A=(0,l.useRef)(null),N=(0,l.useRef)(null),{disabled:Z,updateMeasurementsFor:P,timeout:B}={...S,...i},ne=(0,v.useLatestValue)(P??s),re=(0,l.useCallback)(()=>{if(!y.current){y.current=!0;return}N.current!=null&&clearTimeout(N.current),N.current=setTimeout(()=>{b(Array.isArray(ne.current)?ne.current:[ne.current]),N.current=null},B)},[B]),V=zt({callback:re,disabled:Z||!u}),$=(0,l.useCallback)((fe,pe)=>{V&&(pe&&(V.unobserve(pe),y.current=!1),fe&&V.observe(fe))},[V]),[X,G]=(0,v.useNodeRef)($),J=(0,v.useLatestValue)(t);return(0,l.useEffect)(()=>{!V||!X.current||(V.disconnect(),y.current=!1,V.observe(X.current))},[X,V]),(0,v.useIsomorphicLayoutEffect)(()=>(g({type:k.RegisterDroppable,element:{id:s,key:a,disabled:r,node:X,rect:A,data:J}}),()=>g({type:k.UnregisterDroppable,key:a,id:s})),[s]),(0,l.useEffect)(()=>{r!==R.current.disabled&&(g({type:k.SetDroppableDisabled,id:s,key:a,disabled:r}),R.current.disabled=r)},[s,a,r,g]),{active:u,rect:A,isOver:(h==null?void 0:h.id)===s,node:X,over:h,setNodeRef:G}}function O(e){let{animation:t,children:r}=e;const[s,i]=useState(null),[a,u]=useState(null),g=usePrevious(r);return!r&&!s&&g&&i(g),useIsomorphicLayoutEffect(()=>{if(!a)return;const h=s==null?void 0:s.key,b=s==null?void 0:s.props.id;if(h==null||b==null){i(null);return}Promise.resolve(t(b,a)).then(()=>{i(null)})},[t,s,a]),React.createElement(React.Fragment,null,r,s?cloneElement(s,{ref:u}):null)}const I={x:0,y:0,scaleX:1,scaleY:1};function L(e){let{children:t}=e;return React.createElement(an.Provider,{value:Ln},React.createElement(kn.Provider,{value:I},t))}const Q={position:"fixed",touchAction:"none"},_=e=>isKeyboardEvent(e)?"transform 250ms ease":void 0,q=null,z={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:r}}=e;return[{transform:v.CSS.Transform.toString(t)},{transform:v.CSS.Transform.toString(r)}]},sideEffects:(e=>t=>{let{active:r,dragOverlay:s}=t;const i={},{styles:a,className:u}=e;if(a!=null&&a.active)for(const[g,h]of Object.entries(a.active))h!==void 0&&(i[g]=r.node.style.getPropertyValue(g),r.node.style.setProperty(g,h));if(a!=null&&a.dragOverlay)for(const[g,h]of Object.entries(a.dragOverlay))h!==void 0&&s.node.style.setProperty(g,h);return u!=null&&u.active&&r.node.classList.add(u.active),u!=null&&u.dragOverlay&&s.node.classList.add(u.dragOverlay),function(){for(const[h,b]of Object.entries(i))r.node.style.setProperty(h,b);u!=null&&u.active&&r.node.classList.remove(u.active)}})({styles:{active:{opacity:"0"}}})};function Me(e){let{config:t,draggableNodes:r,droppableContainers:s,measuringConfiguration:i}=e;return useEvent((a,u)=>{if(t===null)return;const g=r.get(a);if(!g)return;const h=g.node.current;if(!h)return;const b=on(u);if(!b)return;const{transform:R}=getWindow(u).getComputedStyle(u),y=D(R);if(!y)return;const A=typeof t=="function"?t:te(t);return Jt(h,i.draggable.measure),A({active:{id:a,data:g.data,node:h,rect:i.draggable.measure(h)},draggableNodes:r,dragOverlay:{node:u,rect:i.dragOverlay.measure(b)},droppableContainers:s,measuringConfiguration:i,transform:y})})}function te(e){const{duration:t,easing:r,sideEffects:s,keyframes:i}={...z,...e};return a=>{let{active:u,dragOverlay:g,transform:h,...b}=a;if(!t)return;const R={x:g.rect.left-u.rect.left,y:g.rect.top-u.rect.top},y={scaleX:h.scaleX!==1?u.rect.width*h.scaleX/g.rect.width:1,scaleY:h.scaleY!==1?u.rect.height*h.scaleY/g.rect.height:1},A={x:h.x-R.x,y:h.y-R.y,...y},N=i({...b,active:u,dragOverlay:g,transform:{initial:h,final:A}}),[Z]=N,P=N[N.length-1];if(JSON.stringify(Z)===JSON.stringify(P))return;const B=s==null?void 0:s({active:u,dragOverlay:g,...b}),ne=g.node.animate(N,{duration:t,easing:r,fill:"forwards"});return new Promise(re=>{ne.onfinish=()=>{B==null||B(),re()}})}}let ue=0;function me(e){return useMemo(()=>{if(e!=null)return ue++,ue},[e])}const de=null;function Ne(e,t,r){const s=e.slice();return s.splice(r<0?s.length+r:r,0,s.splice(t,1)[0]),s}function Et(e,t,r){const s=e.slice();return s[t]=e[r],s[r]=e[t],s}function Re(e,t){return e.reduce((r,s,i)=>{const a=t.get(s);return a&&(r[i]=a),r},Array(e.length))}function Ce(e){return e!==null&&e>=0}function Fe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function ke(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const it={scaleX:1,scaleY:1},Ft=e=>{var t;let{rects:r,activeNodeRect:s,activeIndex:i,overIndex:a,index:u}=e;const g=(t=r[i])!=null?t:s;if(!g)return null;const h=Be(r,u,i);if(u===i){const b=r[a];return b?{x:i<a?b.left+b.width-(g.left+g.width):b.left-g.left,y:0,...it}:null}return u>i&&u<=a?{x:-g.width-h,y:0,...it}:u<i&&u>=a?{x:g.width+h,y:0,...it}:{x:0,y:0,...it}};function Be(e,t,r){const s=e[t],i=e[t-1],a=e[t+1];return!s||!i&&!a?0:r<t?i?s.left-(i.left+i.width):a.left-(s.left+s.width):a?a.left-(s.left+s.width):s.left-(i.left+i.width)}const qe=e=>{let{rects:t,activeIndex:r,overIndex:s,index:i}=e;const a=Ne(t,s,r),u=t[i],g=a[i];return!g||!u?null:{x:g.left-u.left,y:g.top-u.top,scaleX:g.width/u.width,scaleY:g.height/u.height}},Mt=e=>{let{activeIndex:t,index:r,rects:s,overIndex:i}=e,a,u;return r===t&&(a=s[r],u=s[i]),r===i&&(a=s[r],u=s[t]),!u||!a?null:{x:u.left-a.left,y:u.top-a.top,scaleX:u.width/a.width,scaleY:u.height/a.height}},at={scaleX:1,scaleY:1},ct=e=>{var t;let{activeIndex:r,activeNodeRect:s,index:i,rects:a,overIndex:u}=e;const g=(t=a[r])!=null?t:s;if(!g)return null;if(i===r){const b=a[u];return b?{x:0,y:r<u?b.top+b.height-(g.top+g.height):b.top-g.top,...at}:null}const h=gt(a,i,r);return i>r&&i<=u?{x:0,y:-g.height-h,...at}:i<r&&i>=u?{x:0,y:g.height+h,...at}:{x:0,y:0,...at}};function gt(e,t,r){const s=e[t],i=e[t-1],a=e[t+1];return s?r<t?i?s.top-(i.top+i.height):a?a.top-(s.top+s.height):0:a?a.top-(s.top+s.height):i?s.top-(i.top+i.height):0:0}const At="Sortable",cn=l.createContext({activeIndex:-1,containerId:At,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:qe,disabled:{draggable:!1,droppable:!1}});function Bn(e){let{children:t,id:r,items:s,strategy:i=qe,disabled:a=!1}=e;const{active:u,dragOverlay:g,droppableRects:h,over:b,measureDroppableContainers:R}=m(),y=(0,v.useUniqueId)(At,r),A=g.rect!==null,N=(0,l.useMemo)(()=>s.map(G=>typeof G=="object"&&"id"in G?G.id:G),[s]),Z=u!=null,P=u?N.indexOf(u.id):-1,B=b?N.indexOf(b.id):-1,ne=(0,l.useRef)(N),re=!Fe(N,ne.current),V=B!==-1&&P===-1||re,$=ke(a);(0,v.useIsomorphicLayoutEffect)(()=>{re&&Z&&R(N)},[re,N,Z,R]),(0,l.useEffect)(()=>{ne.current=N},[N]);const X=(0,l.useMemo)(()=>({activeIndex:P,containerId:y,disabled:$,disableTransforms:V,items:N,overIndex:B,useDragOverlay:A,sortedRects:Re(N,h),strategy:i}),[P,y,$.draggable,$.droppable,V,N,B,h,A,i]);return l.createElement(cn.Provider,{value:X},t)}const Wt=e=>{let{id:t,items:r,activeIndex:s,overIndex:i}=e;return Ne(r,s,i).indexOf(t)},ln=e=>{let{containerId:t,isSorting:r,wasDragging:s,index:i,items:a,newIndex:u,previousItems:g,previousContainerId:h,transition:b}=e;return!b||!s||g!==a&&i===u?!1:r?!0:u!==i&&t===h},$n={duration:200,easing:"ease"},Ze="transform",Fn=v.CSS.Transition.toString({property:Ze,duration:0,easing:"linear"}),We={roleDescription:"sortable"};function Dn(e){let{disabled:t,index:r,node:s,rect:i}=e;const[a,u]=(0,l.useState)(null),g=(0,l.useRef)(r);return(0,v.useIsomorphicLayoutEffect)(()=>{if(!t&&r!==g.current&&s.current){const h=i.current;if(h){const b=U(s.current,{ignoreTransform:!0}),R={x:h.left-b.left,y:h.top-b.top,scaleX:h.width/b.width,scaleY:h.height/b.height};(R.x||R.y)&&u(R)}}r!==g.current&&(g.current=r)},[t,r,s,i]),(0,l.useEffect)(()=>{a&&u(null)},[a]),a}function yt(e){let{animateLayoutChanges:t=ln,attributes:r,disabled:s,data:i,getNewIndex:a=Wt,id:u,strategy:g,resizeObserverConfig:h,transition:b=$n}=e;const{items:R,containerId:y,activeIndex:A,disabled:N,disableTransforms:Z,sortedRects:P,overIndex:B,useDragOverlay:ne,strategy:re}=(0,l.useContext)(cn),V=Wn(s,N),$=R.indexOf(u),X=(0,l.useMemo)(()=>({sortable:{containerId:y,index:$,items:R},...i}),[y,i,$,R]),G=(0,l.useMemo)(()=>R.slice(R.indexOf(u)),[R,u]),{rect:J,node:fe,isOver:pe,setNodeRef:be}=E({id:u,data:X,disabled:V.droppable,resizeObserverConfig:{updateMeasurementsFor:G,...h}}),{active:ie,activatorEvent:Ke,activeNodeRect:_t,attributes:jt,setNodeRef:un,listeners:wt,isDragging:Ct,over:xn,setActivatorNodeRef:Sn,transform:br}=p({id:u,data:X,attributes:{...We,...r},disabled:V.draggable}),mr=(0,v.useCombinedRefs)(be,un),Xt=!!ie,qn=Xt&&!Z&&Ce(A)&&Ce(B),Jn=!ne&&Ct,Qn=Jn&&qn?br:null,yr=qn?Qn??(g??re)({rects:P,activeNodeRect:_t,activeIndex:A,overIndex:B,index:$}):null,dn=Ce(A)&&Ce(B)?a({id:u,items:R,activeIndex:A,overIndex:B}):$,Yt=ie==null?void 0:ie.id,Te=(0,l.useRef)({activeId:Yt,items:R,newIndex:dn,containerId:y}),wr=R!==Te.current.items,Zn=t({active:ie,containerId:y,isDragging:Ct,isSorting:Xt,id:u,index:$,items:R,newIndex:Te.current.newIndex,previousItems:Te.current.items,previousContainerId:Te.current.containerId,transition:b,wasDragging:Te.current.activeId!=null}),Kn=Dn({disabled:!Zn,index:$,node:fe,rect:J});return(0,l.useEffect)(()=>{Xt&&Te.current.newIndex!==dn&&(Te.current.newIndex=dn),y!==Te.current.containerId&&(Te.current.containerId=y),R!==Te.current.items&&(Te.current.items=R)},[Xt,dn,y,R]),(0,l.useEffect)(()=>{if(Yt===Te.current.activeId)return;if(Yt&&!Te.current.activeId){Te.current.activeId=Yt;return}const Rr=setTimeout(()=>{Te.current.activeId=Yt},50);return()=>clearTimeout(Rr)},[Yt]),{active:ie,activeIndex:A,attributes:jt,data:X,rect:J,index:$,newIndex:dn,items:R,isOver:pe,isSorting:Xt,isDragging:Ct,listeners:wt,node:fe,overIndex:B,over:xn,setNodeRef:mr,setActivatorNodeRef:Sn,setDroppableNodeRef:be,setDraggableNodeRef:un,transform:Kn??yr,transition:Cr()};function Cr(){if(Kn||wr&&Te.current.newIndex===$)return Fn;if(!(Jn&&!(0,v.isKeyboardEvent)(Ke)||!b)&&(Xt||Zn))return v.CSS.Transition.toString({...b,property:Ze})}}function Wn(e,t){var r,s;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(s=e==null?void 0:e.droppable)!=null?s:t.droppable}}function ht(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Kt=[H.Down,H.Right,H.Up,H.Left],Nt=(e,t)=>{let{context:{active:r,collisionRect:s,droppableRects:i,droppableContainers:a,over:u,scrollableAncestors:g}}=t;if(Kt.includes(e.code)){if(e.preventDefault(),!r||!s)return;const h=[];a.getEnabled().forEach(y=>{if(!y||y!=null&&y.disabled)return;const A=i.get(y.id);if(A)switch(e.code){case KeyboardCode.Down:s.top<A.top&&h.push(y);break;case KeyboardCode.Up:s.top>A.top&&h.push(y);break;case KeyboardCode.Left:s.left>A.left&&h.push(y);break;case KeyboardCode.Right:s.left<A.left&&h.push(y);break}});const b=closestCorners({active:r,collisionRect:s,droppableRects:i,droppableContainers:h,pointerCoordinates:null});let R=getFirstCollision(b,"id");if(R===(u==null?void 0:u.id)&&b.length>1&&(R=b[1].id),R!=null){const y=a.get(r.id),A=a.get(R),N=A?i.get(A.id):null,Z=A==null?void 0:A.node.current;if(Z&&N&&y&&A){const B=getScrollableAncestors(Z).some((G,J)=>g[J]!==G),ne=Ut(y,A),re=Gn(y,A),V=B||!ne?{x:0,y:0}:{x:re?s.width-N.width:0,y:re?s.height-N.height:0},$={x:N.left,y:N.top};return V.x&&V.y?$:subtract($,V)}}}};function Ut(e,t){return!ht(e)||!ht(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Gn(e,t){return!ht(e)||!ht(t)||!Ut(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}},24285:function(fn,Le,ae){ae.r(Le),ae.d(Le,{CSS:function(){return pt},add:function(){return Ot},canUseDOM:function(){return v},findFirstFocusableNode:function(){return Vt},getEventCoordinates:function(){return It},getOwnerDocument:function(){return se},getWindow:function(){return ye},hasViewportRelativeCoordinates:function(){return Dt},isDocument:function(){return K},isHTMLElement:function(){return we},isKeyboardEvent:function(){return xt},isNode:function(){return Ue},isSVGElement:function(){return xe},isTouchEvent:function(){return vt},isWindow:function(){return De},subtract:function(){return lt},useCombinedRefs:function(){return ge},useEvent:function(){return F},useInterval:function(){return ce},useIsomorphicLayoutEffect:function(){return k},useLatestValue:function(){return _e},useLazyMemo:function(){return Se},useNodeRef:function(){return je},usePrevious:function(){return Rt},useUniqueId:function(){return Oe}});var l=ae(67294);function ge(){for(var d=arguments.length,w=new Array(d),C=0;C<d;C++)w[C]=arguments[C];return(0,l.useMemo)(()=>D=>{w.forEach(M=>M(D))},w)}const v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function De(d){const w=Object.prototype.toString.call(d);return w==="[object Window]"||w==="[object global]"}function Ue(d){return"nodeType"in d}function ye(d){var w,C;return d?De(d)?d:Ue(d)&&(w=(C=d.ownerDocument)==null?void 0:C.defaultView)!=null?w:window:window}function K(d){const{Document:w}=ye(d);return d instanceof w}function we(d){return De(d)?!1:d instanceof ye(d).HTMLElement}function xe(d){return d instanceof ye(d).SVGElement}function se(d){return d?De(d)?d.document:Ue(d)?K(d)?d:we(d)||xe(d)?d.ownerDocument:document:document:document}const k=v?l.useLayoutEffect:l.useEffect;function F(d){const w=(0,l.useRef)(d);return k(()=>{w.current=d}),(0,l.useCallback)(function(){for(var C=arguments.length,D=new Array(C),M=0;M<C;M++)D[M]=arguments[M];return w.current==null?void 0:w.current(...D)},[])}function ce(){const d=(0,l.useRef)(null),w=(0,l.useCallback)((D,M)=>{d.current=setInterval(D,M)},[]),C=(0,l.useCallback)(()=>{d.current!==null&&(clearInterval(d.current),d.current=null)},[]);return[w,C]}function _e(d,w){w===void 0&&(w=[d]);const C=(0,l.useRef)(d);return k(()=>{C.current!==d&&(C.current=d)},w),C}function Se(d,w){const C=(0,l.useRef)();return(0,l.useMemo)(()=>{const D=d(C.current);return C.current=D,D},[...w])}function je(d){const w=F(d),C=(0,l.useRef)(null),D=(0,l.useCallback)(M=>{M!==C.current&&(w==null||w(M,C.current)),C.current=M},[]);return[C,D]}function Rt(d){const w=(0,l.useRef)();return(0,l.useEffect)(()=>{w.current=d},[d]),w.current}let et={};function Oe(d,w){return(0,l.useMemo)(()=>{if(w)return w;const C=et[d]==null?0:et[d]+1;return et[d]=C,d+"-"+C},[d,w])}function Xe(d){return function(w){for(var C=arguments.length,D=new Array(C>1?C-1:0),M=1;M<C;M++)D[M-1]=arguments[M];return D.reduce((T,U)=>{const he=Object.entries(U);for(const[W,Y]of he){const ve=T[W];ve!=null&&(T[W]=ve+d*Y)}return T},{...w})}}const Ot=Xe(1),lt=Xe(-1);function Dt(d){return"clientX"in d&&"clientY"in d}function xt(d){if(!d)return!1;const{KeyboardEvent:w}=ye(d.target);return w&&d instanceof w}function vt(d){if(!d)return!1;const{TouchEvent:w}=ye(d.target);return w&&d instanceof w}function It(d){if(vt(d)){if(d.touches&&d.touches.length){const{clientX:w,clientY:C}=d.touches[0];return{x:w,y:C}}else if(d.changedTouches&&d.changedTouches.length){const{clientX:w,clientY:C}=d.changedTouches[0];return{x:w,y:C}}}return Dt(d)?{x:d.clientX,y:d.clientY}:null}const pt=Object.freeze({Translate:{toString(d){if(!d)return;const{x:w,y:C}=d;return"translate3d("+(w?Math.round(w):0)+"px, "+(C?Math.round(C):0)+"px, 0)"}},Scale:{toString(d){if(!d)return;const{scaleX:w,scaleY:C}=d;return"scaleX("+w+") scaleY("+C+")"}},Transform:{toString(d){if(d)return[pt.Translate.toString(d),pt.Scale.toString(d)].join(" ")}},Transition:{toString(d){let{property:w,duration:C,easing:D}=d;return w+" "+C+"ms "+D}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Vt(d){return d.matches(Tt)?d:d.querySelector(Tt)}},36905:function(fn,Le,ae){ae.r(Le),ae.d(Le,{SortableContext:function(){return et},arrayMove:function(){return De},arraySwap:function(){return Ue},defaultAnimateLayoutChanges:function(){return Ot},defaultNewIndexGetter:function(){return Xe},horizontalListSortingStrategy:function(){return xe},rectSortingStrategy:function(){return k},rectSwappingStrategy:function(){return F},sortableKeyboardCoordinates:function(){return Vt},useSortable:function(){return pt},verticalListSortingStrategy:function(){return _e}});var l=ae(67294),ge=ae(94697),v=ae(24285);function De(d,w,C){const D=d.slice();return D.splice(C<0?D.length+C:C,0,D.splice(w,1)[0]),D}function Ue(d,w,C){const D=d.slice();return D[w]=d[C],D[C]=d[w],D}function ye(d,w){return d.reduce((C,D,M)=>{const T=w.get(D);return T&&(C[M]=T),C},Array(d.length))}function K(d){return d!==null&&d>=0}const we={scaleX:1,scaleY:1},xe=({rects:d,activeNodeRect:w,activeIndex:C,overIndex:D,index:M})=>{var T;const U=(T=d[C])!=null?T:w;if(!U)return null;const he=se(d,M,C);if(M===C){const W=d[D];return W?{x:C<D?W.left+W.width-(U.left+U.width):W.left-U.left,y:0,...we}:null}return M>C&&M<=D?{x:-U.width-he,y:0,...we}:M<C&&M>=D?{x:U.width+he,y:0,...we}:{x:0,y:0,...we}};function se(d,w,C){const D=d[w],M=d[w-1],T=d[w+1];return!D||!M&&!T?0:C<w?M?D.left-(M.left+M.width):T.left-(D.left+D.width):T?T.left-(D.left+D.width):D.left-(M.left+M.width)}const k=({rects:d,activeIndex:w,overIndex:C,index:D})=>{const M=De(d,C,w),T=d[D],U=M[D];return!U||!T?null:{x:U.left-T.left,y:U.top-T.top,scaleX:U.width/T.width,scaleY:U.height/T.height}},F=({activeIndex:d,index:w,rects:C,overIndex:D})=>{let M,T;return w===d&&(M=C[w],T=C[D]),w===D&&(M=C[w],T=C[d]),!T||!M?null:{x:T.left-M.left,y:T.top-M.top,scaleX:T.width/M.width,scaleY:T.height/M.height}},ce={scaleX:1,scaleY:1},_e=({activeIndex:d,activeNodeRect:w,index:C,rects:D,overIndex:M})=>{var T;const U=(T=D[d])!=null?T:w;if(!U)return null;if(C===d){const W=D[M];return W?{x:0,y:d<M?W.top+W.height-(U.top+U.height):W.top-U.top,...ce}:null}const he=Se(D,C,d);return C>d&&C<=M?{x:0,y:-U.height-he,...ce}:C<d&&C>=M?{x:0,y:U.height+he,...ce}:{x:0,y:0,...ce}};function Se(d,w,C){const D=d[w],M=d[w-1],T=d[w+1];return D?C<w?M?D.top-(M.top+M.height):T?T.top-(D.top+D.height):0:T?T.top-(D.top+D.height):M?D.top-(M.top+M.height):0:0}const je="Sortable",Rt=l.createContext({activeIndex:-1,containerId:je,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:k});function et({children:d,id:w,items:C,strategy:D=k}){const{active:M,dragOverlay:T,droppableRects:U,over:he,measureDroppableContainers:W,measuringScheduled:Y}=(0,ge.useDndContext)(),ve=(0,v.useUniqueId)(je,w),ze=T.rect!==null,Ee=(0,l.useMemo)(()=>C.map(tt=>typeof tt=="string"?tt:tt.id),[C]),Ye=M!=null,Ie=M?Ee.indexOf(M.id):-1,$e=he?Ee.indexOf(he.id):-1,He=(0,l.useRef)(Ee),ee=!Oe(Ee,He.current),Je=$e!==-1&&Ie===-1||ee;(0,v.useIsomorphicLayoutEffect)(()=>{ee&&Ye&&!Y&&W(Ee)},[ee,Ee,Ye,W,Y]),(0,l.useEffect)(()=>{He.current=Ee},[Ee]);const Ve=(0,l.useMemo)(()=>({activeIndex:Ie,containerId:ve,disableTransforms:Je,items:Ee,overIndex:$e,useDragOverlay:ze,sortedRects:ye(Ee,U),strategy:D}),[Ie,ve,Je,Ee,$e,U,ze,D]);return l.createElement(Rt.Provider,{value:Ve},d)}function Oe(d,w){return d.join()===w.join()}const Xe=({id:d,items:w,activeIndex:C,overIndex:D})=>De(w,C,D).indexOf(d),Ot=({containerId:d,isSorting:w,wasDragging:C,index:D,items:M,newIndex:T,previousItems:U,previousContainerId:he,transition:W})=>!W||!C||U!==M&&D===T?!1:w?!0:T!==D&&d===he,lt={duration:200,easing:"ease"},Dt="transform",xt=v.CSS.Transition.toString({property:Dt,duration:0,easing:"linear"}),vt={roleDescription:"sortable"};function It({disabled:d,index:w,node:C,rect:D}){const[M,T]=(0,l.useState)(null),U=(0,l.useRef)(w);return(0,v.useIsomorphicLayoutEffect)(()=>{if(!d&&w!==U.current&&C.current){const he=D.current;if(he){const W=(0,ge.getClientRect)(C.current,{ignoreTransform:!0}),Y={x:he.left-W.left,y:he.top-W.top,scaleX:he.width/W.width,scaleY:he.height/W.height};(Y.x||Y.y)&&T(Y)}}w!==U.current&&(U.current=w)},[d,w,C,D]),(0,l.useEffect)(()=>{M&&requestAnimationFrame(()=>{T(null)})},[M]),M}function pt({animateLayoutChanges:d=Ot,attributes:w,disabled:C,data:D,getNewIndex:M=Xe,id:T,strategy:U,resizeObserverConfig:he,transition:W=lt}){const{items:Y,containerId:ve,activeIndex:ze,disableTransforms:Ee,sortedRects:Ye,overIndex:Ie,useDragOverlay:$e,strategy:He}=(0,l.useContext)(Rt),ee=Y.indexOf(T),Je=(0,l.useMemo)(()=>({sortable:{containerId:ve,index:ee,items:Y},...D}),[ve,D,ee,Y]),Ve=(0,l.useMemo)(()=>Y.slice(Y.indexOf(T)),[Y,T]),{rect:tt,node:Gt,isOver:gn,setNodeRef:Lt}=(0,ge.useDroppable)({id:T,data:Je,resizeObserverConfig:{updateMeasurementsFor:Ve,...he}}),{active:bt,activatorEvent:qt,activeNodeRect:Jt,attributes:hn,setNodeRef:St,listeners:nt,isDragging:Qe,over:rt,transform:Pe}=(0,ge.useDraggable)({id:T,data:Je,attributes:{...vt,...w},disabled:C}),Qt=(0,v.useCombinedRefs)(Lt,St),ut=!!bt,H=ut&&!Ee&&K(ze)&&K(Ie),dt=!$e&&Qe,Pt=dt&&H?Pe:null,Zt=H?Pt??(U??He)({rects:Ye,activeNodeRect:Jt,activeIndex:ze,overIndex:Ie,index:ee}):null,ot=K(ze)&&K(Ie)?M({id:T,items:Y,activeIndex:ze,overIndex:Ie}):ee,ft=bt==null?void 0:bt.id,Ae=(0,l.useRef)({activeId:ft,items:Y,newIndex:ot,containerId:ve}),en=Y!==Ae.current.items,tn=d({active:bt,containerId:ve,isDragging:Qe,isSorting:ut,id:T,index:ee,items:Y,newIndex:Ae.current.newIndex,previousItems:Ae.current.items,previousContainerId:Ae.current.containerId,transition:W,wasDragging:Ae.current.activeId!=null}),mt=It({disabled:!tn,index:ee,node:Gt,rect:tt});return(0,l.useEffect)(()=>{ut&&Ae.current.newIndex!==ot&&(Ae.current.newIndex=ot),ve!==Ae.current.containerId&&(Ae.current.containerId=ve),Y!==Ae.current.items&&(Ae.current.items=Y),ft!==Ae.current.activeId&&(Ae.current.activeId=ft)},[ft,ut,ot,ve,Y]),{active:bt,activeIndex:ze,attributes:hn,rect:tt,index:ee,newIndex:ot,items:Y,isOver:gn,isSorting:ut,isDragging:Qe,listeners:nt,node:Gt,overIndex:Ie,over:rt,setNodeRef:Qt,setDroppableNodeRef:Lt,setDraggableNodeRef:St,transform:mt??Zt,transition:pn()};function pn(){if(mt||en&&Ae.current.newIndex===ee)return xt;if(!(dt&&!(0,v.isKeyboardEvent)(qt)||!W)&&(ut||tn))return v.CSS.Transition.toString({...W,property:Dt})}}const Tt=[ge.KeyboardCode.Down,ge.KeyboardCode.Right,ge.KeyboardCode.Up,ge.KeyboardCode.Left],Vt=(d,{context:{active:w,droppableContainers:C,collisionRect:D,scrollableAncestors:M}})=>{if(Tt.includes(d.code)){if(d.preventDefault(),!w||!D)return;const T=[];C.getEnabled().forEach(W=>{if(!W||W!=null&&W.disabled)return;const Y=W==null?void 0:W.rect.current;if(Y)switch(d.code){case ge.KeyboardCode.Down:D.top+D.height<=Y.top&&T.push(W);break;case ge.KeyboardCode.Up:D.top>=Y.top+Y.height&&T.push(W);break;case ge.KeyboardCode.Left:D.left>=Y.left+Y.width&&T.push(W);break;case ge.KeyboardCode.Right:D.left+D.width<=Y.left&&T.push(W);break}});const U=(0,ge.closestCorners)({active:w,collisionRect:D,droppableContainers:T,pointerCoordinates:null}),he=(0,ge.getFirstCollision)(U,"id");if(he!=null){const W=C.get(he),Y=W==null?void 0:W.node.current,ve=W==null?void 0:W.rect.current;if(Y&&ve){const Ye=(0,ge.getScrollableAncestors)(Y).some(($e,He)=>M[He]!==$e)?{x:0,y:0}:{x:D.width-ve.width,y:D.height-ve.height};return{x:ve.left-Ye.x,y:ve.top-Ye.y}}}}}}}]);
|