performance.mark("js-parse-end:82681-e2d03207282b9e0b.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["82681"],{98668(e,t,n){let r;n.d(t,{AN:()=>eE,Vy:()=>j,E5:()=>L,uN:()=>eb,Sj:()=>V,PM:()=>e0,MS:()=>A,Mp:()=>eQ,Hd:()=>tn,FR:()=>Y,sl:()=>Z,IG:()=>eR,fF:()=>e1,y$:()=>_,zM:()=>e9,vL:()=>v,cA:()=>eC,TT:()=>U});var l,i,a,o,u,s,c,d,f,h,g,p,v,b,m,y,w,x,E,D=n(96540),C=n(40961),S=n(74979);let R={display:"none"};function M(e){let{id:t,value:n}=e;return D.createElement("div",{id:t,style:R},n)}function k(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return D.createElement("div",{id:t,style:{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"},role:"status","aria-live":r,"aria-atomic":!0},n)}let T=(0,D.createContext)(null);function L(e){let t=(0,D.useContext)(T);(0,D.useEffect)(()=>{if(!t)throw Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}let O={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 "},N={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 I(e){let{announcements:t=N,container:n,hiddenTextDescribedById:r,screenReaderInstructions:l=O}=e,{announce:i,announcement:a}=function(){let[e,t]=(0,D.useState)("");return{announce:(0,D.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),o=(0,S.YG)("DndLiveRegion"),[u,s]=(0,D.useState)(!1);if((0,D.useEffect)(()=>{s(!0)},[]),L((0,D.useMemo)(()=>({onDragStart(e){let{active:n}=e;i(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&i(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;i(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;i(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;i(t.onDragCancel({active:n,over:r}))}}),[i,t])),!u)return null;let c=D.createElement(D.Fragment,null,D.createElement(M,{id:r,value:l.draggable}),D.createElement(k,{id:o,announcement:a}));return n?(0,C.createPortal)(c,n):c}function z(){}function A(e,t){return(0,D.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}function Y(){for(var e=arguments.length,t=Array(e),n=0;n[...t].filter(e=>null!=e),[...t])}(l=h||(h={})).DragStart="dragStart",l.DragMove="dragMove",l.DragEnd="dragEnd",l.DragCancel="dragCancel",l.DragOver="dragOver",l.RegisterDroppable="registerDroppable",l.SetDroppableDisabled="setDroppableDisabled",l.UnregisterDroppable="unregisterDroppable";let P=Object.freeze({x:0,y:0});function W(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function B(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function F(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function K(e){let{left:t,top:n,height:r,width:l}=e;return[{x:t,y:n},{x:t+l,y:n},{x:t,y:n+r},{x:t+l,y:n+r}]}function j(e,t){if(!e||0===e.length)return null;let[n]=e;return t?n[t]:n}let _=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,l=K(t),i=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=K(r),a=Number((l.reduce((e,t,r)=>e+W(n[r],t),0)/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:a}})}}return i.sort(B)},X=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,l=[];for(let e of r){let{id:r}=e,i=n.get(r);if(i){let n=function(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),l=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height);if(r0&&l.push({id:r,data:{droppableContainer:e,value:n}})}}return l.sort(F)},U=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];let l=[];for(let e of t){let{id:t}=e,i=n.get(t);if(i&&function(e,t){let{top:n,left:r,bottom:l,right:i}=t;return n<=e.y&&e.y<=l&&r<=e.x&&e.x<=i}(r,i)){let n=Number((K(i).reduce((e,t)=>e+W(r,t),0)/4).toFixed(4));l.push({id:t,data:{droppableContainer:e,value:n}})}}return l.sort(B)};function G(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:P}let q=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r({...e,top:e.top+ +t.y,bottom:e.bottom+ +t.y,left:e.left+ +t.x,right:e.right+ +t.x}),{...e})};function H(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}let J={ignoreTransform:!1};function V(e,t){void 0===t&&(t=J);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=(0,S.zk)(e).getComputedStyle(e);t&&(n=function(e,t,n){let r=H(t);if(!r)return e;let{scaleX:l,scaleY:i,x:a,y:o}=r,u=e.left-a-(1-l)*parseFloat(n),s=e.top-o-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=l?e.width/l:e.width,d=i?e.height/i:e.height;return{width:c,height:d,top:s,right:u+c,bottom:s+d,left:u}}(n,t,r))}let{top:r,left:l,width:i,height:a,bottom:o,right:u}=n;return{top:r,left:l,width:i,height:a,bottom:o,right:u}}function Q(e){return V(e,{ignoreTransform:!0})}function Z(e,t){let n=[];return e?function r(l){var i,a;let o;if(null!=t&&n.length>=t||!l)return n;if((0,S.wz)(l)&&null!=l.scrollingElement&&!n.includes(l.scrollingElement))return n.push(l.scrollingElement),n;if(!(0,S.sb)(l)||(0,S.xZ)(l)||n.includes(l))return n;let u=(0,S.zk)(e).getComputedStyle(l);return(l!==e&&(void 0===(i=u)&&(i=(0,S.zk)(l).getComputedStyle(l)),o=/(auto|scroll|overlay)/,["overflow","overflowX","overflowY"].some(e=>{let t=i[e];return"string"==typeof t&&o.test(t)}))&&n.push(l),void 0===(a=u)&&(a=(0,S.zk)(l).getComputedStyle(l)),"fixed"===a.position)?n:r(l.parentNode)}(e):n}function $(e){let[t]=Z(e,1);return null!=t?t:null}function ee(e){return S.Sw&&e?(0,S.l6)(e)?e:(0,S.Ll)(e)?(0,S.wz)(e)||e===(0,S.TW)(e).scrollingElement?window:(0,S.sb)(e)?e:null:null:null}function et(e){return(0,S.l6)(e)?e.scrollX:e.scrollLeft}function en(e){return(0,S.l6)(e)?e.scrollY:e.scrollTop}function er(e){return{x:et(e),y:en(e)}}function el(e){return!!S.Sw&&!!e&&e===document.scrollingElement}function ei(e){let t={x:0,y:0},n=el(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},l=e.scrollTop<=t.y,i=e.scrollLeft<=t.x;return{isTop:l,isLeft:i,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}(i=g||(g={}))[i.Forward=1]="Forward",i[i.Backward=-1]="Backward";let ea={x:.2,y:.2};function eo(e){return e.reduce((e,t)=>(0,S.WQ)(e,er(t)),P)}function eu(e,t){if(void 0===t&&(t=V),!e)return;let{top:n,left:r,bottom:l,right:i}=t(e);$(e)&&(l<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}let es=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+et(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+en(t),0)}]];class ec{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=Z(t),r=eo(n);for(const[t,l,i]of(this.rect={...e},this.width=e.width,this.height=e.height,es))for(const e of l)Object.defineProperty(this,e,{get:()=>{let l=i(n),a=r[t]-l;return this.rect[e]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ed{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 ef(e,t){let 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}function eh(e){e.preventDefault()}function eg(e){e.stopPropagation()}(a=p||(p={})).Click="click",a.DragStart="dragstart",a.Keydown="keydown",a.ContextMenu="contextmenu",a.Resize="resize",a.SelectionChange="selectionchange",a.VisibilityChange="visibilitychange",(o=v||(v={})).Space="Space",o.Down="ArrowDown",o.Right="ArrowRight",o.Left="ArrowLeft",o.Up="ArrowUp",o.Esc="Escape",o.Enter="Enter";let ep={start:[v.Space,v.Enter],cancel:[v.Esc],end:[v.Space,v.Enter]},ev=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case v.Right:return{...n,x:n.x+25};case v.Left:return{...n,x:n.x-25};case v.Down:return{...n,y:n.y+25};case v.Up:return{...n,y:n.y-25}}};class eb{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 ed((0,S.TW)(t)),this.windowListeners=new ed((0,S.zk)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(p.Resize,this.handleCancel),this.windowListeners.add(p.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(p.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&eu(n),t(P)}handleKeyDown(e){if((0,S.kx)(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:l=ep,coordinateGetter:i=ev,scrollBehavior:a="smooth"}=r,{code:o}=e;if(l.end.includes(o))return void this.handleEnd(e);if(l.cancel.includes(o))return void this.handleCancel(e);let{collisionRect:u}=n.current,s=u?{x:u.left,y:u.top}:P;this.referenceCoordinates||(this.referenceCoordinates=s);let c=i(e,{active:t,context:n.current,currentCoordinates:s});if(c){let t=(0,S.Re)(c,s),r={x:0,y:0},{scrollableAncestors:l}=n.current;for(let n of l){let l=e.code,{isTop:i,isRight:o,isLeft:u,isBottom:s,maxScroll:d,minScroll:f}=ei(n),h=function(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:l}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:l,width:e.clientWidth,height:e.clientHeight}}(n),g={x:Math.min(l===v.Right?h.right-h.width/2:h.right,Math.max(l===v.Right?h.left:h.left+h.width/2,c.x)),y:Math.min(l===v.Down?h.bottom-h.height/2:h.bottom,Math.max(l===v.Down?h.top:h.top+h.height/2,c.y))},p=l===v.Right&&!o||l===v.Left&&!u,b=l===v.Down&&!s||l===v.Up&&!i;if(p&&g.x!==c.x){let e=n.scrollLeft+t.x,i=l===v.Right&&e<=d.x||l===v.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});i?r.x=n.scrollLeft-e:r.x=l===v.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(b&&g.y!==c.y){let e=n.scrollTop+t.y,i=l===v.Down&&e<=d.y||l===v.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});i?r.y=n.scrollTop-e:r.y=l===v.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,(0,S.WQ)((0,S.Re)(c,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function em(e){return!!(e&&"distance"in e)}function ey(e){return!!(e&&"delay"in e)}eb.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=ep,onActivation:l}=t,{active:i}=n,{code:a}=e.nativeEvent;if(r.start.includes(a)){let t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==l||l({event:e.nativeEvent}),!0)}return!1}}];class ew{constructor(e,t,n){var r;void 0===n&&(n=function(e){let{EventTarget:t}=(0,S.zk)(e);return e instanceof t?e:(0,S.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:l}=e,{target:i}=l;this.props=e,this.events=t,this.document=(0,S.TW)(i),this.documentListeners=new ed(this.document),this.listeners=new ed(n),this.windowListeners=new ed((0,S.zk)(i)),this.initialCoordinates=null!=(r=(0,S.e_)(l))?r:P,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(){let{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),this.windowListeners.add(p.Resize,this.handleCancel),this.windowListeners.add(p.DragStart,eh),this.windowListeners.add(p.VisibilityChange,this.handleCancel),this.windowListeners.add(p.ContextMenu,eh),this.documentListeners.add(p.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ey(t)){this.timeoutId=setTimeout(this.handleStart,t.delay);return}if(em(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(p.Click,eg,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(p.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;let{activated:n,initialCoordinates:r,props:l}=this,{onMove:i,options:{activationConstraint:a}}=l;if(!r)return;let o=null!=(t=(0,S.e_)(e))?t:P,u=(0,S.Re)(r,o);if(!n&&a){if(em(a)){if(null!=a.tolerance&&ef(u,a.tolerance))return this.handleCancel();if(ef(u,a.distance))return this.handleStart()}return ey(a)&&ef(u,a.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onEnd:e}=this.props;this.detach(),e()}handleCancel(){let{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===v.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}let ex={move:{name:"pointermove"},end:{name:"pointerup"}};class eE extends ew{constructor(e){const{event:t}=e;super(e,ex,(0,S.TW)(t.target))}}eE.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)}}];let eD={move:{name:"mousemove"},end:{name:"mouseup"}};(u=b||(b={}))[u.RightClick=2]="RightClick";class eC extends ew{constructor(e){super(e,eD,(0,S.TW)(e.event.target))}}eC.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==b.RightClick&&(null==r||r({event:n}),!0)}}];let eS={move:{name:"touchmove"},end:{name:"touchend"}};class eR extends ew{constructor(e){super(e,eS)}static setup(){return window.addEventListener(eS.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(eS.move.name,e)};function e(){}}}eR.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:l}=n;return!(l.length>1)&&(null==r||r({event:n}),!0)}}],(s=m||(m={}))[s.Pointer=0]="Pointer",s[s.DraggableRect=1]="DraggableRect",(c=y||(y={}))[c.TreeOrder=0]="TreeOrder",c[c.ReversedTreeOrder=1]="ReversedTreeOrder";let eM={x:{[g.Backward]:!1,[g.Forward]:!1},y:{[g.Backward]:!1,[g.Forward]:!1}};(d=w||(w={}))[d.Always=0]="Always",d[d.BeforeDragging=1]="BeforeDragging",d[d.WhileDragging=2]="WhileDragging",(x||(x={})).Optimized="optimized";let ek=new Map;function eT(e,t){return(0,S.KG)(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function eL(e){let{callback:t,disabled:n}=e,r=(0,S._q)(t),l=(0,D.useMemo)(()=>{if(n||"u"()=>null==l?void 0:l.disconnect(),[l]),l}function eO(e){return new ec(V(e),e)}function eN(e,t,n){void 0===t&&(t=eO);let[r,l]=(0,D.useReducer)(function(r){if(!e)return null;if(!1===e.isConnected){var l;return null!=(l=null!=r?r:n)?l:null}let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i},null),i=function(e){let{callback:t,disabled:n}=e,r=(0,S._q)(t),l=(0,D.useMemo)(()=>{if(n||"u"()=>null==l?void 0:l.disconnect(),[l]),l}({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){l();break}}}}),a=eL({callback:l});return(0,S.Es)(()=>{l(),e?(null==a||a.observe(e),null==i||i.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==i||i.disconnect())},[e]),r}let eI=[];function ez(e,t){void 0===t&&(t=[]);let n=(0,D.useRef)(null);return(0,D.useEffect)(()=>{n.current=null},t),(0,D.useEffect)(()=>{let t=e!==P;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?(0,S.Re)(e,n.current):P}function eA(e){return(0,D.useMemo)(()=>{let t,n;return e?(t=e.innerWidth,{top:0,left:0,right:t,bottom:n=e.innerHeight,width:t,height:n}):null},[e])}let eY=[];function eP(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return(0,S.sb)(t)?t:e}let eW=[{sensor:eE,options:{}},{sensor:eb,options:{}}],eB={current:{}},eF={draggable:{measure:Q},droppable:{measure:Q,strategy:w.WhileDragging,frequency:x.Optimized},dragOverlay:{measure:V}};class eK 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}}let ej={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new eK,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:z},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:eF,measureDroppableContainers:z,windowRect:null,measuringScheduled:!1},e_={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:z,draggableNodes:new Map,over:null,measureDroppableContainers:z},eX=(0,D.createContext)(e_),eU=(0,D.createContext)(ej);function eG(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new eK}}}function eq(e,t){switch(t.type){case h.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case h.DragMove:if(!e.draggable.active)return e;return{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case h.DragEnd:case h.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case h.RegisterDroppable:{let{element:n}=t,{id:r}=n,l=new eK(e.droppable.containers);return l.set(r,n),{...e,droppable:{...e.droppable,containers:l}}}case h.SetDroppableDisabled:{let{id:n,key:r,disabled:l}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new eK(e.droppable.containers);return a.set(n,{...i,disabled:l}),{...e,droppable:{...e.droppable,containers:a}}}case h.UnregisterDroppable:{let{id:n,key:r}=t,l=e.droppable.containers.get(n);if(!l||r!==l.key)return e;let i=new eK(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function eH(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:l}=(0,D.useContext)(eX),i=(0,S.ZC)(r),a=(0,S.ZC)(null==n?void 0:n.id);return(0,D.useEffect)(()=>{if(!t&&!r&&i&&null!=a){if(!(0,S.kx)(i)||document.activeElement===i.target)return;let e=l.get(a);if(!e)return;let{activatorNode:t,node:n}=e;(t.current||n.current)&&requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=(0,S.ag)(e);if(t){t.focus();break}}})}},[r,t,l,a,i]),null}function eJ(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}let eV=(0,D.createContext)({...P,scaleX:1,scaleY:1});(f=E||(E={}))[f.Uninitialized=0]="Uninitialized",f[f.Initializing=1]="Initializing",f[f.Initialized=2]="Initialized";let eQ=(0,D.memo)(function(e){var t,n,r,l,i,a,o,u;let s,c,d,f,p,v,b,x,{id:R,accessibility:M,autoScroll:k=!0,children:L,sensors:O=eW,collisionDetection:N=X,measuring:z,modifiers:A,...Y}=e,[W,B]=(0,D.useReducer)(eq,void 0,eG),[F,K]=function(){let[e]=(0,D.useState)(()=>new Set),t=(0,D.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,D.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]}(),[_,U]=(0,D.useState)(E.Uninitialized),H=_===E.Initialized,{draggable:{active:J,nodes:Q,translate:et},droppable:{containers:en}}=W,eu=J?Q.get(J):null,es=(0,D.useRef)({initial:null,translated:null}),ed=(0,D.useMemo)(()=>{var e;return null!=J?{id:J,data:null!=(e=null==eu?void 0:eu.data)?e:eB,rect:es}:null},[J,eu]),ef=(0,D.useRef)(null),[eh,eg]=(0,D.useState)(null),[ep,ev]=(0,D.useState)(null),eb=(0,S.YN)(Y,Object.values(Y)),em=(0,S.YG)("DndDescribedBy",R),ey=(0,D.useMemo)(()=>en.getEnabled(),[en]),ew=(0,D.useMemo)(()=>({draggable:{...eF.draggable,...null==z?void 0:z.draggable},droppable:{...eF.droppable,...null==z?void 0:z.droppable},dragOverlay:{...eF.dragOverlay,...null==z?void 0:z.dragOverlay}}),[null==z?void 0:z.draggable,null==z?void 0:z.droppable,null==z?void 0:z.dragOverlay]),{droppableRects:ex,measureDroppableContainers:eE,measuringScheduled:eD}=function(e,t){let{dragging:n,dependencies:r,config:l}=t,[i,a]=(0,D.useState)(null),{frequency:o,measure:u,strategy:s}=l,c=(0,D.useRef)(e),d=function(){switch(s){case w.Always:return!1;case w.BeforeDragging:return n;default:return!n}}(),f=(0,S.YN)(d),h=(0,D.useCallback)(function(e){void 0===e&&(e=[]),f.current||a(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),g=(0,D.useRef)(null),p=(0,S.KG)(t=>{if(d&&!n)return ek;if(!t||t===ek||c.current!==e||null!=i){let t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new ec(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,i,n,d,u]);return(0,D.useEffect)(()=>{c.current=e},[e]),(0,D.useEffect)(()=>{d||h()},[n,d]),(0,D.useEffect)(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),(0,D.useEffect)(()=>{d||"number"!=typeof o||null!==g.current||(g.current=setTimeout(()=>{h(),g.current=null},o))},[o,d,h,...r]),{droppableRects:p,measureDroppableContainers:h,measuringScheduled:null!=i}}(ey,{dragging:H,dependencies:[et.x,et.y],config:ew.droppable}),eC=(p=(f=null!==J?Q.get(J):void 0)?f.node.current:null,(0,S.KG)(e=>{var t;return null===J?null:null!=(t=null!=p?p:e)?t:null},[p,J])),eS=(0,D.useMemo)(()=>ep?(0,S.e_)(ep):null,[ep]),eR=(s=(null==eh?void 0:eh.autoScrollEnabled)===!1,c="object"==typeof k?!1===k.enabled:!1===k,d=H&&!s&&!c,"object"==typeof k?{...k,enabled:d}:{enabled:d}),eO=eT(eC,ew.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:l=!0}=e,i=(0,D.useRef)(!1),{x:a,y:o}="boolean"==typeof l?{x:l,y:l}:l;(0,S.Es)(()=>{if(!a&&!o||!t){i.current=!1;return}if(i.current||!r)return;let e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;let l=G(n(e),r);if(a||(l.x=0),o||(l.y=0),i.current=!0,Math.abs(l.x)>0||Math.abs(l.y)>0){let t=$(e);t&&t.scrollBy({top:l.y,left:l.x})}},[t,a,o,r,n])}({activeNode:J?Q.get(J):null,config:eR.layoutShiftCompensation,initialRect:eO,measure:ew.draggable.measure});let eK=eN(eC,ew.draggable.measure,eO),ej=eN(eC?eC.parentElement:null),e_=(0,D.useRef)({activatorEvent:null,active:null,activeNode:eC,collisionRect:null,collisions:null,droppableRects:ex,draggableNodes:Q,draggingNode:null,draggingNodeRect:null,droppableContainers:en,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),eQ=en.getNodeFor(null==(t=e_.current.over)?void 0:t.id),eZ=function(e){let{measure:t}=e,[n,r]=(0,D.useState)(null),l=eL({callback:(0,D.useCallback)(e=>{for(let{target:n}of e)if((0,S.sb)(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),i=(0,D.useCallback)(e=>{let n=eP(e);null==l||l.disconnect(),n&&(null==l||l.observe(n)),r(n?t(n):null)},[t,l]),[a,o]=(0,S.lk)(i);return(0,D.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}({measure:ew.dragOverlay.measure}),e$=null!=(n=eZ.nodeRef.current)?n:eC,e0=H?null!=(r=eZ.rect)?r:eK:null,e1=!!(eZ.nodeRef.current&&eZ.rect),e2=(v=eT(i=e1?null:eK),G(i,v)),e9=eA(e$?(0,S.zk)(e$):null),e5=(a=H?null!=eQ?eQ:eC:null,b=(0,D.useRef)(a),x=(0,S.KG)(e=>a?e&&e!==eI&&a&&b.current&&a.parentNode===b.current.parentNode?e:Z(a):eI,[a]),(0,D.useEffect)(()=>{b.current=a},[a]),x),e4=function(e,t){void 0===t&&(t=V);let[n]=e,r=eA(n?(0,S.zk)(n):null),[l,i]=(0,D.useReducer)(function(){return e.length?e.map(e=>el(e)?r:new ec(t(e),e)):eY},eY),a=eL({callback:i});return e.length>0&&l===eY&&i(),(0,S.Es)(()=>{e.length?e.forEach(e=>null==a?void 0:a.observe(e)):(null==a||a.disconnect(),i())},[e]),l}(e5),e6=eJ(A,{transform:{x:et.x-e2.x,y:et.y-e2.y,scaleX:1,scaleY:1},activatorEvent:ep,active:ed,activeNodeRect:eK,containerNodeRect:ej,draggingNodeRect:e0,over:e_.current.over,overlayNodeRect:eZ.rect,scrollableAncestors:e5,scrollableAncestorRects:e4,windowRect:e9}),e7=eS?(0,S.WQ)(eS,et):null,e8=function(e){let[t,n]=(0,D.useState)(null),r=(0,D.useRef)(e),l=(0,D.useCallback)(e=>{let t=ee(e.target);t&&n(e=>e?(e.set(t,er(t)),new Map(e)):null)},[]);return(0,D.useEffect)(()=>{let t=r.current;if(e!==t){i(t);let a=e.map(e=>{let t=ee(e);return t?(t.addEventListener("scroll",l,{passive:!0}),[t,er(t)]):null}).filter(e=>null!=e);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach(e=>{let t=ee(e);null==t||t.removeEventListener("scroll",l)})}},[l,e]),(0,D.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>(0,S.WQ)(e,t),P):eo(e):P,[e,t])}(e5),e3=ez(e8),te=ez(e8,[eK]),tt=(0,S.WQ)(e6,e3),tn=e0?q(e0,e6):null,tr=ed&&tn?N({active:ed,collisionRect:tn,droppableRects:ex,droppableContainers:ey,pointerCoordinates:e7}):null,tl=j(tr,"id"),[ti,ta]=(0,D.useState)(null),to=(o=e1?e6:(0,S.WQ)(e6,te),u=null!=(l=null==ti?void 0:ti.rect)?l:null,{...o,scaleX:u&&eK?u.width/eK.width:1,scaleY:u&&eK?u.height/eK.height:1}),tu=(0,D.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==ef.current)return;let l=Q.get(ef.current);if(!l)return;let i=e.nativeEvent,a=new n({active:ef.current,activeNode:l,event:i,options:r,context:e_,onStart(e){let t=ef.current;if(null==t)return;let n=Q.get(t);if(!n)return;let{onDragStart:r}=eb.current,l={active:{id:t,data:n.data,rect:es}};(0,C.unstable_batchedUpdates)(()=>{null==r||r(l),U(E.Initializing),B({type:h.DragStart,initialCoordinates:e,active:t}),F({type:"onDragStart",event:l})})},onMove(e){B({type:h.DragMove,coordinates:e})},onEnd:o(h.DragEnd),onCancel:o(h.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:l}=e_.current,a=null;if(t&&l){let{cancelDrop:o}=eb.current;a={activatorEvent:i,active:t,collisions:n,delta:l,over:r},e===h.DragEnd&&"function"==typeof o&&await Promise.resolve(o(a))&&(e=h.DragCancel)}ef.current=null,(0,C.unstable_batchedUpdates)(()=>{B({type:e}),U(E.Uninitialized),ta(null),eg(null),ev(null);let t=e===h.DragEnd?"onDragEnd":"onDragCancel";if(a){let e=eb.current[t];null==e||e(a),F({type:t,event:a})}})}}(0,C.unstable_batchedUpdates)(()=>{eg(a),ev(e.nativeEvent)})},[Q]),ts=(0,D.useCallback)((e,t)=>(n,r)=>{let l=n.nativeEvent,i=Q.get(r);null!==ef.current||!i||l.dndKit||l.defaultPrevented||!0===e(n,t.options,{active:i})&&(l.dndKit={capturedBy:t.sensor},ef.current=r,tu(n,t))},[Q,tu]),tc=(0,D.useMemo)(()=>O.reduce((e,t)=>{let{sensor:n}=t;return[...e,...n.activators.map(e=>({eventName:e.eventName,handler:ts(e.handler,t)}))]},[]),[O,ts]);(0,D.useEffect)(()=>{if(!S.Sw)return;let e=O.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(let t of e)null==t||t()}},O.map(e=>{let{sensor:t}=e;return t})),(0,S.Es)(()=>{eK&&_===E.Initializing&&U(E.Initialized)},[eK,_]),(0,D.useEffect)(()=>{let{onDragMove:e}=eb.current,{active:t,activatorEvent:n,collisions:r,over:l}=e_.current;if(!t||!n)return;let i={active:t,activatorEvent:n,collisions:r,delta:{x:tt.x,y:tt.y},over:l};(0,C.unstable_batchedUpdates)(()=>{null==e||e(i),F({type:"onDragMove",event:i})})},[tt.x,tt.y]),(0,D.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:l}=e_.current;if(!e||null==ef.current||!t||!l)return;let{onDragOver:i}=eb.current,a=r.get(tl),o=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,u={active:e,activatorEvent:t,collisions:n,delta:{x:l.x,y:l.y},over:o};(0,C.unstable_batchedUpdates)(()=>{ta(o),null==i||i(u),F({type:"onDragOver",event:u})})},[tl]),(0,S.Es)(()=>{e_.current={activatorEvent:ep,active:ed,activeNode:eC,collisionRect:tn,collisions:tr,droppableRects:ex,draggableNodes:Q,draggingNode:e$,draggingNodeRect:e0,droppableContainers:en,over:ti,scrollableAncestors:e5,scrollAdjustedTranslate:tt},es.current={initial:e0,translated:tn}},[ed,eC,tr,tn,Q,e$,e0,ex,en,ti,e5,tt]),function(e){let{acceleration:t,activator:n=m.Pointer,canScroll:r,draggingRect:l,enabled:i,interval:a=5,order:o=y.TreeOrder,pointerCoordinates:u,scrollableAncestors:s,scrollableAncestorRects:c,delta:d,threshold:f}=e,h=function(e){let{delta:t,disabled:n}=e,r=(0,S.ZC)(t);return(0,S.KG)(e=>{if(n||!r||!e)return eM;let l={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[g.Backward]:e.x[g.Backward]||-1===l.x,[g.Forward]:e.x[g.Forward]||1===l.x},y:{[g.Backward]:e.y[g.Backward]||-1===l.y,[g.Forward]:e.y[g.Forward]||1===l.y}}},[n,t,r])}({delta:d,disabled:!i}),[p,v]=(0,S.$$)(),b=(0,D.useRef)({x:0,y:0}),w=(0,D.useRef)({x:0,y:0}),x=(0,D.useMemo)(()=>{switch(n){case m.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case m.DraggableRect:return l}},[n,l,u]),E=(0,D.useRef)(null),C=(0,D.useCallback)(()=>{let e=E.current;if(!e)return;let t=b.current.x*w.current.x,n=b.current.y*w.current.y;e.scrollBy(t,n)},[]),R=(0,D.useMemo)(()=>o===y.TreeOrder?[...s].reverse():s,[o,s]);(0,D.useEffect)(()=>{if(!i||!s.length||!x)return void v();for(let e of R){if((null==r?void 0:r(e))===!1)continue;let n=c[s.indexOf(e)];if(!n)continue;let{direction:l,speed:i}=function(e,t,n,r,l){let{top:i,left:a,right:o,bottom:u}=n;void 0===r&&(r=10),void 0===l&&(l=ea);let{isTop:s,isBottom:c,isLeft:d,isRight:f}=ei(e),h={x:0,y:0},p={x:0,y:0},v={height:t.height*l.y,width:t.width*l.x};return!s&&i<=t.top+v.height?(h.y=g.Backward,p.y=r*Math.abs((t.top+v.height-i)/v.height)):!c&&u>=t.bottom-v.height&&(h.y=g.Forward,p.y=r*Math.abs((t.bottom-v.height-u)/v.height)),!f&&o>=t.right-v.width?(h.x=g.Forward,p.x=r*Math.abs((t.right-v.width-o)/v.width)):!d&&a<=t.left+v.width&&(h.x=g.Backward,p.x=r*Math.abs((t.left+v.width-a)/v.width)),{direction:h,speed:p}}(e,n,x,t,f);for(let e of["x","y"])h[e][l[e]]||(i[e]=0,l[e]=0);if(i.x>0||i.y>0){v(),E.current=e,p(C,a),b.current=i,w.current=l;return}}b.current={x:0,y:0},w.current={x:0,y:0},v()},[t,C,r,v,i,a,JSON.stringify(x),JSON.stringify(h),p,s,R,c,JSON.stringify(f)])}({...eR,delta:et,draggingRect:tn,pointerCoordinates:e7,scrollableAncestors:e5,scrollableAncestorRects:e4});let td=(0,D.useMemo)(()=>({active:ed,activeNode:eC,activeNodeRect:eK,activatorEvent:ep,collisions:tr,containerNodeRect:ej,dragOverlay:eZ,draggableNodes:Q,droppableContainers:en,droppableRects:ex,over:ti,measureDroppableContainers:eE,scrollableAncestors:e5,scrollableAncestorRects:e4,measuringConfiguration:ew,measuringScheduled:eD,windowRect:e9}),[ed,eC,eK,ep,tr,ej,eZ,Q,en,ex,ti,eE,e5,e4,ew,eD,e9]),tf=(0,D.useMemo)(()=>({activatorEvent:ep,activators:tc,active:ed,activeNodeRect:eK,ariaDescribedById:{draggable:em},dispatch:B,draggableNodes:Q,over:ti,measureDroppableContainers:eE}),[ep,tc,ed,eK,B,em,Q,ti,eE]);return D.createElement(T.Provider,{value:K},D.createElement(eX.Provider,{value:tf},D.createElement(eU.Provider,{value:td},D.createElement(eV.Provider,{value:to},L)),D.createElement(eH,{disabled:(null==M?void 0:M.restoreFocus)===!1})),D.createElement(I,{...M,hiddenTextDescribedById:em}))}),eZ=(0,D.createContext)(null),e$="button";function e0(e){let{id:t,data:n,disabled:r=!1,attributes:l}=e,i=(0,S.YG)("Droppable"),{activators:a,activatorEvent:o,active:u,activeNodeRect:s,ariaDescribedById:c,draggableNodes:d,over:f}=(0,D.useContext)(eX),{role:h=e$,roleDescription:g="draggable",tabIndex:p=0}=null!=l?l:{},v=(null==u?void 0:u.id)===t,b=(0,D.useContext)(v?eV:eZ),[m,y]=(0,S.lk)(),[w,x]=(0,S.lk)(),E=(0,D.useMemo)(()=>a.reduce((e,n)=>{let{eventName:r,handler:l}=n;return e[r]=e=>{l(e,t)},e},{}),[a,t]),C=(0,S.YN)(n);return(0,S.Es)(()=>(d.set(t,{id:t,key:i,node:m,activatorNode:w,data:C}),()=>{let e=d.get(t);e&&e.key===i&&d.delete(t)}),[d,t]),{active:u,activatorEvent:o,activeNodeRect:s,attributes:(0,D.useMemo)(()=>({role:h,tabIndex:p,"aria-disabled":r,"aria-pressed":!!v&&h===e$||void 0,"aria-roledescription":g,"aria-describedby":c.draggable}),[r,h,p,v,g,c.draggable]),isDragging:v,listeners:r?void 0:E,node:m,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:b}}function e1(){return(0,D.useContext)(eU)}let e2={timeout:25};function e9(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:l}=e,i=(0,S.YG)("Droppable"),{active:a,dispatch:o,over:u,measureDroppableContainers:s}=(0,D.useContext)(eX),c=(0,D.useRef)({disabled:n}),d=(0,D.useRef)(!1),f=(0,D.useRef)(null),g=(0,D.useRef)(null),{disabled:p,updateMeasurementsFor:v,timeout:b}={...e2,...l},m=(0,S.YN)(null!=v?v:r),y=eL({callback:(0,D.useCallback)(()=>{if(!d.current){d.current=!0;return}null!=g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{s(Array.isArray(m.current)?m.current:[m.current]),g.current=null},b)},[b]),disabled:p||!a}),w=(0,D.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),d.current=!1),e&&y.observe(e))},[y]),[x,E]=(0,S.lk)(w),C=(0,S.YN)(t);return(0,D.useEffect)(()=>{y&&x.current&&(y.disconnect(),d.current=!1,y.observe(x.current))},[x,y]),(0,S.Es)(()=>(o({type:h.RegisterDroppable,element:{id:r,key:i,disabled:n,node:x,rect:f,data:C}}),()=>o({type:h.UnregisterDroppable,key:i,id:r})),[r]),(0,D.useEffect)(()=>{n!==c.current.disabled&&(o({type:h.SetDroppableDisabled,id:r,key:i,disabled:n}),c.current.disabled=n)},[r,i,n,o]),{active:a,rect:f,isOver:(null==u?void 0:u.id)===r,node:x,over:u,setNodeRef:E}}function e5(e){let{animation:t,children:n}=e,[r,l]=(0,D.useState)(null),[i,a]=(0,D.useState)(null),o=(0,S.ZC)(n);return n||r||!o||l(o),(0,S.Es)(()=>{if(!i)return;let e=null==r?void 0:r.key,n=null==r?void 0:r.props.id;null==e||null==n?l(null):Promise.resolve(t(n,i)).then(()=>{l(null)})},[t,r,i]),D.createElement(D.Fragment,null,n,r?(0,D.cloneElement)(r,{ref:a}):null)}let e4={x:0,y:0,scaleX:1,scaleY:1};function e6(e){let{children:t}=e;return D.createElement(eX.Provider,{value:e_},D.createElement(eV.Provider,{value:e4},t))}let e7={position:"fixed",touchAction:"none"},e8=e=>(0,S.kx)(e)?"transform 250ms ease":void 0,e3=(0,D.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:l,children:i,className:a,rect:o,style:u,transform:s,transition:c=e8}=e;if(!o)return null;let d=l?s:{...s,scaleX:1,scaleY:1},f={...e7,width:o.width,height:o.height,top:o.top,left:o.left,transform:S.Ks.Transform.toString(d),transformOrigin:l&&r?function(e,t){let n=(0,S.e_)(e);if(!n)return"0 0";let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}(r,o):void 0,transition:"function"==typeof c?c(r):c,...u};return D.createElement(n,{className:a,style:f,ref:t},i)}),te={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:S.Ks.Transform.toString(t)},{transform:S.Ks.Transform.toString(n)}]},sideEffects:(r={styles:{active:{opacity:"0"}}},e=>{let{active:t,dragOverlay:n}=e,l={},{styles:i,className:a}=r;if(null!=i&&i.active)for(let[e,n]of Object.entries(i.active))void 0!==n&&(l[e]=t.node.style.getPropertyValue(e),t.node.style.setProperty(e,n));if(null!=i&&i.dragOverlay)for(let[e,t]of Object.entries(i.dragOverlay))void 0!==t&&n.node.style.setProperty(e,t);return null!=a&&a.active&&t.node.classList.add(a.active),null!=a&&a.dragOverlay&&n.node.classList.add(a.dragOverlay),function(){for(let[e,n]of Object.entries(l))t.node.style.setProperty(e,n);null!=a&&a.active&&t.node.classList.remove(a.active)}})},tt=0,tn=D.memo(e=>{var t;let{adjustScale:n=!1,children:r,dropAnimation:l,style:i,transition:a,modifiers:o,wrapperElement:u="div",className:s,zIndex:c=999}=e,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:g,draggableNodes:p,droppableContainers:v,dragOverlay:b,over:m,measuringConfiguration:y,scrollableAncestors:w,scrollableAncestorRects:x,windowRect:E}=e1(),C=(0,D.useContext)(eV),R=(t=null==f?void 0:f.id,(0,D.useMemo)(()=>{if(null!=t)return++tt},[t])),M=eJ(o,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:g,draggingNodeRect:b.rect,over:m,overlayNodeRect:b.rect,scrollableAncestors:w,scrollableAncestorRects:x,transform:C,windowRect:E}),k=eT(h),T=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:l}=e;return(0,S._q)((e,i)=>{if(null===t)return;let a=n.get(e);if(!a)return;let o=a.node.current;if(!o)return;let u=eP(i);if(!u)return;let{transform:s}=(0,S.zk)(i).getComputedStyle(i),c=H(s);if(!c)return;let d="function"==typeof t?t:function(e){let{duration:t,easing:n,sideEffects:r,keyframes:l}={...te,...e};return e=>{let{active:i,dragOverlay:a,transform:o,...u}=e;if(!t)return;let s={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},c={scaleX:1!==o.scaleX?i.rect.width*o.scaleX/a.rect.width:1,scaleY:1!==o.scaleY?i.rect.height*o.scaleY/a.rect.height:1},d={x:o.x-s.x,y:o.y-s.y,...c},f=l({...u,active:i,dragOverlay:a,transform:{initial:o,final:d}}),[h]=f,g=f[f.length-1];if(JSON.stringify(h)===JSON.stringify(g))return;let p=null==r?void 0:r({active:i,dragOverlay:a,...u}),v=a.node.animate(f,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{v.onfinish=()=>{null==p||p(),e()}})}}(t);return eu(o,l.draggable.measure),d({active:{id:e,data:a.data,node:o,rect:l.draggable.measure(o)},draggableNodes:n,dragOverlay:{node:i,rect:l.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:l,transform:c})})}({config:l,draggableNodes:p,droppableContainers:v,measuringConfiguration:y}),L=k?b.setRef:void 0;return D.createElement(e6,null,D.createElement(e5,{animation:T},f&&R?D.createElement(e3,{key:R,id:f.id,ref:L,as:u,activatorEvent:d,adjustScale:n,className:s,transition:a,rect:k,style:{zIndex:c,...i},transform:M},r):null))})},18831(e,t,n){n.d(t,{FN:()=>i,Mk:()=>l,dU:()=>r}),n(74979);let r=e=>{let{transform:t}=e;return{...t,y:0}},l=e=>{let t,{draggingNodeRect:n,transform:r,scrollableAncestorRects:l}=e,i=l[0];return n&&i?(t={...r},n.top+r.y<=i.top?t.y=i.top-n.top:n.bottom+r.y>=i.top+i.height&&(t.y=i.top+i.height-n.bottom),n.left+r.x<=i.left?t.x=i.left-n.left:n.right+r.x>=i.left+i.width&&(t.x=i.left+i.width-n.right),t):r},i=e=>{let{transform:t}=e;return{...t,x:0}}},43627(e,t,n){n.d(t,{JR:()=>S,_G:()=>f,gB:()=>p,gl:()=>E,m$:()=>s});var r=n(96540),l=n(98668),i=n(74979);function a(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function o(e){return null!==e&&e>=0}let u={scaleX:1,scaleY:1},s=e=>{var t,n,r,l;let i,a,o,{rects:s,activeNodeRect:c,activeIndex:d,overIndex:f,index:h}=e,g=null!=(t=s[d])?t:c;if(!g)return null;let p=(n=s,r=h,l=d,i=n[r],a=n[r-1],o=n[r+1],i&&(a||o)?ld&&h<=f?{x:-g.width-p,y:0,...u}:h=f?{x:g.width+p,y:0,...u}:{x:0,y:0,...u}},c=e=>{let{rects:t,activeIndex:n,overIndex:r,index:l}=e,i=a(t,r,n),o=t[l],u=i[l];return u&&o?{x:u.left-o.left,y:u.top-o.top,scaleX:u.width/o.width,scaleY:u.height/o.height}:null},d={scaleX:1,scaleY:1},f=e=>{var t,n,r,l;let i,a,o,{activeIndex:u,activeNodeRect:s,index:c,rects:f,overIndex:h}=e,g=null!=(t=f[u])?t:s;if(!g)return null;if(c===u){let e=f[h];return e?{x:0,y:uu&&c<=h?{x:0,y:-g.height-p,...d}:c=h?{x:0,y:g.height+p,...d}:{x:0,y:0,...d}},h="Sortable",g=r.createContext({activeIndex:-1,containerId:h,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:c,disabled:{draggable:!1,droppable:!1}});function p(e){let{children:t,id:n,items:a,strategy:o=c,disabled:u=!1}=e,{active:s,dragOverlay:d,droppableRects:f,over:p,measureDroppableContainers:v}=(0,l.fF)(),b=(0,i.YG)(h,n),m=null!==d.rect,y=(0,r.useMemo)(()=>a.map(e=>"object"==typeof e&&"id"in e?e.id:e),[a]),w=null!=s,x=s?y.indexOf(s.id):-1,E=p?y.indexOf(p.id):-1,D=(0,r.useRef)(y),C=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{C&&w&&v(y)},[C,y,w,v]),(0,r.useEffect)(()=>{D.current=y},[y]);let M=(0,r.useMemo)(()=>({activeIndex:x,containerId:b,disabled:R,disableTransforms:S,items:y,overIndex:E,useDragOverlay:m,sortedRects:y.reduce((e,t,n)=>{let r=f.get(t);return r&&(e[n]=r),e},Array(y.length)),strategy:o}),[x,b,R.draggable,R.droppable,S,y,E,f,m,o]);return r.createElement(g.Provider,{value:M},t)}let v=e=>{let{id:t,items:n,activeIndex:r,overIndex:l}=e;return a(n,r,l).indexOf(t)},b=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:l,items:i,newIndex:a,previousItems:o,previousContainerId:u,transition:s}=e;return!!s&&!!r&&(o===i||l!==a)&&(!!n||a!==l&&t===u)},m={duration:200,easing:"ease"},y="transform",w=i.Ks.Transition.toString({property:y,duration:0,easing:"linear"}),x={roleDescription:"sortable"};function E(e){var t,n,a,u;let{animateLayoutChanges:s=b,attributes:c,disabled:d,data:f,getNewIndex:h=v,id:p,strategy:E,resizeObserverConfig:D,transition:C=m}=e,{items:S,containerId:R,activeIndex:M,disabled:k,disableTransforms:T,sortedRects:L,overIndex:O,useDragOverlay:N,strategy:I}=(0,r.useContext)(g),z=(t=d,n=k,"boolean"==typeof t?{draggable:t,droppable:!1}:{draggable:null!=(a=null==t?void 0:t.draggable)?a:n.draggable,droppable:null!=(u=null==t?void 0:t.droppable)?u:n.droppable}),A=S.indexOf(p),Y=(0,r.useMemo)(()=>({sortable:{containerId:R,index:A,items:S},...f}),[R,f,A,S]),P=(0,r.useMemo)(()=>S.slice(S.indexOf(p)),[S,p]),{rect:W,node:B,isOver:F,setNodeRef:K}=(0,l.zM)({id:p,data:Y,disabled:z.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...D}}),{active:j,activatorEvent:_,activeNodeRect:X,attributes:U,setNodeRef:G,listeners:q,isDragging:H,over:J,setActivatorNodeRef:V,transform:Q}=(0,l.PM)({id:p,data:Y,attributes:{...x,...c},disabled:z.draggable}),Z=(0,i.jn)(K,G),$=!!j,ee=$&&!T&&o(M)&&o(O),et=!N&&H,en=et&&ee?Q:null,er=ee?null!=en?en:(null!=E?E:I)({rects:L,activeNodeRect:X,activeIndex:M,overIndex:O,index:A}):null,el=o(M)&&o(O)?h({id:p,items:S,activeIndex:M,overIndex:O}):A,ei=null==j?void 0:j.id,ea=(0,r.useRef)({activeId:ei,items:S,newIndex:el,containerId:R}),eo=S!==ea.current.items,eu=s({active:j,containerId:R,isDragging:H,isSorting:$,id:p,index:A,items:S,newIndex:ea.current.newIndex,previousItems:ea.current.items,previousContainerId:ea.current.containerId,transition:C,wasDragging:null!=ea.current.activeId}),es=function(e){let{disabled:t,index:n,node:a,rect:o}=e,[u,s]=(0,r.useState)(null),c=(0,r.useRef)(n);return(0,i.Es)(()=>{if(!t&&n!==c.current&&a.current){let e=o.current;if(e){let t=(0,l.Sj)(a.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)&&s(n)}}n!==c.current&&(c.current=n)},[t,n,a,o]),(0,r.useEffect)(()=>{u&&s(null)},[u]),u}({disabled:!eu,index:A,node:B,rect:W});return(0,r.useEffect)(()=>{$&&ea.current.newIndex!==el&&(ea.current.newIndex=el),R!==ea.current.containerId&&(ea.current.containerId=R),S!==ea.current.items&&(ea.current.items=S)},[$,el,R,S]),(0,r.useEffect)(()=>{if(ei===ea.current.activeId)return;if(ei&&!ea.current.activeId){ea.current.activeId=ei;return}let e=setTimeout(()=>{ea.current.activeId=ei},50);return()=>clearTimeout(e)},[ei]),{active:j,activeIndex:M,attributes:U,data:Y,rect:W,index:A,newIndex:el,items:S,isOver:F,isSorting:$,isDragging:H,listeners:q,node:B,overIndex:O,over:J,setNodeRef:Z,setActivatorNodeRef:V,setDroppableNodeRef:K,setDraggableNodeRef:G,transform:null!=es?es:er,transition:es||eo&&ea.current.newIndex===A?w:(!et||(0,i.kx)(_))&&C&&($||eu)?i.Ks.Transition.toString({...C,property:y}):void 0}}function D(e){if(!e)return!1;let t=e.data.current;return!!t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable}let C=[l.vL.Down,l.vL.Right,l.vL.Up,l.vL.Left],S=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:a,droppableContainers:o,over:u,scrollableAncestors:s}}=t;if(C.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];o.getEnabled().forEach(n=>{if(!n||null!=n&&n.disabled)return;let i=a.get(n.id);if(i)switch(e.code){case l.vL.Down:r.topi.top&&t.push(n);break;case l.vL.Left:r.left>i.left&&t.push(n);break;case l.vL.Right:r.left1&&(h=f[1].id),null!=h){let e=o.get(n.id),t=o.get(h),u=t?a.get(t.id):null,f=null==t?void 0:t.node.current;if(f&&u&&e&&t){var c,d;let n=(0,l.sl)(f).some((e,t)=>s[t]!==e),a=R(e,t),o=(c=e,d=t,!!D(c)&&!!D(d)&&!!R(c,d)&&c.data.current.sortable.indexp,Es:()=>h,KG:()=>b,Ks:()=>M,Ll:()=>o,Re:()=>C,Sw:()=>i,TW:()=>f,WQ:()=>D,YG:()=>x,YN:()=>v,ZC:()=>y,_q:()=>g,ag:()=>T,e_:()=>R,jn:()=>l,kx:()=>S,l6:()=>a,lk:()=>m,sb:()=>c,wz:()=>s,xZ:()=>d,zk:()=>u});var r=n(96540);function l(){for(var e=arguments.length,t=Array(e),n=0;ne=>{t.forEach(t=>t(e))},t)}let i="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){let t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function o(e){return"nodeType"in e}function u(e){var t,n;return e?a(e)?e:o(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function s(e){let{Document:t}=u(e);return e instanceof t}function c(e){return!a(e)&&e instanceof u(e).HTMLElement}function d(e){return e instanceof u(e).SVGElement}function f(e){return e?a(e)?e.document:o(e)?s(e)?e:c(e)||d(e)?e.ownerDocument:document:document:document}let h=i?r.useLayoutEffect:r.useEffect;function g(e){let t=(0,r.useRef)(e);return h(()=>{t.current=e}),(0,r.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r{e.current=setInterval(t,n)},[]),(0,r.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}function v(e,t){void 0===t&&(t=[e]);let n=(0,r.useRef)(e);return h(()=>{n.current!==e&&(n.current=e)},t),n}function b(e,t){let n=(0,r.useRef)();return(0,r.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function m(e){let t=g(e),n=(0,r.useRef)(null),l=(0,r.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,l]}function y(e){let t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e},[e]),t.current}let w={};function x(e,t){return(0,r.useMemo)(()=>{if(t)return t;let 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=Array(n>1?n-1:0),l=1;l{for(let[r,l]of Object.entries(n)){let n=t[r];null!=n&&(t[r]=n+e*l)}return t},{...t})}}let D=E(1),C=E(-1);function S(e){if(!e)return!1;let{KeyboardEvent:t}=u(e.target);return t&&e instanceof t}function R(e){if(function(e){if(!e)return!1;let{TouchEvent:t}=u(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return"clientX"in e&&"clientY"in e?{x:e.clientX,y:e.clientY}:null}let M=Object.freeze({Translate:{toString(e){if(!e)return;let{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;let{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[M.Translate.toString(e),M.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),k="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function T(e){return e.matches(k)?e:e.querySelector(k)}}}]); //# sourceMappingURL=82681-e2d03207282b9e0b-b02d3c766f072275.js.map