@sassoftware/va-report-components
Version:
The SAS Visual Analytics SDK is a set of JavaScript APIs and web components that enable SAS Visual Analytics report content to be easily embedded in a third-party application or web page.
2 lines • 103 kB
JavaScript
/*! License information is available at ../../LICENSE.txt and ../../LICENSE-3RD-PARTY.txt */"use strict";(globalThis["va-report-componentsJsonp"]=globalThis["va-report-componentsJsonp"]||[]).push([[38],{762:(e,t,n)=>{n.r(t),n.d(t,{DragDropContext:()=>Go,Draggable:()=>ti,Droppable:()=>Ai,resetServerContext:()=>Mo,useKeyboardSensor:()=>Ri,useMouseSensor:()=>ao,useTouchSensor:()=>po});var r=n(2),o=n(16);const i=e=>e+1,a=(e,t)=>{const n=e.droppableId===t.droppableId,r=i(e.index),o=i(t.index);return n?`\n You have moved the item from position ${r}\n to position ${o}\n `:`\n You have moved the item from position ${r}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${o}\n `},s=(e,t,n)=>t.droppableId===n.droppableId?`\n The item ${e}\n has been combined with ${n.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${n.draggableId}\n in list ${n.droppableId}\n `,l=e=>`\n The item has returned to its starting position\n of ${i(e.index)}\n`,c={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 ${i(e.source.index)}\n`,onDragUpdate:e=>{const t=e.destination;if(t)return a(e.source,t);const n=e.combine;return n?s(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},onDragEnd:e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${l(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${a(e.source,t)}\n `:n?`\n You have dropped the item.\n ${s(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${l(e.source)}\n `}},d=c;var p=n(554);let u=0;const g={separator:"::"};function f(e,t=g){return(0,p.Ye)((()=>`${e}${t.separator}${u++}`),[t.separator,e])}var m=n(557),b=n(686),h=n(5);let y=function(e){e()};const v=()=>y,I=r.createContext(null);let D=null;var x=n(146),w=n(454),C=n(688),E=n.n(C),S=n(763);const A=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function P(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,p,u=!1;function g(u,g){const f=!i(g,l),m=!o(u,s);return s=u,l=g,f&&m?(c=e(s,l),t.dependsOnOwnProps&&(d=t(r,l)),p=n(c,d,l),p):f?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(d=t(r,l)),p=n(c,d,l),p):m?function(){const t=e(s,l),r=!a(t,c);return c=t,r&&(p=n(c,d,l)),p}():p}return function(o,i){return u?g(o,i):(s=o,l=i,c=e(s,l),d=t(r,l),p=n(c,d,l),u=!0,p)}}function B(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function N(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function R(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=N(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=N(o),o=r(t,n)),o},r}}function O(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function T(e,t,n){return(0,x.Z)({},n,e,t)}const L={notify(){},get:()=>[]};function M(e,t){let n,r=L;function o(){a.onStateChange&&a.onStateChange()}function i(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){const e=v();let t=null,n=null;return{clear(){t=null,n=null},notify(){e((()=>{let e=t;for(;e;)e.callback(),e=e.next}))},get(){let e=[],n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(e){let r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}const a={addNestedSub:function(e){return i(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(n)},trySubscribe:i,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=L)},getListeners:()=>r};return a}const G=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?r.useLayoutEffect:r.useEffect;function _(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function $(e,t){if(_(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!_(e[n[r]],t[n[r]]))return!1;return!0}const F=["reactReduxForwardedRef"];let U=()=>{throw new Error("uSES not initialized!")};const k=[null,null];function W(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function j(e,t){return e===t}const H=function(e,t,n,{pure:o,areStatesEqual:i=j,areOwnPropsEqual:a=$,areStatePropsEqual:s=$,areMergedPropsEqual:l=$,forwardRef:c=!1,context:d=I}={}){const p=d,u=function(e){return e?"function"==typeof e?R(e):O(e,"mapStateToProps"):B((()=>({})))}(e),g=function(e){return e&&"object"==typeof e?B((t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t))):e?"function"==typeof e?R(e):O(e,"mapDispatchToProps"):B((e=>({dispatch:e})))}(t),f=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,n,a){const s=e(t,n,a);return i?r(s,o)||(o=s):(i=!0,o=s),o}}}(e):O(e,"mergeProps"):()=>T}(n),m=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,o={shouldHandleStateChanges:m,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:u,initMapDispatchToProps:g,initMergeProps:f,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:a,areMergedPropsEqual:l};function d(t){const[n,i,a]=(0,r.useMemo)((()=>{const{reactReduxForwardedRef:e}=t,n=(0,w.Z)(t,F);return[t.context,e,n]}),[t]),s=(0,r.useMemo)((()=>n&&n.Consumer&&(0,S.isContextConsumer)(r.createElement(n.Consumer,null))?n:p),[n,p]),l=(0,r.useContext)(s),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),d=Boolean(l)&&Boolean(l.store);const u=c?t.store:l.store,g=d?l.getServerState:u.getState,f=(0,r.useMemo)((()=>function(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=(0,w.Z)(t,A);return P(n(e,i),r(e,i),o(e,i),e,i)}(u.dispatch,o)),[u]),[b,h]=(0,r.useMemo)((()=>{if(!m)return k;const e=M(u,c?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[u,c,l]),y=(0,r.useMemo)((()=>c?l:(0,x.Z)({},l,{subscription:b})),[c,l,b]),v=(0,r.useRef)(),I=(0,r.useRef)(a),D=(0,r.useRef)(),C=(0,r.useRef)(!1),E=((0,r.useRef)(!1),(0,r.useRef)(!1)),B=(0,r.useRef)();G((()=>(E.current=!0,()=>{E.current=!1})),[]);const N=(0,r.useMemo)((()=>()=>D.current&&a===I.current?D.current:f(u.getState(),a)),[u,a]),R=(0,r.useMemo)((()=>e=>b?function(e,t,n,r,o,i,a,s,l,c,d){if(!e)return()=>{};let p=!1,u=null;const g=()=>{if(p||!s.current)return;const e=t.getState();let n,g;try{n=r(e,o.current)}catch(e){g=e,u=e}g||(u=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,d())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u}}(m,u,b,f,I,v,C,E,D,h,e):()=>{}),[b]);var O,T,L;let _;O=W,T=[I,v,C,a,D,h],G((()=>O(...T)),L);try{_=U(R,N,g?()=>f(g(),a):N)}catch(e){throw B.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${B.current.stack}\n\n`),e}G((()=>{B.current=void 0,D.current=void 0,v.current=_}));const $=(0,r.useMemo)((()=>r.createElement(e,(0,x.Z)({},_,{ref:i}))),[i,e,_]);return(0,r.useMemo)((()=>m?r.createElement(s.Provider,{value:y},$):$),[s,$,y])}const b=r.memo(d);if(b.WrappedComponent=e,b.displayName=d.displayName=n,c){const t=r.forwardRef((function(e,t){return r.createElement(b,(0,x.Z)({},e,{reactReduxForwardedRef:t}))}));return t.displayName=n,t.WrappedComponent=e,E()(t,e)}return E()(b,e)}};const Y=function({store:e,context:t,children:n,serverState:o}){const i=(0,r.useMemo)((()=>{const t=M(e);return{store:e,subscription:t,getServerState:o?()=>o:void 0}}),[e,o]),a=(0,r.useMemo)((()=>e.getState()),[e]);G((()=>{const{subscription:t}=i;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),a!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}}),[i,a]);const s=t||I;return r.createElement(s.Provider,{value:i},n)};var q,V;q=b.useSyncExternalStoreWithSelector,D=q,(e=>{U=e})(m.useSyncExternalStore),V=h.unstable_batchedUpdates,y=V;var z=n(697);function Z(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 J="function"==typeof Symbol&&Symbol.observable||"@@observable",X=function(){return Math.random().toString(36).substring(7).split("").join(".")},K={INIT:"@@redux/INIT"+X(),REPLACE:"@@redux/REPLACE"+X(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+X()}};function Q(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ee(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Z(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Z(1));return n(ee)(e,t)}if("function"!=typeof e)throw new Error(Z(2));var o=e,i=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function d(){if(l)throw new Error(Z(3));return i}function p(e){if("function"!=typeof e)throw new Error(Z(4));if(l)throw new Error(Z(5));var t=!0;return c(),s.push(e),function(){if(t){if(l)throw new Error(Z(6));t=!1,c();var n=s.indexOf(e);s.splice(n,1),a=null}}}function u(e){if(!Q(e))throw new Error(Z(7));if(void 0===e.type)throw new Error(Z(8));if(l)throw new Error(Z(9));try{l=!0,i=o(i,e)}finally{l=!1}for(var t=a=s,n=0;n<t.length;n++){(0,t[n])()}return e}return u({type:K.INIT}),(r={dispatch:u,subscribe:p,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Z(10));o=e,u({type:K.REPLACE})}})[J]=function(){var e,t=p;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(Z(11));function n(){e.next&&e.next(d())}return n(),{unsubscribe:t(n)}}})[J]=function(){return this},e},r}function te(e,t){return function(){return t(e.apply(this,arguments))}}function ne(e,t){if("function"==typeof e)return te(e,t);if("object"!=typeof e||null===e)throw new Error(Z(16));var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=te(o,t))}return n}function re(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function oe(e,t){}const ie=oe.bind(null,"warn"),ae=(oe.bind(null,"error"),!0),se="Invariant failed";class le{constructor(e){this.message=e}}function ce(e,t){if(!e)throw new le(ae?se:`${se}: ${t||""}`)}le.prototype.toString=function(){return this.message};const de=e=>({type:"LIFT",payload:e}),pe=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),ue=()=>({type:"COLLECTION_STARTING",payload:null}),ge=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),fe=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),me=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),be=e=>({type:"MOVE",payload:e}),he=()=>({type:"MOVE_UP",payload:null}),ye=()=>({type:"MOVE_DOWN",payload:null}),ve=()=>({type:"MOVE_RIGHT",payload:null}),Ie=()=>({type:"MOVE_LEFT",payload:null}),De=()=>({type:"FLUSH",payload:null}),xe=e=>({type:"DROP_COMPLETE",payload:e}),we=e=>({type:"DROP",payload:e}),Ce=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});const Ee=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};const Se=e=>{0},Ae=e=>{0},Pe=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};var Be=n(638);function Ne(e){return Object.values?Object.values(e):Object.keys(e).map((t=>e[t]))}function Re(e,t){if(e.findIndex)return e.findIndex(t);for(let n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function Oe(e,t){if(e.find)return e.find(t);const n=Re(e,t);return-1!==n?e[n]:void 0}function Te(e){return Array.prototype.slice.call(e)}const Le=(0,Be.Z)((e=>e.reduce(((e,t)=>(e[t.descriptor.id]=t,e)),{}))),Me=(0,Be.Z)((e=>e.reduce(((e,t)=>(e[t.descriptor.id]=t,e)),{}))),Ge=(0,Be.Z)((e=>Ne(e))),_e=(0,Be.Z)((e=>Ne(e))),$e=(e,t)=>n=>e<=n&&n<=t;function Fe(e){const t=$e(e.top,e.bottom),n=$e(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}const Ue=(0,Be.Z)((e=>Ge(e).filter((e=>!!e.isEnabled&&!!e.frame)))),ke=({center:e,destination:t,droppables:n})=>{if(t){const e=n[t];return e.frame?e:null}const r=((e,t)=>Oe(Ue(t),(t=>(ce(t.frame,"Invalid result"),Fe(t.frame.pageMarginBox)(e)))))(e,n);return r},We={x:0,y:0},je=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),He=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Ye=(e,t)=>e.x===t.x&&e.y===t.y,qe=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),Ve=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},ze=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),Ze=(e,t)=>Math.min(...t.map((t=>ze(e,t)))),Je=e=>t=>({x:e(t.x),y:e(t.y)}),Xe=Je((e=>0===e?0:e>0?1:-1)),Ke=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{const o=je(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return Ye(i,We)?null:i}})(),Qe=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=Xe(n),i=Ke({max:r,current:t,change:o});return!i||(0!==o.x&&0===i.x||0!==o.y&&0===i.y)},et=(e,t)=>Qe({current:e.scroll.current,max:e.scroll.max,change:t}),tt=(e,t)=>{const n=e.frame;return!!n&&Qe({current:n.scroll.current,max:n.scroll.max,change:t})},nt={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},rt={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},ot={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>Math.pow(e,2),durationDampening:{stopDampeningAt:1200,accelerateAt:360}},it=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;if(0===r)return ie("\n Detected distance range of 0 in the fluid auto scroller\n This is unexpected and would cause a divide by 0 issue.\n Not allowing an auto scroll\n "),0;return(n-e)/r},at=ot.durationDampening.accelerateAt,st=ot.durationDampening.stopDampeningAt,lt=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r})=>{const o=((e,t)=>{if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return ot.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const n=1-it({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=ot.maxPixelScroll*ot.ease(n);return Math.ceil(r)})(e,t);return 0===o?0:r?Math.max(((e,t)=>{const n=t,r=st,o=Date.now()-n;if(o>=st)return e;if(o<at)return 1;const i=it({startOfRange:at,endOfRange:r,current:o}),a=e*ot.ease(i);return Math.ceil(a)})(o,n),1):o},ct=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o})=>{const i=((e,t)=>({startScrollingFrom:e[t.size]*ot.startFromPercentage,maxScrollValueAt:e[t.size]*ot.maxScrollAtPercentage}))(e,r);return t[r.end]<t[r.start]?lt({distanceToEdge:t[r.end],thresholds:i,dragStartTime:n,shouldUseTimeDampening:o}):-1*lt({distanceToEdge:t[r.start],thresholds:i,dragStartTime:n,shouldUseTimeDampening:o})},dt=Je((e=>0===e?0:e)),pt=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o})=>{const i={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},a=ct({container:t,distanceToEdges:i,dragStartTime:e,axis:nt,shouldUseTimeDampening:o}),s=ct({container:t,distanceToEdges:i,dragStartTime:e,axis:rt,shouldUseTimeDampening:o}),l=dt({x:s,y:a});if(Ye(l,We))return null;const c=(({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,o=t.width>e.width;return o||r?o&&r?null:{x:o?0:n.x,y:r?0:n.y}:n})({container:t,subject:n,proposedScroll:l});return c?Ye(c,We)?null:c:null},ut=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o})=>{const i=e.current.page.borderBoxCenter,a=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const o=(({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o})=>{const i=pt({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o});return i&&et(e,i)?i:null})({dragStartTime:t,viewport:e.viewport,subject:a,center:i,shouldUseTimeDampening:n});if(o)return void r(o)}const s=ke({center:i,destination:Pe(e.impact),droppables:e.dimensions.droppables});if(!s)return;const l=(({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o})=>{const i=e.frame;if(!i)return null;const a=pt({dragStartTime:r,container:i.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o});return a&&tt(e,a)?a:null})({dragStartTime:t,droppable:s,subject:a,center:i,shouldUseTimeDampening:n});l&&o(s.descriptor.id,l)},gt=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(e,n)=>{if(!tt(e,n))return n;const r=((e,t)=>{const n=e.frame;return n&&tt(e,t)?Ke({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!r)return t(e.descriptor.id,n),null;const o=He(n,r);t(e.descriptor.id,o);return He(n,o)},o=(e,t,r)=>{if(!e)return r;if(!et(t,r))return r;const o=((e,t)=>{if(!et(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return Ke({current:r,max:n,change:t})})(t,r);if(!o)return n(r),null;const i=He(r,o);n(i);return He(r,i)};return t=>{const n=t.scrollJumpRequest;if(!n)return;const i=Pe(t.impact);ce(i,"Cannot perform a jump scroll when there is no destination");const a=r(t.dimensions.droppables[i],n);if(!a)return;const s=t.viewport,l=o(t.isWindowScrollAllowed,s,a);l&&((t,n)=>{const r=je(t.current.client.selection,n);e({client:r})})(t,l)}},ft=({scrollDroppable:e,scrollWindow:t,move:n})=>{const r=(({scrollWindow:e,scrollDroppable:t})=>{const n=Ee(e),r=Ee(t);let o=null;const i=e=>{ce(o,"Cannot fluid scroll if not dragging");const{shouldUseTimeDampening:t,dragStartTime:i}=o;ut({state:e,scrollWindow:n,scrollDroppable:r,dragStartTime:i,shouldUseTimeDampening:t})};return{start:e=>{Se(),ce(!o,"Cannot start auto scrolling when already started");const t=Date.now();let n=!1;const r=()=>{n=!0};ut({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),o={dragStartTime:t,shouldUseTimeDampening:n},Ae(),n&&i(e)},stop:()=>{o&&(n.cancel(),r.cancel(),o=null)},scroll:i}})({scrollWindow:t,scrollDroppable:e}),o=gt({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&o(e):r.scroll(e))},start:r.start,stop:r.stop}},mt=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason),bt=e=>t=>n=>{if("DROP_ANIMATION_FINISHED"!==n.type)return void t(n);const r=e.getState();ce("DROP_ANIMATING"===r.phase,"Cannot finish a drop animating when no drop is occurring"),e.dispatch(xe({completed:r.completed}))};function ht(e,t,n){const r=t.map((t=>{const r=function(e,t){return{...e,...t}}(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}}));return function(){r.forEach((e=>{e()}))}}const yt=e=>{let t=null,n=null;return r=>o=>{if("FLUSH"!==o.type&&"DROP_COMPLETE"!==o.type&&"DROP_ANIMATION_FINISHED"!==o.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),"DROP_ANIMATE"!==o.type)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})}};n=requestAnimationFrame((()=>{n=null,t=ht(window,[i])}))}};function vt(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function It(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}const Dt="cubic-bezier(.2,1,.1,1)",xt={drop:0,combining:.7},wt={drop:.75},Ct={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Et=`${Ct.outOfTheWay}s ${"cubic-bezier(0.2, 0, 0, 1)"}`,St={fluid:`opacity ${Et}`,snap:`transform ${Et}, opacity ${Et}`,drop:e=>{const t=`${e}s ${Dt}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Et}`,placeholder:`height ${Et}, width ${Et}, margin ${Et}`},At=e=>Ye(e,We)?void 0:`translate(${e.x}px, ${e.y}px)`,Pt={moveTo:At,drop:(e,t)=>{const n=At(e);if(n)return t?`${n} scale(${wt.drop})`:n}},{minDropTime:Bt,maxDropTime:Nt}=Ct,Rt=Nt-Bt,Ot={point:We,value:0},Tt={invisible:{},visible:{},all:[]},Lt={displaced:Tt,displacedBy:Ot,at:null};var Mt="Invariant failed";const Gt=function(e,t){if(!e)throw new Error(Mt)};var _t=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},$t=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Ft=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Ut={top:0,right:0,bottom:0,left:0},kt=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?Ut:n,o=e.border,i=void 0===o?Ut:o,a=e.padding,s=void 0===a?Ut:a,l=_t($t(t,r)),c=_t(Ft(t,i)),d=_t(Ft(c,s));return{marginBox:l,borderBox:_t(t),paddingBox:c,contentBox:d,margin:r,border:i,padding:s}},Wt=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&Gt(!1),n},jt=function(e,t){var n,r,o=e.borderBox,i=e.border,a=e.margin,s=e.padding,l=(r=t,{top:(n=o).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return kt({borderBox:l,border:i,margin:a,padding:s})},Ht=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),jt(e,t)},Yt=function(e,t){var n={top:Wt(t.marginTop),right:Wt(t.marginRight),bottom:Wt(t.marginBottom),left:Wt(t.marginLeft)},r={top:Wt(t.paddingTop),right:Wt(t.paddingRight),bottom:Wt(t.paddingBottom),left:Wt(t.paddingLeft)},o={top:Wt(t.borderTopWidth),right:Wt(t.borderRightWidth),bottom:Wt(t.borderBottomWidth),left:Wt(t.borderLeftWidth)};return kt({borderBox:e,margin:n,padding:r,border:o})},qt=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return Yt(t,n)};const Vt=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),zt=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}],Zt=e=>{const t=$e(e.top,e.bottom),n=$e(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;const a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;if(a&&s)return!0;return a&&i||s&&o}},Jt=e=>{const t=$e(e.top,e.bottom),n=$e(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)},Xt=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:We;return Vt(e,n)})(e,t):e;return((e,t,n)=>!!t.subject.active&&n(t.subject.active)(e))(i,t,o)&&((e,t,n)=>n(t)(e))(i,n,o)},Kt=e=>Xt({...e,isVisibleThroughFrameFn:Zt}),Qt=e=>Xt({...e,isVisibleThroughFrameFn:Jt}),en=(e,t,n)=>{if("boolean"==typeof n)return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return!i||i.shouldAnimate};function tn({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce((function(e,a){const s=function(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return _t($t(n,r))}(a,n),l=a.descriptor.id;e.all.push(l);if(!Kt({target:s,destination:t,viewport:r,withDroppableDisplacement:!0}))return e.invisible[a.descriptor.id]=!0,e;const c={draggableId:l,shouldAnimate:en(l,i,o)};return e.visible[l]=c,e}),{all:[],visible:{},invisible:{}})}const nn=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,a=function(e,t){return e.map((e=>t[e]))}(i.all,n),s=tn({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},rn=(e,t)=>{const n=e.frame;return n?je(t,n.scroll.diff.displacement):t};function on(e,t){return Boolean(t.effected[e])}const an=({afterCritical:e,impact:t,draggables:n})=>{const r=It(t);ce(r);const o=r.draggableId,i=n[o].page.borderBox.center,a=(({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=Boolean(e.visible[n]||e.invisible[n]);return on(n,t)?o?We:qe(r.point):o?r.point:We})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return je(i,a)},sn=(0,Be.Z)(((e,t)=>_e(t).filter((t=>e===t.descriptor.droppableId)).sort(((e,t)=>e.descriptor.index-t.descriptor.index)))),ln=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,cn=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,dn=({axis:e,moveRelativeTo:t,isMoving:n})=>Ve(e.line,t.marginBox[e.end]+ln(e,n),cn(e,t.marginBox,n)),pn=({axis:e,moveRelativeTo:t,isMoving:n})=>Ve(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),cn(e,t.marginBox,n)),un=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=sn(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>Ve(e.line,t.contentBox[e.start]+ln(e,n),cn(e,t.contentBox,n)))({axis:s,moveInto:r.page,isMoving:a});const{displaced:l,displacedBy:c}=e,d=l.all[0];if(d){const e=n[d];if(on(d,o))return pn({axis:s,moveRelativeTo:e.page,isMoving:a});const t=jt(e.page,c.point);return pn({axis:s,moveRelativeTo:t,isMoving:a})}const p=i[i.length-1];if(p.descriptor.id===t.descriptor.id)return a.borderBox.center;if(on(p.descriptor.id,o)){const e=jt(p.page,qe(o.displacedBy.point));return dn({axis:s,moveRelativeTo:e,isMoving:a})}return dn({axis:s,moveRelativeTo:p.page,isMoving:a})},gn=e=>{const t=(({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return n&&a?"REORDER"===a.type?un({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):an({impact:e,draggables:r,afterCritical:o}):i})(e),n=e.droppable;return n?rn(n,t):t},fn=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=((e,t)=>je(e.scroll.diff.displacement,t))(n,e),o=He(r,t.page.borderBox.center);return je(t.client.borderBox.center,o)},mn=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=gn({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return fn({pageBorderBoxCenter:a,draggable:t,viewport:o})},bn=({getState:e,dispatch:t})=>n=>r=>{if("DROP"!==r.type)return void n(r);const o=e(),i=r.payload.reason;if("COLLECTING"===o.phase)return void t((e=>({type:"DROP_PENDING",payload:e}))({reason:i}));if("IDLE"===o.phase)return;ce(!("DROP_PENDING"===o.phase&&o.isWaiting),"A DROP action occurred while DROP_PENDING and still waiting"),ce("DRAGGING"===o.phase||"DROP_PENDING"===o.phase,`Cannot drop in phase: ${o.phase}`);const a=o,s=a.critical,l=o.dimensions,c=l.draggables[a.critical.draggable.id],{impact:d,didDropInsideDroppable:p}=(({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>{if(!n.at||"DROP"!==t)return{impact:nn({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1};return"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:Tt},didDropInsideDroppable:!0}})({reason:i,lastImpact:a.impact,afterCritical:a.afterCritical,onLiftImpact:a.onLiftImpact,home:a.dimensions.droppables[a.critical.droppable.id],viewport:a.viewport,draggables:a.dimensions.draggables}),u=p?vt(d):null,g=p?It(d):null,f={index:s.draggable.index,droppableId:s.droppable.id},m={draggableId:c.descriptor.id,type:c.descriptor.type,source:f,reason:i,mode:a.movementMode,destination:u,combine:g},b=(({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=Pe(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=mn({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return He(d,t.client.borderBox.center)})({impact:d,draggable:c,dimensions:l,viewport:a.viewport,afterCritical:a.afterCritical}),h={critical:a.critical,afterCritical:a.afterCritical,result:m,impact:d};if(!(!Ye(a.current.client.offset,b)||Boolean(m.combine)))return void t(xe({completed:h}));const y=(({current:e,destination:t,reason:n})=>{const r=ze(e,t);if(r<=0)return Bt;if(r>=1500)return Nt;const o=Bt+Rt*(r/1500);return Number(("CANCEL"===n?.6*o:o).toFixed(2))})({current:a.current.client.offset,destination:b,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:b,dropDuration:y,completed:h}))};const hn=e=>t=>n=>{if(t(n),"PUBLISH_WHILE_DRAGGING"!==n.type)return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(we({reason:r.reason})))},yn=()=>{const e=[];return{add:t=>{const n=setTimeout((()=>(t=>{const n=Re(e,(e=>e.timerId===t));ce(-1!==n,"Could not find timer");const[r]=e.splice(n,1);r.callback()})(n))),r={timerId:n,callback:t};e.push(r)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach((e=>{clearTimeout(e.timerId),e.callback()}))}}},vn=(e,t)=>{Se(),t(),Ae()},In=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}),Dn=(e,t,n,r)=>{if(!e)return void n(r(t));const o=(e=>{let t=!1,n=!1;const r=setTimeout((()=>{n=!0})),o=o=>{t?ie("Announcement already made. Not making a second announcement"):n?ie("\n Announcements cannot be made asynchronously.\n Default message has already been announced.\n "):(t=!0,e(o),clearTimeout(r))};return o.wasCalled=()=>t,o})(n);e(t,{announce:o}),o.wasCalled()||n(r(t))},xn=(e,t)=>{const n=((e,t)=>{const n=yn();let r=null;const o=n=>{ce(r,"Cannot fire onDragEnd when there is no matching onDragStart"),r=null,vn(0,(()=>Dn(e().onDragEnd,n,t,d.onDragEnd)))};return{beforeCapture:(t,n)=>{ce(!r,"Cannot fire onBeforeCapture as a drag start has already been published"),vn(0,(()=>{const r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:(t,n)=>{ce(!r,"Cannot fire onBeforeDragStart as a drag start has already been published"),vn(0,(()=>{const r=e().onBeforeDragStart;r&&r(In(t,n))}))},start:(o,i)=>{ce(!r,"Cannot fire onBeforeDragStart as a drag start has already been published");const a=In(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add((()=>{vn(0,(()=>Dn(e().onDragStart,a,t,d.onDragStart)))}))},update:(o,i)=>{const a=vt(i),s=It(i);ce(r,"Cannot fire onDragMove when onDragStart has not been called");const l=!((e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r})(o,r.lastCritical);l&&(r.lastCritical=o);const c=(u=a,!(!(p=r.lastLocation)&&!u||p&&u&&p.droppableId===u.droppableId&&p.index===u.index));var p,u;c&&(r.lastLocation=a);const g=!((e,t)=>!e&&!t||!(!e||!t)&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(r.lastCombine,s);if(g&&(r.lastCombine=s),!l&&!c&&!g)return;const f={...In(o,r.mode),combine:s,destination:a};n.add((()=>{vn(0,(()=>Dn(e().onDragUpdate,f,t,d.onDragUpdate)))}))},flush:()=>{ce(r,"Can only flush responders while dragging"),n.flush()},drop:o,abort:()=>{if(!r)return;const e={...In(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>r=>{if("BEFORE_INITIAL_CAPTURE"===r.type)return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if("INITIAL_PUBLISH"===r.type){const e=r.payload.critical;return n.beforeStart(e,r.payload.movementMode),t(r),void n.start(e,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),"FLUSH"===r.type)return void n.abort();const o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}};function wn(){}const Cn=()=>({x:window.pageXOffset,y:window.pageYOffset});function En({onWindowScroll:e}){const t=Ee((function(){e(Cn())})),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let r=wn;function o(){return r!==wn}return{start:function(){ce(!o(),"Cannot start scroll listener when already active"),r=ht(window,[n])},stop:function(){ce(o(),"Cannot stop scroll listener when not active"),t.cancel(),r(),r=wn},isActive:o}}const Sn=e=>{const t=En({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&(e=>"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type)(n)&&t.stop(),e(n)}},An=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=_t({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 n.width<=0||n.height<=0?null:n})(t.pageMarginBox,e):_t(e),Pn=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=((e,t)=>t?Vt(e,t.scroll.diff.displacement):e)(e.marginBox,r),i=((e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e)(o,n,t);return{page:e,withPlaceholder:t,active:An(i,r)}},Bn=(e,t)=>{ce(e.frame);const n=e.frame,r=He(t,n.scroll.initial),o=qe(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=Pn({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}},Nn=(0,Be.Z)((function(e,t){const n=t[e.line];return{value:n,point:Ve(e.line,n)}})),Rn=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=Nn(t.axis,e.displaceBy),i=sn(t.descriptor.id,n),a=i.indexOf(e);ce(-1!==a,"Expected draggable to be inside home list");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 d;return{impact:{displaced:tn({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(d=e.descriptor,{index:d.index,droppableId:d.droppableId})}},afterCritical:c}};function On(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}const Tn=e=>{const t=e.subject.active;return ce(t,"Cannot get clipped area from droppable"),t},Ln=(e,t)=>{const n=e.page.borderBox.center;return on(e.descriptor.id,t)?He(n,t.displacedBy.point):n},Mn=(e,t)=>{const n=e.page.borderBox;return on(e.descriptor.id,t)?Vt(n,qe(t.displacedBy.point)):n},Gn=(e,t)=>e.descriptor.droppableId===t.descriptor.id,_n=(0,Be.Z)(((e,t)=>t.filter((t=>t.descriptor.id!==e.descriptor.id))));function $n({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=function(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(e,{inHomeList:t});return{displaced:Tt,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function Fn({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=Gn(e,n);if(null===a)return $n({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=Oe(t,(e=>e.descriptor.index===a));if(!c)return $n({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const d=_n(e,t),p=t.indexOf(c);return{displaced:tn({afterDragging:d.slice(p),destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}const Un=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),kn=(e,t,n)=>{const r=e.frame;ce(!Gn(t,e),"Should not add placeholder space to home list"),ce(!e.subject.withPlaceholder,"Cannot add placeholder size to a subject when it already has one");const o=Nn(e.axis,t.displaceBy).point,i=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return Ve(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],i=sn(e.descriptor.id,n).reduce(((e,t)=>e+t.client.marginBox[r.size]),0)+t[r.line]-o;return i<=0?null:Ve(r.line,i)})(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=Pn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?je(r.scroll.max,i):r.scroll.max,l=Un(r,s),c=Pn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}},Wn=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=He(n,e.page.borderBox.center),s={target:Vt(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?(e=>{return Xt({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=$e(e.top,e.bottom),r=$e(e.left,e.right);return e=>t===nt?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(s):Qt(s)},jn=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=(({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const a=n.axis,s=$e(i[a.start],i[a.end]),l=Ge(r).filter((e=>e!==n)).filter((e=>e.isEnabled)).filter((e=>Boolean(e.subject.active))).filter((e=>Zt(o.frame)(Tn(e)))).filter((t=>{const n=Tn(t);return e?i[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<i[a.crossAxisStart]})).filter((e=>{const t=Tn(e),n=$e(t[a.start],t[a.end]);return s(t[a.start])||s(t[a.end])||n(i[a.start])||n(i[a.end])})).sort(((t,n)=>{const r=Tn(t)[a.crossAxisStart],o=Tn(n)[a.crossAxisStart];return e?r-o:o-r})).filter(((e,t,n)=>Tn(e)[a.crossAxisStart]===Tn(n[0])[a.crossAxisStart]));if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter((e=>$e(Tn(e)[a.start],Tn(e)[a.end])(t[a.line])));return 1===c.length?c[0]:c.length>1?c.sort(((e,t)=>Tn(e)[a.start]-Tn(t)[a.start]))[0]:l.sort(((e,n)=>{const r=Ze(t,zt(Tn(e))),o=Ze(t,zt(Tn(n)));return r!==o?r-o:Tn(e)[a.start]-Tn(n)[a.start]}))[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=sn(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>r.filter((e=>Qt({target:Mn(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0}))).sort(((t,r)=>{const i=ze(e,rn(n,Ln(t,o))),a=ze(e,rn(n,Ln(r,o)));return i<a?-1:a<i?1:t.descriptor.index-r.descriptor.index}))[0]||null)({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),p=(({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(n.length)return null;const e={displaced:Tt,displacedBy:Ot,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=gn({impact:e,draggable:r,droppable:i,draggables:o,afterCritical:s}),l=Gn(r,i)?i:kn(i,r,o);return Wn({draggable:r,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===r.descriptor.id||l?e:e+1})(),d=Nn(i.axis,r.displaceBy);return Fn({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:d,last:Tt,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!p)return null;const u=gn({impact:p,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:fn({pageBorderBoxCenter:u,draggable:n,viewport:a}),impact:p,scrollJumpRequest:null}},Hn=(e,t)=>{const n=He(t,e.scroll.initial),r=qe(n);return{frame:_t({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:n,displacement:r}}}};function Yn(e,t){return e.map((e=>t[e]))}const qn=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(ce(c,"Cannot move in direction without previous impact location"),(e=>"REORDER"===e.type)(c)){const r=(({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,a=n[0].descriptor.index,s=n[n.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===r?null:Fn({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:r})}const d=(({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,a=n[i].descriptor.index;return on(i,o)?e?a:a-1:e?a+1:a})({isMovingForward:e,destination:o,displaced:a.displaced,draggables:r,combine:c.combine,afterCritical:l});return null===d?null:Fn({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})},Vn=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!n.isEnabled)return null;const c=sn(n.descriptor.id,r),d=Gn(t,n),p=(({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled)return null;if(!vt(o))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:n.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=_n(t,r);if(!s)return l.length?i(l[l.length-1].descriptor.id):null;const c=Re(l,(e=>e.descriptor.id===s));ce(-1!==c,"Could not find displaced item in set");const d=c-1;return d<0?null:i(l[d].descriptor.id)})({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||qn({isMovingForward:e,isInHomeList:d,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!p)return null;const u=gn({impact:p,draggable:t,droppable:n,draggables:r,afterCritical:l});if(Wn({draggable:t,destination:n,newPageBorderBoxCenter:u,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})){return{clientSelection:fn({pageBorderBoxCenter:u,draggable:t,viewport:i}),impact:p,scrollJumpRequest:null}}const g=He(u,a),f=(({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=Hn(t,je(t.scroll.current,o)),a=n.frame?Bn(n,je(n.frame.scroll.current,o)):n,s=e.displaced,l=tn({afterDragging:Yn(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=tn({afterDragging:Yn(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),d={},p={},u=[s,l,c];return s.all.forEach((e=>{const t=function(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}(e,u);t?p[e]=t:d[e]=!0})),{...e,displaced:{all:s.all,invisible:d,visible:p}}})({impact:p,viewport:i,destination:n,draggables:r,maxScrollChange:g});return{clientSelection:s,impact:f,scrollJumpRequest:g}},zn=({state:e,type:t})=>{const n=((e,t)=>{const n=Pe(e);return n?t[n]:null})(e.impact,e.dimensions.droppables),r=Boolean(n),o=e.dimensions.droppables[e.critical.droppable.id],i=n||o,a=i.axis.direction,s="vertical"===a&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===a&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(s&&!r)return null;const l="MOVE_DOWN"===t||"MOVE_RIGHT"===t,c=e.dimensions.draggables[e.critical.draggable.id],d=e.current.page.borderBoxCenter,{draggables:p,droppables:u}=e.dimensions;return s?Vn({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,destination:i,draggables:p,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):jn({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,isOver:i,draggables:p,droppables:u,viewport:e.viewport,afterCritical:e.afterCritical})},Zn=(e,t)=>({...e,[t.descriptor.id]:t});function Jn({pageBorderBox:e,draggable:t,droppables:n}){const r=Ge(n).filter((t=>{if(!t.isEnabled)return!1;const n=t.subject.active;if(!n)return!1;if(o=n,!((r=e).left<o.right&&r.right>o.left&&r.top<o.bottom&&r.bottom>o.top))return!1;var r,o;if(Fe(n)(e.center))return!0;const i=t.axis,a=n.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=$e(n[i.crossAxisStart],n[i.crossAxisEnd]),d=c(s),p=c(l);return!d&&!p||(d?s<a:l>a)}));return r.length?1===r.length?r[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map((t=>{const n=t.axis,o=Ve(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:ze(r,o)}})).sort(((e,t)=>t.distance-e.distance));return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:r}):null}const Xn=(e,t)=>_t(Vt(e,t));function Kn({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}const Qn=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=Xn(t.page.borderBox,e),l=Jn({pageBorderBox:s,draggable:t,droppables:r});if(!l)return Lt;const c=r[l],d=sn(c.descriptor.id,n),p=((e,t)=>{const n=e.frame;return n?Xn(t,n.scroll.diff.value):t})(c,s);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:o,afterCritical:i})=>{if(!r.isCombineEnabled)return null;const a=r.axis,s=Nn(r.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],p=Oe(_n(e,o),(e=>{const t=e.descriptor.id,r=e.page.borderBox,o=r[a.size]/4,s=on(t,i),p=Kn({displaced:n.displaced,id:t});return s?p?d>r[a.start]+o&&d<r[a.end]-o:c>r[a.start]-l+o&&c<r[a.end]-l-o:p?d>r[a.start]+l+o&&d<r[a.end]+l-o:c>r[a.start]+o&&c<r[a.end]-o}));return p?{displacedBy:s,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:r.descriptor.id}}}:null})({pageBorderBoxWithDroppableScroll:p,draggable:t,previousImpact:o,destination:c,insideDestination:d,afterCritical:a})||(({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:a})=>{const s=n.axis,l=Nn(n.axis,t.displaceBy),c=l.value,d=e[s.start],p=e[s.end],u=function({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:Oe(_n(t,r),(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=e.page.borderBox["y"===s.line?"top":"left"],i=e.page.borderBox["y"===s.line?"bottom":"right"],l=on(t,a),u=Kn({displaced:o,id:t});return l?u?"y"===s.line?d<=r:p<=n:"y"===s.line?d<r:d<n-c:u?"y"===s.line?d<=i:p<=n+c:"y"===s.line?d<i:d<n})),inHomeList:Gn(t,n)});return Fn({draggable:t,insideDestination:r,destination:n,viewport:i,last:o,displacedBy:l,index:u})})({pageBorderBoxWithDroppableScroll:p,draggable:t,destination:c,insideDestination:d,last:o.displaced,viewport:i,afterCritical:a})},er=({previousImpact:e,impact:t,droppables:n})=>{const r=Pe(e),o=Pe(t);if(!r)return n;if(r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const a=(e=>{const t=e.subject.withPlaceholder;ce(t,"Cannot remove placeholder form subject when there was none");const n=e.frame;if(!n){const t=Pn({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;ce(r,"Expected droppable with frame to have old max frame scroll when removing placeholder");const o=Un(n,r),i=Pn({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return Zn(n,a)},tr=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const a=r||e.viewport,s=n||e.dimensions,l=t||e.current.client.selection,c=He(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:je(e.initial.client.borderBoxCenter,c)},p={selection:je(d.selection,a.scroll.current),borderBoxCenter:je(d.borderBoxCenter,a.scroll.current),offset:je(d.offset,a.scroll.diff.value)},u={client:d,page:p};if("COLLECTING"===e.phase)return{...e,dimensions:s,viewport:a,current:u};const g=s.draggables[e.critical.draggable.id],f=o||Qn({pageOffset:p.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=(({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=er({previousImpact:r,impact:o,droppables:n}),a=Pe(o);if(!a)return i;const s=n[a];if(Gn(e,s))return i;if(s.subject.withPlaceholder)return i;const l=kn(s,e,t);return Zn(i,l)})({draggable:g,impact:f,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:u,dimensions:{draggables:s.draggables,droppables:m},impact:f,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}},nr=({state:e,dimensions:t,viewport:n})=>{ce("SNAP"===e.movementMode);const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=Pe(r);ce(c,"Must be over a destination in SNAP movement mode");const d=s[c],p=nn({impact:r,viewport:o,destination:d,draggables:a}),u=mn({impact:p,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return tr({impact:p,clientSelection:u,state:e,dimensions:i,viewport:o})},rr=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map((e=>{const o=e.descriptor.droppableId,i=(e=>{const t=e.frame;return ce(t,"Expected Droppable to have a frame"),t})(t[o]).scroll.diff.value,a=(({draggable:e,offset:t,initialWindowScroll:n})=>{const r=jt(e.client,t),o=Ht(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}})({draggable:e,offset:je(r,i),initialWindowScroll:n.scroll.initial});return a}))},or=e=>"SNAP"===e.movementMode,ir=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:Zn(e.droppables,t)}))(e.dimensions,t);return!or(e)||n?tr({state:e,dimensions:r}):nr({state:e,dimensions:r})};function ar(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const sr={phase:"IDLE",completed:null,shouldFlush:!1},lr=(e=sr,t)=>{if("FLUSH"===t.type)return{...sr,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){ce("IDLE"===e.phase,"INITIAL_PUBLISH must come after a IDLE phase");const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[n.draggable.id],l=i.droppables[n.droppable.id],c={selection:r,borderBoxCenter:s.client.borderBox.center,offset:We},d={client:c,page:{selection:je(c.selection,o.scroll.initial),borderBoxCenter:je(c.selection,o.scroll.initial),offset:je(c.selection,o.scroll.diff.value)}},p=Ge(i.droppables).every((e=>!e.isFixedOnPage)),{impact:u,afterCritical:g}=Rn({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:i,initial:d,current:d,isWindowScrollAllowed:p,impact:u,afterCritical:g,onLiftImpact:u,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;ce("DRAGGING"===e.phase,`Collection cannot start from phase ${e.phase}`);return{...e,phase:"COLLECTING"}}if("PUBLISH_WHILE_DRAGGING"===t.type)return ce("COLLECTING"===e.phase||"DROP_PENDING"===e.phase,`Unexpected ${t.type} received in phase ${e.phase}`),(({state:e,published:t})=>{Se();const n=t.modified.map((t=>{const n=e.dimensions.droppables[t.droppableId];return Bn(n,t.scroll)})),r={...e.dimensions.droppables,...Le(n)},o=Me(rr({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach((e=>{delete i[e]}));const a={droppables:r,draggables:i},s=Pe(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],d=a.droppables[e.critical.droppable.id],{impact:p,afterCritical:u}=Rn({draggable:c,home:d,draggables:i,viewport:e.viewport}),g=l&&l.isCombineEnabled?e.impact:p,f=Qn({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:g,viewport:e.viewport,afterCritical:u});Ae();const m={...e,phase:"DRAGGING",impact:f,onLiftImpact:p,dimensions:a,afterCritical:u,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;ce(On(e),`${t.type} not permitted in phase ${e.phase}`);const{client:n}=t.payload,r=e;return Ye(n,r.current.client.selection)?e:tr({state:r,clientSelection:n,impact:or(r)?r.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return ar(e);if("COLLECTING"===e.phase)return ar(e);ce(On(e),`${t.type} not permitted in phase ${e.phase}`);const n=e,{id:r,newScroll:o}=t.payload,i=n.dimensions.droppables[r];if(!i)return e;const a=Bn(i,o);return ir(n,a,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;ce(On(e),`Attempting to move in an unsupported phase ${e.phase}`);const n=e,{id:r,isEnabled:o}=t.payload,i=n.dimensions.droppables[r];ce(i,`Cannot find Droppable[id: ${r}] to toggle its enabled state`),ce(i.isEnabled!==o,`Trying to set droppable isEnabled to ${String(o)}\n but it is already ${String(i.isEnabled)}`);const a={...i,isEnabled:o};return ir(n,a,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;ce(On(e),`Attempting to move in an unsupported phase ${e.phase}`);const n=e,{id:r,isCombineEnabled:o}=t.payload,i=n.dimensions.droppables[r];ce(i,`Cannot find Droppable[id: ${r}] to toggle its isCombineEnabled state`);const a=i;ce(a.isCombineEnabled!==o,`Trying to set droppable isCombineEnabled to ${String(o)}\n but it is already ${String(a.isCombineEnabled)}`);const s={...a,isCombineEnabled:o};return ir(n,s,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;ce(On(e),`Cannot move by window in phase ${e.phase}`);const n=e;ce(n.isWindowScrollAllowed,"Window scrolling is currently not supported for fixed lists");const r=t.payload.newScroll;if(Ye(n.viewport.scroll.current,r))return ar(e);const o=Hn(n.viewport,r);return or(n)?nr({state:n,viewport:o}):tr({state:n,viewport:o})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!On(e))return e;const n=e,r=t.payload.maxScroll;if(Ye(r,n.viewport.scroll.max))return e;const o={...n.viewport,scroll:{...n.viewport.scroll,max:r}};return{...n,viewport:o}}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;ce("DRAGGING"===e.phase,`${t.type} received while not in DRAGGING phase`);const n=zn({state:e,type:t.type});return n?tr({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;ce("COLLECTING"===e.phase,"Can only move into the DROP_PENDING phase from the COLLECTING phase");return{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;ce("DRAGGING"===e.phase||"DROP_PENDING"===e.phase,`Cannot animate drop from phase ${e.phase}`);return{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e},cr=re,dr=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>{return ee(lr,cr(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(Z(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return r=re.apply(void 0,i)(n.dispatch),(0,z.Z)((0,z.Z)({},n),{},{dispatch:r})}}}((a=n,()=>e=>t=>{"INITIAL_PUBLISH"===t.type&&a.dragging(),"DROP_ANIMATE"===t.type&&a.dropping(t.payload.completed.result.reason),"FLUSH"!==t.type&&"DROP_COMPLETE"!==t.type||a.resting(),e(t)}),(e=>()=>t=>n=>{"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>r=>o=>{if("LIFT"!==o.type)return void r(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&n(xe({completed:l.completed})),ce("IDLE"===t().phase,"Unexpected phase to start a drag"),n(De()),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:s}});const c={draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},{critical:d,dimensions:p,viewport:u}=e.startPublishing(c);n({type:"INITIAL_PUBLISH",payload:{critical:d,dimensions:p,clientSelection:a,movementMode:s,viewport:u}})})(e),bn,bt,yt,hn,(e=>t=>n=>r=>{if((e=>"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type)(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);const o=t.getState();return ce("DRAGGING"===o.phase,"Expected phase to be DRAGGING after INITIAL_PUBLISH"),void e.start(o)}n(r),e.scroll(t.getState())})(i),Sn,(e=>{let t=!1;return()=>n=>r=>{if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),xn(r,o))));var a},pr=()=>{const e=document.documentElement;return ce(e,"Cannot find document.documentElement"),e},ur=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=He({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},gr=()=>{const e=pr();return ur({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},fr=({critical:e,scrollOptions:t,registry:n})=>{Se();const r=(()=>{const e=Cn(),t=gr(),n=e.y,r=e.x,o=pr(),i=o.clientWidth,a=o.clientHeight;return{frame:_t({top:n,left:r,right:r+i,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:We,displacement:We}}}})(),o=r.scroll.current,i=e.droppable,a=n.droppable.getAllByType(i.type).map((e=>e.callbacks.getDimensionAndWatchScroll(o,t))),s=n.draggable.getAllByType(e.draggable.type).map((e=>e.getDimension(o))),l={draggables:Me(s),droppables:Le(a)};Ae();return{dimensions:l,critical:e,viewport:r}};function mr(e,t,n){if(n.descriptor.id===t.id)return!1;if(n.descriptor.type!==t.type)return!1;return"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode||(ie(`\n You are attempting to add or remove a Draggable [id: ${n.descriptor.id}]\n while a drag is occurring. This is only supported for virtual lists.\n\n See https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/patterns/virtual-lists.md\n `),!1)}const br=(e,t)=>{let n=null;const r=function({registry:e,callbacks:t}){let n={additions:{},removals:{},modified:{}},r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame((()=>{r=null,Se();const{additions:o,removals:i,modified:a}=n,s=Object.keys(o).map((t=>e.draggable.getById(t).getDimension(We))).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};n={additions:{},removals:{},modified:{}},Ae(),t.publish(c)})))};return{add:e=>{const t=e.descriptor.id;n.additions[t]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[t]&&delete n.removals[t],o()},remove:e=>{const t=e.descriptor;n.removals[t.id]=!0,n.modified[t.droppableId]=!0,n.additions[t.id]&&delete n.additions[t.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=t=>{ce(n,"Should only be subscribed when a collection is occurring");const o=n.critical.draggable;"ADDITION"===t.type&&mr(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&mr(e,o,t.value)&&r.remove(t.value)},i={updateDroppableIsEnabled:(r,o)=>{ce(e.droppable.exists(r),`Cannot update is enabled flag of Droppable ${r} as it is not registered`),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:(r,o)=>{n&&(ce(e.droppable.exists(r),`Cannot update isCombineEnabled flag of Droppable ${r} as it is not registered`),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:o}))},scrollDroppable:(t,r)=>{n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:(r,o)=>{n&&(ce(e.droppable.exists(r),`Cannot update the scroll on Droppable ${r} as it is not registered`),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:t=>{ce(!n,"Cannot start capturing critical dimensions as there is already a collection");const r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:i.descriptor},s=e.subscribe(o);return n={critical:a,unsubscribe:s},fr({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!n)return;r.stop();const t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((e=>e.callbacks.dragStopped())),n.unsubscribe(),n=null}};return i};function hr(){const e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((t=>t(e)))}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:(t,n)=>{const r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],n({type:"REMOVAL",value:t}))},getById:function(e){const t=r(e);return ce(t,`Cannot find draggable entry with id [${e}]`),t},findById:r,exists:e=>Boolean(r(e)),getAllByType:t=>Ne(e.draggables).filter((e=>e.descriptor.type===t))},droppable:{register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=o(e);return ce(t,`Cannot find droppable entry with id [${e}]`),t},findById:o,exists:e=>Boolean(o(e)),getAllByType:t=>Ne(e.droppables).filter((e=>e.descriptor.type===t))},subscribe:function(e){return t.push(e),function(){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}const yr=r.createContext(null),vr=r.createContext(null),Ir=()=>{const e=document.body;return ce(e,"Cannot find document.body"),e},Dr={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},xr=e=>`rbd-announcement-${e}`;const wr="data-rbd",Cr=(()=>{const e=`${wr}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Er=(()=>{const e=`${wr}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Sr=(()=>{const e=`${wr}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Ar={contextId:`${wr}-scroll-container-context-id`},Pr=e=>e&&e.ownerDocument?e.ownerDocument.defaultView:window;function Br(e){return e instanceof Pr(e).HTMLElement}function Nr(e,t){const n=`[${Cr.contextId}="${e}"]`,r=Te(document.querySelectorAll(n));if(!r.length)return ie(`Unable to find any drag handles in the context "${e}"`),null;const o=Oe(r,(e=>e.getAttribute(Cr.draggableId)===t));return o?Br(o)?o:(ie("drag handle needs to be a HTMLElement"),null):(ie(`Unable to find drag handle with id "${t}" as no handle with a matching id was found`),null)}const Rr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;function Or(e){const t=(0,r.useRef)(e);return(0,r.useEffect)((()=>{t.current=e})),t}const Tr=e=>_t(e.getBoundingClientRect()).center;const Lr=(()=>{const e="matches";if("undefined"==typeof document)return e;return Oe([e,"msMatchesSelector","webkitMatchesSelector"],(e=>e in Element.prototype))??e})();function Mr(e,t){if(!e)return null;return(0,e[Lr])(t)?e:Mr(e.parentElement,t)}function Gr(e,t){return e.closest?e.closest(t):Mr(e,t)}function _r(e,t){const n=t.target;if(!((r=n)instanceof Pr(r).Element))return ie("event.target must be a Element"),null;var r;const o=n,i=function(e){return`[${Cr.contextId}="${e}"]`}(e),a=Gr(o,i);return a?Br(a)?a:(ie("drag handle must be a HTMLElement"),null):null}const $r={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Fr(e,t){if(!t)return!1;if(Boolean($r[t.tagName.toLowerCase()]))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&Fr(e,t.parentElement)}function Ur(e,t){const n=t.target;return!!Br(n)&&Fr(e,n)}const kr=9,Wr=13,jr=27,Hr=32,Yr=33,qr=34,Vr=35,zr=36,Zr=37,Jr=38,Xr=39,Kr=40,Qr={[Wr]:!0,[kr]:!0},eo=e=>{Qr[e.keyCode]&&e.preventDefault()},to=(()=>{const e="visibilitychange";if("undefined"==typeof document)return e;return Oe([e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`],(e=>`on${e}`in document))||e})(),no=0,ro=5;const oo={type:"IDLE"};function io({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:o,clientY:i}=e;if(t!==no)return;const a={x:o,y:i},s=n();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);ce("PENDING"===s.type,"Cannot be IDLE");const l=s.point;if(c=l,d=a,!(Math.abs(d.x-c.x)>=ro||Math.abs(d.y-c.y)>=ro))return;var c,d;e.preventDefault();const p=s.actions.fluidLift(a);r({type:"DRAGGING",actions:p})}},{eventName:"mouseup",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===n().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==n().type)return t.keyCode===jr?(t.preventDefault(),void e()):void eo(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===n().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const r=n();ce("IDLE"!==r.type,"Unexpected phase"),r.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:to,fn:e}]}function ao(e){const t=(0,r.useRef)(oo),n=(0,r.useRef)(wn),o=(0,p.Ye)((()=>({eventName:"mousedown",fn:function(t){if(t.defaultPrevented)return;if(t.button!==no)return;if(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,s,{sourceEvent:t});if(!o)return;const i={x:t.clientX,y:t.clientY};n.current(),d(o,i)}})),[e]),i=(0,p.Ye)((()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}})),[e]),a=(0,p.I4)((function(){n.current=ht(window,[i,o],{passive:!1,capture:!0})}),[i,o]),s=(0,p.I4)((()=>{"IDLE"!==t.current.type&&(t.current=oo,n.current(),a())}),[a]),l=(0,p.I4)((()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),c=(0,p.I4)((function(){const e=io({cancel:l,completed:s,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=ht(window,e,{capture:!0,passive:!1})}),[l,s]),d=(0,p.I4)((function(e,n){ce("IDLE"===t.current.type,"Expected to move from IDLE to PENDING drag"),t.current={type:"PENDING",point:n,actions:e},c()}),[c]);Rr((function(){return a(),function(){n.current()}}),[a])}const so={type:"IDLE"},lo=120,co=.15;function po(e){const t=(0,r.useRef)(so),n=(0,r.useRef)(wn),o=(0,p.I4)((function(){return t.current}),[]),i=(0,p.I4)((function(e){t.current=e}),[]),a=(0,p.Ye)((()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,l,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:s}=i,c={x:a,y:s};n.current(),g(o,c)}})),[e]),s=(0,p.I4)((function(){n.current=ht(window,[a],{capture:!0,passive:!1})}),[a]),l=(0,p.I4)((()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(so),n.current(),s())}),[s,i]),c=(0,p.I4)((()=>{const e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),d=(0,p.I4)((function(){const e={capture:!0,passive:!1},t={cancel:c,completed:l,getPhase:o},r=ht(window,function({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const r=n();if("DRAGGING"!==r.type)return void e();r.hasMoved=!0;const{clientX:o,clientY:i}=t.touches[0],a={x:o,y:i};t.preventDefault(),r.actions.move(a)}},{eventName:"touchend",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===n().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const r=n();ce("IDLE"!==r.type);const o=t.touches[0];if(!o)return;if(!(o.force>=co))return;const i=r.actions.shouldRespectForcePress();if("PENDING"!==r.type)return i?r.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:to,fn:e}]}(t),e),i=ht(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:n=>{"DRAGGING"===t().type?(n.keyCode===jr&&n.preventDefault(),e()):e()}},{eventName:to,fn:e}]}(t),e);n.current=function(){r(),i()}}),[c,o,l]),u=(0,p.I4)((function(){const e=o();ce("PENDING"===e.type,`Cannot start dragging from phase ${e.type}`);const t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})}),[o,i]),g=(0,p.I4)((function(e,t){ce("IDLE"===o().type,"Expected to move from IDLE to PENDING drag");const n=window.setTimeout(u,lo);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),d()}),[d,o,i,u]);Rr((function(){return s(),function(){n.current();const e=o();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(so))}}),[o,s,i]),Rr((function(){return ht(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])}),[])}function uo(e){0}function go(e,t){uo()}function fo(e){e.preventDefault()}function mo({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return n()?e===t||(r&&ie(`\n Cannot perform action.\n The actions you used belong to an outdated phase\n\n Current phase: ${e}\n You called an action from outdated phase: ${t}\n\n Tips:\n\n - Do not use preDragActions actions after calling preDragActions.lift()\n `),!1):(r&&ie("\n Cannot perform action.\n The sensor no longer has an action lock.\n\n Tips:\n\n - Throw away your action handlers when forceStop() is called\n - Check actions.isActive() if you really need to\n "),!1)}function bo({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return o?!!o.options.isEnabled&&!!mt(t.getState(),r):(ie(`Unable to find draggable with id: ${r}`),!1)}function ho({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!bo({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const s=r.draggable.getById(o),l=function(e,t){const n=`[${Er.contextId}="${e}"]`,r=Oe(Te(document.querySelectorAll(n)),(e=>e.getAttribute(Er.id)===t));return r?Br(r)?r:(ie("Draggable element is not a HTMLElement"),null):null}(t,s.descriptor.id);if(!l)return ie(`Unable to find draggable element with id: ${o}`),null;if(a&&!s.options.canDragInteractiveElements&&Ur(l,a))return null;const c=e.claim(i||wn);let d="PRE_DRAG";function p(){return s.options.shouldRespectForcePress}function u(){return e.isActive(c)}const g=function(e,t){mo({expected:e,phase:d,isLockActive:u,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function f(t){function r(){e.release(),d="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=ht(window,[{eventName:"click",fn:fo,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(we({reason:e}))}return"PRE_DRAG"!==d&&(r(),ce("PRE_DRAG"===d,`Cannot lift in phase ${d}`)),n.dispatch(de(t.liftActionArgs)),d="DRAGGING",{isActive:()=>mo({expected:"DRAGGING",phase:d,isLockActive:u,shouldWarn:!1}),shouldRespectForcePress:p,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>mo({expected:"PRE_DRAG",phase:d,isLockActive:u,shouldWarn:!1}),shouldRespectForcePress:p,fluidLift:function(e){const t=Ee((e=>{g((()=>be({client:e})))}));return{...f({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>g(he),moveRight:()=>g(ve),moveDown:()=>g(ye),moveLeft:()=>g(Ie)};return f({liftActionArgs:{id:o,clientSelection:Tr(l),movementMode:"SNAP"},cleanup:wn,actions:e})},abort:function(){mo({expected:"PRE_DRAG",phase:d,isLockActive:u,shouldWarn:!0})&&e.release()}}}const yo=[ao,po];function vo({contextId:e,store:t,registry:n,customSensors:o,enableDefaultSensors:i}){const a=[...i?yo:[],...o||[]],s=(0,r.useState)((()=>function(){let e=null;function t(){ce(e,"Cannot release lock when there is no lock"),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){ce(!e,"Cannot claim lock as it is already claimed");const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()))[0],l=(0,p.I4)((function(e,t){e.isDragging&&!t.isDragging&&s.tryAbandon()}),[s]);Rr((function(){let e=t.getState();return t.subscribe((()=>{const n=t.getState();l(e,n),e=n}))}),[s,t,l]),Rr((()=>s.tryAbandon),[s.tryAbandon]);const c=(0,p.I4)((e=>bo({lockAPI:s,registry:n,store:t,draggableId:e})),[s,n,t]),d=(0,p.I4)(((r,o,i)=>ho({lockAPI:s,registry:n,contextId:e,store:t,draggableId:r,forceSensorStop:o,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null})),[e,s,n,t]),u=(0,p.I4)((t=>function(e,t){const n=_r(e,t);return n?n.getAttribute(Cr.draggableId):null}(e,t)),[e]),g=(0,p.I4)((e=>{const t=n.draggable.findById(e);return t?t.options:null}),[n.draggable]),f=(0,p.I4)((function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch(De()))}),[s,t]),m=(0,p.I4)((()=>s.isClaimed()),[s]),b=(0,p.Ye)((()=>({canGetLock:c,tryGetLock:d,findClosestDraggableId:u,findOptionsForDraggable:g,tryReleaseLock:f,isLockClaimed:m})),[c,d,u,g,f,m]);uo();for(let e=0;e<a.length;e++)a[e](b)}const Io=(e,t)=>e.map((e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""})).join(" "),Do=e=>{const t=(n=e,e=>`[${e}="${n}"]`);var n;const r=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(Cr.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: ${St.outOfTheWay};\n `;return{selector:t(Er.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(Sr.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:Io(o,"always"),resting:Io(o,"resting"),dragging:Io(o,"dragging"),dropAnimating:Io(o,"dropAnimating"),userCancel:Io(o,"userCancel")}},xo=()=>{const e=document.querySelector("head");return ce(e,"Cannot find the head to append a style to"),e},wo=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};const Co=e=>{window.scrollBy(e.x,e.y)};var Eo=n(132);const So=e=>({onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate});function Ao(e){return ce(e.current,"Could not find store from lazy ref"),e.current}function Po(e){const{contextId:t,setCallbacks:n,sensors:o,nonce:i,dragHandleUsageInstructions:a}=e,s=(0,r.useRef)(null);go();const l=Or(e),c=(0,p.I4)((()=>So(l.current)),[l]),d=function(e){const t=(0,p.Ye)((()=>xr(e)),[e]),n=(0,r.useRef)(null);return(0,r.useEffect)((function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Object.assign(e.style,Dr),Ir().appendChild(e),function(){setTimeout((function(){const t=Ir();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),(0,p.I4)((e=>{const t=n.current;t?t.textContent=e:ie(`\n A screen reader message was trying to be announced but it was unable to do so.\n This can occur if you unmount your <DragDropContext /> in your onDragEnd.\n Consider calling provided.announce() before the unmount so that the instruction will\n not be lost for users relying on a screen reader.\n\n Message not passed to screen reader:\n\n "${e}"\n `)}),[])}(t),u=function({contextId:e,text:t}){const n=f("hidden-text",{separator:"-"}),o=(0,p.Ye)((()=>function({contextId:e,uniqueId:t}){return`rbd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:n})),[n,e]);return(0,r.useEffect)((function(){const e=document.createElement("div");return e.id=o,e.textContent=t,e.style.display="none",Ir().appendChild(e),function(){const t=Ir();t.contains(e)&&t.removeChild(e)}}),[o,t]),o}({contextId:t,text:a}),g=function(e,t){const n=(0,p.Ye)((()=>Do(e)),[e]),o=(0,r.useRef)(null),i=(0,r.useRef)(null),a=(0,p.I4)((0,Be.Z)((e=>{const t=i.current;ce(t,"Cannot set dynamic style element if it is not set"),t.textContent=e})),[]),s=(0,p.I4)((e=>{const t=o.current;ce(t,"Cannot set dynamic style element if it is not set"),t.textContent=e}),[]);Rr((()=>{ce(!o.current&&!i.current,"style elements already mounted");const r=wo(t),l=wo(t);return o.current=r,i.current=l,r.setAttribute(`${wr}-always`,e),l.setAttribute(`${wr}-dynamic`,e),xo().appendChild(r),xo().appendChild(l),s(n.always),a(n.resting),()=>{const e=e=>{const t=e.current;ce(t,"Cannot unmount ref as it is not set"),xo().removeChild(t),e.current=null};e(o),e(i)}}),[t,s,a,n.always,n.resting,e]);const l=(0,p.I4)((()=>a(n.dragging)),[a,n.dragging]),c=(0,p.I4)((e=>{a("DROP"!==e?n.userCancel:n.dropAnimating)}),[a,n.dropAnimating,n.userCancel]),d=(0,p.I4)((()=>{i.current&&a(n.resting)}),[a,n.resting]);return(0,p.Ye)((()=>({dragging:l,dropping:c,resting:d})),[l,c,d])}(t,i),m=(0,p.I4)((e=>Ao(s).dispatch(e)),[]),b=(0,p.Ye)((()=>ne({publishWhileDragging:pe,updateDroppableScroll:ge,updateDroppableIsEnabled:fe,updateDroppableIsCombineEnabled:me,collectionStarting:ue},m)),[m]),h=function(){const e=(0,p.Ye)(hr,[]);return(0,r.useEffect)((()=>function(){requestAnimationFrame(e.clean)}),[e]),e}(),y=(0,p.Ye)((()=>br(h,b)),[h,b]),v=(0,p.Ye)((()=>ft({scrollWindow:Co,scrollDroppable:y.scrollDroppable,...ne({move:be},m)})),[y.scrollDroppable,m]),I=function(e){const t=(0,r.useRef)({}),n=(0,r.useRef)(null),o=(0,r.useRef)(null),i=(0,r.useRef)(!1),a=(0,p.I4)((function(e,n){const r={id:e,focus:n};return t.current[e]=r,function(){const n=t.current;n[e]!==r&&delete n[e]}}),[]),s=(0,p.I4)((function(t){const n=Nr(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),l=(0,p.I4)((function(e,t){n.current===e&&(n.current=t)}),[]),c=(0,p.I4)((function(){o.current||i.current&&(o.current=requestAnimationFrame((()=>{o.current=null;const e=n.current;e&&s(e)})))}),[s]),d=(0,p.I4)((function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(Cr.draggableId)===e&&(n.current=e)}),[]);return Rr((()=>(i.current=!0,function(){i.current=!1;const e=o.current;e&&cancelAnimationFrame(e)})),[]),(0,p.Ye)((()=>({register:a,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l})),[a,d,c,l])}(t),D=(0,p.Ye)((()=>dr({announce:d,autoScroller:v,dimensionMarshal:y,focusMarshal:I,getResponders:c,styleMarshal:g})),[d,v,y,I,c,g]);s.current=D;const x=(0,p.I4)((()=>{const e=Ao(s);"IDLE"!==e.getState().phase&&e.dispatch(De())}),[]),w=(0,p.I4)((()=>{const e=Ao(s).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);n((0,p.Ye)((()=>({isDragging:w,tryAbort:x})),[w,x]));const C=(0,p.I4)((e=>mt(Ao(s).getState(),e)),[]),E=(0,p.I4)((()=>On(Ao(s).getState())),[]),S=(0,p.Ye)((()=>({marshal:y,focus:I,contextId:t,canLift:C,isMovementAllowed:E,dragHandleUsageInstructionsId:u,registry:h})),[t,y,u,I,C,E,h]);return vo({contextId:t,store:D,registry:h,customSensors:o,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,r.useEffect)((()=>x),[x]),(0,Eo.jsx)(yr.Provider,{value:S,children:(0,Eo.jsx)(Y,{context:vr,store:D,children:e.children})})}const Bo=(0,r.createContext)(null);let No=function(e){return e[e.DragStart=0]="DragStart",e[e.DragUpdate=1]="DragUpdate",e[e.DragEnd=2]="DragEnd",e[e.BeforeDragStart=3]="BeforeDragStart",e[e.BeforeCapture=4]="BeforeCapture",e}({});function Ro(){return(0,r.useContext)(Bo)}const Oo=function(e){const t=Ro();return(0,r.useEffect)((()=>{if(t){const n=e.onDragStart&&t.registerDragStart(e.onDragStart),r=e.onDragUpdate&&t.registerDragUpdate(e.onDragUpdate),o=e.onDragEnd&&t.registerDragEnd(e.onDragEnd),i=e.onBeforeDragStart&&t.registerBeforeDragStart(e.onBeforeDragStart),a=e.onBeforeCapture&&t.registerBeforeCapture(e.onBeforeCapture);return()=>{n?.(),r?.(),o?.(),i?.(),a?.()}}}),[t,e]),(0,Eo.jsx)(r.Fragment,{children:e.children})};class To extends r.Component{callbacks=null;unbind=wn;componentDidMount(){this.unbind=ht(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof le))throw e;this.setState({})}componentWillUnmount(){this.unbind()}onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&(t.tryAbort(),ie("\n An error was caught by our window 'error' event listener while a drag was occurring.\n The active drag has been aborted.\n "));e.error instanceof le&&e.preventDefault()};getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks};setCallbacks=e=>{this.callbacks=e};render(){return this.props.children(this.setCallbacks)}}let Lo=0;function Mo(){Lo=0,u=0}function Go(e){const t=(0,p.Ye)((()=>""+Lo++),[]),n=e.dragHandleUsageInstructions||d.dragHandleUsageInstructions,i=(0,r.useRef)((()=>{const e=new Map;return e.set(No.DragStart,[]),e.set(No.DragUpdate,[]),e.set(No.DragEnd,[]),e.set(No.BeforeDragStart,[]),e.set(No.BeforeCapture,[]),e})()),a=(0,r.useCallback)(((e,t)=>{const n=i.current.get(e);return n?.push(t),()=>{i.current.set(e,i.current.get(e)?.filter((e=>t!==e))||[])}}),[]),s=(0,r.useCallback)(((e,...t)=>{i.current.get(e)?.forEach((e=>e(...t)))}),[]),l=(0,r.useMemo)((()=>({registerDragEnd:e=>a(No.DragEnd,e),registerDragStart:e=>a(No.DragStart,e),registerDragUpdate:e=>a(No.DragUpdate,e),registerBeforeDragStart:e=>a(No.BeforeDragStart,e),registerBeforeCapture:e=>a(No.BeforeCapture,e)})),[a]);return Ro()?(0,Eo.jsx)(Oo,{...e,children:e.children}):(0,Eo.jsx)(Bo.Provider,{value:l,children:(0,Eo.jsx)(To,{children:r=>(0,Eo.jsx)(Po,{nonce:e.nonce??(0,o.ey)(),contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:t=>{e.onBeforeCapture?.(t),s(No.BeforeCapture,t)},onBeforeDragStart:t=>{e.onBeforeDragStart?.(t),s(No.BeforeDragStart,t)},onDragStart:(t,n)=>{e.onDragStart?.(t,n),s(No.DragStart,t,n)},onDragUpdate:(t,n)=>{e.onDragUpdate?.(t,n),s(No.DragUpdate,t,n)},onDragEnd:(t,n)=>{e.onDragEnd(t,n),s(No.DragEnd,t,n)},children:e.children})})})}const _o=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null},$o=(e,t)=>e===t;class Fo extends r.PureComponent{state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"};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"}}onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})};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 Uo=r.createContext(null);function ko(e){const t=(0,r.useContext)(e);return ce(t,"Could not find required context"),t}function Wo(e){const t=f("draggable"),{descriptor:n,registry:o,getDraggableRef:i,canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l}=e,c=(0,p.Ye)((()=>({canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l})),[a,l,s]),d=(0,p.I4)((e=>{const t=i();return ce(t,"Cannot get dimension when no ref is set"),function(e,t,n=We){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Yt(o,r),a=Ht(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(n,t,e)}),[n,i]),u=(0,p.Ye)((()=>({uniqueId:t,descriptor:n,options:c,getDimension:d})),[n,d,c,t]),g=(0,r.useRef)(u),m=(0,r.useRef)(!0);Rr((()=>(o.draggable.register(g.current),()=>o.draggable.unregister(g.current))),[o.draggable]),Rr((()=>{if(m.current)return void(m.current=!1);const e=g.current;g.current=u,o.draggable.update(u,e)}),[u,o.draggable])}const jo={dragging:5e3,dropAnimating:4500},Ho=(e,t)=>t?St.drop(t.duration):e?St.snap:St.fluid,Yo=(e,t)=>{if(e)return t?xt.drop:xt.combining},qo=e=>null!==e.forceShouldAnimate&&void 0!==e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode;function Vo(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:n,combineWith:r,dropping:o}=e,i=Boolean(r),a=qo(e),s=Boolean(o),l=s?Pt.drop(n,i):Pt.moveTo(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Ho(a,o),transform:l,opacity:Yo(i,s),zIndex:s?jo.dropAnimating:jo.dragging,pointerEvents:"none"}}(e):(t=e,{transform:Pt.moveTo(t.offset),transition:t.shouldAnimateDisplacement?void 0:"none"});var t}function zo(e,t,n){go()}function Zo(e){e.preventDefault()}function Jo(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Xo={mapped:{type:"SECONDARY",offset:We,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Jo(null)}};const Ko=H((()=>{const e=function(){const e=(0,Be.Z)(((e,t)=>({x:e,y:t}))),t=(0,Be.Z)(((e,t,n,r,o)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}))),n=(0,Be.Z)(((e,n,r,o,i,a,s)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,o,i,a,null)}})));return(r,o)=>{if("DRAGGING"===r.phase){if(r.critical.draggable.id!==o.draggableId)return null;const t=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=Pe(r.impact),l=(i=r.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(t.x,t.y),r.movementMode,a,o.isClone,s,l,c)}var i;if("DROP_ANIMATING"===r.phase){const e=r.completed;if(e.result.draggableId!==o.draggableId)return null;const n=o.isClone,i=r.dimensions.draggables[o.draggableId],a=e.result,s=a.mode,l=_o(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:r.dropDuration,curve:Dt,moveTo:r.newHomeClientOffset,opacity:c?xt.drop:null,scale:c?wt.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:i,dropping:d,draggingOver:l,combineWith:c,mode:s,forceShouldAnimate:null,snapshot:t(s,n,l,c,d)}}}return null}}(),t=function(){const e=(0,Be.Z)(((e,t)=>({x:e,y:t}))),t=(0,Be.Z)(Jo),n=(0,Be.Z)(((e,n=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}))),r=e=>e?n(We,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=It(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return r(d);if(i.displaced.invisible[t])return null;const o=qe(a.displacedBy.point),s=e(o.x,o.y);return n(s,d,!0)}if(l)return r(d);const p=i.displacedBy.point,u=e(p.x,p.y);return n(u,d,s.shouldAnimate)};return(e,t)=>{if("DRAGGING"===e.phase)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 n=e.completed;return n.result.draggableId===t.draggableId?null:o(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return(n,r)=>e(n,r)||t(n,r)||Xo}),{dropAnimationFinished:Ce},null,{context:vr,areStatePropsEqual:$o})((function(e){const t=(0,r.useRef)(null),n=(0,p.I4)((e=>{t.current=e}),[]),o=(0,p.I4)((()=>t.current),[]),{contextId:i,registry:a}=ko(yr),{type:s,droppableId:l}=ko(Uo),c=(0,p.Ye)((()=>({id:e.draggableId,index:e.index,type:s,droppableId:l})),[e.draggableId,e.index,s,l]),{children:d,draggableId:u,isEnabled:g,shouldRespectForcePress:f,canDragInteractiveElements:m,isClone:b,mapped:h,dropAnimationFinished:y}=e;if(zo(),uo(),!b){Wo((0,p.Ye)((()=>({descriptor:c,registry:a,getDraggableRef:o,canDragInteractiveElements:m,shouldRespectForcePress:f,isEnabled:g})),[c,a,o,m,f,g]))}const v=(0,p.Ye)((()=>g?{tabIndex:0,"data-rbd-drag-handle-draggable-id":u,"data-rbd-drag-handle-context-id":i,draggable:!1,onDragStart:Zo}:null),[i,u,g]),I=(0,p.I4)((e=>{"DRAGGING"===h.type&&h.dropping&&"transform"===e.propertyName&&y()}),[y,h]),D=(0,p.Ye)((()=>{const e=Vo(h),t="DRAGGING"===h.type&&h.dropping?I:void 0;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":i,"data-rbd-draggable-id":u,style:e,onTransitionEnd:t},dragHandleProps:v}}),[i,v,u,h,I,n]),x=(0,p.Ye)((()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}})),[c.droppableId,c.id,c.index,c.type]);return d(D,h.snapshot,x)})),Qo=Ko;function ei(e){return ko(Uo).isUsingCloneFor!==e.draggableId||e.isClone?(0,Eo.jsx)(Qo,{...e}):null}function ti(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return(0,Eo.jsx)(ei,{...e,isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r})}function ni(){}const ri={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},oi=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||"close"===n?ri:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==n?St.placeholder:null}};function ii(e){const t=(0,r.useRef)(null),n=(0,p.I4)((()=>{t.current&&(clearTimeout(t.current),t.current=null)}),[]),{animate:o,onTransitionEnd:i,onClose:a,contextId:s}=e,[l,c]=(0,r.useState)("open"===e.animate);(0,r.useEffect)((()=>l?"open"!==o?(n(),c(!1),ni):t.current?ni:(t.current=setTimeout((()=>{t.current=null,c(!1)})),n):ni),[o,l,n]);const d=(0,p.I4)((e=>{"height"===e.propertyName&&(i(),"close"===o&&a())}),[o,a,i]),u=oi({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return r.createElement(e.placeholder.tagName,{style:u,"data-rbd-placeholder-context-id":s,onTransitionEnd:d,ref:e.innerRef})}const ai=r.memo(ii),si=e=>t=>e===t,li=si("scroll"),ci=si("auto"),di=(si("visible"),(e,t)=>t(e.overflowX)||t(e.overflowY)),pi=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return di(n,li)||di(n,ci)},ui=e=>e?e===document.body||e===document.documentElement?null:pi(e)?e:ui(e.parentElement):null,gi=ui,fi=e=>({x:e.scrollLeft,y:e.scrollTop}),mi=({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=n.closestScrollable,c=((e,t)=>{const n=qt(e);if(!t)return n;if(e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,s=$t({top:r,right:a,bottom:i,left:o},n.border);return kt({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})})(e,l),d=Ht(c,r),p=(()=>{if(!l)return null;const e=qt(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:Ht(e,r),scroll:fi(l),scrollSize:t,shouldClipSubject:s}})(),u=(({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:e,client:t}=s,n=ur({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:n,diff:{value:We,displacement:We}}}})(),c="vertical"===o?nt:rt;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:Pn({page:a,withPlaceholder:null,axis:c,frame:l})}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:n.isFixedOnPage,direction:o,client:c,page:d,closest:p});return u},bi=e=>{if(!e)return!1;return"fixed"===window.getComputedStyle(e).position||bi(e.parentElement)},hi=e=>({closestScrollable:gi(e),isFixedOnPage:bi(e)}),yi={passive:!1},vi={passive:!0},Ii=e=>e.shouldPublishImmediately?yi:vi,Di=e=>e&&e.env.closestScrollable||null;const xi=(e,t)=>e===t.droppable.type,wi=(e,t)=>t.draggables[e.draggable.id],Ci={updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})};const Ei={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return ce(document.body,"document.body is not ready"),document.body}};const Si=H((()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=(0,Be.Z)((e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}))),r=(0,Be.Z)(((r,o,i,a,s,l)=>{const c=s.descriptor.id;if(s.descriptor.droppableId===r){const e=l?{render:l,dragging:n(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(n,o)=>{const i=o.droppableId,a=o.type,s=!o.isDropDisabled,l=o.renderClone;if((e=>e.isDragging)(n)){const e=n.critical;if(!xi(a,e))return t;const o=wi(e,n.dimensions),c=Pe(n.impact)===i;return r(i,s,c,c,o,l)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!xi(a,e.critical))return t;const o=wi(e.critical,n.dimensions);return r(i,s,_o(e.result)===i,Pe(e.impact)===i,o,l)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!xi(a,r.critical))return t;const o=Pe(r.impact)===i,s=Boolean(r.impact.at&&"COMBINE"===r.impact.at.type),l=r.critical.droppable.id===i;return o?s?e:t:l?e:t}return t}}),Ci,null,{context:vr,areStatePropsEqual:$o})((function(e){const t=(0,r.useContext)(yr);ce(t,"Could not find app context");const{contextId:n,isMovementAllowed:o}=t,i=(0,r.useRef)(null),a=(0,r.useRef)(null),{children:s,droppableId:l,type:c,mode:d,direction:u,ignoreContainerClipping:g,isDropDisabled:m,isCombineEnabled:b,snapshot:y,useClone:v,updateViewportMaxScroll:I,getContainerForClone:D}=e,x=(0,p.I4)((()=>i.current),[]),w=(0,p.I4)((e=>{i.current=e}),[]),C=((0,p.I4)((()=>a.current),[]),(0,p.I4)((e=>{a.current=e}),[]));go();const E=(0,p.I4)((()=>{o()&&I({maxScroll:gr()})}),[o,I]);!function(e){const t=(0,r.useRef)(null),n=ko(yr),o=f("droppable"),{registry:i,marshal:a}=n,s=Or(e),l=(0,p.Ye)((()=>({id:e.droppableId,type:e.type,mode:e.mode})),[e.droppableId,e.mode,e.type]),c=(0,r.useRef)(l),d=(0,p.Ye)((()=>(0,Be.Z)(((e,n)=>{ce(t.current,"Can only update scroll when dragging");const r={x:e,y:n};a.updateDroppableScroll(l.id,r)}))),[l.id,a]),u=(0,p.I4)((()=>{const e=t.current;return e&&e.env.closestScrollable?fi(e.env.closestScrollable):We}),[]),g=(0,p.I4)((()=>{const e=u();d(e.x,e.y)}),[u,d]),m=(0,p.Ye)((()=>Ee(g)),[g]),b=(0,p.I4)((()=>{const e=t.current,n=Di(e);ce(e&&n,"Could not find scroll options while scrolling"),e.scrollOptions.shouldPublishImmediately?g():m()}),[m,g]),h=(0,p.I4)(((e,r)=>{ce(!t.current,"Cannot collect a droppable while a drag is occurring");const o=s.current,i=o.getDroppableRef();ce(i,"Cannot collect without a droppable ref");const a=i,c=hi(a),d={ref:a,descriptor:l,env:c,scrollOptions:r};t.current=d;const p=mi({ref:a,descriptor:l,env:c,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),u=c.closestScrollable;return u&&(u.setAttribute(Ar.contextId,n.contextId),u.addEventListener("scroll",b,Ii(d.scrollOptions))),p}),[n.contextId,l,b,s]),y=(0,p.I4)((()=>{const e=t.current,n=Di(e);return ce(e&&n,"Can only recollect Droppable client for Droppables that have a scroll container"),fi(n)}),[]),v=(0,p.I4)((()=>{const e=t.current;ce(e,"Cannot stop drag when no active drag");const n=e,r=Di(n);t.current=null,r&&(m.cancel(),r.removeAttribute(Ar.contextId),r.removeEventListener("scroll",b,Ii(n.scrollOptions)))}),[b,m]),I=(0,p.I4)((e=>{const n=t.current;ce(n,"Cannot scroll when there is no drag");const r=Di(n);ce(r,"Cannot scroll a droppable with no closest scrollable"),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),D=(0,p.Ye)((()=>({getDimensionAndWatchScroll:h,getScrollWhileDragging:y,dragStopped:v,scroll:I})),[v,h,y,I]),x=(0,p.Ye)((()=>({uniqueId:o,descriptor:l,callbacks:D})),[D,l,o]);Rr((()=>(c.current=x.descriptor,i.droppable.register(x),()=>{t.current&&(ie("Unsupported: changing the droppableId or type of a Droppable during a drag"),v()),i.droppable.unregister(x)})),[D,l,v,x,a,i.droppable]),Rr((()=>{t.current&&a.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)}),[e.isDropDisabled,a]),Rr((()=>{t.current&&a.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,a])}({droppableId:l,type:c,mode:d,direction:u,isDropDisabled:m,isCombineEnabled:b,ignoreContainerClipping:g,getDroppableRef:x});const S=(0,p.Ye)((()=>(0,Eo.jsx)(Fo,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder,children:({onClose:e,data:t,animate:r})=>(0,Eo.jsx)(ai,{placeholder:t,onClose:e,innerRef:C,animate:r,contextId:n,onTransitionEnd:E})})),[n,E,e.placeholder,e.shouldAnimatePlaceholder,C]),A=(0,p.Ye)((()=>({innerRef:w,placeholder:S,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":n}})),[n,l,S,w]),P=v?v.dragging.draggableId:null,B=(0,p.Ye)((()=>({droppableId:l,type:c,isUsingCloneFor:P})),[l,P,c]);return(0,Eo.jsxs)(Uo.Provider,{value:B,children:[s(A,y),function(){if(!v)return null;const{dragging:e,render:t}=v,n=(0,Eo.jsx)(ei,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0,children:(n,r)=>t(n,r,e)});return h.createPortal(n,D())}()]})}));Si.defaultProps=Ei;const Ai=Si;function Pi(){}const Bi={[qr]:!0,[Yr]:!0,[zr]:!0,[Vr]:!0};function Ni(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:r=>r.keyCode===jr?(r.preventDefault(),void n()):r.keyCode===Hr?(r.preventDefault(),t(),void e.drop()):r.keyCode===Kr?(r.preventDefault(),void e.moveDown()):r.keyCode===Jr?(r.preventDefault(),void e.moveUp()):r.keyCode===Xr?(r.preventDefault(),void e.moveRight()):r.keyCode===Zr?(r.preventDefault(),void e.moveLeft()):void(Bi[r.keyCode]?r.preventDefault():eo(r))},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:to,fn:n}]}function Ri(e){const t=(0,r.useRef)(Pi),n=(0,p.Ye)((()=>({eventName:"keydown",fn:function(n){if(n.defaultPrevented)return;if(n.keyCode!==Hr)return;const r=e.findClosestDraggableId(n);if(!r)return;const i=e.tryGetLock(r,l,{sourceEvent:n});if(!i)return;n.preventDefault();let a=!0;const s=i.snapLift();function l(){ce(a,"Cannot stop capturing a keyboard drag when not capturing"),a=!1,t.current(),o()}t.current(),t.current=ht(window,Ni(s,l),{capture:!0,passive:!1})}})),[e]),o=(0,p.I4)((function(){t.current=ht(window,[n],{passive:!1,capture:!0})}),[n]);Rr((function(){return o(),function(){t.current()}}),[o])}},764:(e,t)=>{var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.server_context"),p=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen");function h(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case a:case u:case g:return e;default:switch(e=e&&e.$$typeof){case d:case c:case p:case m:case f:case l:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.isContextConsumer=function(e){return h(e)===c}},763:(e,t,n)=>{e.exports=n(764)}}]);
//# sourceMappingURL=38.va-report-components.js.map