@zoom/meetingsdk
Version:
Zoom MeetingSDK-Web Client
2 lines • 5.63 MB
JavaScript
/*! For license information please see zoomus-websdk-main-client.umd.min.js.LICENSE.txt */
(self.webpackChunk_zoom_webclientjs=self.webpackChunk_zoom_webclientjs||[]).push([[2640],{19251:(e,t,n)=>{"use strict";n.d(t,{Aw:()=>a,L4:()=>s,bO:()=>l});var r=n(31099),o=n.n(r);const i={display:"none"};function a(e){let{id:t,value:n}=e;return o().createElement("div",{id:t,style:i},n)}function s(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return o().createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}function l(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}},15871:(e,t,n)=>{"use strict";n.d(t,{AN:()=>re,FR:()=>h,Hd:()=>ot,IG:()=>se,MS:()=>m,Mp:()=>Ue,PM:()=>Ve,Sj:()=>O,fF:()=>$e,vL:()=>Z,zM:()=>Ge});var r=n(31099),o=n.n(r),i=n(40961),a=n(74979),s=n(19251);const l=(0,r.createContext)(null);const c={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},u={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 d(e){let{announcements:t=u,container:n,hiddenTextDescribedById:d,screenReaderInstructions:f=c}=e;const{announce:p,announcement:m}=(0,s.bO)(),h=(0,a.YG)("DndLiveRegion"),[g,v]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{v(!0)}),[]),function(e){const t=(0,r.useContext)(l);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;p(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&p(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;p(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;p(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;p(t.onDragCancel({active:n,over:r}))}})),[p,t])),!g)return null;const y=o().createElement(o().Fragment,null,o().createElement(s.Aw,{id:d,value:f.draggable}),o().createElement(s.L4,{id:h,announcement:m}));return n?(0,i.createPortal)(y,n):y}var f;function p(){}function m(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(f||(f={}));const g=Object.freeze({x:0,y:0});function v(e,t){const n=(0,a.e_)(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function y(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function b(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*s;return Number((o/(n+r-o)).toFixed(4))}return 0}const w=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:e}=i,r=n.get(e);if(r){const n=b(r,t);n>0&&o.push({id:e,data:{droppableContainer:i,value:n}})}}return o.sort(y)};function S(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:g}function E(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const A=E(1);function C(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const _={ignoreTransform:!1};function O(e,t){void 0===t&&(t=_);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,a.zk)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=C(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,l=e.left-a-(1-o)*parseFloat(n),c=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,r))}const{top:r,left:o,width:i,height:s,bottom:l,right:c}=n;return{top:r,left:o,width:i,height:s,bottom:l,right:c}}function T(e){return O(e,{ignoreTransform:!0})}function I(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,a.wz)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,a.sb)(o)||(0,a.xZ)(o))return n;if(n.includes(o))return n;const i=(0,a.zk)(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=(0,a.zk)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"===typeof r&&n.test(r)}))}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=(0,a.zk)(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function N(e){const[t]=I(e,1);return null!=t?t:null}function P(e){return a.Sw&&e?(0,a.l6)(e)?e:(0,a.Ll)(e)?(0,a.wz)(e)||e===(0,a.TW)(e).scrollingElement?window:(0,a.sb)(e)?e:null:null:null}function R(e){return(0,a.l6)(e)?e.scrollX:e.scrollLeft}function x(e){return(0,a.l6)(e)?e.scrollY:e.scrollTop}function k(e){return{x:R(e),y:x(e)}}var L;function M(e){return!(!a.Sw||!e)&&e===document.scrollingElement}function D(e){const t={x:0,y:0},n=M(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(L||(L={}));const j={x:.2,y:.2};function U(e,t,n,r,o){let{top:i,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=j);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=D(e),p={x:0,y:0},m={x:0,y:0},h=t.height*o.y,g=t.width*o.x;return!c&&i<=t.top+h?(p.y=L.Backward,m.y=r*Math.abs((t.top+h-i)/h)):!u&&l>=t.bottom-h&&(p.y=L.Forward,m.y=r*Math.abs((t.bottom-h-l)/h)),!f&&s>=t.right-g?(p.x=L.Forward,m.x=r*Math.abs((t.right-g-s)/g)):!d&&a<=t.left+g&&(p.x=L.Backward,m.x=r*Math.abs((t.left+g-a)/g)),{direction:p,speed:m}}function B(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function F(e){return e.reduce(((e,t)=>(0,a.WQ)(e,k(t))),g)}function H(e,t){if(void 0===t&&(t=O),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);N(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const V=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+R(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+x(t)),0)}]];class ${constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=I(t),r=F(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[o,i,a]of V)for(const e of i)Object.defineProperty(this,e,{get:()=>{const t=a(n),i=r[o]-t;return this.rect[e]+i},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class z{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function W(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"===typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var G,Z;function q(e){e.preventDefault()}function K(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(G||(G={})),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"}(Z||(Z={}));const Y={start:[Z.Space,Z.Enter],cancel:[Z.Esc],end:[Z.Space,Z.Enter,Z.Tab]},Q=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Z.Right:return{...n,x:n.x+25};case Z.Left:return{...n,x:n.x-25};case Z.Down:return{...n,y:n.y+25};case Z.Up:return{...n,y:n.y-25}}};class X{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new z((0,a.TW)(t)),this.windowListeners=new z((0,a.zk)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(G.Resize,this.handleCancel),this.windowListeners.add(G.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(G.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&H(n),t(g)}handleKeyDown(e){if((0,a.kx)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=Y,coordinateGetter:i=Q,scrollBehavior:s="smooth"}=r,{code:l}=e;if(o.end.includes(l))return void this.handleEnd(e);if(o.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:g;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=(0,a.Re)(d,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:l,isBottom:c,maxScroll:u,minScroll:f}=D(n),p=B(n),m={x:Math.min(o===Z.Right?p.right-p.width/2:p.right,Math.max(o===Z.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(o===Z.Down?p.bottom-p.height/2:p.bottom,Math.max(o===Z.Down?p.top:p.top+p.height/2,d.y))},h=o===Z.Right&&!a||o===Z.Left&&!l,g=o===Z.Down&&!c||o===Z.Up&&!i;if(h&&m.x!==d.x){const e=n.scrollLeft+t.x,i=o===Z.Right&&e<=u.x||o===Z.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:s});r.x=i?n.scrollLeft-e:o===Z.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:s});break}if(g&&m.y!==d.y){const e=n.scrollTop+t.y,i=o===Z.Down&&e<=u.y||o===Z.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:s});r.y=i?n.scrollTop-e:o===Z.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:s});break}}this.handleMove(e,(0,a.WQ)((0,a.Re)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function J(e){return Boolean(e&&"distance"in e)}function ee(e){return Boolean(e&&"delay"in e)}X.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Y,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class te{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,a.zk)(e);return e instanceof t?e:(0,a.TW)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=(0,a.TW)(i),this.documentListeners=new z(this.document),this.listeners=new z(n),this.windowListeners=new z((0,a.zk)(i)),this.initialCoordinates=null!=(r=(0,a.e_)(o))?r:g,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(G.Resize,this.handleCancel),this.windowListeners.add(G.DragStart,q),this.windowListeners.add(G.VisibilityChange,this.handleCancel),this.windowListeners.add(G.ContextMenu,q),this.documentListeners.add(G.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ee(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(J(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(G.Click,K,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(G.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:s}}=o;if(!r)return;const l=null!=(t=(0,a.e_)(e))?t:g,c=(0,a.Re)(r,l);if(!n&&s){if(J(s)){if(null!=s.tolerance&&W(c,s.tolerance))return this.handleCancel();if(W(c,s.distance))return this.handleStart()}return ee(s)&&W(c,s.tolerance)?this.handleCancel():void this.handlePending(s,c)}e.cancelable&&e.preventDefault(),i(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Z.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const ne={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class re extends te{constructor(e){const{event:t}=e,n=(0,a.TW)(t.target);super(e,ne,n)}}re.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const oe={move:{name:"mousemove"},end:{name:"mouseup"}};var ie;!function(e){e[e.RightClick=2]="RightClick"}(ie||(ie={}));(class extends te{constructor(e){super(e,oe,(0,a.TW)(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ie.RightClick&&(null==r||r({event:n}),!0)}}];const ae={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class se extends te{constructor(e){super(e,ae)}static setup(){return window.addEventListener(ae.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ae.move.name,e)};function e(){}}}var le,ce;function ue(e){let{acceleration:t,activator:n=le.Pointer,canScroll:o,draggingRect:i,enabled:s,interval:l=5,order:c=ce.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:f,delta:p,threshold:m}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=(0,a.ZC)(t);return(0,a.KG)((e=>{if(n||!r||!e)return de;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[L.Backward]:e.x[L.Backward]||-1===o.x,[L.Forward]:e.x[L.Forward]||1===o.x},y:{[L.Backward]:e.y[L.Backward]||-1===o.y,[L.Forward]:e.y[L.Forward]||1===o.y}}}),[n,t,r])}({delta:p,disabled:!s}),[g,v]=(0,a.$$)(),y=(0,r.useRef)({x:0,y:0}),b=(0,r.useRef)({x:0,y:0}),w=(0,r.useMemo)((()=>{switch(n){case le.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case le.DraggableRect:return i}}),[n,i,u]),S=(0,r.useRef)(null),E=(0,r.useCallback)((()=>{const e=S.current;if(!e)return;const t=y.current.x*b.current.x,n=y.current.y*b.current.y;e.scrollBy(t,n)}),[]),A=(0,r.useMemo)((()=>c===ce.TreeOrder?[...d].reverse():d),[c,d]);(0,r.useEffect)((()=>{if(s&&d.length&&w){for(const e of A){if(!1===(null==o?void 0:o(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:a}=U(e,r,w,t,m);for(const e of["x","y"])h[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return v(),S.current=e,g(E,l),y.current=a,void(b.current=i)}y.current={x:0,y:0},b.current={x:0,y:0},v()}else v()}),[t,E,o,v,s,l,JSON.stringify(w),JSON.stringify(h),g,d,A,f,JSON.stringify(m)])}se.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(le||(le={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(ce||(ce={}));const de={x:{[L.Backward]:!1,[L.Forward]:!1},y:{[L.Backward]:!1,[L.Forward]:!1}};var fe,pe;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(fe||(fe={})),function(e){e.Optimized="optimized"}(pe||(pe={}));const me=new Map;function he(e,t){return(0,a.KG)((n=>e?n||("function"===typeof t?t(e):e):null),[t,e])}function ge(e){let{callback:t,disabled:n}=e;const o=(0,a._q)(t),i=(0,r.useMemo)((()=>{if(n||"undefined"===typeof window||"undefined"===typeof window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return(0,r.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function ve(e){return new $(O(e),e)}function ye(e,t,n){void 0===t&&(t=ve);const[o,i]=(0,r.useState)(null);function s(){i((r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}))}const l=function(e){let{callback:t,disabled:n}=e;const o=(0,a._q)(t),i=(0,r.useMemo)((()=>{if(n||"undefined"===typeof window||"undefined"===typeof window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return(0,r.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){s();break}}}}),c=ge({callback:s});return(0,a.Es)((()=>{s(),e?(null==c||c.observe(e),null==l||l.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==l||l.disconnect())}),[e]),o}const be=[];function we(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==g;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,a.Re)(e,n.current):g}function Se(e){return(0,r.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Ee=[];function Ae(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,a.sb)(t)?t:e}const Ce=[{sensor:re,options:{}},{sensor:X,options:{}}],_e={current:{}},Oe={draggable:{measure:T},droppable:{measure:T,strategy:fe.WhileDragging,frequency:pe.Optimized},dragOverlay:{measure:O}};class Te extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ie={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Te,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:p},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Oe,measureDroppableContainers:p,windowRect:null,measuringScheduled:!1},Ne={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:p,draggableNodes:new Map,over:null,measureDroppableContainers:p},Pe=(0,r.createContext)(Ne),Re=(0,r.createContext)(Ie);function xe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Te}}}function ke(e,t){switch(t.type){case f.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case f.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case f.DragEnd:case f.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case f.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Te(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case f.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Te(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case f.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Te(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Le(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=(0,r.useContext)(Pe),s=(0,a.ZC)(o),l=(0,a.ZC)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!o&&s&&null!=l){if(!(0,a.kx)(s))return;if(document.activeElement===s.target)return;const e=i.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,a.ag)(e);if(t){t.focus();break}}}))}}),[o,t,i,l,s]),null}function Me(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const De=(0,r.createContext)({...g,scaleX:1,scaleY:1});var je;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(je||(je={}));const Ue=(0,r.memo)((function(e){var t,n,s,c;let{id:u,accessibility:p,autoScroll:m=!0,children:h,sensors:v=Ce,collisionDetection:y=w,measuring:b,modifiers:E,...C}=e;const _=(0,r.useReducer)(ke,void 0,xe),[T,R]=_,[x,L]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[D,j]=(0,r.useState)(je.Uninitialized),U=D===je.Initialized,{draggable:{active:B,nodes:H,translate:V},droppable:{containers:z}}=T,W=null!=B?H.get(B):null,G=(0,r.useRef)({initial:null,translated:null}),Z=(0,r.useMemo)((()=>{var e;return null!=B?{id:B,data:null!=(e=null==W?void 0:W.data)?e:_e,rect:G}:null}),[B,W]),q=(0,r.useRef)(null),[K,Y]=(0,r.useState)(null),[Q,X]=(0,r.useState)(null),J=(0,a.YN)(C,Object.values(C)),ee=(0,a.YG)("DndDescribedBy",u),te=(0,r.useMemo)((()=>z.getEnabled()),[z]),ne=(re=b,(0,r.useMemo)((()=>({draggable:{...Oe.draggable,...null==re?void 0:re.draggable},droppable:{...Oe.droppable,...null==re?void 0:re.droppable},dragOverlay:{...Oe.dragOverlay,...null==re?void 0:re.dragOverlay}})),[null==re?void 0:re.draggable,null==re?void 0:re.droppable,null==re?void 0:re.dragOverlay]));var re;const{droppableRects:oe,measureDroppableContainers:ie,measuringScheduled:ae}=function(e,t){let{dragging:n,dependencies:o,config:i}=t;const[s,l]=(0,r.useState)(null),{frequency:c,measure:u,strategy:d}=i,f=(0,r.useRef)(e),p=function(){switch(d){case fe.Always:return!1;case fe.BeforeDragging:return n;default:return!n}}(),m=(0,a.YN)(p),h=(0,r.useCallback)((function(e){void 0===e&&(e=[]),m.current||l((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[m]),g=(0,r.useRef)(null),v=(0,a.KG)((t=>{if(p&&!n)return me;if(!t||t===me||f.current!==e||null!=s){const t=new Map;for(let n of e){if(!n)continue;if(s&&s.length>0&&!s.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new $(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,s,n,p,u]);return(0,r.useEffect)((()=>{f.current=e}),[e]),(0,r.useEffect)((()=>{p||h()}),[n,p]),(0,r.useEffect)((()=>{s&&s.length>0&&l(null)}),[JSON.stringify(s)]),(0,r.useEffect)((()=>{p||"number"!==typeof c||null!==g.current||(g.current=setTimeout((()=>{h(),g.current=null}),c))}),[c,p,h,...o]),{droppableRects:v,measureDroppableContainers:h,measuringScheduled:null!=s}}(te,{dragging:U,dependencies:[V.x,V.y],config:ne.droppable}),se=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return(0,a.KG)((e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(H,B),le=(0,r.useMemo)((()=>Q?(0,a.e_)(Q):null),[Q]),ce=function(){const e=!1===(null==K?void 0:K.autoScrollEnabled),t="object"===typeof m?!1===m.enabled:!1===m,n=U&&!e&&!t;if("object"===typeof m)return{...m,enabled:n};return{enabled:n}}(),de=function(e,t){return he(e,t)}(se,ne.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const s=(0,r.useRef)(!1),{x:l,y:c}="boolean"===typeof i?{x:i,y:i}:i;(0,a.Es)((()=>{if(!l&&!c||!t)return void(s.current=!1);if(s.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=S(n(e),o);if(l||(r.x=0),c||(r.y=0),s.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=N(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,l,c,o,n])}({activeNode:null!=B?H.get(B):null,config:ce.layoutShiftCompensation,initialRect:de,measure:ne.draggable.measure});const pe=ye(se,ne.draggable.measure,de),ve=ye(se?se.parentElement:null),Te=(0,r.useRef)({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:oe,draggableNodes:H,draggingNode:null,draggingNodeRect:null,droppableContainers:z,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ie=z.getNodeFor(null==(t=Te.current.over)?void 0:t.id),Ne=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),i=ge({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,a.sb)(n)){o((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),s=(0,r.useCallback)((e=>{const n=Ae(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),o(n?t(n):null)}),[t,i]),[l,c]=(0,a.lk)(s);return(0,r.useMemo)((()=>({nodeRef:l,rect:n,setRef:c})),[n,l,c])}({measure:ne.dragOverlay.measure}),Ue=null!=(n=Ne.nodeRef.current)?n:se,Be=U?null!=(s=Ne.rect)?s:pe:null,Fe=Boolean(Ne.nodeRef.current&&Ne.rect),He=S(Ve=Fe?null:pe,he(Ve));var Ve;const $e=Se(Ue?(0,a.zk)(Ue):null),ze=function(e){const t=(0,r.useRef)(e),n=(0,a.KG)((n=>e?n&&n!==be&&e&&t.current&&e.parentNode===t.current.parentNode?n:I(e):be),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(U?null!=Ie?Ie:se:null),We=function(e,t){void 0===t&&(t=O);const[n]=e,o=Se(n?(0,a.zk)(n):null),[i,s]=(0,r.useState)(Ee);function l(){s((()=>e.length?e.map((e=>M(e)?o:new $(t(e),e))):Ee))}const c=ge({callback:l});return(0,a.Es)((()=>{null==c||c.disconnect(),l(),e.forEach((e=>null==c?void 0:c.observe(e)))}),[e]),i}(ze),Ge=Me(E,{transform:{x:V.x-He.x,y:V.y-He.y,scaleX:1,scaleY:1},activatorEvent:Q,active:Z,activeNodeRect:pe,containerNodeRect:ve,draggingNodeRect:Be,over:Te.current.over,overlayNodeRect:Ne.rect,scrollableAncestors:ze,scrollableAncestorRects:We,windowRect:$e}),Ze=le?(0,a.WQ)(le,V):null,qe=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),i=(0,r.useCallback)((e=>{const t=P(e.target);t&&n((e=>e?(e.set(t,k(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=o.current;if(e!==t){r(t);const a=e.map((e=>{const t=P(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,k(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=P(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,a.WQ)(e,t)),g):F(e):g),[e,t])}(ze),Ke=we(qe),Ye=we(qe,[pe]),Qe=(0,a.WQ)(Ge,Ke),Xe=Be?A(Be,Ge):null,Je=Z&&Xe?y({active:Z,collisionRect:Xe,droppableRects:oe,droppableContainers:te,pointerCoordinates:Ze}):null,et=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(Je,"id"),[tt,nt]=(0,r.useState)(null),rt=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Fe?Ge:(0,a.WQ)(Ge,Ye),null!=(c=null==tt?void 0:tt.rect)?c:null,pe),ot=(0,r.useRef)(null),it=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==q.current)return;const o=H.get(q.current);if(!o)return;const a=e.nativeEvent,s=new n({active:q.current,activeNode:o,event:a,options:r,context:Te,onAbort(e){if(!H.get(e))return;const{onDragAbort:t}=J.current,n={id:e};null==t||t(n),x({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!H.get(e))return;const{onDragPending:o}=J.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),x({type:"onDragPending",event:i})},onStart(e){const t=q.current;if(null==t)return;const n=H.get(t);if(!n)return;const{onDragStart:r}=J.current,o={activatorEvent:a,active:{id:t,data:n.data,rect:G}};(0,i.unstable_batchedUpdates)((()=>{null==r||r(o),j(je.Initializing),R({type:f.DragStart,initialCoordinates:e,active:t}),x({type:"onDragStart",event:o}),Y(ot.current),X(a)}))},onMove(e){R({type:f.DragMove,coordinates:e})},onEnd:l(f.DragEnd),onCancel:l(f.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=Te.current;let s=null;if(t&&o){const{cancelDrop:i}=J.current;if(s={activatorEvent:a,active:t,collisions:n,delta:o,over:r},e===f.DragEnd&&"function"===typeof i){await Promise.resolve(i(s))&&(e=f.DragCancel)}}q.current=null,(0,i.unstable_batchedUpdates)((()=>{R({type:e}),j(je.Uninitialized),nt(null),Y(null),X(null),ot.current=null;const t=e===f.DragEnd?"onDragEnd":"onDragCancel";if(s){const e=J.current[t];null==e||e(s),x({type:t,event:s})}}))}}ot.current=s}),[H]),at=(0,r.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=H.get(r);if(null!==q.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},q.current=r,it(n,t))}),[H,it]),st=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(v,at);!function(e){(0,r.useEffect)((()=>{if(!a.Sw)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(v),(0,a.Es)((()=>{pe&&D===je.Initializing&&j(je.Initialized)}),[pe,D]),(0,r.useEffect)((()=>{const{onDragMove:e}=J.current,{active:t,activatorEvent:n,collisions:r,over:o}=Te.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:Qe.x,y:Qe.y},over:o};(0,i.unstable_batchedUpdates)((()=>{null==e||e(a),x({type:"onDragMove",event:a})}))}),[Qe.x,Qe.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=Te.current;if(!e||null==q.current||!t||!o)return;const{onDragOver:a}=J.current,s=r.get(et),l=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:l};(0,i.unstable_batchedUpdates)((()=>{nt(l),null==a||a(c),x({type:"onDragOver",event:c})}))}),[et]),(0,a.Es)((()=>{Te.current={activatorEvent:Q,active:Z,activeNode:se,collisionRect:Xe,collisions:Je,droppableRects:oe,draggableNodes:H,draggingNode:Ue,draggingNodeRect:Be,droppableContainers:z,over:tt,scrollableAncestors:ze,scrollAdjustedTranslate:Qe},G.current={initial:Be,translated:Xe}}),[Z,se,Je,Xe,H,Ue,Be,oe,z,tt,ze,Qe]),ue({...ce,delta:V,draggingRect:Xe,pointerCoordinates:Ze,scrollableAncestors:ze,scrollableAncestorRects:We});const lt=(0,r.useMemo)((()=>({active:Z,activeNode:se,activeNodeRect:pe,activatorEvent:Q,collisions:Je,containerNodeRect:ve,dragOverlay:Ne,draggableNodes:H,droppableContainers:z,droppableRects:oe,over:tt,measureDroppableContainers:ie,scrollableAncestors:ze,scrollableAncestorRects:We,measuringConfiguration:ne,measuringScheduled:ae,windowRect:$e})),[Z,se,pe,Q,Je,ve,Ne,H,z,oe,tt,ie,ze,We,ne,ae,$e]),ct=(0,r.useMemo)((()=>({activatorEvent:Q,activators:st,active:Z,activeNodeRect:pe,ariaDescribedById:{draggable:ee},dispatch:R,draggableNodes:H,over:tt,measureDroppableContainers:ie})),[Q,st,Z,pe,R,ee,H,tt,ie]);return o().createElement(l.Provider,{value:L},o().createElement(Pe.Provider,{value:ct},o().createElement(Re.Provider,{value:lt},o().createElement(De.Provider,{value:rt},h)),o().createElement(Le,{disabled:!1===(null==p?void 0:p.restoreFocus)})),o().createElement(d,{...p,hiddenTextDescribedById:ee}))})),Be=(0,r.createContext)(null),Fe="button",He="Draggable";function Ve(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const s=(0,a.YG)(He),{activators:l,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:f,draggableNodes:p,over:m}=(0,r.useContext)(Pe),{role:h=Fe,roleDescription:g="draggable",tabIndex:v=0}=null!=i?i:{},y=(null==u?void 0:u.id)===t,b=(0,r.useContext)(y?De:Be),[w,S]=(0,a.lk)(),[E,A]=(0,a.lk)(),C=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(l,t),_=(0,a.YN)(n);(0,a.Es)((()=>(p.set(t,{id:t,key:s,node:w,activatorNode:E,data:_}),()=>{const e=p.get(t);e&&e.key===s&&p.delete(t)})),[p,t]);return{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,r.useMemo)((()=>({role:h,tabIndex:v,"aria-disabled":o,"aria-pressed":!(!y||h!==Fe)||void 0,"aria-roledescription":g,"aria-describedby":f.draggable})),[o,h,v,y,g,f.draggable]),isDragging:y,listeners:o?void 0:C,node:w,over:m,setNodeRef:S,setActivatorNodeRef:A,transform:b}}function $e(){return(0,r.useContext)(Re)}const ze="Droppable",We={timeout:25};function Ge(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const s=(0,a.YG)(ze),{active:l,dispatch:c,over:u,measureDroppableContainers:d}=(0,r.useContext)(Pe),p=(0,r.useRef)({disabled:n}),m=(0,r.useRef)(!1),h=(0,r.useRef)(null),g=(0,r.useRef)(null),{disabled:v,updateMeasurementsFor:y,timeout:b}={...We,...i},w=(0,a.YN)(null!=y?y:o),S=ge({callback:(0,r.useCallback)((()=>{m.current?(null!=g.current&&clearTimeout(g.current),g.current=setTimeout((()=>{d(Array.isArray(w.current)?w.current:[w.current]),g.current=null}),b)):m.current=!0}),[b]),disabled:v||!l}),E=(0,r.useCallback)(((e,t)=>{S&&(t&&(S.unobserve(t),m.current=!1),e&&S.observe(e))}),[S]),[A,C]=(0,a.lk)(E),_=(0,a.YN)(t);return(0,r.useEffect)((()=>{S&&A.current&&(S.disconnect(),m.current=!1,S.observe(A.current))}),[A,S]),(0,r.useEffect)((()=>(c({type:f.RegisterDroppable,element:{id:o,key:s,disabled:n,node:A,rect:h,data:_}}),()=>c({type:f.UnregisterDroppable,key:s,id:o}))),[o]),(0,r.useEffect)((()=>{n!==p.current.disabled&&(c({type:f.SetDroppableDisabled,id:o,key:s,disabled:n}),p.current.disabled=n)}),[o,s,n,c]),{active:l,rect:h,isOver:(null==u?void 0:u.id)===o,node:A,over:u,setNodeRef:C}}function Ze(e){let{animation:t,children:n}=e;const[i,s]=(0,r.useState)(null),[l,c]=(0,r.useState)(null),u=(0,a.ZC)(n);return n||i||!u||s(u),(0,a.Es)((()=>{if(!l)return;const e=null==i?void 0:i.key,n=null==i?void 0:i.props.id;null!=e&&null!=n?Promise.resolve(t(n,l)).then((()=>{s(null)})):s(null)}),[t,i,l]),o().createElement(o().Fragment,null,n,i?(0,r.cloneElement)(i,{ref:c}):null)}const qe={x:0,y:0,scaleX:1,scaleY:1};function Ke(e){let{children:t}=e;return o().createElement(Pe.Provider,{value:Ne},o().createElement(De.Provider,{value:qe},t))}const Ye={position:"fixed",touchAction:"none"},Qe=e=>(0,a.kx)(e)?"transform 250ms ease":void 0,Xe=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:s,className:l,rect:c,style:u,transform:d,transition:f=Qe}=e;if(!c)return null;const p=i?d:{...d,scaleX:1,scaleY:1},m={...Ye,width:c.width,height:c.height,top:c.top,left:c.left,transform:a.Ks.Transform.toString(p),transformOrigin:i&&r?v(r,c):void 0,transition:"function"===typeof f?f(r):f,...u};return o().createElement(n,{className:l,style:m,ref:t},s)})),Je=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(null!=i&&i.active)for(const[e,s]of Object.entries(i.active))void 0!==s&&(o[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,s));if(null!=i&&i.dragOverlay)for(const[e,s]of Object.entries(i.dragOverlay))void 0!==s&&r.node.style.setProperty(e,s);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(o))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},et={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:a.Ks.Transform.toString(t)},{transform:a.Ks.Transform.toString(n)}]},sideEffects:Je({styles:{active:{opacity:"0"}}})};function tt(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return(0,a._q)(((e,i)=>{if(null===t)return;const s=n.get(e);if(!s)return;const l=s.node.current;if(!l)return;const c=Ae(i);if(!c)return;const{transform:u}=(0,a.zk)(i).getComputedStyle(i),d=C(u);if(!d)return;const f="function"===typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...et,...e};return e=>{let{active:i,dragOverlay:a,transform:s,...l}=e;if(!t)return;const c={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},u={scaleX:1!==s.scaleX?i.rect.width*s.scaleX/a.rect.width:1,scaleY:1!==s.scaleY?i.rect.height*s.scaleY/a.rect.height:1},d={x:s.x-c.x,y:s.y-c.y,...u},f=o({...l,active:i,dragOverlay:a,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;const h=null==r?void 0:r({active:i,dragOverlay:a,...l}),g=a.node.animate(f,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{g.onfinish=()=>{null==h||h(),e()}}))}}(t);return H(l,o.draggable.measure),f({active:{id:e,data:s.data,node:l,rect:o.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:o,transform:d})}))}let nt=0;function rt(e){return(0,r.useMemo)((()=>{if(null!=e)return nt++,nt}),[e])}const ot=o().memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:s,modifiers:l,wrapperElement:c="div",className:u,zIndex:d=999}=e;const{activatorEvent:f,active:p,activeNodeRect:m,containerNodeRect:h,draggableNodes:g,droppableContainers:v,dragOverlay:y,over:b,measuringConfiguration:w,scrollableAncestors:S,scrollableAncestorRects:E,windowRect:A}=$e(),C=(0,r.useContext)(De),_=rt(null==p?void 0:p.id),O=Me(l,{activatorEvent:f,active:p,activeNodeRect:m,containerNodeRect:h,draggingNodeRect:y.rect,over:b,overlayNodeRect:y.rect,scrollableAncestors:S,scrollableAncestorRects:E,transform:C,windowRect:A}),T=he(m),I=tt({config:i,draggableNodes:g,droppableContainers:v,measuringConfiguration:w}),N=T?y.setRef:void 0;return o().createElement(Ke,null,o().createElement(Ze,{animation:I},p&&_?o().createElement(Xe,{key:_,id:p.id,ref:N,as:c,activatorEvent:f,adjustScale:t,className:u,transition:s,rect:T,style:{zIndex:d,...a},transform:O},n):null))}))},43627:(e,t,n)=>{"use strict";n.d(t,{be:()=>s,gB:()=>h,gl:()=>E,m$:()=>d});var r=n(31099),o=n.n(r),i=n(15871),a=n(74979);function s(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function l(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function c(e){return null!==e&&e>=0}const u={scaleX:1,scaleY:1},d=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:i,index:a}=e;const s=null!=(t=n[o])?t:r;if(!s)return null;const l=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];if(!r||!o&&!i)return 0;if(n<t)return o?r.left-(o.left+o.width):i.left-(r.left+r.width);return i?i.left-(r.left+r.width):r.left-(o.left+o.width)}(n,a,o);if(a===o){const e=n[i];return e?{x:o<i?e.left+e.width-(s.left+s.width):e.left-s.left,y:0,...u}:null}return a>o&&a<=i?{x:-s.width-l,y:0,...u}:a<o&&a>=i?{x:s.width+l,y:0,...u}:{x:0,y:0,...u}};const f=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=s(t,r,n),a=t[o],l=i[o];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null};const p="Sortable",m=o().createContext({activeIndex:-1,containerId:p,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:f,disabled:{draggable:!1,droppable:!1}});function h(e){let{children:t,id:n,items:s,strategy:c=f,disabled:u=!1}=e;const{active:d,dragOverlay:h,droppableRects:g,over:v,measureDroppableContainers:y}=(0,i.fF)(),b=(0,a.YG)(p,n),w=Boolean(null!==h.rect),S=(0,r.useMemo)((()=>s.map((e=>"object"===typeof e&&"id"in e?e.id:e))),[s]),E=null!=d,A=d?S.indexOf(d.id):-1,C=v?S.indexOf(v.id):-1,_=(0,r.useRef)(S),O=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(S,_.current),T=-1!==C&&-1===A||O,I=function(e){return"boolean"===typeof e?{draggable:e,droppable:e}:e}(u);(0,a.Es)((()=>{O&&E&&y(S)}),[O,S,E,y]),(0,r.useEffect)((()=>{_.current=S}),[S]);const N=(0,r.useMemo)((()=>({activeIndex:A,containerId:b,disabled:I,disableTransforms:T,items:S,overIndex:C,useDragOverlay:w,sortedRects:l(S,g),strategy:c})),[A,b,I.draggable,I.droppable,T,S,C,g,w,c]);return o().createElement(m.Provider,{value:N},t)}const g=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return s(n,r,o).indexOf(t)},v=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;return!(!c||!r)&&((s===i||o!==a)&&(!!n||a!==o&&t===l))},y={duration:200,easing:"ease"},b="transform",w=a.Ks.Transition.toString({property:b,duration:0,easing:"linear"}),S={roleDescription:"sortable"};function E(e){let{animateLayoutChanges:t=v,attributes:n,disabled:o,data:s,getNewIndex:l=g,id:u,strategy:d,resizeObserverConfig:f,transition:p=y}=e;const{items:h,containerId:E,activeIndex:A,disabled:C,disableTransforms:_,sortedRects:O,overIndex:T,useDragOverlay:I,strategy:N}=(0,r.useContext)(m),P=function(e,t){var n,r;if("boolean"===typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(o,C),R=h.indexOf(u),x=(0,r.useMemo)((()=>({sortable:{containerId:E,index:R,items:h},...s})),[E,s,R,h]),k=(0,r.useMemo)((()=>h.slice(h.indexOf(u))),[h,u]),{rect:L,node:M,isOver:D,setNodeRef:j}=(0,i.zM)({id:u,data:x,disabled:P.droppable,resizeObserverConfig:{updateMeasurementsFor:k,...f}}),{active:U,activatorEvent:B,activeNodeRect:F,attributes:H,setNodeRef:V,listeners:$,isDragging:z,over:W,setActivatorNodeRef:G,transform:Z}=(0,i.PM)({id:u,data:x,attributes:{...S,...n},disabled:P.draggable}),q=(0,a.jn)(j,V),K=Boolean(U),Y=K&&!_&&c(A)&&c(T),Q=!I&&z,X=Q&&Y?Z:null,J=Y?null!=X?X:(null!=d?d:N)({rects:O,activeNodeRect:F,activeIndex:A,overIndex:T,index:R}):null,ee=c(A)&&c(T)?l({id:u,items:h,activeIndex:A,overIndex:T}):R,te=null==U?void 0:U.id,ne=(0,r.useRef)({activeId:te,items:h,newIndex:ee,containerId:E}),re=h!==ne.current.items,oe=t({active:U,containerId:E,isDragging:z,isSorting:K,id:u,index:R,items:h,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:p,wasDragging:null!=ne.current.activeId}),ie=function(e){let{disabled:t,index:n,node:o,rect:s}=e;const[l,c]=(0,r.useState)(null),u=(0,r.useRef)(n);return(0,a.Es)((()=>{if(!t&&n!==u.current&&o.current){const e=s.current;if(e){const t=(0,i.Sj)(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==u.current&&(u.current=n)}),[t,n,o,s]),(0,r.useEffect)((()=>{l&&c(null)}),[l]),l}({disabled:!oe,index:R,node:M,rect:L});return(0,r.useEffect)((()=>{K&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),E!==ne.current.containerId&&(ne.current.containerId=E),h!==ne.current.items&&(ne.current.items=h)}),[K,ee,E,h]),(0,r.useEffect)((()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout((()=>{ne.current.activeId=te}),50);return()=>clearTimeout(e)}),[te]),{active:U,activeIndex:A,attributes:H,data:x,rect:L,index:R,newIndex:ee,items:h,isOver:D,isSorting:K,isDragging:z,listeners:$,node:M,overIndex:T,over:W,setNodeRef:q,setActivatorNodeRef:G,setDroppableNodeRef:j,setDraggableNodeRef:V,transform:null!=ie?ie:J,transition:function(){if(ie||re&&ne.current.newIndex===R)return w;if(Q&&!(0,a.kx)(B)||!p)return;if(K||oe)return a.Ks.Transition.toString({...p,property:b});return}()}}i.vL.Down,i.vL.Right,i.vL.Up,i.vL.Left},74979:(e,t,n)=>{"use strict";n.d(t,{$$:()=>h,Es:()=>p,KG:()=>v,Ks:()=>T,Ll:()=>s,Re:()=>C,Sw:()=>i,TW:()=>f,WQ:()=>A,YG:()=>S,YN:()=>g,ZC:()=>b,_q:()=>m,ag:()=>N,e_:()=>O,jn:()=>o,kx:()=>_,l6:()=>a,lk:()=>y,sb:()=>u,wz:()=>c,xZ:()=>d,zk:()=>l});var r=n(31099);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}const i="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function s(e){return"nodeType"in e}function l(e){var t,n;return e?a(e)?e:s(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=l(e);return e instanceof t}function u(e){return!a(e)&&e instanceof l(e).HTMLElement}function d(e){return e instanceof l(e).SVGElement}function f(e){return e?a(e)?e.document:s(e)?c(e)?e:u(e)||d(e)?e.ownerDocument:document:document:document}const p=i?r.useLayoutEffect:r.useEffect;function m(e){const t=(0,r.useRef)(e);return p((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function h(){const e=(0,r.useRef)(null);return[(0,r.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function g(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return p((()=>{n.current!==e&&(n.current=e)}),t),n}function v(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function y(e){const t=m(e),n=(0,r.useRef)(null),o=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function b(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let w={};function S(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[e]=n,e+"-"+n}),[e,t])}function E(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[o,i]of r){const n=t[o];null!=n&&(t[o]=n+e*i)}return t}),{...t})}}const A=E(1),C=E(-1);function _(e){if(!e)return!1;const{KeyboardEvent:t}=l(e.target);return t&&e instanceof t}function O(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=l(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const T=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[T.Translate.toString(e),T.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),I="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function N(e){return e.matches(I)?e:e.querySelector(I)}},25815:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(65047),o=n(40390),i=n(19735),a=n(24534),s=n(50483),l=n(49503),c=n(73716),u=function(e,t,n){for(var r=0,i=0;r=i,i=(0,o.se)(),38===r&&12===i&&(t[n]=1),!(0,o.Sh)(i);)(0,o.K2)();return(0,o.di)(e,o.G1)},d=function(e,t){return(0,o.VF)(function(e,t){var n=-1,r=44;do{switch((0,o.Sh)(r)){case 0:38===r&&12===(0,o.se)()&&(t[n]=1),e[n]+=u(o.G1-1,t,n);break;case 2:e[