UNPKG

@cocalc/static

Version:

CoCalc's static frontend Webpack-based build system and framework

1 lines 78.9 kB
(self.webpackChunk_cocalc_static=self.webpackChunk_cocalc_static||[]).push([[2108],{11029:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(86994),i=r(63505);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var a=r(17583),l=function(e,t){return i.createElement(a.Z,(0,n.Z)((0,n.Z)({},e),{},{ref:t,icon:o}))};l.displayName="FilterOutlined";const u=i.forwardRef(l)},82704:(e,t,r)=>{"use strict";r.d(t,{LB:()=>st,y9:()=>Ct,g4:()=>ve,VK:()=>$,Cj:()=>ht,O1:()=>vt,Zj:()=>yt});var n=r(63505),i=r(92942),o=r(76110);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l={display:"none"};function u(e){var t=e.id,r=e.value;return n.createElement("div",{id:t,style:l},r)}var c={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"};function s(e){var t=e.id,r=e.announcement;return n.createElement("div",{id:t,style:c,role:"status","aria-live":"assertive","aria-atomic":!0},r)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t,r,n,i,o,a){try{var l=e[o](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,i)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e,t,r){return p=h()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&C(i,r.prototype),i},p.apply(null,arguments)}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e,t,r){return m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=w(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}},m(e,t,r||e)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}function S(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){b(e,t,r[t])}))}return e}function E(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function R(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function D(e,t){return!t||"object"!==I(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw i}}return o}}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var I=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function M(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function T(e){var t="function"==typeof Map?new Map:void 0;return T=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,w(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),C(n,e)},T(e)}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=w(e);if(t){var i=w(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return D(this,r)}}var N,L=(0,n.createContext)(null),P={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 "},z={onDragStart:function(e){return"Picked up draggable item "+e.active.id+"."},onDragOver:function(e){var t=e.active,r=e.over;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd:function(e){var t=e.active,r=e.over;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel:function(e){return"Dragging was cancelled. Draggable item "+e.active.id+" was dropped."}};function B(e){var t,r,l=e.announcements,c=void 0===l?z:l,d=e.container,f=e.hiddenTextDescribedById,v=e.screenReaderInstructions,h=void 0===v?P:v,p=function(){var e,t,r=(e=(0,n.useState)(""),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],o=r[1];return{announce:(0,n.useCallback)((function(e){null!=e&&o(e)}),[]),announcement:i}}(),y=p.announce,g=p.announcement,b=(0,o.Ld)("DndLiveRegion"),m=k((0,n.useState)(!1),2),w=m[0],x=m[1];if((0,n.useEffect)((function(){x(!0)}),[]),t=(0,n.useMemo)((function(){return{onDragStart:function(e){var t=e.active;y(c.onDragStart({active:t}))},onDragMove:function(e){var t=e.active,r=e.over;c.onDragMove&&y(c.onDragMove({active:t,over:r}))},onDragOver:function(e){var t=e.active,r=e.over;y(c.onDragOver({active:t,over:r}))},onDragEnd:function(e){var t=e.active,r=e.over;y(c.onDragEnd({active:t,over:r}))},onDragCancel:function(e){var t=e.active,r=e.over;y(c.onDragCancel({active:t,over:r}))}}}),[y,c]),r=(0,n.useContext)(L),(0,n.useEffect)((function(){if(!r)throw new Error("useDndMonitor must be used within a children of <DndContext>");return r(t)}),[t,r]),!w)return null;var S=n.createElement(n.Fragment,null,n.createElement(u,{id:f,value:h.draggable}),n.createElement(s,{id:b,announcement:g}));return d?(0,i.createPortal)(S,d):S}function F(){}!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"}(N||(N={}));var X=Object.freeze({x:0,y:0});function U(e,t){var r=(0,o.DC)(e);return r?(r.x-t.left)/t.width*100+"% "+(r.y-t.top)/t.height*100+"%":"0 0"}function Y(e,t){var r=e.data.value;return t.data.value-r}function J(e,t){var r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-n,l=o-r;if(n<i&&r<o){var u=t.width*t.height,c=e.width*e.height,s=a*l;return Number((s/(u+c-s)).toFixed(4))}return 0}var H=function(e){var t=e.collisionRect,r=e.droppableRects,n=e.droppableContainers,i=[],o=!0,a=!1,l=void 0;try{for(var u,c=n[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,d=s.id,f=r.get(d);if(f){var v=J(f,t);v>0&&i.push({id:d,data:{droppableContainer:s,value:v}})}}}catch(e){a=!0,l=e}finally{try{o||null==c.return||c.return()}finally{if(a)throw l}}return i.sort(Y)};function _(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:X}function K(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((function(t,r){return E(O({},t),{top:t.top+e*r.y,bottom:t.bottom+e*r.y,left:t.left+e*r.x,right:t.right+e*r.x})}),O({},t))}}var G=K(1);function q(e){if(e.startsWith("matrix3d(")){var t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){var r=e.slice(7,-1).split(/, /);return{x:+r[4],y:+r[5],scaleX:+r[0],scaleY:+r[3]}}return null}var W,V={ignoreTransform:!1};function $(e,t){void 0===t&&(t=V);var r=e.getBoundingClientRect();if(t.ignoreTransform){var n=(0,(0,o.Jj)(e).getComputedStyle)(e),i=n.transform,a=n.transformOrigin;i&&(r=function(e,t,r){var n=q(t);if(!n)return e;var i=n.scaleX,o=n.scaleY,a=n.x,l=n.y,u=e.left-a-(1-i)*parseFloat(r),c=e.top-l-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),s=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:s,height:d,top:c,right:u+s,bottom:c+d,left:u}}(r,i,a))}return{top:r.top,left:r.left,width:r.width,height:r.height,bottom:r.bottom,right:r.right}}function Z(e){return $(e,{ignoreTransform:!0})}function Q(e,t){var r=[];return e?function n(i){if(null!=t&&r.length>=t)return r;if(!i)return r;if((0,o.qk)(i)&&null!=i.scrollingElement&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!(0,o.Re)(i)||(0,o.vZ)(i))return r;if(r.includes(i))return r;var a=(0,(0,o.Jj)(i).getComputedStyle)(i);return i!==e&&function(e,t){void 0===t&&(t=(0,o.Jj)(e).getComputedStyle(e));var r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((function(e){var n=t[e];return"string"==typeof n&&r.test(n)}))}(i,a)&&r.push(i),function(e,t){return void 0===t&&(t=(0,o.Jj)(e).getComputedStyle(e)),"fixed"===t.position}(i,a)?r:n(i.parentNode)}(e):r}function ee(e){var t=k(Q(e,1),1)[0];return null!=t?t:null}function te(e){return o.Nq&&e?(0,o.FJ)(e)?e:(0,o.UG)(e)?(0,o.qk)(e)||e===(0,o.r3)(e).scrollingElement?window:(0,o.Re)(e)?e:null:null:null}function re(e){return(0,o.FJ)(e)?e.scrollX:e.scrollLeft}function ne(e){return(0,o.FJ)(e)?e.scrollY:e.scrollTop}function ie(e){return{x:re(e),y:ne(e)}}function oe(e){return!(!o.Nq||!e)&&e===document.scrollingElement}function ae(e){var t={x:0,y:0},r=oe(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=n.y,isRight:e.scrollLeft>=n.x,maxScroll:n,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(W||(W={}));var le={x:.2,y:.2};function ue(e,t,r,n,i){var o=r.top,a=r.left,l=r.right,u=r.bottom;void 0===n&&(n=10),void 0===i&&(i=le);var c=ae(e),s=c.isTop,d=c.isBottom,f=c.isLeft,v=c.isRight,h={x:0,y:0},p={x:0,y:0},y=t.height*i.y,g=t.width*i.x;return!s&&o<=t.top+y?(h.y=W.Backward,p.y=n*Math.abs((t.top+y-o)/y)):!d&&u>=t.bottom-y&&(h.y=W.Forward,p.y=n*Math.abs((t.bottom-y-u)/y)),!v&&l>=t.right-g?(h.x=W.Forward,p.x=n*Math.abs((t.right-g-l)/g)):!f&&a<=t.left+g&&(h.x=W.Backward,p.x=n*Math.abs((t.left+g-a)/g)),{direction:h,speed:p}}function ce(e){if(e===document.scrollingElement){var t=window.innerWidth,r=window.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}var n=e.getBoundingClientRect();return{top:n.top,left:n.left,right:n.right,bottom:n.bottom,width:e.clientWidth,height:e.clientHeight}}function se(e){return e.reduce((function(e,t){return(0,o.IH)(e,ie(t))}),X)}function de(e,t){if(void 0===t&&(t=$),e){var r=t(e),n=r.top,i=r.left,o=r.bottom,a=r.right;ee(e)&&(o<=0||a<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}}var fe,ve,he=[["x",["left","right"],function(e){return e.reduce((function(e,t){return e+re(t)}),0)}],["y",["top","bottom"],function(e){return e.reduce((function(e,t){return e+ne(t)}),0)}]],pe=function e(t,r){var n=this;v(this,e),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;var i=Q(r),o=se(i);this.rect=O({},t),this.width=t.width,this.height=t.height;var a=!0,l=!1,u=void 0;try{for(var c,s=this,d=function(){var e=k(c.value,3),t=e[0],r=e[1],a=e[2],l=!0,u=!1,d=void 0;try{for(var f,v=s,h=function(){var e=f.value;Object.defineProperty(v,e,{get:function(){var r=a(i),l=o[t]-r;return n.rect[e]+l},enumerable:!0})},p=r[Symbol.iterator]();!(l=(f=p.next()).done);l=!0)h()}catch(e){u=!0,d=e}finally{try{l||null==p.return||p.return()}finally{if(u)throw d}}},f=he[Symbol.iterator]();!(a=(c=f.next()).done);a=!0)d()}catch(e){l=!0,u=e}finally{try{a||null==f.return||f.return()}finally{if(l)throw u}}Object.defineProperty(this,"rect",{enumerable:!1})},ye=function(){function e(t){var r=this;v(this,e),this.target=void 0,this.listeners=[],this.removeAll=function(){r.listeners.forEach((function(e){var t,n;return null==(n=r.target)?void 0:(t=n).removeEventListener.apply(t,j(e))}))},this.target=t}return g(e,[{key:"add",value:function(e,t,r){var n;null==(n=this.target)||n.addEventListener(e,t,r),this.listeners.push([e,t,r])}}]),e}();function ge(e,t){var r=Math.abs(e.x),n=Math.abs(e.y);return"number"==typeof t?Math.sqrt(Math.pow(r,2)+Math.pow(n,2))>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t&&n>t.y}function be(e){e.preventDefault()}function me(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"}(fe||(fe={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(ve||(ve={}));var we={start:[ve.Space,ve.Enter],cancel:[ve.Esc],end:[ve.Space,ve.Enter]},xe=function(e,t){var r=t.currentCoordinates;switch(e.code){case ve.Right:return E(O({},r),{x:r.x+25});case ve.Left:return E(O({},r),{x:r.x-25});case ve.Down:return E(O({},r),{y:r.y+25});case ve.Up:return E(O({},r),{y:r.y-25})}},Se=function(){function e(t){v(this,e),this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;var r=t.event.target;this.props=t,this.listeners=new ye((0,o.r3)(r)),this.windowListeners=new ye((0,o.Jj)(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}return g(e,[{key:"attach",value:function(){var e=this;this.handleStart(),this.windowListeners.add(fe.Resize,this.handleCancel),this.windowListeners.add(fe.VisibilityChange,this.handleCancel),setTimeout((function(){return e.listeners.add(fe.Keydown,e.handleKeyDown)}))}},{key:"handleStart",value:function(){var e=this.props,t=e.activeNode,r=e.onStart,n=t.node.current;n&&de(n),r(X)}},{key:"handleKeyDown",value:function(e){if((0,o.vd)(e)){var t=this.props,r=t.active,n=t.context,i=t.options,a=i.keyboardCodes,l=void 0===a?we:a,u=i.coordinateGetter,c=void 0===u?xe:u,s=i.scrollBehavior,d=void 0===s?"smooth":s,f=e.code;if(l.end.includes(f))return void this.handleEnd(e);if(l.cancel.includes(f))return void this.handleCancel(e);var v=n.current.collisionRect,h=v?{x:v.left,y:v.top}:X;this.referenceCoordinates||(this.referenceCoordinates=h);var p=c(e,{active:r,context:n.current,currentCoordinates:h});if(p){var y=(0,o.$X)(p,h),g={x:0,y:0},b=n.current.scrollableAncestors,m=!0,w=!1,x=void 0;try{for(var S,O=b[Symbol.iterator]();!(m=(S=O.next()).done);m=!0){var E=S.value,R=e.code,D=ae(E),C=D.isTop,k=D.isRight,j=D.isLeft,I=D.isBottom,M=D.maxScroll,T=D.minScroll,A=ce(E),N={x:Math.min(R===ve.Right?A.right-A.width/2:A.right,Math.max(R===ve.Right?A.left:A.left+A.width/2,p.x)),y:Math.min(R===ve.Down?A.bottom-A.height/2:A.bottom,Math.max(R===ve.Down?A.top:A.top+A.height/2,p.y))},L=R===ve.Right&&!k||R===ve.Left&&!j,P=R===ve.Down&&!I||R===ve.Up&&!C;if(L&&N.x!==p.x){var z=E.scrollLeft+y.x,B=R===ve.Right&&z<=M.x||R===ve.Left&&z>=T.x;if(B&&!y.y)return void E.scrollTo({left:z,behavior:d});g.x=B?E.scrollLeft-z:R===ve.Right?E.scrollLeft-M.x:E.scrollLeft-T.x,g.x&&E.scrollBy({left:-g.x,behavior:d});break}if(P&&N.y!==p.y){var F=E.scrollTop+y.y,U=R===ve.Down&&F<=M.y||R===ve.Up&&F>=T.y;if(U&&!y.x)return void E.scrollTo({top:F,behavior:d});g.y=U?E.scrollTop-F:R===ve.Down?E.scrollTop-M.y:E.scrollTop-T.y,g.y&&E.scrollBy({top:-g.y,behavior:d});break}}}catch(e){w=!0,x=e}finally{try{m||null==O.return||O.return()}finally{if(w)throw x}}this.handleMove(e,(0,o.IH)((0,o.$X)(p,this.referenceCoordinates),g))}}}},{key:"handleMove",value:function(e,t){var r=this.props.onMove;e.preventDefault(),r(t)}},{key:"handleEnd",value:function(e){var t=this.props.onEnd;e.preventDefault(),this.detach(),t()}},{key:"handleCancel",value:function(e){var t=this.props.onCancel;e.preventDefault(),this.detach(),t()}},{key:"detach",value:function(){this.listeners.removeAll(),this.windowListeners.removeAll()}}]),e}();function Oe(e){return Boolean(e&&"distance"in e)}function Ee(e){return Boolean(e&&"delay"in e)}Se.activators=[{eventName:"onKeyDown",handler:function(e,t,r){var n=t.keyboardCodes,i=void 0===n?we:n,o=t.onActivation,a=r.active,l=e.nativeEvent.code;if(i.start.includes(l)){var u=a.activatorNode.current;return!(u&&e.target!==u||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];var Re=function(){function e(t,r,n){var i;v(this,e),void 0===n&&(n=function(e){return S(e,(0,o.Jj)(e).EventTarget)?e:(0,o.r3)(e)}(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;var a=t.event,l=a.target;this.props=t,this.events=r,this.document=(0,o.r3)(l),this.documentListeners=new ye(this.document),this.listeners=new ye(n),this.windowListeners=new ye((0,o.Jj)(l)),this.initialCoordinates=null!=(i=(0,o.DC)(a))?i:X,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()}return g(e,[{key:"attach",value:function(){var e=this.events,t=this.props.options.activationConstraint;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(fe.Resize,this.handleCancel),this.windowListeners.add(fe.DragStart,be),this.windowListeners.add(fe.VisibilityChange,this.handleCancel),this.windowListeners.add(fe.ContextMenu,be),this.documentListeners.add(fe.Keydown,this.handleKeydown),t){if(Oe(t))return;if(Ee(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}},{key:"detach",value:function(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}},{key:"handleStart",value:function(){var e=this.initialCoordinates,t=this.props.onStart;e&&(this.activated=!0,this.documentListeners.add(fe.Click,me,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(fe.SelectionChange,this.removeTextSelection),t(e))}},{key:"handleMove",value:function(e){var t,r=this,n=r.activated,i=r.initialCoordinates,a=r.props,l=a.onMove,u=a.options.activationConstraint;if(i){var c=null!=(t=(0,o.DC)(e))?t:X,s=(0,o.$X)(i,c);if(!n&&u){if(Ee(u))return ge(s,u.tolerance)?this.handleCancel():void 0;if(Oe(u))return null!=u.tolerance&&ge(s,u.tolerance)?this.handleCancel():ge(s,u.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),l(c)}}},{key:"handleEnd",value:function(){var e=this.props.onEnd;this.detach(),e()}},{key:"handleCancel",value:function(){var e=this.props.onCancel;this.detach(),e()}},{key:"handleKeydown",value:function(e){e.code===ve.Esc&&this.handleCancel()}},{key:"removeTextSelection",value:function(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}]),e}(),De={move:{name:"pointermove"},end:{name:"pointerup"}},Ce=function(e){x(r,e);var t=A(r);function r(e){v(this,r);var n=e.event,i=(0,o.r3)(n.target);return t.call(this,e,De,i)}return r}(Re);Ce.activators=[{eventName:"onPointerDown",handler:function(e,t){var r=e.nativeEvent,n=t.onActivation;return!(!r.isPrimary||0!==r.button||(null==n||n({event:r}),0))}}];var ke,je={move:{name:"mousemove"},end:{name:"mouseup"}};!function(e){e[e.RightClick=2]="RightClick"}(ke||(ke={}));var Ie=function(e){x(r,e);var t=A(r);function r(e){return v(this,r),t.call(this,e,je,(0,o.r3)(e.event.target))}return r}(Re);Ie.activators=[{eventName:"onMouseDown",handler:function(e,t){var r=e.nativeEvent,n=t.onActivation;return r.button!==ke.RightClick&&(null==n||n({event:r}),!0)}}];var Me,Te,Ae,Ne,Le={move:{name:"touchmove"},end:{name:"touchend"}},Pe=function(e){x(r,e);var t=A(r);function r(e){return v(this,r),t.call(this,e,Le)}return g(r,null,[{key:"setup",value:function(){var e=function(){};return window.addEventListener(Le.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Le.move.name,e)}}}]),r}(Re);Pe.activators=[{eventName:"onTouchStart",handler:function(e,t){var r=e.nativeEvent,n=t.onActivation;return!(r.touches.length>1||(null==n||n({event:r}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Me||(Me={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Te||(Te={}));var ze,Be,Fe={x:(Ae={},b(Ae,W.Backward,!1),b(Ae,W.Forward,!1),Ae),y:(Ne={},b(Ne,W.Backward,!1),b(Ne,W.Forward,!1),Ne)};!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(ze||(ze={})),function(e){e.Optimized="optimized"}(Be||(Be={}));var Xe=new Map;function Ue(e,t){return(0,o.Gj)((function(r){return e?r||("function"==typeof t?t(e):e):null}),[t,e])}function Ye(e){var t=e.callback,r=e.disabled,i=(0,o.zX)(t),a=(0,n.useMemo)((function(){if(!r&&"undefined"!=typeof window&&void 0!==window.ResizeObserver)return new(0,window.ResizeObserver)(i)}),[r]);return(0,n.useEffect)((function(){return function(){return null==a?void 0:a.disconnect()}}),[a]),a}function Je(e){return new pe($(e),e)}function He(e,t,r){void 0===t&&(t=Je);var i=k((0,n.useReducer)((function(n){if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=n?n:r)?i:null;var o=t(e);return JSON.stringify(n)===JSON.stringify(o)?n:o}),null),2),a=i[0],l=i[1],u=function(e){var t=e.callback,r=e.disabled,i=(0,o.zX)(t),a=(0,n.useMemo)((function(){if(!r&&"undefined"!=typeof window&&void 0!==window.MutationObserver)return new(0,window.MutationObserver)(i)}),[i,r]);return(0,n.useEffect)((function(){return function(){return null==a?void 0:a.disconnect()}}),[a]),a}({callback:function(t){if(e){var r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var u=o.value,c=u.type,s=u.target;if("childList"===c&&S(s,HTMLElement)&&s.contains(e)){l();break}}}catch(e){n=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}}}),c=Ye({callback:l});return(0,o.LI)((function(){l(),e?(null==c||c.observe(e),null==u||u.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==u||u.disconnect())}),[e]),a}var _e=[];function Ke(e,t){void 0===t&&(t=[]);var r=(0,n.useRef)(null);return(0,n.useEffect)((function(){r.current=null}),t),(0,n.useEffect)((function(){var t=e!==X;t&&!r.current&&(r.current=e),!t&&r.current&&(r.current=null)}),[e]),r.current?(0,o.$X)(e,r.current):X}function Ge(e){return(0,n.useMemo)((function(){return e?function(e){var t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}(e):null}),[e])}var qe=[];function We(e){if(!e)return null;if(e.children.length>1)return e;var t=e.children[0];return(0,o.Re)(t)?t:e}var Ve=[{sensor:Ce,options:{}},{sensor:Se,options:{}}],$e={current:{}},Ze={draggable:{measure:Z},droppable:{measure:Z,strategy:ze.WhileDragging,frequency:Be.Optimized},dragOverlay:{measure:$}},Qe=function(e){x(r,e);var t=A(r);function r(){return v(this,r),t.apply(this,arguments)}return g(r,[{key:"get",value:function(e){var t;return null!=e&&null!=(t=m(w(r.prototype),"get",this).call(this,e))?t:void 0}},{key:"toArray",value:function(){return Array.from(this.values())}},{key:"getEnabled",value:function(){return this.toArray().filter((function(e){return!e.disabled}))}},{key:"getNodeFor",value:function(e){var t,r;return null!=(t=null==(r=this.get(e))?void 0:r.node.current)?t:void 0}}]),r}(T(Map)),et={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Qe,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:F},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ze,measureDroppableContainers:F,windowRect:null,measuringScheduled:!1},tt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:F,draggableNodes:new Map,over:null,measureDroppableContainers:F},rt=(0,n.createContext)(tt),nt=(0,n.createContext)(et);function it(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Qe}}}function ot(e,t){switch(t.type){case N.DragStart:return E(O({},e),{draggable:E(O({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case N.DragMove:return e.draggable.active?E(O({},e),{draggable:E(O({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})}):e;case N.DragEnd:case N.DragCancel:return E(O({},e),{draggable:E(O({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case N.RegisterDroppable:var r=t.element,n=r.id,i=new Qe(e.droppable.containers);return i.set(n,r),E(O({},e),{droppable:E(O({},e.droppable),{containers:i})});case N.SetDroppableDisabled:var o=t.id,a=t.key,l=t.disabled,u=e.droppable.containers.get(o);if(!u||a!==u.key)return e;var c=new Qe(e.droppable.containers);return c.set(o,E(O({},u),{disabled:l})),E(O({},e),{droppable:E(O({},e.droppable),{containers:c})});case N.UnregisterDroppable:var s=t.id,d=t.key,f=e.droppable.containers.get(s);if(!f||d!==f.key)return e;var v=new Qe(e.droppable.containers);return v.delete(s),E(O({},e),{droppable:E(O({},e.droppable),{containers:v})});default:return e}}function at(e){var t=e.disabled,r=(0,n.useContext)(rt),i=r.active,a=r.activatorEvent,l=r.draggableNodes,u=(0,o.D9)(a),c=(0,o.D9)(null==i?void 0:i.id);return(0,n.useEffect)((function(){if(!t&&!a&&u&&null!=c){if(!(0,o.vd)(u))return;if(document.activeElement===u.target)return;var e=l.get(c);if(!e)return;var r=e.activatorNode,n=e.node;if(!r.current&&!n.current)return;requestAnimationFrame((function(){for(var e=0,t=[r.current,n.current];e<t.length;e++){var i=t[e];if(i){var a=(0,o.so)(i);if(a){a.focus();break}}}}))}}),[a,t,l,c,u]),null}function lt(e,t){var r=t.transform,n=R(t,["transform"]);return null!=e&&e.length?e.reduce((function(e,t){return t(O({transform:e},n))}),r):r}var ut,ct=(0,n.createContext)(E(O({},X),{scaleX:1,scaleY:1}));!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(ut||(ut={}));var st=(0,n.memo)((function(e){var t,r,a,l,u,c,s,d,v,h,p=e.id,y=e.accessibility,g=e.autoScroll,m=void 0===g||g,w=e.children,x=e.sensors,S=void 0===x?Ve:x,D=e.collisionDetection,C=void 0===D?H:D,I=e.measuring,M=e.modifiers,T=R(e,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]),A=k((0,n.useReducer)(ot,void 0,it),2),P=A[0],z=A[1],F=k((u=k((0,n.useState)((function(){return new Set})),1)[0],c=(0,n.useCallback)((function(e){return u.add(e),function(){return u.delete(e)}}),[u]),[(0,n.useCallback)((function(e){var t=e.type,r=e.event;u.forEach((function(e){var n;return null==(n=e[t])?void 0:n.call(e,r)}))}),[u]),c]),2),U=F[0],Y=F[1],J=k((0,n.useState)(ut.Uninitialized),2),K=J[0],q=J[1],V=K===ut.Initialized,Z=P.draggable,re=Z.active,ne=Z.nodes,ae=Z.translate,le=P.droppable.containers,ce=re?ne.get(re):null,de=(0,n.useRef)({initial:null,translated:null}),fe=(0,n.useMemo)((function(){var e;return null!=re?{id:re,data:null!=(e=null==ce?void 0:ce.data)?e:$e,rect:de}:null}),[re,ce]),ve=(0,n.useRef)(null),he=k((0,n.useState)(null),2),ye=he[0],ge=he[1],be=k((0,n.useState)(null),2),me=be[0],we=be[1],xe=(0,o.Ey)(T,Object.values(T)),Se=(0,o.Ld)("DndDescribedBy",p),Oe=(0,n.useMemo)((function(){return le.getEnabled()}),[le]),Ee=(s=I,(0,n.useMemo)((function(){return{draggable:O({},Ze.draggable,null==s?void 0:s.draggable),droppable:O({},Ze.droppable,null==s?void 0:s.droppable),dragOverlay:O({},Ze.dragOverlay,null==s?void 0:s.dragOverlay)}}),[null==s?void 0:s.draggable,null==s?void 0:s.droppable,null==s?void 0:s.dragOverlay])),Re=function(e,t){var r=t.dragging,i=t.dependencies,a=t.config,l=k((0,n.useState)(null),2),u=l[0],c=l[1],s=null!=u,d=a.frequency,f=a.measure,v=a.strategy,h=(0,n.useRef)(e),p=function(){switch(v){case ze.Always:return!1;case ze.BeforeDragging:return r;default:return!r}}(),y=(0,o.Ey)(p),g=(0,n.useCallback)((function(e){void 0===e&&(e=[]),y.current||c((function(t){return t?t.concat(e):e}))}),[y]),b=(0,n.useRef)(null),m=(0,o.Gj)((function(t){if(p&&!r)return Xe;var n=u;if(!t||t===Xe||h.current!==e||null!=n){var i=new Map,o=!0,a=!1,l=void 0;try{for(var c,s=e[Symbol.iterator]();!(o=(c=s.next()).done);o=!0){var d=c.value;if(d)if(n&&n.length>0&&!n.includes(d.id)&&d.rect.current)i.set(d.id,d.rect.current);else{var v=d.node.current,y=v?new pe(f(v),v):null;d.rect.current=y,y&&i.set(d.id,y)}}}catch(e){a=!0,l=e}finally{try{o||null==s.return||s.return()}finally{if(a)throw l}}return i}return t}),[e,u,r,p,f]);return(0,n.useEffect)((function(){h.current=e}),[e]),(0,n.useEffect)((function(){p||requestAnimationFrame((function(){return g()}))}),[r,p]),(0,n.useEffect)((function(){s&&c(null)}),[s]),(0,n.useEffect)((function(){p||"number"!=typeof d||null!==b.current||(b.current=setTimeout((function(){g(),b.current=null}),d))}),[d,p,g].concat(j(i))),{droppableRects:m,measureDroppableContainers:g,measuringScheduled:s}}(Oe,{dragging:V,dependencies:[ae.x,ae.y],config:Ee.droppable}),De=Re.droppableRects,Ce=Re.measureDroppableContainers,ke=Re.measuringScheduled,je=function(e,t){var r=null!==t?e.get(t):void 0,n=r?r.node.current:null;return(0,o.Gj)((function(e){var r;return null===t?null:null!=(r=null!=n?n:e)?r:null}),[n,t])}(ne,re),Ie=(0,n.useMemo)((function(){return me?(0,o.DC)(me):null}),[me]),Ae=(d=!1===(null==ye?void 0:ye.autoScrollEnabled),v="object"==typeof m?!1===m.enabled:!1===m,h=V&&!d&&!v,"object"==typeof m?E(O({},m),{enabled:h}):{enabled:h}),Ne=function(e,t){return Ue(e,t)}(je,Ee.draggable.measure);!function(e){var t=e.activeNode,r=e.measure,i=e.initialRect,a=e.config,l=void 0===a||a,u=(0,n.useRef)(!1),c="boolean"==typeof l?{x:l,y:l}:l,s=c.x,d=c.y;(0,o.LI)((function(){if((s||d)&&t){if(!u.current&&i){var e=null==t?void 0:t.node.current;if(e&&!1!==e.isConnected){var n=_(r(e),i);if(s||(n.x=0),d||(n.y=0),u.current=!0,Math.abs(n.x)>0||Math.abs(n.y)>0){var o=ee(e);o&&o.scrollBy({top:n.y,left:n.x})}}}}else u.current=!1}),[t,s,d,i,r])}({activeNode:re?ne.get(re):null,config:Ae.layoutShiftCompensation,initialRect:Ne,measure:Ee.draggable.measure});var Le,Pe=He(je,Ee.draggable.measure,Ne),Be=He(je?je.parentElement:null),Je=(0,n.useRef)({activatorEvent:null,active:null,activeNode:je,collisionRect:null,collisions:null,droppableRects:De,draggableNodes:ne,draggingNode:null,draggingNodeRect:null,droppableContainers:le,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Qe=le.getNodeFor(null==(t=Je.current.over)?void 0:t.id),et=function(e){var t=e.measure,r=k((0,n.useState)(null),2),i=r[0],a=r[1],l=(0,n.useCallback)((function(e){var r=!0,n=!1,i=void 0;try{for(var l,u=function(){var e=l.value.target;if((0,o.Re)(e))return a((function(r){var n=t(e);return r?E(O({},r),{width:n.width,height:n.height}):n})),"break"},c=e[Symbol.iterator]();!(r=(l=c.next()).done)&&"break"!==u();r=!0);}catch(e){n=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(n)throw i}}}),[t]),u=Ye({callback:l}),c=(0,n.useCallback)((function(e){var r=We(e);null==u||u.disconnect(),r&&(null==u||u.observe(r)),a(r?t(r):null)}),[t,u]),s=k((0,o.wm)(c),2),d=s[0],f=s[1];return(0,n.useMemo)((function(){return{nodeRef:d,rect:i,setRef:f}}),[i,d,f])}({measure:Ee.dragOverlay.measure}),tt=null!=(r=et.nodeRef.current)?r:je,st=V?null!=(a=et.rect)?a:Pe:null,dt=Boolean(et.nodeRef.current&&et.rect),ft=_(Le=dt?null:Pe,Ue(Le)),vt=Ge(tt?(0,o.Jj)(tt):null),ht=function(e){var t=(0,n.useRef)(e),r=(0,o.Gj)((function(r){return e?r&&r!==_e&&e&&t.current&&e.parentNode===t.current.parentNode?r:Q(e):_e}),[e]);return(0,n.useEffect)((function(){t.current=e}),[e]),r}(V?null!=Qe?Qe:je:null),pt=function(e,t){void 0===t&&(t=$);var r=k(e,1)[0],i=Ge(r?(0,o.Jj)(r):null),a=k((0,n.useReducer)((function(){return e.length?e.map((function(e){return oe(e)?i:new pe(t(e),e)})):qe}),qe),2),l=a[0],u=a[1],c=Ye({callback:u});return e.length>0&&l===qe&&u(),(0,o.LI)((function(){e.length?e.forEach((function(e){return null==c?void 0:c.observe(e)})):(null==c||c.disconnect(),u())}),[e]),l}(ht),yt=lt(M,{transform:{x:ae.x-ft.x,y:ae.y-ft.y,scaleX:1,scaleY:1},activatorEvent:me,active:fe,activeNodeRect:Pe,containerNodeRect:Be,draggingNodeRect:st,over:Je.current.over,overlayNodeRect:et.rect,scrollableAncestors:ht,scrollableAncestorRects:pt,windowRect:vt}),gt=Ie?(0,o.IH)(Ie,ae):null,bt=function(e){var t=k((0,n.useState)(null),2),r=t[0],i=t[1],a=(0,n.useRef)(e),l=(0,n.useCallback)((function(e){var t=te(e.target);t&&i((function(e){return e?(e.set(t,ie(t)),new Map(e)):null}))}),[]);return(0,n.useEffect)((function(){var t=function(e){e.forEach((function(e){var t=te(e);null==t||t.removeEventListener("scroll",l)}))},r=a.current;if(e!==r){t(r);var n=e.map((function(e){var t=te(e);return t?(t.addEventListener("scroll",l,{passive:!0}),[t,ie(t)]):null})).filter((function(e){return null!=e}));i(n.length?new Map(n):null),a.current=e}return function(){t(e),t(r)}}),[l,e]),(0,n.useMemo)((function(){return e.length?r?Array.from(r.values()).reduce((function(e,t){return(0,o.IH)(e,t)}),X):se(e):X}),[e,r])}(ht),mt=Ke(bt),wt=Ke(bt,[Pe]),xt=(0,o.IH)(yt,mt),St=st?G(st,yt):null,Ot=fe&&St?C({active:fe,collisionRect:St,droppableRects:De,droppableContainers:Oe,pointerCoordinates:gt}):null,Et=function(e,t){if(!e||0===e.length)return null;var r=k(e,1)[0];return r.id}(Ot),Rt=k((0,n.useState)(null),2),Dt=Rt[0],Ct=Rt[1],kt=function(e,t,r){return E(O({},e),{scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1})}(dt?yt:(0,o.IH)(yt,wt),null!=(l=null==Dt?void 0:Dt.rect)?l:null,Pe),jt=(0,n.useCallback)((function(e,t){var r=function(e){return t=function(){var t,r,n,o,a,u,c;return function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}(this,(function(s){switch(s.label){case 0:return t=Je.current,r=t.active,n=t.collisions,o=t.over,a=t.scrollAdjustedTranslate,u=null,r&&a?(c=xe.current.cancelDrop,u={activatorEvent:l,active:r,collisions:n,delta:a,over:o},e!==N.DragEnd||"function"!=typeof c?[3,2]:[4,Promise.resolve(c(u))]):[3,2];case 1:s.sent()&&(e=N.DragCancel),s.label=2;case 2:return ve.current=null,(0,i.unstable_batchedUpdates)((function(){z({type:e}),q(ut.Uninitialized),Ct(null),ge(null),we(null);var t=e===N.DragEnd?"onDragEnd":"onDragCancel";if(u){var r=xe.current[t];null==r||r(u),U({type:t,event:u})}})),[2]}}))},r=function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(e){f(o,n,i,a,l,"next",e)}function l(e){f(o,n,i,a,l,"throw",e)}a(void 0)}))},function(){return r.apply(this,arguments)};var t,r},n=t.sensor,o=t.options;if(null!=ve.current){var a=ne.get(ve.current);if(a){var l=e.nativeEvent,u=new n({active:ve.current,activeNode:a,event:l,options:o,context:Je,onStart:function(e){var t=ve.current;if(null!=t){var r=ne.get(t);if(r){var n=xe.current.onDragStart,o={active:{id:t,data:r.data,rect:de}};(0,i.unstable_batchedUpdates)((function(){null==n||n(o),q(ut.Initializing),z({type:N.DragStart,initialCoordinates:e,active:t}),U({type:"onDragStart",event:o})}))}}},onMove:function(e){z({type:N.DragMove,coordinates:e})},onEnd:r(N.DragEnd),onCancel:r(N.DragCancel)});(0,i.unstable_batchedUpdates)((function(){ge(u),we(e.nativeEvent)}))}}}),[ne]),It=(0,n.useCallback)((function(e,t){return function(r,n){var i=r.nativeEvent,o=ne.get(n);if(null===ve.current&&o&&!i.dndKit&&!i.defaultPrevented){var a={active:o};!0===e(r,t.options,a)&&(i.dndKit={capturedBy:t.sensor},ve.current=n,jt(r,t))}}}),[ne,jt]),Mt=function(e,t){return(0,n.useMemo)((function(){return e.reduce((function(e,r){var n=r.sensor.activators.map((function(e){return{eventName:e.eventName,handler:t(e.handler,r)}}));return j(e).concat(j(n))}),[])}),[e,t])}(S,It);!function(e){(0,n.useEffect)((function(){if(o.Nq){var t=e.map((function(e){var t=e.sensor;return null==t.setup?void 0:t.setup()}));return function(){var e=!0,r=!1,n=void 0;try{for(var i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;null==a||a()}}catch(e){r=!0,n=e}finally{try{e||null==o.return||o.return()}finally{if(r)throw n}}}}}),e.map((function(e){return e.sensor})))}(S),(0,o.LI)((function(){Pe&&K===ut.Initializing&&q(ut.Initialized)}),[Pe,K]),(0,n.useEffect)((function(){var e=xe.current.onDragMove,t=Je.current,r=t.active,n=t.activatorEvent,o=t.collisions,a=t.over;if(r&&n){var l={active:r,activatorEvent:n,collisions:o,delta:{x:xt.x,y:xt.y},over:a};(0,i.unstable_batchedUpdates)((function(){null==e||e(l),U({type:"onDragMove",event:l})}))}}),[xt.x,xt.y]),(0,n.useEffect)((function(){var e=Je.current,t=e.active,r=e.activatorEvent,n=e.collisions,o=e.droppableContainers,a=e.scrollAdjustedTranslate;if(t&&null!=ve.current&&r&&a){var l=xe.current.onDragOver,u=o.get(Et),c=u&&u.rect.current?{id:u.id,rect:u.rect.current,data:u.data,disabled:u.disabled}:null,s={active:t,activatorEvent:r,collisions:n,delta:{x:a.x,y:a.y},over:c};(0,i.unstable_batchedUpdates)((function(){Ct(c),null==l||l(s),U({type:"onDragOver",event:s})}))}}),[Et]),(0,o.LI)((function(){Je.current={activatorEvent:me,active:fe,activeNode:je,collisionRect:St,collisions:Ot,droppableRects:De,draggableNodes:ne,draggingNode:tt,draggingNodeRect:st,droppableContainers:le,over:Dt,scrollableAncestors:ht,scrollAdjustedTranslate:xt},de.current={initial:st,translated:St}}),[fe,je,Ot,St,ne,tt,st,De,le,Dt,ht,xt]),function(e){var t=e.acceleration,r=e.activator,i=void 0===r?Me.Pointer:r,a=e.canScroll,l=e.draggingRect,u=e.enabled,c=e.interval,s=void 0===c?5:c,d=e.order,f=void 0===d?Te.TreeOrder:d,v=e.pointerCoordinates,h=e.scrollableAncestors,p=e.scrollableAncestorRects,y=e.delta,g=e.threshold,m=function(e){var t=e.delta,r=e.disabled,n=(0,o.D9)(t);return(0,o.Gj)((function(e){if(r||!n||!e)return Fe;var i,o,a=Math.sign(t.x-n.x),l=Math.sign(t.y-n.y);return{x:(i={},b(i,W.Backward,e.x[W.Backward]||-1===a),b(i,W.Forward,e.x[W.Forward]||1===a),i),y:(o={},b(o,W.Backward,e.y[W.Backward]||-1===l),b(o,W.Forward,e.y[W.Forward]||1===l),o)}}),[r,t,n])}({delta:y,disabled:!u}),w=k((0,o.Yz)(),2),x=w[0],S=w[1],O=(0,n.useRef)({x:0,y:0}),E=(0,n.useRef)({x:0,y:0}),R=(0,n.useMemo)((function(){switch(i){case Me.Pointer:return v?{top:v.y,bottom:v.y,left:v.x,right:v.x}:null;case Me.DraggableRect:return l}}),[i,l,v]),D=(0,n.useRef)(null),C=(0,n.useCallback)((function(){var e=D.current;if(e){var t=O.current.x*E.current.x,r=O.current.y*E.current.y;e.scrollBy(t,r)}}),[]),I=(0,n.useMemo)((function(){return f===Te.TreeOrder?j(h).reverse():h}),[f,h]);(0,n.useEffect)((function(){if(u&&h.length&&R){var e=!0,r=!1,n=void 0;try{for(var i,o=I[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var l=i.value;if(!1!==(null==a?void 0:a(l))){var c=h.indexOf(l),d=p[c];if(d){for(var f=ue(l,d,R,t,g),v=f.direction,y=f.speed,b=0,w=["x","y"];b<w.length;b++){var k=w[b];m[k][v[k]]||(y[k]=0,v[k]=0)}if(y.x>0||y.y>0)return S(),D.current=l,x(C,s),O.current=y,void(E.current=v)}}}}catch(e){r=!0,n=e}finally{try{e||null==o.return||o.return()}finally{if(r)throw n}}O.current={x:0,y:0},E.current={x:0,y:0},S()}else S()}),[t,C,a,S,u,s,JSON.stringify(R),JSON.stringify(m),x,h,I,p,JSON.stringify(g)])}(E(O({},Ae),{delta:ae,draggingRect:St,pointerCoordinates:gt,scrollableAncestors:ht,scrollableAncestorRects:pt}));var Tt=(0,n.useMemo)((function(){return{active:fe,activeNode:je,activeNodeRect:Pe,activatorEvent:me,collisions:Ot,containerNodeRect:Be,dragOverlay:et,draggableNodes:ne,droppableContainers:le,droppableRects:De,over:Dt,measureDroppableContainers:Ce,scrollableAncestors:ht,scrollableAncestorRects:pt,measuringConfiguration:Ee,measuringScheduled:ke,windowRect:vt}}),[fe,je,Pe,me,Ot,Be,et,ne,le,De,Dt,Ce,ht,pt,Ee,ke,vt]),At=(0,n.useMemo)((function(){return{activatorEvent:me,activators:Mt,active:fe,activeNodeRect:Pe,ariaDescribedById:{draggable:Se},dispatch:z,draggableNodes:ne,over:Dt,measureDroppableContainers:Ce}}),[me,Mt,fe,Pe,z,Se,ne,Dt,Ce]);return n.createElement(L.Provider,{value:Y},n.createElement(rt.Provider,{value:At},n.createElement(nt.Provider,{value:Tt},n.createElement(ct.Provider,{value:kt},w)),n.createElement(at,{disabled:!1===(null==y?void 0:y.restoreFocus)})),n.createElement(B,E(O({},y),{hiddenTextDescribedById:Se})))})),dt=(0,n.createContext)(null),ft="button";function vt(e){var t=e.id,r=e.data,i=e.disabled,a=void 0!==i&&i,l=e.attributes,u=(0,o.Ld)("Droppable"),c=(0,n.useContext)(rt),s=c.activators,d=c.activatorEvent,f=c.active,v=c.activeNodeRect,h=c.ariaDescribedById,p=c.draggableNodes,y=c.over,g=null!=l?l:{},b=g.role,m=void 0===b?ft:b,w=g.roleDescription,x=void 0===w?"draggable":w,S=g.tabIndex,O=void 0===S?0:S,E=(null==f?void 0:f.id)===t,R=(0,n.useContext)(E?ct:dt),D=k((0,o.wm)(),2),C=D[0],j=D[1],I=k((0,o.wm)(),2),M=I[0],T=I[1],A=function(e,t){return(0,n.useMemo)((function(){return e.reduce((function(e,r){var n=r.eventName,i=r.handler;return e[n]=function(e){i(e,t)},e}),{})}),[e,t])}(s,t),N=(0,o.Ey)(r);return(0,o.LI)((function(){return p.set(t,{id:t,key:u,node:C,activatorNode:M,data:N}),function(){var e=p.get(t);e&&e.key===u&&p.delete(t)}}),[p,t]),{active:f,activatorEvent:d,activeNodeRect:v,attributes:(0,n.useMemo)((function(){return{role:m,tabIndex:O,"aria-disabled":a,"aria-pressed":!(!E||m!==ft)||void 0,"aria-roledescription":x,"aria-describedby":h.draggable}}),[a,m,O,E,x,h.draggable]),isDragging:E,listeners:a?void 0:A,node:C,over:y,setNodeRef:j,setActivatorNodeRef:T,transform:R}}function ht(){return(0,n.useContext)(nt)}var pt={timeout:25};function yt(e){var t=e.data,r=e.disabled,i=void 0!==r&&r,a=e.id,l=e.resizeObserverConfig,u=(0,o.Ld)("Droppable"),c=(0,n.useContext)(rt),s=c.active,d=c.dispatch,f=c.over,v=c.measureDroppableContainers,h=(0,n.useRef)({disabled:i}),p=(0,n.useRef)(!1),y=(0,n.useRef)(null),g=(0,n.useRef)(null),b=O({},pt,l),m=b.disabled,w=b.updateMeasurementsFor,x=b.timeout,S=(0,o.Ey)(null!=w?w:a),E=Ye({callback:(0,n.useCallback)((function(){p.current?(null!=g.current&&clearTimeout(g.current),g.current=setTimeout((function(){v(Array.isArray(S.current)?S.current:[S.current]),g.current=null}),x)):p.current=!0}),[x]),disabled:m||!s}),R=(0,n.useCallback)((function(e,t){E&&(t&&(E.unobserve(t),p.current=!1),e&&E.observe(e))}),[E]),D=k((0,o.wm)(R),2),C=D[0],j=D[1],I=(0,o.Ey)(t);return(0,n.useEffect)((function(){E&&C.current&&(E.disconnect(),p.current=!1,E.observe(C.current))}),[C,E]),(0,o.LI)((function(){return d({type:N.RegisterDroppable,element:{id:a,key:u,disabled:i,node:C,rect:y,data:I}}),function(){return d({type:N.UnregisterDroppable,key:u,id:a})}}),[a]),(0,n.useEffect)((function(){i!==h.current.disabled&&(d({type:N.SetDroppableDisabled,id:a,key:u,disabled:i}),h.current.disabled=i)}),[a,u,i,d]),{active:s,rect:y,isOver:(null==f?void 0:f.id)===a,node:C,over:f,setNodeRef:j}}function gt(e){var t=e.animation,r=e.children,i=k((0,n.useState)(null),2),a=i[0],l=i[1],u=k((0,n.useState)(null),2),c=u[0],s=u[1],d=(0,o.D9)(r);return r||a||!d||l(d),(0,o.LI)((function(){if(c){var e=null==a?void 0:a.key,r=null==a?void 0:a.props.id;null!=e&&null!=r?Promise.resolve(t(r,c)).then((function(){l(null)})):l(null)}}),[t,a,c]),n.createElement(n.Fragment,null,r,a?(0,n.cloneElement)(a,{ref:s}):null)}var bt={x:0,y:0,scaleX:1,scaleY:1};function mt(e){var t=e.children;return n.createElement(rt.Provider,{value:tt},n.createElement(ct.Provider,{value:bt},t))}var wt={position:"fixed",touchAction:"none"},xt=function(e){return(0,o.vd)(e)?"transform 250ms ease":void 0},St=(0,n.forwardRef)((function(e,t){var r=e.as,i=e.activatorEvent,a=e.adjustScale,l=e.children,u=e.className,c=e.rect,s=e.style,d=e.transform,f=e.transition,v=void 0===f?xt:f;if(!c)return null;var h=a?d:E(O({},d),{scaleX:1,scaleY:1}),p=O(E(O({},wt),{width:c.width,height:c.height,top:c.top,left:c.left,transform:o.ux.Transform.toString(h),transformOrigin:a&&i?U(i,c):void 0,transition:"function"==typeof v?v(i):v}),s);return n.createElement(r,{className:u,style:p,ref:t},l)})),Ot=function(e){return function(t){var r=t.active,n=t.dragOverlay,i={},o=e.styles,a=e.className;if(null!=o&&o.active){var l=!0,u=!1,c=void 0;try{for(var s,d=Object.entries(o.active)[Symbol.iterator]();!(l=(s=d.next()).done);l=!0){var f=k(s.value,2),v=f[0],h=f[1];void 0!==h&&(i[v]=r.node.style.getPropertyValue(v),r.node.style.setProperty(v,h))}}catch(e){u=!0,c=e}finally{try{l||null==d.return||d.return()}finally{if(u)throw c}}}if(null!=o&&o.dragOverlay){var p=!0,y=!1,g=void 0;try{for(var b,m=Object.entries(o.dragOverlay)[Symbol.iterator]();!(p=(b=m.next()).done);p=!0){var w=k(b.value,2),x=w[0],S=w[1];void 0!==S&&n.node.style.setProperty(x,S)}}catch(e){y=!0,g=e}finally{try{p||null==m.return||m.return()}finally{if(y)throw g}}}return null!=a&&a.active&&r.node.classList.add(a.active),null!=a&&a.dragOverlay&&n.node.classList.add(a.dragOverlay),function(){var e=!0,t=!1,n=void 0;try{for(var o,l=Object.entries(i)[Symbol.iterator]();!(e=(o=l.next()).done);e=!0){var u=k(o.value,2),c=u[0],s=u[1];r.node.style.setProperty(c,s)}}catch(e){t=!0,n=e}finally{try{e||null==l.return||l.return()}finally{if(t)throw n}}null!=a&&a.active&&r.node.classList.remove(a.active)}}},E