11 lines
96 KiB
JavaScript
11 lines
96 KiB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactBeautifulDnd={},e.React,e.ReactDOM)}(this,(function(e,t,r){"use strict";function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=n(t);function i(){}function a(e,t,r){const n=t.map((t=>{const n=(o=r,i=t.options,{...o,...i});var o,i;return e.addEventListener(t.eventName,t.fn,n),function(){e.removeEventListener(t.eventName,t.fn,n)}}));return function(){n.forEach((e=>{e()}))}}const s=!0,l="Invariant failed";class c extends Error{}function d(e,t){throw new c(s?l:`${l}: `)}c.prototype.toString=function(){return this.message};class u extends t.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=i,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort();e.error instanceof c&&e.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=a(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof c))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const p=e=>e+1,g=(e,t)=>{const r=e.droppableId===t.droppableId,n=p(e.index),o=p(t.index);return r?`\n You have moved the item from position ${n}\n to position ${o}\n `:`\n You have moved the item from position ${n}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${o}\n `},f=(e,t,r)=>t.droppableId===r.droppableId?`\n The item ${e}\n has been combined with ${r.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${r.draggableId}\n in list ${r.droppableId}\n `,m=e=>`\n The item has returned to its starting position\n of ${p(e.index)}\n`,b={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:e=>`\n You have lifted an item in position ${p(e.source.index)}\n`,onDragUpdate:e=>{const t=e.destination;if(t)return g(e.source,t);const r=e.combine;return r?f(e.draggableId,e.source,r):"You are over an area that cannot be dropped on"},onDragEnd:e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${m(e.source)}\n `;const t=e.destination,r=e.combine;return t?`\n You have dropped the item.\n ${g(e.source,t)}\n `:r?`\n You have dropped the item.\n ${f(e.draggableId,e.source,r)}\n `:`\n The item has been dropped while not over a drop area.\n ${m(e.source)}\n `}};function h(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var v=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),y=()=>Math.random().toString(36).substring(7).split("").join("."),x={INIT:`@@redux/INIT${y()}`,REPLACE:`@@redux/REPLACE${y()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${y()}`};function I(e,t,r){if("function"!=typeof e)throw new Error(h(2));if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(h(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(h(1));return r(I)(e,t)}let n=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach(((e,t)=>{a.set(t,e)})))}function d(){if(l)throw new Error(h(3));return o}function u(e){if("function"!=typeof e)throw new Error(h(4));if(l)throw new Error(h(5));let t=!0;c();const r=s++;return a.set(r,e),function(){if(t){if(l)throw new Error(h(6));t=!1,c(),a.delete(r),i=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(h(7));if(void 0===e.type)throw new Error(h(8));if("string"!=typeof e.type)throw new Error(h(17));if(l)throw new Error(h(9));try{l=!0,o=n(o,e)}finally{l=!1}return(i=a).forEach((e=>{e()})),e}p({type:x.INIT});return{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(h(10));n=e,p({type:x.REPLACE})},[v]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(h(11));function r(){const e=t;e.next&&e.next(d())}r();return{unsubscribe:e(r)}},[v](){return this}}}}}function D(e,t){return function(...r){return t(e.apply(this,r))}}function w(e,t){if("function"==typeof e)return D(e,t);if("object"!=typeof e||null===e)throw new Error(h(16));const r={};for(const n in e){const o=e[n];"function"==typeof o&&(r[n]=D(o,t))}return r}function E(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...r)=>e(t(...r))))}var S,C={};
|
|
/**
|
|
* @license React
|
|
* use-sync-external-store-with-selector.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/!function(){if(S)return C;S=1;var e=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,s=e.useDebugValue;C.useSyncExternalStoreWithSelector=function(e,t,l,c,d){var u=o(null);if(null===u.current){var p={hasValue:!1,value:null};u.current=p}else p=u.current;u=a((function(){function e(e){if(!i){if(i=!0,n=e,e=c(e),void 0!==d&&p.hasValue){var t=p.value;if(d(t,e))return o=t}return o=e}if(t=o,r(n,e))return t;var a=c(e);return void 0!==d&&d(t,a)?t:(n=e,o=a)}var n,o,i=!1,a=void 0===l?null:l;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]}),[t,l,c,d]);var g=n(e,u[0],u[1]);return i((function(){p.hasValue=!0,p.value=g}),[g]),s(g),g}}();var A="default"in o?o.default:o,O=Symbol.for("react-redux-context"),P="undefined"!=typeof globalThis?globalThis:{};function N(){if(!A.createContext)return{};const e=P[O]??(P[O]=new Map);let t=e.get(A.createContext);return t||(t=A.createContext(null),e.set(A.createContext,t)),t}var R=N(),B=Symbol.for("react.element"),T=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),F=Symbol.for("react.context"),k=Symbol.for("react.server_context"),W=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),V=W,q=j;function z(e){return function(e){if("object"==typeof e&&null!==e){const t=e.$$typeof;switch(t){case B:{const r=e.type;switch(r){case L:case G:case M:case $:case U:return r;default:{const e=r&&r.$$typeof;switch(e){case k:case F:case W:case H:case j:case _:return e;default:return t}}}}case T:return t}}}(e)===j}function Y(e,t,r,n,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,u,p=!1;function g(p,g){const f=!i(g,l),m=!o(p,s,g,l);return s=p,l=g,f&&m?(c=e(s,l),t.dependsOnOwnProps&&(d=t(n,l)),u=r(c,d,l),u):f?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(d=t(n,l)),u=r(c,d,l),u):m?function(){const t=e(s,l),n=!a(t,c);return c=t,n&&(u=r(c,d,l)),u}():u}return function(o,i){return p?g(o,i):(s=o,l=i,c=e(s,l),d=t(n,l),u=r(c,d,l),p=!0,u)}}function J(e){return function(t){const r=e(t);function n(){return r}return n.dependsOnOwnProps=!1,n}}function X(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function K(e,t){return function(t,{displayName:r}){const n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=X(e);let o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=X(o),o=n(t,r)),o},n}}function Q(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function Z(e,t,r){return{...r,...e,...t}}var ee={notify(){},get:()=>[]};function te(e,t){let r,n=ee,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,r||(r=t?t.addNestedSub(a):e.subscribe(a),n=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{let t=e;for(;t;)t.callback(),t=t.next})()},get(){const t=[];let r=e;for(;r;)t.push(r),r=r.next;return t},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){n&&null!==e&&(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function l(){o--,r&&0===o&&(r(),r=void 0,n.clear(),n=ee)}const c={addNestedSub:function(e){s();const t=n.subscribe(e);let r=!1;return()=>{r||(r=!0,t(),l())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>n};return c}var re=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),ne="undefined"!=typeof navigator&&"ReactNative"===navigator.product,oe=re||ne?A.useLayoutEffect:A.useEffect;function ie(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function ae(e,t){if(ie(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!ie(e[r[n]],t[r[n]]))return!1;return!0}var se={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},le={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ce={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},de={[V]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[q]:ce};function ue(e){return z(e)?ce:de[e.$$typeof]||se}var pe=Object.defineProperty,ge=Object.getOwnPropertyNames,fe=Object.getOwnPropertySymbols,me=Object.getOwnPropertyDescriptor,be=Object.getPrototypeOf,he=Object.prototype;function ve(e,t){if("string"!=typeof t){if(he){const r=be(t);r&&r!==he&&ve(e,r)}let r=ge(t);fe&&(r=r.concat(fe(t)));const n=ue(e),o=ue(t);for(let i=0;i<r.length;++i){const a=r[i];if(!(le[a]||o&&o[a]||n&&n[a])){const r=me(t,a);try{pe(e,a,r)}catch(e){}}}}return e}var ye=()=>{throw new Error("uSES not initialized!")},xe=[null,null];function Ie(e,t,r,n,o,i){e.current=n,r.current=!1,o.current&&(o.current=null,i())}function De(e,t){return e===t}var we=function(e,t,r,{pure:n,areStatesEqual:o=De,areOwnPropsEqual:i=ae,areStatePropsEqual:a=ae,areMergedPropsEqual:s=ae,forwardRef:l=!1,context:c=R}={}){const d=c,u=function(e){return e?"function"==typeof e?K(e):Q(e,"mapStateToProps"):J((()=>({})))}(e),p=function(e){return e&&"object"==typeof e?J((t=>function(e,t){const r={};for(const n in e){const o=e[n];"function"==typeof o&&(r[n]=(...e)=>t(o(...e)))}return r}(e,t))):e?"function"==typeof e?K(e):Q(e,"mapDispatchToProps"):J((e=>({dispatch:e})))}(t),g=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:r,areMergedPropsEqual:n}){let o,i=!1;return function(t,r,a){const s=e(t,r,a);return i?n(s,o)||(o=s):(i=!0,o=s),o}}}(e):Q(e,"mergeProps"):()=>Z}(r),f=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",r=`Connect(${t})`,n={shouldHandleStateChanges:f,displayName:r,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:u,initMapDispatchToProps:p,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function c(t){const[r,o,i]=A.useMemo((()=>{const{reactReduxForwardedRef:e,...r}=t;return[t.context,e,r]}),[t]),a=A.useMemo((()=>d),[r,d]),s=A.useContext(a),l=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),c=Boolean(s)&&Boolean(s.store),u=l?t.store:s.store,p=c?s.getServerState:u.getState,g=A.useMemo((()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:n,...o}){return Y(t(e,o),r(e,o),n(e,o),e,o)}(u.dispatch,n)),[u]),[m,b]=A.useMemo((()=>{if(!f)return xe;const e=te(u,l?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[u,l,s]),h=A.useMemo((()=>l?s:{...s,subscription:m}),[l,s,m]),v=A.useRef(void 0),y=A.useRef(i),x=A.useRef(void 0),I=A.useRef(!1),D=A.useRef(!1),w=A.useRef(void 0);oe((()=>(D.current=!0,()=>{D.current=!1})),[]);const E=A.useMemo((()=>()=>x.current&&i===y.current?x.current:g(u.getState(),i)),[u,i]),S=A.useMemo((()=>e=>m?function(e,t,r,n,o,i,a,s,l,c,d){if(!e)return()=>{};let u=!1,p=null;const g=()=>{if(u||!s.current)return;const e=t.getState();let r,g;try{r=n(e,o.current)}catch(e){g=e,p=e}g||(p=null),r===i.current?a.current||c():(i.current=r,l.current=r,a.current=!0,d())};return r.onStateChange=g,r.trySubscribe(),g(),()=>{if(u=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}(f,u,m,g,y,v,I,D,x,b,e):()=>{}),[m]);var C,O,P;let N;C=Ie,O=[y,v,I,i,x,b],oe((()=>C(...O)),P);try{N=ye(S,E,p?()=>g(p(),i):E)}catch(e){throw w.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${w.current.stack}\n\n`),e}oe((()=>{w.current=void 0,x.current=void 0,v.current=N}));const R=A.useMemo((()=>A.createElement(e,{...N,ref:o})),[o,e,N]);return A.useMemo((()=>f?A.createElement(a.Provider,{value:h},R):R),[a,R,h])}const m=A.memo(c);if(m.WrappedComponent=e,m.displayName=c.displayName=r,l){const t=A.forwardRef((function(e,t){return A.createElement(m,{...e,reactReduxForwardedRef:t})}));return t.displayName=r,t.WrappedComponent=e,ve(t,e)}return ve(m,e)}};var Ee,Se=function({store:e,context:t,children:r,serverState:n,stabilityCheck:o="once",identityFunctionCheck:i="once"}){const a=A.useMemo((()=>{const t=te(e);return{store:e,subscription:t,getServerState:n?()=>n:void 0,stabilityCheck:o,identityFunctionCheck:i}}),[e,n,o,i]),s=A.useMemo((()=>e.getState()),[e]);oe((()=>{const{subscription:t}=a;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),s!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}}),[a,s]);const l=t||R;return A.createElement(l.Provider,{value:a},r)};function Ce(e,r){var n=t.useState((function(){return{inputs:r,result:e()}}))[0],o=t.useRef(!0),i=t.useRef(n),a=o.current||Boolean(r&&i.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(r,i.current.inputs))?i.current:{inputs:r,result:e()};return t.useEffect((function(){o.current=!1,i.current=a}),[a]),a.result}Ee=o.useSyncExternalStore,ye=Ee;var Ae=Ce,Oe=function(e,t){return Ce((function(){return e}),t)};const Pe={x:0,y:0},Ne=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),Re=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Be=(e,t)=>e.x===t.x&&e.y===t.y,Te=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),Le=(e,t,r=0)=>"x"===e?{x:t,y:r}:{x:r,y:t},Me=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Ge=(e,t)=>Math.min(...t.map((t=>Me(e,t)))),_e=e=>t=>({x:e(t.x),y:e(t.y)});var Fe=function(e){var t=e.top,r=e.right,n=e.bottom,o=e.left;return{top:t,right:r,bottom:n,left:o,width:r-o,height:n-t,x:o,y:t,center:{x:(r+o)/2,y:(n+t)/2}}},ke=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},We=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},$e={top:0,right:0,bottom:0,left:0},Ue=function(e){var t=e.borderBox,r=e.margin,n=void 0===r?$e:r,o=e.border,i=void 0===o?$e:o,a=e.padding,s=void 0===a?$e:a,l=Fe(ke(t,n)),c=Fe(We(t,i)),d=Fe(We(c,s));return{marginBox:l,borderBox:Fe(t),paddingBox:c,contentBox:d,margin:n,border:i,padding:s}},je=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var r=Number(t);return isNaN(r)&&function(e,t){throw new Error("Invariant failed")}(),r},He=function(e,t){var r,n,o=e.borderBox,i=e.border,a=e.margin,s=e.padding,l=(n=t,{top:(r=o).top+n.y,left:r.left+n.x,bottom:r.bottom+n.y,right:r.right+n.x});return Ue({borderBox:l,border:i,margin:a,padding:s})},Ve=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),He(e,t)},qe=function(e,t){var r={top:je(t.marginTop),right:je(t.marginRight),bottom:je(t.marginBottom),left:je(t.marginLeft)},n={top:je(t.paddingTop),right:je(t.paddingRight),bottom:je(t.paddingBottom),left:je(t.paddingLeft)},o={top:je(t.borderTopWidth),right:je(t.borderRightWidth),bottom:je(t.borderBottomWidth),left:je(t.borderLeftWidth)};return Ue({borderBox:e,margin:r,padding:n,border:o})},ze=function(e){var t=e.getBoundingClientRect(),r=window.getComputedStyle(e);return qe(t,r)};const Ye=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Je=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],Xe=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const r=Fe({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r})(t.pageMarginBox,e):Fe(e);var Ke=({page:e,withPlaceholder:t,axis:r,frame:n})=>{const o=((e,t)=>t?Ye(e,t.scroll.diff.displacement):e)(e.marginBox,n),i=((e,t,r)=>r&&r.increasedBy?{...e,[t.end]:e[t.end]+r.increasedBy[t.line]}:e)(o,r,t);return{page:e,withPlaceholder:t,active:Xe(i,n)}},Qe=(e,t)=>{e.frame||d();const r=e.frame,n=Re(t,r.scroll.initial),o=Te(n),i={...r,scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}},a=Ke({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}},Ze=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function et(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(n=e[r],o=t[r],!(n===o||Ze(n)&&Ze(o)))return!1;var n,o;return!0}function tt(e,t){void 0===t&&(t=et);var r=null;function n(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(r&&r.lastThis===this&&t(n,r.lastArgs))return r.lastResult;var i=e.apply(this,n);return r={lastResult:i,lastArgs:n,lastThis:this},i}return n.clear=function(){r=null},n}const rt=tt((e=>e.reduce(((e,t)=>(e[t.descriptor.id]=t,e)),{}))),nt=tt((e=>e.reduce(((e,t)=>(e[t.descriptor.id]=t,e)),{}))),ot=tt((e=>Object.values(e))),it=tt((e=>Object.values(e)));var at=tt(((e,t)=>{const r=it(t).filter((t=>e===t.descriptor.droppableId)).sort(((e,t)=>e.descriptor.index-t.descriptor.index));return r}));function st(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function lt(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var ct=tt(((e,t)=>t.filter((t=>t.descriptor.id!==e.descriptor.id)))),dt=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const ut={point:Pe,value:0},pt={invisible:{},visible:{},all:[]},gt={displaced:pt,displacedBy:ut,at:null};var ft=(e,t)=>r=>e<=r&&r<=t,mt=e=>{const t=ft(e.top,e.bottom),r=ft(e.left,e.right);return n=>{if(t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right))return!0;const o=t(n.top)||t(n.bottom),i=r(n.left)||r(n.right);if(o&&i)return!0;const a=n.top<e.top&&n.bottom>e.bottom,s=n.left<e.left&&n.right>e.right;if(a&&s)return!0;return a&&i||s&&o}},bt=e=>{const t=ft(e.top,e.bottom),r=ft(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&r(e.left)&&r(e.right)};const ht={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},vt={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};const yt=({target:e,destination:t,viewport:r,withDroppableDisplacement:n,isVisibleThroughFrameFn:o})=>{const i=n?((e,t)=>{const r=t.frame?t.frame.scroll.diff.displacement:Pe;return Ye(e,r)})(e,t):e;return((e,t,r)=>!!t.subject.active&&r(t.subject.active)(e))(i,t,o)&&((e,t,r)=>r(t)(e))(i,r,o)},xt=e=>yt({...e,isVisibleThroughFrameFn:mt}),It=e=>yt({...e,isVisibleThroughFrameFn:bt}),Dt=(e,t,r)=>{if("boolean"==typeof r)return r;if(!t)return!0;const{invisible:n,visible:o}=t;if(n[e])return!1;const i=o[e];return!i||i.shouldAnimate};function wt({afterDragging:e,destination:t,displacedBy:r,viewport:n,forceShouldAnimate:o,last:i}){return e.reduce((function(e,a){const s=function(e,t){const r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return Fe(ke(r,n))}(a,r),l=a.descriptor.id;e.all.push(l);if(!xt({target:s,destination:t,viewport:n,withDroppableDisplacement:!0}))return e.invisible[a.descriptor.id]=!0,e;const c={draggableId:l,shouldAnimate:Dt(l,i,o)};return e.visible[l]=c,e}),{all:[],visible:{},invisible:{}})}function Et({insideDestination:e,inHomeList:t,displacedBy:r,destination:n}){const o=function(e,t){if(!e.length)return 0;const r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}(e,{inHomeList:t});return{displaced:pt,displacedBy:r,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function St({draggable:e,insideDestination:t,destination:r,viewport:n,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=dt(e,r);if(null==a)return Et({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const c=t.find((e=>e.descriptor.index===a));if(!c)return Et({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const d=ct(e,t),u=t.indexOf(c);return{displaced:wt({afterDragging:d.slice(u),destination:r,displacedBy:o,last:i,viewport:n.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function Ct(e,t){return Boolean(t.effected[e])}var At=({isMovingForward:e,isInHomeList:t,draggable:r,draggables:n,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||d(),"REORDER"===c.type){const n=(({isMovingForward:e,isInHomeList:t,insideDestination:r,location:n})=>{if(!r.length)return null;const o=n.index,i=e?o+1:o-1,a=r[0].descriptor.index,s=r[r.length-1].descriptor.index;return i<a||i>(t?s:s+1)?null:i})({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return null==n?null:St({draggable:r,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:n})}const u=(({isMovingForward:e,destination:t,draggables:r,combine:n,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=n.draggableId,a=r[i].descriptor.index;return Ct(i,o)?e?a:a-1:e?a+1:a})({isMovingForward:e,destination:o,displaced:a.displaced,draggables:n,combine:c.combine,afterCritical:l});return null==u?null:St({draggable:r,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:u})},Ot=({afterCritical:e,impact:t,draggables:r})=>{const n=lt(t);n||d();const o=n.draggableId,i=r[o].page.borderBox.center,a=(({displaced:e,afterCritical:t,combineWith:r,displacedBy:n})=>{const o=Boolean(e.visible[r]||e.invisible[r]);return Ct(r,t)?o?Pe:Te(n.point):o?n.point:Pe})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return Ne(i,a)};const Pt=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,Nt=(e,t,r)=>t[e.crossAxisStart]+r.margin[e.crossAxisStart]+r.borderBox[e.crossAxisSize]/2,Rt=({axis:e,moveRelativeTo:t,isMoving:r})=>Le(e.line,t.marginBox[e.end]+Pt(e,r),Nt(e,t.marginBox,r)),Bt=({axis:e,moveRelativeTo:t,isMoving:r})=>Le(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,r),Nt(e,t.marginBox,r));var Tt=({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o})=>{const i=at(n.descriptor.id,r),a=t.page,s=n.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:r})=>Le(e.line,t.contentBox[e.start]+Pt(e,r),Nt(e,t.contentBox,r)))({axis:s,moveInto:n.page,isMoving:a});const{displaced:l,displacedBy:c}=e,d=l.all[0];if(d){const e=r[d];if(Ct(d,o))return Bt({axis:s,moveRelativeTo:e.page,isMoving:a});const t=He(e.page,c.point);return Bt({axis:s,moveRelativeTo:t,isMoving:a})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return a.borderBox.center;if(Ct(u.descriptor.id,o)){const e=He(u.page,Te(o.displacedBy.point));return Rt({axis:s,moveRelativeTo:e,isMoving:a})}return Rt({axis:s,moveRelativeTo:u.page,isMoving:a})},Lt=(e,t)=>{const r=e.frame;return r?Ne(t,r.scroll.diff.displacement):t};var Mt=e=>{const t=(({impact:e,draggable:t,droppable:r,draggables:n,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return r&&a?"REORDER"===a.type?Tt({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o}):Ot({impact:e,draggables:n,afterCritical:o}):i})(e),r=e.droppable;return r?Lt(r,t):t},Gt=(e,t)=>{const r=Re(t,e.scroll.initial),n=Te(r);return{frame:Fe({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}}};function _t(e,t){return e.map((e=>t[e]))}var Ft=({pageBorderBoxCenter:e,draggable:t,viewport:r})=>{const n=((e,t)=>Ne(e.scroll.diff.displacement,t))(r,e),o=Re(n,t.page.borderBox.center);return Ne(t.client.borderBox.center,o)},kt=({draggable:e,destination:t,newPageBorderBoxCenter:r,viewport:n,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=Re(r,e.page.borderBox.center),s={target:Ye(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:n};return i?(e=>{return yt({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const r=ft(e.top,e.bottom),n=ft(e.left,e.right);return e=>t===ht?r(e.top)&&r(e.bottom):n(e.left)&&n(e.right)})});var t})(s):It(s)},Wt=({isMovingForward:e,draggable:t,destination:r,draggables:n,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!r.isEnabled)return null;const c=at(r.descriptor.id,n),u=dt(t,r),p=(({isMovingForward:e,draggable:t,destination:r,insideDestination:n,previousImpact:o})=>{if(!r.isCombineEnabled)return null;if(!st(o))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return{...o,at:t}}const a=o.displaced.all,s=a.length?a[0]:null;if(e)return s?i(s):null;const l=ct(t,n);if(!s)return l.length?i(l[l.length-1].descriptor.id):null;const c=l.findIndex((e=>e.descriptor.id===s));-1===c&&d();const u=c-1;return u<0?null:i(l[u].descriptor.id)})({isMovingForward:e,draggable:t,destination:r,insideDestination:c,previousImpact:o})||At({isMovingForward:e,isInHomeList:u,draggable:t,draggables:n,destination:r,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!p)return null;const g=Mt({impact:p,draggable:t,droppable:r,draggables:n,afterCritical:l});if(kt({draggable:t,destination:r,newPageBorderBoxCenter:g,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})){return{clientSelection:Ft({pageBorderBoxCenter:g,draggable:t,viewport:i}),impact:p,scrollJumpRequest:null}}const f=Re(g,a),m=(({impact:e,viewport:t,destination:r,draggables:n,maxScrollChange:o})=>{const i=Gt(t,Ne(t.scroll.current,o)),a=r.frame?Qe(r,Ne(r.frame.scroll.current,o)):r,s=e.displaced,l=wt({afterDragging:_t(s.all,n),destination:r,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=wt({afterDragging:_t(s.all,n),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),d={},u={},p=[s,l,c];return s.all.forEach((e=>{const t=function(e,t){for(let r=0;r<t.length;r++){const n=t[r].visible[e];if(n)return n}return null}(e,p);t?u[e]=t:d[e]=!0})),{...e,displaced:{all:s.all,invisible:d,visible:u}}})({impact:p,viewport:i,destination:r,draggables:n,maxScrollChange:f});return{clientSelection:s,impact:m,scrollJumpRequest:f}};const $t=e=>{const t=e.subject.active;return t||d(),t};const Ut=(e,t)=>{const r=e.page.borderBox.center;return Ct(e.descriptor.id,t)?Re(r,t.displacedBy.point):r},jt=(e,t)=>{const r=e.page.borderBox;return Ct(e.descriptor.id,t)?Ye(r,Te(t.displacedBy.point)):r};var Ht=tt((function(e,t){const r=t[e.line];return{value:r,point:Le(e.line,r)}}));const Vt=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),qt=(e,t,r)=>{const n=e.frame;dt(t,e)&&d(),e.subject.withPlaceholder&&d();const o=Ht(e.axis,t.displaceBy).point,i=((e,t,r)=>{const n=e.axis;if("virtual"===e.descriptor.mode)return Le(n.line,t[n.line]);const o=e.subject.page.contentBox[n.size],i=at(e.descriptor.id,r).reduce(((e,t)=>e+t.client.marginBox[n.size]),0)+t[n.line]-o;return i<=0?null:Le(n.line,i)})(e,o,r),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!n){const t=Ke({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?Ne(n.scroll.max,i):n.scroll.max,l=Vt(n,s),c=Ke({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var zt=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:r,isOver:n,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=(({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:n,viewport:o})=>{const i=r.subject.active;if(!i)return null;const a=r.axis,s=ft(i[a.start],i[a.end]),l=ot(n).filter((e=>e!==r)).filter((e=>e.isEnabled)).filter((e=>Boolean(e.subject.active))).filter((e=>mt(o.frame)($t(e)))).filter((t=>{const r=$t(t);return e?i[a.crossAxisEnd]<r[a.crossAxisEnd]:r[a.crossAxisStart]<i[a.crossAxisStart]})).filter((e=>{const t=$t(e),r=ft(t[a.start],t[a.end]);return s(t[a.start])||s(t[a.end])||r(i[a.start])||r(i[a.end])})).sort(((t,r)=>{const n=$t(t)[a.crossAxisStart],o=$t(r)[a.crossAxisStart];return e?n-o:o-n})).filter(((e,t,r)=>$t(e)[a.crossAxisStart]===$t(r[0])[a.crossAxisStart]));if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter((e=>ft($t(e)[a.start],$t(e)[a.end])(t[a.line])));return 1===c.length?c[0]:c.length>1?c.sort(((e,t)=>$t(e)[a.start]-$t(t)[a.start]))[0]:l.sort(((e,r)=>{const n=Ge(t,Je($t(e))),o=Ge(t,Je($t(r)));return n!==o?n-o:$t(e)[a.start]-$t(r)[a.start]}))[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:i,viewport:a});if(!l)return null;const c=at(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:r,insideDestination:n,afterCritical:o})=>{const i=n.filter((e=>It({target:jt(e,o),destination:r,viewport:t.frame,withDroppableDisplacement:!0}))).sort(((t,n)=>{const i=Me(e,Lt(r,Ut(t,o))),a=Me(e,Lt(r,Ut(n,o)));return i<a?-1:a<i?1:t.descriptor.index-n.descriptor.index}));return i[0]||null})({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),u=(({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:r,draggable:n,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(r.length)return null;const e={displaced:pt,displacedBy:ut,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=Mt({impact:e,draggable:n,droppable:i,draggables:o,afterCritical:s}),l=dt(n,i)?i:qt(i,n,o);return kt({draggable:n,destination:l,newPageBorderBoxCenter:t,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}const l=Boolean(e[i.axis.line]<=t.page.borderBox.center[i.axis.line]),c=(()=>{const e=t.descriptor.index;return t.descriptor.id===n.descriptor.id||l?e:e+1})(),d=Ht(i.axis,n.displaceBy);return St({draggable:n,insideDestination:r,destination:i,viewport:a,displacedBy:d,last:pt,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:r,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!u)return null;const p=Mt({impact:u,draggable:r,droppable:l,draggables:o,afterCritical:s});return{clientSelection:Ft({pageBorderBoxCenter:p,draggable:r,viewport:a}),impact:u,scrollJumpRequest:null}},Yt=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};var Jt=({state:e,type:t})=>{const r=((e,t)=>{const r=Yt(e);return r?t[r]:null})(e.impact,e.dimensions.droppables),n=Boolean(r),o=e.dimensions.droppables[e.critical.droppable.id],i=r||o,a=i.axis.direction,s="vertical"===a&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===a&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(s&&!n)return null;const l="MOVE_DOWN"===t||"MOVE_RIGHT"===t,c=e.dimensions.draggables[e.critical.draggable.id],d=e.current.page.borderBoxCenter,{draggables:u,droppables:p}=e.dimensions;return s?Wt({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,destination:i,draggables:u,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):zt({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,isOver:i,draggables:u,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function Xt(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function Kt(e){const t=ft(e.top,e.bottom),r=ft(e.left,e.right);return function(e){return t(e.y)&&r(e.x)}}function Qt({pageBorderBox:e,draggable:t,droppables:r}){const n=ot(r).filter((t=>{if(!t.isEnabled)return!1;const r=t.subject.active;if(!r)return!1;if(o=r,!((n=e).left<o.right&&n.right>o.left&&n.top<o.bottom&&n.bottom>o.top))return!1;var n,o;if(Kt(r)(e.center))return!0;const i=t.axis,a=r.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=ft(r[i.crossAxisStart],r[i.crossAxisEnd]),d=c(s),u=c(l);return!d&&!u||(d?s<a:l>a)}));return n.length?1===n.length?n[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:r}){const n=t.page.borderBox.center,o=r.map((t=>{const r=t.axis,o=Le(t.axis.line,e.center[r.line],t.page.borderBox.center[r.crossAxisLine]);return{id:t.descriptor.id,distance:Me(n,o)}})).sort(((e,t)=>t.distance-e.distance));return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:n}):null}const Zt=(e,t)=>Fe(Ye(e,t));function er({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var tr=({pageOffset:e,draggable:t,draggables:r,droppables:n,previousImpact:o,viewport:i,afterCritical:a})=>{const s=Zt(t.page.borderBox,e),l=Qt({pageBorderBox:s,draggable:t,droppables:n});if(!l)return gt;const c=n[l],d=at(c.descriptor.id,r),u=((e,t)=>{const r=e.frame;return r?Zt(t,r.scroll.diff.value):t})(c,s);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:r,destination:n,insideDestination:o,afterCritical:i})=>{if(!n.isCombineEnabled)return null;const a=n.axis,s=Ht(n.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],u=ct(e,o).find((e=>{const t=e.descriptor.id,n=e.page.borderBox,o=n[a.size]/4,s=Ct(t,i),u=er({displaced:r.displaced,id:t});return s?u?d>n[a.start]+o&&d<n[a.end]-o:c>n[a.start]-l+o&&c<n[a.end]-l-o:u?d>n[a.start]+l+o&&d<n[a.end]+l-o:c>n[a.start]+o&&c<n[a.end]-o}));return u?{displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:u.descriptor.id,droppableId:n.descriptor.id}}}:null})({pageBorderBoxWithDroppableScroll:u,draggable:t,previousImpact:o,destination:c,insideDestination:d,afterCritical:a})||(({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:r,insideDestination:n,last:o,viewport:i,afterCritical:a})=>{const s=r.axis,l=Ht(r.axis,t.displaceBy),c=l.value,d=e[s.start],u=e[s.end],p=function({draggable:e,closest:t,inHomeList:r}){return t?r&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:ct(t,n).find((e=>{const t=e.descriptor.id,r=e.page.borderBox.center[s.line],n=Ct(t,a),i=er({displaced:o,id:t});return n?i?u<=r:d<r-c:i?u<=r+c:d<r}))||null,inHomeList:dt(t,r)});return St({draggable:t,insideDestination:n,destination:r,viewport:i,last:o,displacedBy:l,index:p})})({pageBorderBoxWithDroppableScroll:u,draggable:t,destination:c,insideDestination:d,last:o.displaced,viewport:i,afterCritical:a})},rr=(e,t)=>({...e,[t.descriptor.id]:t});const nr=({previousImpact:e,impact:t,droppables:r})=>{const n=Yt(e),o=Yt(t);if(!n)return r;if(n===o)return r;const i=r[n];if(!i.subject.withPlaceholder)return r;const a=(e=>{const t=e.subject.withPlaceholder;t||d();const r=e.frame;if(!r){const t=Ke({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const n=t.oldFrameMaxScroll;n||d();const o=Vt(r,n),i=Ke({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return rr(r,a)};var or=({state:e,clientSelection:t,dimensions:r,viewport:n,impact:o,scrollJumpRequest:i})=>{const a=n||e.viewport,s=r||e.dimensions,l=t||e.current.client.selection,c=Re(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:Ne(e.initial.client.borderBoxCenter,c)},u={selection:Ne(d.selection,a.scroll.current),borderBoxCenter:Ne(d.borderBoxCenter,a.scroll.current),offset:Ne(d.offset,a.scroll.diff.value)},p={client:d,page:u};if("COLLECTING"===e.phase)return{...e,dimensions:s,viewport:a,current:p};const g=s.draggables[e.critical.draggable.id],f=o||tr({pageOffset:u.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=(({draggable:e,draggables:t,droppables:r,previousImpact:n,impact:o})=>{const i=nr({previousImpact:n,impact:o,droppables:r}),a=Yt(o);if(!a)return i;const s=r[a];if(dt(e,s))return i;if(s.subject.withPlaceholder)return i;const l=qt(s,e,t);return rr(i,l)})({draggable:g,impact:f,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:m},impact:f,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}};var ir=({impact:e,viewport:t,draggables:r,destination:n,forceShouldAnimate:o})=>{const i=e.displaced,a=function(e,t){return e.map((e=>t[e]))}(i.all,r),s=wt({afterDragging:a,destination:n,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},ar=({impact:e,draggable:t,droppable:r,draggables:n,viewport:o,afterCritical:i})=>{const a=Mt({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:i});return Ft({pageBorderBoxCenter:a,draggable:t,viewport:o})},sr=({state:e,dimensions:t,viewport:r})=>{"SNAP"!==e.movementMode&&d();const n=e.impact,o=r||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=Yt(n);c||d();const u=s[c],p=ir({impact:n,viewport:o,destination:u,draggables:a}),g=ar({impact:p,draggable:l,droppable:u,draggables:a,viewport:o,afterCritical:e.afterCritical});return or({impact:p,clientSelection:g,state:e,dimensions:i,viewport:o})},lr=({draggable:e,home:t,draggables:r,viewport:n})=>{const o=Ht(t.axis,e.displaceBy),i=at(t.descriptor.id,r),a=i.indexOf(e);-1===a&&d();const s=i.slice(a+1),l=s.reduce(((e,t)=>(e[t.descriptor.id]=!0,e)),{}),c={inVirtualList:"virtual"===t.descriptor.mode,displacedBy:o,effected:l};var u;return{impact:{displaced:wt({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:n.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(u=e.descriptor,{index:u.index,droppableId:u.droppableId})}},afterCritical:c}};var cr=({additions:e,updatedDroppables:t,viewport:r})=>{const n=r.scroll.diff.value;return e.map((e=>{const o=e.descriptor.droppableId,i=(e=>{const t=e.frame;return t||d(),t})(t[o]),a=i.scroll.diff.value,s=(({draggable:e,offset:t,initialWindowScroll:r})=>{const n=He(e.client,t),o=Ve(n,r);return{...e,placeholder:{...e.placeholder,client:n},client:n,page:o}})({draggable:e,offset:Ne(n,a),initialWindowScroll:r.scroll.initial});return s}))};const dr=e=>"SNAP"===e.movementMode,ur=(e,t,r)=>{const n=((e,t)=>({draggables:e.draggables,droppables:rr(e.droppables,t)}))(e.dimensions,t);return!dr(e)||r?or({state:e,dimensions:n}):sr({state:e,dimensions:n})};function pr(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const gr={phase:"IDLE",completed:null,shouldFlush:!1};var fr=(e=gr,t)=>{if("FLUSH"===t.type)return{...gr,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&d();const{critical:r,clientSelection:n,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[r.draggable.id],l=i.droppables[r.droppable.id],c={selection:n,borderBoxCenter:s.client.borderBox.center,offset:Pe},u={client:c,page:{selection:Ne(c.selection,o.scroll.initial),borderBoxCenter:Ne(c.selection,o.scroll.initial),offset:Ne(c.selection,o.scroll.diff.value)}},p=ot(i.droppables).every((e=>!e.isFixedOnPage)),{impact:g,afterCritical:f}=lr({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:a,dimensions:i,initial:u,current:u,isWindowScrollAllowed:p,impact:g,afterCritical:f,onLiftImpact:g,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&d();return{...e,phase:"COLLECTING"}}if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&d(),(({state:e,published:t})=>{const r=t.modified.map((t=>{const r=e.dimensions.droppables[t.droppableId];return Qe(r,t.scroll)})),n={...e.dimensions.droppables,...rt(r)},o=nt(cr({additions:t.additions,updatedDroppables:n,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach((e=>{delete i[e]}));const a={droppables:n,draggables:i},s=Yt(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],d=a.droppables[e.critical.droppable.id],{impact:u,afterCritical:p}=lr({draggable:c,home:d,draggables:i,viewport:e.viewport}),g=l&&l.isCombineEnabled?e.impact:u,f=tr({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:g,viewport:e.viewport,afterCritical:p}),m={...e,phase:"DRAGGING",impact:f,onLiftImpact:u,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?m:{...m,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;Xt(e)||d();const{client:r}=t.payload;return Be(r,e.current.client.selection)?e:or({state:e,clientSelection:r,impact:dr(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return pr(e);if("COLLECTING"===e.phase)return pr(e);Xt(e)||d();const{id:r,newScroll:n}=t.payload,o=e.dimensions.droppables[r];if(!o)return e;const i=Qe(o,n);return ur(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Xt(e)||d();const{id:r,isEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||d(),o.isEnabled===n&&d();const i={...o,isEnabled:n};return ur(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Xt(e)||d();const{id:r,isCombineEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||d(),o.isCombineEnabled===n&&d();const i={...o,isCombineEnabled:n};return ur(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;Xt(e)||d(),e.isWindowScrollAllowed||d();const r=t.payload.newScroll;if(Be(e.viewport.scroll.current,r))return pr(e);const n=Gt(e.viewport,r);return dr(e)?sr({state:e,viewport:n}):or({state:e,viewport:n})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!Xt(e))return e;const r=t.payload.maxScroll;if(Be(r,e.viewport.scroll.max))return e;const n={...e.viewport,scroll:{...e.viewport.scroll,max:r}};return{...e,viewport:n}}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&d();const r=Jt({state:e,type:t.type});return r?or({state:e,impact:r.impact,clientSelection:r.clientSelection,scrollJumpRequest:r.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const r=t.payload.reason;"COLLECTING"!==e.phase&&d();return{...e,phase:"DROP_PENDING",isWaiting:!0,reason:r}}if("DROP_ANIMATE"===t.type){const{completed:r,dropDuration:n,newHomeClientOffset:o}=t.payload;"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&d();return{phase:"DROP_ANIMATING",completed:r,dropDuration:n,newHomeClientOffset:o,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};function mr(e,t){return e instanceof Object&&"type"in e&&e.type===t}const br=e=>({type:"LIFT",payload:e}),hr=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),vr=()=>({type:"COLLECTION_STARTING",payload:null}),yr=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),xr=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Ir=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Dr=e=>({type:"MOVE",payload:e}),wr=()=>({type:"MOVE_UP",payload:null}),Er=()=>({type:"MOVE_DOWN",payload:null}),Sr=()=>({type:"MOVE_RIGHT",payload:null}),Cr=()=>({type:"MOVE_LEFT",payload:null}),Ar=()=>({type:"FLUSH",payload:null}),Or=e=>({type:"DROP_COMPLETE",payload:e}),Pr=e=>({type:"DROP",payload:e}),Nr=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});const Rr="cubic-bezier(.2,1,.1,1)",Br={drop:0,combining:.7},Tr={drop:.75},Lr={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Mr=`${Lr.outOfTheWay}s ${"cubic-bezier(0.2, 0, 0, 1)"}`,Gr={fluid:`opacity ${Mr}`,snap:`transform ${Mr}, opacity ${Mr}`,drop:e=>{const t=`${e}s ${Rr}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Mr}`,placeholder:`height ${Mr}, width ${Mr}, margin ${Mr}`},_r=e=>Be(e,Pe)?void 0:`translate(${e.x}px, ${e.y}px)`,Fr={moveTo:_r,drop:(e,t)=>{const r=_r(e);if(r)return t?`${r} scale(${Tr.drop})`:r}},{minDropTime:kr,maxDropTime:Wr}=Lr,$r=Wr-kr;const Ur=({getState:e,dispatch:t})=>r=>n=>{if(!mr(n,"DROP"))return void r(n);const o=e(),i=n.payload.reason;if("COLLECTING"===o.phase)return void t((e=>({type:"DROP_PENDING",payload:e}))({reason:i}));if("IDLE"===o.phase)return;"DROP_PENDING"===o.phase&&o.isWaiting&&d(),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&d();const a=o.critical,s=o.dimensions,l=s.draggables[o.critical.draggable.id],{impact:c,didDropInsideDroppable:u}=(({draggables:e,reason:t,lastImpact:r,home:n,viewport:o,onLiftImpact:i})=>{if(!r.at||"DROP"!==t)return{impact:ir({draggables:e,impact:i,destination:n,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1};return"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:{...r,displaced:pt},didDropInsideDroppable:!0}})({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),p=u?st(c):null,g=u?lt(c):null,f={index:a.draggable.index,droppableId:a.droppable.id},m={draggableId:l.descriptor.id,type:l.descriptor.type,source:f,reason:i,mode:o.movementMode,destination:p,combine:g},b=(({impact:e,draggable:t,dimensions:r,viewport:n,afterCritical:o})=>{const{draggables:i,droppables:a}=r,s=Yt(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=ar({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:n});return Re(d,t.client.borderBox.center)})({impact:c,draggable:l,dimensions:s,viewport:o.viewport,afterCritical:o.afterCritical}),h={critical:o.critical,afterCritical:o.afterCritical,result:m,impact:c};if(!(!Be(o.current.client.offset,b)||Boolean(m.combine)))return void t(Or({completed:h}));const v=(({current:e,destination:t,reason:r})=>{const n=Me(e,t);if(n<=0)return kr;if(n>=1500)return Wr;const o=kr+$r*(n/1500);return Number(("CANCEL"===r?.6*o:o).toFixed(2))})({current:o.current.client.offset,destination:b,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:b,dropDuration:v,completed:h}))};var jr=function(e){var t=[],r=null,n=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];t=o,r||(r=requestAnimationFrame((function(){r=null,e.apply(void 0,t)})))};return n.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},n},Hr=()=>({x:window.pageXOffset,y:window.pageYOffset});function Vr({onWindowScroll:e}){const t=jr((function(){e(Hr())})),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let n=i;function o(){return n!==i}return{start:function(){o()&&d(),n=a(window,[r])},stop:function(){o()||d(),t.cancel(),n(),n=i},isActive:o}}const qr=e=>{const t=Vr({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>r=>{!t.isActive()&&mr(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>mr(e,"DROP_COMPLETE")||mr(e,"DROP_ANIMATE")||mr(e,"FLUSH"))(r)&&t.stop(),e(r)}};var zr=()=>{const e=[];return{add:t=>{const r=setTimeout((()=>(t=>{const r=e.findIndex((e=>e.timerId===t));-1===r&&d();const[n]=e.splice(r,1);n.callback()})(r))),n={timerId:r,callback:t};e.push(n)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach((e=>{clearTimeout(e.timerId),e.callback()}))}}};const Yr=(e,t)=>{t()},Jr=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Xr(e,t,r,n){if(!e)return void r(n(t));const o=(e=>{let t=!1,r=!1;const n=setTimeout((()=>{r=!0})),o=o=>{t||r||(t=!0,e(o),clearTimeout(n))};return o.wasCalled=()=>t,o})(r);e(t,{announce:o}),o.wasCalled()||r(n(t))}var Kr=(e,t)=>{const r=((e,t)=>{const r=zr();let n=null;const o=r=>{n||d(),n=null,Yr(0,(()=>Xr(e().onDragEnd,r,t,b.onDragEnd)))};return{beforeCapture:(t,r)=>{n&&d(),Yr(0,(()=>{const n=e().onBeforeCapture;n&&n({draggableId:t,mode:r})}))},beforeStart:(t,r)=>{n&&d(),Yr(0,(()=>{const n=e().onBeforeDragStart;n&&n(Jr(t,r))}))},start:(o,i)=>{n&&d();const a=Jr(o,i);n={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},r.add((()=>{Yr(0,(()=>Xr(e().onDragStart,a,t,b.onDragStart)))}))},update:(o,i)=>{const a=st(i),s=lt(i);n||d();const l=!((e,t)=>{if(e===t)return!0;const r=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,n=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return r&&n})(o,n.lastCritical);l&&(n.lastCritical=o);const c=(p=a,!(null==(u=n.lastLocation)&&null==p||null!=u&&null!=p&&u.droppableId===p.droppableId&&u.index===p.index));var u,p;c&&(n.lastLocation=a);const g=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(n.lastCombine,s);if(g&&(n.lastCombine=s),!l&&!c&&!g)return;const f={...Jr(o,n.mode),combine:s,destination:a};r.add((()=>{Yr(0,(()=>Xr(e().onDragUpdate,f,t,b.onDragUpdate)))}))},flush:()=>{n||d(),r.flush()},drop:o,abort:()=>{if(!n)return;const e={...Jr(n.lastCritical,n.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>n=>{if(mr(n,"BEFORE_INITIAL_CAPTURE"))return void r.beforeCapture(n.payload.draggableId,n.payload.movementMode);if(mr(n,"INITIAL_PUBLISH")){const e=n.payload.critical;return r.beforeStart(e,n.payload.movementMode),t(n),void r.start(e,n.payload.movementMode)}if(mr(n,"DROP_COMPLETE")){const e=n.payload.completed.result;return r.flush(),t(n),void r.drop(e)}if(t(n),mr(n,"FLUSH"))return void r.abort();const o=e.getState();"DRAGGING"===o.phase&&r.update(o.critical,o.impact)}};const Qr=e=>t=>r=>{if(!mr(r,"DROP_ANIMATION_FINISHED"))return void t(r);const n=e.getState();"DROP_ANIMATING"!==n.phase&&d(),e.dispatch(Or({completed:n.completed}))},Zr=e=>{let t=null,r=null;return n=>o=>{if((mr(o,"FLUSH")||mr(o,"DROP_COMPLETE")||mr(o,"DROP_ANIMATION_FINISHED"))&&(r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)),n(o),!mr(o,"DROP_ANIMATE"))return;const i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};r=requestAnimationFrame((()=>{r=null,t=a(window,[i])}))}};var en=e=>t=>r=>n=>{if((e=>mr(e,"DROP_COMPLETE")||mr(e,"DROP_ANIMATE")||mr(e,"FLUSH"))(n))return e.stop(),void r(n);if(mr(n,"INITIAL_PUBLISH")){r(n);const o=t.getState();return"DRAGGING"!==o.phase&&d(),void e.start(o)}r(n),e.scroll(t.getState())};const tn=e=>t=>r=>{if(t(r),!mr(r,"PUBLISH_WHILE_DRAGGING"))return;const n=e.getState();"DROP_PENDING"===n.phase&&(n.isWaiting||e.dispatch(Pr({reason:n.reason})))},rn=E;var nn=({dimensionMarshal:e,focusMarshal:t,styleMarshal:r,getResponders:n,announce:o,autoScroller:i})=>{return I(fr,rn(function(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(h(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map((e=>e(a)));return i=E(...s)(o.dispatch),{...o,dispatch:i}}}((a=r,()=>e=>t=>{mr(t,"INITIAL_PUBLISH")&&a.dragging(),mr(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(mr(t,"FLUSH")||mr(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>r=>{(mr(r,"DROP_COMPLETE")||mr(r,"FLUSH")||mr(r,"DROP_ANIMATE"))&&e.stopPublishing(),t(r)})(e),(e=>({getState:t,dispatch:r})=>n=>o=>{if(!mr(o,"LIFT"))return void n(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&r(Or({completed:l.completed})),"IDLE"!==t().phase&&d(),r(Ar()),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:s}});const c={draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},{critical:u,dimensions:p,viewport:g}=e.startPublishing(c);r({type:"INITIAL_PUBLISH",payload:{critical:u,dimensions:p,clientSelection:a,movementMode:s,viewport:g}})})(e),Ur,Qr,Zr,tn,en(i),qr,(e=>{let t=!1;return()=>r=>n=>{if(mr(n,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),void e.tryRestoreFocusRecorded();if(r(n),t){if(mr(n,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(mr(n,"DROP_COMPLETE")){t=!1;const r=n.payload.completed.result;r.combine&&e.tryShiftRecord(r.draggableId,r.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),Kr(n,o))));var a};var on=({scrollHeight:e,scrollWidth:t,height:r,width:n})=>{const o=Re({x:t,y:e},{x:n,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},an=()=>{const e=document.documentElement;return e||d(),e},sn=()=>{const e=an();return on({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},ln=({critical:e,scrollOptions:t,registry:r})=>{const n=(()=>{const e=Hr(),t=sn(),r=e.y,n=e.x,o=an(),i=o.clientWidth,a=o.clientHeight;return{frame:Fe({top:r,left:n,right:n+i,bottom:r+a}),scroll:{initial:e,current:e,max:t,diff:{value:Pe,displacement:Pe}}}})(),o=n.scroll.current,i=e.droppable,a=r.droppable.getAllByType(i.type).map((e=>e.callbacks.getDimensionAndWatchScroll(o,t))),s=r.draggable.getAllByType(e.draggable.type).map((e=>e.getDimension(o)));return{dimensions:{draggables:nt(s),droppables:rt(a)},critical:e,viewport:n}};function cn(e,t,r){if(r.descriptor.id===t.id)return!1;if(r.descriptor.type!==t.type)return!1;return"virtual"===e.droppable.getById(r.descriptor.droppableId).descriptor.mode}var dn=(e,t)=>{let r=null;const n=function({registry:e,callbacks:t}){let r={additions:{},removals:{},modified:{}},n=null;const o=()=>{n||(t.collectionStarting(),n=requestAnimationFrame((()=>{n=null;const{additions:o,removals:i,modified:a}=r,s=Object.keys(o).map((t=>e.draggable.getById(t).getDimension(Pe))).sort(((e,t)=>e.descriptor.index-t.descriptor.index)),l=Object.keys(a).map((t=>({droppableId:t,scroll:e.droppable.getById(t).callbacks.getScrollWhileDragging()}))),c={additions:s,removals:Object.keys(i),modified:l};r={additions:{},removals:{},modified:{}},t.publish(c)})))};return{add:e=>{const t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],o()},remove:e=>{const t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],o()},stop:()=>{n&&(cancelAnimationFrame(n),n=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=t=>{r||d();const o=r.critical.draggable;"ADDITION"===t.type&&cn(e,o,t.value)&&n.add(t.value),"REMOVAL"===t.type&&cn(e,o,t.value)&&n.remove(t.value)},i={updateDroppableIsEnabled:(n,o)=>{e.droppable.exists(n)||d(),r&&t.updateDroppableIsEnabled({id:n,isEnabled:o})},updateDroppableIsCombineEnabled:(n,o)=>{r&&(e.droppable.exists(n)||d(),t.updateDroppableIsCombineEnabled({id:n,isCombineEnabled:o}))},scrollDroppable:(t,n)=>{r&&e.droppable.getById(t).callbacks.scroll(n)},updateDroppableScroll:(n,o)=>{r&&(e.droppable.exists(n)||d(),t.updateDroppableScroll({id:n,newScroll:o}))},startPublishing:t=>{r&&d();const n=e.draggable.getById(t.draggableId),i=e.droppable.getById(n.descriptor.droppableId),a={draggable:n.descriptor,droppable:i.descriptor},s=e.subscribe(o);return r={critical:a,unsubscribe:s},ln({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!r)return;n.stop();const t=r.critical.droppable;e.droppable.getAllByType(t.type).forEach((e=>e.callbacks.dragStopped())),r.unsubscribe(),r=null}};return i},un=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason),pn=e=>{window.scrollBy(e.x,e.y)};const gn=tt((e=>ot(e).filter((e=>!!e.isEnabled&&!!e.frame))));var fn=({center:e,destination:t,droppables:r})=>{if(t){const e=r[t];return e.frame?e:null}const n=((e,t)=>{const r=gn(t).find((t=>(t.frame||d(),Kt(t.frame.pageMarginBox)(e))))||null;return r})(e,r);return n};const mn={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var bn=({startOfRange:e,endOfRange:t,current:r})=>{const n=t-e;if(0===n)return 0;return(r-e)/n},hn=({distanceToEdge:e,thresholds:t,dragStartTime:r,shouldUseTimeDampening:n,getAutoScrollerOptions:o})=>{const i=((e,t,r=(()=>mn))=>{const n=r();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return n.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const o=1-bn({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=n.maxPixelScroll*n.ease(o);return Math.ceil(i)})(e,t,o);return 0===i?0:n?Math.max(((e,t,r)=>{const n=r(),o=n.durationDampening.accelerateAt,i=n.durationDampening.stopDampeningAt,a=t,s=i,l=Date.now()-a;if(l>=i)return e;if(l<o)return 1;const c=bn({startOfRange:o,endOfRange:s,current:l}),d=e*n.ease(c);return Math.ceil(d)})(i,r,o),1):i},vn=({container:e,distanceToEdges:t,dragStartTime:r,axis:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,r=(()=>mn))=>{const n=r();return{startScrollingFrom:e[t.size]*n.startFromPercentage,maxScrollValueAt:e[t.size]*n.maxScrollAtPercentage}})(e,n,i);return t[n.end]<t[n.start]?hn({distanceToEdge:t[n.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*hn({distanceToEdge:t[n.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const yn=_e((e=>0===e?0:e));var xn=({dragStartTime:e,container:t,subject:r,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:n.y-t.top,right:t.right-n.x,bottom:t.bottom-n.y,left:n.x-t.left},s=vn({container:t,distanceToEdges:a,dragStartTime:e,axis:ht,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=vn({container:t,distanceToEdges:a,dragStartTime:e,axis:vt,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=yn({x:l,y:s});if(Be(c,Pe))return null;const d=(({container:e,subject:t,proposedScroll:r})=>{const n=t.height>e.height,o=t.width>e.width;return o||n?o&&n?null:{x:o?0:r.x,y:n?0:r.y}:r})({container:t,subject:r,proposedScroll:c});return d?Be(d,Pe)?null:d:null};const In=_e((e=>0===e?0:e>0?1:-1)),Dn=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:r,change:n})=>{const o=Ne(t,n),i={x:e(o.x,r.x),y:e(o.y,r.y)};return Be(i,Pe)?null:i}})(),wn=({max:e,current:t,change:r})=>{const n={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=In(r),i=Dn({max:n,current:t,change:o});return!i||(0!==o.x&&0===i.x||0!==o.y&&0===i.y)},En=(e,t)=>wn({current:e.scroll.current,max:e.scroll.max,change:t}),Sn=(e,t)=>{const r=e.frame;return!!r&&wn({current:r.scroll.current,max:r.scroll.max,change:t})};var Cn=({state:e,dragStartTime:t,shouldUseTimeDampening:r,scrollWindow:n,scrollDroppable:o,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,s=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const o=(({viewport:e,subject:t,center:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=xn({dragStartTime:n,container:e.frame,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&En(e,a)?a:null})({dragStartTime:t,viewport:e.viewport,subject:s,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});if(o)return void n(o)}const l=fn({center:a,destination:Yt(e.impact),droppables:e.dimensions.droppables});if(!l)return;const c=(({droppable:e,subject:t,center:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=xn({dragStartTime:n,container:a.pageMarginBox,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Sn(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)},An=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:r=(()=>mn)})=>{const n=jr(e),o=jr(t);let i=null;const a=e=>{i||d();const{shouldUseTimeDampening:t,dragStartTime:a}=i;Cn({state:e,scrollWindow:n,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:r})};return{start:e=>{i&&d();const t=Date.now();let n=!1;const o=()=>{n=!0};Cn({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:r}),i={dragStartTime:t,shouldUseTimeDampening:n},n&&a(e)},stop:()=>{i&&(n.cancel(),o.cancel(),i=null)},scroll:a}},On=({move:e,scrollDroppable:t,scrollWindow:r})=>{const n=(e,r)=>{if(!Sn(e,r))return r;const n=((e,t)=>{const r=e.frame;return r&&Sn(e,t)?Dn({current:r.scroll.current,max:r.scroll.max,change:t}):null})(e,r);if(!n)return t(e.descriptor.id,r),null;const o=Re(r,n);t(e.descriptor.id,o);return Re(r,o)},o=(e,t,n)=>{if(!e)return n;if(!En(t,n))return n;const o=((e,t)=>{if(!En(e,t))return null;const r=e.scroll.max,n=e.scroll.current;return Dn({current:n,max:r,change:t})})(t,n);if(!o)return r(n),null;const i=Re(n,o);r(i);return Re(n,i)};return t=>{const r=t.scrollJumpRequest;if(!r)return;const i=Yt(t.impact);i||d();const a=n(t.dimensions.droppables[i],r);if(!a)return;const s=t.viewport,l=o(t.isWindowScrollAllowed,s,a);l&&((t,r)=>{const n=Ne(t.current.client.selection,r);e({client:n})})(t,l)}},Pn=({scrollDroppable:e,scrollWindow:t,move:r,getAutoScrollerOptions:n})=>{const o=An({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:n}),i=On({move:r,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{n().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}};const Nn="data-rfd",Rn=(()=>{const e=`${Nn}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Bn=(()=>{const e=`${Nn}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Tn=(()=>{const e=`${Nn}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Ln={contextId:`${Nn}-scroll-container-context-id`},Mn=(e,t)=>e.map((e=>{const r=e.styles[t];return r?`${e.selector} { ${r} }`:""})).join(" ");var Gn=e=>{const t=(r=e,e=>`[${e}="${r}"]`);var r;const n=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(Rn.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}})(),o=[(()=>{const e=`\n transition: ${Gr.outOfTheWay};\n `;return{selector:t(Bn.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),n,{selector:t(Tn.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:Mn(o,"always"),resting:Mn(o,"resting"),dragging:Mn(o,"dragging"),dropAnimating:Mn(o,"dropAnimating"),userCancel:Mn(o,"userCancel")}};const _n="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect,Fn=()=>{const e=document.querySelector("head");return e||d(),e},kn=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Wn(e,t){return Array.from(e.querySelectorAll(t))}var $n=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Un(e){return e instanceof $n(e).HTMLElement}function jn(e){const r=t.useRef({}),n=t.useRef(null),o=t.useRef(null),i=t.useRef(!1),a=Oe((function(e,t){const n={id:e,focus:t};return r.current[e]=n,function(){const t=r.current;t[e]!==n&&delete t[e]}}),[]),s=Oe((function(t){const r=function(e,t){const r=`[${Rn.contextId}="${e}"]`,n=Wn(document,r);if(!n.length)return null;const o=n.find((e=>e.getAttribute(Rn.draggableId)===t));return o&&Un(o)?o:null}(e,t);r&&r!==document.activeElement&&r.focus()}),[e]),l=Oe((function(e,t){n.current===e&&(n.current=t)}),[]),c=Oe((function(){o.current||i.current&&(o.current=requestAnimationFrame((()=>{o.current=null;const e=n.current;e&&s(e)})))}),[s]),d=Oe((function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(Rn.draggableId)===e&&(n.current=e)}),[]);_n((()=>(i.current=!0,function(){i.current=!1;const e=o.current;e&&cancelAnimationFrame(e)})),[]);return Ae((()=>({register:a,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l})),[a,d,c,l])}function Hn(){const e={draggables:{},droppables:{}},t=[];function r(e){t.length&&t.forEach((t=>t(e)))}function n(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,r({type:"ADDITION",value:t})},update:(t,r)=>{const n=e.draggables[r.descriptor.id];n&&n.uniqueId===t.uniqueId&&(delete e.draggables[r.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const o=t.descriptor.id,i=n(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],e.droppables[t.descriptor.droppableId]&&r({type:"REMOVAL",value:t}))},getById:function(e){const t=n(e);return t||d(),t},findById:n,exists:e=>Boolean(n(e)),getAllByType:t=>Object.values(e.draggables).filter((e=>e.descriptor.type===t))},droppable:{register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const r=o(t.descriptor.id);r&&t.uniqueId===r.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=o(e);return t||d(),t},findById:o,exists:e=>Boolean(o(e)),getAllByType:t=>Object.values(e.droppables).filter((e=>e.descriptor.type===t))},subscribe:function(e){return t.push(e),function(){const r=t.indexOf(e);-1!==r&&t.splice(r,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Vn=t.createContext(null);function qn(){return qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qn.apply(null,arguments)}var zn=()=>{const e=document.body;return e||d(),e};const Yn={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Jn=e=>`rfd-announcement-${e}`;const Xn={separator:"::"};function Kn(e,r=Xn){const n=t.useId();return Ae((()=>`${e}${r.separator}${n}`),[r.separator,e,n])}var Qn=t.createContext(null);function Zn(e){const r=t.useRef(e);return t.useEffect((()=>{r.current=e})),r}function eo(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const to=27,ro=32,no=37,oo=38,io=39,ao=40,so={13:!0,9:!0};var lo=e=>{so[e.keyCode]&&e.preventDefault()};const co=(()=>{const e="visibilitychange";if("undefined"==typeof document)return e;return[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find((e=>`on${e}`in document))||e})(),uo=0,po=5;const go={type:"IDLE"};function fo({cancel:e,completed:t,getPhase:r,setPhase:n}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:o,clientY:i}=e;if(t!==uo)return;const a={x:o,y:i},s=r();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&d();const l=s.point;if(c=l,u=a,!(Math.abs(u.x-c.x)>=po||Math.abs(u.y-c.y)>=po))return;var c,u;e.preventDefault();const p=s.actions.fluidLift(a);n({type:"DRAGGING",actions:p})}},{eventName:"mouseup",fn:n=>{const o=r();"DRAGGING"===o.type?(n.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===r().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==r().type)return t.keyCode===to?(t.preventDefault(),void e()):void lo(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===r().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const n=r();"IDLE"===n.type&&d(),n.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:co,fn:e}]}function mo(e){const r=t.useRef(go),n=t.useRef(i),o=Ae((()=>({eventName:"mousedown",fn:function(t){if(t.defaultPrevented)return;if(t.button!==uo)return;if(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,c,{sourceEvent:t});if(!o)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};n.current(),g(o,i)}})),[e]),s=Ae((()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const n=e.findOptionsForDraggable(r);n&&(n.shouldRespectForcePress||e.canGetLock(r)&&t.preventDefault())}})),[e]),l=Oe((function(){n.current=a(window,[s,o],{passive:!1,capture:!0})}),[s,o]),c=Oe((()=>{"IDLE"!==r.current.type&&(r.current=go,n.current(),l())}),[l]),u=Oe((()=>{const e=r.current;c(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[c]),p=Oe((function(){const e=fo({cancel:u,completed:c,getPhase:()=>r.current,setPhase:e=>{r.current=e}});n.current=a(window,e,{capture:!0,passive:!1})}),[u,c]),g=Oe((function(e,t){"IDLE"!==r.current.type&&d(),r.current={type:"PENDING",point:t,actions:e},p()}),[p]);_n((function(){return l(),function(){n.current()}}),[l])}function bo(){}const ho={34:!0,33:!0,36:!0,35:!0};function vo(e,t){function r(){t(),e.cancel()}return[{eventName:"keydown",fn:n=>n.keyCode===to?(n.preventDefault(),void r()):n.keyCode===ro?(n.preventDefault(),t(),void e.drop()):n.keyCode===ao?(n.preventDefault(),void e.moveDown()):n.keyCode===oo?(n.preventDefault(),void e.moveUp()):n.keyCode===io?(n.preventDefault(),void e.moveRight()):n.keyCode===no?(n.preventDefault(),void e.moveLeft()):void(ho[n.keyCode]?n.preventDefault():lo(n))},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:co,fn:r}]}function yo(e){const r=t.useRef(bo),n=Ae((()=>({eventName:"keydown",fn:function(t){if(t.defaultPrevented)return;if(t.keyCode!==ro)return;const n=e.findClosestDraggableId(t);if(!n)return;const i=e.tryGetLock(n,c,{sourceEvent:t});if(!i)return;t.preventDefault();let s=!0;const l=i.snapLift();function c(){s||d(),s=!1,r.current(),o()}r.current(),r.current=a(window,vo(l,c),{capture:!0,passive:!1})}})),[e]),o=Oe((function(){r.current=a(window,[n],{passive:!1,capture:!0})}),[n]);_n((function(){return o(),function(){r.current()}}),[o])}const xo={type:"IDLE"},Io=.15;function Do(e){const r=t.useRef(xo),n=t.useRef(i),o=Oe((function(){return r.current}),[]),s=Oe((function(e){r.current=e}),[]),l=Ae((()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,u,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:s}=i,l={x:a,y:s};n.current(),m(o,l)}})),[e]),c=Oe((function(){n.current=a(window,[l],{capture:!0,passive:!1})}),[l]),u=Oe((()=>{const e=r.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),s(xo),n.current(),c())}),[c,s]),p=Oe((()=>{const e=r.current;u(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[u]),g=Oe((function(){const e={capture:!0,passive:!1},t={cancel:p,completed:u,getPhase:o},r=a(window,function({cancel:e,completed:t,getPhase:r}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const n=r();if("DRAGGING"!==n.type)return void e();n.hasMoved=!0;const{clientX:o,clientY:i}=t.touches[0],a={x:o,y:i};t.preventDefault(),n.actions.move(a)}},{eventName:"touchend",fn:n=>{const o=r();"DRAGGING"===o.type?(n.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===r().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const n=r();"IDLE"===n.type&&d();const o=t.touches[0];if(!o)return;if(!(o.force>=Io))return;const i=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return i?n.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:co,fn:e}]}(t),e),i=a(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:r=>{"DRAGGING"===t().type?(r.keyCode===to&&r.preventDefault(),e()):e()}},{eventName:co,fn:e}]}(t),e);n.current=function(){r(),i()}}),[p,o,u]),f=Oe((function(){const e=o();"PENDING"!==e.type&&d();const t=e.actions.fluidLift(e.point);s({type:"DRAGGING",actions:t,hasMoved:!1})}),[o,s]),m=Oe((function(e,t){"IDLE"!==o().type&&d();const r=setTimeout(f,120);s({type:"PENDING",point:t,actions:e,longPressTimerId:r}),g()}),[g,o,s,f]);_n((function(){return c(),function(){n.current();const e=o();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),s(xo))}}),[o,c,s]),_n((function(){return a(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])}),[])}const wo=["input","button","textarea","select","option","optgroup","video","audio"];function Eo(e,t){if(null==t)return!1;if(wo.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return"true"===r||""===r||t!==e&&Eo(e,t.parentElement)}function So(e,t){const r=t.target;return!!Un(r)&&Eo(e,r)}var Co=e=>Fe(e.getBoundingClientRect()).center;const Ao=(()=>{const e="matches";if("undefined"==typeof document)return e;return[e,"msMatchesSelector","webkitMatchesSelector"].find((e=>e in Element.prototype))||e})();function Oo(e,t){return null==e?null:e[Ao](t)?e:Oo(e.parentElement,t)}function Po(e,t){return e.closest?e.closest(t):Oo(e,t)}function No(e,t){const r=t.target;if(!((n=r)instanceof $n(n).Element))return null;var n;const o=function(e){return`[${Rn.contextId}="${e}"]`}(e),i=Po(r,o);return i&&Un(i)?i:null}function Ro(e){e.preventDefault()}function Bo({expected:e,phase:t,isLockActive:r,shouldWarn:n}){return!!r()&&e===t}function To({lockAPI:e,store:t,registry:r,draggableId:n}){if(e.isClaimed())return!1;const o=r.draggable.findById(n);return!!o&&(!!o.options.isEnabled&&!!un(t.getState(),n))}function Lo({lockAPI:e,contextId:t,store:r,registry:n,draggableId:o,forceSensorStop:s,sourceEvent:l}){if(!To({lockAPI:e,store:r,registry:n,draggableId:o}))return null;const c=n.draggable.getById(o),u=function(e,t){const r=`[${Bn.contextId}="${e}"]`,n=Wn(document,r).find((e=>e.getAttribute(Bn.id)===t));return n&&Un(n)?n:null}(t,c.descriptor.id);if(!u)return null;if(l&&!c.options.canDragInteractiveElements&&So(u,l))return null;const p=e.claim(s||i);let g="PRE_DRAG";function f(){return c.options.shouldRespectForcePress}function m(){return e.isActive(p)}const b=function(e,t){Bo({expected:e,phase:g,isLockActive:m,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function h(t){function n(){e.release(),g="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=a(window,[{eventName:"click",fn:Ro,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}n(),r.dispatch(Pr({reason:e}))}return"PRE_DRAG"!==g&&(n(),d()),r.dispatch(br(t.liftActionArgs)),g="DRAGGING",{isActive:()=>Bo({expected:"DRAGGING",phase:g,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:f,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>Bo({expected:"PRE_DRAG",phase:g,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:f,fluidLift:function(e){const t=jr((e=>{b((()=>Dr({client:e})))}));return{...h({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>b(wr),moveRight:()=>b(Sr),moveDown:()=>b(Er),moveLeft:()=>b(Cr)};return h({liftActionArgs:{id:o,clientSelection:Co(u),movementMode:"SNAP"},cleanup:i,actions:e})},abort:function(){Bo({expected:"PRE_DRAG",phase:g,isLockActive:m,shouldWarn:!0})&&e.release()}}}const Mo=[mo,yo,Do];function Go({contextId:e,store:r,registry:n,customSensors:o,enableDefaultSensors:i}){const a=[...i?Mo:[],...o||[]],s=t.useState((()=>function(){let e=null;function t(){e||d(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&d();const r={abandon:t};return e=r,r},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()))[0],l=Oe((function(e,t){eo(e)&&!eo(t)&&s.tryAbandon()}),[s]);_n((function(){let e=r.getState();return r.subscribe((()=>{const t=r.getState();l(e,t),e=t}))}),[s,r,l]),_n((()=>s.tryAbandon),[s.tryAbandon]);const c=Oe((e=>To({lockAPI:s,registry:n,store:r,draggableId:e})),[s,n,r]),u=Oe(((t,o,i)=>Lo({lockAPI:s,registry:n,contextId:e,store:r,draggableId:t,forceSensorStop:o||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null})),[e,s,n,r]),p=Oe((t=>function(e,t){const r=No(e,t);return r?r.getAttribute(Rn.draggableId):null}(e,t)),[e]),g=Oe((e=>{const t=n.draggable.findById(e);return t?t.options:null}),[n.draggable]),f=Oe((function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==r.getState().phase&&r.dispatch(Ar()))}),[s,r]),m=Oe((()=>s.isClaimed()),[s]),b=Ae((()=>({canGetLock:c,tryGetLock:u,findClosestDraggableId:p,findOptionsForDraggable:g,tryReleaseLock:f,isLockClaimed:m})),[c,u,p,g,f,m]);for(let e=0;e<a.length;e++)a[e](b)}const _o=e=>({onBeforeCapture:t=>{r.flushSync((()=>{e.onBeforeCapture&&e.onBeforeCapture(t)}))},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),Fo=e=>({...mn,...e.autoScrollerOptions,durationDampening:{...mn.durationDampening,...e.autoScrollerOptions}});function ko(e){return e.current||d(),e.current}function Wo(e){const{contextId:r,setCallbacks:n,sensors:o,nonce:i,dragHandleUsageInstructions:a}=e,s=t.useRef(null),l=Zn(e),c=Oe((()=>_o(l.current)),[l]),u=Oe((()=>Fo(l.current)),[l]),p=function(e){const r=Ae((()=>Jn(e)),[e]),n=t.useRef(null);return t.useEffect((function(){const e=document.createElement("div");return n.current=e,e.id=r,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),qn(e.style,Yn),zn().appendChild(e),function(){setTimeout((function(){const t=zn();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[r]),Oe((e=>{const t=n.current;t&&(t.textContent=e)}),[])}(r),g=function({contextId:e,text:r}){const n=Kn("hidden-text",{separator:"-"}),o=Ae((()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:n})),[n,e]);return t.useEffect((function(){const e=document.createElement("div");return e.id=o,e.textContent=r,e.style.display="none",zn().appendChild(e),function(){const t=zn();t.contains(e)&&t.removeChild(e)}}),[o,r]),o}({contextId:r,text:a}),f=function(e,r){const n=Ae((()=>Gn(e)),[e]),o=t.useRef(null),i=t.useRef(null),a=Oe(tt((e=>{const t=i.current;t||d(),t.textContent=e})),[]),s=Oe((e=>{const t=o.current;t||d(),t.textContent=e}),[]);_n((()=>{(o.current||i.current)&&d();const t=kn(r),l=kn(r);return o.current=t,i.current=l,t.setAttribute(`${Nn}-always`,e),l.setAttribute(`${Nn}-dynamic`,e),Fn().appendChild(t),Fn().appendChild(l),s(n.always),a(n.resting),()=>{const e=e=>{const t=e.current;t||d(),Fn().removeChild(t),e.current=null};e(o),e(i)}}),[r,s,a,n.always,n.resting,e]);const l=Oe((()=>a(n.dragging)),[a,n.dragging]),c=Oe((e=>{a("DROP"!==e?n.userCancel:n.dropAnimating)}),[a,n.dropAnimating,n.userCancel]),u=Oe((()=>{i.current&&a(n.resting)}),[a,n.resting]);return Ae((()=>({dragging:l,dropping:c,resting:u})),[l,c,u])}(r,i),m=Oe((e=>{ko(s).dispatch(e)}),[]),b=Ae((()=>w({publishWhileDragging:hr,updateDroppableScroll:yr,updateDroppableIsEnabled:xr,updateDroppableIsCombineEnabled:Ir,collectionStarting:vr},m)),[m]),h=function(){const e=Ae(Hn,[]);return t.useEffect((()=>function(){e.clean()}),[e]),e}(),v=Ae((()=>dn(h,b)),[h,b]),y=Ae((()=>Pn({scrollWindow:pn,scrollDroppable:v.scrollDroppable,getAutoScrollerOptions:u,...w({move:Dr},m)})),[v.scrollDroppable,m,u]),x=jn(r),I=Ae((()=>nn({announce:p,autoScroller:y,dimensionMarshal:v,focusMarshal:x,getResponders:c,styleMarshal:f})),[p,y,v,x,c,f]);s.current=I;const D=Oe((()=>{const e=ko(s);"IDLE"!==e.getState().phase&&e.dispatch(Ar())}),[]),E=Oe((()=>{const e=ko(s).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging}),[]);n(Ae((()=>({isDragging:E,tryAbort:D})),[E,D]));const S=Oe((e=>un(ko(s).getState(),e)),[]),C=Oe((()=>Xt(ko(s).getState())),[]),A=Ae((()=>({marshal:v,focus:x,contextId:r,canLift:S,isMovementAllowed:C,dragHandleUsageInstructionsId:g,registry:h})),[r,v,g,x,S,C,h]);return Go({contextId:r,store:I,registry:h,customSensors:o||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),t.useEffect((()=>D),[D]),t.createElement(Qn.Provider,{value:A},t.createElement(Se,{context:Vn,store:I},e.children))}const $o={dragging:5e3,dropAnimating:4500},Uo=(e,t)=>t?Gr.drop(t.duration):e?Gr.snap:Gr.fluid,jo=(e,t)=>{if(e)return t?Br.drop:Br.combining},Ho=e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode;function Vo(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:r,combineWith:n,dropping:o}=e,i=Boolean(n),a=Ho(e),s=Boolean(o),l=s?Fr.drop(r,i):Fr.moveTo(r);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Uo(a,o),transform:l,opacity:jo(i,s),zIndex:s?$o.dropAnimating:$o.dragging,pointerEvents:"none"}}(e):(t=e,{transform:Fr.moveTo(t.offset),transition:t.shouldAnimateDisplacement?void 0:"none"});var t}function qo(e){const r=Kn("draggable"),{descriptor:n,registry:o,getDraggableRef:i,canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l}=e,c=Ae((()=>({canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l})),[a,l,s]),u=Oe((e=>{const t=i();return t||d(),function(e,t,r=Pe){const n=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=qe(o,n),a=Ve(i,r);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:n.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(n,t,e)}),[n,i]),p=Ae((()=>({uniqueId:r,descriptor:n,options:c,getDimension:u})),[n,u,c,r]),g=t.useRef(p),f=t.useRef(!0);_n((()=>(o.draggable.register(g.current),()=>o.draggable.unregister(g.current))),[o.draggable]),_n((()=>{if(f.current)return void(f.current=!1);const e=g.current;g.current=p,o.draggable.update(p,e)}),[p,o.draggable])}var zo=t.createContext(null);function Yo(e){const r=t.useContext(e);return r||d(),r}function Jo(e){e.preventDefault()}var Xo=(e,t)=>e===t,Ko=e=>{const{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};function Qo(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Zo={mapped:{type:"SECONDARY",offset:Pe,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Qo(null)}};const ei=we((()=>{const e=function(){const e=tt(((e,t)=>({x:e,y:t}))),t=tt(((e,t,r=null,n=null,o=null)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:r,combineWith:n,combineTargetFor:null}))),r=tt(((e,r,n,o,i=null,a=null,s=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:r,offset:e,dimension:n,forceShouldAnimate:s,snapshot:t(r,o,i,a,null)}})));return(n,o)=>{if(eo(n)){if(n.critical.draggable.id!==o.draggableId)return null;const t=n.current.client.offset,a=n.dimensions.draggables[o.draggableId],s=Yt(n.impact),l=(i=n.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,c=n.forceShouldAnimate;return r(e(t.x,t.y),n.movementMode,a,o.isClone,s,l,c)}var i;if("DROP_ANIMATING"===n.phase){const e=n.completed;if(e.result.draggableId!==o.draggableId)return null;const r=o.isClone,i=n.dimensions.draggables[o.draggableId],a=e.result,s=a.mode,l=Ko(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:n.dropDuration,curve:Rr,moveTo:n.newHomeClientOffset,opacity:c?Br.drop:null,scale:c?Tr.drop:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:i,dropping:d,draggingOver:l,combineWith:c,mode:s,forceShouldAnimate:null,snapshot:t(s,r,l,c,d)}}}return null}}(),t=function(){const e=tt(((e,t)=>({x:e,y:t}))),t=tt(Qo),r=tt(((e,r=null,n)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:r,shouldAnimateDisplacement:n,snapshot:t(r)}}))),n=e=>e?r(Pe,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=lt(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return n(d);if(i.displaced.invisible[t])return null;const o=Te(a.displacedBy.point),s=e(o.x,o.y);return r(s,d,!0)}if(l)return n(d);const u=i.displacedBy.point,p=e(u.x,u.y);return r(p,d,s.shouldAnimate)};return(e,t)=>{if(eo(e))return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){const r=e.completed;return r.result.draggableId===t.draggableId?null:o(t.draggableId,r.result.draggableId,r.impact,r.afterCritical)}return null}}();return(r,n)=>e(r,n)||t(r,n)||Zo}),{dropAnimationFinished:Nr},null,{context:Vn,areStatePropsEqual:Xo})((e=>{const n=t.useRef(null),o=Oe(((e=null)=>{n.current=e}),[]),i=Oe((()=>n.current),[]),{contextId:a,dragHandleUsageInstructionsId:s,registry:l}=Yo(Qn),{type:c,droppableId:d}=Yo(zo),u=Ae((()=>({id:e.draggableId,index:e.index,type:c,droppableId:d})),[e.draggableId,e.index,c,d]),{children:p,draggableId:g,isEnabled:f,shouldRespectForcePress:m,canDragInteractiveElements:b,isClone:h,mapped:v,dropAnimationFinished:y}=e;if(!h){qo(Ae((()=>({descriptor:u,registry:l,getDraggableRef:i,canDragInteractiveElements:b,shouldRespectForcePress:m,isEnabled:f})),[u,l,i,b,m,f]))}const x=Ae((()=>f?{tabIndex:0,role:"button","aria-describedby":s,"data-rfd-drag-handle-draggable-id":g,"data-rfd-drag-handle-context-id":a,draggable:!1,onDragStart:Jo}:null),[a,s,g,f]),I=Oe((e=>{"DRAGGING"===v.type&&v.dropping&&"transform"===e.propertyName&&r.flushSync(y)}),[y,v]),D=Ae((()=>{const e=Vo(v),t="DRAGGING"===v.type&&v.dropping?I:void 0;return{innerRef:o,draggableProps:{"data-rfd-draggable-context-id":a,"data-rfd-draggable-id":g,style:e,onTransitionEnd:t},dragHandleProps:x}}),[a,x,g,v,I,o]),w=Ae((()=>({draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}})),[u.droppableId,u.id,u.index,u.type]);return t.createElement(t.Fragment,null,p(D,v.snapshot,w))}));function ti(e){return Yo(zo).isUsingCloneFor!==e.draggableId||e.isClone?t.createElement(ei,e):null}const ri=e=>t=>e===t,ni=ri("scroll"),oi=ri("auto"),ii=(e,t)=>t(e.overflowX)||t(e.overflowY),ai=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),r={overflowX:t.overflowX,overflowY:t.overflowY};return ii(r,ni)||ii(r,oi)})(e)?e:ai(e.parentElement);var si=e=>({x:e.scrollLeft,y:e.scrollTop});const li=e=>{if(!e)return!1;return"fixed"===window.getComputedStyle(e).position||li(e.parentElement)};var ci=({ref:e,descriptor:t,env:r,windowScroll:n,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=r.closestScrollable,c=((e,t)=>{const r=ze(e);if(!t)return r;if(e!==t)return r;const n=r.paddingBox.top-t.scrollTop,o=r.paddingBox.left-t.scrollLeft,i=n+t.scrollHeight,a=o+t.scrollWidth,s=ke({top:n,right:a,bottom:i,left:o},r.border);return Ue({borderBox:s,margin:r.margin,border:r.border,padding:r.padding})})(e,l),d=Ve(c,n),u=(()=>{if(!l)return null;const e=ze(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:Ve(e,n),scroll:si(l),scrollSize:t,shouldClipSubject:s}})(),p=(({descriptor:e,isEnabled:t,isCombineEnabled:r,isFixedOnPage:n,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:e,client:t}=s,r=on({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:r,diff:{value:Pe,displacement:Pe}}}})(),c="vertical"===o?ht:vt;return{descriptor:e,isCombineEnabled:r,isFixedOnPage:n,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:Ke({page:a,withPlaceholder:null,axis:c,frame:l})}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:o,client:c,page:d,closest:u});return p};const di={passive:!1},ui={passive:!0};var pi=e=>e.shouldPublishImmediately?di:ui;const gi=e=>e&&e.env.closestScrollable||null;function fi(e){const r=t.useRef(null),n=Yo(Qn),o=Kn("droppable"),{registry:i,marshal:a}=n,s=Zn(e),l=Ae((()=>({id:e.droppableId,type:e.type,mode:e.mode})),[e.droppableId,e.mode,e.type]),c=t.useRef(l),u=Ae((()=>tt(((e,t)=>{r.current||d();const n={x:e,y:t};a.updateDroppableScroll(l.id,n)}))),[l.id,a]),p=Oe((()=>{const e=r.current;return e&&e.env.closestScrollable?si(e.env.closestScrollable):Pe}),[]),g=Oe((()=>{const e=p();u(e.x,e.y)}),[p,u]),f=Ae((()=>jr(g)),[g]),m=Oe((()=>{const e=r.current,t=gi(e);e&&t||d();e.scrollOptions.shouldPublishImmediately?g():f()}),[f,g]),b=Oe(((e,t)=>{r.current&&d();const o=s.current,i=o.getDroppableRef();i||d();const a={closestScrollable:ai(c=i),isFixedOnPage:li(c)};var c;const u={ref:i,descriptor:l,env:a,scrollOptions:t};r.current=u;const p=ci({ref:i,descriptor:l,env:a,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),g=a.closestScrollable;return g&&(g.setAttribute(Ln.contextId,n.contextId),g.addEventListener("scroll",m,pi(u.scrollOptions))),p}),[n.contextId,l,m,s]),h=Oe((()=>{const e=r.current,t=gi(e);return e&&t||d(),si(t)}),[]),v=Oe((()=>{const e=r.current;e||d();const t=gi(e);r.current=null,t&&(f.cancel(),t.removeAttribute(Ln.contextId),t.removeEventListener("scroll",m,pi(e.scrollOptions)))}),[m,f]),y=Oe((e=>{const t=r.current;t||d();const n=gi(t);n||d(),n.scrollTop+=e.y,n.scrollLeft+=e.x}),[]),x=Ae((()=>({getDimensionAndWatchScroll:b,getScrollWhileDragging:h,dragStopped:v,scroll:y})),[v,b,h,y]),I=Ae((()=>({uniqueId:o,descriptor:l,callbacks:x})),[x,l,o]);_n((()=>(c.current=I.descriptor,i.droppable.register(I),()=>{r.current&&v(),i.droppable.unregister(I)})),[x,l,v,I,a,i.droppable]),_n((()=>{r.current&&a.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)}),[e.isDropDisabled,a]),_n((()=>{r.current&&a.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,a])}function mi(){}const bi={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},hi=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>{const n=(({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>e||"close"===r?bi:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:r});return{display:t.display,boxSizing:"border-box",width:n.width,height:n.height,marginTop:n.margin.top,marginRight:n.margin.right,marginBottom:n.margin.bottom,marginLeft:n.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?Gr.placeholder:null}};var vi=t.memo((e=>{const r=t.useRef(null),n=Oe((()=>{r.current&&(clearTimeout(r.current),r.current=null)}),[]),{animate:o,onTransitionEnd:i,onClose:a,contextId:s}=e,[l,c]=t.useState("open"===e.animate);t.useEffect((()=>l?"open"!==o?(n(),c(!1),mi):r.current?mi:(r.current=setTimeout((()=>{r.current=null,c(!1)})),n):mi),[o,l,n]);const d=Oe((e=>{"height"===e.propertyName&&(i(),"close"===o&&a())}),[o,a,i]),u=hi({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return t.createElement(e.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":s,onTransitionEnd:d,ref:e.innerRef})}));class yi extends t.PureComponent{constructor(...e){super(...e),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}const xi={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||d(),document.body}},Ii=e=>{let t,r={...e};for(t in xi)void 0===e[t]&&(r={...r,[t]:xi[t]});return r},Di=(e,t)=>e===t.droppable.type,wi=(e,t)=>t.draggables[e.draggable.id],Ei=we((()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=tt((e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}))),n=tt(((n,o,i,a,s,l)=>{const c=s.descriptor.id;if(s.descriptor.droppableId===n){const e=l?{render:l,dragging:r(s.descriptor)}:null,t={isDraggingOver:i,draggingOverWith:i?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:t,useClone:e}}if(!o)return t;if(!a)return e;const d={isDraggingOver:i,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:d,useClone:null}}));return(r,o)=>{const i=Ii(o),a=i.droppableId,s=i.type,l=!i.isDropDisabled,c=i.renderClone;if(eo(r)){const e=r.critical;if(!Di(s,e))return t;const o=wi(e,r.dimensions),i=Yt(r.impact)===a;return n(a,l,i,i,o,c)}if("DROP_ANIMATING"===r.phase){const e=r.completed;if(!Di(s,e.critical))return t;const o=wi(e.critical,r.dimensions);return n(a,l,Ko(e.result)===a,Yt(e.impact)===a,o,c)}if("IDLE"===r.phase&&r.completed&&!r.shouldFlush){const n=r.completed;if(!Di(s,n.critical))return t;const o=Yt(n.impact)===a,i=Boolean(n.impact.at&&"COMBINE"===n.impact.at.type),l=n.critical.droppable.id===a;return o?i?e:t:l?e:t}return t}}),{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},((e,t,r)=>({...Ii(r),...e,...t})),{context:Vn,areStatePropsEqual:Xo})((e=>{const n=t.useContext(Qn);n||d();const{contextId:o,isMovementAllowed:i}=n,a=t.useRef(null),s=t.useRef(null),{children:l,droppableId:c,type:u,mode:p,direction:g,ignoreContainerClipping:f,isDropDisabled:m,isCombineEnabled:b,snapshot:h,useClone:v,updateViewportMaxScroll:y,getContainerForClone:x}=e,I=Oe((()=>a.current),[]),D=Oe(((e=null)=>{a.current=e}),[]);Oe((()=>s.current),[]);const w=Oe(((e=null)=>{s.current=e}),[]),E=Oe((()=>{i()&&y({maxScroll:sn()})}),[i,y]);fi({droppableId:c,type:u,mode:p,direction:g,isDropDisabled:m,isCombineEnabled:b,ignoreContainerClipping:f,getDroppableRef:I});const S=Ae((()=>t.createElement(yi,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(({onClose:e,data:r,animate:n})=>t.createElement(vi,{placeholder:r,onClose:e,innerRef:w,animate:n,contextId:o,onTransitionEnd:E})))),[o,E,e.placeholder,e.shouldAnimatePlaceholder,w]),C=Ae((()=>({innerRef:D,placeholder:S,droppableProps:{"data-rfd-droppable-id":c,"data-rfd-droppable-context-id":o}})),[o,c,S,D]),A=v?v.dragging.draggableId:null,O=Ae((()=>({droppableId:c,type:u,isUsingCloneFor:A})),[c,A,u]);return t.createElement(zo.Provider,{value:O},l(C,h),function(){if(!v)return null;const{dragging:e,render:n}=v,o=t.createElement(ti,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},((t,r)=>n(t,r,e)));return r.createPortal(o,x())}())}));var Si=Ei;e.DragDropContext=function(e){const r=t.useId(),n=e.dragHandleUsageInstructions||b.dragHandleUsageInstructions;return t.createElement(u,null,(o=>t.createElement(Wo,{nonce:e.nonce,contextId:r,setCallbacks:o,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children)))},e.Draggable=function(e){const r="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),o=Boolean(e.shouldRespectForcePress);return t.createElement(ti,qn({},e,{isClone:!1,isEnabled:r,canDragInteractiveElements:n,shouldRespectForcePress:o}))},e.Droppable=Si,e.useKeyboardSensor=yo,e.useMouseSensor=mo,e.useTouchSensor=Do}));
|