@planningcenter/react-beautiful-dnd 13.2.1 → 13.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [13.3.0] - 2023-07-25
9
+
10
+ ### Added
11
+
12
+ - Add support for an element to include data-dnd-ignore-scrollable to not be considered a scrollable container.
13
+ - Add shared publish workflow to publish to npm when a github release is created.
14
+
15
+ ### Changed
16
+
17
+ - build/test workflow: upgrade ubuntu to use latest
18
+ - build/test workflow: upgrade node to 16.x
19
+
20
+ ### Dependencies
21
+
22
+ - `decode-uri-component` from 0.2.0 to 0.2.2
23
+ - `express` from 4.17.1 to 4.18.2
24
+ - `json5` from 1.0.1 to 1.0.2
25
+ - `qs` from 6.5.2 to 6.5.3
26
+ - `semver` from 5.7.1 to 5.7.2
27
+ - `ua-parser-js` from 0.7.21 to 0.7.33
28
+ - `word-wrap` from 1.2.3 to 1.2.4
29
+
8
30
  ## [13.2.1]
9
31
 
10
32
  ### Security
@@ -40,6 +62,7 @@ Includes merged Dependabot PRs for
40
62
  All release notes and upgrade notes for earlier versions can be found on the original
41
63
  project's [Github Releases] page.
42
64
 
65
+ [13.3.0]: https://github.com/planningcenter/react-beautiful-dnd/compare/v13.2.1..v13.3.0
43
66
  [13.2.1]: https://github.com/planningcenter/react-beautiful-dnd/compare/v13.2.0..v13.2.1
44
67
  [13.2.0]: https://github.com/planningcenter/react-beautiful-dnd/compare/v13.1.2..v13.2.0
45
68
  [13.1.2]: https://github.com/planningcenter/react-beautiful-dnd/compare/v13.1.1..v13.1.2
@@ -7211,6 +7211,11 @@ var isElementScrollable = function isElementScrollable(el) {
7211
7211
  overflowX: style.overflowX,
7212
7212
  overflowY: style.overflowY
7213
7213
  };
7214
+
7215
+ if (el instanceof HTMLElement && el.dataset.dndIgnoreScrollable) {
7216
+ return false;
7217
+ }
7218
+
7214
7219
  return isEither(overflow, isScroll) || isEither(overflow, isAuto);
7215
7220
  };
7216
7221
 
@@ -7204,6 +7204,11 @@ var isElementScrollable = function isElementScrollable(el) {
7204
7204
  overflowX: style.overflowX,
7205
7205
  overflowY: style.overflowY
7206
7206
  };
7207
+
7208
+ if (el instanceof HTMLElement && el.dataset.dndIgnoreScrollable) {
7209
+ return false;
7210
+ }
7211
+
7207
7212
  return isEither(overflow, isScroll) || isEither(overflow, isAuto);
7208
7213
  };
7209
7214
 
@@ -10208,6 +10208,11 @@
10208
10208
  overflowX: style.overflowX,
10209
10209
  overflowY: style.overflowY
10210
10210
  };
10211
+
10212
+ if (el instanceof HTMLElement && el.dataset.dndIgnoreScrollable) {
10213
+ return false;
10214
+ }
10215
+
10211
10216
  return isEither(overflow, isScroll) || isEither(overflow, isAuto);
10212
10217
  };
10213
10218
 
