react-beautiful-dnd
Version:
Beautiful, accessible drag and drop for lists with React.js
1 lines • 114 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(e.ReactBeautifulDnd={},e.React)}(this,function(e,x){"use strict";var h="default"in x?x.default:x,t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,t){return e(t={exports:{}},t.exports),t.exports}var v=r(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),m=r(function(e){var t=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=t)}),b=(m.version,function(r,o,e){if(function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!")}(r),void 0===o)return r;switch(e){case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}),o=function(e){return"object"==typeof e?null!==e:"function"==typeof e},a=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e},i=function(e){try{return!!e()}catch(e){return!0}},l=!i(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),s=v.document,u=o(s)&&o(s.createElement),c=function(e){return u?s.createElement(e):{}},p=!l&&!i(function(){return 7!=Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a}),d=Object.defineProperty,f={f:l?Object.defineProperty:function(e,t,n){if(a(e),t=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}(t,!0),a(n),p)try{return d(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},y=l?function(e,t,n){return f.f(e,t,{enumerable:!((r=1)&r),configurable:!(2&r),writable:!(4&r),value:n});var r}:function(e,t,n){return e[t]=n,e},g={}.hasOwnProperty,w=function(e,t){return g.call(e,t)},S="prototype",D=function(e,t,n){var r,o,i,a=e&D.F,l=e&D.G,s=e&D.S,u=e&D.P,c=e&D.B,p=e&D.W,d=l?m:m[t]||(m[t]={}),f=d[S],g=l?v:s?v[t]:(v[t]||{})[S];for(r in l&&(n=t),n)(o=!a&&g&&void 0!==g[r])&&w(d,r)||(i=o?g[r]:n[r],d[r]=l&&"function"!=typeof g[r]?n[r]:c&&o?b(i,v):p&&g[r]==i?function(r){var e=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return r.apply(this,arguments)};return e[S]=r[S],e}(i):u&&"function"==typeof i?b(Function.call,i):i,u&&((d.virtual||(d.virtual={}))[r]=i,e&D.R&&f&&!f[r]&&y(f,r,i)))};D.F=1,D.G=2,D.S=4,D.P=8,D.B=16,D.W=32,D.U=64,D.R=128;var I,O=D,P={}.toString,E=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==(t=e,P.call(t).slice(8,-1))?e.split(""):Object(e);var t},C=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},M=function(e){return E(C(e))},T=Math.ceil,R=Math.floor,N=function(e){return isNaN(e=+e)?0:(0<e?R:T)(e)},B=Math.min,A=Math.max,_=Math.min,j=r(function(e){var t="__core-js_shared__",n=v[t]||(v[t]={});(e.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:m.version,mode:"pure",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})}),L=0,k=Math.random(),U=j("keys"),W=function(e){return U[e]||(U[e]="Symbol(".concat(void 0===(t=e)?"":t,")_",(++L+k).toString(36)));var t},G=(I=!1,function(e,t,n){var r,o,i,a,l=M(e),s=0<(r=l.length)?B(N(r),9007199254740991):0,u=(i=s,(o=N(o=n))<0?A(o+i,0):_(o,i));if(I&&t!=t){for(;u<s;)if((a=l[u++])!=a)return!0}else for(;u<s;u++)if((I||u in l)&&l[u]===t)return I||u||0;return!I&&-1}),q=W("IE_PROTO"),F="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),V=Object.keys||function(e){return function(e,t){var n,r=M(e),o=0,i=[];for(n in r)n!=q&&w(r,n)&&i.push(n);for(;t.length>o;)w(r,n=t[o++])&&(~G(i,n)||i.push(n));return i}(e,F)},H={f:Object.getOwnPropertySymbols},z={f:{}.propertyIsEnumerable},Y=function(e){return Object(C(e))},J=Object.assign,K=!J||i(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=J({},e)[n]||Object.keys(J({},t)).join("")!=r})?function(e,t){for(var n=Y(e),r=arguments.length,o=1,i=H.f,a=z.f;o<r;)for(var l,s=E(arguments[o++]),u=i?V(s).concat(i(s)):V(s),c=u.length,p=0;p<c;)a.call(s,l=u[p++])&&(n[l]=s[l]);return n}:J;O(O.S+O.F,"Object",{assign:K});var X=m.Object.assign;function Q(){return(Q=X||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Z=l?Object.defineProperties:function(e,t){a(e);for(var n,r=V(t),o=r.length,i=0;i<o;)f.f(e,n=r[i++],t[n]);return e},$=v.document,ee=$&&$.documentElement,te=W("IE_PROTO"),ne=function(){},re="prototype",oe=function(){var e,t=c("iframe"),n=F.length;for(t.style.display="none",ee.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),oe=e.F;n--;)delete oe[re][F[n]];return oe()},ie=Object.create||function(e,t){var n;return null!==e?(ne[re]=a(e),n=new ne,ne[re]=null,n[te]=e):n=oe(),void 0===t?n:Z(n,t)};O(O.S,"Object",{create:ie});var ae,le=m.Object,se=function(e,t){return le.create(e,t)};function ue(e,t){e.prototype=se(t.prototype),(e.prototype.constructor=e).__proto__=t}ae="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")();var ce,pe,de=("function"==typeof(pe=ae.Symbol)?pe.observable?ce=pe.observable:(ce=pe("observable"),pe.observable=ce):ce="@@observable",ce),fe={INIT:"@@redux/INIT"+Math.random().toString(36).substring(7).split("").join("."),REPLACE:"@@redux/REPLACE"+Math.random().toString(36).substring(7).split("").join(".")},ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function ve(e,t,n){var r;if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(ve)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,a=[],l=a,s=!1;function u(){l===a&&(l=a.slice())}function c(){if(s)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 i}function p(t){if("function"!=typeof t)throw new Error("Expected the listener to be a function.");if(s)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#subscribe(listener) for more details.");var n=!0;return u(),l.push(t),function(){if(n){if(s)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");n=!1,u();var e=l.indexOf(t);l.splice(e,1)}}}function d(e){if(!function(e){if("object"!==(void 0===e?"undefined":ge(e))||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(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(s)throw new Error("Reducers may not dispatch actions.");try{s=!0,i=o(i,e)}finally{s=!1}for(var t=a=l,n=0;n<t.length;n++){(0,t[n])()}return e}return d({type:fe.INIT}),(r={dispatch:d,subscribe:p,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");o=e,d({type:fe.REPLACE})}})[de]=function(){var e,n=p;return(e={subscribe:function(e){if("object"!==(void 0===e?"undefined":ge(e))||null===e)throw new TypeError("Expected the observer to be an object.");function t(){e.next&&e.next(c())}return t(),{unsubscribe:n(t)}}})[de]=function(){return this},e},r}function me(e,t){return function(){return t(e.apply(this,arguments))}}function be(e,t){if("function"==typeof e)return me(e,t);if("object"!==(void 0===e?"undefined":ge(e))||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":void 0===e?"undefined":ge(e))+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),r={},o=0;o<n.length;o++){var i=n[o],a=e[i];"function"==typeof a&&(r[i]=me(a,t))}return r}function ye(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function we(e){return function(){return e}}var xe=function(){};xe.thatReturns=we,xe.thatReturnsFalse=we(!1),xe.thatReturnsTrue=we(!0),xe.thatReturnsNull=we(null),xe.thatReturnsThis=function(){return this},xe.thatReturnsArgument=function(e){return e};var Se=xe;var De=function(e,t,n,r,o,i,a,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,i,a,l],c=0;(s=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}},Ie=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;(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 t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}})()&&Object.assign;var Ee=r(function(e){e.exports=function(){function e(e,t,n,r,o,i){"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i&&De(!1,"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")}function t(){return e}var n={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=Se,n.PropTypes=n}()}),Ce="Invariant failed",Me=function(e,t){if(!e)throw new Error(Ce)},Te=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},Re=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Ne={top:0,right:0,bottom:0,left:0},Be=function(e){var t,n,r=e.borderBox,o=e.margin,i=void 0===o?Ne:o,a=e.border,l=void 0===a?Ne:a,s=e.padding,u=void 0===s?Ne:s,c=Te((n=i,{top:(t=r).top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right})),p=Te(Re(r,l)),d=Te(Re(p,u));return{marginBox:c,borderBox:Te(r),paddingBox:p,contentBox:d,margin:i,border:l,padding:u}},Ae=function(e){return parseInt(e,10)},_e=function(e){var t,n,r,o,i,a,l,s,u,c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{x:window.pageXOffset,y:window.pageYOffset};return n=c,i=(t=e).borderBox,a=t.border,l=t.margin,s=t.padding,o=n,u={top:(r=i).top+o.y,left:r.left+o.x,bottom:r.bottom+o.y,right:r.right+o.x},Be({borderBox:u,border:a,margin:l,padding:s})},je=function(e,t){var n={top:Ae(t.marginTop),right:Ae(t.marginRight),bottom:Ae(t.marginBottom),left:Ae(t.marginLeft)},r={top:Ae(t.paddingTop),right:Ae(t.paddingRight),bottom:Ae(t.paddingBottom),left:Ae(t.paddingLeft)},o={top:Ae(t.borderTopWidth),right:Ae(t.borderRightWidth),bottom:Ae(t.borderBottomWidth),left:Ae(t.borderLeftWidth)};return Be({borderBox:e,margin:n,padding:r,border:o})},Le=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return je(t,n)},ke={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Ue={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},We={x:0,y:0},Ge=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},qe=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},Fe=function(e,t){return e.x===t.x&&e.y===t.y},Ve=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},He=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},ze=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},Ye=function(t,e){return Math.min.apply(Math,e.map(function(e){return ze(t,e)}))},Je=function(t){return function(e){return{x:t(e.x),y:t(e.y)}}},Ke=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},Xe=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}]},Qe=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,o=e.width,i=qe({x:n,y:t},{x:o,y:r});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},Ze=function(e,t){var n=Te({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},$e=function(e,t){return e===t};function et(r){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:$e,o=void 0,i=[],a=void 0,l=!1,s=function(e,t){return n(e,i[t])};return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return l&&o===this&&t.length===i.length&&t.every(s)?a:(l=!0,o=this,i=t,a=r.apply(this,t))}}var tt,nt,rt,ot;tt="keys",nt=function(){return function(e){return V(Y(e))}},rt=(m.Object||{})[tt]||Object[tt],(ot={})[tt]=nt(rt),O(O.S+O.F*i(function(){rt(1)}),"Object",ot);var it=m.Object.keys,at=et(function(t){return it(t).map(function(e){return t[e]})}),lt=et(function(t){return it(t).map(function(e){return t[e]})}),st=et(function(t,e){return lt(e).filter(function(e){return t.descriptor.id===e.descriptor.droppableId}).sort(function(e,t){return e.descriptor.index-t.descriptor.index})}),ut=function(t,n){return function(e){return e<=n&&t<=e}},ct=function(e){var t=ut(e.top,e.bottom),n=ut(e.left,e.right);return function(e){return t(e.y)&&t(e.y)&&n(e.x)&&n(e.x)}},pt=et(function(n,e,r){var t=function(e){var t=n.page.marginBox[r.axis.size];return t<=e?null:He(r.axis.line,t-e)},o=st(r,e);if(!o.length)return t(r.page.marginBox[r.axis.size]);var i=o[o.length-1].page.marginBox[r.axis.end];return t(r.page.marginBox[r.axis.end]-i)}),dt=et(function(e,t){return Te((r=t,{top:(n=e).top-r.y,left:n.left-r.x,right:n.right+r.x,bottom:n.bottom+r.y}));var n,r}),ft=function(e){var n=e.target,r=e.draggable,o=e.draggables,t=e.droppables,i=e.previousDroppableOverId,a=at(t).filter(function(e){return e.isEnabled}).find(function(e){var t=function(e){var t=e.draggable,n=e.draggables,r=e.droppable,o=e.previousDroppableOverId,i=t.descriptor.droppableId===r.descriptor.id,a=Boolean(o&&o===r.descriptor.id),l=r.viewport.clippedPageMarginBox;if(!l)return l;if(i||!a)return l;var s=pt(t,n,r);if(!s)return l;var u=dt(l,s),c=r.viewport.closestScrollable;return c&&c.shouldClipSubject?Ze(c.framePageMarginBox,u):u}({draggable:r,draggables:o,droppable:e,previousDroppableOverId:i});return!!t&&ct(t)(n)});return a?a.descriptor.id:null},gt={movement:{displaced:[],amount:We,isBeyondStartPosition:!1},direction:null,destination:null},ht=et(function(e){return e.reduce(function(e,t){return e[t.draggableId]=t,e},{})}),vt=function(i){var a=ut(i.top,i.bottom),l=ut(i.left,i.right);return function(e){if(a(e.top)&&a(e.bottom)&&l(e.left)&&l(e.right))return!0;var t=a(e.top)||a(e.bottom),n=l(e.left)||l(e.right);if(t&&n)return!0;var r=e.top<i.top&&e.bottom>i.bottom,o=e.left<i.left&&e.right>i.right;return!(!r||!o)||(r&&n||o&&t)}},mt=function(e){var t=ut(e.top,e.bottom),n=ut(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},bt=function(e){var t=e.target,n=e.destination,r=e.viewport,o=e.isVisibleThroughFrameFn,i=n.viewport.closestScrollable?n.viewport.closestScrollable.scroll.diff.displacement:We,a=Ke(t,i);if(!n.viewport.clippedPageMarginBox)return!1;var l=o(n.viewport.clippedPageMarginBox)(a),s=o(r)(a);return l&&s},yt=function(e){var t=e.target,n=e.destination,r=e.viewport;return bt({target:t,destination:n,viewport:r,isVisibleThroughFrameFn:mt})},wt=function(e){var t,n,r,o,i=e.draggable,a=e.destination,l=e.previousImpact,s=e.viewport,u=i.descriptor.id,c=ht(l.movement.displaced),p=(t={target:i.page.marginBox,destination:a,viewport:s},n=t.target,r=t.destination,o=t.viewport,bt({target:n,destination:r,viewport:o,isVisibleThroughFrameFn:vt})),d=function(){if(!p)return!1;var e=c[u];return!e||e.shouldAnimate}();return{draggableId:u,isVisible:p,shouldAnimate:d}},xt=function(e,t){var n=e.viewport.closestScrollable;return n?Ge(t,n.scroll.diff.value):t},St=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.draggables,o=e.droppables,i=e.previousImpact,a=e.viewport,l=i.destination&&i.destination.droppableId,s=ft({target:t,draggable:n,draggables:r,droppables:o,previousDroppableOverId:l});if(!s)return gt;var u=o[s];if(!u.isEnabled)return gt;var c,p,d,f,g,h,v,m,b,y,w,x,S,D,I,O,P,E,C,M,T,R,N,B,A,_,j,L,k=o[n.descriptor.droppableId],U=k.descriptor.id===s,W=st(u,r);return U?(f=(c={pageBorderBoxCenter:t,draggable:n,home:k,insideHome:W,previousImpact:i||gt,viewport:a}).pageBorderBoxCenter,g=c.draggable,h=c.home,v=c.insideHome,m=c.previousImpact,b=c.viewport,y=h.axis,w=g.page.borderBox.center,x=xt(h,f),S=0<x[y.line]-w[y.line],D=He(y.line,g.client.marginBox[y.size]),I=v.filter(function(e){if(e===g)return!1;var t=e.page.borderBox;return S?!(t.center[y.line]<w[y.line])&&x[y.line]>t[y.start]:!(w[y.line]<t.center[y.line])&&x[y.line]<t[y.end]}).map(function(e){return wt({draggable:e,destination:h,previousImpact:m,viewport:b.frame})}),O=S?I.reverse():I,p=g.descriptor.index,P=(d=O.length)?S?p+d:p-d:p,{movement:{amount:D,displaced:O,isBeyondStartPosition:S},direction:y.direction,destination:{droppableId:h.descriptor.id,index:P}}):(C=(E={pageBorderBoxCenter:t,draggable:n,destination:u,insideDestination:W,previousImpact:i||gt,viewport:a}).pageBorderBoxCenter,M=E.draggable,T=E.destination,R=E.insideDestination,N=E.previousImpact,B=E.viewport,A=T.axis,_=xt(T,C),j=R.filter(function(e){return e.page.borderBox[A.end]>_[A.line]}).map(function(e){return wt({draggable:e,destination:T,previousImpact:N,viewport:B.frame})}),L=R.length-j.length,{movement:{amount:He(A.line,M.page.marginBox[A.size]),displaced:j,isBeyondStartPosition:!1},direction:A.direction,destination:{droppableId:T.descriptor.id,index:L}})},Dt=function(e){return{index:e.draggable.index,droppableId:e.droppable.id}},It=function(e){var t=e.viewport.clippedPageMarginBox;return t||Me(!1),t},Ot=function(e,t){var n=e.viewport.closestScrollable;return n?Ge(t,n.scroll.diff.displacement):t},Pt=function(e){var t,n=e.source,r=e.sourceEdge,o=e.destination,i=e.destinationEdge,a=e.destinationAxis,l=function(e){return He(a.line,e[a[i]],e[a.crossAxisStart])},s=l(o),u=(t=qe(n.center,l(n)),{x:Math.abs(t.x),y:Math.abs(t.y)}),c=He(a.line,("end"===r?-1:1)*u[a.line],u[a.crossAxisLine]);return Ge(s,c)},Et=function(e){var t=e.pageBorderBoxCenter,n=e.destination,r=e.insideDestination,o=e.draggable,i=e.movingRelativeTo,a=e.home,l=e.previousImpact,s=e.viewport,u=He(n.axis.line,o.client.marginBox[n.axis.size]);return n.descriptor.id===o.descriptor.droppableId?(i||Me(!1),function(e){var t=e.amount,n=e.homeIndex,r=e.movingRelativeTo,o=e.insideDestination,i=e.draggable,a=e.destination,l=e.previousImpact,s=e.viewport,u=a.axis,c=o.indexOf(r);if(-1===c&&Me(!1),c===n){var p=i.page.borderBox.center,d={movement:{displaced:[],amount:t,isBeyondStartPosition:!1},direction:a.axis.direction,destination:{droppableId:a.descriptor.id,index:n}};return{pageBorderBoxCenter:Ot(a,p),impact:d}}var f=n<c,g=f?"end":"start",h=Pt({source:i.page.borderBox,sourceEdge:g,destination:f?r.page.borderBox:r.page.marginBox,destinationEdge:g,destinationAxis:u}),v={movement:{displaced:function(){if(!f)return o.slice(c,n);var e=n+1,t=c+1;return o.slice(e,t).reverse()}().map(function(e){return wt({draggable:e,destination:a,previousImpact:l,viewport:s.frame})}),amount:t,isBeyondStartPosition:f},direction:u.direction,destination:{droppableId:a.descriptor.id,index:c}};return{pageBorderBoxCenter:Ot(a,h),impact:v}}({amount:u,homeIndex:a.index,movingRelativeTo:i,insideDestination:r,draggable:o,destination:n,previousImpact:l,viewport:s})):function(e){var t=e.amount,n=e.pageBorderBoxCenter,r=e.movingRelativeTo,o=e.insideDestination,i=e.draggable,a=e.destination,l=e.previousImpact,s=e.viewport,u=a.axis,c=Boolean(r&&n[a.axis.line]<r.page.borderBox.center[a.axis.line]);if(!r){var p=Pt({source:i.page.borderBox,sourceEdge:"start",destination:a.page.contentBox,destinationEdge:"start",destinationAxis:u}),d={movement:{displaced:[],amount:t,isBeyondStartPosition:!1},direction:u.direction,destination:{droppableId:a.descriptor.id,index:0}};return{pageBorderBoxCenter:Ot(a,p),impact:d}}var f=o.indexOf(r);-1===f&&Me(!1);var g=c?f:f+1,h=Pt({source:i.page.borderBox,sourceEdge:"start",destination:r.page.marginBox,destinationEdge:c?"start":"end",destinationAxis:u}),v={movement:{displaced:o.slice(g,o.length).map(function(e){return wt({draggable:e,destination:a,viewport:s.frame,previousImpact:l})}),amount:t,isBeyondStartPosition:!1},direction:u.direction,destination:{droppableId:a.descriptor.id,index:g}};return{pageBorderBoxCenter:Ot(a,h),impact:v}}({amount:u,pageBorderBoxCenter:t,movingRelativeTo:i,insideDestination:r,draggable:o,destination:n,previousImpact:l,viewport:s})},Ct=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.draggableId,o=e.droppableId,i=e.home,a=e.draggables,l=e.droppables,s=e.previousImpact,u=e.viewport,c=a[r],p=function(e){var o=e.isMovingForward,i=e.pageBorderBoxCenter,t=e.source,n=e.droppables,r=e.viewport,a=t.viewport.clippedPageMarginBox;if(!a)return null;var l=t.axis,s=ut(a[l.start],a[l.end]),u=at(n).filter(function(e){return e!==t}).filter(function(e){return e.isEnabled}).filter(function(e){var t=e.viewport.clippedPageMarginBox;return!!t&&vt(r.frame)(t)}).filter(function(e){var t=It(e);return o?a[l.crossAxisEnd]<t[l.crossAxisEnd]:t[l.crossAxisStart]<a[l.crossAxisStart]}).filter(function(e){var t=It(e),n=ut(t[l.start],t[l.end]);return s(t[l.start])||s(t[l.end])||n(a[l.start])||n(a[l.end])}).sort(function(e,t){var n=It(e)[l.crossAxisStart],r=It(t)[l.crossAxisStart];return o?n-r:r-n}).filter(function(e,t,n){return It(e)[l.crossAxisStart]===It(n[0])[l.crossAxisStart]});if(!u.length)return null;if(1===u.length)return u[0];var c=u.filter(function(e){return ut(It(e)[l.start],It(e)[l.end])(i[l.line])});return 1===c.length?c[0]:1<c.length?c.sort(function(e,t){return It(e)[l.start]-It(t)[l.start]})[0]:u.sort(function(e,t){var n=Ye(i,Xe(It(e))),r=Ye(i,Xe(It(t)));return n!==r?n-r:It(e)[l.start]-It(t)[l.start]})[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:l[o],droppables:l,viewport:u});if(!p)return null;var d=st(p,a),f=function(e){var o=e.axis,t=e.viewport,i=e.pageBorderBoxCenter,a=e.destination,n=e.insideDestination;if(!n.length)return null;var r=n.filter(function(e){return yt({target:e.page.borderBox,destination:a,viewport:t.frame})}).sort(function(e,t){var n=ze(i,Ot(a,e.page.borderBox.center)),r=ze(i,Ot(a,t.page.borderBox.center));return n<r?-1:r<n?1:e.page.borderBox[o.start]-t.page.borderBox[o.start]});return r.length?r[0]:null}({axis:p.axis,pageBorderBoxCenter:n,destination:p,insideDestination:d,viewport:u});return d.length&&!f?null:Et({pageBorderBoxCenter:n,destination:p,draggable:c,movingRelativeTo:f,insideDestination:d,home:i,previousImpact:s||gt,viewport:u})},Mt=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,o=e.viewport,i=qe(r,t.page.borderBox.center),a=Ke(t.page.borderBox,i);return yt({target:a,destination:n,viewport:o})},Tt=function(e){var t=e.add,n=e.previousImpact,r=e.droppable,o=e.draggables,i=e.viewport,a={draggableId:t,isVisible:!0,shouldAnimate:!0};return[a].concat(n.movement.displaced).map(function(e){return e===a?e:wt({draggable:o[e.draggableId],destination:r,previousImpact:n,viewport:i.frame})})},Rt=function(e){return e.isVisible?e:{draggableId:e.draggableId,isVisible:!0,shouldAnimate:!1}},Nt=function(e){var t=e.dragging,n=e.isVisibleInNewLocation,r=e.previousImpact,o=e.droppable,i=e.draggables,a=r.movement.displaced;a.length||Me(!1);var l=a.slice(1,a.length);if(!l.length)return l;if(n)return l;var s=o.axis,u=i[a[0].draggableId].page.marginBox[s.size]+i[t].page.marginBox[s.size];return l.map(function(e,t){if(0===t)return Rt(e);if(0<u){var n=i[e.draggableId].page.marginBox[s.size];return u-=n,Rt(e)}return{draggableId:e.draggableId,isVisible:!1,shouldAnimate:!1}})},Bt=function(e){var t=e.draggableId,n=e.draggables,r=e.droppable,o=n[t].descriptor.droppableId===r.descriptor.id;return r.isEnabled?o?function(e){var t=e.isMovingForward,n=e.draggableId,r=e.previousPageBorderBoxCenter,o=e.previousImpact,i=e.droppable,a=e.draggables,l=e.viewport,s=o.destination;s||Me(!1);var u=a[n],c=i.axis,p=st(i,a),d=u.descriptor.index,f=s.index,g=t?f+1:f-1;if(g>p.length-1)return null;if(g<0)return null;var h=p[g],v=t&&g<=d||!t&&d<=g,m=v?t?"start":"end":t?"end":"start",b=Pt({source:u.page.borderBox,sourceEdge:m,destination:h.page.borderBox,destinationEdge:m,destinationAxis:i.axis}),y=Mt({draggable:u,destination:i,newPageBorderBoxCenter:b,viewport:l.frame}),w={movement:{displaced:v?Nt({dragging:n,isVisibleInNewLocation:y,previousImpact:o,droppable:i,draggables:a}):Tt({add:h.descriptor.id,previousImpact:o,droppable:i,draggables:a,viewport:l}),amount:He(c.line,u.page.marginBox[c.size]),isBeyondStartPosition:d<g},destination:{droppableId:i.descriptor.id,index:g},direction:i.axis.direction};if(y)return{pageBorderBoxCenter:Ot(i,b),impact:w,scrollJumpRequest:null};var x=qe(b,r);return{pageBorderBoxCenter:r,impact:w,scrollJumpRequest:Ot(i,x)}}(e):function(e){var t=e.isMovingForward,n=e.draggableId,r=e.previousImpact,o=e.previousPageBorderBoxCenter,i=e.droppable,a=e.draggables,l=e.viewport;r.destination||Me(!1);var s=r.destination,u=a[n],c=i.axis,p=st(i,a),d=s.index,f=t?d+1:d-1,g=p.length-1;if(f>p.length)return null;if(f<0)return null;var h=p[Math.min(f,g)],v=g<f?"end":"start",m=Pt({source:u.page.borderBox,sourceEdge:"start",destination:h.page.marginBox,destinationEdge:v,destinationAxis:i.axis}),b=Mt({draggable:u,destination:i,newPageBorderBoxCenter:m,viewport:l.frame}),y={movement:{displaced:t?Nt({dragging:n,isVisibleInNewLocation:b,previousImpact:r,droppable:i,draggables:a}):Tt({add:h.descriptor.id,previousImpact:r,droppable:i,draggables:a,viewport:l}),amount:He(c.line,u.page.marginBox[c.size]),isBeyondStartPosition:!1},destination:{droppableId:i.descriptor.id,index:f},direction:i.axis.direction};if(b)return{pageBorderBoxCenter:Ot(i,m),impact:y,scrollJumpRequest:null};var w=qe(m,o);return{pageBorderBoxCenter:o,impact:y,scrollJumpRequest:Ot(i,w)}}(e):null},At=function(e,t){return qe(e,t)};function _t(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}var jt,Lt,kt,Ut={phase:"IDLE"},Wt={phase:"PREPARING"},Gt=function(e){var t,n,r,o=e.state,i=e.clientSelection,a=e.shouldAnimate,l=e.viewport,s=e.impact,u=e.scrollJumpRequest,c=l||o.viewport,p=c.scroll.current,d={offset:t=qe(i,o.initial.client.selection),selection:i,borderBoxCenter:Ge(o.initial.client.borderBoxCenter,t)},f={selection:Ge((n=d).selection,r=p),borderBoxCenter:Ge(n.borderBoxCenter,r),offset:Ge(n.offset,r)},g={client:d,page:f};if("COLLECTING"===o.phase)return Q({phase:"COLLECTING"},o,{current:g});var h=s||St({pageBorderBoxCenter:f.borderBoxCenter,draggable:o.dimensions.draggables[o.critical.draggable.id],draggables:o.dimensions.draggables,droppables:o.dimensions.droppables,previousImpact:o.impact,viewport:c});return Q({},o,{current:g,shouldAnimate:a,impact:h,scrollJumpRequest:u||null,viewport:c})},qt=function(e,t){if(void 0===e&&(e=Ut),"CLEAN"===t.type)return Ut;if("PREPARE"===t.type)return Wt;if("INITIAL_PUBLISH"===t.type){"PREPARING"!==e.phase&&Me(!1);var n=t.payload,r=n.critical,o=n.client,i=n.viewport,a=n.dimensions,l=n.autoScrollMode,s={client:o,page:{selection:Ge(o.selection,i.scroll.initial),borderBoxCenter:Ge(o.selection,i.scroll.initial),offset:We}};return{phase:"DRAGGING",isDragging:!0,critical:r,autoScrollMode:l,dimensions:a,initial:s,current:s,impact:(u=r,c=a,p=c.droppables[u.droppable.id].axis,d=c.draggables[u.draggable.id],{movement:{displaced:[],isBeyondStartPosition:!1,amount:He(p.line,d.client.marginBox[p.size])},direction:p.direction,destination:Dt(u)}),viewport:i,scrollJumpRequest:null,shouldAnimate:!1}}var u,c,p,d,f,g,h,v,m;if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&Me(!1),Q({phase:"COLLECTING"},e,((f={}).phase="COLLECTING",f)));if("PUBLISH"===t.type&&("COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&Me(!1),Me(!1)),"MOVE"===t.type){if("PREPARING"===e.phase)return e;if("DROP_PENDING"===e.phase)return e;_t(e)||Me(!1);var b=t.payload,y=b.client,w=b.shouldAnimate;if(e.shouldAnimate===w&&Fe(y,e.current.client.selection))return e;var x="JUMP"===e.autoScrollMode?e.impact:null;return Gt({state:e,clientSelection:y,impact:x,shouldAnimate:w})}if("UPDATE_DROPPABLE_SCROLL"===t.type){var S,D;if("PREPARING"===e.phase)return e;if("DROP_PENDING"===e.phase)return e;_t(e)||Me(!1);var I=t.payload,O=I.id,P=I.offset,E=e.dimensions.droppables[O];if(!E)return e;var C=function(e,t){e.viewport.closestScrollable||Me(!1);var n=e.viewport.closestScrollable,r=n.framePageMarginBox,o=qe(t,n.scroll.initial),i=Ve(o),a={framePageMarginBox:n.framePageMarginBox,shouldClipSubject:n.shouldClipSubject,scroll:{initial:n.scroll.initial,current:t,diff:{value:o,displacement:i},max:n.scroll.max}},l=Ke(e.viewport.subjectPageMarginBox,i),s=a.shouldClipSubject?Ze(r,l):Te(l);return Q({},e,{viewport:{closestScrollable:a,subjectPageMarginBox:e.viewport.subjectPageMarginBox,clippedPageMarginBox:s}})}(E,P),M=Q({},e.dimensions,{droppables:Q({},e.dimensions.droppables,(S={},S[O]=C,S))}),T=(_t(e)||Me(!1),"JUMP"===e.autoScrollMode?e.impact:St({pageBorderBoxCenter:e.current.page.borderBoxCenter,draggable:M.draggables[e.critical.draggable.id],draggables:M.draggables,droppables:M.droppables,previousImpact:e.impact,viewport:e.viewport}));return Q({phase:"DRAGGING"},e,((D={}).phase=e.phase,D.impact=T,D.dimensions=M,D.scrollJumpRequest=null,D))}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){var R,N;if("DROP_PENDING"===e.phase)return e;_t(e)||Me(!1);var B=t.payload,A=B.id,_=B.isEnabled,j=e.dimensions.droppables[A];j||Me(!1),j.isEnabled===_&&Me(!1);var L=Q({},j,{isEnabled:_}),k=Q({},e.dimensions,{droppables:Q({},e.dimensions.droppables,(R={},R[A]=L,R))}),U=St({pageBorderBoxCenter:e.current.page.borderBoxCenter,draggable:k.draggables[e.critical.draggable.id],draggables:k.draggables,droppables:k.droppables,previousImpact:e.impact,viewport:e.viewport});return Q({phase:"DRAGGING"},e,((N={}).phase=e.phase,N.impact=U,N.dimensions=k,N))}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("PREPARING"===e.phase)return e;if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;_t(e)||Me(!1);var W=t.payload.scroll;if(Fe(e.viewport.scroll.current,W))return e;var G="JUMP"===e.autoScrollMode?e.impact:null,q=(g=e.viewport,v=qe(h=W,g.scroll.initial),m=Ve(v),{frame:Te({top:h.y,bottom:h.y+g.frame.height,left:h.x,right:h.x+g.frame.width}),scroll:{initial:g.scroll.initial,max:g.scroll.max,current:h,diff:{value:v,displacement:m}}});return Gt({state:e,clientSelection:e.current.client.selection,viewport:q,shouldAnimate:!1,impact:G})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){var F;e.isDragging||Me(!1);var V=e.viewport,H=Q({},V,{scroll:Q({},V.scroll,{max:t.payload})});return Q({phase:"DRAGGING"},e,((F={}).phase=e.phase,F.viewport=H,F))}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("PREPARING"===e.phase)return e;if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&Me(!1);var z=function(e){var t=e.state,n=e.type,r=t.impact.destination?{droppable:t.dimensions.droppables[t.impact.destination.droppableId],isMainAxisMovementAllowed:!0}:{droppable:t.dimensions.droppables[t.critical.droppable.id],isMainAxisMovementAllowed:!1},o=r.droppable,i=r.isMainAxisMovementAllowed,a=o.axis.direction,l="vertical"===a&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===a&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(l&&!i)return null;var s="MOVE_DOWN"===n||"MOVE_RIGHT"===n;if(l){var u=Bt({isMovingForward:s,draggableId:t.critical.draggable.id,droppable:o,draggables:t.dimensions.draggables,previousPageBorderBoxCenter:t.current.page.borderBoxCenter,previousImpact:t.impact,viewport:t.viewport});return u?{impact:u.impact,clientSelection:At(u.pageBorderBoxCenter,t.viewport.scroll.current),scrollJumpRequest:u.scrollJumpRequest}:null}var c=Dt(t.critical),p=Ct({isMovingForward:s,pageBorderBoxCenter:t.current.page.borderBoxCenter,draggableId:t.critical.draggable.id,droppableId:o.descriptor.id,home:c,draggables:t.dimensions.draggables,droppables:t.dimensions.droppables,previousImpact:t.impact,viewport:t.viewport});return p?{clientSelection:At(p.pageBorderBoxCenter,t.viewport.scroll.current),impact:p.impact,scrollJumpRequest:null}:null}({state:e,type:t.type});return z?Gt({state:e,impact:z.impact,clientSelection:z.clientSelection,shouldAnimate:!0,scrollJumpRequest:z.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var Y,J=t.payload.reason;return"COLLECTING"!==e.phase&&Me(!1),Q({phase:"DROP_PENDING"},e,((Y={}).phase="DROP_PENDING",Y.isWaiting=!0,Y.reason=J,Y))}if("DROP_ANIMATE"===t.type){var K=t.payload;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&Me(!1),{phase:"DROP_ANIMATING",pending:K,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?Ut:e},Ft=function(e){return{type:"PUBLISH",payload:e}},Vt=function(){return{type:"COLLECTION_STARTING",payload:null}},Ht=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},zt=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},Yt=function(e){return{type:"MOVE",payload:e}},Jt=function(e){return{type:"DROP_COMPLETE",payload:e}},Kt=function(p){var d=null;return function(e){var u=e.getState,c=e.dispatch;return function(r){return function(e){if("CLEAN"===e.type)return null!=d&&(clearTimeout(d),d=null),void r(e);if("LIFT"===e.type){d&&Me(!1);var o=p(),t=e.payload,i=t.id,a=t.client,l=t.autoScrollMode,s=t.viewport,n=u();"DROP_ANIMATING"===n.phase&&c(Jt(n.pending.result)),"IDLE"!==u().phase&&Me(!1),c({type:"PREPARE",payload:null}),d=setTimeout(function(){d=null,"PREPARING"!==u().phase&&Me(!1);var e={draggableId:i,scrollOptions:{shouldPublishImmediately:"JUMP"===l}},t=o.startPublishing(e,s.scroll.current),n=t.critical,r=t.dimensions;c({type:"INITIAL_PUBLISH",payload:{critical:n,dimensions:r,client:a,autoScrollMode:l,viewport:s}})})}else r(e)}}}},Xt=function(e){var m=e.getState,b=e.dispatch;return function(v){return function(e){if("DROP"===e.type){var t=m(),n=e.payload.reason;if("COLLECTING"!==t.phase)if("PREPARING"!==t.phase){if("IDLE"!==t.phase){"DROP_PENDING"===t.phase&&t.isWaiting&&Me(!1),"DRAGGING"!==t.phase&&"DROP_PENDING"!==t.phase&&Me(!1);var r,o,i=t.critical,a=t.dimensions,l="DROP"===n?t.impact:gt,s=a.droppables[t.critical.droppable.id],u=a.draggables[t.critical.draggable.id],c=l&&l.destination?a.droppables[l.destination.droppableId]:null,p={index:i.draggable.index,droppableId:i.droppable.id},d="DROP"===n?l.destination:null,f={draggableId:u.descriptor.id,type:s.descriptor.type,source:p,destination:d,reason:n},g=function(){if("CANCEL"===n)return We;var e=function(e){var t=e.movement,n=e.draggable,r=e.draggables,o=e.destination,i=n.client.borderBox.center;if(null==o)return i;var a=t.displaced,l=t.isBeyondStartPosition,s=o.axis,u=o.descriptor.id===n.descriptor.droppableId;if(u&&!a.length)return i;var c=st(o,r),p=u?r[a[0].draggableId].client.borderBox:a.length?r[a[0].draggableId].client.borderBox:c.length?c[c.length-1].client.marginBox:o.client.contentBox,d=u?l?{sourceEdge:"end",destinationEdge:"end"}:{sourceEdge:"start",destinationEdge:"start"}:!a.length&&c.length?{sourceEdge:"start",destinationEdge:"end"}:{sourceEdge:"start",destinationEdge:"start"},f=d.sourceEdge,g=d.destinationEdge,h=n.client.borderBox;return Pt({source:h,sourceEdge:f,destination:p,destinationEdge:g,destinationAxis:s})}({movement:l.movement,draggable:u,draggables:a.draggables,destination:c});return qe(e,u.client.borderBox.center)}(),h=Ge(g,(r=c||s,o=t.viewport,Ot(r,o.scroll.diff.displacement)));if(!Fe(t.current.client.offset,h))b({type:"DROP_ANIMATE",payload:{newHomeOffset:h,result:f,impact:l}});else b(Jt(f))}}else b({type:"CLEAN",payload:null});else b({type:"DROP_PENDING",payload:{reason:n}})}else v(e)}}},Qt=function(e){return"\n You have lifted an item in position "+(e.source.index+1)+".\n Use the arrow keys to move, space bar to drop, and escape to cancel.\n"},Zt=function(e){return e.destination?e.source.droppableId===e.destination.droppableId?"You have moved the item to position "+(e.destination.index+1):"\n You have moved the item from list "+e.source.droppableId+" in position "+(e.source.index+1)+"\n to list "+e.destination.droppableId+" in position "+(e.destination.index+1)+"\n ":"You are currently not dragging over a droppable area"},$t=function(e){return"CANCEL"===e.reason?"\n Movement cancelled.\n The item has returned to its starting position of "+(e.source.index+1)+"\n ":e.destination?e.source.droppableId===e.destination.droppableId?e.source.index===e.destination.index?"\n You have dropped the item.\n It has been dropped on its starting position of "+(e.source.index+1)+"\n ":"\n You have dropped the item.\n It has moved from position "+(e.source.index+1)+" to "+(e.destination.index+1)+"\n ":"\n You have dropped the item.\n It has moved from position "+(e.source.index+1)+" in list "+e.source.droppableId+"\n to position "+(e.destination.index+1)+" in list "+e.destination.droppableId+"\n ":"\n The item has been dropped while not over a droppable location.\n The item has returned to its starting position of "+(e.source.index+1)+"\n "},en=function(e,t){t()},tn=function(e){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index}}},nn=function(l,o){var s,u,c,t,p=function(e,t,n){if(e){var r=function(t){var n=!1,r=!1;setTimeout(function(){r=!0});var e=function(e){n||r||(n=!0,t(e))};return e.wasCalled=function(){return n},e}(o);e(t,{announce:r}),r.wasCalled()||o(n(t))}else o(n(t))},a=(u=s=null,c=!1,{beforeStart:function(t){c&&Me(!1),en(0,function(){var e=l().onBeforeDragStart;e&&e(tn(t))})},start:function(e){c&&Me(!1);var t=tn(e);u=e,s=t.source,c=!0,en(0,function(){return p(l().onDragStart,t,Qt)})},move:function(e,t){c&&u||Me(!1);var n=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(e,u);n&&(u=e);var r,o,i=(o=t,!(null==(r=s)&&null==o||null!=r&&null!=o&&r.droppableId===o.droppableId&&r.index===o.index));if(i&&(s=t),n||i){var a=Q({},tn(e),{destination:t});en(0,function(){return p(l().onDragUpdate,a,Zt)})}},drop:t=function(e){c||Me(!1),c=!1,u=s=null,en(0,function(){return p(l().onDragEnd,e,$t)})},abort:function(){c&&u||Me(!1);var e=Q({},tn(u),{destination:null,reason:"CANCEL"});t(e)},isDragStartPublished:function(){return c}});return function(i){return function(o){return function(e){if("INITIAL_PUBLISH"===e.type){var t=e.payload.critical;return a.beforeStart(t),o(e),void a.start(t)}if(o(e),"DROP_COMPLETE"!==e.type)if("CLEAN"!==e.type){if(a.isDragStartPublished()){var n=i.getState();"DRAGGING"===n.phase&&a.move(n.critical,n.impact.destination)}}else a.isDragStartPublished()&&a.abort();else{var r=e.payload;a.drop(r)}}}}},rn=function(r){return function(n){return function(e){if("DROP_ANIMATION_FINISHED"===e.type){var t=r.getState();"DROP_ANIMATING"!==t.phase&&Me(!1),r.dispatch(Jt(t.pending.result))}else n(e)}}},on=function(e,t,n){if("MOVE"!==(r=n).type&&"MOVE_UP"!==r.type&&"MOVE_RIGHT"!==r.type&&"MOVE_DOWN"!==r.type&&"MOVE_LEFT"!==r.type&&"MOVE_BY_WINDOW_SCROLL"!==r.type)return null;var r,o,i;if(!_t(e)||!_t(t))return null;if(o=e.impact.destination,i=t.impact.destination,!(o?i?o.droppableId!==i.droppableId:Boolean(o):Boolean(i)))return null;var a=t.viewport,l=document.documentElement;l||Me(!1);var s=Qe({scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth,width:a.frame.width,height:a.frame.height});return Fe(s,a.scroll.max)?null:s},an=function(i){return function(o){return function(e){var t=i.getState();o(e);var n=i.getState(),r=on(t,n,e);r&&o({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:r})}}},ln="object"==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:ye,sn=function(e){var i,n,r,t=e.getDimensionMarshal,o=e.styleMarshal,a=e.getHooks,l=e.announce,s=e.getScroller;return ve(qt,ln(function(){for(var e=arguments.length,s=Array(e),t=0;t<e;t++)s[t]=arguments[t];return function(l){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=l.apply(void 0,t),o=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:r.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=s.map(function(e){return e(i)});return o=ye.apply(void 0,a)(r.dispatch),he({},r,{dispatch:o})}}}((r=o,function(){return function(t){return function(e){"INITIAL_PUBLISH"===e.type&&r.dragging(),"COLLECTION_STARTING"===e.type&&r.collecting(),"PUBLISH"===e.type&&r.dragging(),"DROP_ANIMATE"===e.type&&r.dropping(e.payload.result.reason),"CLEAN"!==e.type&&"DROP_COMPLETE"!==e.type||r.resting(),t(e)}}}),(n=t,function(){return function(t){return function(e){"DROP_COMPLETE"!==e.type&&"CLEAN"!==e.type&&"DROP_ANIMATE"!==e.type||n().stopPublishing(),t(e)}}}),Kt(t),Xt,rn,an,(i=s,function(o){return function(r){return function(e){if("CANCEL"===(t=e).type||"DROP_ANIMATE"===t.type||"DROP"===t.type||"DROP_COMPLETE"===t.type||"COLLECTION_STARTING"===t.type)return i().cancel(),void r(e);var t;r(e);var n=o.getState();"DRAGGING"===n.phase&&("FLUID"!==n.autoScrollMode?n.scrollJumpRequest&&i().jumpScroll(n):i().fluidScroll(n))}}}),nn(a,l))))},un=function(n){var e,i,a,t,l,s,u,c,r,p={droppables:{},draggables:{}},d=null,o=(e={callbacks:{publish:n.publish,collectionStarting:n.collectionStarting},getProvided:function(){return d||Me(!1),{entries:p,collection:d}}},i=e.getProvided,a=e.callbacks,t=function(){},l={draggables:{},droppables:{}},s={draggables:{},droppables:{}},u=null,c=function(){l={draggables:{},droppables:{}},s={draggables:{},droppables:{}}},r=function(){t(),u||(u=requestAnimationFrame(function(){u=null,a.collectionStarting();var e=i(),t=e.entries,n=e.collection,r=n.initialWindowScroll,o={additions:{draggables:it(l.draggables).map(function(e){return t.draggables[e].getDimension(r)}),droppables:it(l.droppables).map(function(e){return t.droppables[e].callbacks.getDimensionAndWatchScroll(r,n.scrollOptions)})},removals:{draggables:it(s.draggables),droppables:it(s.droppables)}};c(),a.publish(o)}))},{addDraggable:function(e){l.draggables[e]=!0,s.draggables[e]&&delete s.draggables[e],r()},removeDraggable:function(e){s.draggables[e]=!0,l.draggables[e]&&delete l.draggables[e],r()},addDroppable:function(e){l.droppables[e]=!0,s.droppables[e]&&delete s.droppables[e],r()},removeDroppable:function(e){s.droppables[e]=!0,l.droppables[e]&&delete l.droppables[e],r()},stop:function(){u&&(cancelAnimationFrame(u),u=null,c())}});return{registerDraggable:function(e,t){var n={descriptor:e,getDimension:t};p.draggables[e.id]=n,d&&d.critical.draggable.type===e.type&&o.addDraggable(e.id)},updateDraggable:function(e,t,n){p.draggables[e.id]||Me(!1),delete p.draggables[e.id];var r={descriptor:t,getDimension:n};p.draggables[t.id]=r},unregisterDraggable:function(e){var t=p.draggables[e.id];t||Me(!1),t.descriptor===e&&(delete p.draggables[e.id],d&&(d.critical.draggable.id===e.id&&Me(!1),e.type===d.critical.draggable.type&&o.removeDraggable(e.id)))},registerDroppable:function(e,t){var n=e.id;p.droppables[n]={descriptor:e,callbacks:t},d&&e.type===d.critical.droppable.type&&o.addDroppable(n)},updateDroppable:function(e,t,n){p.droppables[e.id]||Me(!1),delete p.droppables[e.id];var r={descriptor:t,callbacks:n};p.droppables[t.id]=r,d&&Me(!1)},unregisterDroppable:function(e){var t=p.droppables[e.id];t||Me(!1),t.descriptor===e&&(delete p.droppables[e.id],d&&(d.critical.droppable.id===e.id&&Me(!1),d.critical.droppable.type===e.type&&o.removeDroppable(e.id)))},updateDroppableIsEnabled:function(e,t){p.droppables[e]||Me(!1),d&&n.updateDroppableIsEnabled({id:e,isEnabled:t})},scrollDroppable:function(e,t){var n=p.droppables[e];n||Me(!1),d&&n.callbacks.scroll(t)},updateDroppableScroll:function(e,t){p.droppables[e]||Me(!1),d&&n.updateDroppableScroll({id:e,offset:t})},startPublishing:function(e,t){d&&Me(!1);var n=p.draggables[e.draggableId];n||Me(!1);var r=p.droppables[n.descriptor.droppableId];r||Me(!1);var o,i,a,l,s,u,c={draggable:n.descriptor,droppable:r.descriptor};return d={scrollOptions:e.scrollOptions,critical:c,initialWindowScroll:t},i=(o=d).critical,a=o.scrollOptions,l=o.initialWindowScroll,s=i.droppable,u=it(p.droppables).map(function(e){return p.droppables[e]}).filter(function(e){return e.descriptor.type===s.type}).map(function(e){return e.callbacks.getDimensionAndWatchScroll(l,a)}).reduce(function(e,t){return e[t.descriptor.id]=t,e},{}),{dimensions:{draggables:it(p.draggables).map(function(e){return p.draggables[e]}).filter(function(e){return e.descriptor.type===i.draggable.type}).map(function(e){return e.getDimension(l)}).reduce(function(e,t){return e[t.descriptor.id]=t,e},{}),droppables:u},critical:i}},stopPublishing:function(){if(d){o.stop();var t=d.critical.droppable;it(p.droppables).filter(function(e){return p.droppables[e].descriptor.type===t.type}).forEach(function(e){return p.droppables[e].callbacks.unwatchScroll()}),d=null}}}},cn={standard:Q({},jt={stiffness:1e3,damping:60,precision:.99}),fast:Q({},jt,{stiffness:2*jt.stiffness})},pn="transform 0.2s cubic-bezier(0.2, 0, 0, 1)",dn="data-react-beautiful-dnd",fn=dn+"-drag-handle",gn=0,hn=function(){var e=document.querySelector("head");return e||Me(!1),e},vn=function(){var e,t,n,r,o,i,a,l,s,u,c=""+gn++,p=(r={animateMovement:'\n [data-react-beautiful-dnd-draggable="'+(e=c)+'"] {\n transition: '+pn+";\n }\n "},i=(o=[(n={base:"\n "+(t="["+fn+'="'+e+'"]')+" {\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n }\n ",grabCursor:"\n "+t+" {\n cursor: -webkit-grab;\n cursor: grab;\n }\n ",blockPointerEvents:"\n "+t+" {\n pointer-events: none;\n }\n "}).base,'\n [data-react-beautiful-dnd-droppable="'+e+'"] {\n overflow-anchor: none;\n }\n ']).concat([n.grabCursor]),a=o.concat([n.blockPointerEvents,"\n body {\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 }\n "]),l=a.concat([r.animateMovement]),s=o.concat([n.grabCursor,r.animateMovement]),u=o.concat([r.animateMovement]),{resting:i.join(""),dragging:l.join(""),dropAnimating:s.join(""),collecting:a.join(""),userCancel:u.join("")}),d=null,f=et(function(e){d||Me(!1),d.innerHTML=e});return{collecting:function(){return f(p.collecting)},dragging:function(){return f(p.dragging)},dropping:function(e){f("DROP"!==e?p.userCancel:p.dropAnimating)},resting:function(){return f(p.resting)},styleContext:c,mount:function(){d&&Me(!1),(d=document.createElement("style")).type="text/css",d.setAttribute(dn,c),hn().appendChild(d),f(p.resting)},unmount:function(){d||Me(!1),hn().removeChild(d),d=null}}},mn=function(e){window.scrollBy(e.x,e.y)},bn=0,yn={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},wn=function(){return document.body||Me(!1),document.body},xn=function(r){var o=[],i=null,e=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o=t,i||(i=requestAnimationFrame(function(){i=null,r.apply(void 0,o)}))};return e.cancel=function(){i&&(cancelAnimationFrame(i),i=null)},e},Sn=et(function(e){return at(e).filter(function(e){return!!e.isEnabled&&!!e.viewport.closestScrollable})}),Dn=function(e){var t,n=e.center,r=e.destination,o=e.droppables;if(r){var i=o[r.droppableId];return i.viewport.closestScrollable?i:null}return t=n,Sn(o).find(function(e){return e.viewport.closestScrollable||Me(!1),ct(e.viewport.cl