@@ -1 +1 @@
1
- !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],r):r((e=e||self).ReactBeautifulDnd={},e.React,e.ReactDOM)}(this,(function(e,r,t){"use strict";var n="default"in r?r.default:r,i="default"in t?t.default:t;function o(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r}function a(){}function l(){return(l=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function c(e,r,t){var n=r.map((function(r){var n,i,o=(n=t,i=r.options,l({},n,{},i));return e.addEventListener(r.eventName,r.fn,o),function(){e.removeEventListener(r.eventName,r.fn,o)}}));return function(){n.forEach((function(e){e()}))}}function u(e){this.message=e}function s(e,r){if(!e)throw new u("Invariant failed")}u.prototype.toString=function(){return this.message};var d=function(e){function r(){for(var r,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(r=e.call.apply(e,[this].concat(n))||this).callbacks=null,r.unbind=a,r.onWindowError=function(e){var t=r.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof u&&e.preventDefault()},r.getCallbacks=function(){if(!r.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return r.callbacks},r.setCallbacks=function(e){r.callbacks=e},r}o(r,e);var t=r.prototype;return t.componentDidMount=function(){this.unbind=c(window,[{eventName:"error",fn:this.onWindowError}])},t.componentDidCatch=function(e){if(!(e instanceof u))throw e;this.setState({})},t.componentWillUnmount=function(){this.unbind()},t.render=function(){return this.props.children(this.setCallbacks)},r}(n.Component),p=function(e){return e+1},f=function(e,r){var t=e.droppableId===r.droppableId,n=p(e.index),i=p(r.index);return t?"\n You have moved the item from position "+n+"\n to position "+i+"\n ":"\n You have moved the item from position "+n+"\n in list "+e.droppableId+"\n to list "+r.droppableId+"\n in position "+i+"\n "},g=function(e,r,t){return r.droppableId===t.droppableId?"\n The item "+e+"\n has been combined with "+t.draggableId:"\n The item "+e+"\n in list "+r.droppableId+"\n has been combined with "+t.draggableId+"\n in list "+t.droppableId+"\n "},v=function(e){return"\n The item has returned to its starting position\n of "+p(e.index)+"\n"},m="\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",b=function(e){return"\n You have lifted an item in position "+p(e.source.index)+"\n"},h=function(e){var r=e.destination;if(r)return f(e.source,r);var t=e.combine;return t?g(e.draggableId,e.source,t):"You are over an area that cannot be dropped on"},y=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+v(e.source)+"\n ";var r=e.destination,t=e.combine;return r?"\n You have dropped the item.\n "+f(e.source,r)+"\n ":t?"\n You have dropped the item.\n "+g(e.draggableId,e.source,t)+"\n ":"\n The item has been dropped while not over a drop area.\n "+v(e.source)+"\n "};var x=function(e){var r,t=e.Symbol;return"function"==typeof t?t.observable?r=t.observable:(r=t("observable"),t.observable=r):r="@@observable",r}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),I=function(){return Math.random().toString(36).substring(7).split("").join(".")},D={INIT:"@@redux/INIT"+I(),REPLACE:"@@redux/REPLACE"+I(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+I()}};function w(e){if("object"!=typeof e||null===e)return!1;for(var r=e;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function E(e,r,t){var n;if("function"==typeof r&&"function"==typeof t||"function"==typeof t&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof r&&void 0===t&&(t=r,r=void 0),void 0!==t){if("function"!=typeof t)throw new Error("Expected the enhancer to be a function.");return t(E)(e,r)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var i=e,o=r,a=[],l=a,c=!1;function u(){l===a&&(l=a.slice())}function s(){if(c)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(c)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var r=!0;return u(),l.push(e),function(){if(r){if(c)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");r=!1,u();var t=l.indexOf(e);l.splice(t,1),a=null}}}function p(e){if(!w(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw new Error("Reducers may not dispatch actions.");try{c=!0,o=i(o,e)}finally{c=!1}for(var r=a=l,t=0;t<r.length;t++){(0,r[t])()}return e}function f(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");i=e,p({type:D.REPLACE})}function g(){var e,r=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function t(){e.next&&e.next(s())}return t(),{unsubscribe:r(t)}}})[x]=function(){return this},e}return p({type:D.INIT}),(n={dispatch:p,subscribe:d,getState:s,replaceReducer:f})[x]=g,n}function S(e,r){return function(){return r(e.apply(this,arguments))}}function C(e,r){if("function"==typeof e)return S(e,r);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var t={};for(var n in e){var i=e[n];"function"==typeof i&&(t[n]=S(i,r))}return t}function O(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function P(e,r){var t=Object.keys(e);return Object.getOwnPropertySymbols&&t.push.apply(t,Object.getOwnPropertySymbols(e)),r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t}function A(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?P(t,!0).forEach((function(r){O(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(t).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function R(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return 0===r.length?function(e){return e}:1===r.length?r[0]:r.reduce((function(e,r){return function(){return e(r.apply(void 0,arguments))}}))}function N(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function B(e,r){return e(r={exports:{}},r.exports),r.exports}var T=B((function(e,r){Object.defineProperty(r,"__esModule",{value:!0});var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,i=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,l=t?Symbol.for("react.profiler"):60114,c=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,g=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.fundamental"):60117,h=t?Symbol.for("react.responder"):60118,y=t?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var r=e.$$typeof;switch(r){case n:switch(e=e.type){case s:case d:case o:case l:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case m:case v:case c:return e;default:return r}}case i:return r}}}function I(e){return x(e)===d}r.typeOf=x,r.AsyncMode=s,r.ConcurrentMode=d,r.ContextConsumer=u,r.ContextProvider=c,r.Element=n,r.ForwardRef=p,r.Fragment=o,r.Lazy=m,r.Memo=v,r.Portal=i,r.Profiler=l,r.StrictMode=a,r.Suspense=f,r.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===a||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===c||e.$$typeof===u||e.$$typeof===p||e.$$typeof===b||e.$$typeof===h||e.$$typeof===y)},r.isAsyncMode=function(e){return I(e)||x(e)===s},r.isConcurrentMode=I,r.isContextConsumer=function(e){return x(e)===u},r.isContextProvider=function(e){return x(e)===c},r.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},r.isForwardRef=function(e){return x(e)===p},r.isFragment=function(e){return x(e)===o},r.isLazy=function(e){return x(e)===m},r.isMemo=function(e){return x(e)===v},r.isPortal=function(e){return x(e)===i},r.isProfiler=function(e){return x(e)===l},r.isStrictMode=function(e){return x(e)===a},r.isSuspense=function(e){return x(e)===f}}));N(T);T.typeOf,T.AsyncMode,T.ConcurrentMode,T.ContextConsumer,T.ContextProvider,T.Element,T.ForwardRef,T.Fragment,T.Lazy,T.Memo,T.Portal,T.Profiler,T.StrictMode,T.Suspense,T.isValidElementType,T.isAsyncMode,T.isConcurrentMode,T.isContextConsumer,T.isContextProvider,T.isElement,T.isForwardRef,T.isFragment,T.isLazy,T.isMemo,T.isPortal,T.isProfiler,T.isStrictMode,T.isSuspense;var M=B((function(e,r){}));N(M);M.typeOf,M.AsyncMode,M.ConcurrentMode,M.ContextConsumer,M.ContextProvider,M.Element,M.ForwardRef,M.Fragment,M.Lazy,M.Memo,M.Portal,M.Profiler,M.StrictMode,M.Suspense,M.isValidElementType,M.isAsyncMode,M.isConcurrentMode,M.isContextConsumer,M.isContextProvider,M.isElement,M.isForwardRef,M.isFragment,M.isLazy,M.isMemo,M.isPortal,M.isProfiler,M.isStrictMode,M.isSuspense;var L=B((function(e){e.exports=T})),G=(L.isValidElementType,L.isContextConsumer),_=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;function k(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}})()&&Object.assign,Function.call.bind(Object.prototype.hasOwnProperty);function W(){}function U(){}U.resetWarningCache=W;B((function(e){e.exports=function(){function e(e,r,t,n,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function r(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:U,resetWarningCache:W};return t.PropTypes=t,t}()}));var H=n.createContext(null);var q=function(e){e()},V=function(){return q},z={notify:function(){}};var $=function(){function e(e,r){this.store=e,this.parentSub=r,this.unsubscribe=null,this.listeners=z,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var r=e.prototype;return r.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},r.notifyNestedSubs=function(){this.listeners.notify()},r.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},r.isSubscribed=function(){return Boolean(this.unsubscribe)},r.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=V(),r=null,t=null;return{clear:function(){r=null,t=null},notify:function(){e((function(){for(var e=r;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],t=r;t;)e.push(t),t=t.next;return e},subscribe:function(e){var n=!0,i=t={callback:e,next:null,prev:t};return i.prev?i.prev.next=i:r=i,function(){n&&null!==r&&(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:r=i.next)}}}}())},r.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=z)},e}();function Y(e){var t=e.store,i=e.context,o=e.children,a=r.useMemo((function(){var e=new $(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),l=r.useMemo((function(){return t.getState()}),[t]);r.useEffect((function(){var e=a.subscription;return e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[a,l]);var c=i||H;return n.createElement(c.Provider,{value:a},o)}function J(){return(J=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function X(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}var K={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Q={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Z={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ee={};function re(e){return L.isMemo(e)?Z:ee[e.$$typeof]||K}ee[L.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ee[L.Memo]=Z;var te=Object.defineProperty,ne=Object.getOwnPropertyNames,ie=Object.getOwnPropertySymbols,oe=Object.getOwnPropertyDescriptor,ae=Object.getPrototypeOf,le=Object.prototype;var ce=function e(r,t,n){if("string"!=typeof t){if(le){var i=ae(t);i&&i!==le&&e(r,i,n)}var o=ne(t);ie&&(o=o.concat(ie(t)));for(var a=re(r),l=re(t),c=0;c<o.length;++c){var u=o[c];if(!(Q[u]||n&&n[u]||l&&l[u]||a&&a[u])){var s=oe(t,u);try{te(r,u,s)}catch(e){}}}}return r},ue="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,se=[],de=[null,null];function pe(e,r){var t=e[1];return[r.payload,t+1]}function fe(e,r,t){ue((function(){return e.apply(void 0,r)}),t)}function ge(e,r,t,n,i,o,a){e.current=n,r.current=i,t.current=!1,o.current&&(o.current=null,a())}function ve(e,r,t,n,i,o,a,l,c,u){if(e){var s=!1,d=null,p=function(){if(!s){var e,t,p=r.getState();try{e=n(p,i.current)}catch(e){t=e,d=e}t||(d=null),e===o.current?a.current||c():(o.current=e,l.current=e,a.current=!0,u({type:"STORE_UPDATED",payload:{error:t}}))}};t.onStateChange=p,t.trySubscribe(),p();return function(){if(s=!0,t.tryUnsubscribe(),t.onStateChange=null,d)throw d}}}var me=function(){return[null,0]};function be(e,t){void 0===t&&(t={});var i=t,o=i.getDisplayName,a=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,l=i.methodName,c=void 0===l?"connectAdvanced":l,u=i.renderCountProp,s=void 0===u?void 0:u,d=i.shouldHandleStateChanges,p=void 0===d||d,f=i.storeKey,g=void 0===f?"store":f,v=(i.withRef,i.forwardRef),m=void 0!==v&&v,b=i.context,h=void 0===b?H:b,y=X(i,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),x=h;return function(t){var i=t.displayName||t.name||"Component",o=a(i),l=J({},y,{getDisplayName:a,methodName:c,renderCountProp:s,shouldHandleStateChanges:p,storeKey:g,displayName:o,wrappedComponentName:i,WrappedComponent:t}),u=y.pure;var d=u?r.useMemo:function(e){return e()};function f(i){var o=r.useMemo((function(){var e=i.forwardedRef,r=X(i,["forwardedRef"]);return[i.context,e,r]}),[i]),a=o[0],c=o[1],u=o[2],s=r.useMemo((function(){return a&&a.Consumer&&G(n.createElement(a.Consumer,null))?a:x}),[a,x]),f=r.useContext(s),g=Boolean(i.store)&&Boolean(i.store.getState)&&Boolean(i.store.dispatch),v=(Boolean(f)&&Boolean(f.store),g?i.store:f.store),m=r.useMemo((function(){return function(r){return e(r.dispatch,l)}(v)}),[v]),b=r.useMemo((function(){if(!p)return de;var e=new $(v,g?null:f.subscription),r=e.notifyNestedSubs.bind(e);return[e,r]}),[v,g,f]),h=b[0],y=b[1],I=r.useMemo((function(){return g?f:J({},f,{subscription:h})}),[g,f,h]),D=r.useReducer(pe,se,me),w=D[0][0],E=D[1];if(w&&w.error)throw w.error;var S=r.useRef(),C=r.useRef(u),O=r.useRef(),P=r.useRef(!1),A=d((function(){return O.current&&u===C.current?O.current:m(v.getState(),u)}),[v,w,u]);fe(ge,[C,S,P,u,A,O,y]),fe(ve,[p,v,h,m,C,S,P,O,y,E],[v,h,m]);var R=r.useMemo((function(){return n.createElement(t,J({},A,{ref:c}))}),[c,t,A]);return r.useMemo((function(){return p?n.createElement(s.Provider,{value:I},R):R}),[s,R,I])}var v=u?n.memo(f):f;if(v.WrappedComponent=t,v.displayName=o,m){var b=n.forwardRef((function(e,r){return n.createElement(v,J({},e,{forwardedRef:r}))}));return b.displayName=o,b.WrappedComponent=t,ce(b,t)}return ce(v,t)}}function he(e,r){return e===r?0!==e||0!==r||1/e==1/r:e!=e&&r!=r}function ye(e,r){if(he(e,r))return!0;if("object"!=typeof e||null===e||"object"!=typeof r||null===r)return!1;var t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(!Object.prototype.hasOwnProperty.call(r,t[i])||!he(e[t[i]],r[t[i]]))return!1;return!0}function xe(e){return function(r,t){var n=e(r,t);function i(){return n}return i.dependsOnOwnProps=!1,i}}function Ie(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function De(e,r){return function(r,t){t.displayName;var n=function(e,r){return n.dependsOnOwnProps?n.mapToProps(e,r):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(r,t){n.mapToProps=e,n.dependsOnOwnProps=Ie(e);var i=n(r,t);return"function"==typeof i&&(n.mapToProps=i,n.dependsOnOwnProps=Ie(i),i=n(r,t)),i},n}}var we=[function(e){return"function"==typeof e?De(e):void 0},function(e){return e?void 0:xe((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?xe((function(r){return C(e,r)})):void 0}];var Ee=[function(e){return"function"==typeof e?De(e):void 0},function(e){return e?void 0:xe((function(){return{}}))}];function Se(e,r,t){return J({},t,{},e,{},r)}var Ce=[function(e){return"function"==typeof e?function(e){return function(r,t){t.displayName;var n,i=t.pure,o=t.areMergedPropsEqual,a=!1;return function(r,t,l){var c=e(r,t,l);return a?i&&o(c,n)||(n=c):(a=!0,n=c),n}}}(e):void 0},function(e){return e?void 0:function(){return Se}}];function Oe(e,r,t,n){return function(i,o){return t(e(i,o),r(n,o),o)}}function Pe(e,r,t,n,i){var o,a,l,c,u,s=i.areStatesEqual,d=i.areOwnPropsEqual,p=i.areStatePropsEqual,f=!1;function g(i,f){var g,v,m=!d(f,a),b=!s(i,o);return o=i,a=f,m&&b?(l=e(o,a),r.dependsOnOwnProps&&(c=r(n,a)),u=t(l,c,a)):m?(e.dependsOnOwnProps&&(l=e(o,a)),r.dependsOnOwnProps&&(c=r(n,a)),u=t(l,c,a)):b?(g=e(o,a),v=!p(g,l),l=g,v&&(u=t(l,c,a)),u):u}return function(i,s){return f?g(i,s):(l=e(o=i,a=s),c=r(n,a),u=t(l,c,a),f=!0,u)}}function Ae(e,r){var t=r.initMapStateToProps,n=r.initMapDispatchToProps,i=r.initMergeProps,o=X(r,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=t(e,o),l=n(e,o),c=i(e,o);return(o.pure?Pe:Oe)(a,l,c,e,o)}function Re(e,r,t){for(var n=r.length-1;n>=0;n--){var i=r[n](e);if(i)return i}return function(r,n){throw new Error("Invalid value of type "+typeof e+" for "+t+" argument when connecting component "+n.wrappedComponentName+".")}}function Ne(e,r){return e===r}function Be(e){var r=void 0===e?{}:e,t=r.connectHOC,n=void 0===t?be:t,i=r.mapStateToPropsFactories,o=void 0===i?Ee:i,a=r.mapDispatchToPropsFactories,l=void 0===a?we:a,c=r.mergePropsFactories,u=void 0===c?Ce:c,s=r.selectorFactory,d=void 0===s?Ae:s;return function(e,r,t,i){void 0===i&&(i={});var a=i,c=a.pure,s=void 0===c||c,p=a.areStatesEqual,f=void 0===p?Ne:p,g=a.areOwnPropsEqual,v=void 0===g?ye:g,m=a.areStatePropsEqual,b=void 0===m?ye:m,h=a.areMergedPropsEqual,y=void 0===h?ye:h,x=X(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),I=Re(e,o,"mapStateToProps"),D=Re(r,l,"mapDispatchToProps"),w=Re(t,u,"mergeProps");return n(d,J({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:I,initMapDispatchToProps:D,initMergeProps:w,pure:s,areStatesEqual:f,areOwnPropsEqual:v,areStatePropsEqual:b,areMergedPropsEqual:y},x))}}var Te,Me=Be();function Le(e,t){var n=r.useState((function(){return{inputs:t,result:e()}}))[0],i=r.useRef(n),o=Boolean(t&&i.current.inputs&&function(e,r){if(e.length!==r.length)return!1;for(var t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}(t,i.current.inputs))?i.current:{inputs:t,result:e()};return r.useEffect((function(){i.current=o}),[o]),o.result}Te=t.unstable_batchedUpdates,q=Te;var Ge=Le,_e=function(e,r){return Le((function(){return e}),r)},Fe={x:0,y:0},je=function(e,r){return{x:e.x+r.x,y:e.y+r.y}},ke=function(e,r){return{x:e.x-r.x,y:e.y-r.y}},We=function(e,r){return e.x===r.x&&e.y===r.y},Ue=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},He=function(e,r,t){var n;return void 0===t&&(t=0),(n={})[e]=r,n["x"===e?"y":"x"]=t,n},qe=function(e,r){return Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2))},Ve=function(e,r){return Math.min.apply(Math,r.map((function(r){return qe(e,r)})))},ze=function(e){return function(r){return{x:e(r.x),y:e(r.y)}}};var $e=function(e){var r=e.top,t=e.right,n=e.bottom,i=e.left;return{top:r,right:t,bottom:n,left:i,width:t-i,height:n-r,x:i,y:r,center:{x:(t+i)/2,y:(n+r)/2}}},Ye=function(e,r){return{top:e.top-r.top,left:e.left-r.left,bottom:e.bottom+r.bottom,right:e.right+r.right}},Je=function(e,r){return{top:e.top+r.top,left:e.left+r.left,bottom:e.bottom-r.bottom,right:e.right-r.right}},Xe={top:0,right:0,bottom:0,left:0},Ke=function(e){var r=e.borderBox,t=e.margin,n=void 0===t?Xe:t,i=e.border,o=void 0===i?Xe:i,a=e.padding,l=void 0===a?Xe:a,c=$e(Ye(r,n)),u=$e(Je(r,o)),s=$e(Je(u,l));return{marginBox:c,borderBox:$e(r),paddingBox:u,contentBox:s,margin:n,border:o,padding:l}},Qe=function(e){var r=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var t=Number(r);return isNaN(t)&&function(e,r){if(!e)throw new Error("Invariant failed")}(!1),t},Ze=function(e,r){var t,n,i=e.borderBox,o=e.border,a=e.margin,l=e.padding,c=(n=r,{top:(t=i).top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x});return Ke({borderBox:c,border:o,margin:a,padding:l})},er=function(e,r){return void 0===r&&(r={x:window.pageXOffset,y:window.pageYOffset}),Ze(e,r)},rr=function(e,r){var t={top:Qe(r.marginTop),right:Qe(r.marginRight),bottom:Qe(r.marginBottom),left:Qe(r.marginLeft)},n={top:Qe(r.paddingTop),right:Qe(r.paddingRight),bottom:Qe(r.paddingBottom),left:Qe(r.paddingLeft)},i={top:Qe(r.borderTopWidth),right:Qe(r.borderRightWidth),bottom:Qe(r.borderBottomWidth),left:Qe(r.borderLeftWidth)};return Ke({borderBox:e,margin:t,padding:n,border:i})},tr=function(e){var r=e.getBoundingClientRect(),t=window.getComputedStyle(e);return rr(r,t)},nr=function(e,r){return{top:e.top+r.y,left:e.left+r.x,bottom:e.bottom+r.y,right:e.right+r.x}},ir=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},or=function(e,r){return r&&r.shouldClipSubject?function(e,r){var t=$e({top:Math.max(r.top,e.top),right:Math.min(r.right,e.right),bottom:Math.min(r.bottom,e.bottom),left:Math.max(r.left,e.left)});return t.width<=0||t.height<=0?null:t}(r.pageMarginBox,e):$e(e)},ar=function(e){var r=e.page,t=e.withPlaceholder,n=e.axis,i=e.frame,o=function(e,r,t){var n;return t&&t.increasedBy?l({},e,((n={})[r.end]=e[r.end]+t.increasedBy[r.line],n)):e}(function(e,r){return r?nr(e,r.scroll.diff.displacement):e}(r.marginBox,i),n,t);return{page:r,withPlaceholder:t,active:or(o,i)}},lr=function(e,r){e.frame||s(!1);var t=e.frame,n=ke(r,t.scroll.initial),i=Ue(n),o=l({},t,{scroll:{initial:t.scroll.initial,current:r,diff:{value:n,displacement:i},max:t.scroll.max}});return l({},e,{frame:o,subject:ar({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o})})};function cr(e,r){if(e.length!==r.length)return!1;for(var t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}function ur(e,r){var t;void 0===r&&(r=cr);var n,i=[],o=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return o&&t===this&&r(a,i)?n:(n=e.apply(this,a),o=!0,t=this,i=a,n)}}function sr(e){return Object.values?Object.values(e):Object.keys(e).map((function(r){return e[r]}))}function dr(e,r){if(e.findIndex)return e.findIndex(r);for(var t=0;t<e.length;t++)if(r(e[t]))return t;return-1}function pr(e,r){if(e.find)return e.find(r);var t=dr(e,r);return-1!==t?e[t]:void 0}function fr(e){return Array.prototype.slice.call(e)}var gr=ur((function(e){return e.reduce((function(e,r){return e[r.descriptor.id]=r,e}),{})})),vr=ur((function(e){return e.reduce((function(e,r){return e[r.descriptor.id]=r,e}),{})})),mr=ur((function(e){return sr(e)})),br=ur((function(e){return sr(e)})),hr=ur((function(e,r){return br(r).filter((function(r){return e===r.descriptor.droppableId})).sort((function(e,r){return e.descriptor.index-r.descriptor.index}))}));function yr(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function xr(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Ir=ur((function(e,r){return r.filter((function(r){return r.descriptor.id!==e.descriptor.id}))})),Dr=function(e,r){return e.descriptor.droppableId===r.descriptor.id},wr={point:Fe,value:0},Er={invisible:{},visible:{},all:[]},Sr={displaced:Er,displacedBy:wr,at:null},Cr=function(e,r){return function(t){return e<=t&&t<=r}},Or=function(e){var r=Cr(e.top,e.bottom),t=Cr(e.left,e.right);return function(n){if(r(n.top)&&r(n.bottom)&&t(n.left)&&t(n.right))return!0;var i=r(n.top)||r(n.bottom),o=t(n.left)||t(n.right);if(i&&o)return!0;var a=n.top<e.top&&n.bottom>e.bottom,l=n.left<e.left&&n.right>e.right;return!(!a||!l)||(a&&o||l&&i)}},Pr=function(e){var r=Cr(e.top,e.bottom),t=Cr(e.left,e.right);return function(e){return r(e.top)&&r(e.bottom)&&t(e.left)&&t(e.right)}},Ar={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Rr={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Nr=function(e){var r=e.target,t=e.destination,n=e.viewport,i=e.withDroppableDisplacement,o=e.isVisibleThroughFrameFn,a=i?function(e,r){var t=r.frame?r.frame.scroll.diff.displacement:Fe;return nr(e,t)}(r,t):r;return function(e,r,t){return!!r.subject.active&&t(r.subject.active)(e)}(a,t,o)&&function(e,r,t){return t(r)(e)}(a,n,o)},Br=function(e){return Nr(l({},e,{isVisibleThroughFrameFn:Or}))},Tr=function(e){return Nr(l({},e,{isVisibleThroughFrameFn:Pr}))};function Mr(e){var r=e.afterDragging,t=e.destination,n=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,a=e.last;return r.reduce((function(e,r){var l=function(e,r){var t=e.page.marginBox,n={top:r.point.y,right:0,bottom:0,left:r.point.x};return $e(Ye(t,n))}(r,n),c=r.descriptor.id;if(e.all.push(c),!Br({target:l,destination:t,viewport:i,withDroppableDisplacement:!0}))return e.invisible[r.descriptor.id]=!0,e;var u={draggableId:c,shouldAnimate:function(e,r,t){if("boolean"==typeof t)return t;if(!r)return!0;var n=r.invisible,i=r.visible;if(n[e])return!1;var o=i[e];return!o||o.shouldAnimate}(c,a,o)};return e.visible[c]=u,e}),{all:[],visible:{},invisible:{}})}function Lr(e){var r=e.insideDestination,t=e.inHomeList,n=e.displacedBy,i=e.destination,o=function(e,r){if(!e.length)return 0;var t=e[e.length-1].descriptor.index;return r.inHomeList?t:t+1}(r,{inHomeList:t});return{displaced:Er,displacedBy:n,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Gr(e){var r=e.draggable,t=e.insideDestination,n=e.destination,i=e.viewport,o=e.displacedBy,a=e.last,l=e.index,c=e.forceShouldAnimate,u=Dr(r,n);if(null==l)return Lr({insideDestination:t,inHomeList:u,displacedBy:o,destination:n});var s=pr(t,(function(e){return e.descriptor.index===l}));if(!s)return Lr({insideDestination:t,inHomeList:u,displacedBy:o,destination:n});var d=Ir(r,t),p=t.indexOf(s);return{displaced:Mr({afterDragging:d.slice(p),destination:n,displacedBy:o,last:a,viewport:i.frame,forceShouldAnimate:c}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:l}}}}function _r(e,r){return Boolean(r.effected[e])}var Fr=function(e){var r=e.isMovingForward,t=e.isInHomeList,n=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,l=e.previousImpact,c=e.viewport,u=e.afterCritical,d=l.at;if(d||s(!1),"REORDER"===d.type){var p=function(e){var r=e.isMovingForward,t=e.isInHomeList,n=e.insideDestination,i=e.location;if(!n.length)return null;var o=i.index,a=r?o+1:o-1,l=n[0].descriptor.index,c=n[n.length-1].descriptor.index;return a<l?null:a>(t?c:c+1)?null:a}({isMovingForward:r,isInHomeList:t,location:d.destination,insideDestination:a});return null==p?null:Gr({draggable:n,insideDestination:a,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:p})}var f=function(e){var r=e.isMovingForward,t=e.destination,n=e.draggables,i=e.combine,o=e.afterCritical;if(!t.isCombineEnabled)return null;var a=i.draggableId,l=n[a].descriptor.index;return _r(a,o)?r?l:l-1:r?l+1:l}({isMovingForward:r,destination:o,displaced:l.displaced,draggables:i,combine:d.combine,afterCritical:u});return null==f?null:Gr({draggable:n,insideDestination:a,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:f})},jr=function(e){var r=e.afterCritical,t=e.impact,n=e.draggables,i=xr(t);i||s(!1);var o=i.draggableId,a=n[o].page.borderBox.center,l=function(e){var r=e.displaced,t=e.afterCritical,n=e.combineWith,i=e.displacedBy,o=Boolean(r.visible[n]||r.invisible[n]);return _r(n,t)?o?Fe:Ue(i.point):o?i.point:Fe}({displaced:t.displaced,afterCritical:r,combineWith:o,displacedBy:t.displacedBy});return je(a,l)},kr=function(e,r){return r.margin[e.start]+r.borderBox[e.size]/2},Wr=function(e,r,t){return r[e.crossAxisStart]+t.margin[e.crossAxisStart]+t.borderBox[e.crossAxisSize]/2},Ur=function(e){var r=e.axis,t=e.moveRelativeTo,n=e.isMoving;return He(r.line,t.marginBox[r.end]+kr(r,n),Wr(r,t.marginBox,n))},Hr=function(e){var r=e.axis,t=e.moveRelativeTo,n=e.isMoving;return He(r.line,t.marginBox[r.start]-function(e,r){return r.margin[e.end]+r.borderBox[e.size]/2}(r,n),Wr(r,t.marginBox,n))},qr=function(e){var r=e.impact,t=e.draggable,n=e.draggables,i=e.droppable,o=e.afterCritical,a=hr(i.descriptor.id,n),l=t.page,c=i.axis;if(!a.length)return function(e){var r=e.axis,t=e.moveInto,n=e.isMoving;return He(r.line,t.contentBox[r.start]+kr(r,n),Wr(r,t.contentBox,n))}({axis:c,moveInto:i.page,isMoving:l});var u=r.displaced,s=r.displacedBy,d=u.all[0];if(d){var p=n[d];if(_r(d,o))return Hr({axis:c,moveRelativeTo:p.page,isMoving:l});var f=Ze(p.page,s.point);return Hr({axis:c,moveRelativeTo:f,isMoving:l})}var g=a[a.length-1];if(g.descriptor.id===t.descriptor.id)return l.borderBox.center;if(_r(g.descriptor.id,o)){var v=Ze(g.page,Ue(o.displacedBy.point));return Ur({axis:c,moveRelativeTo:v,isMoving:l})}return Ur({axis:c,moveRelativeTo:g.page,isMoving:l})},Vr=function(e,r){var t=e.frame;return t?je(r,t.scroll.diff.displacement):r},zr=function(e){var r=function(e){var r=e.impact,t=e.draggable,n=e.droppable,i=e.draggables,o=e.afterCritical,a=t.page.borderBox.center,l=r.at;return n&&l?"REORDER"===l.type?qr({impact:r,draggable:t,draggables:i,droppable:n,afterCritical:o}):jr({impact:r,draggables:i,afterCritical:o}):a}(e),t=e.droppable;return t?Vr(t,r):r},$r=function(e,r){var t=ke(r,e.scroll.initial),n=Ue(t);return{frame:$e({top:r.y,bottom:r.y+e.frame.height,left:r.x,right:r.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:r,diff:{value:t,displacement:n}}}};function Yr(e,r){return e.map((function(e){return r[e]}))}var Jr=function(e){var r=e.pageBorderBoxCenter,t=e.draggable,n=function(e,r){return je(e.scroll.diff.displacement,r)}(e.viewport,r),i=ke(n,t.page.borderBox.center);return je(t.client.borderBox.center,i)},Xr=function(e){var r=e.draggable,t=e.destination,n=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,a=e.onlyOnMainAxis,c=void 0!==a&&a,u=ke(n,r.page.borderBox.center),s={target:nr(r.page.borderBox,u),destination:t,withDroppableDisplacement:o,viewport:i};return c?function(e){return Nr(l({},e,{isVisibleThroughFrameFn:(r=e.destination.axis,function(e){var t=Cr(e.top,e.bottom),n=Cr(e.left,e.right);return function(e){return r===Ar?t(e.top)&&t(e.bottom):n(e.left)&&n(e.right)}})}));var r}(s):Tr(s)},Kr=function(e){var r=e.isMovingForward,t=e.draggable,n=e.destination,i=e.draggables,o=e.previousImpact,a=e.viewport,c=e.previousPageBorderBoxCenter,u=e.previousClientSelection,d=e.afterCritical;if(!n.isEnabled)return null;var p=hr(n.descriptor.id,i),f=Dr(t,n),g=function(e){var r=e.isMovingForward,t=e.draggable,n=e.destination,i=e.insideDestination,o=e.previousImpact;if(!n.isCombineEnabled)return null;if(!yr(o))return null;function a(e){var r={type:"COMBINE",combine:{draggableId:e,droppableId:n.descriptor.id}};return l({},o,{at:r})}var c=o.displaced.all,u=c.length?c[0]:null;if(r)return u?a(u):null;var d=Ir(t,i);if(!u)return d.length?a(d[d.length-1].descriptor.id):null;var p=dr(d,(function(e){return e.descriptor.id===u}));-1===p&&s(!1);var f=p-1;return f<0?null:a(d[f].descriptor.id)}({isMovingForward:r,draggable:t,destination:n,insideDestination:p,previousImpact:o})||Fr({isMovingForward:r,isInHomeList:f,draggable:t,draggables:i,destination:n,insideDestination:p,previousImpact:o,viewport:a,afterCritical:d});if(!g)return null;var v=zr({impact:g,draggable:t,droppable:n,draggables:i,afterCritical:d});if(Xr({draggable:t,destination:n,newPageBorderBoxCenter:v,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Jr({pageBorderBoxCenter:v,draggable:t,viewport:a}),impact:g,scrollJumpRequest:null};var m=ke(v,c);return{clientSelection:u,impact:function(e){var r=e.impact,t=e.viewport,n=e.destination,i=e.draggables,o=e.maxScrollChange,a=$r(t,je(t.scroll.current,o)),c=n.frame?lr(n,je(n.frame.scroll.current,o)):n,u=r.displaced,s=Mr({afterDragging:Yr(u.all,i),destination:n,displacedBy:r.displacedBy,viewport:a.frame,last:u,forceShouldAnimate:!1}),d=Mr({afterDragging:Yr(u.all,i),destination:c,displacedBy:r.displacedBy,viewport:t.frame,last:u,forceShouldAnimate:!1}),p={},f={},g=[u,s,d];return u.all.forEach((function(e){var r=function(e,r){for(var t=0;t<r.length;t++){var n=r[t].visible[e];if(n)return n}return null}(e,g);r?f[e]=r:p[e]=!0})),l({},r,{displaced:{all:u.all,invisible:p,visible:f}})}({impact:g,viewport:a,destination:n,draggables:i,maxScrollChange:m}),scrollJumpRequest:m}},Qr=function(e){var r=e.subject.active;return r||s(!1),r},Zr=function(e,r){var t=e.page.borderBox.center;return _r(e.descriptor.id,r)?ke(t,r.displacedBy.point):t},et=function(e,r){var t=e.page.borderBox;return _r(e.descriptor.id,r)?nr(t,Ue(r.displacedBy.point)):t},rt=ur((function(e,r){var t=r[e.line];return{value:t,point:He(e.line,t)}})),tt=function(e,r){return l({},e,{scroll:l({},e.scroll,{max:r})})},nt=function(e,r,t){var n=e.frame;Dr(r,e)&&s(!1),e.subject.withPlaceholder&&s(!1);var i=rt(e.axis,r.displaceBy).point,o=function(e,r,t){var n=e.axis;if("virtual"===e.descriptor.mode)return He(n.line,r[n.line]);var i=e.subject.page.contentBox[n.size],o=hr(e.descriptor.id,t).reduce((function(e,r){return e+r.client.marginBox[n.size]}),0)+r[n.line]-i;return o<=0?null:He(n.line,o)}(e,i,t),a={placeholderSize:i,increasedBy:o,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!n)return l({},e,{subject:ar({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame})});var c=o?je(n.scroll.max,o):n.scroll.max,u=tt(n,c);return l({},e,{subject:ar({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:u}),frame:u})},it=function(e){var r=e.isMovingForward,t=e.previousPageBorderBoxCenter,n=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,l=e.viewport,c=e.afterCritical,u=function(e){var r=e.isMovingForward,t=e.pageBorderBoxCenter,n=e.source,i=e.droppables,o=e.viewport,a=n.subject.active;if(!a)return null;var l=n.axis,c=Cr(a[l.start],a[l.end]),u=mr(i).filter((function(e){return e!==n})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return Or(o.frame)(Qr(e))})).filter((function(e){var t=Qr(e);return r?a[l.crossAxisEnd]<t[l.crossAxisEnd]:t[l.crossAxisStart]<a[l.crossAxisStart]})).filter((function(e){var r=Qr(e),t=Cr(r[l.start],r[l.end]);return c(r[l.start])||c(r[l.end])||t(a[l.start])||t(a[l.end])})).sort((function(e,t){var n=Qr(e)[l.crossAxisStart],i=Qr(t)[l.crossAxisStart];return r?n-i:i-n})).filter((function(e,r,t){return Qr(e)[l.crossAxisStart]===Qr(t[0])[l.crossAxisStart]}));if(!u.length)return null;if(1===u.length)return u[0];var s=u.filter((function(e){return Cr(Qr(e)[l.start],Qr(e)[l.end])(t[l.line])}));return 1===s.length?s[0]:s.length>1?s.sort((function(e,r){return Qr(e)[l.start]-Qr(r)[l.start]}))[0]:u.sort((function(e,r){var n=Ve(t,ir(Qr(e))),i=Ve(t,ir(Qr(r)));return n!==i?n-i:Qr(e)[l.start]-Qr(r)[l.start]}))[0]}({isMovingForward:r,pageBorderBoxCenter:t,source:i,droppables:a,viewport:l});if(!u)return null;var s=hr(u.descriptor.id,o),d=function(e){var r=e.previousPageBorderBoxCenter,t=e.moveRelativeTo,n=e.insideDestination,i=e.draggable,o=e.draggables,a=e.destination,l=e.viewport,c=e.afterCritical;if(!t){if(n.length)return null;var u={displaced:Er,displacedBy:wr,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},s=zr({impact:u,draggable:i,droppable:a,draggables:o,afterCritical:c}),d=Dr(i,a)?a:nt(a,i,o);return Xr({draggable:i,destination:d,newPageBorderBoxCenter:s,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?u:null}var p,f=Boolean(r[a.axis.line]<=t.page.borderBox.center[a.axis.line]),g=(p=t.descriptor.index,t.descriptor.id===i.descriptor.id?p:f?p:p+1),v=rt(a.axis,i.displaceBy);return Gr({draggable:i,insideDestination:n,destination:a,viewport:l,displacedBy:v,last:Er,index:g})}({previousPageBorderBoxCenter:t,destination:u,draggable:n,draggables:o,moveRelativeTo:function(e){var r=e.pageBorderBoxCenter,t=e.viewport,n=e.destination,i=e.insideDestination,o=e.afterCritical;return i.filter((function(e){return Tr({target:et(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})})).sort((function(e,t){var i=qe(r,Vr(n,Zr(e,o))),a=qe(r,Vr(n,Zr(t,o)));return i<a?-1:a<i?1:e.descriptor.index-t.descriptor.index}))[0]||null}({pageBorderBoxCenter:t,viewport:l,destination:u,insideDestination:s,afterCritical:c}),insideDestination:s,viewport:l,afterCritical:c});if(!d)return null;var p=zr({impact:d,draggable:n,droppable:u,draggables:o,afterCritical:c});return{clientSelection:Jr({pageBorderBoxCenter:p,draggable:n,viewport:l}),impact:d,scrollJumpRequest:null}},ot=function(e){var r=e.at;return r?"REORDER"===r.type?r.destination.droppableId:r.combine.droppableId:null},at=function(e){var r=e.state,t=e.type,n=function(e,r){var t=ot(e);return t?r[t]:null}(r.impact,r.dimensions.droppables),i=Boolean(n),o=r.dimensions.droppables[r.critical.droppable.id],a=n||o,l=a.axis.direction,c="vertical"===l&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===l&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(c&&!i)return null;var u="MOVE_DOWN"===t||"MOVE_RIGHT"===t,s=r.dimensions.draggables[r.critical.draggable.id],d=r.current.page.borderBoxCenter,p=r.dimensions,f=p.draggables,g=p.droppables;return c?Kr({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:s,destination:a,draggables:f,viewport:r.viewport,previousClientSelection:r.current.client.selection,previousImpact:r.impact,afterCritical:r.afterCritical}):it({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:s,isOver:a,draggables:f,droppables:g,viewport:r.viewport,afterCritical:r.afterCritical})};function lt(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function ct(e){var r=Cr(e.top,e.bottom),t=Cr(e.left,e.right);return function(e){return r(e.y)&&t(e.x)}}function ut(e){var r=e.pageBorderBox,t=e.draggable,n=e.droppables,i=mr(n).filter((function(e){if(!e.isEnabled)return!1;var t,n,i=e.subject.active;if(!i)return!1;if(n=i,!((t=r).left<n.right&&t.right>n.left&&t.top<n.bottom&&t.bottom>n.top))return!1;if(ct(i)(r.center))return!0;var o=e.axis,a=i.center[o.crossAxisLine],l=r[o.crossAxisStart],c=r[o.crossAxisEnd],u=Cr(i[o.crossAxisStart],i[o.crossAxisEnd]),s=u(l),d=u(c);return!s&&!d||(s?l<a:c>a)}));return i.length?1===i.length?i[0].descriptor.id:function(e){var r=e.pageBorderBox,t=e.draggable,n=e.candidates,i=t.page.borderBox.center,o=n.map((function(e){var t=e.axis,n=He(e.axis.line,r.center[t.line],e.page.borderBox.center[t.crossAxisLine]);return{id:e.descriptor.id,distance:qe(i,n)}})).sort((function(e,r){return r.distance-e.distance}));return o[0]?o[0].id:null}({pageBorderBox:r,draggable:t,candidates:i}):null}var st=function(e,r){return $e(nr(e,r))};function dt(e){var r=e.displaced,t=e.id;return Boolean(r.visible[t]||r.invisible[t])}var pt=function(e){var r=e.pageOffset,t=e.draggable,n=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,l=e.afterCritical,c=st(t.page.borderBox,r),u=ut({pageBorderBox:c,draggable:t,droppables:i});if(!u)return Sr;var s=i[u],d=hr(s.descriptor.id,n),p=function(e,r){var t=e.frame;return t?st(r,t.scroll.diff.value):r}(s,c);return function(e){var r=e.draggable,t=e.pageBorderBoxWithDroppableScroll,n=e.previousImpact,i=e.destination,o=e.insideDestination,a=e.afterCritical;if(!i.isCombineEnabled)return null;var l=i.axis,c=rt(i.axis,r.displaceBy),u=c.value,s=t[l.start],d=t[l.end],p=pr(Ir(r,o),(function(e){var r=e.descriptor.id,t=e.page.borderBox,i=t[l.size]/4,o=_r(r,a),c=dt({displaced:n.displaced,id:r});return o?c?d>t[l.start]+i&&d<t[l.end]-i:s>t[l.start]-u+i&&s<t[l.end]-u-i:c?d>t[l.start]+u+i&&d<t[l.end]+u-i:s>t[l.start]+i&&s<t[l.end]-i}));return p?{displacedBy:c,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:i.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:p,draggable:t,previousImpact:o,destination:s,insideDestination:d,afterCritical:l})||function(e){var r=e.pageBorderBoxWithDroppableScroll,t=e.draggable,n=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,l=e.afterCritical,c=n.axis,u=rt(n.axis,t.displaceBy),s=u.value,d=r[c.start],p=r[c.end],f=function(e){var r=e.draggable,t=e.closest,n=e.inHomeList;return t?n&&t.descriptor.index>r.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:pr(Ir(t,i),(function(e){var r=e.descriptor.id,t=e.page.borderBox.center[c.line],n=_r(r,l),i=dt({displaced:o,id:r});return n?i?p<=t:d<t-s:i?p<=t+s:d<t})),inHomeList:Dr(t,n)});return Gr({draggable:t,insideDestination:i,destination:n,viewport:a,last:o,displacedBy:u,index:f})}({pageBorderBoxWithDroppableScroll:p,draggable:t,destination:s,insideDestination:d,last:o.displaced,viewport:a,afterCritical:l})},ft=function(e,r){var t;return l({},e,((t={})[r.descriptor.id]=r,t))},gt=function(e){var r=e.previousImpact,t=e.impact,n=e.droppables,i=ot(r),o=ot(t);if(!i)return n;if(i===o)return n;var a=n[i];if(!a.subject.withPlaceholder)return n;var c=function(e){var r=e.subject.withPlaceholder;r||s(!1);var t=e.frame;if(!t)return l({},e,{subject:ar({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null})});var n=r.oldFrameMaxScroll;n||s(!1);var i=tt(t,n);return l({},e,{subject:ar({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null}),frame:i})}(a);return ft(n,c)},vt=function(e){var r=e.state,t=e.clientSelection,n=e.dimensions,i=e.viewport,o=e.impact,a=e.scrollJumpRequest,c=i||r.viewport,u=n||r.dimensions,s=t||r.current.client.selection,d=ke(s,r.initial.client.selection),p={offset:d,selection:s,borderBoxCenter:je(r.initial.client.borderBoxCenter,d)},f={selection:je(p.selection,c.scroll.current),borderBoxCenter:je(p.borderBoxCenter,c.scroll.current),offset:je(p.offset,c.scroll.diff.value)},g={client:p,page:f};if("COLLECTING"===r.phase)return l({phase:"COLLECTING"},r,{dimensions:u,viewport:c,current:g});var v=u.draggables[r.critical.draggable.id],m=o||pt({pageOffset:f.offset,draggable:v,draggables:u.draggables,droppables:u.droppables,previousImpact:r.impact,viewport:c,afterCritical:r.afterCritical}),b=function(e){var r=e.draggable,t=e.draggables,n=e.droppables,i=e.previousImpact,o=e.impact,a=gt({previousImpact:i,impact:o,droppables:n}),l=ot(o);if(!l)return a;var c=n[l];if(Dr(r,c))return a;if(c.subject.withPlaceholder)return a;var u=nt(c,r,t);return ft(a,u)}({draggable:v,impact:m,previousImpact:r.impact,draggables:u.draggables,droppables:u.droppables});return l({},r,{current:g,dimensions:{draggables:u.draggables,droppables:b},impact:m,viewport:c,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})};var mt=function(e){var r=e.impact,t=e.viewport,n=e.draggables,i=e.destination,o=e.forceShouldAnimate,a=r.displaced;return l({},r,{displaced:Mr({afterDragging:function(e,r){return e.map((function(e){return r[e]}))}(a.all,n),destination:i,displacedBy:r.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:a})})},bt=function(e){var r=e.impact,t=e.draggable,n=e.droppable,i=e.draggables,o=e.viewport,a=e.afterCritical,l=zr({impact:r,draggable:t,draggables:i,droppable:n,afterCritical:a});return Jr({pageBorderBoxCenter:l,draggable:t,viewport:o})},ht=function(e){var r=e.state,t=e.dimensions,n=e.viewport;"SNAP"!==r.movementMode&&s(!1);var i=r.impact,o=n||r.viewport,a=t||r.dimensions,l=a.draggables,c=a.droppables,u=l[r.critical.draggable.id],d=ot(i);d||s(!1);var p=c[d],f=mt({impact:i,viewport:o,destination:p,draggables:l}),g=bt({impact:f,draggable:u,droppable:p,draggables:l,viewport:o,afterCritical:r.afterCritical});return vt({impact:f,clientSelection:g,state:r,dimensions:a,viewport:o})},yt=function(e){var r=e.draggable,t=e.home,n=e.draggables,i=e.viewport,o=rt(t.axis,r.displaceBy),a=hr(t.descriptor.id,n),l=a.indexOf(r);-1===l&&s(!1);var c,u=a.slice(l+1),d=u.reduce((function(e,r){return e[r.descriptor.id]=!0,e}),{}),p={inVirtualList:"virtual"===t.descriptor.mode,displacedBy:o,effected:d};return{impact:{displaced:Mr({afterDragging:u,destination:t,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(c=r.descriptor,{index:c.index,droppableId:c.droppableId})}},afterCritical:p}},xt=function(e){var r=e.additions,t=e.updatedDroppables,n=e.viewport,i=n.scroll.diff.value;return r.map((function(e){var r=e.descriptor.droppableId,o=function(e){var r=e.frame;return r||s(!1),r}(t[r]).scroll.diff.value;return function(e){var r=e.draggable,t=e.offset,n=e.initialWindowScroll,i=Ze(r.client,t),o=er(i,n);return l({},r,{placeholder:l({},r.placeholder,{client:i}),client:i,page:o})}({draggable:e,offset:je(i,o),initialWindowScroll:n.scroll.initial})}))},It=function(e){return"SNAP"===e.movementMode},Dt=function(e,r,t){var n=function(e,r){return{draggables:e.draggables,droppables:ft(e.droppables,r)}}(e.dimensions,r);return!It(e)||t?vt({state:e,dimensions:n}):ht({state:e,dimensions:n})};function wt(e){return e.isDragging&&"SNAP"===e.movementMode?l({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Et={phase:"IDLE",completed:null,shouldFlush:!1},St=function(e,r){if(void 0===e&&(e=Et),"FLUSH"===r.type)return l({},Et,{shouldFlush:!0});if("INITIAL_PUBLISH"===r.type){"IDLE"!==e.phase&&s(!1);var t=r.payload,n=t.critical,i=t.clientSelection,o=t.viewport,a=t.dimensions,c=t.movementMode,u=a.draggables[n.draggable.id],d=a.droppables[n.droppable.id],p={selection:i,borderBoxCenter:u.client.borderBox.center,offset:Fe},f={client:p,page:{selection:je(p.selection,o.scroll.initial),borderBoxCenter:je(p.selection,o.scroll.initial),offset:je(p.selection,o.scroll.diff.value)}},g=mr(a.droppables).every((function(e){return!e.isFixedOnPage})),v=yt({draggable:u,home:d,draggables:a.draggables,viewport:o}),m=v.impact;return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:c,dimensions:a,initial:f,current:f,isWindowScrollAllowed:g,impact:m,afterCritical:v.afterCritical,onLiftImpact:m,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===r.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&s(!1),l({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===r.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&s(!1),function(e){var r=e.state,t=e.published,n=t.modified.map((function(e){var t=r.dimensions.droppables[e.droppableId];return lr(t,e.scroll)})),i=l({},r.dimensions.droppables,{},gr(n)),o=vr(xt({additions:t.additions,updatedDroppables:i,viewport:r.viewport})),a=l({},r.dimensions.draggables,{},o);t.removals.forEach((function(e){delete a[e]}));var c={droppables:i,draggables:a},u=ot(r.impact),s=u?c.droppables[u]:null,d=c.draggables[r.critical.draggable.id],p=c.droppables[r.critical.droppable.id],f=yt({draggable:d,home:p,draggables:a,viewport:r.viewport}),g=f.impact,v=f.afterCritical,m=s&&s.isCombineEnabled?r.impact:g,b=pt({pageOffset:r.current.page.offset,draggable:c.draggables[r.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:m,viewport:r.viewport,afterCritical:v}),h=l({phase:"DRAGGING"},r,{phase:"DRAGGING",impact:b,onLiftImpact:g,dimensions:c,afterCritical:v,forceShouldAnimate:!1});return"COLLECTING"===r.phase?h:l({phase:"DROP_PENDING"},h,{phase:"DROP_PENDING",reason:r.reason,isWaiting:!1})}({state:e,published:r.payload});if("MOVE"===r.type){if("DROP_PENDING"===e.phase)return e;lt(e)||s(!1);var b=r.payload.client;return We(b,e.current.client.selection)?e:vt({state:e,clientSelection:b,impact:It(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===r.type){if("DROP_PENDING"===e.phase)return wt(e);if("COLLECTING"===e.phase)return wt(e);lt(e)||s(!1);var h=r.payload,y=h.id,x=h.newScroll,I=e.dimensions.droppables[y];if(!I)return e;var D=lr(I,x);return Dt(e,D,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===r.type){if("DROP_PENDING"===e.phase)return e;lt(e)||s(!1);var w=r.payload,E=w.id,S=w.isEnabled,C=e.dimensions.droppables[E];C||s(!1),C.isEnabled===S&&s(!1);var O=l({},C,{isEnabled:S});return Dt(e,O,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===r.type){if("DROP_PENDING"===e.phase)return e;lt(e)||s(!1);var P=r.payload,A=P.id,R=P.isCombineEnabled,N=e.dimensions.droppables[A];N||s(!1),N.isCombineEnabled===R&&s(!1);var B=l({},N,{isCombineEnabled:R});return Dt(e,B,!0)}if("MOVE_BY_WINDOW_SCROLL"===r.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;lt(e)||s(!1),e.isWindowScrollAllowed||s(!1);var T=r.payload.newScroll;if(We(e.viewport.scroll.current,T))return wt(e);var M=$r(e.viewport,T);return It(e)?ht({state:e,viewport:M}):vt({state:e,viewport:M})}if("UPDATE_VIEWPORT_MAX_SCROLL"===r.type){if(!lt(e))return e;var L=r.payload.maxScroll;if(We(L,e.viewport.scroll.max))return e;var G=l({},e.viewport,{scroll:l({},e.viewport.scroll,{max:L})});return l({phase:"DRAGGING"},e,{viewport:G})}if("MOVE_UP"===r.type||"MOVE_DOWN"===r.type||"MOVE_LEFT"===r.type||"MOVE_RIGHT"===r.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&s(!1);var _=at({state:e,type:r.type});return _?vt({state:e,impact:_.impact,clientSelection:_.clientSelection,scrollJumpRequest:_.scrollJumpRequest}):e}if("DROP_PENDING"===r.type){var F=r.payload.reason;return"COLLECTING"!==e.phase&&s(!1),l({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:F})}if("DROP_ANIMATE"===r.type){var j=r.payload,k=j.completed,W=j.dropDuration,U=j.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&s(!1),{phase:"DROP_ANIMATING",completed:k,dropDuration:W,newHomeClientOffset:U,dimensions:e.dimensions}}return"DROP_COMPLETE"===r.type?{phase:"IDLE",completed:r.payload.completed,shouldFlush:!1}:e},Ct=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},Ot=function(){return{type:"COLLECTION_STARTING",payload:null}},Pt=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},At=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},Rt=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},Nt=function(e){return{type:"MOVE",payload:e}},Bt=function(){return{type:"MOVE_UP",payload:null}},Tt=function(){return{type:"MOVE_DOWN",payload:null}},Mt=function(){return{type:"MOVE_RIGHT",payload:null}},Lt=function(){return{type:"MOVE_LEFT",payload:null}},Gt=function(e){return{type:"DROP_COMPLETE",payload:e}},_t=function(e){return{type:"DROP",payload:e}},Ft=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},jt="cubic-bezier(.2,1,.1,1)",kt={drop:0,combining:.7},Wt={drop:.75},Ut=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",Ht={fluid:"opacity "+Ut,snap:"transform "+Ut+", opacity "+Ut,drop:function(e){var r=e+"s "+jt;return"transform "+r+", opacity "+r},outOfTheWay:"transform "+Ut,placeholder:"height "+Ut+", width "+Ut+", margin "+Ut},qt=function(e){return We(e,Fe)?null:"translate("+e.x+"px, "+e.y+"px)"},Vt=qt,zt=function(e,r){var t=qt(e);return t?r?t+" scale("+Wt.drop+")":t:null},$t=.33,Yt=.55,Jt=Yt-$t,Xt=function(e){var r=e.getState,t=e.dispatch;return function(e){return function(n){if("DROP"===n.type){var i=r(),o=n.payload.reason;if("COLLECTING"!==i.phase){if("IDLE"!==i.phase){"DROP_PENDING"===i.phase&&i.isWaiting&&s(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&s(!1);var a=i.critical,c=i.dimensions,u=c.draggables[i.critical.draggable.id],d=function(e){var r=e.draggables,t=e.reason,n=e.lastImpact,i=e.home,o=e.viewport,a=e.onLiftImpact;return n.at&&"DROP"===t?"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:l({},n,{displaced:Er}),didDropInsideDroppable:!0}:{impact:mt({draggables:r,impact:a,destination:i,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:o,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),p=d.impact,f=d.didDropInsideDroppable,g=f?yr(p):null,v=f?xr(p):null,m={index:a.draggable.index,droppableId:a.droppable.id},b={draggableId:u.descriptor.id,type:u.descriptor.type,source:m,reason:o,mode:i.movementMode,destination:g,combine:v},h=function(e){var r=e.impact,t=e.draggable,n=e.dimensions,i=e.viewport,o=e.afterCritical,a=n.draggables,l=n.droppables,c=ot(r),u=c?l[c]:null,s=l[t.descriptor.droppableId],d=bt({impact:r,draggable:t,draggables:a,afterCritical:o,droppable:u||s,viewport:i});return ke(d,t.client.borderBox.center)}({impact:p,draggable:u,dimensions:c,viewport:i.viewport,afterCritical:i.afterCritical}),y={critical:i.critical,afterCritical:i.afterCritical,result:b,impact:p};if(!We(i.current.client.offset,h)||Boolean(b.combine)){var x=function(e){var r=e.current,t=e.destination,n=e.reason,i=qe(r,t);if(i<=0)return $t;if(i>=1500)return Yt;var o=$t+Jt*(i/1500);return Number(("CANCEL"===n?.6*o:o).toFixed(2))}({current:i.current.client.offset,destination:h,reason:o});t(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:h,dropDuration:x,completed:y}))}else t(Gt({completed:y}))}}else t(function(e){return{type:"DROP_PENDING",payload:e}}({reason:o}))}else e(n)}}},Kt=function(e){var r=[],t=null,n=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r=i,t||(t=requestAnimationFrame((function(){t=null,e.apply(void 0,r)})))};return n.cancel=function(){t&&(cancelAnimationFrame(t),t=null)},n},Qt=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Zt(e){var r=e.onWindowScroll;var t=Kt((function(){r(Qt())})),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(r){r.target!==window&&r.target!==window.document||e()}}}(t),i=a;function o(){return i!==a}return{start:function(){o()&&s(!1),i=c(window,[n])},stop:function(){o()||s(!1),t.cancel(),i(),i=a},isActive:o}}var en=function(e){var r=Zt({onWindowScroll:function(r){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:r}})}});return function(e){return function(t){r.isActive()||"INITIAL_PUBLISH"!==t.type||r.start(),r.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(t)&&r.stop(),e(t)}}},rn=function(){var e=[];return{add:function(r){var t=setTimeout((function(){return function(r){var t=dr(e,(function(e){return e.timerId===r}));-1===t&&s(!1),e.splice(t,1)[0].callback()}(t)})),n={timerId:t,callback:r};e.push(n)},flush:function(){if(e.length){var r=[].concat(e);e.length=0,r.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},tn=function(e,r){r()},nn=function(e,r){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:r}},on=function(e,r,t,n){if(e){var i=function(e){var r=!1,t=!1,n=setTimeout((function(){t=!0})),i=function(i){r||t||(r=!0,e(i),clearTimeout(n))};return i.wasCalled=function(){return r},i}(t);e(r,{announce:i}),i.wasCalled()||t(n(r))}else t(n(r))},an=function(e,r){var t=function(e,r){var t=rn(),n=null,i=function(t){n||s(!1),n=null,tn(0,(function(){return on(e().onDragEnd,t,r,y)}))};return{beforeCapture:function(r,t){n&&s(!1),tn(0,(function(){var n=e().onBeforeCapture;n&&n({draggableId:r,mode:t})}))},beforeStart:function(r,t){n&&s(!1),tn(0,(function(){var n=e().onBeforeDragStart;n&&n(nn(r,t))}))},start:function(i,o){n&&s(!1);var a=nn(i,o);n={mode:o,lastCritical:i,lastLocation:a.source,lastCombine:null},t.add((function(){tn(0,(function(){return on(e().onDragStart,a,r,b)}))}))},update:function(i,o){var a=yr(o),c=xr(o);n||s(!1);var u=!function(e,r){if(e===r)return!0;var t=e.draggable.id===r.draggable.id&&e.draggable.droppableId===r.draggable.droppableId&&e.draggable.type===r.draggable.type&&e.draggable.index===r.draggable.index,n=e.droppable.id===r.droppable.id&&e.droppable.type===r.droppable.type;return t&&n}(i,n.lastCritical);u&&(n.lastCritical=i);var d,p,f=(d=n.lastLocation,p=a,!(null==d&&null==p||null!=d&&null!=p&&d.droppableId===p.droppableId&&d.index===p.index));f&&(n.lastLocation=a);var g=!function(e,r){return null==e&&null==r||null!=e&&null!=r&&(e.draggableId===r.draggableId&&e.droppableId===r.droppableId)}(n.lastCombine,c);if(g&&(n.lastCombine=c),u||f||g){var v=l({},nn(i,n.mode),{combine:c,destination:a});t.add((function(){tn(0,(function(){return on(e().onDragUpdate,v,r,h)}))}))}},flush:function(){n||s(!1),t.flush()},drop:i,abort:function(){if(n){var e=l({},nn(n.lastCritical,n.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,r);return function(e){return function(r){return function(n){if("BEFORE_INITIAL_CAPTURE"!==n.type){if("INITIAL_PUBLISH"===n.type){var i=n.payload.critical;return t.beforeStart(i,n.payload.movementMode),r(n),void t.start(i,n.payload.movementMode)}if("DROP_COMPLETE"===n.type){var o=n.payload.completed.result;return t.flush(),r(n),void t.drop(o)}if(r(n),"FLUSH"!==n.type){var a=e.getState();"DRAGGING"===a.phase&&t.update(a.critical,a.impact)}else t.abort()}else t.beforeCapture(n.payload.draggableId,n.payload.movementMode)}}}},ln=function(e){return function(r){return function(t){if("DROP_ANIMATION_FINISHED"===t.type){var n=e.getState();"DROP_ANIMATING"!==n.phase&&s(!1),e.dispatch(Gt({completed:n.completed}))}else r(t)}}},cn=function(e){var r=null,t=null;return function(n){return function(i){if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(t&&(cancelAnimationFrame(t),t=null),r&&(r(),r=null)),n(i),"DROP_ANIMATE"===i.type){var o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};t=requestAnimationFrame((function(){t=null,r=c(window,[o])}))}}}},un=function(e){return function(r){return function(t){if(r(t),"PUBLISH_WHILE_DRAGGING"===t.type){var n=e.getState();"DROP_PENDING"===n.phase&&(n.isWaiting||e.dispatch(_t({reason:n.reason})))}}}},sn=R,dn=function(e){var r,t=e.dimensionMarshal,n=e.focusMarshal,i=e.styleMarshal,o=e.getResponders,a=e.announce,l=e.autoScroller;return E(St,sn(function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(e){return function(){var t=e.apply(void 0,arguments),n=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:t.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=r.map((function(e){return e(i)}));return A({},t,{dispatch:n=R.apply(void 0,o)(t.dispatch)})}}}((r=i,function(){return function(e){return function(t){"INITIAL_PUBLISH"===t.type&&r.dragging(),"DROP_ANIMATE"===t.type&&r.dropping(t.payload.completed.result.reason),"FLUSH"!==t.type&&"DROP_COMPLETE"!==t.type||r.resting(),e(t)}}}),function(e){return function(){return function(r){return function(t){"DROP_COMPLETE"!==t.type&&"FLUSH"!==t.type&&"DROP_ANIMATE"!==t.type||e.stopPublishing(),r(t)}}}}(t),function(e){return function(r){var t=r.getState,n=r.dispatch;return function(r){return function(i){if("LIFT"===i.type){var o=i.payload,a=o.id,l=o.clientSelection,c=o.movementMode,u=t();"DROP_ANIMATING"===u.phase&&n(Gt({completed:u.completed})),"IDLE"!==t().phase&&s(!1),n({type:"FLUSH",payload:null}),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:a,movementMode:c}});var d={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===c}},p=e.startPublishing(d),f=p.critical,g=p.dimensions,v=p.viewport;n(function(e){return{type:"INITIAL_PUBLISH",payload:e}}({critical:f,dimensions:g,clientSelection:l,movementMode:c,viewport:v}))}else r(i)}}}}(t),Xt,ln,cn,un,function(e){return function(r){return function(t){return function(n){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n))return e.stop(),void t(n);if("INITIAL_PUBLISH"===n.type){t(n);var i=r.getState();return"DRAGGING"!==i.phase&&s(!1),void e.start(i)}t(n),e.scroll(r.getState())}}}}(l),en,function(e){var r=!1;return function(){return function(t){return function(n){if("INITIAL_PUBLISH"===n.type)return r=!0,e.tryRecordFocus(n.payload.critical.draggable.id),t(n),void e.tryRestoreFocusRecorded();if(t(n),r){if("FLUSH"===n.type)return r=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===n.type){r=!1;var i=n.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(n),an(o,a))))};var pn=function(e){var r=e.scrollHeight,t=e.scrollWidth,n=e.height,i=e.width,o=ke({x:t,y:r},{x:i,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},fn=function(){var e=document.documentElement;return e||s(!1),e},gn=function(){var e=fn();return pn({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},vn=function(e){var r=e.critical,t=e.scrollOptions,n=e.registry,i=function(){var e=Qt(),r=gn(),t=e.y,n=e.x,i=fn(),o=i.clientWidth,a=i.clientHeight;return{frame:$e({top:t,left:n,right:n+o,bottom:t+a}),scroll:{initial:e,current:e,max:r,diff:{value:Fe,displacement:Fe}}}}(),o=i.scroll.current,a=r.droppable,l=n.droppable.getAllByType(a.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(o,t)})),c=n.draggable.getAllByType(r.draggable.type).map((function(e){return e.getDimension(o)}));return{dimensions:{draggables:vr(c),droppables:gr(l)},critical:r,viewport:i}};function mn(e,r,t){return t.descriptor.id!==r.id&&(t.descriptor.type===r.type&&"virtual"===e.droppable.getById(t.descriptor.droppableId).descriptor.mode)}var bn,hn,yn=function(e,r){var t=null,n=function(e){var r=e.registry,t=e.callbacks,n={additions:{},removals:{},modified:{}},i=null,o=function(){i||(t.collectionStarting(),i=requestAnimationFrame((function(){i=null;var e=n,o=e.additions,a=e.removals,l=e.modified,c=Object.keys(o).map((function(e){return r.draggable.getById(e).getDimension(Fe)})).sort((function(e,r){return e.descriptor.index-r.descriptor.index})),u=Object.keys(l).map((function(e){return{droppableId:e,scroll:r.droppable.getById(e).callbacks.getScrollWhileDragging()}})),s={additions:c,removals:Object.keys(a),modified:u};n={additions:{},removals:{},modified:{}},t.publish(s)})))};return{add:function(e){var r=e.descriptor.id;n.additions[r]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[r]&&delete n.removals[r],o()},remove:function(e){var r=e.descriptor;n.removals[r.id]=!0,n.modified[r.droppableId]=!0,n.additions[r.id]&&delete n.additions[r.id],o()},stop:function(){i&&(cancelAnimationFrame(i),i=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:r.publishWhileDragging,collectionStarting:r.collectionStarting},registry:e}),i=function(r){t||s(!1);var i=t.critical.draggable;"ADDITION"===r.type&&mn(e,i,r.value)&&n.add(r.value),"REMOVAL"===r.type&&mn(e,i,r.value)&&n.remove(r.value)};return{updateDroppableIsEnabled:function(n,i){e.droppable.exists(n)||s(!1),t&&r.updateDroppableIsEnabled({id:n,isEnabled:i})},updateDroppableIsCombineEnabled:function(n,i){t&&(e.droppable.exists(n)||s(!1),r.updateDroppableIsCombineEnabled({id:n,isCombineEnabled:i}))},scrollDroppable:function(r,n){t&&e.droppable.getById(r).callbacks.scroll(n)},updateDroppableScroll:function(n,i){t&&(e.droppable.exists(n)||s(!1),r.updateDroppableScroll({id:n,newScroll:i}))},startPublishing:function(r){t&&s(!1);var n=e.draggable.getById(r.draggableId),o=e.droppable.getById(n.descriptor.droppableId),a={draggable:n.descriptor,droppable:o.descriptor},l=e.subscribe(i);return t={critical:a,unsubscribe:l},vn({critical:a,registry:e,scrollOptions:r.scrollOptions})},stopPublishing:function(){if(t){n.stop();var r=t.critical.droppable;e.droppable.getAllByType(r.type).forEach((function(e){return e.callbacks.dragStopped()})),t.unsubscribe(),t=null}}}},xn=function(e,r){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==r&&"DROP"===e.completed.result.reason)},In=function(e){window.scrollBy(e.x,e.y)},Dn=ur((function(e){return mr(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),wn=function(e){var r=e.center,t=e.destination,n=e.droppables;if(t){var i=n[t];return i.frame?i:null}return function(e,r){return pr(Dn(r),(function(r){return r.frame||s(!1),ct(r.frame.pageMarginBox)(e)}))}(r,n)},En=function(e){var r=e.startOfRange,t=e.endOfRange,n=e.current,i=t-r;return 0===i?0:(n-r)/i},Sn={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(e){return Math.pow(e,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},Cn=Sn.durationDampening.accelerateAt,On=Sn.durationDampening.stopDampeningAt,Pn=function(e){var r=e.configOverride,t=e.distanceToEdge,n=e.dragStartTime,i=e.shouldUseTimeDampening,o=function(e,r,t){if(e>r.startScrollingFrom)return 0;var n=(null==t?void 0:t.maxPixelScroll)||Sn.maxPixelScroll;if(e<=r.maxScrollValueAt)return n;if(e===r.startScrollingFrom)return 1;var i=En({startOfRange:r.maxScrollValueAt,endOfRange:r.startScrollingFrom,current:e}),o=n*Sn.ease(1-i);return Math.ceil(o)}(t,e.thresholds,r);return 0===o?0:i?Math.max(function(e,r,t){var n,i,o=(null==t?void 0:null==(n=t.durationDampening)?void 0:n.accelerateAt)||Cn,a=(null==t?void 0:null==(i=t.durationDampening)?void 0:i.stopDampeningAt)||On,l=(null==t?void 0:t.ease)||Sn.ease,c=r,u=a,s=Date.now()-c;if(s>=a)return e;if(s<o)return 1;var d=e*l(En({startOfRange:o,endOfRange:u,current:s}));return Math.ceil(d)}(o,n,r),1):o},An=function(e){var r=e.axis,t=e.configOverride,n=e.distanceToEdges,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=e.thresholds;return n[r.end]<n[r.start]?Pn({configOverride:t,distanceToEdge:n[r.end],dragStartTime:i,shouldUseTimeDampening:o,thresholds:a}):-1*Pn({configOverride:t,distanceToEdge:n[r.start],dragStartTime:i,shouldUseTimeDampening:o,thresholds:a})},Rn=function(e){var r=e.axis,t=e.bufferMinScroll,n=e.center,i=e.centerInitial,o=e.container,a=e.containerScroll,l=e.distanceToEdges,c=e.thresholds,u=e.windowScrollOffset,s=l[r.end]<c.startScrollingFrom,d=n[r.line]>o[r.size]-c.startScrollingFrom+u[r.line]||s;return{inThresholdStart:n[r.line]<c.startScrollingFrom+u[r.line],inThresholdEnd:d,draggedTowardsStart:n[r.line]<i[r.line]-t,draggedTowardsEnd:n[r.line]>i[r.line]+t,scrolledTowardsStart:a.initial[r.line]>a.current[r.line],scrolledTowardsEnd:a.initial[r.line]<a.current[r.line]}},Nn=function(e){var r=e.bufferMinScroll,t=void 0===r?24:r,n=e.center,i=e.centerInitial,o=e.container,a=e.containerScroll,l=e.distanceToEdges,c=e.scroll,u=function(e){var r=e.bufferMinScroll,t=e.center,n=e.centerInitial,i=e.container,o=e.containerScroll,a=e.distanceToEdges,l=e.thresholdsHorizontal,c=e.thresholdsVertical,u=e.windowScrollOffset;return{xAxis:Rn({axis:Rr,bufferMinScroll:r,center:t,centerInitial:n,container:i,containerScroll:o,distanceToEdges:a,thresholds:l,windowScrollOffset:u}),yAxis:Rn({axis:Ar,bufferMinScroll:r,center:t,centerInitial:n,container:i,containerScroll:o,distanceToEdges:a,thresholds:c,windowScrollOffset:u})}}({bufferMinScroll:t,center:n,centerInitial:i,container:o,containerScroll:a,distanceToEdges:l,thresholdsHorizontal:e.thresholdsHorizontal,thresholdsVertical:e.thresholdsVertical,windowScrollOffset:e.windowScrollOffset}),s=u.xAxis,d=u.yAxis;return s.inThresholdStart?s.draggedTowardsStart||s.scrolledTowardsEnd||(c.x=0):s.inThresholdEnd&&(s.draggedTowardsEnd||s.scrolledTowardsStart||(c.x=0)),d.inThresholdStart?d.draggedTowardsStart||d.scrolledTowardsEnd||(c.y=0):d.inThresholdEnd&&(d.draggedTowardsEnd||d.scrolledTowardsStart||(c.y=0)),c},Bn=function(e,r,t){var n=(null==t?void 0:t.startFromPercentage)||Sn.startFromPercentage,i=(null==t?void 0:t.maxScrollAtPercentage)||Sn.maxScrollAtPercentage;return{startScrollingFrom:e[r.size]*n,maxScrollValueAt:e[r.size]*i}},Tn=ze((function(e){return 0===e?0:e})),Mn=function(e){var r=e.dragStartTime,t=e.container,n=e.containerScroll,i=e.subject,o=e.center,a=e.centerInitial,l=e.shouldUseTimeDampening,c=e.fluidScrollerOptions,u=e.windowScrollOffset,s=void 0===u?Fe:u,d={top:o.y-t.top,right:t.right-o.x,bottom:t.bottom-o.y,left:o.x-t.left},p=Bn(t,Ar,null==c?void 0:c.configOverride),f=Bn(t,Rr,null==c?void 0:c.configOverride),g=An({axis:Ar,configOverride:null==c?void 0:c.configOverride,distanceToEdges:d,dragStartTime:r,shouldUseTimeDampening:l,thresholds:p}),v=An({axis:Rr,configOverride:null==c?void 0:c.configOverride,distanceToEdges:d,dragStartTime:r,shouldUseTimeDampening:l,thresholds:f}),m=Tn({x:v,y:g});if(We(m,Fe))return null;var b=function(e){var r=e.container,t=e.subject,n=e.proposedScroll,i=t.height>r.height,o=t.width>r.width;return o||i?o&&i?null:{x:o?0:n.x,y:i?0:n.y}:n}({container:t,subject:i,proposedScroll:m});if(!b)return null;var h=b;return c&&(c.bufferThresholds&&(h=Nn({bufferMinScroll:null==c?void 0:c.bufferMinScroll,center:o,centerInitial:a,container:t,containerScroll:n,distanceToEdges:d,scroll:h,thresholdsHorizontal:f,thresholdsVertical:p,windowScrollOffset:s})),c.thruGetScroll&&(h=c.thruGetScroll({center:o,centerInitial:a,container:t,containerScroll:n,distanceToEdges:d,scroll:h,thresholdsHorizontal:f,thresholdsVertical:p,windowScrollOffset:s}))),We(h,Fe)?null:h},Ln=ze((function(e){return 0===e?0:e>0?1:-1})),Gn=(bn=function(e,r){return e<0?e:e>r?e-r:0},function(e){var r=e.current,t=e.max,n=e.change,i=je(r,n),o={x:bn(i.x,t.x),y:bn(i.y,t.y)};return We(o,Fe)?null:o}),_n=function(e){var r=e.max,t=e.current,n=e.change,i={x:Math.max(t.x,r.x),y:Math.max(t.y,r.y)},o=Ln(n),a=Gn({max:i,current:t,change:o});return!a||(0!==o.x&&0===a.x||0!==o.y&&0===a.y)},Fn=function(e,r){return _n({current:e.scroll.current,max:e.scroll.max,change:r})},jn=function(e,r){var t=e.frame;return!!t&&_n({current:t.scroll.current,max:t.scroll.max,change:r})},kn=function(e){var r=e.state,t=e.dragStartTime,n=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,a=e.fluidScrollerOptions,l=r.current.page.borderBoxCenter,c=r.initial.page.borderBoxCenter,u=r.dimensions.draggables[r.critical.draggable.id].page.marginBox;if(r.isWindowScrollAllowed){var s=function(e){var r=e.viewport,t=e.subject,n=e.center,i=e.centerInitial,o=e.dragStartTime,a=e.shouldUseTimeDampening,l=e.fluidScrollerOptions,c={x:r.scroll.current.x,y:r.scroll.current.y},u=Mn({dragStartTime:o,container:r.frame,containerScroll:r.scroll,subject:t,center:n,centerInitial:i,shouldUseTimeDampening:a,fluidScrollerOptions:l,windowScrollOffset:c});return u&&Fn(r,u)?u:null}({dragStartTime:t,viewport:r.viewport,subject:u,center:l,centerInitial:c,shouldUseTimeDampening:n,fluidScrollerOptions:a});if(s)return void i(s)}var d=wn({center:l,destination:ot(r.impact),droppables:r.dimensions.droppables});if(d){var p=function(e){var r=e.droppable,t=e.subject,n=e.center,i=e.centerInitial,o=e.dragStartTime,a=e.shouldUseTimeDampening,l=e.fluidScrollerOptions,c=r.frame;if(!c)return null;var u=Mn({dragStartTime:o,container:c.pageMarginBox,containerScroll:c.scroll,subject:t,center:n,centerInitial:i,shouldUseTimeDampening:a,fluidScrollerOptions:l});return u&&jn(r,u)?u:null}({dragStartTime:t,droppable:d,subject:u,center:l,centerInitial:c,shouldUseTimeDampening:n,fluidScrollerOptions:a});p&&o(d.descriptor.id,p)}},Wn=function(e){var r=e.move,t=e.scrollDroppable,n=e.scrollWindow,i=function(e,r){if(!jn(e,r))return r;var n=function(e,r){var t=e.frame;return t&&jn(e,r)?Gn({current:t.scroll.current,max:t.scroll.max,change:r}):null}(e,r);if(!n)return t(e.descriptor.id,r),null;var i=ke(r,n);return t(e.descriptor.id,i),ke(r,i)},o=function(e,r,t){if(!e)return t;if(!Fn(r,t))return t;var i=function(e,r){if(!Fn(e,r))return null;var t=e.scroll.max,n=e.scroll.current;return Gn({current:n,max:t,change:r})}(r,t);if(!i)return n(t),null;var o=ke(t,i);return n(o),ke(t,o)};return function(e){var t=e.scrollJumpRequest;if(t){var n=ot(e.impact);n||s(!1);var a=i(e.dimensions.droppables[n],t);if(a){var l=e.viewport,c=o(e.isWindowScrollAllowed,l,a);c&&function(e,t){var n=je(e.current.client.selection,t);r({client:n})}(e,c)}}}},Un=function(e){var r=e.scrollDroppable,t=e.scrollWindow,n=e.move,i=function(e){var r=e.scrollWindow,t=e.scrollDroppable,n=e.fluidScrollerOptions,i=Kt(r),o=Kt(t),a=null,l=function(e){a||s(!1);var r=a,t=r.shouldUseTimeDampening,l=r.dragStartTime;kn({state:e,scrollWindow:i,scrollDroppable:o,dragStartTime:l,shouldUseTimeDampening:t,fluidScrollerOptions:n})};return{start:function(e){a&&s(!1);var r=Date.now(),t=!1,i=function(){t=!0};kn({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:i,scrollDroppable:i,fluidScrollerOptions:n}),a={dragStartTime:r,shouldUseTimeDampening:t},t&&l(e)},stop:function(){a&&(i.cancel(),o.cancel(),a=null)},scroll:l}}({scrollWindow:t,scrollDroppable:r,fluidScrollerOptions:e.fluidScrollerOptions}),o=Wn({move:n,scrollWindow:t,scrollDroppable:r});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&o(e):i.scroll(e))},start:i.start,stop:i.stop}},Hn={base:hn="data-rbd-drag-handle",draggableId:hn+"-draggable-id",contextId:hn+"-context-id"},qn=function(){var e="data-rbd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Vn=function(){var e="data-rbd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),zn={contextId:"data-rbd-scroll-container-context-id"},$n=function(e,r){return e.map((function(e){var t=e.styles[r];return t?e.selector+" { "+t+" }":""})).join(" ")},Yn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,Jn=function(){var e=document.querySelector("head");return e||s(!1),e},Xn=function(e){var r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.type="text/css",r};function Kn(e,t){var n=Ge((function(){return function(e){var r,t,n,i=(r=e,function(e){return"["+e+'="'+r+'"]'}),o=(t="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:i(Hn.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:t,dragging:"pointer-events: none;",dropAnimating:t}}),a=[(n="\n transition: "+Ht.outOfTheWay+";\n ",{selector:i(qn.contextId),styles:{dragging:n,dropAnimating:n,userCancel:n}}),o,{selector:i(Vn.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:$n(a,"always"),resting:$n(a,"resting"),dragging:$n(a,"dragging"),dropAnimating:$n(a,"dropAnimating"),userCancel:$n(a,"userCancel")}}(e)}),[e]),i=r.useRef(null),o=r.useRef(null),a=_e(ur((function(e){var r=o.current;r||s(!1),r.textContent=e})),[]),l=_e((function(e){var r=i.current;r||s(!1),r.textContent=e}),[]);Yn((function(){(i.current||o.current)&&s(!1);var r=Xn(t),c=Xn(t);return i.current=r,o.current=c,r.setAttribute("data-rbd-always",e),c.setAttribute("data-rbd-dynamic",e),Jn().appendChild(r),Jn().appendChild(c),l(n.always),a(n.resting),function(){var e=function(e){var r=e.current;r||s(!1),Jn().removeChild(r),e.current=null};e(i),e(o)}}),[t,l,a,n.always,n.resting,e]);var c=_e((function(){return a(n.dragging)}),[a,n.dragging]),u=_e((function(e){a("DROP"!==e?n.userCancel:n.dropAnimating)}),[a,n.dropAnimating,n.userCancel]),d=_e((function(){o.current&&a(n.resting)}),[a,n.resting]);return Ge((function(){return{dragging:c,dropping:u,resting:d}}),[c,u,d])}var Qn=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Zn(e){return e instanceof Qn(e).HTMLElement}function ei(e){var t=r.useRef({}),n=r.useRef(null),i=r.useRef(null),o=r.useRef(!1),a=_e((function(e,r){var n={id:e,focus:r};return t.current[e]=n,function(){var r=t.current;r[e]!==n&&delete r[e]}}),[]),l=_e((function(r){var t=function(e,r){var t="["+Hn.contextId+'="'+e+'"]',n=fr(document.querySelectorAll(t));if(!n.length)return null;var i=pr(n,(function(e){return e.getAttribute(Hn.draggableId)===r}));return i&&Zn(i)?i:null}(e,r);t&&t!==document.activeElement&&t.focus()}),[e]),c=_e((function(e,r){n.current===e&&(n.current=r)}),[]),u=_e((function(){i.current||o.current&&(i.current=requestAnimationFrame((function(){i.current=null;var e=n.current;e&&l(e)})))}),[l]),s=_e((function(e){n.current=null;var r=document.activeElement;r&&r.getAttribute(Hn.draggableId)===e&&(n.current=e)}),[]);return Yn((function(){return o.current=!0,function(){o.current=!1;var e=i.current;e&&cancelAnimationFrame(e)}}),[]),Ge((function(){return{register:a,tryRecordFocus:s,tryRestoreFocusRecorded:u,tryShiftRecord:c}}),[a,s,u,c])}function ri(){var e={draggables:{},droppables:{}},r=[];function t(e){r.length&&r.forEach((function(r){return r(e)}))}function n(r){return e.draggables[r]||null}function i(r){return e.droppables[r]||null}return{draggable:{register:function(r){e.draggables[r.descriptor.id]=r,t({type:"ADDITION",value:r})},update:function(r,t){var n=e.draggables[t.descriptor.id];n&&n.uniqueId===r.uniqueId&&(delete e.draggables[t.descriptor.id],e.draggables[r.descriptor.id]=r)},unregister:function(r){var i=r.descriptor.id,o=n(i);o&&r.uniqueId===o.uniqueId&&(delete e.draggables[i],t({type:"REMOVAL",value:r}))},getById:function(e){var r=n(e);return r||s(!1),r},findById:n,exists:function(e){return Boolean(n(e))},getAllByType:function(r){return sr(e.draggables).filter((function(e){return e.descriptor.type===r}))}},droppable:{register:function(r){e.droppables[r.descriptor.id]=r},unregister:function(r){var t=i(r.descriptor.id);t&&r.uniqueId===t.uniqueId&&delete e.droppables[r.descriptor.id]},getById:function(e){var r=i(e);return r||s(!1),r},findById:i,exists:function(e){return Boolean(i(e))},getAllByType:function(r){return sr(e.droppables).filter((function(e){return e.descriptor.type===r}))}},subscribe:function(e){return r.push(e),function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}},clean:function(){e.draggables={},e.droppables={},r.length=0}}}var ti=n.createContext(null),ni=function(){var e=document.body;return e||s(!1),e},ii={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var oi=0,ai={separator:"::"};function li(e,r){return void 0===r&&(r=ai),Ge((function(){return""+e+r.separator+oi++}),[r.separator,e])}var ci=n.createContext(null);function ui(e){var t=r.useRef(e);return r.useEffect((function(){t.current=e})),t}var si,di=((si={})[13]=!0,si[9]=!0,si),pi=function(e){di[e.keyCode]&&e.preventDefault()},fi=function(){var e="visibilitychange";return"undefined"==typeof document?e:pr([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}();var gi,vi={type:"IDLE"};function mi(e){var r=e.cancel,t=e.completed,n=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(e){var r=e.button,t=e.clientX,o=e.clientY;if(0===r){var a={x:t,y:o},l=n();if("DRAGGING"===l.type)return e.preventDefault(),void l.actions.move(a);"PENDING"!==l.type&&s(!1);var c=l.point;if(u=c,d=a,Math.abs(d.x-u.x)>=5||Math.abs(d.y-u.y)>=5){var u,d;e.preventDefault();var p=l.actions.fluidLift(a);i({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(e){var i=n();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()):r()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===n().type&&e.preventDefault(),r()}},{eventName:"keydown",fn:function(e){if("PENDING"!==n().type)return 27===e.keyCode?(e.preventDefault(),void r()):void pi(e);r()}},{eventName:"resize",fn:r},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===n().type&&r()}},{eventName:"webkitmouseforcedown",fn:function(e){var t=n();"IDLE"===t.type&&s(!1),t.actions.shouldRespectForcePress()?r():e.preventDefault()}},{eventName:fi,fn:r}]}function bi(e){var t=r.useRef(vi),n=r.useRef(a),i=Ge((function(){return{eventName:"mousedown",fn:function(r){if(!r.defaultPrevented&&0===r.button&&!(r.ctrlKey||r.metaKey||r.shiftKey||r.altKey)){var t=e.findClosestDraggableId(r);if(t){var i=e.tryGetLock(t,u,{sourceEvent:r});if(i){r.preventDefault();var o={x:r.clientX,y:r.clientY};n.current(),f(i,o)}}}}}}),[e]),o=Ge((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(r){if(!r.defaultPrevented){var t=e.findClosestDraggableId(r);if(t){var n=e.findOptionsForDraggable(t);n&&(n.shouldRespectForcePress||e.canGetLock(t)&&r.preventDefault())}}}}}),[e]),l=_e((function(){n.current=c(window,[o,i],{passive:!1,capture:!0})}),[o,i]),u=_e((function(){"IDLE"!==t.current.type&&(t.current=vi,n.current(),l())}),[l]),d=_e((function(){var e=t.current;u(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[u]),p=_e((function(){var e=mi({cancel:d,completed:u,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=c(window,e,{capture:!0,passive:!1})}),[d,u]),f=_e((function(e,r){"IDLE"!==t.current.type&&s(!1),t.current={type:"PENDING",point:r,actions:e},p()}),[p]);Yn((function(){return l(),function(){n.current()}}),[l])}function hi(){}var yi=((gi={})[34]=!0,gi[33]=!0,gi[36]=!0,gi[35]=!0,gi);function xi(e,r){function t(){r(),e.cancel()}return[{eventName:"keydown",fn:function(n){return 27===n.keyCode?(n.preventDefault(),void t()):32===n.keyCode?(n.preventDefault(),r(),void e.drop()):40===n.keyCode?(n.preventDefault(),void e.moveDown()):38===n.keyCode?(n.preventDefault(),void e.moveUp()):39===n.keyCode?(n.preventDefault(),void e.moveRight()):37===n.keyCode?(n.preventDefault(),void e.moveLeft()):void(yi[n.keyCode]?n.preventDefault():pi(n))}},{eventName:"mousedown",fn:t},{eventName:"mouseup",fn:t},{eventName:"click",fn:t},{eventName:"touchstart",fn:t},{eventName:"resize",fn:t},{eventName:"wheel",fn:t,options:{passive:!0}},{eventName:fi,fn:t}]}function Ii(e){var t=r.useRef(hi),n=Ge((function(){return{eventName:"keydown",fn:function(r){if(!r.defaultPrevented&&32===r.keyCode){var n=e.findClosestDraggableId(r);if(n){var o=e.tryGetLock(n,u,{sourceEvent:r});if(o){r.preventDefault();var a=!0,l=o.snapLift();t.current(),t.current=c(window,xi(l,u),{capture:!0,passive:!1})}}}function u(){a||s(!1),a=!1,t.current(),i()}}}}),[e]),i=_e((function(){t.current=c(window,[n],{passive:!1,capture:!0})}),[n]);Yn((function(){return i(),function(){t.current()}}),[i])}var Di={type:"IDLE"};function wi(e){var t=r.useRef(Di),n=r.useRef(a),i=_e((function(){return t.current}),[]),o=_e((function(e){t.current=e}),[]),l=Ge((function(){return{eventName:"touchstart",fn:function(r){if(!r.defaultPrevented){var t=e.findClosestDraggableId(r);if(t){var i=e.tryGetLock(t,d,{sourceEvent:r});if(i){var o=r.touches[0],a={x:o.clientX,y:o.clientY};n.current(),v(i,a)}}}}}}),[e]),u=_e((function(){n.current=c(window,[l],{capture:!0,passive:!1})}),[l]),d=_e((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(Di),n.current(),u())}),[u,o]),p=_e((function(){var e=t.current;d(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[d]),f=_e((function(){var e={capture:!0,passive:!1},r={cancel:p,completed:d,getPhase:i},t=c(window,function(e){var r=e.cancel,t=e.completed,n=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var t=n();if("DRAGGING"===t.type){t.hasMoved=!0;var i=e.touches[0],o={x:i.clientX,y:i.clientY};e.preventDefault(),t.actions.move(o)}else r()}},{eventName:"touchend",fn:function(e){var i=n();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()):r()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===n().type?(e.preventDefault(),r()):r()}},{eventName:"touchforcechange",fn:function(e){var t=n();"IDLE"===t.type&&s(!1);var i=e.touches[0];if(i&&i.force>=.15){var o=t.actions.shouldRespectForcePress();if("PENDING"!==t.type)return o?t.hasMoved?void e.preventDefault():void r():void e.preventDefault();o&&r()}}},{eventName:fi,fn:r}]}(r),e),o=c(window,function(e){var r=e.cancel,t=e.getPhase;return[{eventName:"orientationchange",fn:r},{eventName:"resize",fn:r},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===t().type?(27===e.keyCode&&e.preventDefault(),r()):r()}},{eventName:fi,fn:r}]}(r),e);n.current=function(){t(),o()}}),[p,i,d]),g=_e((function(){var e=i();"PENDING"!==e.type&&s(!1);var r=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:r,hasMoved:!1})}),[i,o]),v=_e((function(e,r){"IDLE"!==i().type&&s(!1);var t=setTimeout(g,120);o({type:"PENDING",point:r,actions:e,longPressTimerId:t}),f()}),[f,i,o,g]);Yn((function(){return u(),function(){n.current();var e=i();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(Di))}}),[i,u,o]),Yn((function(){return c(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}var Ei={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Si(e,r){var t=r.target;return!!Zn(t)&&function e(r,t){if(null==t)return!1;if(Boolean(Ei[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==r&&e(r,t.parentElement)}(e,t)}var Ci=function(e){return $e(e.getBoundingClientRect()).center};var Oi="undefined"==typeof document?"matches":pr(["matches","msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||"matches";function Pi(e,r){return e.closest?e.closest(r):function e(r,t){return null==r?null:r[Oi](t)?r:e(r.parentElement,t)}(e,r)}function Ai(e,r){var t,n=r.target;if(!((t=n)instanceof Qn(t).Element))return null;var i=Pi(n,function(e){return"["+Hn.contextId+'="'+e+'"]'}(e));return i&&Zn(i)?i:null}function Ri(e){e.preventDefault()}function Ni(e){var r=e.expected,t=e.phase,n=e.isLockActive;e.shouldWarn;return!!n()&&r===t}function Bi(e){var r=e.lockAPI,t=e.store,n=e.registry,i=e.draggableId;if(r.isClaimed())return!1;var o=n.draggable.findById(i);return!!o&&(!!o.options.isEnabled&&!!xn(t.getState(),i))}function Ti(e){var r=e.lockAPI,t=e.contextId,n=e.store,i=e.registry,o=e.draggableId,u=e.forceSensorStop,d=e.sourceEvent;if(!Bi({lockAPI:r,store:n,registry:i,draggableId:o}))return null;var p=i.draggable.getById(o),f=function(e,r){var t="["+qn.contextId+'="'+e+'"]',n=pr(fr(document.querySelectorAll(t)),(function(e){return e.getAttribute(qn.id)===r}));return n&&Zn(n)?n:null}(t,p.descriptor.id);if(!f)return null;if(d&&!p.options.canDragInteractiveElements&&Si(f,d))return null;var g=r.claim(u||a),v="PRE_DRAG";function m(){return p.options.shouldRespectForcePress}function b(){return r.isActive(g)}var h=function(e,r){Ni({expected:e,phase:v,isLockActive:b,shouldWarn:!0})&&n.dispatch(r())}.bind(null,"DRAGGING");function y(e){function t(){r.release(),v="COMPLETED"}function i(r,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){var o=c(window,[{eventName:"click",fn:Ri,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(o)}t(),n.dispatch(_t({reason:r}))}return"PRE_DRAG"!==v&&(t(),"PRE_DRAG"!==v&&s(!1)),n.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),v="DRAGGING",l({isActive:function(){return Ni({expected:"DRAGGING",phase:v,isLockActive:b,shouldWarn:!1})},shouldRespectForcePress:m,drop:function(e){return i("DROP",e)},cancel:function(e){return i("CANCEL",e)}},e.actions)}return{isActive:function(){return Ni({expected:"PRE_DRAG",phase:v,isLockActive:b,shouldWarn:!1})},shouldRespectForcePress:m,fluidLift:function(e){var r=Kt((function(e){h((function(){return Nt({client:e})}))}));return l({},y({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return r.cancel()},actions:{move:r}}),{move:r})},snapLift:function(){var e={moveUp:function(){return h(Bt)},moveRight:function(){return h(Mt)},moveDown:function(){return h(Tt)},moveLeft:function(){return h(Lt)}};return y({liftActionArgs:{id:o,clientSelection:Ci(f),movementMode:"SNAP"},cleanup:a,actions:e})},abort:function(){Ni({expected:"PRE_DRAG",phase:v,isLockActive:b,shouldWarn:!0})&&r.release()}}}var Mi=[bi,Ii,wi];function Li(e){var t=e.contextId,n=e.store,i=e.registry,o=e.customSensors,a=e.enableDefaultSensors,l=[].concat(a?Mi:[],o||[]),c=r.useState((function(){return function(){var e=null;function r(){e||s(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(r){return r===e},claim:function(r){e&&s(!1);var t={abandon:r};return e=t,t},release:r,tryAbandon:function(){e&&(e.abandon(),r())}}}()}))[0],u=_e((function(e,r){e.isDragging&&!r.isDragging&&c.tryAbandon()}),[c]);Yn((function(){var e=n.getState();return n.subscribe((function(){var r=n.getState();u(e,r),e=r}))}),[c,n,u]),Yn((function(){return c.tryAbandon}),[c.tryAbandon]);for(var d=_e((function(e){return Bi({lockAPI:c,registry:i,store:n,draggableId:e})}),[c,i,n]),p=_e((function(e,r,o){return Ti({lockAPI:c,registry:i,contextId:t,store:n,draggableId:e,forceSensorStop:r,sourceEvent:o&&o.sourceEvent?o.sourceEvent:null})}),[t,c,i,n]),f=_e((function(e){return function(e,r){var t=Ai(e,r);return t?t.getAttribute(Hn.draggableId):null}(t,e)}),[t]),g=_e((function(e){var r=i.draggable.findById(e);return r?r.options:null}),[i.draggable]),v=_e((function(){c.isClaimed()&&(c.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[c,n]),m=_e(c.isClaimed,[c]),b=Ge((function(){return{canGetLock:d,tryGetLock:p,findClosestDraggableId:f,findOptionsForDraggable:g,tryReleaseLock:v,isLockClaimed:m}}),[d,p,f,g,v,m]),h=0;h<l.length;h++)l[h](b)}function Gi(e){return e.current||s(!1),e.current}function _i(e){var t=e.contextId,i=e.setCallbacks,o=e.sensors,a=e.nonce,c=e.dragHandleUsageInstructions,u=e.fluidScrollerOptions,s=r.useRef(null),d=ui(e),p=_e((function(){return function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(d.current)}),[d]),f=function(e){var t=Ge((function(){return function(e){return"rbd-announcement-"+e}(e)}),[e]),n=r.useRef(null);return r.useEffect((function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),l(e.style,ii),ni().appendChild(e),function(){setTimeout((function(){var r=ni();r.contains(e)&&r.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),_e((function(e){var r=n.current;r&&(r.textContent=e)}),[])}(t),g=function(e){var t=e.contextId,n=e.text,i=li("hidden-text",{separator:"-"}),o=Ge((function(){return"rbd-hidden-text-"+(e={contextId:t,uniqueId:i}).contextId+"-"+e.uniqueId;var e}),[i,t]);return r.useEffect((function(){var e=document.createElement("div");return e.id=o,e.textContent=n,e.style.display="none",ni().appendChild(e),function(){var r=ni();r.contains(e)&&r.removeChild(e)}}),[o,n]),o}({contextId:t,text:c}),v=Kn(t,a),m=_e((function(e){Gi(s).dispatch(e)}),[]),b=Ge((function(){return C({publishWhileDragging:Ct,updateDroppableScroll:Pt,updateDroppableIsEnabled:At,updateDroppableIsCombineEnabled:Rt,collectionStarting:Ot},m)}),[m]),h=function(){var e=Ge(ri,[]);return r.useEffect((function(){return function(){requestAnimationFrame(e.clean)}}),[e]),e}(),y=Ge((function(){return yn(h,b)}),[h,b]),x=r.useRef(u),I=Ge((function(){return Un(l({scrollWindow:In,scrollDroppable:y.scrollDroppable},C({move:Nt},m),{fluidScrollerOptions:x.current}))}),[y.scrollDroppable,m]),D=ei(t),w=Ge((function(){return dn({announce:f,autoScroller:I,dimensionMarshal:y,focusMarshal:D,getResponders:p,styleMarshal:v})}),[f,I,y,D,p,v]);s.current=w;var E=_e((function(){var e=Gi(s);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),S=_e((function(){var e=Gi(s).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);i(Ge((function(){return{isDragging:S,tryAbort:E}}),[S,E]));var O=_e((function(e){return xn(Gi(s).getState(),e)}),[]),P=_e((function(){return lt(Gi(s).getState())}),[]),A=Ge((function(){return{marshal:y,focus:D,contextId:t,canLift:O,isMovementAllowed:P,dragHandleUsageInstructionsId:g,registry:h,fluidScrollerOptions:u}}),[t,y,g,D,O,P,h,u]);return Li({contextId:t,store:w,registry:h,customSensors:o,enableDefaultSensors:!1!==e.enableDefaultSensors}),r.useEffect((function(){return E}),[E]),n.createElement(ci.Provider,{value:A},n.createElement(Y,{context:ti,store:w},e.children))}var Fi=0;var ji=function(e){return function(r){return e===r}},ki=ji("scroll"),Wi=ji("auto"),Ui=function(e,r){return r(e.overflowX)||r(e.overflowY)},Hi=function e(r){return null==r?null:r===document.body?null:r===document.documentElement?null:function(e){var r=window.getComputedStyle(e),t={overflowX:r.overflowX,overflowY:r.overflowY};return Ui(t,ki)||Ui(t,Wi)}(r)?r:e(r.parentElement)},qi=function(e){return{x:e.scrollLeft,y:e.scrollTop}},Vi=function(e){return{closestScrollable:Hi(e),isFixedOnPage:function e(r){return!!r&&("fixed"===window.getComputedStyle(r).position||e(r.parentElement))}(e)}},zi=function(e){var r=e.ref,t=e.descriptor,n=e.env,i=e.windowScroll,o=e.direction,a=e.isDropDisabled,l=e.isCombineEnabled,c=e.shouldClipSubject,u=n.closestScrollable,s=function(e,r){var t=tr(e);if(!r)return t;if(e!==r)return t;var n=t.paddingBox.top-r.scrollTop,i=t.paddingBox.left-r.scrollLeft,o=n+r.scrollHeight,a=i+r.scrollWidth,l=Ye({top:n,right:a,bottom:o,left:i},t.border);return Ke({borderBox:l,margin:t.margin,border:t.border,padding:t.padding})}(r,u),d=er(s,i),p=function(){if(!u)return null;var e=tr(u),r={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:e,page:er(e,i),scroll:qi(u),scrollSize:r,shouldClipSubject:c}}();return function(e){var r=e.descriptor,t=e.isEnabled,n=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,a=e.client,l=e.page,c=e.closest,u=function(){if(!c)return null;var e=c.scrollSize,r=c.client,t=pn({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:r.paddingBox.height,width:r.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:r,scrollSize:e,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:t,diff:{value:Fe,displacement:Fe}}}}(),s="vertical"===o?Ar:Rr;return{descriptor:r,isCombineEnabled:n,isFixedOnPage:i,axis:s,isEnabled:t,client:a,page:l,frame:u,subject:ar({page:l,withPlaceholder:null,axis:s,frame:u})}}({descriptor:t,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:n.isFixedOnPage,direction:o,client:s,page:d,closest:p})},$i={passive:!1},Yi={passive:!0},Ji=function(e){return e.shouldPublishImmediately?$i:Yi};function Xi(e){var t=r.useContext(e);return t||s(!1),t}var Ki=function(e){return e&&e.env.closestScrollable||null};function Qi(){}var Zi={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},eo=function(e){var r=e.isAnimatingOpenOnMount,t=e.placeholder,n=e.animate,i=function(e){var r=e.isAnimatingOpenOnMount,t=e.placeholder,n=e.animate;return r?Zi:"close"===n?Zi:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin}}({isAnimatingOpenOnMount:r,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==n?Ht.placeholder:null}};var ro=n.memo((function(e){var t=r.useRef(null),i=_e((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),o=e.animate,a=e.onTransitionEnd,l=e.onClose,c=e.contextId,u=r.useState("open"===e.animate),s=u[0],d=u[1];r.useEffect((function(){return s?"open"!==o?(i(),d(!1),Qi):t.current?Qi:(t.current=setTimeout((function(){t.current=null,d(!1)})),i):Qi}),[o,s,i]);var p=_e((function(e){"height"===e.propertyName&&(a(),"close"===o&&l())}),[o,l,a]),f=eo({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return n.createElement(e.placeholder.tagName,{style:f,"data-rbd-placeholder-context-id":c,onTransitionEnd:p,ref:e.innerRef})})),to=n.createContext(null),no=function(e){function r(){for(var r,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(r=e.call.apply(e,[this].concat(n))||this).state={isVisible:Boolean(r.props.on),data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){"close"===r.state.animate&&r.setState({isVisible:!1})},r}return o(r,e),r.getDerivedStateFromProps=function(e,r){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:r.isVisible?{isVisible:!0,data:r.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},r.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},r}(n.PureComponent),io=5e3,oo=4500,ao=function(e,r){return r?Ht.drop(r.duration):e?Ht.snap:Ht.fluid},lo=function(e,r){return e?r?kt.drop:kt.combining:null};function co(e){return"DRAGGING"===e.type?function(e){var r=e.dimension.client,t=e.offset,n=e.combineWith,i=e.dropping,o=Boolean(n),a=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(e),l=Boolean(i),c=l?zt(t,o):Vt(t);return{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:ao(a,i),transform:c,opacity:lo(o,l),zIndex:l?oo:io,pointerEvents:"none"}}(e):{transform:Vt((r=e).offset),transition:r.shouldAnimateDisplacement?null:"none"};var r}function uo(e){var t=li("draggable"),n=e.descriptor,i=e.registry,o=e.getDraggableRef,a=e.canDragInteractiveElements,l=e.shouldRespectForcePress,c=e.isEnabled,u=Ge((function(){return{canDragInteractiveElements:a,shouldRespectForcePress:l,isEnabled:c}}),[a,c,l]),d=_e((function(e){var r=o();return r||s(!1),function(e,r,t){void 0===t&&(t=Fe);var n=window.getComputedStyle(r),i=r.getBoundingClientRect(),o=rr(i,n),a=er(o,t);return{descriptor:e,placeholder:{client:o,tagName:r.tagName.toLowerCase(),display:n.display},displaceBy:{x:o.marginBox.width,y:o.marginBox.height},client:o,page:a}}(n,r,e)}),[n,o]),p=Ge((function(){return{uniqueId:t,descriptor:n,options:u,getDimension:d}}),[n,d,u,t]),f=r.useRef(p),g=r.useRef(!0);Yn((function(){return i.draggable.register(f.current),function(){return i.draggable.unregister(f.current)}}),[i.draggable]),Yn((function(){if(g.current)g.current=!1;else{var e=f.current;f.current=p,i.draggable.update(p,e)}}),[p,i.draggable])}function so(e){e.preventDefault()}var po=function(e,r){return e===r},fo=function(e){var r=e.combine,t=e.destination;return t?t.droppableId:r?r.droppableId:null};function go(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var vo={mapped:{type:"SECONDARY",offset:Fe,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:go(null)}};var mo=Me((function(){var e,r,t,n=(e=ur((function(e,r){return{x:e,y:r}})),r=ur((function(e,r,t,n,i){return{isDragging:!0,isClone:r,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:t,combineWith:n,combineTargetFor:null}})),t=ur((function(e,t,n,i,o,a,l){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:a,mode:t,offset:e,dimension:n,forceShouldAnimate:l,snapshot:r(t,i,o,a,null)}}})),function(n,i){if(n.isDragging){if(n.critical.draggable.id!==i.draggableId)return null;var o=n.current.client.offset,a=n.dimensions.draggables[i.draggableId],l=ot(n.impact),c=(s=n.impact).at&&"COMBINE"===s.at.type?s.at.combine.draggableId:null,u=n.forceShouldAnimate;return t(e(o.x,o.y),n.movementMode,a,i.isClone,l,c,u)}var s;if("DROP_ANIMATING"===n.phase){var d=n.completed;if(d.result.draggableId!==i.draggableId)return null;var p=i.isClone,f=n.dimensions.draggables[i.draggableId],g=d.result,v=g.mode,m=fo(g),b=function(e){return e.combine?e.combine.draggableId:null}(g),h={duration:n.dropDuration,curve:jt,moveTo:n.newHomeClientOffset,opacity:b?kt.drop:null,scale:b?Wt.drop:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:f,dropping:h,draggingOver:m,combineWith:b,mode:v,forceShouldAnimate:null,snapshot:r(v,p,m,b,h)}}}return null}),i=function(){var e=ur((function(e,r){return{x:e,y:r}})),r=ur(go),t=ur((function(e,t,n){return void 0===t&&(t=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:t,shouldAnimateDisplacement:n,snapshot:r(t)}}})),n=function(e){return e?t(Fe,e,!0):null},i=function(r,i,o,a){var l=o.displaced.visible[r],c=Boolean(a.inVirtualList&&a.effected[r]),u=xr(o),s=u&&u.draggableId===r?i:null;if(!l){if(!c)return n(s);if(o.displaced.invisible[r])return null;var d=Ue(a.displacedBy.point),p=e(d.x,d.y);return t(p,s,!0)}if(c)return n(s);var f=o.displacedBy.point,g=e(f.x,f.y);return t(g,s,l.shouldAnimate)};return function(e,r){if(e.isDragging)return e.critical.draggable.id===r.draggableId?null:i(r.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var t=e.completed;return t.result.draggableId===r.draggableId?null:i(r.draggableId,t.result.draggableId,t.impact,t.afterCritical)}return null}}();return function(e,r){return n(e,r)||i(e,r)||vo}}),{dropAnimationFinished:Ft},null,{context:ti,pure:!0,areStatePropsEqual:po})((function(e){var t=r.useRef(null),n=_e((function(e){t.current=e}),[]),i=_e((function(){return t.current}),[]),o=Xi(ci),a=o.contextId,l=o.dragHandleUsageInstructionsId,c=o.registry,u=Xi(to),s=u.type,d=u.droppableId,p=Ge((function(){return{id:e.draggableId,index:e.index,type:s,droppableId:d}}),[e.draggableId,e.index,s,d]),f=e.children,g=e.draggableId,v=e.isEnabled,m=e.shouldRespectForcePress,b=e.canDragInteractiveElements,h=e.isClone,y=e.mapped,x=e.dropAnimationFinished;h||uo(Ge((function(){return{descriptor:p,registry:c,getDraggableRef:i,canDragInteractiveElements:b,shouldRespectForcePress:m,isEnabled:v}}),[p,c,i,b,m,v]));var I=Ge((function(){return v?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":g,"data-rbd-drag-handle-context-id":a,draggable:!1,onDragStart:so}:null}),[a,l,g,v]),D=_e((function(e){"DRAGGING"===y.type&&y.dropping&&"transform"===e.propertyName&&x()}),[x,y]),w=Ge((function(){var e=co(y),r="DRAGGING"===y.type&&y.dropping?D:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":a,"data-rbd-draggable-id":g,style:e,onTransitionEnd:r},dragHandleProps:I}}),[a,I,g,y,D,n]),E=Ge((function(){return{draggableId:p.id,type:p.type,source:{index:p.index,droppableId:p.droppableId}}}),[p.droppableId,p.id,p.index,p.type]);return f(w,y.snapshot,E)}));function bo(e){return Xi(to).isUsingCloneFor!==e.draggableId||e.isClone?n.createElement(mo,e):null}var ho=function(e,r){return e===r.droppable.type},yo=function(e,r){return r.draggables[e.draggable.id]};var xo={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||s(!1),document.body}},Io=Me((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},r=l({},e,{shouldAnimatePlaceholder:!1}),t=ur((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),n=ur((function(n,i,o,a,l,c){var u=l.descriptor.id;if(l.descriptor.droppableId===n){var s=c?{render:c,dragging:t(l.descriptor)}:null,d={isDraggingOver:o,draggingOverWith:o?u:null,draggingFromThisWith:u,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!1,snapshot:d,useClone:s}}if(!i)return r;if(!a)return e;var p={isDraggingOver:o,draggingOverWith:u,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!0,snapshot:p,useClone:null}}));return function(t,i){var o=i.droppableId,a=i.type,l=!i.isDropDisabled,c=i.renderClone;if(t.isDragging){var u=t.critical;if(!ho(a,u))return r;var s=yo(u,t.dimensions),d=ot(t.impact)===o;return n(o,l,d,d,s,c)}if("DROP_ANIMATING"===t.phase){var p=t.completed;if(!ho(a,p.critical))return r;var f=yo(p.critical,t.dimensions);return n(o,l,fo(p.result)===o,ot(p.impact)===o,f,c)}if("IDLE"===t.phase&&t.completed&&!t.shouldFlush){var g=t.completed;if(!ho(a,g.critical))return r;var v=ot(g.impact)===o,m=Boolean(g.impact.at&&"COMBINE"===g.impact.at.type),b=g.critical.droppable.id===o;return v?m?e:r:b?e:r}return r}}),{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:ti,pure:!0,areStatePropsEqual:po})((function(e){var t=r.useContext(ci);t||s(!1);var o=t.contextId,a=t.isMovementAllowed,l=r.useRef(null),c=r.useRef(null),u=e.children,d=e.droppableId,p=e.type,f=e.mode,g=e.direction,v=e.ignoreContainerClipping,m=e.isDropDisabled,b=e.isCombineEnabled,h=e.snapshot,y=e.useClone,x=e.updateViewportMaxScroll,I=e.getContainerForClone,D=_e((function(){return l.current}),[]),w=_e((function(e){l.current=e}),[]),E=(_e((function(){return c.current}),[]),_e((function(e){c.current=e}),[])),S=_e((function(){a()&&x({maxScroll:gn()})}),[a,x]);!function(e){var t=r.useRef(null),n=Xi(ci),i=li("droppable"),o=n.registry,a=n.marshal,l=ui(e),c=Ge((function(){return{id:e.droppableId,type:e.type,mode:e.mode}}),[e.droppableId,e.mode,e.type]),u=r.useRef(c),d=Ge((function(){return ur((function(e,r){t.current||s(!1);var n={x:e,y:r};a.updateDroppableScroll(c.id,n)}))}),[c.id,a]),p=_e((function(){var e=t.current;return e&&e.env.closestScrollable?qi(e.env.closestScrollable):Fe}),[]),f=_e((function(){var e=p();d(e.x,e.y)}),[p,d]),g=Ge((function(){return Kt(f)}),[f]),v=_e((function(){var e=t.current,r=Ki(e);e&&r||s(!1),e.scrollOptions.shouldPublishImmediately?f():g()}),[g,f]),m=_e((function(e,r){t.current&&s(!1);var i=l.current,o=i.getDroppableRef();o||s(!1);var a=Vi(o),u={ref:o,descriptor:c,env:a,scrollOptions:r};t.current=u;var d=zi({ref:o,descriptor:c,env:a,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping}),p=a.closestScrollable;return p&&(p.setAttribute(zn.contextId,n.contextId),p.addEventListener("scroll",v,Ji(u.scrollOptions))),d}),[n.contextId,c,v,l]),b=_e((function(){var e=t.current,r=Ki(e);return e&&r||s(!1),qi(r)}),[]),h=_e((function(){var e=t.current;e||s(!1);var r=Ki(e);t.current=null,r&&(g.cancel(),r.removeAttribute(zn.contextId),r.removeEventListener("scroll",v,Ji(e.scrollOptions)))}),[v,g]),y=_e((function(e){var r=t.current;r||s(!1);var n=Ki(r);n||s(!1),n.scrollTop+=e.y,n.scrollLeft+=e.x}),[]),x=Ge((function(){return{getDimensionAndWatchScroll:m,getScrollWhileDragging:b,dragStopped:h,scroll:y}}),[h,m,b,y]),I=Ge((function(){return{uniqueId:i,descriptor:c,callbacks:x}}),[x,c,i]);Yn((function(){return u.current=I.descriptor,o.droppable.register(I),function(){t.current&&h(),o.droppable.unregister(I)}}),[x,c,h,I,a,o.droppable]),Yn((function(){t.current&&a.updateDroppableIsEnabled(u.current.id,!e.isDropDisabled)}),[e.isDropDisabled,a]),Yn((function(){t.current&&a.updateDroppableIsCombineEnabled(u.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,a])}({droppableId:d,type:p,mode:f,direction:g,isDropDisabled:m,isCombineEnabled:b,ignoreContainerClipping:v,getDroppableRef:D});var C=n.createElement(no,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var r=e.onClose,t=e.data,i=e.animate;return n.createElement(ro,{placeholder:t,onClose:r,innerRef:E,animate:i,contextId:o,onTransitionEnd:S})})),O=Ge((function(){return{innerRef:w,placeholder:C,droppableProps:{"data-rbd-droppable-id":d,"data-rbd-droppable-context-id":o}}}),[o,d,C,w]),P=y?y.dragging.draggableId:null,A=Ge((function(){return{droppableId:d,type:p,isUsingCloneFor:P}}),[d,P,p]);return n.createElement(to.Provider,{value:A},u(O,h),function(){if(!y)return null;var e=y.dragging,r=y.render,t=n.createElement(bo,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(t,n){return r(t,n,e)}));return i.createPortal(t,I())}())}));Io.defaultProps=xo,e.DragDropContext=function(e){var r=Ge((function(){return""+Fi++}),[]),t=e.dragHandleUsageInstructions||m;return n.createElement(d,null,(function(i){return n.createElement(_i,{nonce:e.nonce,contextId:r,setCallbacks:i,dragHandleUsageInstructions:t,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,fluidScrollerOptions:e.fluidScrollerOptions},e.children)}))},e.Draggable=function(e){var r="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,t=Boolean(e.disableInteractiveElementBlocking),i=Boolean(e.shouldRespectForcePress);return n.createElement(bo,l({},e,{isClone:!1,isEnabled:r,canDragInteractiveElements:t,shouldRespectForcePress:i}))},e.Droppable=Io,e.resetServerContext=function(){Fi=0,oi=0},e.useKeyboardSensor=Ii,e.useMouseSensor=bi,e.useTouchSensor=wi,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],r):r((e=e||self).ReactBeautifulDnd={},e.React,e.ReactDOM)}(this,(function(e,r,t){"use strict";var n="default"in r?r.default:r,i="default"in t?t.default:t;function o(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r}function a(){}function l(){return(l=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function c(e,r,t){var n=r.map((function(r){var n,i,o=(n=t,i=r.options,l({},n,{},i));return e.addEventListener(r.eventName,r.fn,o),function(){e.removeEventListener(r.eventName,r.fn,o)}}));return function(){n.forEach((function(e){e()}))}}function u(e){this.message=e}function s(e,r){if(!e)throw new u("Invariant failed")}u.prototype.toString=function(){return this.message};var d=function(e){function r(){for(var r,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(r=e.call.apply(e,[this].concat(n))||this).callbacks=null,r.unbind=a,r.onWindowError=function(e){var t=r.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof u&&e.preventDefault()},r.getCallbacks=function(){if(!r.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return r.callbacks},r.setCallbacks=function(e){r.callbacks=e},r}o(r,e);var t=r.prototype;return t.componentDidMount=function(){this.unbind=c(window,[{eventName:"error",fn:this.onWindowError}])},t.componentDidCatch=function(e){if(!(e instanceof u))throw e;this.setState({})},t.componentWillUnmount=function(){this.unbind()},t.render=function(){return this.props.children(this.setCallbacks)},r}(n.Component),p=function(e){return e+1},f=function(e,r){var t=e.droppableId===r.droppableId,n=p(e.index),i=p(r.index);return t?"\n You have moved the item from position "+n+"\n to position "+i+"\n ":"\n You have moved the item from position "+n+"\n in list "+e.droppableId+"\n to list "+r.droppableId+"\n in position "+i+"\n "},g=function(e,r,t){return r.droppableId===t.droppableId?"\n The item "+e+"\n has been combined with "+t.draggableId:"\n The item "+e+"\n in list "+r.droppableId+"\n has been combined with "+t.draggableId+"\n in list "+t.droppableId+"\n "},v=function(e){return"\n The item has returned to its starting position\n of "+p(e.index)+"\n"},m="\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",b=function(e){return"\n You have lifted an item in position "+p(e.source.index)+"\n"},h=function(e){var r=e.destination;if(r)return f(e.source,r);var t=e.combine;return t?g(e.draggableId,e.source,t):"You are over an area that cannot be dropped on"},y=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+v(e.source)+"\n ";var r=e.destination,t=e.combine;return r?"\n You have dropped the item.\n "+f(e.source,r)+"\n ":t?"\n You have dropped the item.\n "+g(e.draggableId,e.source,t)+"\n ":"\n The item has been dropped while not over a drop area.\n "+v(e.source)+"\n "};var x=function(e){var r,t=e.Symbol;return"function"==typeof t?t.observable?r=t.observable:(r=t("observable"),t.observable=r):r="@@observable",r}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),I=function(){return Math.random().toString(36).substring(7).split("").join(".")},D={INIT:"@@redux/INIT"+I(),REPLACE:"@@redux/REPLACE"+I(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+I()}};function w(e){if("object"!=typeof e||null===e)return!1;for(var r=e;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function E(e,r,t){var n;if("function"==typeof r&&"function"==typeof t||"function"==typeof t&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof r&&void 0===t&&(t=r,r=void 0),void 0!==t){if("function"!=typeof t)throw new Error("Expected the enhancer to be a function.");return t(E)(e,r)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var i=e,o=r,a=[],l=a,c=!1;function u(){l===a&&(l=a.slice())}function s(){if(c)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(c)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var r=!0;return u(),l.push(e),function(){if(r){if(c)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");r=!1,u();var t=l.indexOf(e);l.splice(t,1),a=null}}}function p(e){if(!w(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw new Error("Reducers may not dispatch actions.");try{c=!0,o=i(o,e)}finally{c=!1}for(var r=a=l,t=0;t<r.length;t++){(0,r[t])()}return e}function f(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");i=e,p({type:D.REPLACE})}function g(){var e,r=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function t(){e.next&&e.next(s())}return t(),{unsubscribe:r(t)}}})[x]=function(){return this},e}return p({type:D.INIT}),(n={dispatch:p,subscribe:d,getState:s,replaceReducer:f})[x]=g,n}function S(e,r){return function(){return r(e.apply(this,arguments))}}function C(e,r){if("function"==typeof e)return S(e,r);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var t={};for(var n in e){var i=e[n];"function"==typeof i&&(t[n]=S(i,r))}return t}function O(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function P(e,r){var t=Object.keys(e);return Object.getOwnPropertySymbols&&t.push.apply(t,Object.getOwnPropertySymbols(e)),r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t}function A(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?P(t,!0).forEach((function(r){O(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(t).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function R(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return 0===r.length?function(e){return e}:1===r.length?r[0]:r.reduce((function(e,r){return function(){return e(r.apply(void 0,arguments))}}))}function N(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function B(e,r){return e(r={exports:{}},r.exports),r.exports}var T=B((function(e,r){Object.defineProperty(r,"__esModule",{value:!0});var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,i=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,l=t?Symbol.for("react.profiler"):60114,c=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,g=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.fundamental"):60117,h=t?Symbol.for("react.responder"):60118,y=t?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var r=e.$$typeof;switch(r){case n:switch(e=e.type){case s:case d:case o:case l:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case m:case v:case c:return e;default:return r}}case i:return r}}}function I(e){return x(e)===d}r.typeOf=x,r.AsyncMode=s,r.ConcurrentMode=d,r.ContextConsumer=u,r.ContextProvider=c,r.Element=n,r.ForwardRef=p,r.Fragment=o,r.Lazy=m,r.Memo=v,r.Portal=i,r.Profiler=l,r.StrictMode=a,r.Suspense=f,r.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===a||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===c||e.$$typeof===u||e.$$typeof===p||e.$$typeof===b||e.$$typeof===h||e.$$typeof===y)},r.isAsyncMode=function(e){return I(e)||x(e)===s},r.isConcurrentMode=I,r.isContextConsumer=function(e){return x(e)===u},r.isContextProvider=function(e){return x(e)===c},r.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},r.isForwardRef=function(e){return x(e)===p},r.isFragment=function(e){return x(e)===o},r.isLazy=function(e){return x(e)===m},r.isMemo=function(e){return x(e)===v},r.isPortal=function(e){return x(e)===i},r.isProfiler=function(e){return x(e)===l},r.isStrictMode=function(e){return x(e)===a},r.isSuspense=function(e){return x(e)===f}}));N(T);T.typeOf,T.AsyncMode,T.ConcurrentMode,T.ContextConsumer,T.ContextProvider,T.Element,T.ForwardRef,T.Fragment,T.Lazy,T.Memo,T.Portal,T.Profiler,T.StrictMode,T.Suspense,T.isValidElementType,T.isAsyncMode,T.isConcurrentMode,T.isContextConsumer,T.isContextProvider,T.isElement,T.isForwardRef,T.isFragment,T.isLazy,T.isMemo,T.isPortal,T.isProfiler,T.isStrictMode,T.isSuspense;var M=B((function(e,r){}));N(M);M.typeOf,M.AsyncMode,M.ConcurrentMode,M.ContextConsumer,M.ContextProvider,M.Element,M.ForwardRef,M.Fragment,M.Lazy,M.Memo,M.Portal,M.Profiler,M.StrictMode,M.Suspense,M.isValidElementType,M.isAsyncMode,M.isConcurrentMode,M.isContextConsumer,M.isContextProvider,M.isElement,M.isForwardRef,M.isFragment,M.isLazy,M.isMemo,M.isPortal,M.isProfiler,M.isStrictMode,M.isSuspense;var L=B((function(e){e.exports=T})),G=(L.isValidElementType,L.isContextConsumer),_=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;function k(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}})()&&Object.assign,Function.call.bind(Object.prototype.hasOwnProperty);function W(){}function U(){}U.resetWarningCache=W;B((function(e){e.exports=function(){function e(e,r,t,n,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function r(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:U,resetWarningCache:W};return t.PropTypes=t,t}()}));var H=n.createContext(null);var q=function(e){e()},V=function(){return q},z={notify:function(){}};var $=function(){function e(e,r){this.store=e,this.parentSub=r,this.unsubscribe=null,this.listeners=z,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var r=e.prototype;return r.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},r.notifyNestedSubs=function(){this.listeners.notify()},r.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},r.isSubscribed=function(){return Boolean(this.unsubscribe)},r.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=V(),r=null,t=null;return{clear:function(){r=null,t=null},notify:function(){e((function(){for(var e=r;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],t=r;t;)e.push(t),t=t.next;return e},subscribe:function(e){var n=!0,i=t={callback:e,next:null,prev:t};return i.prev?i.prev.next=i:r=i,function(){n&&null!==r&&(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:r=i.next)}}}}())},r.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=z)},e}();function Y(e){var t=e.store,i=e.context,o=e.children,a=r.useMemo((function(){var e=new $(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),l=r.useMemo((function(){return t.getState()}),[t]);r.useEffect((function(){var e=a.subscription;return e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[a,l]);var c=i||H;return n.createElement(c.Provider,{value:a},o)}function J(){return(J=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function X(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}var K={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Q={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Z={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ee={};function re(e){return L.isMemo(e)?Z:ee[e.$$typeof]||K}ee[L.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ee[L.Memo]=Z;var te=Object.defineProperty,ne=Object.getOwnPropertyNames,ie=Object.getOwnPropertySymbols,oe=Object.getOwnPropertyDescriptor,ae=Object.getPrototypeOf,le=Object.prototype;var ce=function e(r,t,n){if("string"!=typeof t){if(le){var i=ae(t);i&&i!==le&&e(r,i,n)}var o=ne(t);ie&&(o=o.concat(ie(t)));for(var a=re(r),l=re(t),c=0;c<o.length;++c){var u=o[c];if(!(Q[u]||n&&n[u]||l&&l[u]||a&&a[u])){var s=oe(t,u);try{te(r,u,s)}catch(e){}}}}return r},ue="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,se=[],de=[null,null];function pe(e,r){var t=e[1];return[r.payload,t+1]}function fe(e,r,t){ue((function(){return e.apply(void 0,r)}),t)}function ge(e,r,t,n,i,o,a){e.current=n,r.current=i,t.current=!1,o.current&&(o.current=null,a())}function ve(e,r,t,n,i,o,a,l,c,u){if(e){var s=!1,d=null,p=function(){if(!s){var e,t,p=r.getState();try{e=n(p,i.current)}catch(e){t=e,d=e}t||(d=null),e===o.current?a.current||c():(o.current=e,l.current=e,a.current=!0,u({type:"STORE_UPDATED",payload:{error:t}}))}};t.onStateChange=p,t.trySubscribe(),p();return function(){if(s=!0,t.tryUnsubscribe(),t.onStateChange=null,d)throw d}}}var me=function(){return[null,0]};function be(e,t){void 0===t&&(t={});var i=t,o=i.getDisplayName,a=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,l=i.methodName,c=void 0===l?"connectAdvanced":l,u=i.renderCountProp,s=void 0===u?void 0:u,d=i.shouldHandleStateChanges,p=void 0===d||d,f=i.storeKey,g=void 0===f?"store":f,v=(i.withRef,i.forwardRef),m=void 0!==v&&v,b=i.context,h=void 0===b?H:b,y=X(i,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),x=h;return function(t){var i=t.displayName||t.name||"Component",o=a(i),l=J({},y,{getDisplayName:a,methodName:c,renderCountProp:s,shouldHandleStateChanges:p,storeKey:g,displayName:o,wrappedComponentName:i,WrappedComponent:t}),u=y.pure;var d=u?r.useMemo:function(e){return e()};function f(i){var o=r.useMemo((function(){var e=i.forwardedRef,r=X(i,["forwardedRef"]);return[i.context,e,r]}),[i]),a=o[0],c=o[1],u=o[2],s=r.useMemo((function(){return a&&a.Consumer&&G(n.createElement(a.Consumer,null))?a:x}),[a,x]),f=r.useContext(s),g=Boolean(i.store)&&Boolean(i.store.getState)&&Boolean(i.store.dispatch),v=(Boolean(f)&&Boolean(f.store),g?i.store:f.store),m=r.useMemo((function(){return function(r){return e(r.dispatch,l)}(v)}),[v]),b=r.useMemo((function(){if(!p)return de;var e=new $(v,g?null:f.subscription),r=e.notifyNestedSubs.bind(e);return[e,r]}),[v,g,f]),h=b[0],y=b[1],I=r.useMemo((function(){return g?f:J({},f,{subscription:h})}),[g,f,h]),D=r.useReducer(pe,se,me),w=D[0][0],E=D[1];if(w&&w.error)throw w.error;var S=r.useRef(),C=r.useRef(u),O=r.useRef(),P=r.useRef(!1),A=d((function(){return O.current&&u===C.current?O.current:m(v.getState(),u)}),[v,w,u]);fe(ge,[C,S,P,u,A,O,y]),fe(ve,[p,v,h,m,C,S,P,O,y,E],[v,h,m]);var R=r.useMemo((function(){return n.createElement(t,J({},A,{ref:c}))}),[c,t,A]);return r.useMemo((function(){return p?n.createElement(s.Provider,{value:I},R):R}),[s,R,I])}var v=u?n.memo(f):f;if(v.WrappedComponent=t,v.displayName=o,m){var b=n.forwardRef((function(e,r){return n.createElement(v,J({},e,{forwardedRef:r}))}));return b.displayName=o,b.WrappedComponent=t,ce(b,t)}return ce(v,t)}}function he(e,r){return e===r?0!==e||0!==r||1/e==1/r:e!=e&&r!=r}function ye(e,r){if(he(e,r))return!0;if("object"!=typeof e||null===e||"object"!=typeof r||null===r)return!1;var t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(!Object.prototype.hasOwnProperty.call(r,t[i])||!he(e[t[i]],r[t[i]]))return!1;return!0}function xe(e){return function(r,t){var n=e(r,t);function i(){return n}return i.dependsOnOwnProps=!1,i}}function Ie(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function De(e,r){return function(r,t){t.displayName;var n=function(e,r){return n.dependsOnOwnProps?n.mapToProps(e,r):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(r,t){n.mapToProps=e,n.dependsOnOwnProps=Ie(e);var i=n(r,t);return"function"==typeof i&&(n.mapToProps=i,n.dependsOnOwnProps=Ie(i),i=n(r,t)),i},n}}var we=[function(e){return"function"==typeof e?De(e):void 0},function(e){return e?void 0:xe((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?xe((function(r){return C(e,r)})):void 0}];var Ee=[function(e){return"function"==typeof e?De(e):void 0},function(e){return e?void 0:xe((function(){return{}}))}];function Se(e,r,t){return J({},t,{},e,{},r)}var Ce=[function(e){return"function"==typeof e?function(e){return function(r,t){t.displayName;var n,i=t.pure,o=t.areMergedPropsEqual,a=!1;return function(r,t,l){var c=e(r,t,l);return a?i&&o(c,n)||(n=c):(a=!0,n=c),n}}}(e):void 0},function(e){return e?void 0:function(){return Se}}];function Oe(e,r,t,n){return function(i,o){return t(e(i,o),r(n,o),o)}}function Pe(e,r,t,n,i){var o,a,l,c,u,s=i.areStatesEqual,d=i.areOwnPropsEqual,p=i.areStatePropsEqual,f=!1;function g(i,f){var g,v,m=!d(f,a),b=!s(i,o);return o=i,a=f,m&&b?(l=e(o,a),r.dependsOnOwnProps&&(c=r(n,a)),u=t(l,c,a)):m?(e.dependsOnOwnProps&&(l=e(o,a)),r.dependsOnOwnProps&&(c=r(n,a)),u=t(l,c,a)):b?(g=e(o,a),v=!p(g,l),l=g,v&&(u=t(l,c,a)),u):u}return function(i,s){return f?g(i,s):(l=e(o=i,a=s),c=r(n,a),u=t(l,c,a),f=!0,u)}}function Ae(e,r){var t=r.initMapStateToProps,n=r.initMapDispatchToProps,i=r.initMergeProps,o=X(r,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=t(e,o),l=n(e,o),c=i(e,o);return(o.pure?Pe:Oe)(a,l,c,e,o)}function Re(e,r,t){for(var n=r.length-1;n>=0;n--){var i=r[n](e);if(i)return i}return function(r,n){throw new Error("Invalid value of type "+typeof e+" for "+t+" argument when connecting component "+n.wrappedComponentName+".")}}function Ne(e,r){return e===r}function Be(e){var r=void 0===e?{}:e,t=r.connectHOC,n=void 0===t?be:t,i=r.mapStateToPropsFactories,o=void 0===i?Ee:i,a=r.mapDispatchToPropsFactories,l=void 0===a?we:a,c=r.mergePropsFactories,u=void 0===c?Ce:c,s=r.selectorFactory,d=void 0===s?Ae:s;return function(e,r,t,i){void 0===i&&(i={});var a=i,c=a.pure,s=void 0===c||c,p=a.areStatesEqual,f=void 0===p?Ne:p,g=a.areOwnPropsEqual,v=void 0===g?ye:g,m=a.areStatePropsEqual,b=void 0===m?ye:m,h=a.areMergedPropsEqual,y=void 0===h?ye:h,x=X(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),I=Re(e,o,"mapStateToProps"),D=Re(r,l,"mapDispatchToProps"),w=Re(t,u,"mergeProps");return n(d,J({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:I,initMapDispatchToProps:D,initMergeProps:w,pure:s,areStatesEqual:f,areOwnPropsEqual:v,areStatePropsEqual:b,areMergedPropsEqual:y},x))}}var Te,Me=Be();function Le(e,t){var n=r.useState((function(){return{inputs:t,result:e()}}))[0],i=r.useRef(n),o=Boolean(t&&i.current.inputs&&function(e,r){if(e.length!==r.length)return!1;for(var t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}(t,i.current.inputs))?i.current:{inputs:t,result:e()};return r.useEffect((function(){i.current=o}),[o]),o.result}Te=t.unstable_batchedUpdates,q=Te;var Ge=Le,_e=function(e,r){return Le((function(){return e}),r)},Fe={x:0,y:0},je=function(e,r){return{x:e.x+r.x,y:e.y+r.y}},ke=function(e,r){return{x:e.x-r.x,y:e.y-r.y}},We=function(e,r){return e.x===r.x&&e.y===r.y},Ue=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},He=function(e,r,t){var n;return void 0===t&&(t=0),(n={})[e]=r,n["x"===e?"y":"x"]=t,n},qe=function(e,r){return Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2))},Ve=function(e,r){return Math.min.apply(Math,r.map((function(r){return qe(e,r)})))},ze=function(e){return function(r){return{x:e(r.x),y:e(r.y)}}};var $e=function(e){var r=e.top,t=e.right,n=e.bottom,i=e.left;return{top:r,right:t,bottom:n,left:i,width:t-i,height:n-r,x:i,y:r,center:{x:(t+i)/2,y:(n+r)/2}}},Ye=function(e,r){return{top:e.top-r.top,left:e.left-r.left,bottom:e.bottom+r.bottom,right:e.right+r.right}},Je=function(e,r){return{top:e.top+r.top,left:e.left+r.left,bottom:e.bottom-r.bottom,right:e.right-r.right}},Xe={top:0,right:0,bottom:0,left:0},Ke=function(e){var r=e.borderBox,t=e.margin,n=void 0===t?Xe:t,i=e.border,o=void 0===i?Xe:i,a=e.padding,l=void 0===a?Xe:a,c=$e(Ye(r,n)),u=$e(Je(r,o)),s=$e(Je(u,l));return{marginBox:c,borderBox:$e(r),paddingBox:u,contentBox:s,margin:n,border:o,padding:l}},Qe=function(e){var r=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var t=Number(r);return isNaN(t)&&function(e,r){if(!e)throw new Error("Invariant failed")}(!1),t},Ze=function(e,r){var t,n,i=e.borderBox,o=e.border,a=e.margin,l=e.padding,c=(n=r,{top:(t=i).top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x});return Ke({borderBox:c,border:o,margin:a,padding:l})},er=function(e,r){return void 0===r&&(r={x:window.pageXOffset,y:window.pageYOffset}),Ze(e,r)},rr=function(e,r){var t={top:Qe(r.marginTop),right:Qe(r.marginRight),bottom:Qe(r.marginBottom),left:Qe(r.marginLeft)},n={top:Qe(r.paddingTop),right:Qe(r.paddingRight),bottom:Qe(r.paddingBottom),left:Qe(r.paddingLeft)},i={top:Qe(r.borderTopWidth),right:Qe(r.borderRightWidth),bottom:Qe(r.borderBottomWidth),left:Qe(r.borderLeftWidth)};return Ke({borderBox:e,margin:t,padding:n,border:i})},tr=function(e){var r=e.getBoundingClientRect(),t=window.getComputedStyle(e);return rr(r,t)},nr=function(e,r){return{top:e.top+r.y,left:e.left+r.x,bottom:e.bottom+r.y,right:e.right+r.x}},ir=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},or=function(e,r){return r&&r.shouldClipSubject?function(e,r){var t=$e({top:Math.max(r.top,e.top),right:Math.min(r.right,e.right),bottom:Math.min(r.bottom,e.bottom),left:Math.max(r.left,e.left)});return t.width<=0||t.height<=0?null:t}(r.pageMarginBox,e):$e(e)},ar=function(e){var r=e.page,t=e.withPlaceholder,n=e.axis,i=e.frame,o=function(e,r,t){var n;return t&&t.increasedBy?l({},e,((n={})[r.end]=e[r.end]+t.increasedBy[r.line],n)):e}(function(e,r){return r?nr(e,r.scroll.diff.displacement):e}(r.marginBox,i),n,t);return{page:r,withPlaceholder:t,active:or(o,i)}},lr=function(e,r){e.frame||s(!1);var t=e.frame,n=ke(r,t.scroll.initial),i=Ue(n),o=l({},t,{scroll:{initial:t.scroll.initial,current:r,diff:{value:n,displacement:i},max:t.scroll.max}});return l({},e,{frame:o,subject:ar({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o})})};function cr(e,r){if(e.length!==r.length)return!1;for(var t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}function ur(e,r){var t;void 0===r&&(r=cr);var n,i=[],o=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return o&&t===this&&r(a,i)||(n=e.apply(this,a),o=!0,t=this,i=a),n}}function sr(e){return Object.values?Object.values(e):Object.keys(e).map((function(r){return e[r]}))}function dr(e,r){if(e.findIndex)return e.findIndex(r);for(var t=0;t<e.length;t++)if(r(e[t]))return t;return-1}function pr(e,r){if(e.find)return e.find(r);var t=dr(e,r);return-1!==t?e[t]:void 0}function fr(e){return Array.prototype.slice.call(e)}var gr=ur((function(e){return e.reduce((function(e,r){return e[r.descriptor.id]=r,e}),{})})),vr=ur((function(e){return e.reduce((function(e,r){return e[r.descriptor.id]=r,e}),{})})),mr=ur((function(e){return sr(e)})),br=ur((function(e){return sr(e)})),hr=ur((function(e,r){return br(r).filter((function(r){return e===r.descriptor.droppableId})).sort((function(e,r){return e.descriptor.index-r.descriptor.index}))}));function yr(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function xr(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Ir=ur((function(e,r){return r.filter((function(r){return r.descriptor.id!==e.descriptor.id}))})),Dr=function(e,r){return e.descriptor.droppableId===r.descriptor.id},wr={point:Fe,value:0},Er={invisible:{},visible:{},all:[]},Sr={displaced:Er,displacedBy:wr,at:null},Cr=function(e,r){return function(t){return e<=t&&t<=r}},Or=function(e){var r=Cr(e.top,e.bottom),t=Cr(e.left,e.right);return function(n){if(r(n.top)&&r(n.bottom)&&t(n.left)&&t(n.right))return!0;var i=r(n.top)||r(n.bottom),o=t(n.left)||t(n.right);if(i&&o)return!0;var a=n.top<e.top&&n.bottom>e.bottom,l=n.left<e.left&&n.right>e.right;return!(!a||!l)||(a&&o||l&&i)}},Pr=function(e){var r=Cr(e.top,e.bottom),t=Cr(e.left,e.right);return function(e){return r(e.top)&&r(e.bottom)&&t(e.left)&&t(e.right)}},Ar={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Rr={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Nr=function(e){var r=e.target,t=e.destination,n=e.viewport,i=e.withDroppableDisplacement,o=e.isVisibleThroughFrameFn,a=i?function(e,r){var t=r.frame?r.frame.scroll.diff.displacement:Fe;return nr(e,t)}(r,t):r;return function(e,r,t){return!!r.subject.active&&t(r.subject.active)(e)}(a,t,o)&&function(e,r,t){return t(r)(e)}(a,n,o)},Br=function(e){return Nr(l({},e,{isVisibleThroughFrameFn:Or}))},Tr=function(e){return Nr(l({},e,{isVisibleThroughFrameFn:Pr}))};function Mr(e){var r=e.afterDragging,t=e.destination,n=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,a=e.last;return r.reduce((function(e,r){var l=function(e,r){var t=e.page.marginBox,n={top:r.point.y,right:0,bottom:0,left:r.point.x};return $e(Ye(t,n))}(r,n),c=r.descriptor.id;if(e.all.push(c),!Br({target:l,destination:t,viewport:i,withDroppableDisplacement:!0}))return e.invisible[r.descriptor.id]=!0,e;var u={draggableId:c,shouldAnimate:function(e,r,t){if("boolean"==typeof t)return t;if(!r)return!0;var n=r.invisible,i=r.visible;if(n[e])return!1;var o=i[e];return!o||o.shouldAnimate}(c,a,o)};return e.visible[c]=u,e}),{all:[],visible:{},invisible:{}})}function Lr(e){var r=e.insideDestination,t=e.inHomeList,n=e.displacedBy,i=e.destination,o=function(e,r){if(!e.length)return 0;var t=e[e.length-1].descriptor.index;return r.inHomeList?t:t+1}(r,{inHomeList:t});return{displaced:Er,displacedBy:n,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Gr(e){var r=e.draggable,t=e.insideDestination,n=e.destination,i=e.viewport,o=e.displacedBy,a=e.last,l=e.index,c=e.forceShouldAnimate,u=Dr(r,n);if(null==l)return Lr({insideDestination:t,inHomeList:u,displacedBy:o,destination:n});var s=pr(t,(function(e){return e.descriptor.index===l}));if(!s)return Lr({insideDestination:t,inHomeList:u,displacedBy:o,destination:n});var d=Ir(r,t),p=t.indexOf(s);return{displaced:Mr({afterDragging:d.slice(p),destination:n,displacedBy:o,last:a,viewport:i.frame,forceShouldAnimate:c}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:l}}}}function _r(e,r){return Boolean(r.effected[e])}var Fr=function(e){var r=e.isMovingForward,t=e.isInHomeList,n=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,l=e.previousImpact,c=e.viewport,u=e.afterCritical,d=l.at;if(d||s(!1),"REORDER"===d.type){var p=function(e){var r=e.isMovingForward,t=e.isInHomeList,n=e.insideDestination,i=e.location;if(!n.length)return null;var o=i.index,a=r?o+1:o-1,l=n[0].descriptor.index,c=n[n.length-1].descriptor.index;return a<l||a>(t?c:c+1)?null:a}({isMovingForward:r,isInHomeList:t,location:d.destination,insideDestination:a});return null==p?null:Gr({draggable:n,insideDestination:a,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:p})}var f=function(e){var r=e.isMovingForward,t=e.destination,n=e.draggables,i=e.combine,o=e.afterCritical;if(!t.isCombineEnabled)return null;var a=i.draggableId,l=n[a].descriptor.index;return _r(a,o)?r?l:l-1:r?l+1:l}({isMovingForward:r,destination:o,displaced:l.displaced,draggables:i,combine:d.combine,afterCritical:u});return null==f?null:Gr({draggable:n,insideDestination:a,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:f})},jr=function(e){var r=e.afterCritical,t=e.impact,n=e.draggables,i=xr(t);i||s(!1);var o=i.draggableId,a=n[o].page.borderBox.center,l=function(e){var r=e.displaced,t=e.afterCritical,n=e.combineWith,i=e.displacedBy,o=Boolean(r.visible[n]||r.invisible[n]);return _r(n,t)?o?Fe:Ue(i.point):o?i.point:Fe}({displaced:t.displaced,afterCritical:r,combineWith:o,displacedBy:t.displacedBy});return je(a,l)},kr=function(e,r){return r.margin[e.start]+r.borderBox[e.size]/2},Wr=function(e,r,t){return r[e.crossAxisStart]+t.margin[e.crossAxisStart]+t.borderBox[e.crossAxisSize]/2},Ur=function(e){var r=e.axis,t=e.moveRelativeTo,n=e.isMoving;return He(r.line,t.marginBox[r.end]+kr(r,n),Wr(r,t.marginBox,n))},Hr=function(e){var r=e.axis,t=e.moveRelativeTo,n=e.isMoving;return He(r.line,t.marginBox[r.start]-function(e,r){return r.margin[e.end]+r.borderBox[e.size]/2}(r,n),Wr(r,t.marginBox,n))},qr=function(e){var r=e.impact,t=e.draggable,n=e.draggables,i=e.droppable,o=e.afterCritical,a=hr(i.descriptor.id,n),l=t.page,c=i.axis;if(!a.length)return function(e){var r=e.axis,t=e.moveInto,n=e.isMoving;return He(r.line,t.contentBox[r.start]+kr(r,n),Wr(r,t.contentBox,n))}({axis:c,moveInto:i.page,isMoving:l});var u=r.displaced,s=r.displacedBy,d=u.all[0];if(d){var p=n[d];if(_r(d,o))return Hr({axis:c,moveRelativeTo:p.page,isMoving:l});var f=Ze(p.page,s.point);return Hr({axis:c,moveRelativeTo:f,isMoving:l})}var g=a[a.length-1];if(g.descriptor.id===t.descriptor.id)return l.borderBox.center;if(_r(g.descriptor.id,o)){var v=Ze(g.page,Ue(o.displacedBy.point));return Ur({axis:c,moveRelativeTo:v,isMoving:l})}return Ur({axis:c,moveRelativeTo:g.page,isMoving:l})},Vr=function(e,r){var t=e.frame;return t?je(r,t.scroll.diff.displacement):r},zr=function(e){var r=function(e){var r=e.impact,t=e.draggable,n=e.droppable,i=e.draggables,o=e.afterCritical,a=t.page.borderBox.center,l=r.at;return n&&l?"REORDER"===l.type?qr({impact:r,draggable:t,draggables:i,droppable:n,afterCritical:o}):jr({impact:r,draggables:i,afterCritical:o}):a}(e),t=e.droppable;return t?Vr(t,r):r},$r=function(e,r){var t=ke(r,e.scroll.initial),n=Ue(t);return{frame:$e({top:r.y,bottom:r.y+e.frame.height,left:r.x,right:r.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:r,diff:{value:t,displacement:n}}}};function Yr(e,r){return e.map((function(e){return r[e]}))}var Jr=function(e){var r=e.pageBorderBoxCenter,t=e.draggable,n=function(e,r){return je(e.scroll.diff.displacement,r)}(e.viewport,r),i=ke(n,t.page.borderBox.center);return je(t.client.borderBox.center,i)},Xr=function(e){var r=e.draggable,t=e.destination,n=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,a=e.onlyOnMainAxis,c=void 0!==a&&a,u=ke(n,r.page.borderBox.center),s={target:nr(r.page.borderBox,u),destination:t,withDroppableDisplacement:o,viewport:i};return c?function(e){return Nr(l({},e,{isVisibleThroughFrameFn:(r=e.destination.axis,function(e){var t=Cr(e.top,e.bottom),n=Cr(e.left,e.right);return function(e){return r===Ar?t(e.top)&&t(e.bottom):n(e.left)&&n(e.right)}})}));var r}(s):Tr(s)},Kr=function(e){var r=e.isMovingForward,t=e.draggable,n=e.destination,i=e.draggables,o=e.previousImpact,a=e.viewport,c=e.previousPageBorderBoxCenter,u=e.previousClientSelection,d=e.afterCritical;if(!n.isEnabled)return null;var p=hr(n.descriptor.id,i),f=Dr(t,n),g=function(e){var r=e.isMovingForward,t=e.draggable,n=e.destination,i=e.insideDestination,o=e.previousImpact;if(!n.isCombineEnabled)return null;if(!yr(o))return null;function a(e){var r={type:"COMBINE",combine:{draggableId:e,droppableId:n.descriptor.id}};return l({},o,{at:r})}var c=o.displaced.all,u=c.length?c[0]:null;if(r)return u?a(u):null;var d=Ir(t,i);if(!u)return d.length?a(d[d.length-1].descriptor.id):null;var p=dr(d,(function(e){return e.descriptor.id===u}));-1===p&&s(!1);var f=p-1;return f<0?null:a(d[f].descriptor.id)}({isMovingForward:r,draggable:t,destination:n,insideDestination:p,previousImpact:o})||Fr({isMovingForward:r,isInHomeList:f,draggable:t,draggables:i,destination:n,insideDestination:p,previousImpact:o,viewport:a,afterCritical:d});if(!g)return null;var v=zr({impact:g,draggable:t,droppable:n,draggables:i,afterCritical:d});if(Xr({draggable:t,destination:n,newPageBorderBoxCenter:v,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Jr({pageBorderBoxCenter:v,draggable:t,viewport:a}),impact:g,scrollJumpRequest:null};var m=ke(v,c);return{clientSelection:u,impact:function(e){var r=e.impact,t=e.viewport,n=e.destination,i=e.draggables,o=e.maxScrollChange,a=$r(t,je(t.scroll.current,o)),c=n.frame?lr(n,je(n.frame.scroll.current,o)):n,u=r.displaced,s=Mr({afterDragging:Yr(u.all,i),destination:n,displacedBy:r.displacedBy,viewport:a.frame,last:u,forceShouldAnimate:!1}),d=Mr({afterDragging:Yr(u.all,i),destination:c,displacedBy:r.displacedBy,viewport:t.frame,last:u,forceShouldAnimate:!1}),p={},f={},g=[u,s,d];return u.all.forEach((function(e){var r=function(e,r){for(var t=0;t<r.length;t++){var n=r[t].visible[e];if(n)return n}return null}(e,g);r?f[e]=r:p[e]=!0})),l({},r,{displaced:{all:u.all,invisible:p,visible:f}})}({impact:g,viewport:a,destination:n,draggables:i,maxScrollChange:m}),scrollJumpRequest:m}},Qr=function(e){var r=e.subject.active;return r||s(!1),r},Zr=function(e,r){var t=e.page.borderBox.center;return _r(e.descriptor.id,r)?ke(t,r.displacedBy.point):t},et=function(e,r){var t=e.page.borderBox;return _r(e.descriptor.id,r)?nr(t,Ue(r.displacedBy.point)):t},rt=ur((function(e,r){var t=r[e.line];return{value:t,point:He(e.line,t)}})),tt=function(e,r){return l({},e,{scroll:l({},e.scroll,{max:r})})},nt=function(e,r,t){var n=e.frame;Dr(r,e)&&s(!1),e.subject.withPlaceholder&&s(!1);var i=rt(e.axis,r.displaceBy).point,o=function(e,r,t){var n=e.axis;if("virtual"===e.descriptor.mode)return He(n.line,r[n.line]);var i=e.subject.page.contentBox[n.size],o=hr(e.descriptor.id,t).reduce((function(e,r){return e+r.client.marginBox[n.size]}),0)+r[n.line]-i;return o<=0?null:He(n.line,o)}(e,i,t),a={placeholderSize:i,increasedBy:o,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!n)return l({},e,{subject:ar({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame})});var c=o?je(n.scroll.max,o):n.scroll.max,u=tt(n,c);return l({},e,{subject:ar({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:u}),frame:u})},it=function(e){var r=e.isMovingForward,t=e.previousPageBorderBoxCenter,n=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,l=e.viewport,c=e.afterCritical,u=function(e){var r=e.isMovingForward,t=e.pageBorderBoxCenter,n=e.source,i=e.droppables,o=e.viewport,a=n.subject.active;if(!a)return null;var l=n.axis,c=Cr(a[l.start],a[l.end]),u=mr(i).filter((function(e){return e!==n})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return Or(o.frame)(Qr(e))})).filter((function(e){var t=Qr(e);return r?a[l.crossAxisEnd]<t[l.crossAxisEnd]:t[l.crossAxisStart]<a[l.crossAxisStart]})).filter((function(e){var r=Qr(e),t=Cr(r[l.start],r[l.end]);return c(r[l.start])||c(r[l.end])||t(a[l.start])||t(a[l.end])})).sort((function(e,t){var n=Qr(e)[l.crossAxisStart],i=Qr(t)[l.crossAxisStart];return r?n-i:i-n})).filter((function(e,r,t){return Qr(e)[l.crossAxisStart]===Qr(t[0])[l.crossAxisStart]}));if(!u.length)return null;if(1===u.length)return u[0];var s=u.filter((function(e){return Cr(Qr(e)[l.start],Qr(e)[l.end])(t[l.line])}));return 1===s.length?s[0]:s.length>1?s.sort((function(e,r){return Qr(e)[l.start]-Qr(r)[l.start]}))[0]:u.sort((function(e,r){var n=Ve(t,ir(Qr(e))),i=Ve(t,ir(Qr(r)));return n!==i?n-i:Qr(e)[l.start]-Qr(r)[l.start]}))[0]}({isMovingForward:r,pageBorderBoxCenter:t,source:i,droppables:a,viewport:l});if(!u)return null;var s=hr(u.descriptor.id,o),d=function(e){var r=e.previousPageBorderBoxCenter,t=e.moveRelativeTo,n=e.insideDestination,i=e.draggable,o=e.draggables,a=e.destination,l=e.viewport,c=e.afterCritical;if(!t){if(n.length)return null;var u={displaced:Er,displacedBy:wr,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},s=zr({impact:u,draggable:i,droppable:a,draggables:o,afterCritical:c}),d=Dr(i,a)?a:nt(a,i,o);return Xr({draggable:i,destination:d,newPageBorderBoxCenter:s,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?u:null}var p,f=Boolean(r[a.axis.line]<=t.page.borderBox.center[a.axis.line]),g=(p=t.descriptor.index,t.descriptor.id===i.descriptor.id||f?p:p+1),v=rt(a.axis,i.displaceBy);return Gr({draggable:i,insideDestination:n,destination:a,viewport:l,displacedBy:v,last:Er,index:g})}({previousPageBorderBoxCenter:t,destination:u,draggable:n,draggables:o,moveRelativeTo:function(e){var r=e.pageBorderBoxCenter,t=e.viewport,n=e.destination,i=e.insideDestination,o=e.afterCritical;return i.filter((function(e){return Tr({target:et(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})})).sort((function(e,t){var i=qe(r,Vr(n,Zr(e,o))),a=qe(r,Vr(n,Zr(t,o)));return i<a?-1:a<i?1:e.descriptor.index-t.descriptor.index}))[0]||null}({pageBorderBoxCenter:t,viewport:l,destination:u,insideDestination:s,afterCritical:c}),insideDestination:s,viewport:l,afterCritical:c});if(!d)return null;var p=zr({impact:d,draggable:n,droppable:u,draggables:o,afterCritical:c});return{clientSelection:Jr({pageBorderBoxCenter:p,draggable:n,viewport:l}),impact:d,scrollJumpRequest:null}},ot=function(e){var r=e.at;return r?"REORDER"===r.type?r.destination.droppableId:r.combine.droppableId:null},at=function(e){var r=e.state,t=e.type,n=function(e,r){var t=ot(e);return t?r[t]:null}(r.impact,r.dimensions.droppables),i=Boolean(n),o=r.dimensions.droppables[r.critical.droppable.id],a=n||o,l=a.axis.direction,c="vertical"===l&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===l&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(c&&!i)return null;var u="MOVE_DOWN"===t||"MOVE_RIGHT"===t,s=r.dimensions.draggables[r.critical.draggable.id],d=r.current.page.borderBoxCenter,p=r.dimensions,f=p.draggables,g=p.droppables;return c?Kr({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:s,destination:a,draggables:f,viewport:r.viewport,previousClientSelection:r.current.client.selection,previousImpact:r.impact,afterCritical:r.afterCritical}):it({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:s,isOver:a,draggables:f,droppables:g,viewport:r.viewport,afterCritical:r.afterCritical})};function lt(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function ct(e){var r=Cr(e.top,e.bottom),t=Cr(e.left,e.right);return function(e){return r(e.y)&&t(e.x)}}function ut(e){var r=e.pageBorderBox,t=e.draggable,n=e.droppables,i=mr(n).filter((function(e){if(!e.isEnabled)return!1;var t,n,i=e.subject.active;if(!i)return!1;if(n=i,!((t=r).left<n.right&&t.right>n.left&&t.top<n.bottom&&t.bottom>n.top))return!1;if(ct(i)(r.center))return!0;var o=e.axis,a=i.center[o.crossAxisLine],l=r[o.crossAxisStart],c=r[o.crossAxisEnd],u=Cr(i[o.crossAxisStart],i[o.crossAxisEnd]),s=u(l),d=u(c);return!s&&!d||(s?l<a:c>a)}));return i.length?1===i.length?i[0].descriptor.id:function(e){var r=e.pageBorderBox,t=e.draggable,n=e.candidates,i=t.page.borderBox.center,o=n.map((function(e){var t=e.axis,n=He(e.axis.line,r.center[t.line],e.page.borderBox.center[t.crossAxisLine]);return{id:e.descriptor.id,distance:qe(i,n)}})).sort((function(e,r){return r.distance-e.distance}));return o[0]?o[0].id:null}({pageBorderBox:r,draggable:t,candidates:i}):null}var st=function(e,r){return $e(nr(e,r))};function dt(e){var r=e.displaced,t=e.id;return Boolean(r.visible[t]||r.invisible[t])}var pt=function(e){var r=e.pageOffset,t=e.draggable,n=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,l=e.afterCritical,c=st(t.page.borderBox,r),u=ut({pageBorderBox:c,draggable:t,droppables:i});if(!u)return Sr;var s=i[u],d=hr(s.descriptor.id,n),p=function(e,r){var t=e.frame;return t?st(r,t.scroll.diff.value):r}(s,c);return function(e){var r=e.draggable,t=e.pageBorderBoxWithDroppableScroll,n=e.previousImpact,i=e.destination,o=e.insideDestination,a=e.afterCritical;if(!i.isCombineEnabled)return null;var l=i.axis,c=rt(i.axis,r.displaceBy),u=c.value,s=t[l.start],d=t[l.end],p=pr(Ir(r,o),(function(e){var r=e.descriptor.id,t=e.page.borderBox,i=t[l.size]/4,o=_r(r,a),c=dt({displaced:n.displaced,id:r});return o?c?d>t[l.start]+i&&d<t[l.end]-i:s>t[l.start]-u+i&&s<t[l.end]-u-i:c?d>t[l.start]+u+i&&d<t[l.end]+u-i:s>t[l.start]+i&&s<t[l.end]-i}));return p?{displacedBy:c,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:i.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:p,draggable:t,previousImpact:o,destination:s,insideDestination:d,afterCritical:l})||function(e){var r=e.pageBorderBoxWithDroppableScroll,t=e.draggable,n=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,l=e.afterCritical,c=n.axis,u=rt(n.axis,t.displaceBy),s=u.value,d=r[c.start],p=r[c.end],f=function(e){var r=e.draggable,t=e.closest,n=e.inHomeList;return t?n&&t.descriptor.index>r.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:pr(Ir(t,i),(function(e){var r=e.descriptor.id,t=e.page.borderBox.center[c.line],n=_r(r,l),i=dt({displaced:o,id:r});return n?i?p<=t:d<t-s:i?p<=t+s:d<t})),inHomeList:Dr(t,n)});return Gr({draggable:t,insideDestination:i,destination:n,viewport:a,last:o,displacedBy:u,index:f})}({pageBorderBoxWithDroppableScroll:p,draggable:t,destination:s,insideDestination:d,last:o.displaced,viewport:a,afterCritical:l})},ft=function(e,r){var t;return l({},e,((t={})[r.descriptor.id]=r,t))},gt=function(e){var r=e.previousImpact,t=e.impact,n=e.droppables,i=ot(r),o=ot(t);if(!i)return n;if(i===o)return n;var a=n[i];if(!a.subject.withPlaceholder)return n;var c=function(e){var r=e.subject.withPlaceholder;r||s(!1);var t=e.frame;if(!t)return l({},e,{subject:ar({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null})});var n=r.oldFrameMaxScroll;n||s(!1);var i=tt(t,n);return l({},e,{subject:ar({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null}),frame:i})}(a);return ft(n,c)},vt=function(e){var r=e.state,t=e.clientSelection,n=e.dimensions,i=e.viewport,o=e.impact,a=e.scrollJumpRequest,c=i||r.viewport,u=n||r.dimensions,s=t||r.current.client.selection,d=ke(s,r.initial.client.selection),p={offset:d,selection:s,borderBoxCenter:je(r.initial.client.borderBoxCenter,d)},f={selection:je(p.selection,c.scroll.current),borderBoxCenter:je(p.borderBoxCenter,c.scroll.current),offset:je(p.offset,c.scroll.diff.value)},g={client:p,page:f};if("COLLECTING"===r.phase)return l({phase:"COLLECTING"},r,{dimensions:u,viewport:c,current:g});var v=u.draggables[r.critical.draggable.id],m=o||pt({pageOffset:f.offset,draggable:v,draggables:u.draggables,droppables:u.droppables,previousImpact:r.impact,viewport:c,afterCritical:r.afterCritical}),b=function(e){var r=e.draggable,t=e.draggables,n=e.droppables,i=e.previousImpact,o=e.impact,a=gt({previousImpact:i,impact:o,droppables:n}),l=ot(o);if(!l)return a;var c=n[l];if(Dr(r,c))return a;if(c.subject.withPlaceholder)return a;var u=nt(c,r,t);return ft(a,u)}({draggable:v,impact:m,previousImpact:r.impact,draggables:u.draggables,droppables:u.droppables});return l({},r,{current:g,dimensions:{draggables:u.draggables,droppables:b},impact:m,viewport:c,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})};var mt=function(e){var r=e.impact,t=e.viewport,n=e.draggables,i=e.destination,o=e.forceShouldAnimate,a=r.displaced;return l({},r,{displaced:Mr({afterDragging:function(e,r){return e.map((function(e){return r[e]}))}(a.all,n),destination:i,displacedBy:r.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:a})})},bt=function(e){var r=e.impact,t=e.draggable,n=e.droppable,i=e.draggables,o=e.viewport,a=e.afterCritical,l=zr({impact:r,draggable:t,draggables:i,droppable:n,afterCritical:a});return Jr({pageBorderBoxCenter:l,draggable:t,viewport:o})},ht=function(e){var r=e.state,t=e.dimensions,n=e.viewport;"SNAP"!==r.movementMode&&s(!1);var i=r.impact,o=n||r.viewport,a=t||r.dimensions,l=a.draggables,c=a.droppables,u=l[r.critical.draggable.id],d=ot(i);d||s(!1);var p=c[d],f=mt({impact:i,viewport:o,destination:p,draggables:l}),g=bt({impact:f,draggable:u,droppable:p,draggables:l,viewport:o,afterCritical:r.afterCritical});return vt({impact:f,clientSelection:g,state:r,dimensions:a,viewport:o})},yt=function(e){var r=e.draggable,t=e.home,n=e.draggables,i=e.viewport,o=rt(t.axis,r.displaceBy),a=hr(t.descriptor.id,n),l=a.indexOf(r);-1===l&&s(!1);var c,u=a.slice(l+1),d=u.reduce((function(e,r){return e[r.descriptor.id]=!0,e}),{}),p={inVirtualList:"virtual"===t.descriptor.mode,displacedBy:o,effected:d};return{impact:{displaced:Mr({afterDragging:u,destination:t,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(c=r.descriptor,{index:c.index,droppableId:c.droppableId})}},afterCritical:p}},xt=function(e){var r=e.additions,t=e.updatedDroppables,n=e.viewport,i=n.scroll.diff.value;return r.map((function(e){var r=e.descriptor.droppableId,o=function(e){var r=e.frame;return r||s(!1),r}(t[r]).scroll.diff.value;return function(e){var r=e.draggable,t=e.offset,n=e.initialWindowScroll,i=Ze(r.client,t),o=er(i,n);return l({},r,{placeholder:l({},r.placeholder,{client:i}),client:i,page:o})}({draggable:e,offset:je(i,o),initialWindowScroll:n.scroll.initial})}))},It=function(e){return"SNAP"===e.movementMode},Dt=function(e,r,t){var n=function(e,r){return{draggables:e.draggables,droppables:ft(e.droppables,r)}}(e.dimensions,r);return!It(e)||t?vt({state:e,dimensions:n}):ht({state:e,dimensions:n})};function wt(e){return e.isDragging&&"SNAP"===e.movementMode?l({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Et={phase:"IDLE",completed:null,shouldFlush:!1},St=function(e,r){if(void 0===e&&(e=Et),"FLUSH"===r.type)return l({},Et,{shouldFlush:!0});if("INITIAL_PUBLISH"===r.type){"IDLE"!==e.phase&&s(!1);var t=r.payload,n=t.critical,i=t.clientSelection,o=t.viewport,a=t.dimensions,c=t.movementMode,u=a.draggables[n.draggable.id],d=a.droppables[n.droppable.id],p={selection:i,borderBoxCenter:u.client.borderBox.center,offset:Fe},f={client:p,page:{selection:je(p.selection,o.scroll.initial),borderBoxCenter:je(p.selection,o.scroll.initial),offset:je(p.selection,o.scroll.diff.value)}},g=mr(a.droppables).every((function(e){return!e.isFixedOnPage})),v=yt({draggable:u,home:d,draggables:a.draggables,viewport:o}),m=v.impact;return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:c,dimensions:a,initial:f,current:f,isWindowScrollAllowed:g,impact:m,afterCritical:v.afterCritical,onLiftImpact:m,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===r.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&s(!1),l({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===r.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&s(!1),function(e){var r=e.state,t=e.published,n=t.modified.map((function(e){var t=r.dimensions.droppables[e.droppableId];return lr(t,e.scroll)})),i=l({},r.dimensions.droppables,{},gr(n)),o=vr(xt({additions:t.additions,updatedDroppables:i,viewport:r.viewport})),a=l({},r.dimensions.draggables,{},o);t.removals.forEach((function(e){delete a[e]}));var c={droppables:i,draggables:a},u=ot(r.impact),s=u?c.droppables[u]:null,d=c.draggables[r.critical.draggable.id],p=c.droppables[r.critical.droppable.id],f=yt({draggable:d,home:p,draggables:a,viewport:r.viewport}),g=f.impact,v=f.afterCritical,m=s&&s.isCombineEnabled?r.impact:g,b=pt({pageOffset:r.current.page.offset,draggable:c.draggables[r.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:m,viewport:r.viewport,afterCritical:v}),h=l({phase:"DRAGGING"},r,{phase:"DRAGGING",impact:b,onLiftImpact:g,dimensions:c,afterCritical:v,forceShouldAnimate:!1});return"COLLECTING"===r.phase?h:l({phase:"DROP_PENDING"},h,{phase:"DROP_PENDING",reason:r.reason,isWaiting:!1})}({state:e,published:r.payload});if("MOVE"===r.type){if("DROP_PENDING"===e.phase)return e;lt(e)||s(!1);var b=r.payload.client;return We(b,e.current.client.selection)?e:vt({state:e,clientSelection:b,impact:It(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===r.type){if("DROP_PENDING"===e.phase)return wt(e);if("COLLECTING"===e.phase)return wt(e);lt(e)||s(!1);var h=r.payload,y=h.id,x=h.newScroll,I=e.dimensions.droppables[y];if(!I)return e;var D=lr(I,x);return Dt(e,D,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===r.type){if("DROP_PENDING"===e.phase)return e;lt(e)||s(!1);var w=r.payload,E=w.id,S=w.isEnabled,C=e.dimensions.droppables[E];C||s(!1),C.isEnabled===S&&s(!1);var O=l({},C,{isEnabled:S});return Dt(e,O,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===r.type){if("DROP_PENDING"===e.phase)return e;lt(e)||s(!1);var P=r.payload,A=P.id,R=P.isCombineEnabled,N=e.dimensions.droppables[A];N||s(!1),N.isCombineEnabled===R&&s(!1);var B=l({},N,{isCombineEnabled:R});return Dt(e,B,!0)}if("MOVE_BY_WINDOW_SCROLL"===r.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;lt(e)||s(!1),e.isWindowScrollAllowed||s(!1);var T=r.payload.newScroll;if(We(e.viewport.scroll.current,T))return wt(e);var M=$r(e.viewport,T);return It(e)?ht({state:e,viewport:M}):vt({state:e,viewport:M})}if("UPDATE_VIEWPORT_MAX_SCROLL"===r.type){if(!lt(e))return e;var L=r.payload.maxScroll;if(We(L,e.viewport.scroll.max))return e;var G=l({},e.viewport,{scroll:l({},e.viewport.scroll,{max:L})});return l({phase:"DRAGGING"},e,{viewport:G})}if("MOVE_UP"===r.type||"MOVE_DOWN"===r.type||"MOVE_LEFT"===r.type||"MOVE_RIGHT"===r.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&s(!1);var _=at({state:e,type:r.type});return _?vt({state:e,impact:_.impact,clientSelection:_.clientSelection,scrollJumpRequest:_.scrollJumpRequest}):e}if("DROP_PENDING"===r.type){var F=r.payload.reason;return"COLLECTING"!==e.phase&&s(!1),l({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:F})}if("DROP_ANIMATE"===r.type){var j=r.payload,k=j.completed,W=j.dropDuration,U=j.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&s(!1),{phase:"DROP_ANIMATING",completed:k,dropDuration:W,newHomeClientOffset:U,dimensions:e.dimensions}}return"DROP_COMPLETE"===r.type?{phase:"IDLE",completed:r.payload.completed,shouldFlush:!1}:e},Ct=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},Ot=function(){return{type:"COLLECTION_STARTING",payload:null}},Pt=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},At=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},Rt=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},Nt=function(e){return{type:"MOVE",payload:e}},Bt=function(){return{type:"MOVE_UP",payload:null}},Tt=function(){return{type:"MOVE_DOWN",payload:null}},Mt=function(){return{type:"MOVE_RIGHT",payload:null}},Lt=function(){return{type:"MOVE_LEFT",payload:null}},Gt=function(e){return{type:"DROP_COMPLETE",payload:e}},_t=function(e){return{type:"DROP",payload:e}},Ft=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},jt="cubic-bezier(.2,1,.1,1)",kt={drop:0,combining:.7},Wt={drop:.75},Ut=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",Ht={fluid:"opacity "+Ut,snap:"transform "+Ut+", opacity "+Ut,drop:function(e){var r=e+"s "+jt;return"transform "+r+", opacity "+r},outOfTheWay:"transform "+Ut,placeholder:"height "+Ut+", width "+Ut+", margin "+Ut},qt=function(e){return We(e,Fe)?null:"translate("+e.x+"px, "+e.y+"px)"},Vt=qt,zt=function(e,r){var t=qt(e);return t?r?t+" scale("+Wt.drop+")":t:null},$t=.33,Yt=.55,Jt=Yt-$t,Xt=function(e){var r=e.getState,t=e.dispatch;return function(e){return function(n){if("DROP"===n.type){var i=r(),o=n.payload.reason;if("COLLECTING"!==i.phase){if("IDLE"!==i.phase){"DROP_PENDING"===i.phase&&i.isWaiting&&s(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&s(!1);var a=i.critical,c=i.dimensions,u=c.draggables[i.critical.draggable.id],d=function(e){var r=e.draggables,t=e.reason,n=e.lastImpact,i=e.home,o=e.viewport,a=e.onLiftImpact;return n.at&&"DROP"===t?"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:l({},n,{displaced:Er}),didDropInsideDroppable:!0}:{impact:mt({draggables:r,impact:a,destination:i,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:o,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),p=d.impact,f=d.didDropInsideDroppable,g=f?yr(p):null,v=f?xr(p):null,m={index:a.draggable.index,droppableId:a.droppable.id},b={draggableId:u.descriptor.id,type:u.descriptor.type,source:m,reason:o,mode:i.movementMode,destination:g,combine:v},h=function(e){var r=e.impact,t=e.draggable,n=e.dimensions,i=e.viewport,o=e.afterCritical,a=n.draggables,l=n.droppables,c=ot(r),u=c?l[c]:null,s=l[t.descriptor.droppableId],d=bt({impact:r,draggable:t,draggables:a,afterCritical:o,droppable:u||s,viewport:i});return ke(d,t.client.borderBox.center)}({impact:p,draggable:u,dimensions:c,viewport:i.viewport,afterCritical:i.afterCritical}),y={critical:i.critical,afterCritical:i.afterCritical,result:b,impact:p};if(!We(i.current.client.offset,h)||Boolean(b.combine)){var x=function(e){var r=e.current,t=e.destination,n=e.reason,i=qe(r,t);if(i<=0)return $t;if(i>=1500)return Yt;var o=$t+Jt*(i/1500);return Number(("CANCEL"===n?.6*o:o).toFixed(2))}({current:i.current.client.offset,destination:h,reason:o});t(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:h,dropDuration:x,completed:y}))}else t(Gt({completed:y}))}}else t(function(e){return{type:"DROP_PENDING",payload:e}}({reason:o}))}else e(n)}}},Kt=function(e){var r=[],t=null,n=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r=i,t||(t=requestAnimationFrame((function(){t=null,e.apply(void 0,r)})))};return n.cancel=function(){t&&(cancelAnimationFrame(t),t=null)},n},Qt=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Zt(e){var r=e.onWindowScroll;var t=Kt((function(){r(Qt())})),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(r){r.target!==window&&r.target!==window.document||e()}}}(t),i=a;function o(){return i!==a}return{start:function(){o()&&s(!1),i=c(window,[n])},stop:function(){o()||s(!1),t.cancel(),i(),i=a},isActive:o}}var en=function(e){var r=Zt({onWindowScroll:function(r){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:r}})}});return function(e){return function(t){r.isActive()||"INITIAL_PUBLISH"!==t.type||r.start(),r.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(t)&&r.stop(),e(t)}}},rn=function(){var e=[];return{add:function(r){var t=setTimeout((function(){return function(r){var t=dr(e,(function(e){return e.timerId===r}));-1===t&&s(!1),e.splice(t,1)[0].callback()}(t)})),n={timerId:t,callback:r};e.push(n)},flush:function(){if(e.length){var r=[].concat(e);e.length=0,r.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},tn=function(e,r){r()},nn=function(e,r){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:r}},on=function(e,r,t,n){if(e){var i=function(e){var r=!1,t=!1,n=setTimeout((function(){t=!0})),i=function(i){r||t||(r=!0,e(i),clearTimeout(n))};return i.wasCalled=function(){return r},i}(t);e(r,{announce:i}),i.wasCalled()||t(n(r))}else t(n(r))},an=function(e,r){var t=function(e,r){var t=rn(),n=null,i=function(t){n||s(!1),n=null,tn(0,(function(){return on(e().onDragEnd,t,r,y)}))};return{beforeCapture:function(r,t){n&&s(!1),tn(0,(function(){var n=e().onBeforeCapture;n&&n({draggableId:r,mode:t})}))},beforeStart:function(r,t){n&&s(!1),tn(0,(function(){var n=e().onBeforeDragStart;n&&n(nn(r,t))}))},start:function(i,o){n&&s(!1);var a=nn(i,o);n={mode:o,lastCritical:i,lastLocation:a.source,lastCombine:null},t.add((function(){tn(0,(function(){return on(e().onDragStart,a,r,b)}))}))},update:function(i,o){var a=yr(o),c=xr(o);n||s(!1);var u=!function(e,r){if(e===r)return!0;var t=e.draggable.id===r.draggable.id&&e.draggable.droppableId===r.draggable.droppableId&&e.draggable.type===r.draggable.type&&e.draggable.index===r.draggable.index,n=e.droppable.id===r.droppable.id&&e.droppable.type===r.droppable.type;return t&&n}(i,n.lastCritical);u&&(n.lastCritical=i);var d,p,f=(d=n.lastLocation,p=a,!(null==d&&null==p||null!=d&&null!=p&&d.droppableId===p.droppableId&&d.index===p.index));f&&(n.lastLocation=a);var g=!function(e,r){return null==e&&null==r||null!=e&&null!=r&&(e.draggableId===r.draggableId&&e.droppableId===r.droppableId)}(n.lastCombine,c);if(g&&(n.lastCombine=c),u||f||g){var v=l({},nn(i,n.mode),{combine:c,destination:a});t.add((function(){tn(0,(function(){return on(e().onDragUpdate,v,r,h)}))}))}},flush:function(){n||s(!1),t.flush()},drop:i,abort:function(){if(n){var e=l({},nn(n.lastCritical,n.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,r);return function(e){return function(r){return function(n){if("BEFORE_INITIAL_CAPTURE"!==n.type){if("INITIAL_PUBLISH"===n.type){var i=n.payload.critical;return t.beforeStart(i,n.payload.movementMode),r(n),void t.start(i,n.payload.movementMode)}if("DROP_COMPLETE"===n.type){var o=n.payload.completed.result;return t.flush(),r(n),void t.drop(o)}if(r(n),"FLUSH"!==n.type){var a=e.getState();"DRAGGING"===a.phase&&t.update(a.critical,a.impact)}else t.abort()}else t.beforeCapture(n.payload.draggableId,n.payload.movementMode)}}}},ln=function(e){return function(r){return function(t){if("DROP_ANIMATION_FINISHED"===t.type){var n=e.getState();"DROP_ANIMATING"!==n.phase&&s(!1),e.dispatch(Gt({completed:n.completed}))}else r(t)}}},cn=function(e){var r=null,t=null;return function(n){return function(i){if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(t&&(cancelAnimationFrame(t),t=null),r&&(r(),r=null)),n(i),"DROP_ANIMATE"===i.type){var o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};t=requestAnimationFrame((function(){t=null,r=c(window,[o])}))}}}},un=function(e){return function(r){return function(t){if(r(t),"PUBLISH_WHILE_DRAGGING"===t.type){var n=e.getState();"DROP_PENDING"===n.phase&&(n.isWaiting||e.dispatch(_t({reason:n.reason})))}}}},sn=R,dn=function(e){var r,t=e.dimensionMarshal,n=e.focusMarshal,i=e.styleMarshal,o=e.getResponders,a=e.announce,l=e.autoScroller;return E(St,sn(function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(e){return function(){var t=e.apply(void 0,arguments),n=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:t.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=r.map((function(e){return e(i)}));return A({},t,{dispatch:n=R.apply(void 0,o)(t.dispatch)})}}}((r=i,function(){return function(e){return function(t){"INITIAL_PUBLISH"===t.type&&r.dragging(),"DROP_ANIMATE"===t.type&&r.dropping(t.payload.completed.result.reason),"FLUSH"!==t.type&&"DROP_COMPLETE"!==t.type||r.resting(),e(t)}}}),function(e){return function(){return function(r){return function(t){"DROP_COMPLETE"!==t.type&&"FLUSH"!==t.type&&"DROP_ANIMATE"!==t.type||e.stopPublishing(),r(t)}}}}(t),function(e){return function(r){var t=r.getState,n=r.dispatch;return function(r){return function(i){if("LIFT"===i.type){var o=i.payload,a=o.id,l=o.clientSelection,c=o.movementMode,u=t();"DROP_ANIMATING"===u.phase&&n(Gt({completed:u.completed})),"IDLE"!==t().phase&&s(!1),n({type:"FLUSH",payload:null}),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:a,movementMode:c}});var d={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===c}},p=e.startPublishing(d),f=p.critical,g=p.dimensions,v=p.viewport;n(function(e){return{type:"INITIAL_PUBLISH",payload:e}}({critical:f,dimensions:g,clientSelection:l,movementMode:c,viewport:v}))}else r(i)}}}}(t),Xt,ln,cn,un,function(e){return function(r){return function(t){return function(n){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n))return e.stop(),void t(n);if("INITIAL_PUBLISH"===n.type){t(n);var i=r.getState();return"DRAGGING"!==i.phase&&s(!1),void e.start(i)}t(n),e.scroll(r.getState())}}}}(l),en,function(e){var r=!1;return function(){return function(t){return function(n){if("INITIAL_PUBLISH"===n.type)return r=!0,e.tryRecordFocus(n.payload.critical.draggable.id),t(n),void e.tryRestoreFocusRecorded();if(t(n),r){if("FLUSH"===n.type)return r=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===n.type){r=!1;var i=n.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(n),an(o,a))))};var pn=function(e){var r=e.scrollHeight,t=e.scrollWidth,n=e.height,i=e.width,o=ke({x:t,y:r},{x:i,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},fn=function(){var e=document.documentElement;return e||s(!1),e},gn=function(){var e=fn();return pn({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},vn=function(e){var r=e.critical,t=e.scrollOptions,n=e.registry,i=function(){var e=Qt(),r=gn(),t=e.y,n=e.x,i=fn(),o=i.clientWidth,a=i.clientHeight;return{frame:$e({top:t,left:n,right:n+o,bottom:t+a}),scroll:{initial:e,current:e,max:r,diff:{value:Fe,displacement:Fe}}}}(),o=i.scroll.current,a=r.droppable,l=n.droppable.getAllByType(a.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(o,t)})),c=n.draggable.getAllByType(r.draggable.type).map((function(e){return e.getDimension(o)}));return{dimensions:{draggables:vr(c),droppables:gr(l)},critical:r,viewport:i}};function mn(e,r,t){return t.descriptor.id!==r.id&&(t.descriptor.type===r.type&&"virtual"===e.droppable.getById(t.descriptor.droppableId).descriptor.mode)}var bn,hn,yn=function(e,r){var t=null,n=function(e){var r=e.registry,t=e.callbacks,n={additions:{},removals:{},modified:{}},i=null,o=function(){i||(t.collectionStarting(),i=requestAnimationFrame((function(){i=null;var e=n,o=e.additions,a=e.removals,l=e.modified,c=Object.keys(o).map((function(e){return r.draggable.getById(e).getDimension(Fe)})).sort((function(e,r){return e.descriptor.index-r.descriptor.index})),u=Object.keys(l).map((function(e){return{droppableId:e,scroll:r.droppable.getById(e).callbacks.getScrollWhileDragging()}})),s={additions:c,removals:Object.keys(a),modified:u};n={additions:{},removals:{},modified:{}},t.publish(s)})))};return{add:function(e){var r=e.descriptor.id;n.additions[r]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[r]&&delete n.removals[r],o()},remove:function(e){var r=e.descriptor;n.removals[r.id]=!0,n.modified[r.droppableId]=!0,n.additions[r.id]&&delete n.additions[r.id],o()},stop:function(){i&&(cancelAnimationFrame(i),i=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:r.publishWhileDragging,collectionStarting:r.collectionStarting},registry:e}),i=function(r){t||s(!1);var i=t.critical.draggable;"ADDITION"===r.type&&mn(e,i,r.value)&&n.add(r.value),"REMOVAL"===r.type&&mn(e,i,r.value)&&n.remove(r.value)};return{updateDroppableIsEnabled:function(n,i){e.droppable.exists(n)||s(!1),t&&r.updateDroppableIsEnabled({id:n,isEnabled:i})},updateDroppableIsCombineEnabled:function(n,i){t&&(e.droppable.exists(n)||s(!1),r.updateDroppableIsCombineEnabled({id:n,isCombineEnabled:i}))},scrollDroppable:function(r,n){t&&e.droppable.getById(r).callbacks.scroll(n)},updateDroppableScroll:function(n,i){t&&(e.droppable.exists(n)||s(!1),r.updateDroppableScroll({id:n,newScroll:i}))},startPublishing:function(r){t&&s(!1);var n=e.draggable.getById(r.draggableId),o=e.droppable.getById(n.descriptor.droppableId),a={draggable:n.descriptor,droppable:o.descriptor},l=e.subscribe(i);return t={critical:a,unsubscribe:l},vn({critical:a,registry:e,scrollOptions:r.scrollOptions})},stopPublishing:function(){if(t){n.stop();var r=t.critical.droppable;e.droppable.getAllByType(r.type).forEach((function(e){return e.callbacks.dragStopped()})),t.unsubscribe(),t=null}}}},xn=function(e,r){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==r&&"DROP"===e.completed.result.reason)},In=function(e){window.scrollBy(e.x,e.y)},Dn=ur((function(e){return mr(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),wn=function(e){var r=e.center,t=e.destination,n=e.droppables;if(t){var i=n[t];return i.frame?i:null}return function(e,r){return pr(Dn(r),(function(r){return r.frame||s(!1),ct(r.frame.pageMarginBox)(e)}))}(r,n)},En=function(e){var r=e.startOfRange,t=e.endOfRange,n=e.current,i=t-r;return 0===i?0:(n-r)/i},Sn={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(e){return Math.pow(e,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},Cn=Sn.durationDampening.accelerateAt,On=Sn.durationDampening.stopDampeningAt,Pn=function(e){var r=e.configOverride,t=e.distanceToEdge,n=e.dragStartTime,i=e.shouldUseTimeDampening,o=function(e,r,t){if(e>r.startScrollingFrom)return 0;var n=(null==t?void 0:t.maxPixelScroll)||Sn.maxPixelScroll;if(e<=r.maxScrollValueAt)return n;if(e===r.startScrollingFrom)return 1;var i=En({startOfRange:r.maxScrollValueAt,endOfRange:r.startScrollingFrom,current:e}),o=n*Sn.ease(1-i);return Math.ceil(o)}(t,e.thresholds,r);return 0===o?0:i?Math.max(function(e,r,t){var n,i,o=(null==t||null==(n=t.durationDampening)?void 0:n.accelerateAt)||Cn,a=(null==t||null==(i=t.durationDampening)?void 0:i.stopDampeningAt)||On,l=(null==t?void 0:t.ease)||Sn.ease,c=r,u=a,s=Date.now()-c;if(s>=a)return e;if(s<o)return 1;var d=e*l(En({startOfRange:o,endOfRange:u,current:s}));return Math.ceil(d)}(o,n,r),1):o},An=function(e){var r=e.axis,t=e.configOverride,n=e.distanceToEdges,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=e.thresholds;return n[r.end]<n[r.start]?Pn({configOverride:t,distanceToEdge:n[r.end],dragStartTime:i,shouldUseTimeDampening:o,thresholds:a}):-1*Pn({configOverride:t,distanceToEdge:n[r.start],dragStartTime:i,shouldUseTimeDampening:o,thresholds:a})},Rn=function(e){var r=e.axis,t=e.bufferMinScroll,n=e.center,i=e.centerInitial,o=e.container,a=e.containerScroll,l=e.distanceToEdges,c=e.thresholds,u=e.windowScrollOffset,s=l[r.end]<c.startScrollingFrom,d=n[r.line]>o[r.size]-c.startScrollingFrom+u[r.line]||s;return{inThresholdStart:n[r.line]<c.startScrollingFrom+u[r.line],inThresholdEnd:d,draggedTowardsStart:n[r.line]<i[r.line]-t,draggedTowardsEnd:n[r.line]>i[r.line]+t,scrolledTowardsStart:a.initial[r.line]>a.current[r.line],scrolledTowardsEnd:a.initial[r.line]<a.current[r.line]}},Nn=function(e){var r=e.bufferMinScroll,t=void 0===r?24:r,n=e.center,i=e.centerInitial,o=e.container,a=e.containerScroll,l=e.distanceToEdges,c=e.scroll,u=function(e){var r=e.bufferMinScroll,t=e.center,n=e.centerInitial,i=e.container,o=e.containerScroll,a=e.distanceToEdges,l=e.thresholdsHorizontal,c=e.thresholdsVertical,u=e.windowScrollOffset;return{xAxis:Rn({axis:Rr,bufferMinScroll:r,center:t,centerInitial:n,container:i,containerScroll:o,distanceToEdges:a,thresholds:l,windowScrollOffset:u}),yAxis:Rn({axis:Ar,bufferMinScroll:r,center:t,centerInitial:n,container:i,containerScroll:o,distanceToEdges:a,thresholds:c,windowScrollOffset:u})}}({bufferMinScroll:t,center:n,centerInitial:i,container:o,containerScroll:a,distanceToEdges:l,thresholdsHorizontal:e.thresholdsHorizontal,thresholdsVertical:e.thresholdsVertical,windowScrollOffset:e.windowScrollOffset}),s=u.xAxis,d=u.yAxis;return s.inThresholdStart?s.draggedTowardsStart||s.scrolledTowardsEnd||(c.x=0):s.inThresholdEnd&&(s.draggedTowardsEnd||s.scrolledTowardsStart||(c.x=0)),d.inThresholdStart?d.draggedTowardsStart||d.scrolledTowardsEnd||(c.y=0):d.inThresholdEnd&&(d.draggedTowardsEnd||d.scrolledTowardsStart||(c.y=0)),c},Bn=function(e,r,t){var n=(null==t?void 0:t.startFromPercentage)||Sn.startFromPercentage,i=(null==t?void 0:t.maxScrollAtPercentage)||Sn.maxScrollAtPercentage;return{startScrollingFrom:e[r.size]*n,maxScrollValueAt:e[r.size]*i}},Tn=ze((function(e){return 0===e?0:e})),Mn=function(e){var r=e.dragStartTime,t=e.container,n=e.containerScroll,i=e.subject,o=e.center,a=e.centerInitial,l=e.shouldUseTimeDampening,c=e.fluidScrollerOptions,u=e.windowScrollOffset,s=void 0===u?Fe:u,d={top:o.y-t.top,right:t.right-o.x,bottom:t.bottom-o.y,left:o.x-t.left},p=Bn(t,Ar,null==c?void 0:c.configOverride),f=Bn(t,Rr,null==c?void 0:c.configOverride),g=An({axis:Ar,configOverride:null==c?void 0:c.configOverride,distanceToEdges:d,dragStartTime:r,shouldUseTimeDampening:l,thresholds:p}),v=An({axis:Rr,configOverride:null==c?void 0:c.configOverride,distanceToEdges:d,dragStartTime:r,shouldUseTimeDampening:l,thresholds:f}),m=Tn({x:v,y:g});if(We(m,Fe))return null;var b=function(e){var r=e.container,t=e.subject,n=e.proposedScroll,i=t.height>r.height,o=t.width>r.width;return o||i?o&&i?null:{x:o?0:n.x,y:i?0:n.y}:n}({container:t,subject:i,proposedScroll:m});if(!b)return null;var h=b;return c&&(c.bufferThresholds&&(h=Nn({bufferMinScroll:null==c?void 0:c.bufferMinScroll,center:o,centerInitial:a,container:t,containerScroll:n,distanceToEdges:d,scroll:h,thresholdsHorizontal:f,thresholdsVertical:p,windowScrollOffset:s})),c.thruGetScroll&&(h=c.thruGetScroll({center:o,centerInitial:a,container:t,containerScroll:n,distanceToEdges:d,scroll:h,thresholdsHorizontal:f,thresholdsVertical:p,windowScrollOffset:s}))),We(h,Fe)?null:h},Ln=ze((function(e){return 0===e?0:e>0?1:-1})),Gn=(bn=function(e,r){return e<0?e:e>r?e-r:0},function(e){var r=e.current,t=e.max,n=e.change,i=je(r,n),o={x:bn(i.x,t.x),y:bn(i.y,t.y)};return We(o,Fe)?null:o}),_n=function(e){var r=e.max,t=e.current,n=e.change,i={x:Math.max(t.x,r.x),y:Math.max(t.y,r.y)},o=Ln(n),a=Gn({max:i,current:t,change:o});return!a||(0!==o.x&&0===a.x||0!==o.y&&0===a.y)},Fn=function(e,r){return _n({current:e.scroll.current,max:e.scroll.max,change:r})},jn=function(e,r){var t=e.frame;return!!t&&_n({current:t.scroll.current,max:t.scroll.max,change:r})},kn=function(e){var r=e.state,t=e.dragStartTime,n=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,a=e.fluidScrollerOptions,l=r.current.page.borderBoxCenter,c=r.initial.page.borderBoxCenter,u=r.dimensions.draggables[r.critical.draggable.id].page.marginBox;if(r.isWindowScrollAllowed){var s=function(e){var r=e.viewport,t=e.subject,n=e.center,i=e.centerInitial,o=e.dragStartTime,a=e.shouldUseTimeDampening,l=e.fluidScrollerOptions,c={x:r.scroll.current.x,y:r.scroll.current.y},u=Mn({dragStartTime:o,container:r.frame,containerScroll:r.scroll,subject:t,center:n,centerInitial:i,shouldUseTimeDampening:a,fluidScrollerOptions:l,windowScrollOffset:c});return u&&Fn(r,u)?u:null}({dragStartTime:t,viewport:r.viewport,subject:u,center:l,centerInitial:c,shouldUseTimeDampening:n,fluidScrollerOptions:a});if(s)return void i(s)}var d=wn({center:l,destination:ot(r.impact),droppables:r.dimensions.droppables});if(d){var p=function(e){var r=e.droppable,t=e.subject,n=e.center,i=e.centerInitial,o=e.dragStartTime,a=e.shouldUseTimeDampening,l=e.fluidScrollerOptions,c=r.frame;if(!c)return null;var u=Mn({dragStartTime:o,container:c.pageMarginBox,containerScroll:c.scroll,subject:t,center:n,centerInitial:i,shouldUseTimeDampening:a,fluidScrollerOptions:l});return u&&jn(r,u)?u:null}({dragStartTime:t,droppable:d,subject:u,center:l,centerInitial:c,shouldUseTimeDampening:n,fluidScrollerOptions:a});p&&o(d.descriptor.id,p)}},Wn=function(e){var r=e.move,t=e.scrollDroppable,n=e.scrollWindow,i=function(e,r){if(!jn(e,r))return r;var n=function(e,r){var t=e.frame;return t&&jn(e,r)?Gn({current:t.scroll.current,max:t.scroll.max,change:r}):null}(e,r);if(!n)return t(e.descriptor.id,r),null;var i=ke(r,n);return t(e.descriptor.id,i),ke(r,i)},o=function(e,r,t){if(!e)return t;if(!Fn(r,t))return t;var i=function(e,r){if(!Fn(e,r))return null;var t=e.scroll.max,n=e.scroll.current;return Gn({current:n,max:t,change:r})}(r,t);if(!i)return n(t),null;var o=ke(t,i);return n(o),ke(t,o)};return function(e){var t=e.scrollJumpRequest;if(t){var n=ot(e.impact);n||s(!1);var a=i(e.dimensions.droppables[n],t);if(a){var l=e.viewport,c=o(e.isWindowScrollAllowed,l,a);c&&function(e,t){var n=je(e.current.client.selection,t);r({client:n})}(e,c)}}}},Un=function(e){var r=e.scrollDroppable,t=e.scrollWindow,n=e.move,i=function(e){var r=e.scrollWindow,t=e.scrollDroppable,n=e.fluidScrollerOptions,i=Kt(r),o=Kt(t),a=null,l=function(e){a||s(!1);var r=a,t=r.shouldUseTimeDampening,l=r.dragStartTime;kn({state:e,scrollWindow:i,scrollDroppable:o,dragStartTime:l,shouldUseTimeDampening:t,fluidScrollerOptions:n})};return{start:function(e){a&&s(!1);var r=Date.now(),t=!1,i=function(){t=!0};kn({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:i,scrollDroppable:i,fluidScrollerOptions:n}),a={dragStartTime:r,shouldUseTimeDampening:t},t&&l(e)},stop:function(){a&&(i.cancel(),o.cancel(),a=null)},scroll:l}}({scrollWindow:t,scrollDroppable:r,fluidScrollerOptions:e.fluidScrollerOptions}),o=Wn({move:n,scrollWindow:t,scrollDroppable:r});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&o(e):i.scroll(e))},start:i.start,stop:i.stop}},Hn={base:hn="data-rbd-drag-handle",draggableId:hn+"-draggable-id",contextId:hn+"-context-id"},qn=function(){var e="data-rbd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Vn=function(){var e="data-rbd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),zn={contextId:"data-rbd-scroll-container-context-id"},$n=function(e,r){return e.map((function(e){var t=e.styles[r];return t?e.selector+" { "+t+" }":""})).join(" ")},Yn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,Jn=function(){var e=document.querySelector("head");return e||s(!1),e},Xn=function(e){var r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.type="text/css",r};function Kn(e,t){var n=Ge((function(){return function(e){var r,t,n,i=(r=e,function(e){return"["+e+'="'+r+'"]'}),o=(t="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:i(Hn.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:t,dragging:"pointer-events: none;",dropAnimating:t}}),a=[(n="\n transition: "+Ht.outOfTheWay+";\n ",{selector:i(qn.contextId),styles:{dragging:n,dropAnimating:n,userCancel:n}}),o,{selector:i(Vn.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:$n(a,"always"),resting:$n(a,"resting"),dragging:$n(a,"dragging"),dropAnimating:$n(a,"dropAnimating"),userCancel:$n(a,"userCancel")}}(e)}),[e]),i=r.useRef(null),o=r.useRef(null),a=_e(ur((function(e){var r=o.current;r||s(!1),r.textContent=e})),[]),l=_e((function(e){var r=i.current;r||s(!1),r.textContent=e}),[]);Yn((function(){(i.current||o.current)&&s(!1);var r=Xn(t),c=Xn(t);return i.current=r,o.current=c,r.setAttribute("data-rbd-always",e),c.setAttribute("data-rbd-dynamic",e),Jn().appendChild(r),Jn().appendChild(c),l(n.always),a(n.resting),function(){var e=function(e){var r=e.current;r||s(!1),Jn().removeChild(r),e.current=null};e(i),e(o)}}),[t,l,a,n.always,n.resting,e]);var c=_e((function(){return a(n.dragging)}),[a,n.dragging]),u=_e((function(e){a("DROP"!==e?n.userCancel:n.dropAnimating)}),[a,n.dropAnimating,n.userCancel]),d=_e((function(){o.current&&a(n.resting)}),[a,n.resting]);return Ge((function(){return{dragging:c,dropping:u,resting:d}}),[c,u,d])}var Qn=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Zn(e){return e instanceof Qn(e).HTMLElement}function ei(e){var t=r.useRef({}),n=r.useRef(null),i=r.useRef(null),o=r.useRef(!1),a=_e((function(e,r){var n={id:e,focus:r};return t.current[e]=n,function(){var r=t.current;r[e]!==n&&delete r[e]}}),[]),l=_e((function(r){var t=function(e,r){var t="["+Hn.contextId+'="'+e+'"]',n=fr(document.querySelectorAll(t));if(!n.length)return null;var i=pr(n,(function(e){return e.getAttribute(Hn.draggableId)===r}));return i&&Zn(i)?i:null}(e,r);t&&t!==document.activeElement&&t.focus()}),[e]),c=_e((function(e,r){n.current===e&&(n.current=r)}),[]),u=_e((function(){i.current||o.current&&(i.current=requestAnimationFrame((function(){i.current=null;var e=n.current;e&&l(e)})))}),[l]),s=_e((function(e){n.current=null;var r=document.activeElement;r&&r.getAttribute(Hn.draggableId)===e&&(n.current=e)}),[]);return Yn((function(){return o.current=!0,function(){o.current=!1;var e=i.current;e&&cancelAnimationFrame(e)}}),[]),Ge((function(){return{register:a,tryRecordFocus:s,tryRestoreFocusRecorded:u,tryShiftRecord:c}}),[a,s,u,c])}function ri(){var e={draggables:{},droppables:{}},r=[];function t(e){r.length&&r.forEach((function(r){return r(e)}))}function n(r){return e.draggables[r]||null}function i(r){return e.droppables[r]||null}return{draggable:{register:function(r){e.draggables[r.descriptor.id]=r,t({type:"ADDITION",value:r})},update:function(r,t){var n=e.draggables[t.descriptor.id];n&&n.uniqueId===r.uniqueId&&(delete e.draggables[t.descriptor.id],e.draggables[r.descriptor.id]=r)},unregister:function(r){var i=r.descriptor.id,o=n(i);o&&r.uniqueId===o.uniqueId&&(delete e.draggables[i],t({type:"REMOVAL",value:r}))},getById:function(e){var r=n(e);return r||s(!1),r},findById:n,exists:function(e){return Boolean(n(e))},getAllByType:function(r){return sr(e.draggables).filter((function(e){return e.descriptor.type===r}))}},droppable:{register:function(r){e.droppables[r.descriptor.id]=r},unregister:function(r){var t=i(r.descriptor.id);t&&r.uniqueId===t.uniqueId&&delete e.droppables[r.descriptor.id]},getById:function(e){var r=i(e);return r||s(!1),r},findById:i,exists:function(e){return Boolean(i(e))},getAllByType:function(r){return sr(e.droppables).filter((function(e){return e.descriptor.type===r}))}},subscribe:function(e){return r.push(e),function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}},clean:function(){e.draggables={},e.droppables={},r.length=0}}}var ti=n.createContext(null),ni=function(){var e=document.body;return e||s(!1),e},ii={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var oi=0,ai={separator:"::"};function li(e,r){return void 0===r&&(r=ai),Ge((function(){return""+e+r.separator+oi++}),[r.separator,e])}var ci=n.createContext(null);function ui(e){var t=r.useRef(e);return r.useEffect((function(){t.current=e})),t}var si,di=((si={})[13]=!0,si[9]=!0,si),pi=function(e){di[e.keyCode]&&e.preventDefault()},fi=function(){var e="visibilitychange";return"undefined"==typeof document?e:pr([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}();var gi,vi={type:"IDLE"};function mi(e){var r=e.cancel,t=e.completed,n=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(e){var r=e.button,t=e.clientX,o=e.clientY;if(0===r){var a={x:t,y:o},l=n();if("DRAGGING"===l.type)return e.preventDefault(),void l.actions.move(a);"PENDING"!==l.type&&s(!1);var c=l.point;if(u=c,d=a,Math.abs(d.x-u.x)>=5||Math.abs(d.y-u.y)>=5){var u,d;e.preventDefault();var p=l.actions.fluidLift(a);i({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(e){var i=n();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()):r()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===n().type&&e.preventDefault(),r()}},{eventName:"keydown",fn:function(e){if("PENDING"!==n().type)return 27===e.keyCode?(e.preventDefault(),void r()):void pi(e);r()}},{eventName:"resize",fn:r},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===n().type&&r()}},{eventName:"webkitmouseforcedown",fn:function(e){var t=n();"IDLE"===t.type&&s(!1),t.actions.shouldRespectForcePress()?r():e.preventDefault()}},{eventName:fi,fn:r}]}function bi(e){var t=r.useRef(vi),n=r.useRef(a),i=Ge((function(){return{eventName:"mousedown",fn:function(r){if(!r.defaultPrevented&&0===r.button&&!(r.ctrlKey||r.metaKey||r.shiftKey||r.altKey)){var t=e.findClosestDraggableId(r);if(t){var i=e.tryGetLock(t,u,{sourceEvent:r});if(i){r.preventDefault();var o={x:r.clientX,y:r.clientY};n.current(),f(i,o)}}}}}}),[e]),o=Ge((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(r){if(!r.defaultPrevented){var t=e.findClosestDraggableId(r);if(t){var n=e.findOptionsForDraggable(t);n&&(n.shouldRespectForcePress||e.canGetLock(t)&&r.preventDefault())}}}}}),[e]),l=_e((function(){n.current=c(window,[o,i],{passive:!1,capture:!0})}),[o,i]),u=_e((function(){"IDLE"!==t.current.type&&(t.current=vi,n.current(),l())}),[l]),d=_e((function(){var e=t.current;u(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[u]),p=_e((function(){var e=mi({cancel:d,completed:u,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=c(window,e,{capture:!0,passive:!1})}),[d,u]),f=_e((function(e,r){"IDLE"!==t.current.type&&s(!1),t.current={type:"PENDING",point:r,actions:e},p()}),[p]);Yn((function(){return l(),function(){n.current()}}),[l])}function hi(){}var yi=((gi={})[34]=!0,gi[33]=!0,gi[36]=!0,gi[35]=!0,gi);function xi(e,r){function t(){r(),e.cancel()}return[{eventName:"keydown",fn:function(n){return 27===n.keyCode?(n.preventDefault(),void t()):32===n.keyCode?(n.preventDefault(),r(),void e.drop()):40===n.keyCode?(n.preventDefault(),void e.moveDown()):38===n.keyCode?(n.preventDefault(),void e.moveUp()):39===n.keyCode?(n.preventDefault(),void e.moveRight()):37===n.keyCode?(n.preventDefault(),void e.moveLeft()):void(yi[n.keyCode]?n.preventDefault():pi(n))}},{eventName:"mousedown",fn:t},{eventName:"mouseup",fn:t},{eventName:"click",fn:t},{eventName:"touchstart",fn:t},{eventName:"resize",fn:t},{eventName:"wheel",fn:t,options:{passive:!0}},{eventName:fi,fn:t}]}function Ii(e){var t=r.useRef(hi),n=Ge((function(){return{eventName:"keydown",fn:function(r){if(!r.defaultPrevented&&32===r.keyCode){var n=e.findClosestDraggableId(r);if(n){var o=e.tryGetLock(n,u,{sourceEvent:r});if(o){r.preventDefault();var a=!0,l=o.snapLift();t.current(),t.current=c(window,xi(l,u),{capture:!0,passive:!1})}}}function u(){a||s(!1),a=!1,t.current(),i()}}}}),[e]),i=_e((function(){t.current=c(window,[n],{passive:!1,capture:!0})}),[n]);Yn((function(){return i(),function(){t.current()}}),[i])}var Di={type:"IDLE"};function wi(e){var t=r.useRef(Di),n=r.useRef(a),i=_e((function(){return t.current}),[]),o=_e((function(e){t.current=e}),[]),l=Ge((function(){return{eventName:"touchstart",fn:function(r){if(!r.defaultPrevented){var t=e.findClosestDraggableId(r);if(t){var i=e.tryGetLock(t,d,{sourceEvent:r});if(i){var o=r.touches[0],a={x:o.clientX,y:o.clientY};n.current(),v(i,a)}}}}}}),[e]),u=_e((function(){n.current=c(window,[l],{capture:!0,passive:!1})}),[l]),d=_e((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(Di),n.current(),u())}),[u,o]),p=_e((function(){var e=t.current;d(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[d]),f=_e((function(){var e={capture:!0,passive:!1},r={cancel:p,completed:d,getPhase:i},t=c(window,function(e){var r=e.cancel,t=e.completed,n=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var t=n();if("DRAGGING"===t.type){t.hasMoved=!0;var i=e.touches[0],o={x:i.clientX,y:i.clientY};e.preventDefault(),t.actions.move(o)}else r()}},{eventName:"touchend",fn:function(e){var i=n();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()):r()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===n().type?(e.preventDefault(),r()):r()}},{eventName:"touchforcechange",fn:function(e){var t=n();"IDLE"===t.type&&s(!1);var i=e.touches[0];if(i&&i.force>=.15){var o=t.actions.shouldRespectForcePress();if("PENDING"!==t.type)return o?t.hasMoved?void e.preventDefault():void r():void e.preventDefault();o&&r()}}},{eventName:fi,fn:r}]}(r),e),o=c(window,function(e){var r=e.cancel,t=e.getPhase;return[{eventName:"orientationchange",fn:r},{eventName:"resize",fn:r},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===t().type?(27===e.keyCode&&e.preventDefault(),r()):r()}},{eventName:fi,fn:r}]}(r),e);n.current=function(){t(),o()}}),[p,i,d]),g=_e((function(){var e=i();"PENDING"!==e.type&&s(!1);var r=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:r,hasMoved:!1})}),[i,o]),v=_e((function(e,r){"IDLE"!==i().type&&s(!1);var t=setTimeout(g,120);o({type:"PENDING",point:r,actions:e,longPressTimerId:t}),f()}),[f,i,o,g]);Yn((function(){return u(),function(){n.current();var e=i();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(Di))}}),[i,u,o]),Yn((function(){return c(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}var Ei={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Si(e,r){var t=r.target;return!!Zn(t)&&function e(r,t){if(null==t)return!1;if(Boolean(Ei[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==r&&e(r,t.parentElement)}(e,t)}var Ci=function(e){return $e(e.getBoundingClientRect()).center};var Oi="undefined"==typeof document?"matches":pr(["matches","msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||"matches";function Pi(e,r){return e.closest?e.closest(r):function e(r,t){return null==r?null:r[Oi](t)?r:e(r.parentElement,t)}(e,r)}function Ai(e,r){var t,n=r.target;if(!((t=n)instanceof Qn(t).Element))return null;var i=Pi(n,function(e){return"["+Hn.contextId+'="'+e+'"]'}(e));return i&&Zn(i)?i:null}function Ri(e){e.preventDefault()}function Ni(e){var r=e.expected,t=e.phase,n=e.isLockActive;e.shouldWarn;return!!n()&&r===t}function Bi(e){var r=e.lockAPI,t=e.store,n=e.registry,i=e.draggableId;if(r.isClaimed())return!1;var o=n.draggable.findById(i);return!!o&&(!!o.options.isEnabled&&!!xn(t.getState(),i))}function Ti(e){var r=e.lockAPI,t=e.contextId,n=e.store,i=e.registry,o=e.draggableId,u=e.forceSensorStop,d=e.sourceEvent;if(!Bi({lockAPI:r,store:n,registry:i,draggableId:o}))return null;var p=i.draggable.getById(o),f=function(e,r){var t="["+qn.contextId+'="'+e+'"]',n=pr(fr(document.querySelectorAll(t)),(function(e){return e.getAttribute(qn.id)===r}));return n&&Zn(n)?n:null}(t,p.descriptor.id);if(!f)return null;if(d&&!p.options.canDragInteractiveElements&&Si(f,d))return null;var g=r.claim(u||a),v="PRE_DRAG";function m(){return p.options.shouldRespectForcePress}function b(){return r.isActive(g)}var h=function(e,r){Ni({expected:e,phase:v,isLockActive:b,shouldWarn:!0})&&n.dispatch(r())}.bind(null,"DRAGGING");function y(e){function t(){r.release(),v="COMPLETED"}function i(r,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){var o=c(window,[{eventName:"click",fn:Ri,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(o)}t(),n.dispatch(_t({reason:r}))}return"PRE_DRAG"!==v&&(t(),"PRE_DRAG"!==v&&s(!1)),n.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),v="DRAGGING",l({isActive:function(){return Ni({expected:"DRAGGING",phase:v,isLockActive:b,shouldWarn:!1})},shouldRespectForcePress:m,drop:function(e){return i("DROP",e)},cancel:function(e){return i("CANCEL",e)}},e.actions)}return{isActive:function(){return Ni({expected:"PRE_DRAG",phase:v,isLockActive:b,shouldWarn:!1})},shouldRespectForcePress:m,fluidLift:function(e){var r=Kt((function(e){h((function(){return Nt({client:e})}))}));return l({},y({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return r.cancel()},actions:{move:r}}),{move:r})},snapLift:function(){var e={moveUp:function(){return h(Bt)},moveRight:function(){return h(Mt)},moveDown:function(){return h(Tt)},moveLeft:function(){return h(Lt)}};return y({liftActionArgs:{id:o,clientSelection:Ci(f),movementMode:"SNAP"},cleanup:a,actions:e})},abort:function(){Ni({expected:"PRE_DRAG",phase:v,isLockActive:b,shouldWarn:!0})&&r.release()}}}var Mi=[bi,Ii,wi];function Li(e){var t=e.contextId,n=e.store,i=e.registry,o=e.customSensors,a=e.enableDefaultSensors,l=[].concat(a?Mi:[],o||[]),c=r.useState((function(){return function(){var e=null;function r(){e||s(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(r){return r===e},claim:function(r){e&&s(!1);var t={abandon:r};return e=t,t},release:r,tryAbandon:function(){e&&(e.abandon(),r())}}}()}))[0],u=_e((function(e,r){e.isDragging&&!r.isDragging&&c.tryAbandon()}),[c]);Yn((function(){var e=n.getState();return n.subscribe((function(){var r=n.getState();u(e,r),e=r}))}),[c,n,u]),Yn((function(){return c.tryAbandon}),[c.tryAbandon]);for(var d=_e((function(e){return Bi({lockAPI:c,registry:i,store:n,draggableId:e})}),[c,i,n]),p=_e((function(e,r,o){return Ti({lockAPI:c,registry:i,contextId:t,store:n,draggableId:e,forceSensorStop:r,sourceEvent:o&&o.sourceEvent?o.sourceEvent:null})}),[t,c,i,n]),f=_e((function(e){return function(e,r){var t=Ai(e,r);return t?t.getAttribute(Hn.draggableId):null}(t,e)}),[t]),g=_e((function(e){var r=i.draggable.findById(e);return r?r.options:null}),[i.draggable]),v=_e((function(){c.isClaimed()&&(c.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[c,n]),m=_e(c.isClaimed,[c]),b=Ge((function(){return{canGetLock:d,tryGetLock:p,findClosestDraggableId:f,findOptionsForDraggable:g,tryReleaseLock:v,isLockClaimed:m}}),[d,p,f,g,v,m]),h=0;h<l.length;h++)l[h](b)}function Gi(e){return e.current||s(!1),e.current}function _i(e){var t=e.contextId,i=e.setCallbacks,o=e.sensors,a=e.nonce,c=e.dragHandleUsageInstructions,u=e.fluidScrollerOptions,s=r.useRef(null),d=ui(e),p=_e((function(){return function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(d.current)}),[d]),f=function(e){var t=Ge((function(){return function(e){return"rbd-announcement-"+e}(e)}),[e]),n=r.useRef(null);return r.useEffect((function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),l(e.style,ii),ni().appendChild(e),function(){setTimeout((function(){var r=ni();r.contains(e)&&r.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),_e((function(e){var r=n.current;r&&(r.textContent=e)}),[])}(t),g=function(e){var t=e.contextId,n=e.text,i=li("hidden-text",{separator:"-"}),o=Ge((function(){return"rbd-hidden-text-"+(e={contextId:t,uniqueId:i}).contextId+"-"+e.uniqueId;var e}),[i,t]);return r.useEffect((function(){var e=document.createElement("div");return e.id=o,e.textContent=n,e.style.display="none",ni().appendChild(e),function(){var r=ni();r.contains(e)&&r.removeChild(e)}}),[o,n]),o}({contextId:t,text:c}),v=Kn(t,a),m=_e((function(e){Gi(s).dispatch(e)}),[]),b=Ge((function(){return C({publishWhileDragging:Ct,updateDroppableScroll:Pt,updateDroppableIsEnabled:At,updateDroppableIsCombineEnabled:Rt,collectionStarting:Ot},m)}),[m]),h=function(){var e=Ge(ri,[]);return r.useEffect((function(){return function(){requestAnimationFrame(e.clean)}}),[e]),e}(),y=Ge((function(){return yn(h,b)}),[h,b]),x=r.useRef(u),I=Ge((function(){return Un(l({scrollWindow:In,scrollDroppable:y.scrollDroppable},C({move:Nt},m),{fluidScrollerOptions:x.current}))}),[y.scrollDroppable,m]),D=ei(t),w=Ge((function(){return dn({announce:f,autoScroller:I,dimensionMarshal:y,focusMarshal:D,getResponders:p,styleMarshal:v})}),[f,I,y,D,p,v]);s.current=w;var E=_e((function(){var e=Gi(s);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),S=_e((function(){var e=Gi(s).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);i(Ge((function(){return{isDragging:S,tryAbort:E}}),[S,E]));var O=_e((function(e){return xn(Gi(s).getState(),e)}),[]),P=_e((function(){return lt(Gi(s).getState())}),[]),A=Ge((function(){return{marshal:y,focus:D,contextId:t,canLift:O,isMovementAllowed:P,dragHandleUsageInstructionsId:g,registry:h,fluidScrollerOptions:u}}),[t,y,g,D,O,P,h,u]);return Li({contextId:t,store:w,registry:h,customSensors:o,enableDefaultSensors:!1!==e.enableDefaultSensors}),r.useEffect((function(){return E}),[E]),n.createElement(ci.Provider,{value:A},n.createElement(Y,{context:ti,store:w},e.children))}var Fi=0;var ji=function(e){return function(r){return e===r}},ki=ji("scroll"),Wi=ji("auto"),Ui=function(e,r){return r(e.overflowX)||r(e.overflowY)},Hi=function e(r){return null==r||r===document.body||r===document.documentElement?null:function(e){var r=window.getComputedStyle(e),t={overflowX:r.overflowX,overflowY:r.overflowY};return!(e instanceof HTMLElement&&e.dataset.dndIgnoreScrollable)&&(Ui(t,ki)||Ui(t,Wi))}(r)?r:e(r.parentElement)},qi=function(e){return{x:e.scrollLeft,y:e.scrollTop}},Vi=function(e){return{closestScrollable:Hi(e),isFixedOnPage:function e(r){return!!r&&("fixed"===window.getComputedStyle(r).position||e(r.parentElement))}(e)}},zi=function(e){var r=e.ref,t=e.descriptor,n=e.env,i=e.windowScroll,o=e.direction,a=e.isDropDisabled,l=e.isCombineEnabled,c=e.shouldClipSubject,u=n.closestScrollable,s=function(e,r){var t=tr(e);if(!r)return t;if(e!==r)return t;var n=t.paddingBox.top-r.scrollTop,i=t.paddingBox.left-r.scrollLeft,o=n+r.scrollHeight,a=i+r.scrollWidth,l=Ye({top:n,right:a,bottom:o,left:i},t.border);return Ke({borderBox:l,margin:t.margin,border:t.border,padding:t.padding})}(r,u),d=er(s,i),p=function(){if(!u)return null;var e=tr(u),r={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:e,page:er(e,i),scroll:qi(u),scrollSize:r,shouldClipSubject:c}}();return function(e){var r=e.descriptor,t=e.isEnabled,n=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,a=e.client,l=e.page,c=e.closest,u=function(){if(!c)return null;var e=c.scrollSize,r=c.client,t=pn({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:r.paddingBox.height,width:r.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:r,scrollSize:e,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:t,diff:{value:Fe,displacement:Fe}}}}(),s="vertical"===o?Ar:Rr;return{descriptor:r,isCombineEnabled:n,isFixedOnPage:i,axis:s,isEnabled:t,client:a,page:l,frame:u,subject:ar({page:l,withPlaceholder:null,axis:s,frame:u})}}({descriptor:t,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:n.isFixedOnPage,direction:o,client:s,page:d,closest:p})},$i={passive:!1},Yi={passive:!0},Ji=function(e){return e.shouldPublishImmediately?$i:Yi};function Xi(e){var t=r.useContext(e);return t||s(!1),t}var Ki=function(e){return e&&e.env.closestScrollable||null};function Qi(){}var Zi={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},eo=function(e){var r=e.isAnimatingOpenOnMount,t=e.placeholder,n=e.animate,i=function(e){var r=e.isAnimatingOpenOnMount,t=e.placeholder,n=e.animate;return r||"close"===n?Zi:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin}}({isAnimatingOpenOnMount:r,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==n?Ht.placeholder:null}};var ro=n.memo((function(e){var t=r.useRef(null),i=_e((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),o=e.animate,a=e.onTransitionEnd,l=e.onClose,c=e.contextId,u=r.useState("open"===e.animate),s=u[0],d=u[1];r.useEffect((function(){return s?"open"!==o?(i(),d(!1),Qi):t.current?Qi:(t.current=setTimeout((function(){t.current=null,d(!1)})),i):Qi}),[o,s,i]);var p=_e((function(e){"height"===e.propertyName&&(a(),"close"===o&&l())}),[o,l,a]),f=eo({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return n.createElement(e.placeholder.tagName,{style:f,"data-rbd-placeholder-context-id":c,onTransitionEnd:p,ref:e.innerRef})})),to=n.createContext(null),no=function(e){function r(){for(var r,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(r=e.call.apply(e,[this].concat(n))||this).state={isVisible:Boolean(r.props.on),data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){"close"===r.state.animate&&r.setState({isVisible:!1})},r}return o(r,e),r.getDerivedStateFromProps=function(e,r){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:r.isVisible?{isVisible:!0,data:r.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},r.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},r}(n.PureComponent),io=5e3,oo=4500,ao=function(e,r){return r?Ht.drop(r.duration):e?Ht.snap:Ht.fluid},lo=function(e,r){return e?r?kt.drop:kt.combining:null};function co(e){return"DRAGGING"===e.type?function(e){var r=e.dimension.client,t=e.offset,n=e.combineWith,i=e.dropping,o=Boolean(n),a=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(e),l=Boolean(i),c=l?zt(t,o):Vt(t);return{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:ao(a,i),transform:c,opacity:lo(o,l),zIndex:l?oo:io,pointerEvents:"none"}}(e):{transform:Vt((r=e).offset),transition:r.shouldAnimateDisplacement?null:"none"};var r}function uo(e){var t=li("draggable"),n=e.descriptor,i=e.registry,o=e.getDraggableRef,a=e.canDragInteractiveElements,l=e.shouldRespectForcePress,c=e.isEnabled,u=Ge((function(){return{canDragInteractiveElements:a,shouldRespectForcePress:l,isEnabled:c}}),[a,c,l]),d=_e((function(e){var r=o();return r||s(!1),function(e,r,t){void 0===t&&(t=Fe);var n=window.getComputedStyle(r),i=r.getBoundingClientRect(),o=rr(i,n),a=er(o,t);return{descriptor:e,placeholder:{client:o,tagName:r.tagName.toLowerCase(),display:n.display},displaceBy:{x:o.marginBox.width,y:o.marginBox.height},client:o,page:a}}(n,r,e)}),[n,o]),p=Ge((function(){return{uniqueId:t,descriptor:n,options:u,getDimension:d}}),[n,d,u,t]),f=r.useRef(p),g=r.useRef(!0);Yn((function(){return i.draggable.register(f.current),function(){return i.draggable.unregister(f.current)}}),[i.draggable]),Yn((function(){if(g.current)g.current=!1;else{var e=f.current;f.current=p,i.draggable.update(p,e)}}),[p,i.draggable])}function so(e){e.preventDefault()}var po=function(e,r){return e===r},fo=function(e){var r=e.combine,t=e.destination;return t?t.droppableId:r?r.droppableId:null};function go(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var vo={mapped:{type:"SECONDARY",offset:Fe,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:go(null)}};var mo=Me((function(){var e,r,t,n=(e=ur((function(e,r){return{x:e,y:r}})),r=ur((function(e,r,t,n,i){return{isDragging:!0,isClone:r,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:t,combineWith:n,combineTargetFor:null}})),t=ur((function(e,t,n,i,o,a,l){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:a,mode:t,offset:e,dimension:n,forceShouldAnimate:l,snapshot:r(t,i,o,a,null)}}})),function(n,i){if(n.isDragging){if(n.critical.draggable.id!==i.draggableId)return null;var o=n.current.client.offset,a=n.dimensions.draggables[i.draggableId],l=ot(n.impact),c=(s=n.impact).at&&"COMBINE"===s.at.type?s.at.combine.draggableId:null,u=n.forceShouldAnimate;return t(e(o.x,o.y),n.movementMode,a,i.isClone,l,c,u)}var s;if("DROP_ANIMATING"===n.phase){var d=n.completed;if(d.result.draggableId!==i.draggableId)return null;var p=i.isClone,f=n.dimensions.draggables[i.draggableId],g=d.result,v=g.mode,m=fo(g),b=function(e){return e.combine?e.combine.draggableId:null}(g),h={duration:n.dropDuration,curve:jt,moveTo:n.newHomeClientOffset,opacity:b?kt.drop:null,scale:b?Wt.drop:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:f,dropping:h,draggingOver:m,combineWith:b,mode:v,forceShouldAnimate:null,snapshot:r(v,p,m,b,h)}}}return null}),i=function(){var e=ur((function(e,r){return{x:e,y:r}})),r=ur(go),t=ur((function(e,t,n){return void 0===t&&(t=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:t,shouldAnimateDisplacement:n,snapshot:r(t)}}})),n=function(e){return e?t(Fe,e,!0):null},i=function(r,i,o,a){var l=o.displaced.visible[r],c=Boolean(a.inVirtualList&&a.effected[r]),u=xr(o),s=u&&u.draggableId===r?i:null;if(!l){if(!c)return n(s);if(o.displaced.invisible[r])return null;var d=Ue(a.displacedBy.point),p=e(d.x,d.y);return t(p,s,!0)}if(c)return n(s);var f=o.displacedBy.point,g=e(f.x,f.y);return t(g,s,l.shouldAnimate)};return function(e,r){if(e.isDragging)return e.critical.draggable.id===r.draggableId?null:i(r.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var t=e.completed;return t.result.draggableId===r.draggableId?null:i(r.draggableId,t.result.draggableId,t.impact,t.afterCritical)}return null}}();return function(e,r){return n(e,r)||i(e,r)||vo}}),{dropAnimationFinished:Ft},null,{context:ti,pure:!0,areStatePropsEqual:po})((function(e){var t=r.useRef(null),n=_e((function(e){t.current=e}),[]),i=_e((function(){return t.current}),[]),o=Xi(ci),a=o.contextId,l=o.dragHandleUsageInstructionsId,c=o.registry,u=Xi(to),s=u.type,d=u.droppableId,p=Ge((function(){return{id:e.draggableId,index:e.index,type:s,droppableId:d}}),[e.draggableId,e.index,s,d]),f=e.children,g=e.draggableId,v=e.isEnabled,m=e.shouldRespectForcePress,b=e.canDragInteractiveElements,h=e.isClone,y=e.mapped,x=e.dropAnimationFinished;h||uo(Ge((function(){return{descriptor:p,registry:c,getDraggableRef:i,canDragInteractiveElements:b,shouldRespectForcePress:m,isEnabled:v}}),[p,c,i,b,m,v]));var I=Ge((function(){return v?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":g,"data-rbd-drag-handle-context-id":a,draggable:!1,onDragStart:so}:null}),[a,l,g,v]),D=_e((function(e){"DRAGGING"===y.type&&y.dropping&&"transform"===e.propertyName&&x()}),[x,y]),w=Ge((function(){var e=co(y),r="DRAGGING"===y.type&&y.dropping?D:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":a,"data-rbd-draggable-id":g,style:e,onTransitionEnd:r},dragHandleProps:I}}),[a,I,g,y,D,n]),E=Ge((function(){return{draggableId:p.id,type:p.type,source:{index:p.index,droppableId:p.droppableId}}}),[p.droppableId,p.id,p.index,p.type]);return f(w,y.snapshot,E)}));function bo(e){return Xi(to).isUsingCloneFor!==e.draggableId||e.isClone?n.createElement(mo,e):null}var ho=function(e,r){return e===r.droppable.type},yo=function(e,r){return r.draggables[e.draggable.id]};var xo={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||s(!1),document.body}},Io=Me((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},r=l({},e,{shouldAnimatePlaceholder:!1}),t=ur((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),n=ur((function(n,i,o,a,l,c){var u=l.descriptor.id;if(l.descriptor.droppableId===n){var s=c?{render:c,dragging:t(l.descriptor)}:null,d={isDraggingOver:o,draggingOverWith:o?u:null,draggingFromThisWith:u,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!1,snapshot:d,useClone:s}}if(!i)return r;if(!a)return e;var p={isDraggingOver:o,draggingOverWith:u,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!0,snapshot:p,useClone:null}}));return function(t,i){var o=i.droppableId,a=i.type,l=!i.isDropDisabled,c=i.renderClone;if(t.isDragging){var u=t.critical;if(!ho(a,u))return r;var s=yo(u,t.dimensions),d=ot(t.impact)===o;return n(o,l,d,d,s,c)}if("DROP_ANIMATING"===t.phase){var p=t.completed;if(!ho(a,p.critical))return r;var f=yo(p.critical,t.dimensions);return n(o,l,fo(p.result)===o,ot(p.impact)===o,f,c)}if("IDLE"===t.phase&&t.completed&&!t.shouldFlush){var g=t.completed;if(!ho(a,g.critical))return r;var v=ot(g.impact)===o,m=Boolean(g.impact.at&&"COMBINE"===g.impact.at.type),b=g.critical.droppable.id===o;return v?m?e:r:b?e:r}return r}}),{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:ti,pure:!0,areStatePropsEqual:po})((function(e){var t=r.useContext(ci);t||s(!1);var o=t.contextId,a=t.isMovementAllowed,l=r.useRef(null),c=r.useRef(null),u=e.children,d=e.droppableId,p=e.type,f=e.mode,g=e.direction,v=e.ignoreContainerClipping,m=e.isDropDisabled,b=e.isCombineEnabled,h=e.snapshot,y=e.useClone,x=e.updateViewportMaxScroll,I=e.getContainerForClone,D=_e((function(){return l.current}),[]),w=_e((function(e){l.current=e}),[]),E=(_e((function(){return c.current}),[]),_e((function(e){c.current=e}),[])),S=_e((function(){a()&&x({maxScroll:gn()})}),[a,x]);!function(e){var t=r.useRef(null),n=Xi(ci),i=li("droppable"),o=n.registry,a=n.marshal,l=ui(e),c=Ge((function(){return{id:e.droppableId,type:e.type,mode:e.mode}}),[e.droppableId,e.mode,e.type]),u=r.useRef(c),d=Ge((function(){return ur((function(e,r){t.current||s(!1);var n={x:e,y:r};a.updateDroppableScroll(c.id,n)}))}),[c.id,a]),p=_e((function(){var e=t.current;return e&&e.env.closestScrollable?qi(e.env.closestScrollable):Fe}),[]),f=_e((function(){var e=p();d(e.x,e.y)}),[p,d]),g=Ge((function(){return Kt(f)}),[f]),v=_e((function(){var e=t.current,r=Ki(e);e&&r||s(!1),e.scrollOptions.shouldPublishImmediately?f():g()}),[g,f]),m=_e((function(e,r){t.current&&s(!1);var i=l.current,o=i.getDroppableRef();o||s(!1);var a=Vi(o),u={ref:o,descriptor:c,env:a,scrollOptions:r};t.current=u;var d=zi({ref:o,descriptor:c,env:a,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping}),p=a.closestScrollable;return p&&(p.setAttribute(zn.contextId,n.contextId),p.addEventListener("scroll",v,Ji(u.scrollOptions))),d}),[n.contextId,c,v,l]),b=_e((function(){var e=t.current,r=Ki(e);return e&&r||s(!1),qi(r)}),[]),h=_e((function(){var e=t.current;e||s(!1);var r=Ki(e);t.current=null,r&&(g.cancel(),r.removeAttribute(zn.contextId),r.removeEventListener("scroll",v,Ji(e.scrollOptions)))}),[v,g]),y=_e((function(e){var r=t.current;r||s(!1);var n=Ki(r);n||s(!1),n.scrollTop+=e.y,n.scrollLeft+=e.x}),[]),x=Ge((function(){return{getDimensionAndWatchScroll:m,getScrollWhileDragging:b,dragStopped:h,scroll:y}}),[h,m,b,y]),I=Ge((function(){return{uniqueId:i,descriptor:c,callbacks:x}}),[x,c,i]);Yn((function(){return u.current=I.descriptor,o.droppable.register(I),function(){t.current&&h(),o.droppable.unregister(I)}}),[x,c,h,I,a,o.droppable]),Yn((function(){t.current&&a.updateDroppableIsEnabled(u.current.id,!e.isDropDisabled)}),[e.isDropDisabled,a]),Yn((function(){t.current&&a.updateDroppableIsCombineEnabled(u.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,a])}({droppableId:d,type:p,mode:f,direction:g,isDropDisabled:m,isCombineEnabled:b,ignoreContainerClipping:v,getDroppableRef:D});var C=n.createElement(no,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var r=e.onClose,t=e.data,i=e.animate;return n.createElement(ro,{placeholder:t,onClose:r,innerRef:E,animate:i,contextId:o,onTransitionEnd:S})})),O=Ge((function(){return{innerRef:w,placeholder:C,droppableProps:{"data-rbd-droppable-id":d,"data-rbd-droppable-context-id":o}}}),[o,d,C,w]),P=y?y.dragging.draggableId:null,A=Ge((function(){return{droppableId:d,type:p,isUsingCloneFor:P}}),[d,P,p]);return n.createElement(to.Provider,{value:A},u(O,h),function(){if(!y)return null;var e=y.dragging,r=y.render,t=n.createElement(bo,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(t,n){return r(t,n,e)}));return i.createPortal(t,I())}())}));Io.defaultProps=xo,e.DragDropContext=function(e){var r=Ge((function(){return""+Fi++}),[]),t=e.dragHandleUsageInstructions||m;return n.createElement(d,null,(function(i){return n.createElement(_i,{nonce:e.nonce,contextId:r,setCallbacks:i,dragHandleUsageInstructions:t,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,fluidScrollerOptions:e.fluidScrollerOptions},e.children)}))},e.Draggable=function(e){var r="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,t=Boolean(e.disableInteractiveElementBlocking),i=Boolean(e.shouldRespectForcePress);return n.createElement(bo,l({},e,{isClone:!1,isEnabled:r,canDragInteractiveElements:t,shouldRespectForcePress:i}))},e.Droppable=Io,e.resetServerContext=function(){Fi=0,oi=0},e.useKeyboardSensor=Ii,e.useMouseSensor=bi,e.useTouchSensor=wi,Object.defineProperty(e,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/react-beautiful-dnd",
3
- "version": "13.2.1",
3
+ "version": "13.3.0",
4
4
  "description": "Beautiful and accessible drag and drop for lists with React",
5
5
  "author": "Front End Systems Engineering <frontend@planningcenter.com>",
6
6
  "keywords": [
@@ -24,6 +24,10 @@ const isElementScrollable = (el: Element): boolean => {
24
24
  overflowY: style.overflowY,
25
25
  };
26
26
 
27
+ if (el instanceof HTMLElement && el.dataset.dndIgnoreScrollable) {
28
+ return false;
29
+ }
30
+
27
31
  return isEither(overflow, isScroll) || isEither(overflow, isAuto);
28
32
  };
29
33