PluginProbe
ElasticPress / 5.3.5
ElasticPress v5.3.5
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
← All changes | dist/js/ordering-script.js +1 -1 4.5.25.3.5 View file →
@@ -1 +1 @@
1 -!function(){var e={3029:function(e,t,r){e.exports=r(6216)},6380:function(e,t,r){r(6337)},6406:function(e,t,r){e.exports=r(8207)},200:function(e,t,r){e.exports=r(5380)},3929:function(e,t,r){e.exports=r(5297)},4255:function(e,t,r){e.exports=r(1900)},1113:function(e,t,r){e.exports=r(2837)},6216:function(e,t,r){r(8175),e.exports=r(3093).Date.now},6337:function(e,t,r){r(4211),r(3093).Number.isInteger},8207:function(e,t,r){r(2464),e.exports=r(3093).Object.assign},5380:function(e,t,r){r(7660);var n=r(3093).Object;e.exports=function(e,t){return n.create(e,t)}},5297:function(e,t,r){r(5338),e.exports=r(3093).Object.keys},1900:function(e,t,r){r(9269),e.exports=r(3093).Object.setPrototypeOf},2837:function(e,t,r){r(3625),e.exports=r(3093).Object.values},8679:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},9226:function(e,t,r){var n=r(4425);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},3206:function(e,t,r){var n=r(6303),o=r(5321),i=r(139);e.exports=function(e){return function(t,r,a){var u,c=n(t),l=o(c.length),s=i(a,l);if(e&&r!=r){for(;l>s;)if((u=c[s++])!=u)return!0}else for(;l>s;s++)if((e||s in c)&&c[s]===r)return e||s||0;return!e&&-1}}},7489:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},3093:function(e){var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},1133:function(e,t,r){var n=r(8679);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},9359:function(e){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},7305:function(e,t,r){e.exports=!r(4930)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},3299:function(e,t,r){var n=r(4425),o=r(3220).document,i=n(o)&&n(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},5834:function(e){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},4518:function(e,t,r){var n=r(3220),o=r(3093),i=r(1133),a=r(4379),u=r(3920),c=function(e,t,r){var l,s,d,p=e&c.F,f=e&c.G,g=e&c.S,m=e&c.P,v=e&c.B,b=e&c.W,h=f?o:o[t]||(o[t]={}),y=h.prototype,x=f?n:g?n[t]:(n[t]||{}).prototype;for(l in f&&(r=t),r)(s=!p&&x&&void 0!==x[l])&&u(h,l)||(d=s?x[l]:r[l],h[l]=f&&"function"!=typeof x[l]?r[l]:v&&s?i(d,n):b&&x[l]==d?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?i(Function.call,d):d,m&&((h.virtual||(h.virtual={}))[l]=d,e&c.R&&y&&!y[l]&&a(y,l,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},4930:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},3220: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)},3920:function(e){var t={}.hasOwnProperty;e.exports=function(e,r){return t.call(e,r)}},4379:function(e,t,r){var n=r(6007),o=r(5831);e.exports=r(7305)?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},588:function(e,t,r){var n=r(3220).document;e.exports=n&&n.documentElement},7209:function(e,t,r){e.exports=!r(7305)&&!r(4930)((function(){return 7!=Object.defineProperty(r(3299)("div"),"a",{get:function(){return 7}}).a}))},5474:function(e,t,r){var n=r(7489);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},8015:function(e,t,r){var n=r(4425),o=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&o(e)===e}},4425:function(e){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},4436:function(e){e.exports=!0},7382:function(e,t,r){"use strict";var n=r(7305),o=r(1304),i=r(8382),a=r(5066),u=r(4922),c=r(5474),l=Object.assign;e.exports=!l||r(4930)((function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=l({},e)[r]||Object.keys(l({},t)).join("")!=n}))?function(e,t){for(var r=u(e),l=arguments.length,s=1,d=i.f,p=a.f;l>s;)for(var f,g=c(arguments[s++]),m=d?o(g).concat(d(g)):o(g),v=m.length,b=0;v>b;)f=m[b++],n&&!p.call(g,f)||(r[f]=g[f]);return r}:l},9270:function(e,t,r){var n=r(9226),o=r(6287),i=r(5834),a=r(2596)("IE_PROTO"),u=function(){},c=function(){var e,t=r(3299)("iframe"),n=i.length;for(t.style.display="none",r(588).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c.prototype[i[n]];return c()};e.exports=Object.create||function(e,t){var r;return null!==e?(u.prototype=n(e),r=new u,u.prototype=null,r[a]=e):r=c(),void 0===t?r:o(r,t)}},6007:function(e,t,r){var n=r(9226),o=r(7209),i=r(2548),a=Object.defineProperty;t.f=r(7305)?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),o)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},6287:function(e,t,r){var n=r(6007),o=r(9226),i=r(1304);e.exports=r(7305)?Object.defineProperties:function(e,t){o(e);for(var r,a=i(t),u=a.length,c=0;u>c;)n.f(e,r=a[c++],t[r]);return e}},826:function(e,t,r){var n=r(5066),o=r(5831),i=r(6303),a=r(2548),u=r(3920),c=r(7209),l=Object.getOwnPropertyDescriptor;t.f=r(7305)?l:function(e,t){if(e=i(e),t=a(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!n.f.call(e,t),e[t])}},8382:function(e,t){t.f=Object.getOwnPropertySymbols},6567:function(e,t,r){var n=r(3920),o=r(6303),i=r(3206)(!1),a=r(2596)("IE_PROTO");e.exports=function(e,t){var r,u=o(e),c=0,l=[];for(r in u)r!=a&&n(u,r)&&l.push(r);for(;t.length>c;)n(u,r=t[c++])&&(~i(l,r)||l.push(r));return l}},1304:function(e,t,r){var n=r(6567),o=r(5834);e.exports=Object.keys||function(e){return n(e,o)}},5066:function(e,t){t.f={}.propertyIsEnumerable},874:function(e,t,r){var n=r(4518),o=r(3093),i=r(4930);e.exports=function(e,t){var r=(o.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*i((function(){r(1)})),"Object",a)}},572:function(e,t,r){var n=r(7305),o=r(1304),i=r(6303),a=r(5066).f;e.exports=function(e){return function(t){for(var r,u=i(t),c=o(u),l=c.length,s=0,d=[];l>s;)r=c[s++],n&&!a.call(u,r)||d.push(e?[r,u[r]]:u[r]);return d}}},5831:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6573:function(e,t,r){var n=r(4425),o=r(9226),i=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=r(1133)(Function.call,r(826).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return i(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:i}},2596:function(e,t,r){var n=r(5628)("keys"),o=r(6918);e.exports=function(e){return n[e]||(n[e]=o(e))}},5628:function(e,t,r){var n=r(3093),o=r(3220),i="__core-js_shared__",a=o[i]||(o[i]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:r(4436)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},139:function(e,t,r){var n=r(2579),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=n(e))<0?o(e+t,0):i(e,t)}},2579:function(e){var t=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:t)(e)}},6303:function(e,t,r){var n=r(5474),o=r(9359);e.exports=function(e){return n(o(e))}},5321:function(e,t,r){var n=r(2579),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},4922:function(e,t,r){var n=r(9359);e.exports=function(e){return Object(n(e))}},2548:function(e,t,r){var n=r(4425);e.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},6918:function(e){var t=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+r).toString(36))}},8175:function(e,t,r){var n=r(4518);n(n.S,"Date",{now:function(){return(new Date).getTime()}})},4211:function(e,t,r){var n=r(4518);n(n.S,"Number",{isInteger:r(8015)})},2464:function(e,t,r){var n=r(4518);n(n.S+n.F,"Object",{assign:r(7382)})},7660:function(e,t,r){var n=r(4518);n(n.S,"Object",{create:r(9270)})},5338:function(e,t,r){var n=r(4922),o=r(1304);r(874)("keys",(function(){return function(e){return o(n(e))}}))},9269:function(e,t,r){var n=r(4518);n(n.S,"Object",{setPrototypeOf:r(6573).set})},3625:function(e,t,r){var n=r(4518),o=r(572)(!1);n(n.S,"Object",{values:function(e){return o(e)}})},2545:function(e,t,r){"use strict";var n=r(1296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function c(e){return n.isMemo(e)?a:u[e.$$typeof]||o}u[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[n.Memo]=a;var l=Object.defineProperty,s=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,g=Object.prototype;e.exports=function e(t,r,n){if("string"!==typeof r){if(g){var o=f(r);o&&o!==g&&e(t,o,n)}var a=s(r);d&&(a=a.concat(d(r)));for(var u=c(t),m=c(r),v=0;v<a.length;++v){var b=a[v];if(!i[b]&&(!n||!n[b])&&(!m||!m[b])&&(!u||!u[b])){var h=p(r,b);try{l(t,b,h)}catch(e){}}}}return t}},6103:function(e,t){"use strict";var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,s=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.block"):60121,h=r?Symbol.for("react.fundamental"):60117,y=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case s:case d:case i:case u:case a:case f:return e;default:switch(e=e&&e.$$typeof){case l:case p:case v:case m:case c:return e;default:return t}}case o:return t}}}function D(e){return w(e)===d}t.AsyncMode=s,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=c,t.Element=n,t.ForwardRef=p,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=u,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return D(e)||w(e)===s},t.isConcurrentMode=D,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===u},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===u||e===a||e===f||e===g||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p||e.$$typeof===h||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b)},t.typeOf=w},1296:function(e,t,r){"use strict";e.exports=r(6103)},9921:function(e,t){"use strict";var r=60103,n=60106,o=60107,i=60108,a=60114,u=60109,c=60110,l=60112,s=60113,d=60120,p=60115,f=60116,g=60121,m=60122,v=60117,b=60129,h=60131;if("function"===typeof Symbol&&Symbol.for){var y=Symbol.for;r=y("react.element"),n=y("react.portal"),o=y("react.fragment"),i=y("react.strict_mode"),a=y("react.profiler"),u=y("react.provider"),c=y("react.context"),l=y("react.forward_ref"),s=y("react.suspense"),d=y("react.suspense_list"),p=y("react.memo"),f=y("react.lazy"),g=y("react.block"),m=y("react.server.block"),v=y("react.fundamental"),b=y("react.debug_trace_mode"),h=y("react.legacy_hidden")}function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case a:case i:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case l:case f:case p:case u:return e;default:return t}}case n:return t}}}t.isContextConsumer=function(e){return x(e)===c}},9864:function(e,t,r){"use strict";e.exports=r(9921)},5251:function(e,t,r){"use strict";var n=r(9196),o=60103;if(60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var n,i={},l=null,s=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(s=t.ref),t)u.call(t,n)&&!c.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:s,props:i,_owner:a.current}}t.jsx=l,t.jsxs=l},5893:function(e,t,r){"use strict";e.exports=r(5251)},9196:function(e){"use strict";e.exports=window.React}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=r(6406),n=r.n(t);function o(){return o=t||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}var i=r(9196),a=r.n(i);function u(e,t){var r=(0,i.useState)((function(){return{inputs:t,result:e()}}))[0],n=(0,i.useRef)(!0),o=(0,i.useRef)(r),a=n.current||Boolean(t&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(t,o.current.inputs))?o.current:{inputs:t,result:e()};return(0,i.useEffect)((function(){n.current=!1,o.current=a}),[a]),a.result}var c=u,l=function(e,t){return u((function(){return e}),t)},s=r(200),d=r(4255);function p(e,t){return p=d||function(e,t){return e.__proto__=t,e},p(e,t)}function f(e,t){e.prototype=s(t.prototype),e.prototype.constructor=e,p(e,t)}var g="Invariant failed";function m(e,t){if(!e)throw new Error(g)}function v(e){return v="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},v(e)}function b(e){var t=function(e,t){if("object"!==v(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===v(t)?t:String(t)}function h(e,t,r){return(t=b(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function w(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var D="function"===typeof Symbol&&Symbol.observable||"@@observable",I=function(){return Math.random().toString(36).substring(7).split("").join(".")},E={INIT:"@@redux/INIT"+I(),REPLACE:"@@redux/REPLACE"+I(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+I()}};function S(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function C(e,t,r){var n;if("function"===typeof t&&"function"===typeof r||"function"===typeof r&&"function"===typeof arguments[3])throw new Error(w(0));if("function"===typeof t&&"undefined"===typeof r&&(r=t,t=void 0),"undefined"!==typeof r){if("function"!==typeof r)throw new Error(w(1));return r(C)(e,t)}if("function"!==typeof e)throw new Error(w(2));var o=e,i=t,a=[],u=a,c=!1;function l(){u===a&&(u=a.slice())}function s(){if(c)throw new Error(w(3));return i}function d(e){if("function"!==typeof e)throw new Error(w(4));if(c)throw new Error(w(5));var t=!0;return l(),u.push(e),function(){if(t){if(c)throw new Error(w(6));t=!1,l();var r=u.indexOf(e);u.splice(r,1),a=null}}}function p(e){if(!S(e))throw new Error(w(7));if("undefined"===typeof e.type)throw new Error(w(8));if(c)throw new Error(w(9));try{c=!0,i=o(i,e)}finally{c=!1}for(var t=a=u,r=0;r<t.length;r++){(0,t[r])()}return e}function f(e){if("function"!==typeof e)throw new Error(w(10));o=e,p({type:E.REPLACE})}function g(){var e,t=d;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(w(11));function r(){e.next&&e.next(s())}return r(),{unsubscribe:t(r)}}})[D]=function(){return this},e}return p({type:E.INIT}),(n={dispatch:p,subscribe:d,getState:s,replaceReducer:f})[D]=g,n}function O(e,t){return function(){return t(e.apply(this,arguments))}}function P(e,t){if("function"===typeof e)return O(e,t);if("object"!==typeof e||null===e)throw new Error(w(16));var r={};for(var n in e){var o=e[n];"function"===typeof o&&(r[n]=O(o,t))}return r}function N(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];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))}}))}var R=a().createContext(null);var B=function(e){e()},L=function(){return B};var A={notify:function(){},get:function(){return[]}};function T(e,t){var r,n=A;function o(){a.onStateChange&&a.onStateChange()}function i(){r||(r=t?t.addNestedSub(o):e.subscribe(o),n=function(){var e=L(),t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],r=t;r;)e.push(r),r=r.next;return e},subscribe:function(e){var n=!0,o=r={callback:e,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){n&&null!==t&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}var a={addNestedSub:function(e){return i(),n.subscribe(e)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(r)},trySubscribe:i,tryUnsubscribe:function(){r&&(r(),r=void 0,n.clear(),n=A)},getListeners:function(){return n}};return a}var _="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?i.useLayoutEffect:i.useEffect;var M=function(e){var t=e.store,r=e.context,n=e.children,o=(0,i.useMemo)((function(){var e=T(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),u=(0,i.useMemo)((function(){return t.getState()}),[t]);_((function(){var e=o.subscription;return e.trySubscribe(),u!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[o,u]);var c=r||R;return a().createElement(c.Provider,{value:o},n)};function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},j.apply(this,arguments)}function G(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var F=r(2545),W=r.n(F),k=r(9864),U=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],H=["reactReduxForwardedRef"],V=[],z=[null,null];function $(e,t){var r=e[1];return[t.payload,r+1]}function q(e,t,r){_((function(){return e.apply(void 0,t)}),r)}function Y(e,t,r,n,o,i,a){e.current=n,t.current=o,r.current=!1,i.current&&(i.current=null,a())}function K(e,t,r,n,o,i,a,u,c,l){if(e){var s=!1,d=null,p=function(){if(!s){var e,r,p=t.getState();try{e=n(p,o.current)}catch(e){r=e,d=e}r||(d=null),e===i.current?a.current||c():(i.current=e,u.current=e,a.current=!0,l({type:"STORE_UPDATED",payload:{error:r}}))}};r.onStateChange=p,r.trySubscribe(),p();return function(){if(s=!0,r.tryUnsubscribe(),r.onStateChange=null,d)throw d}}}var J=function(){return[null,0]};function X(e,t){void 0===t&&(t={});var r=t,n=r.getDisplayName,o=void 0===n?function(e){return"ConnectAdvanced("+e+")"}:n,u=r.methodName,c=void 0===u?"connectAdvanced":u,l=r.renderCountProp,s=void 0===l?void 0:l,d=r.shouldHandleStateChanges,p=void 0===d||d,f=r.storeKey,g=void 0===f?"store":f,m=(r.withRef,r.forwardRef),v=void 0!==m&&m,b=r.context,h=void 0===b?R:b,y=G(r,U),x=h;return function(t){var r=t.displayName||t.name||"Component",n=o(r),u=j({},y,{getDisplayName:o,methodName:c,renderCountProp:s,shouldHandleStateChanges:p,storeKey:g,displayName:n,wrappedComponentName:r,WrappedComponent:t}),l=y.pure;var d=l?i.useMemo:function(e){return e()};function f(r){var n=(0,i.useMemo)((function(){var e=r.reactReduxForwardedRef,t=G(r,H);return[r.context,e,t]}),[r]),o=n[0],c=n[1],l=n[2],s=(0,i.useMemo)((function(){return o&&o.Consumer&&(0,k.isContextConsumer)(a().createElement(o.Consumer,null))?o:x}),[o,x]),f=(0,i.useContext)(s),g=Boolean(r.store)&&Boolean(r.store.getState)&&Boolean(r.store.dispatch);Boolean(f)&&Boolean(f.store);var m=g?r.store:f.store,v=(0,i.useMemo)((function(){return function(t){return e(t.dispatch,u)}(m)}),[m]),b=(0,i.useMemo)((function(){if(!p)return z;var e=T(m,g?null:f.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[m,g,f]),h=b[0],y=b[1],w=(0,i.useMemo)((function(){return g?f:j({},f,{subscription:h})}),[g,f,h]),D=(0,i.useReducer)($,V,J),I=D[0][0],E=D[1];if(I&&I.error)throw I.error;var S=(0,i.useRef)(),C=(0,i.useRef)(l),O=(0,i.useRef)(),P=(0,i.useRef)(!1),N=d((function(){return O.current&&l===C.current?O.current:v(m.getState(),l)}),[m,I,l]);q(Y,[C,S,P,l,N,O,y]),q(K,[p,m,h,v,C,S,P,O,y,E],[m,h,v]);var R=(0,i.useMemo)((function(){return a().createElement(t,j({},N,{ref:c}))}),[c,t,N]);return(0,i.useMemo)((function(){return p?a().createElement(s.Provider,{value:w},R):R}),[s,R,w])}var m=l?a().memo(f):f;if(m.WrappedComponent=t,m.displayName=f.displayName=n,v){var b=a().forwardRef((function(e,t){return a().createElement(m,j({},e,{reactReduxForwardedRef:t}))}));return b.displayName=n,b.WrappedComponent=t,W()(b,t)}return W()(m,t)}}function Q(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function Z(e,t){if(Q(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(t,r[o])||!Q(e[r[o]],t[r[o]]))return!1;return!0}function ee(e){return function(t,r){var n=e(t,r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function te(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function re(e,t){return function(t,r){r.displayName;var n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=te(e);var o=n(t,r);return"function"===typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=te(o),o=n(t,r)),o},n}}var ne=[function(e){return"function"===typeof e?re(e):void 0},function(e){return e?void 0:ee((function(e){return{dispatch:e}}))},function(e){return e&&"object"===typeof e?ee((function(t){return function(e,t){var r={},n=function(n){var o=e[n];"function"===typeof o&&(r[n]=function(){return t(o.apply(void 0,arguments))})};for(var o in e)n(o);return r}(e,t)})):void 0}];var oe=[function(e){return"function"===typeof e?re(e):void 0},function(e){return e?void 0:ee((function(){return{}}))}];function ie(e,t,r){return j({},r,e,t)}var ae=[function(e){return"function"===typeof e?function(e){return function(t,r){r.displayName;var n,o=r.pure,i=r.areMergedPropsEqual,a=!1;return function(t,r,u){var c=e(t,r,u);return a?o&&i(c,n)||(n=c):(a=!0,n=c),n}}}(e):void 0},function(e){return e?void 0:function(){return ie}}],ue=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function ce(e,t,r,n){return function(o,i){return r(e(o,i),t(n,i),i)}}function le(e,t,r,n,o){var i,a,u,c,l,s=o.areStatesEqual,d=o.areOwnPropsEqual,p=o.areStatePropsEqual,f=!1;function g(o,f){var g=!d(f,a),m=!s(o,i);return i=o,a=f,g&&m?(u=e(i,a),t.dependsOnOwnProps&&(c=t(n,a)),l=r(u,c,a)):g?(e.dependsOnOwnProps&&(u=e(i,a)),t.dependsOnOwnProps&&(c=t(n,a)),l=r(u,c,a)):m?function(){var t=e(i,a),n=!p(t,u);return u=t,n&&(l=r(u,c,a)),l}():l}return function(o,s){return f?g(o,s):(u=e(i=o,a=s),c=t(n,a),l=r(u,c,a),f=!0,l)}}function se(e,t){var r=t.initMapStateToProps,n=t.initMapDispatchToProps,o=t.initMergeProps,i=G(t,ue),a=r(e,i),u=n(e,i),c=o(e,i);return(i.pure?le:ce)(a,u,c,e,i)}var de=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function pe(e,t,r){for(var n=t.length-1;n>=0;n--){var o=t[n](e);if(o)return o}return function(t,n){throw new Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+n.wrappedComponentName+".")}}function fe(e,t){return e===t}function ge(e){var t=void 0===e?{}:e,r=t.connectHOC,n=void 0===r?X:r,o=t.mapStateToPropsFactories,i=void 0===o?oe:o,a=t.mapDispatchToPropsFactories,u=void 0===a?ne:a,c=t.mergePropsFactories,l=void 0===c?ae:c,s=t.selectorFactory,d=void 0===s?se:s;return function(e,t,r,o){void 0===o&&(o={});var a=o,c=a.pure,s=void 0===c||c,p=a.areStatesEqual,f=void 0===p?fe:p,g=a.areOwnPropsEqual,m=void 0===g?Z:g,v=a.areStatePropsEqual,b=void 0===v?Z:v,h=a.areMergedPropsEqual,y=void 0===h?Z:h,x=G(a,de),w=pe(e,i,"mapStateToProps"),D=pe(t,u,"mapDispatchToProps"),I=pe(r,l,"mergeProps");return n(d,j({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:w,initMapDispatchToProps:D,initMergeProps:I,pure:s,areStatesEqual:f,areOwnPropsEqual:m,areStatePropsEqual:b,areMergedPropsEqual:y},x))}}var me=ge();var ve,be=window.ReactDOM;ve=be.unstable_batchedUpdates,B=ve;var he=function(e){var t=e.top,r=e.right,n=e.bottom,o=e.left;return{top:t,right:r,bottom:n,left:o,width:r-o,height:n-t,x:o,y:t,center:{x:(r+o)/2,y:(n+t)/2}}},ye=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},xe=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},we={top:0,right:0,bottom:0,left:0},De=function(e){var t=e.borderBox,r=e.margin,n=void 0===r?we:r,o=e.border,i=void 0===o?we:o,a=e.padding,u=void 0===a?we:a,c=he(ye(t,n)),l=he(xe(t,i)),s=he(xe(l,u));return{marginBox:c,borderBox:he(t),paddingBox:l,contentBox:s,margin:n,border:i,padding:u}},Ie=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var r=Number(t);return isNaN(r)&&m(!1),r},Ee=function(e,t){var r,n,o=e.borderBox,i=e.border,a=e.margin,u=e.padding,c=(n=t,{top:(r=o).top+n.y,left:r.left+n.x,bottom:r.bottom+n.y,right:r.right+n.x});return De({borderBox:c,border:i,margin:a,padding:u})},Se=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Ee(e,t)},Ce=function(e,t){var r={top:Ie(t.marginTop),right:Ie(t.marginRight),bottom:Ie(t.marginBottom),left:Ie(t.marginLeft)},n={top:Ie(t.paddingTop),right:Ie(t.paddingRight),bottom:Ie(t.paddingBottom),left:Ie(t.paddingLeft)},o={top:Ie(t.borderTopWidth),right:Ie(t.borderRightWidth),bottom:Ie(t.borderBottomWidth),left:Ie(t.borderLeftWidth)};return De({borderBox:e,margin:r,padding:n,border:o})},Oe=function(e){var t=e.getBoundingClientRect(),r=window.getComputedStyle(e);return Ce(t,r)},Pe=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function Ne(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(n=e[r],o=t[r],!(n===o||Pe(n)&&Pe(o)))return!1;var n,o;return!0}var Re=function(e,t){var r;void 0===t&&(t=Ne);var n,o=[],i=!1;return function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return i&&r===this&&t(a,o)||(n=e.apply(this,a),i=!0,r=this,o=a),n}},Be=r(1113),Le=r.n(Be),Ae=r(3929),Te=r.n(Ae),_e=r(3029),Me=r.n(_e),je=function(e){var t=[],r=null,n=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];t=o,r||(r=requestAnimationFrame((function(){r=null,e.apply(void 0,t)})))};return n.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},n};r(6380);function Ge(e){return-1!==e.message.indexOf("Invariant failed")}var Fe=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).onError=void 0,t.setOnError=function(e){t.onError=e},t.onFatalError=function(e){t.onError&&t.onError(),Ge(e)&&t.setState({})},t}f(t,e);var r=t.prototype;return r.componentDidMount=function(){window.addEventListener("error",this.onFatalError)},r.componentWillUnmount=function(){window.removeEventListener("error",this.onFatalError)},r.componentDidCatch=function(e){if(this.onFatalError(e),!Ge(e))throw e},r.render=function(){return this.props.children(this.setOnError)},t}(a().Component),We={x:0,y:0},ke=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},Ue=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},He=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}},ze=function(e,t,r){var n;return void 0===r&&(r=0),(n={})[e]=t,n["x"===e?"y":"x"]=r,n},$e=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},qe=function(e,t){return Math.min.apply(Math,t.map((function(t){return $e(e,t)})))},Ye=function(e){return function(t){return{x:e(t.x),y:e(t.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}},Je=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}]},Xe=function(e,t){return t&&t.shouldClipSubject?function(e,t){var r=he({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r}(t.pageMarginBox,e):he(e)},Qe=function(e){var t=e.page,r=e.withPlaceholder,n=e.axis,i=e.frame,a=function(e,t){return t?Ke(e,t.scroll.diff.displacement):e}(t.marginBox,i),u=function(e,t,r){var n;return r&&r.increasedBy?o({},e,((n={})[t.end]=e[t.end]+r.increasedBy[t.line],n)):e}(a,n,r);return{page:t,withPlaceholder:r,active:Xe(u,i)}},Ze=function(e,t){e.frame||m(!1);var r=e.frame,n=Ue(t,r.scroll.initial),i=Ve(n),a=o({},r,{scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:i},max:r.scroll.max}});return o({},e,{frame:a,subject:Qe({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:a})})},et=function(e){var t=e.merge,r=e.destination;return r?r.droppableId:t?t.combine.droppableId:null};function tt(e){return Le()(e)}function rt(e,t){if(e.findIndex)return e.findIndex(t);for(var r=0;r<e.length;r++)if(t(e[r]))return r;return-1}function nt(e,t){if(e.find)return e.find(t);var r=rt(e,t);return-1!==r?e[r]:void 0}var ot=Re((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),it=Re((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),at=Re((function(e){return tt(e)})),ut=Re((function(e){return tt(e)})),ct=function(e,t){return function(r){return e<=r&&r<=t}},lt=function(e){var t=ct(e.top,e.bottom),r=ct(e.left,e.right);return function(e){return t(e.y)&&t(e.y)&&r(e.x)&&r(e.x)}},st=Re((function(e,t){var r=ut(t).filter((function(t){return e===t.descriptor.droppableId})).sort((function(e,t){return e.descriptor.index-t.descriptor.index}));return r})),dt={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},pt={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},ft=function(e,t){return e===dt?"down"===t.vertical:"right"===t.horizontal},gt=function(e,t){return Boolean(t.wasDisplaced[e])},mt=function(e){var t=e.displaced,r=e.onLift,n=e.combineWith,o=e.displacedBy,i=Boolean(t[n]);return gt(n,r)?i?We:Ve(o.point):i?o.point:We},vt=function(e,t,r){return r?e!==r.combine.draggableId?t:r.whenEntered:t},bt=function(e){var t=e.pageBorderBoxCenterWithDroppableScrollChange,r=e.previousImpact,n=e.destination,i=e.insideDestinationWithoutDraggable,a=e.userDirection,u=e.onLift;if(!n.isCombineEnabled)return null;var c=n.axis,l=r.movement.map,s=r.movement.displacedBy,d=r.merge,p=nt(i,(function(e){var r=e.descriptor.id,n=mt({displaced:l,onLift:u,combineWith:r,displacedBy:s});return function(e){var t=e.id,r=e.currentCenter,n=e.axis,o=e.borderBox,i=e.displaceBy,a=e.currentUserDirection,u=e.oldMerge,c=o[n.start]+i[n.line],l=o[n.end]+i[n.line],s=.666*o[n.size],d=vt(t,a,u),p=ft(n,d),f=r[n.line];return p?ct(c,c+s)(f):ct(l-s,l)(f)}({id:r,currentCenter:t,axis:c,borderBox:e.page.borderBox,displaceBy:n,currentUserDirection:a,oldMerge:d})}));return p?o({},r,{destination:null,merge:{whenEntered:vt(p.descriptor.id,a,d),combine:{draggableId:p.descriptor.id,droppableId:n.descriptor.id}}}):null},ht=function(e){var t=ct(e.top,e.bottom),r=ct(e.left,e.right);return function(n){if(t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right))return!0;var o=t(n.top)||t(n.bottom),i=r(n.left)||r(n.right);if(o&&i)return!0;var a=n.top<e.top&&n.bottom>e.bottom,u=n.left<e.left&&n.right>e.right;return!(!a||!u)||(a&&i||u&&o)}},yt=function(e){var t=ct(e.top,e.bottom),r=ct(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&r(e.left)&&r(e.right)}},xt=function(e){var t=e.target,r=e.destination,n=e.viewport,o=e.withDroppableDisplacement,i=e.isVisibleThroughFrameFn,a=o?function(e,t){var r=t.frame?t.frame.scroll.diff.displacement:We;return Ke(e,r)}(t,r):t;return function(e,t,r){return!!t.subject.active&&r(t.subject.active)(e)}(a,r,i)&&function(e,t,r){return r(t)(e)}(a,n,i)},wt=function(e){return xt(o({},e,{isVisibleThroughFrameFn:ht}))},Dt=function(e){return xt(o({},e,{isVisibleThroughFrameFn:yt}))},It=function(e){var t=e.draggable,r=e.destination,n=e.previousImpact,o=e.viewport,i=e.onLift,a=e.forceShouldAnimate,u=t.descriptor.id,c=n.movement.map,l=function(e,t){var r=e.page.marginBox;if(!gt(e.descriptor.id,t))return r;var n={top:t.displacedBy.point.y,right:0,bottom:0,left:t.displacedBy.point.x};return he(ye(r,n))}(t,i),s=wt({target:l,destination:r,viewport:o,withDroppableDisplacement:!0}),d=function(e,t,r){return"boolean"===typeof e?e:!!t&&(!r||r.shouldAnimate)}(a,s,c[u]);return{draggableId:u,isVisible:s,shouldAnimate:d}},Et=Re((function(e){return e.reduce((function(e,t){return e[t.draggableId]=t,e}),{})})),St=Re((function(e,t){var r=t[e.line];return{value:r,point:ze(e.line,r)}})),Ct={displaced:[],map:{},displacedBy:{point:We,value:0}},Ot={movement:Ct,destination:null,merge:null},Pt=Re((function(e,t){return t.filter((function(t){return t.descriptor.id!==e.descriptor.id}))})),Nt=function(e){var t=e.pageBorderBoxCenter,r=e.draggable,n=e.draggables,o=e.droppables,i=e.previousImpact,a=e.viewport,u=e.userDirection,c=e.onLift,l=function(e){var t=e.target,r=e.droppables,n=nt(at(r),(function(e){if(!e.isEnabled)return!1;var r=e.subject.active;return!!r&&lt(r)(t)}));return n?n.descriptor.id:null}({target:t,droppables:o});if(!l)return Ot;var s=o[l],d=st(s.descriptor.id,n),p=Pt(r,d),f=function(e,t){var r=e.frame;return r?ke(t,r.scroll.diff.value):t}(s,t),g=bt({pageBorderBoxCenterWithDroppableScrollChange:f,previousImpact:i,destination:s,insideDestinationWithoutDraggable:p,userDirection:u,onLift:c});return g||function(e){var t=e.pageBorderBoxCenterWithDroppableScrollChange,r=e.draggable,n=e.destination,o=e.insideDestinationWithoutDraggable,i=e.previousImpact,a=e.viewport,u=e.userDirection,c=e.onLift,l=n.axis,s=ft(n.axis,u),d=St(n.axis,r.displaceBy),p=t[l.line],f=d.value,g=o.filter((function(e){var t=e.page.borderBox,r=t[l.start],n=t[l.end],o=gt(e.descriptor.id,c);return s?o?p<r:p<r+f:o?p<=n-f:p<=n})).map((function(e){return It({draggable:e,destination:n,previousImpact:i,viewport:a.frame,onLift:c})})),m=o.length-g.length;return{movement:{displacedBy:d,displaced:g,map:Et(g)},destination:{droppableId:n.descriptor.id,index:m},merge:null}}({pageBorderBoxCenterWithDroppableScrollChange:f,destination:s,draggable:r,insideDestinationWithoutDraggable:p,previousImpact:i,viewport:a,userDirection:u,onLift:c})},Rt=function(e){var t,r=e.draggable,n=e.home,o=e.draggables,i=e.viewport,a=St(n.axis,r.displaceBy),u=st(n.descriptor.id,o).slice(r.descriptor.index+1),c={displacedBy:a,wasDisplaced:u.reduce((function(e,t){return e[t.descriptor.id]=!0,e}),{})},l=u.map((function(e){return It({draggable:e,destination:n,previousImpact:Ot,viewport:i.frame,forceShouldAnimate:!1,onLift:c})}));return{impact:{movement:{displaced:l,map:Et(l),displacedBy:a},destination:(t=r.descriptor,{index:t.index,droppableId:t.droppableId}),merge:null},onLift:c}},Bt=function(e){var t=e.draggable,r=e.offset,n=e.initialWindowScroll,i=Ee(t.client,r),a=Se(i,n);return o({},t,{placeholder:o({},t.placeholder,{client:i}),client:i,page:a})},Lt=function(e){var t=e.updatedDroppables,r=e.criticalId,n=e.existing,i=e.additions,a=e.removals,u=e.viewport,c=function(e){var t=e.existing,r=e.droppables,n=e.additions,i=e.removals,a=e.viewport,u={};return at(r).forEach((function(e){var r=e.axis,c=st(e.descriptor.id,t),l={},s=function(e,t){var r=l[e];l[e]=r?{indexChange:r.indexChange+t.indexChange,offset:ke(r.offset,t.offset)}:t},d=it(i.map((function(e){var r=t[e];return r||m(!1),r})).filter((function(t){return t.descriptor.droppableId===e.descriptor.id}))),p=c.filter((function(e,t){if(!Boolean(d[e.descriptor.id]))return!0;var n=Ve(ze(r.line,e.displaceBy[r.line]));return c.slice(t).forEach((function(e){d[e.descriptor.id]||s(e.descriptor.id,{indexChange:-1,offset:n})})),!1})),f=n.filter((function(t){return t.descriptor.droppableId===e.descriptor.id})),g=p.slice(0);f.forEach((function(e){g.splice(e.descriptor.index,0,e)}));var v=it(f);g.forEach((function(e,t){if(Boolean(v[e.descriptor.id])){var n=ze(r.line,e.client.marginBox[r.size]);g.slice(t).forEach((function(e){v[e.descriptor.id]||s(e.descriptor.id,{indexChange:1,offset:n})}))}})),g.forEach((function(e){if(!v[e.descriptor.id]){var t=l[e.descriptor.id];if(t){var r=Bt({draggable:e,offset:t.offset,initialWindowScroll:a.scroll.initial}),n=e.descriptor.index+t.indexChange,i=o({},r,{descriptor:o({},e.descriptor,{index:n})});u[r.descriptor.id]=i}}}))})),o({},t,u)}({droppables:t,existing:n,additions:i,removals:a,viewport:u}),l=c[r],s=t[l.descriptor.droppableId],d=function(e){var t=e.additions,r=e.updatedDroppables,n=e.viewport,o=n.scroll.diff.value;return t.map((function(e){var t=e.descriptor.droppableId,i=r[t].frame;i||m(!1);var a=i.scroll.diff.value,u=ke(o,a);return Bt({draggable:e,offset:u,initialWindowScroll:n.scroll.initial})}))}({additions:i,updatedDroppables:t,viewport:u}),p=function(e){var t=e.additions,r=e.dragging,n=e.home,o=e.viewport,i=St(n.axis,r.displaceBy);return t.map((function(e){return e.descriptor.droppableId!==n.descriptor.id||e.descriptor.index<r.descriptor.index?e:Bt({draggable:e,offset:i.point,initialWindowScroll:o.scroll.initial})}))}({additions:d,dragging:l,home:s,viewport:u}),f=o({},c,it(p));return a.forEach((function(e){delete f[e]})),f},At=function(e){var t=e.scrollHeight,r=e.scrollWidth,n=e.height,o=e.width,i=Ue({x:r,y:t},{x:o,y:n});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},Tt=function(e){var t=e.descriptor,r=e.isEnabled,n=e.isCombineEnabled,o=e.isFixedOnPage,i=e.direction,a=e.client,u=e.page,c=e.closest,l=function(){if(!c)return null;var e=c.scrollSize,t=c.client,r=At({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:r,diff:{value:We,displacement:We}}}}(),s="vertical"===i?dt:pt;return{descriptor:t,isCombineEnabled:n,isFixedOnPage:o,axis:s,isEnabled:r,client:a,page:u,frame:l,subject:Qe({page:u,withPlaceholder:null,axis:s,frame:l})}},_t=function(e,t){return e.descriptor.droppableId===t.descriptor.id},Mt=function(e,t){return o({},e,{scroll:o({},e.scroll,{max:t})})},jt=function(e,t,r){var n=e.frame;_t(t,e)&&m(!1),e.subject.withPlaceholder&&m(!1);var i=St(e.axis,t.displaceBy).point,a=function(e,t,r){var n=e.axis,o=e.subject.page.contentBox[n.size],i=st(e.descriptor.id,r).reduce((function(e,t){return e+t.client.marginBox[n.size]}),0)+t[n.line]-o;return i<=0?null:ze(n.line,i)}(e,i,r),u={placeholderSize:i,increasedBy:a,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!n)return o({},e,{subject:Qe({page:e.subject.page,withPlaceholder:u,axis:e.axis,frame:e.frame})});var c=a?ke(n.scroll.max,a):n.scroll.max,l=Mt(n,c);return o({},e,{subject:Qe({page:e.subject.page,withPlaceholder:u,axis:e.axis,frame:l}),frame:l})},Gt=function(e){var t=e.subject.withPlaceholder;t||m(!1);var r=e.frame;if(!r)return o({},e,{subject:Qe({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null})});var n=t.oldFrameMaxScroll;n||m(!1);var i=Mt(r,n);return o({},e,{subject:Qe({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null}),frame:i})},Ft=function(e){var t=e.frame;return t||m(!1),t},Wt=function(e,t){var r;return o({},e,((r={})[t.descriptor.id]=t,r))},kt=function(e){var t=e.draggable,r=e.draggables,n=e.droppables,o=e.previousImpact,i=e.impact,a=function(e){var t=e.previousImpact,r=e.impact,n=e.droppables,o=et(t),i=et(r);if(!o)return n;if(o===i)return n;var a=n[o];if(!a.subject.withPlaceholder)return n;var u=Gt(a);return Wt(n,u)}({previousImpact:o,impact:i,droppables:n}),u=et(i);if(!u)return a;var c=n[u];if(_t(t,c))return a;if(c.subject.withPlaceholder)return a;var l=jt(c,t,r);return Wt(a,l)},Ut=function(e){var t,r,n=e.state,i=e.published,a=function(e){var t=e.modified,r=e.existing,n=e.viewport;if(!t.length)return r;var i=t.map((function(e){var t=r[e.descriptor.id];t||m(!1);var o,i,a=Boolean(t.subject.withPlaceholder)?Gt(t):t,u=a.client,c=e.client,l=Ft(a),s=Ft(e),d=De({borderBox:(a.axis,o=u.borderBox,i=c.borderBox,{top:o.top,left:o.left,right:o.left+i.width,bottom:o.top+i.height}),margin:u.margin,border:u.border,padding:u.padding}),p={client:l.frameClient,page:Se(l.frameClient,n.scroll.initial),shouldClipSubject:l.shouldClipSubject,scrollSize:s.scrollSize,scroll:l.scroll.initial},f=Tt({descriptor:e.descriptor,isEnabled:e.isEnabled,isCombineEnabled:e.isCombineEnabled,isFixedOnPage:e.isFixedOnPage,direction:e.axis.direction,client:d,page:Se(d,n.scroll.initial),closest:p});return Ze(f,s.scroll.current)}));return o({},r,ot(i))}({modified:i.modified,existing:n.dimensions.droppables,viewport:n.viewport}),u=Lt({updatedDroppables:a,criticalId:n.critical.draggable.id,existing:n.dimensions.draggables,additions:i.additions,removals:i.removals,viewport:n.viewport}),c={draggable:u[n.critical.draggable.id].descriptor,droppable:a[n.critical.droppable.id].descriptor},l=n.dimensions.draggables[c.draggable.id],s=u[c.draggable.id],d={draggables:u,droppables:kt({draggable:s,draggables:u,droppables:a,previousImpact:n.impact,impact:n.impact})},p=function(e){var t=e.initial,r=e.current,n=e.oldClientBorderBoxCenter,o=e.newClientBorderBoxCenter,i=e.viewport,a=Ue(o,n),u=function(){var e={selection:ke(t.client.selection,a),borderBoxCenter:o,offset:We};return{client:e,page:{selection:ke(e.selection,i.scroll.initial),borderBoxCenter:ke(e.selection,i.scroll.initial)}}}(),c=function(){var e=Ve(a),t=ke(r.client.offset,e),n={selection:ke(u.client.selection,t),borderBoxCenter:ke(u.client.borderBoxCenter,t),offset:t},o={selection:ke(n.selection,i.scroll.current),borderBoxCenter:ke(n.borderBoxCenter,i.scroll.current)};return He(r.client.borderBoxCenter,n.borderBoxCenter)||m(!1),{client:n,page:o}}();return{current:c,initial:u}}({initial:n.initial,current:n.current,oldClientBorderBoxCenter:l.client.borderBox.center,newClientBorderBoxCenter:s.client.borderBox.center,viewport:n.viewport}),f=p.initial,g=p.current,v=Rt({draggable:s,home:d.droppables[c.droppable.id],draggables:d.draggables,viewport:n.viewport}),b=v.impact,h=v.onLift,y=function(e){var t=e.movement.displaced;if(!t.length)return e;var r=t.map((function(e){return e.isVisible&&e.shouldAnimate?o({},e,{shouldAnimate:!1}):e}));return o({},e,{movement:o({},e.movement,{displaced:r,map:Et(r)})})}(Nt({pageBorderBoxCenter:g.page.borderBoxCenter,draggable:s,draggables:d.draggables,droppables:d.droppables,previousImpact:b,viewport:n.viewport,userDirection:n.userDirection,onLift:h}));Boolean("SNAP"===n.movementMode&&!et(y))&&m(!1);var x=o({phase:"DRAGGING"},n,((t={}).phase="DRAGGING",t.critical=c,t.current=g,t.initial=f,t.impact=y,t.dimensions=d,t.onLift=h,t.onLiftImpact=b,t.forceShouldAnimate=!1,t));return"COLLECTING"===n.phase?x:o({phase:"DROP_PENDING"},x,((r={}).phase="DROP_PENDING",r.reason=n.reason,r.isWaiting=!1,r))},Ht={vertical:"down",horizontal:"right"},Vt={vertical:"up",horizontal:"left"},zt=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,u=e.previousImpact,c=e.onLift,l=u.destination?function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.draggable,o=e.insideDestination,i=e.location,a=o.slice(),u=i.index;!r&&a.splice(i.index,0,n);var c=t?u+1:u-1;return c<0||c>a.length-1?null:{proposedIndex:c,modifyDisplacement:!0}}({isMovingForward:t,isInHomeList:r,draggable:n,location:u.destination,insideDestination:a}):u.merge?function(e){var t=e.isMovingForward,r=e.destination,n=e.previousImpact,o=e.draggables,i=e.merge,a=e.onLift;if(!r.isCombineEnabled)return null;var u=n.movement,c=i.combine.draggableId,l=o[c].descriptor.index;return gt(c,a)?u.map[c]?t?{proposedIndex:l,modifyDisplacement:!0}:{proposedIndex:l-1,modifyDisplacement:!1}:t?{proposedIndex:l,modifyDisplacement:!1}:{proposedIndex:l-1,modifyDisplacement:!0}:Boolean(u.map[c])?t?{proposedIndex:l+1,modifyDisplacement:!0}:{proposedIndex:l,modifyDisplacement:!1}:t?{proposedIndex:l+1,modifyDisplacement:!1}:{proposedIndex:l,modifyDisplacement:!0}}({isMovingForward:t,destination:i,previousImpact:u,draggables:o,merge:u.merge,onLift:c}):null;if(null==l)return null;var s=l.proposedIndex,d=l.modifyDisplacement,p=St(i.axis,n.displaceBy),f=function(){var e=u.movement.displaced;return d?t?function(e){return e.slice(1)}(e):function(e,t){return[{draggableId:e.descriptor.id,isVisible:!0,shouldAnimate:!0}].concat(t)}(Pt(n,a)[s],e):e}();return{movement:{displacedBy:p,displaced:f,map:Et(f)},destination:{droppableId:i.descriptor.id,index:s},merge:null}},$t=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},qt=function(e,t,r){return t[e.crossAxisStart]+r.margin[e.crossAxisStart]+r.borderBox[e.crossAxisSize]/2},Yt=function(e){var t=e.axis,r=e.moveRelativeTo,n=e.isMoving;return ze(t.line,r.marginBox[t.end]+$t(t,n),qt(t,r.marginBox,n))},Kt=function(e){var t=e.axis,r=e.moveRelativeTo,n=e.isMoving;return ze(t.line,r.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,n),qt(t,r.marginBox,n))},Jt=function(e){var t=e.movement,r=e.draggable,n=e.draggables,o=e.droppable,i=e.onLift,a=st(o.descriptor.id,n),u=r.page,c=o.axis;if(!a.length)return function(e){var t=e.axis,r=e.moveInto,n=e.isMoving;return ze(t.line,r.contentBox[t.start]+$t(t,n),qt(t,r.contentBox,n))}({axis:c,moveInto:o.page,isMoving:u});var l=t.displaced,s=t.displacedBy;if(l.length){var d=n[l[0].draggableId];if(gt(d.descriptor.id,i))return Kt({axis:c,moveRelativeTo:d.page,isMoving:u});var p=Ee(d.page,s.point);return Kt({axis:c,moveRelativeTo:p,isMoving:u})}var f=a[a.length-1];if(f.descriptor.id===r.descriptor.id)return u.borderBox.center;if(gt(f.descriptor.id,i)){var g=Ee(f.page,Ve(i.displacedBy.point));return Yt({axis:c,moveRelativeTo:g,isMoving:u})}return Yt({axis:c,moveRelativeTo:f.page,isMoving:u})},Xt=function(e,t){var r=e.frame;return r?ke(t,r.scroll.diff.displacement):t},Qt=function(e){var t=e.impact,r=e.draggable,n=e.droppable,o=e.draggables,i=e.onLift,a=t.merge,u=t.destination,c=r.page.borderBox.center;return n?u?Jt({movement:t.movement,draggable:r,draggables:o,droppable:n,onLift:i}):a?function(e){var t=e.combine,r=e.onLift,n=e.movement,o=e.draggables,i=t.draggableId,a=o[i].page.borderBox.center,u=mt({displaced:n.map,onLift:r,combineWith:i,displacedBy:n.displacedBy});return ke(a,u)}({movement:t.movement,combine:a.combine,draggables:o,onLift:i}):c:c},Zt=function(e){var t=Qt(e),r=e.droppable;return r?Xt(r,t):t},er=function(e,t){var r=Ue(t,e.scroll.initial),n=Ve(r);return{frame:he({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}}},tr=function(e,t){return o({},e,{movement:o({},e.movement,{displaced:t,map:Et(t)})})},rr=function(e){var t=e.pageBorderBoxCenter,r=e.draggable,n=function(e,t){return ke(e.scroll.diff.displacement,t)}(e.viewport,t),o=Ue(n,r.page.borderBox.center);return ke(r.client.borderBox.center,o)},nr=function(e){var t=e.draggable,r=e.destination,n=e.newPageBorderBoxCenter,i=e.viewport,a=e.withDroppableDisplacement,u=e.onlyOnMainAxis,c=void 0!==u&&u,l=Ue(n,t.page.borderBox.center),s={target:Ke(t.page.borderBox,l),destination:r,withDroppableDisplacement:a,viewport:i};return c?function(e){return xt(o({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var r=ct(e.top,e.bottom),n=ct(e.left,e.right);return function(e){return t===dt?r(e.top)&&r(e.bottom):n(e.left)&&n(e.right)}})}));var t}(s):Dt(s)},or=function(e){var t=e.isMovingForward,r=e.draggable,n=e.destination,o=e.draggables,i=e.previousImpact,a=e.viewport,u=e.previousPageBorderBoxCenter,c=e.previousClientSelection,l=e.onLift;if(!n.isEnabled)return null;var s=st(n.descriptor.id,o),d=_t(r,n),p=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.draggable,o=e.destination,i=e.insideDestination,a=e.previousImpact;if(!o.isCombineEnabled)return null;if(a.merge)return null;var u=a.destination;u||m(!1);var c=u.index,l=function(){var e=i.slice();return r&&e.splice(n.descriptor.index,1),e.splice(u.index,0,n),e}(),s=t?c+1:c-1;if(s<0)return null;if(s>l.length-1)return null;var d=l[s];d===n&&m(!1);var p={whenEntered:t?Ht:Vt,combine:{draggableId:d.descriptor.id,droppableId:o.descriptor.id}};return{movement:a.movement,destination:null,merge:p}}({isInHomeList:d,isMovingForward:t,draggable:r,destination:n,insideDestination:s,previousImpact:i})||zt({isMovingForward:t,isInHomeList:d,draggable:r,draggables:o,destination:n,insideDestination:s,previousImpact:i,onLift:l});if(!p)return null;var f=Zt({impact:p,draggable:r,droppable:n,draggables:o,onLift:l});if(nr({draggable:r,destination:n,newPageBorderBoxCenter:f,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:rr({pageBorderBoxCenter:f,draggable:r,viewport:a}),impact:p,scrollJumpRequest:null};var g=Ue(f,u),v=function(e){var t=e.impact,r=e.viewport,n=e.destination,o=e.draggables,i=e.maxScrollChange,a=e.onLift,u=t.movement.displaced,c=er(r,ke(r.scroll.current,i)),l=n.frame?Ze(n,ke(n.frame.scroll.current,i)):n,s=u.map((function(e){if(e.isVisible)return e;var i=o[e.draggableId],u=It({draggable:i,destination:n,previousImpact:t,viewport:c.frame,onLift:a,forceShouldAnimate:!1});if(u.isVisible)return u;var s=It({draggable:i,destination:l,previousImpact:t,viewport:r.frame,onLift:a,forceShouldAnimate:!1});return s.isVisible?s:e}));return tr(t,s)}({impact:p,viewport:a,destination:n,draggables:o,maxScrollChange:g,onLift:l});return{clientSelection:c,impact:v,scrollJumpRequest:g}},ir=function(e){var t=e.subject.active;return t||m(!1),t},ar=function(e,t){var r=e.page.borderBox.center;return gt(e.descriptor.id,t)?Ue(r,t.displacedBy.point):r},ur=function(e,t){var r=e.page.borderBox;return gt(e.descriptor.id,t)?Ke(r,Ve(t.displacedBy.point)):r},cr=function(e){var t=e.isMovingForward,r=e.previousPageBorderBoxCenter,n=e.draggable,o=e.isOver,i=e.draggables,a=e.droppables,u=e.previousImpact,c=e.viewport,l=e.onLift,s=function(e){var t=e.isMovingForward,r=e.pageBorderBoxCenter,n=e.source,o=e.droppables,i=e.viewport,a=n.subject.active;if(!a)return null;var u=n.axis,c=ct(a[u.start],a[u.end]),l=at(o).filter((function(e){return e!==n})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return ht(i.frame)(ir(e))})).filter((function(e){var r=ir(e);return t?a[u.crossAxisEnd]<r[u.crossAxisEnd]:r[u.crossAxisStart]<a[u.crossAxisStart]})).filter((function(e){var t=ir(e),r=ct(t[u.start],t[u.end]);return c(t[u.start])||c(t[u.end])||r(a[u.start])||r(a[u.end])})).sort((function(e,r){var n=ir(e)[u.crossAxisStart],o=ir(r)[u.crossAxisStart];return t?n-o:o-n})).filter((function(e,t,r){return ir(e)[u.crossAxisStart]===ir(r[0])[u.crossAxisStart]}));if(!l.length)return null;if(1===l.length)return l[0];var s=l.filter((function(e){return ct(ir(e)[u.start],ir(e)[u.end])(r[u.line])}));return 1===s.length?s[0]:s.length>1?s.sort((function(e,t){return ir(e)[u.start]-ir(t)[u.start]}))[0]:l.sort((function(e,t){var n=qe(r,Je(ir(e))),o=qe(r,Je(ir(t)));return n!==o?n-o:ir(e)[u.start]-ir(t)[u.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:r,source:o,droppables:a,viewport:c});if(!s)return null;var d=st(s.descriptor.id,i),p=function(e){var t=e.pageBorderBoxCenter,r=e.viewport,n=e.destination,o=e.insideDestination,i=e.onLift,a=o.filter((function(e){return Dt({target:ur(e,i),destination:n,viewport:r.frame,withDroppableDisplacement:!0})})).sort((function(e,r){var o=$e(t,Xt(n,ar(e,i))),a=$e(t,Xt(n,ar(r,i)));return o<a?-1:a<o?1:e.descriptor.index-r.descriptor.index}));return a[0]||null}({pageBorderBoxCenter:r,viewport:c,destination:s,insideDestination:d,onLift:l}),f=function(e){var t=e.previousPageBorderBoxCenter,r=e.moveRelativeTo,n=e.insideDestination,o=e.draggable,i=e.draggables,a=e.destination,u=e.previousImpact,c=e.viewport,l=e.onLift;if(!r){if(n.length)return null;var s={movement:Ct,destination:{droppableId:a.descriptor.id,index:0},merge:null},d=Zt({impact:s,draggable:o,droppable:a,draggables:i,onLift:l}),p=_t(o,a)?a:jt(a,o,i);return nr({draggable:o,destination:p,newPageBorderBoxCenter:d,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?s:null}var f=Boolean(t[a.axis.line]<r.page.borderBox.center[a.axis.line]),g=n.indexOf(r);-1===g&&m(!1);var v=r.descriptor.id===o.descriptor.id||f?g:g+1,b=Pt(o,n).slice(v).map((function(e){return It({draggable:e,destination:a,viewport:c.frame,previousImpact:u,onLift:l})}));return{movement:{displacedBy:St(a.axis,o.displaceBy),displaced:b,map:Et(b)},destination:{droppableId:a.descriptor.id,index:v},merge:null}}({previousPageBorderBoxCenter:r,destination:s,draggable:n,draggables:i,moveRelativeTo:p,insideDestination:d,previousImpact:u,viewport:c,onLift:l});if(!f)return null;var g=Zt({impact:f,draggable:n,droppable:s,draggables:i,onLift:l});return{clientSelection:rr({pageBorderBoxCenter:g,draggable:n,viewport:c}),impact:f,scrollJumpRequest:null}},lr=function(e){var t=e.state,r=e.type,n=function(e,t){var r=et(e);return r?t[r]:null}(t.impact,t.dimensions.droppables),o=Boolean(n),i=t.dimensions.droppables[t.critical.droppable.id],a=n||i,u=a.axis.direction,c="vertical"===u&&("MOVE_UP"===r||"MOVE_DOWN"===r)||"horizontal"===u&&("MOVE_LEFT"===r||"MOVE_RIGHT"===r);if(c&&!o)return null;var l="MOVE_DOWN"===r||"MOVE_RIGHT"===r,s=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,p=t.dimensions,f=p.draggables,g=p.droppables;return c?or({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:s,destination:a,draggables:f,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,onLift:t.onLift}):cr({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:s,isOver:a,draggables:f,droppables:g,previousImpact:t.impact,viewport:t.viewport,onLift:t.onLift})};function sr(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}var dr=function(e,t){return 0===t?e:t>0?"down":"up"},pr=function(e,t){return 0===t?e:t>0?"right":"left"},fr=function(e){var t=e.state,r=e.clientSelection,n=e.dimensions,i=e.viewport,a=e.impact,u=e.scrollJumpRequest,c=i||t.viewport,l=c.scroll.current,s=n||t.dimensions,d=r||t.current.client.selection,p=Ue(d,t.initial.client.selection),f={offset:p,selection:d,borderBoxCenter:ke(t.initial.client.borderBoxCenter,p)},g={selection:ke(f.selection,l),borderBoxCenter:ke(f.borderBoxCenter,l)},m={client:f,page:g},v=function(e,t,r){var n=Ue(r,t);return{horizontal:pr(e.horizontal,n.x),vertical:dr(e.vertical,n.y)}}(t.userDirection,t.current.page.borderBoxCenter,m.page.borderBoxCenter);if("COLLECTING"===t.phase)return o({phase:"COLLECTING"},t,{dimensions:s,viewport:c,current:m,userDirection:v});var b=s.draggables[t.critical.draggable.id],h=a||Nt({pageBorderBoxCenter:g.borderBoxCenter,draggable:b,draggables:s.draggables,droppables:s.droppables,previousImpact:t.impact,viewport:c,userDirection:v,onLift:t.onLift}),y=kt({draggable:b,impact:h,previousImpact:t.impact,draggables:s.draggables,droppables:s.droppables});return o({},t,{current:m,userDirection:v,dimensions:{draggables:s.draggables,droppables:y},impact:h,viewport:c,scrollJumpRequest:u||null,forceShouldAnimate:!u&&null})},gr=function(e){var t=e.impact,r=e.viewport,n=e.destination,o=e.draggables,i=e.onLift,a=e.forceShouldAnimate,u=t.movement.displaced.map((function(e){return It({draggable:o[e.draggableId],destination:n,previousImpact:t,viewport:r.frame,onLift:i,forceShouldAnimate:a})}));return tr(t,u)},mr=function(e){var t=e.impact,r=e.draggable,n=e.droppable,o=e.draggables,i=e.viewport,a=e.onLift,u=Zt({impact:t,draggable:r,draggables:o,droppable:n,onLift:a});return rr({pageBorderBoxCenter:u,draggable:r,viewport:i})},vr=function(e){var t=e.state,r=e.dimensions,n=e.viewport;"SNAP"!==t.movementMode&&m(!1);var o=t.impact,i=n||t.viewport,a=r||t.dimensions,u=a.draggables,c=a.droppables,l=u[t.critical.draggable.id],s=et(o);s||m(!1);var d=c[s],p=gr({impact:o,viewport:i,destination:d,draggables:u,onLift:t.onLift}),f=mr({impact:p,draggable:l,droppable:d,draggables:u,viewport:i,onLift:t.onLift});return fr({impact:p,clientSelection:f,state:t,dimensions:a,viewport:i})},br=function(e){return"SNAP"===e.movementMode},hr=function(e,t,r){var n=function(e,t){return{draggables:e.draggables,droppables:Wt(e.droppables,t)}}(e.dimensions,t);return!br(e)||r?fr({state:e,dimensions:n}):vr({state:e,dimensions:n})},yr={phase:"IDLE",completed:null,shouldFlush:!1},xr=function(e,t){if(void 0===e&&(e=yr),"CLEAN"===t.type)return o({},yr,{shouldFlush:t.payload.shouldFlush});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&m(!1);var r=t.payload,n=r.critical,i=r.clientSelection,a=r.viewport,u=r.dimensions,c=r.movementMode,l=u.draggables[n.draggable.id],s=u.droppables[n.droppable.id],d={selection:i,borderBoxCenter:l.client.borderBox.center,offset:We},p={client:d,page:{selection:ke(d.selection,a.scroll.initial),borderBoxCenter:ke(d.selection,a.scroll.initial)}},f=at(u.droppables).every((function(e){return!e.isFixedOnPage})),g=Rt({draggable:l,home:s,draggables:u.draggables,viewport:a}),v=g.impact;return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:c,dimensions:u,initial:p,current:p,isWindowScrollAllowed:f,impact:v,onLift:g.onLift,onLiftImpact:v,viewport:a,userDirection:Ht,scrollJumpRequest:null,forceShouldAnimate:null}}var b;if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&m(!1),o({phase:"COLLECTING"},e,((b={}).phase="COLLECTING",b)));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&m(!1),Ut({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;sr(e)||m(!1);var h=t.payload.client;return He(h,e.current.client.selection)?e:fr({state:e,clientSelection:h,impact:br(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return e;if("COLLECTING"===e.phase)return e;sr(e)||m(!1);var y=t.payload,x=y.id,w=y.offset,D=e.dimensions.droppables[x];if(!D)return e;var I=Ze(D,w);return hr(e,I,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;sr(e)||m(!1);var E=t.payload,S=E.id,C=E.isEnabled,O=e.dimensions.droppables[S];O||m(!1),O.isEnabled===C&&m(!1);var P=o({},O,{isEnabled:C});return hr(e,P,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;sr(e)||m(!1);var N=t.payload,R=N.id,B=N.isCombineEnabled,L=e.dimensions.droppables[R];L||m(!1),L.isCombineEnabled===B&&m(!1);var A=o({},L,{isCombineEnabled:B});return hr(e,A,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;sr(e)||m(!1),e.isWindowScrollAllowed||m(!1);var T=t.payload.newScroll;if(He(e.viewport.scroll.current,T))return e;var _=er(e.viewport,T);return br(e)?vr({state:e,viewport:_}):fr({state:e,viewport:_})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!sr(e))return e;var M=t.payload.maxScroll;if(He(M,e.viewport.scroll.max))return e;var j=o({},e.viewport,{scroll:o({},e.viewport.scroll,{max:M})});return o({phase:"DRAGGING"},e,{viewport:j})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&m(!1);var G=lr({state:e,type:t.type});return G?fr({state:e,impact:G.impact,clientSelection:G.clientSelection,scrollJumpRequest:G.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var F,W=t.payload.reason;return"COLLECTING"!==e.phase&&m(!1),o({phase:"DROP_PENDING"},e,((F={}).phase="DROP_PENDING",F.isWaiting=!0,F.reason=W,F))}if("DROP_ANIMATE"===t.type){var k=t.payload,U=k.completed,H=k.dropDuration,V=k.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&m(!1),{phase:"DROP_ANIMATING",dimensions:e.dimensions,completed:U,dropDuration:H,newHomeClientOffset:V}}if("DROP_COMPLETE"===t.type){var z=t.payload;return{phase:"IDLE",completed:z.completed,shouldFlush:z.shouldFlush}}return e},wr=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},Dr=function(){return{type:"COLLECTION_STARTING",payload:null}},Ir=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},Er=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},Sr=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},Cr=function(e){return{type:"MOVE",payload:e}},Or=function(e){return{type:"DROP_COMPLETE",payload:e}},Pr=function(e){return{type:"DROP",payload:e}},Nr="cubic-bezier(.2,1,.1,1)",Rr={drop:0,combining:.7},Br={drop:.75},Lr=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",Ar={fluid:"opacity "+Lr,snap:"transform "+Lr+", opacity "+Lr,drop:function(e){var t=e+"s "+Nr;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+Lr,placeholder:"height "+Lr+", width "+Lr+", margin "+Lr},Tr=function(e){return He(e,We)?null:"translate("+e.x+"px, "+e.y+"px)"},_r=Tr,Mr=function(e,t){var r=Tr(e);return r?t?r+" scale("+Br.drop+")":r:null},jr=.33,Gr=.55,Fr=Gr-jr,Wr=function(e){var t=e.getState,r=e.dispatch;return function(e){return function(n){if("DROP"===n.type){var i=t(),a=n.payload.reason;if("COLLECTING"!==i.phase){if("IDLE"!==i.phase){"DROP_PENDING"===i.phase&&i.isWaiting&&m(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&m(!1);var u=i.critical,c=i.dimensions,l=function(e){var t=e.reason,r=e.lastImpact,n=e.home,i=e.viewport,a=e.draggables,u=e.onLiftImpact,c=e.onLift,l="DROP"===t&&Boolean(et(r));return l?r.destination?{impact:r,didDropInsideDroppable:l}:{impact:o({},r,{movement:Ct}),didDropInsideDroppable:l}:{impact:gr({impact:u,destination:n,viewport:i,draggables:a,onLift:c,forceShouldAnimate:!0}),didDropInsideDroppable:l}}({reason:a,lastImpact:i.impact,onLift:i.onLift,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),s=l.impact,d=l.didDropInsideDroppable,p=c.draggables[i.critical.draggable.id],f=d?s.destination:null,g=d&&s.merge?s.merge.combine:null,v={index:u.draggable.index,droppableId:u.droppable.id},b={draggableId:p.descriptor.id,type:p.descriptor.type,source:v,reason:a,mode:i.movementMode,destination:f,combine:g},h=function(e){var t=e.impact,r=e.draggable,n=e.dimensions,o=e.viewport,i=e.onLift,a=n.draggables,u=n.droppables,c=et(t),l=c?u[c]:null,s=u[r.descriptor.droppableId],d=mr({impact:t,draggable:r,draggables:a,onLift:i,droppable:l||s,viewport:o}),p=Ue(d,r.client.borderBox.center),f=t.merge;return f&&gt(f.combine.draggableId,i)?Ue(p,i.displacedBy.point):p}({impact:s,draggable:p,dimensions:c,viewport:i.viewport,onLift:i.onLift}),y={critical:i.critical,result:b,impact:s};if(!He(i.current.client.offset,h)||Boolean(b.combine)){var x=function(e){var t=e.current,r=e.destination,n=e.reason,o=$e(t,r);if(o<=0)return jr;if(o>=1500)return Gr;var i=jr+Fr*(o/1500);return Number(("CANCEL"===n?.6*i:i).toFixed(2))}({current:i.current.client.offset,destination:h,reason:a});r(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:h,dropDuration:x,completed:y}))}else r(Or({completed:y,shouldFlush:!1}))}}else r(function(e){return{type:"DROP_PENDING",payload:e}}({reason:a}))}else e(n)}}},kr=function(e){return e+1},Ur=function(e,t){var r=e.droppableId===t.droppableId,n=kr(e.index),o=kr(t.index);return r?"\n You have moved the item from position "+n+"\n to position "+o+"\n ":"\n You have moved the item from position "+n+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+o+"\n "},Hr=function(e,t,r){return t.droppableId===r.droppableId?"\n The item "+e+"\n has been combined with "+r.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+r.draggableId+"\n in list "+r.droppableId+"\n "},Vr=function(e){return"\n The item has returned to its starting position\n of "+kr(e.index)+"\n"},zr=function(e){return"\n You have lifted an item in position "+kr(e.source.index)+".\n Use the arrow keys to move, space bar to drop, and escape to cancel.\n"},$r=function(e){var t=e.destination;if(t)return Ur(e.source,t);var r=e.combine;return r?Hr(e.draggableId,e.source,r):"You are over an area that cannot be dropped on"},qr=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+Vr(e.source)+"\n ";var t=e.destination,r=e.combine;return t?"\n You have dropped the item.\n "+Ur(e.source,t)+"\n ":r?"\n You have dropped the item.\n "+Hr(e.draggableId,e.source,r)+"\n ":"\n The item has been dropped while not over a drop area.\n "+Vr(e.source)+"\n "},Yr=function(){var e=[];return{add:function(t){var r=setTimeout((function(){return function(t){var r=rt(e,(function(e){return e.timerId===t}));-1===r&&m(!1),e.splice(r,1)[0].callback()}(r)})),n={timerId:r,callback:t};e.push(n)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},Kr=function(e,t){t()},Jr=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},Xr=function(e,t,r,n){if(e){var o=function(e){var t=!1,r=!1,n=setTimeout((function(){r=!0})),o=function(o){t||r||(t=!0,e(o),clearTimeout(n))};return o.wasCalled=function(){return t},o}(r);e(t,{announce:o}),o.wasCalled()||r(n(t))}else r(n(t))},Qr=function(e,t){var r=function(e,t){var r=Yr(),n=null,i=function(r){n||m(!1),n=null,Kr(0,(function(){return Xr(e().onDragEnd,r,t,qr)}))};return{beforeStart:function(t,r){n&&m(!1),Kr(0,(function(){var n=e().onBeforeDragStart;n&&n(Jr(t,r))}))},start:function(o,i){n&&m(!1);var a=Jr(o,i);n={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},r.add((function(){Kr(0,(function(){return Xr(e().onDragStart,a,t,zr)}))}))},update:function(i,a){var u=a.destination,c=a.merge?a.merge.combine:null;n||m(!1);var l=!function(e,t){if(e===t)return!0;var r=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,n=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return r&&n}(i,n.lastCritical);l&&(n.lastCritical=i);var s,d,p=(d=u,!(null==(s=n.lastLocation)&&null==d||null!=s&&null!=d&&s.droppableId===d.droppableId&&s.index===d.index));p&&(n.lastLocation=u);var f=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(n.lastCombine,c);if(f&&(n.lastCombine=c),l||p||f){var g=o({},Jr(i,n.mode),{combine:c,destination:u});r.add((function(){Kr(0,(function(){return Xr(e().onDragUpdate,g,t,$r)}))}))}},flush:function(){n||m(!1),r.flush()},drop:i,abort:function(){if(n){var e=o({},Jr(n.lastCritical,n.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,t);return function(e){return function(t){return function(n){if("INITIAL_PUBLISH"===n.type){var o=n.payload.critical;return r.beforeStart(o,n.payload.movementMode),t(n),void r.start(o,n.payload.movementMode)}if("DROP_COMPLETE"===n.type){var i=n.payload.completed.result;return r.flush(),t(n),void r.drop(i)}if(t(n),"CLEAN"!==n.type){var a=e.getState();"DRAGGING"===a.phase&&r.update(a.critical,a.impact)}else r.abort()}}}},Zr=function(e){return function(t){return function(r){if("DROP_ANIMATION_FINISHED"===r.type){var n=e.getState();"DROP_ANIMATING"!==n.phase&&m(!1),e.dispatch(Or({completed:n.completed,shouldFlush:!1}))}else t(r)}}},en=function(e){return function(t){return function(r){if(t(r),"PUBLISH_WHILE_DRAGGING"===r.type){var n=e.getState();"DROP_PENDING"===n.phase&&(n.isWaiting||e.dispatch(Pr({reason:n.reason})))}}}},tn=N,rn=function(e){var t,r=e.dimensionMarshal,n=e.styleMarshal,o=e.getResponders,i=e.announce,a=e.autoScroller;return C(xr,tn(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw new Error(w(15))},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return n=N.apply(void 0,i)(r.dispatch),x(x({},r),{},{dispatch:n})}}}((t=n,function(){return function(e){return function(r){"INITIAL_PUBLISH"===r.type&&t.dragging(),"DROP_ANIMATE"===r.type&&t.dropping(r.payload.completed.result.reason),"CLEAN"!==r.type&&"DROP_COMPLETE"!==r.type||t.resting(),e(r)}}}),function(e){return function(){return function(t){return function(r){"DROP_COMPLETE"!==r.type&&"CLEAN"!==r.type&&"DROP_ANIMATE"!==r.type||e.stopPublishing(),t(r)}}}}(r),function(e){return function(t){var r=t.getState,n=t.dispatch;return function(t){return function(o){if("LIFT"===o.type){var i=o.payload,a=i.id,u=i.clientSelection,c=i.movementMode,l=r();"DROP_ANIMATING"===l.phase&&n(Or({completed:l.completed,shouldFlush:!0})),"IDLE"!==r().phase&&m(!1);var s={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===c}},d=e.startPublishing(s),p=d.critical,f=d.dimensions,g=d.viewport;n({type:"INITIAL_PUBLISH",payload:{critical:p,dimensions:f,clientSelection:u,movementMode:c,viewport:g}})}else t(o)}}}}(r),Wr,Zr,en,function(e){return function(t){return function(r){return function(n){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"CLEAN"===e.type}(n))return e.stop(),void r(n);if(function(e){return"COLLECTION_STARTING"===e.type}(n))return e.cancelPending(),void r(n);if("INITIAL_PUBLISH"===n.type){r(n);var o=t.getState();return"DRAGGING"!==o.phase&&m(!1),void e.start(o)}r(n),e.scroll(t.getState())}}}}(a),Qr(o,i))))},nn=function(){return{x:window.pageXOffset,y:window.pageYOffset}},on=function(){var e=document.documentElement;return e||m(!1),e},an=function(){var e=on();return At({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},un=function(e){var t=e.critical,r=e.scrollOptions,n=e.entries,o=function(){var e=nn(),t=an(),r=e.y,n=e.x,o=on(),i=o.clientWidth,a=o.clientHeight;return{frame:he({top:r,left:n,right:n+i,bottom:r+a}),scroll:{initial:e,current:e,max:t,diff:{value:We,displacement:We}}}}(),i=o.scroll.current,a=t.droppable,u=tt(n.droppables).filter((function(e){return e.descriptor.type===a.type})).map((function(e){return e.callbacks.getDimensionAndWatchScroll(i,r)})),c=tt(n.draggables).filter((function(e){return e.descriptor.type===t.draggable.type})).map((function(e){return e.getDimension(i)}));return{dimensions:{draggables:it(c),droppables:ot(u)},critical:t,viewport:o}},cn=function(e,t){e.critical.draggable.type!==t.type&&m(!1)},ln=function(e){var t={droppables:{},draggables:{}},r=null,n=function(e){var t=e.getEntries,r=e.callbacks,n=function(){},o={additions:{},removals:{},modified:{}},i=null,a=function(){n(),i||(i=requestAnimationFrame((function(){i=null,r.collectionStarting();var e=r.getCritical(),n=t(),a=o,u=a.additions,c=a.removals,l=a.modified,s=Te()(u).map((function(e){return n.draggables[e].getDimension(We)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),d=Te()(l).map((function(t){var r=n.droppables[t];r||m(!1);var o={withoutPlaceholder:!(r.descriptor.id===e.droppable.id)};return r.callbacks.recollect(o)})),p={additions:s,removals:Te()(c),modified:d};o={additions:{},removals:{},modified:{}},r.publish(p)})))};return{add:function(e){o.additions[e.id]=e,o.modified[e.droppableId]=!0,o.removals[e.id]&&delete o.removals[e.id],a()},remove:function(e){o.removals[e.id]=e,o.modified[e.droppableId]=!0,o.additions[e.id]&&delete o.additions[e.id],a()},stop:function(){i&&(cancelAnimationFrame(i),i=null,o={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:e.publishWhileDragging,collectionStarting:e.collectionStarting,getCritical:function(){return r||m(!1),r.critical}},getEntries:function(){return t}}),o={registerDraggable:function(e,o){var i={descriptor:e,getDimension:o};t.draggables[e.id]=i,r&&(cn(r,e),n.add(e))},updateDraggable:function(e,r,n){var o=t.draggables[e.id];o||m(!1),o.descriptor===e&&delete t.draggables[e.id];var i={descriptor:r,getDimension:n};t.draggables[r.id]=i},unregisterDraggable:function(e){var o=t.draggables[e.id];o||m(!1),o.descriptor===e&&(delete t.draggables[e.id],r&&(r.critical.draggable.id===e.id&&m(!1),cn(r,e),n.remove(e)))},registerDroppable:function(e,n){var o=e.id;t.droppables[o]={descriptor:e,callbacks:n},r&&m(!1)},unregisterDroppable:function(e){var n=t.droppables[e.id];n||m(!1),n.descriptor===e&&(delete t.droppables[e.id],r&&m(!1))},updateDroppableIsEnabled:function(n,o){t.droppables[n]||m(!1),r&&e.updateDroppableIsEnabled({id:n,isEnabled:o})},updateDroppableIsCombineEnabled:function(n,o){t.droppables[n]||m(!1),r&&e.updateDroppableIsCombineEnabled({id:n,isCombineEnabled:o})},scrollDroppable:function(e,n){var o=t.droppables[e];o||m(!1),r&&o.callbacks.scroll(n)},updateDroppableScroll:function(n,o){t.droppables[n]||m(!1),r&&e.updateDroppableScroll({id:n,offset:o})},startPublishing:function(e){r&&m(!1);var n=t.draggables[e.draggableId];n||m(!1);var o=t.droppables[n.descriptor.droppableId];o||m(!1);var i={draggable:n.descriptor,droppable:o.descriptor};return r={critical:i},un({critical:i,entries:t,scrollOptions:e.scrollOptions})},stopPublishing:function(){if(r){n.stop();var e=r.critical.droppable;tt(t.droppables).filter((function(t){return t.descriptor.type===e.type})).forEach((function(e){return e.callbacks.dragStopped()})),r=null}}};return o},sn=function(e){window.scrollBy(e.x,e.y)},dn=Re((function(e){return at(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),pn=function(e){var t=e.center,r=e.destination,n=e.droppables;if(r){var o=n[r];return o.frame?o:null}var i=function(e,t){var r=nt(dn(t),(function(t){return t.frame||m(!1),lt(t.frame.pageMarginBox)(e)}));return r}(t,n);return i},fn=.25,gn=.05,mn=28,vn=function(e){return Math.pow(e,2)},bn={stopDampeningAt:1200,accelerateAt:360},hn=function(e){var t=e.startOfRange,r=e.endOfRange,n=e.current,o=r-t;return 0===o?0:(n-t)/o},yn=bn.accelerateAt,xn=bn.stopDampeningAt,wn=function(e){var t=e.distanceToEdge,r=e.thresholds,n=e.dragStartTime,o=e.shouldUseTimeDampening,i=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return mn;if(e===t.startScrollingFrom)return 1;var r=hn({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),n=mn*vn(1-r);return Math.ceil(n)}(t,r);return 0===i?0:o?Math.max(function(e,t){var r=t,n=xn,o=Me()()-r;if(o>=xn)return e;if(o<yn)return 1;var i=hn({startOfRange:yn,endOfRange:n,current:o}),a=e*vn(i);return Math.ceil(a)}(i,n),1):i},Dn=function(e){var t=e.container,r=e.distanceToEdges,n=e.dragStartTime,o=e.axis,i=e.shouldUseTimeDampening,a=function(e,t){return{startScrollingFrom:e[t.size]*fn,maxScrollValueAt:e[t.size]*gn}}(t,o);return r[o.end]<r[o.start]?wn({distanceToEdge:r[o.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:i}):-1*wn({distanceToEdge:r[o.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:i})},In=Ye((function(e){return 0===e?0:e})),En=function(e){var t=e.dragStartTime,r=e.container,n=e.subject,o=e.center,i=e.shouldUseTimeDampening,a={top:o.y-r.top,right:r.right-o.x,bottom:r.bottom-o.y,left:o.x-r.left},u=Dn({container:r,distanceToEdges:a,dragStartTime:t,axis:dt,shouldUseTimeDampening:i}),c=Dn({container:r,distanceToEdges:a,dragStartTime:t,axis:pt,shouldUseTimeDampening:i}),l=In({x:c,y:u});if(He(l,We))return null;var s=function(e){var t=e.container,r=e.subject,n=e.proposedScroll,o=r.height>t.height,i=r.width>t.width;return i||o?i&&o?null:{x:i?0:n.x,y:o?0:n.y}:n}({container:r,subject:n,proposedScroll:l});return s?He(s,We)?null:s:null},Sn=Ye((function(e){return 0===e?0:e>0?1:-1})),Cn=function(){var e=function(e,t){return e<0?e:e>t?e-t:0};return function(t){var r=t.current,n=t.max,o=t.change,i=ke(r,o),a={x:e(i.x,n.x),y:e(i.y,n.y)};return He(a,We)?null:a}}(),On=function(e){var t=e.max,r=e.current,n=e.change,o={x:Math.max(r.x,t.x),y:Math.max(r.y,t.y)},i=Sn(n),a=Cn({max:o,current:r,change:i});return!a||(0!==i.x&&0===a.x||0!==i.y&&0===a.y)},Pn=function(e,t){return On({current:e.scroll.current,max:e.scroll.max,change:t})},Nn=function(e,t){var r=e.frame;return!!r&&On({current:r.scroll.current,max:r.scroll.max,change:t})},Rn=function(e){var t=e.state,r=e.dragStartTime,n=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=t.current.page.borderBoxCenter,u=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var c=function(e){var t=e.viewport,r=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=En({dragStartTime:o,container:t.frame,subject:r,center:n,shouldUseTimeDampening:i});return a&&Pn(t,a)?a:null}({dragStartTime:r,viewport:t.viewport,subject:u,center:a,shouldUseTimeDampening:n});if(c)return void o(c)}var l=pn({center:a,destination:et(t.impact),droppables:t.dimensions.droppables});if(l){var s=function(e){var t=e.droppable,r=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var u=En({dragStartTime:o,container:a.pageMarginBox,subject:r,center:n,shouldUseTimeDampening:i});return u&&Nn(t,u)?u:null}({dragStartTime:r,droppable:l,subject:u,center:a,shouldUseTimeDampening:n});s&&i(l.descriptor.id,s)}},Bn=function(e){var t=e.move,r=e.scrollDroppable,n=e.scrollWindow,o=function(e,t){if(!Nn(e,t))return t;var n=function(e,t){var r=e.frame;return r&&Nn(e,t)?Cn({current:r.scroll.current,max:r.scroll.max,change:t}):null}(e,t);if(!n)return r(e.descriptor.id,t),null;var o=Ue(t,n);return r(e.descriptor.id,o),Ue(t,o)},i=function(e,t,r){if(!e)return r;if(!Pn(t,r))return r;var o=function(e,t){if(!Pn(e,t))return null;var r=e.scroll.max,n=e.scroll.current;return Cn({current:n,max:r,change:t})}(t,r);if(!o)return n(r),null;var i=Ue(r,o);return n(i),Ue(r,i)};return function(e){var r=e.scrollJumpRequest;if(r){var n=et(e.impact);n||m(!1);var a=o(e.dimensions.droppables[n],r);if(a){var u=e.viewport,c=i(e.isWindowScrollAllowed,u,a);c&&function(e,r){var n=ke(e.current.client.selection,r);t({client:n})}(e,c)}}}},Ln=function(e){var t=e.scrollDroppable,r=e.scrollWindow,n=e.move,o=function(e){var t=e.scrollWindow,r=e.scrollDroppable,n=je(t),o=je(r),i=null,a=function(e){i||m(!1);var t=i,r=t.shouldUseTimeDampening,a=t.dragStartTime;Rn({state:e,scrollWindow:n,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:r})},u=function(){i||m(!1),n.cancel(),o.cancel()};return{start:function(e){i&&m(!1);var t=Me()(),r=!1,n=function(){r=!0};Rn({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:n,scrollDroppable:n}),i={dragStartTime:t,shouldUseTimeDampening:r},r&&a(e)},stop:function(){i&&(u(),i=null)},cancelPending:u,scroll:a}}({scrollWindow:r,scrollDroppable:t}),i=Bn({move:n,scrollWindow:r,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},cancelPending:o.cancelPending,start:o.start,stop:o.stop}},An="data-react-beautiful-dnd-drag-handle",Tn=function(e,t){return e.map((function(e){var r=e.styles[t];return r?e.selector+" { "+r+" }":""})).join(" ")},_n="undefined"!==typeof window?i.useLayoutEffect:i.useEffect,Mn=function(){var e=document.querySelector("head");return e||m(!1),e},jn=function(){var e=document.createElement("style");return e.type="text/css",e};function Gn(e){var t=c((function(){return""+e}),[e]),r=c((function(){return function(e){var t,r=(t=e,function(e){return"["+e+'="'+t+'"]'}),n=function(){var e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:r(An),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}}(),o=[function(){var e="\n transition: "+Ar.outOfTheWay+";\n ";return{selector:r("data-react-beautiful-dnd-draggable"),styles:{dragging:e,dropAnimating:e,userCancel:e}}}(),n,{selector:r("data-react-beautiful-dnd-droppable"),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:Tn(o,"always"),resting:Tn(o,"resting"),dragging:Tn(o,"dragging"),dropAnimating:Tn(o,"dropAnimating"),userCancel:Tn(o,"userCancel")}}(t)}),[t]),n=(0,i.useRef)(null),o=(0,i.useRef)(null),a=l(Re((function(e){var t=o.current;t||m(!1),t.textContent=e})),[]),u=l((function(e){var t=n.current;t||m(!1),t.textContent=e}),[]);_n((function(){(n.current||o.current)&&m(!1);var e=jn(),i=jn();return n.current=e,o.current=i,e.setAttribute("data-react-beautiful-dnd-always",t),i.setAttribute("data-react-beautiful-dnd-dynamic",t),Mn().appendChild(e),Mn().appendChild(i),u(r.always),a(r.resting),function(){var e=function(e){var t=e.current;t||m(!1),Mn().removeChild(t),e.current=null};e(n),e(o)}}),[u,a,r.always,r.resting,t]);var s=l((function(){return a(r.dragging)}),[a,r.dragging]),d=l((function(e){a("DROP"!==e?r.userCancel:r.dropAnimating)}),[a,r.dropAnimating,r.userCancel]),p=l((function(){o.current&&a(r.resting)}),[a,r.resting]);return c((function(){return{dragging:s,dropping:d,resting:p,styleContext:t}}),[s,d,p,t])}var Fn=a().createContext(null),Wn=function(){var e=document.body;return e||m(!1),e},kn={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 Un=a().createContext(null);function Hn(){(0,i.useEffect)((function(){}),[])}function Vn(e){var t=(0,i.useRef)(e);return(0,i.useEffect)((function(){t.current=e})),t}function zn(e){return e.current||m(!1),e.current}function $n(e){var t=e.uniqueId,r=e.setOnError,u=(0,i.useRef)(null);Hn();var s=Vn(e),d=l((function(){return function(e){return{onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(s.current)}),[s]),p=function(e){var t=c((function(){return function(e){return"react-beautiful-dnd-announcement-"+e}(e)}),[e]),r=(0,i.useRef)(null);return(0,i.useEffect)((function(){r.current&&m(!1);var e=document.createElement("div");return r.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("role","log"),e.setAttribute("aria-atomic","true"),n()(e.style,kn),Wn().appendChild(e),function(){var e=r.current;e||m(!1),Wn().removeChild(e),r.current=null}}),[t]),l((function(e){var t=r.current;t&&(t.textContent=e)}),[])}(t),f=Gn(t),g=l((function(e){zn(u).dispatch(e)}),[]),v=c((function(){return P({publishWhileDragging:wr,updateDroppableScroll:Ir,updateDroppableIsEnabled:Er,updateDroppableIsCombineEnabled:Sr,collectionStarting:Dr},g)}),[g]),b=c((function(){return ln(v)}),[v]),h=c((function(){return Ln(o({scrollWindow:sn,scrollDroppable:b.scrollDroppable},P({move:Cr},g)))}),[b.scrollDroppable,g]),y=c((function(){return rn({dimensionMarshal:b,styleMarshal:f,announce:p,autoScroller:h,getResponders:d})}),[p,h,b,d,f]);u.current=y;var x=l((function(){var e,t=zn(u);"IDLE"!==t.getState().phase&&t.dispatch((void 0===(e={shouldFlush:!0})&&(e={shouldFlush:!1}),{type:"CLEAN",payload:e}))}),[]);r(x);var w=l((function(e){return function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason}(zn(u).getState(),e)}),[]),D=l((function(){return sr(zn(u).getState())}),[]),I=c((function(){return{marshal:b,style:f.styleContext,canLift:w,isMovementAllowed:D}}),[b,w,D,f.styleContext]);return(0,i.useEffect)((function(){return x}),[x]),a().createElement(Un.Provider,{value:I},a().createElement(M,{context:Fn,store:y},e.children))}var qn=0;function Yn(e){var t=c((function(){return qn++}),[]);return a().createElement(Fe,null,(function(r){return a().createElement($n,o({setOnError:r,uniqueId:t},e),e.children)}))}var Kn=function(e){return function(t){return e===t}},Jn=Kn("scroll"),Xn=Kn("auto"),Qn=(Kn("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),Zn=function(e){var t=window.getComputedStyle(e),r={overflowX:t.overflowX,overflowY:t.overflowY};return Qn(r,Jn)||Qn(r,Xn)},eo=function e(t){return null==t||t===document.body||t===document.documentElement?null:Zn(t)?t:e(t.parentElement)},to=function(e){return{x:e.scrollLeft,y:e.scrollTop}},ro=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},no=function(e){return{closestScrollable:eo(e),isFixedOnPage:ro(e)}},oo=function(e){var t=e.ref,r=e.descriptor,n=e.env,o=e.windowScroll,i=e.direction,a=e.isDropDisabled,u=e.isCombineEnabled,c=e.shouldClipSubject,l=n.closestScrollable,s=function(e,t){var r=Oe(e);if(!t)return r;if(e!==t)return r;var n=r.paddingBox.top-t.scrollTop,o=r.paddingBox.left-t.scrollLeft,i=n+t.scrollHeight,a=o+t.scrollWidth,u=ye({top:n,right:a,bottom:i,left:o},r.border);return De({borderBox:u,margin:r.margin,border:r.border,padding:r.padding})}(t,l),d=Se(s,o),p=function(){if(!l)return null;var e=Oe(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:Se(e,o),scroll:to(l),scrollSize:t,shouldClipSubject:c}}();return Tt({descriptor:r,isEnabled:!a,isCombineEnabled:u,isFixedOnPage:n.isFixedOnPage,direction:i,client:s,page:d,closest:p})};var io={passive:!1},ao={passive:!0},uo=function(e){return e.shouldPublishImmediately?io:ao};function co(e){var t=(0,i.useContext)(e);return t||m(!1),t}var lo=function(e){return e&&e.env.closestScrollable||null};function so(){}var po={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},fo=function(e){var t=e.isAnimatingOpenOnMount,r=e.placeholder,n=function(e){var t=e.isAnimatingOpenOnMount,r=e.placeholder,n=e.animate;return t||"close"===n?po:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}}({isAnimatingOpenOnMount:t,placeholder:r,animate:e.animate});return{display:r.display,boxSizing:"border-box",width:n.width,height:n.height,marginTop:n.margin.top,marginRight:n.margin.right,marginBottom:n.margin.bottom,marginLeft:n.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:Ar.placeholder}};var go=a().memo((function(e){var t=(0,i.useRef)(null),r=l((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),n=e.animate,o=e.onTransitionEnd,u=e.onClose,c=e.styleContext,s=(0,i.useState)("open"===e.animate),d=s[0],p=s[1];(0,i.useEffect)((function(){return d?"open"!==n?(r(),p(!1),so):t.current?so:(t.current=setTimeout((function(){t.current=null,p(!1)})),r):so}),[n,d,r]);var f=l((function(e){"height"===e.propertyName&&(o(),"close"===n&&u())}),[n,u,o]),g=fo({isAnimatingOpenOnMount:d,animate:e.animate,placeholder:e.placeholder});return a().createElement(e.placeholder.tagName,{style:g,"data-react-beautiful-dnd-placeholder":c,onTransitionEnd:f,ref:e.innerRef})})),mo=a().createContext(null),vo=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function bo(e){return e instanceof vo(e).HTMLElement}var ho=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return f(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.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)},t}(a().PureComponent);var yo=function(e,t){return e===t},xo=function(e){var t=e.combine,r=e.destination;return r?r.droppableId:t?t.droppableId:null},wo=function(e,t){return e===t.droppable.type},Do=function(e,t){return t.draggables[e.draggable.id]},Io=me((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null}},t=o({},e,{shouldAnimatePlaceholder:!1}),r=Re((function(t,r,n,o){return n.descriptor.droppableId===t?{placeholder:n.placeholder,shouldAnimatePlaceholder:!1,snapshot:o}:r?{placeholder:n.placeholder,shouldAnimatePlaceholder:!0,snapshot:o}:e})),n=Re((function(e,t,r){var n=r.descriptor.id;return{isDraggingOver:t,draggingOverWith:t?n:null,draggingFromThisWith:r.descriptor.droppableId===e?n:null}}));return function(o,i){var a=i.droppableId,u=i.type;if(o.isDragging){var c=o.critical;if(!wo(u,c))return e;var l=Do(c,o.dimensions),s=et(o.impact)===a,d=n(a,s,l);return r(a,s,l,d)}if("DROP_ANIMATING"===o.phase){var p=o.completed;if(!wo(u,p.critical))return e;var f=Do(p.critical,o.dimensions),g=n(a,xo(p.result)===a,f);return r(a,et(p.impact)===a,f,g)}if("IDLE"===o.phase&&!o.completed&&o.shouldFlush)return t;if("IDLE"===o.phase&&o.completed){var m=o.completed;if(!wo(u,m.critical))return e;var v=et(m.impact)===a,b=Boolean(m.impact.merge);return o.shouldFlush?t:v?b?e:t:e}return e}}),{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:Fn,pure:!0,areStatePropsEqual:yo})((function(e){var t=(0,i.useContext)(Un);t||m(!1);var r=t.style,n=t.isMovementAllowed,o=(0,i.useRef)(null),u=(0,i.useRef)(null),s=e.children,d=e.droppableId,p=e.type,f=e.direction,g=e.ignoreContainerClipping,v=e.isDropDisabled,b=e.isCombineEnabled,h=e.snapshot,y=e.updateViewportMaxScroll,x=l((function(){return o.current}),[]),w=l((function(){return u.current}),[]),D=l((function(e){o.current=e}),[]),I=l((function(e){u.current=e}),[]),E=l((function(){n()&&y({maxScroll:an()})}),[n,y]);!function(e){var t=(0,i.useRef)(null),r=co(Un).marshal,n=Vn(e),o=c((function(){return{id:e.droppableId,type:e.type}}),[e.droppableId,e.type]),a=(0,i.useRef)(o),u=c((function(){return Re((function(e,n){t.current||m(!1);var i={x:e,y:n};r.updateDroppableScroll(o.id,i)}))}),[o.id,r]),s=l((function(){var e=t.current;return e&&e.env.closestScrollable?to(e.env.closestScrollable):We}),[]),d=l((function(){var e=s();u(e.x,e.y)}),[s,u]),p=c((function(){return je(d)}),[d]),f=l((function(){var e=t.current,r=lo(e);e&&r||m(!1),e.scrollOptions.shouldPublishImmediately?d():p()}),[p,d]),g=l((function(e,r){t.current&&m(!1);var i=n.current,a=i.getDroppableRef();a||m(!1);var u=no(a),c={ref:a,descriptor:o,env:u,scrollOptions:r};t.current=c;var l=oo({ref:a,descriptor:o,env:u,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping});return u.closestScrollable&&u.closestScrollable.addEventListener("scroll",f,uo(c.scrollOptions)),l}),[o,f,n]),v=l((function(e){var r=t.current,o=lo(r);r&&o||m(!1);var i=n.current,a=function(){return oo({ref:r.ref,descriptor:r.descriptor,env:r.env,windowScroll:We,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping})};return e.withoutPlaceholder?function(e,t){if(!e)return t();var r=e.style.display;e.style.display="none";var n=t();return e.style.display=r,n}(i.getPlaceholderRef(),a):a()}),[n]),b=l((function(){var e=t.current;e||m(!1);var r=lo(e);t.current=null,r&&(p.cancel(),r.removeEventListener("scroll",f,uo(e.scrollOptions)))}),[f,p]),h=l((function(e){var r=t.current;r||m(!1);var n=lo(r);n||m(!1),n.scrollTop+=e.y,n.scrollLeft+=e.x}),[]),y=c((function(){return{getDimensionAndWatchScroll:g,recollect:v,dragStopped:b,scroll:h}}),[b,g,v,h]);_n((function(){return a.current=o,r.registerDroppable(o,y),function(){t.current&&b(),r.unregisterDroppable(o)}}),[y,o,b,r]),_n((function(){t.current&&r.updateDroppableIsEnabled(a.current.id,!e.isDropDisabled)}),[e.isDropDisabled,r]),_n((function(){t.current&&r.updateDroppableIsCombineEnabled(a.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,r])}({droppableId:d,type:p,direction:f,isDropDisabled:v,isCombineEnabled:b,ignoreContainerClipping:g,getDroppableRef:x,getPlaceholderRef:w});var S,C=a().createElement(ho,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var t=e.onClose,n=e.data,o=e.animate;return a().createElement(go,{placeholder:n,onClose:t,innerRef:I,animate:o,styleContext:r,onTransitionEnd:E})})),O=c((function(){return{innerRef:D,placeholder:C,droppableProps:{"data-react-beautiful-dnd-droppable":r}}}),[C,D,r]),P=c((function(){return{droppableId:d,type:p}}),[d,p]);return(S={props:e,getDroppableRef:function(){return o.current},getPlaceholderRef:function(){return u.current}}).props,S.getDroppableRef,S.getPlaceholderRef,(0,i.useEffect)((function(){})),a().createElement(mo.Provider,{value:P},s(O,h))}));Io.defaultProps={type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1};var Eo=5e3,So=4500,Co=function(e,t){return t?Ar.drop(t.duration):e?Ar.snap:Ar.fluid},Oo=function(e,t){return e?t?Rr.drop:Rr.combining:null};function Po(e){return"DRAGGING"===e.type?function(e){var t=e.dimension.client,r=e.offset,n=e.combineWith,o=e.dropping,i=Boolean(n),a=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(e),u=Boolean(o),c=u?Mr(r,i):_r(r);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Co(a,o),transform:c,opacity:Oo(i,u),zIndex:u?So:Eo,pointerEvents:"none"}}(e):{transform:_r((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t}var No,Ro=function(){var e=!1;return{handle:function(){e&&m(!1),e=!0},isHandled:function(){return e},reset:function(){e=!1}}},Bo=function(e,t){return o({},e,t)},Lo=function(e,t,r){t.forEach((function(t){var n=Bo(r,t.options);e.addEventListener(t.eventName,t.fn,n)}))},Ao=function(e,t,r){t.forEach((function(t){var n=Bo(r,t.options);e.removeEventListener(t.eventName,t.fn,n)}))},To=function(e){var t=Re((function(t,r){var n={x:t,y:r};e.onMove(n)})),r=je((function(e){return t(e.x,e.y)})),n=je(e.onMoveUp),o=je(e.onMoveDown),i=je(e.onMoveRight),a=je(e.onMoveLeft),u=je(e.onWindowScroll);return{move:r,moveUp:n,moveDown:o,moveRight:i,moveLeft:a,windowScrollMove:u,cancel:function(){r.cancel(),n.cancel(),o.cancel(),i.cancel(),a.cancel(),u.cancel()}}},_o=function(){var e="visibilitychange";return"undefined"===typeof document?e:nt([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}(),Mo={capture:!0},jo=function(e){var t=!1,r=function(){t&&(t=!1,Ao(e(),n,Mo))},n=[{eventName:"click",fn:function(e){e.preventDefault(),r()}},{eventName:"mousedown",fn:r},{eventName:"touchstart",fn:r}];return{preventNext:function(){t&&r(),t||(t=!0,Lo(e(),n,Mo))},abort:r}},Go=((No={})[13]=!0,No[9]=!0,No),Fo=function(e){Go[e.keyCode]&&e.preventDefault()},Wo=function(){},ko=Ro();function Uo(e){var t=e.canStartCapturing,r=e.getWindow,n=e.callbacks,o=e.onCaptureStart,a=e.onCaptureEnd,u=(0,i.useRef)(null),s=(0,i.useRef)(!1),d=(0,i.useRef)(Wo),p=l((function(){return Boolean(u.current||s.current)}),[]),f=c((function(){return p()&&m(!1),To(n)}),[n,p]),g=c((function(){return jo(r)}),[r]),v=l((function(){if(p()){f.cancel(),d.current();var e=s.current;ko.reset(),e&&g.preventNext(),u.current=null,s.current=!1,a()}}),[p,a,g,f]),b=l((function(){var e=s.current;v(),e&&n.onCancel()}),[n,v]),h=l((function(){s.current&&m(!1);var e=u.current;e||m(!1),u.current=null,s.current=!0,n.onLift({clientSelection:e,movementMode:"FLUID"})}),[n]),y=c((function(){return p()&&m(!1),[{eventName:"mousemove",fn:function(e){var t=e.button,r=e.clientX,n=e.clientY;if(0===t){var o={x:r,y:n};if(s.current)return e.preventDefault(),void f.move(o);var i,a,c=u.current;if(c||(v(),m(!1)),i=c,a=o,Math.abs(a.x-i.x)>=5||Math.abs(a.y-i.y)>=5)e.preventDefault(),h()}}},{eventName:"mouseup",fn:function(e){var t=s.current;v(),t&&(e.preventDefault(),n.onDrop())}},{eventName:"mousedown",fn:function(e){s.current&&e.preventDefault(),b()}},{eventName:"keydown",fn:function(e){if(!u.current)return 27===e.keyCode?(e.preventDefault(),void b()):void Fo(e);v()}},{eventName:"resize",fn:b},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(e){e.currentTarget===r()&&(u.current?v():f.windowScrollMove())}},{eventName:"webkitmouseforcedown",fn:function(){b()}},{eventName:_o,fn:b}]}),[p,b,h,f,v,n,r]),x=l((function(){var e=r(),t={capture:!0};d.current=function(){return Ao(e,y,t)},Lo(e,y,t)}),[r,y]),w=l((function(e){u.current&&m(!1),u.current=e,o(v),x()}),[x,o,v]);return l((function(e){if(!ko.isHandled()&&(p()&&m(!1),t(e)&&0===e.button&&!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))){ko.handle(),e.preventDefault();var r={x:e.clientX,y:e.clientY};w(r)}}),[t,p,w])}function Ho(e){return e instanceof vo(e).Element}var Vo,zo={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0},$o=function e(t,r){if(null==r)return!1;if(Boolean(zo[r.tagName.toLowerCase()]))return!0;var n=r.getAttribute("contenteditable");return"true"===n||""===n||r!==t&&e(t,r.parentElement)},qo=function(e,t){if(t)return!0;var r=e.target,n=e.currentTarget;return!Ho(r)||!Ho(n)||!$o(n,r)},Yo=((Vo={})[34]=!0,Vo[33]=!0,Vo[36]=!0,Vo[35]=!0,Vo);function Ko(){}function Jo(e){var t=e.canStartCapturing,r=e.getWindow,n=e.callbacks,o=e.onCaptureStart,a=e.onCaptureEnd,u=e.getDraggableRef,s=(0,i.useRef)(!1),d=(0,i.useRef)(Ko),p=l((function(){return s.current}),[]),f=c((function(){return p()&&m(!1),To(n)}),[n,p]),g=l((function(){p()&&(f.cancel(),d.current(),s.current=!1,a())}),[p,a,f]),v=l((function(){var e=s.current;g(),e&&n.onCancel()}),[n,g]),b=c((function(){return p()&&m(!1),[{eventName:"mousedown",fn:v},{eventName:"mouseup",fn:v},{eventName:"click",fn:v},{eventName:"touchstart",fn:v},{eventName:"resize",fn:v},{eventName:"wheel",fn:v,options:{passive:!0}},{eventName:"scroll",options:{capture:!1},fn:function(e){e.currentTarget===r()&&n.onWindowScroll()}},{eventName:_o,fn:v}]}),[n,v,p,r]),h=l((function(){var e=r(),t={capture:!0};d.current=function(){return Ao(e,b,t)},Lo(e,b,t)}),[r,b]),y=l((function(){s.current&&m(!1);var e=u();e||m(!1),s.current=!0,o(g),h();var t=he(e.getBoundingClientRect()).center;n.onLift({clientSelection:t,movementMode:"SNAP"})}),[h,n,u,o,g]);return l((function(e){if(!p()){if(e.defaultPrevented)return;if(!t(e))return;if(32!==e.keyCode)return;return e.preventDefault(),void y()}return 27===e.keyCode?(e.preventDefault(),void v()):32===e.keyCode?(e.preventDefault(),g(),void n.onDrop()):40===e.keyCode?(e.preventDefault(),void f.moveDown()):38===e.keyCode?(e.preventDefault(),void f.moveUp()):39===e.keyCode?(e.preventDefault(),void f.moveRight()):37===e.keyCode?(e.preventDefault(),void f.moveLeft()):void(Yo[e.keyCode]?e.preventDefault():Fo(e))}),[n,t,v,p,f,y,g])}var Xo=Ro(),Qo=function(){};var Zo=function(e){!function(e){return Boolean(vo(e).SVGElement)&&e instanceof vo(e).SVGElement}(e)||m(!1)},ei=function(e){if(e.hasAttribute(An))return Zo(e),e;var t=e.querySelector("[data-react-beautiful-dnd-drag-handle]");return Zo(e),t||m(!1),bo(t)||m(!1),t};var ti=null,ri={capture:!0},ni=function(){var e=!1,t=function(){e&&(e=!1,window.removeEventListener("focus",r,ri))},r=function(){t(),ti=null},n=function(){e||(e=!0,window.addEventListener("focus",r,ri))};return n.cancel=function(){return t()},n}(),oi=function(e){ti=e,ni()},ii=function(e,t){if(ti&&e===ti){ti=null,ni.cancel();var r=ei(t);r&&r.focus()}};function ai(){}function ui(e){e.preventDefault()}function ci(e){var t=(0,i.useRef)(null),r=l((function(e){t.current&&m(!1),t.current={abort:e}}),[]),n=l((function(){t.current||m(!1),t.current=null}),[]),o=l((function(){t.current||m(!1),t.current.abort()}),[]),a=co(Un),u=a.canLift,s=a.style,d=e.isDragging,p=e.isEnabled,f=e.draggableId,g=e.callbacks,v=e.getDraggableRef,b=e.getShouldRespectForcePress,h=e.canDragInteractiveElements,y=Vn(e);!function(e){var t=e.isEnabled,r=e.getDraggableRef;(0,i.useEffect)((function(){}),[r,t])}({isEnabled:p,getDraggableRef:v});var x=l((function(){return vo(v())}),[v]),w=l((function(e){return!!p&&(!t.current&&(!!u(f)&&qo(e,h)))}),[h,u,f,p]),D=function(e){var t=(0,i.useRef)(!1),r=Vn(e),n=e.getDraggableRef,o=l((function(){t.current=!0}),[]),a=l((function(){t.current=!1}),[]);_n((function(){var e=r.current;if(!e.isEnabled)return ai;var o=n();o||m(!1);var i=ei(o);return ii(e.draggableId,i),function(){var e=r.current;e.isEnabled&&t.current&&(e.isDragging||e.isDropAnimating)&&oi(e.draggableId)}}),[n,r]);var u=(0,i.useRef)(null);return _n((function(){if(u.current){var e=n();e&&e!==u.current&&t.current&&r.current.isEnabled&&ei(e).focus()}})),_n((function(){u.current=n()})),{onBlur:a,onFocus:o}}(e),I=D.onBlur,E=D.onFocus,S=Uo(c((function(){return{callbacks:g,getDraggableRef:v,getWindow:x,canStartCapturing:w,onCaptureStart:r,onCaptureEnd:n,getShouldRespectForcePress:b}}),[g,v,x,w,r,n,b])),C=Jo(c((function(){return{callbacks:g,getDraggableRef:v,getWindow:x,canStartCapturing:w,onCaptureStart:r,onCaptureEnd:n}}),[g,w,v,x,n,r])),O=function(e){var t=e.callbacks,r=e.getWindow,n=e.canStartCapturing,o=e.getShouldRespectForcePress,a=e.onCaptureStart,u=e.onCaptureEnd,s=(0,i.useRef)(null),d=(0,i.useRef)(!1),p=(0,i.useRef)(!1),f=(0,i.useRef)(Qo),g=l((function(){return Boolean(s.current||d.current)}),[]),v=c((function(){return jo(r)}),[r]),b=c((function(){return g()&&m(!1),To(t)}),[t,g]),h=l((function(){if(g()){if(b.cancel(),f.current(),Xo.reset(),p.current=!1,u(),d.current)return v.preventNext(),void(d.current=!1);var e=s.current;e||m(!1),clearTimeout(e.longPressTimerId),s.current=null}}),[g,u,v,b]),y=l((function(){var e=d.current;h(),e&&t.onCancel()}),[t,h]),x=c((function(){return g()&&m(!1),[{eventName:"touchmove",options:{passive:!1,capture:!1},fn:function(e){if(d.current){p.current||(p.current=!0);var t=e.touches[0];if(t){var r={x:t.clientX,y:t.clientY};e.preventDefault(),b.move(r)}}else h()}},{eventName:"touchend",fn:function(e){d.current?(e.preventDefault(),h(),t.onDrop()):h()}},{eventName:"touchcancel",fn:function(e){d.current?(e.preventDefault(),y()):h()}},{eventName:"touchstart",fn:y},{eventName:"orientationchange",fn:y},{eventName:"resize",fn:y},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){s.current?h():b.windowScrollMove()}},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){d.current?(27===e.keyCode&&e.preventDefault(),y()):y()}},{eventName:"touchforcechange",fn:function(e){if(e.touches[0].force>=.15){var t=o();if(!s.current)return t?p.current?void e.preventDefault():void y():void e.preventDefault();t&&y()}}},{eventName:_o,fn:y}]}),[t,y,g,o,b,h]),w=l((function(){var e=r(),t={capture:!0};f.current=function(){return Ao(e,x,t)},Lo(e,x,t)}),[r,x]),D=l((function(){var e=s.current;e||m(!1),d.current=!0,s.current=null,p.current=!1,t.onLift({clientSelection:e.point,movementMode:"FLUID"})}),[t]),I=l((function(e){s.current&&m(!1);var t=e.touches[0],r={point:{x:t.clientX,y:t.clientY},longPressTimerId:setTimeout(D,120)};s.current=r,a(h),w()}),[w,a,D,h]);return _n((function(){return Lo(window,[{eventName:"touchmove",fn:Qo,options:{capture:!1,passive:!1}}])}),[]),function(e){Xo.isHandled()||(g()&&m(!1),n(e)&&(Xo.handle(),I(e)))}}(c((function(){return{callbacks:g,getDraggableRef:v,getWindow:x,canStartCapturing:w,getShouldRespectForcePress:b,onCaptureStart:r,onCaptureEnd:n}}),[g,v,x,w,b,r,n]));return _n((function(){return function(){t.current&&(o(),y.current.isDragging&&y.current.callbacks.onCancel())}}),[]),!p&&t.current&&(o(),y.current.isDragging&&g.onCancel()),_n((function(){!d&&t.current&&o()}),[o,d]),c((function(){return p?{onMouseDown:S,onKeyDown:C,onTouchStart:O,onFocus:E,onBlur:I,tabIndex:0,"data-react-beautiful-dnd-drag-handle":s,"aria-roledescription":"Draggable item. Press space bar to lift",draggable:!1,onDragStart:ui}:null}),[p,I,E,C,S,O,s])}function li(e){var t=e.draggableId,r=e.index,n=e.getDraggableRef,o=co(Un).marshal,a=co(mo),u=a.droppableId,s=a.type,d=c((function(){return{id:t,droppableId:u,type:s,index:r}}),[t,u,r,s]),p=(0,i.useRef)(d),f=l((function(e){var t=p.current,r=n();return r||m(!1),function(e,t,r){void 0===r&&(r=We);var n=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Ce(o,n),a=Se(i,r);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:n.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(t,r,e)}),[n]);_n((function(){return o.registerDraggable(p.current,f),function(){return o.unregisterDraggable(p.current)}}),[f,o]),_n((function(){if(p.current!==d){var e=p.current;p.current=d,o.updateDraggable(e,d,f)}}),[d,f,o])}var si=me((function(){var e=Re((function(e,t,r,n){return{isDragging:!0,isDropAnimating:Boolean(n),dropAnimation:n,mode:e,draggingOver:t,combineWith:r,combineTargetFor:null}})),t=Re((function(e){return{isDragging:!1,isDropAnimating:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}})),r={mapped:{type:"SECONDARY",offset:We,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:t(null)}},n=Re((function(e,t){return{x:e,y:t}})),o=Re((function(t,r,n,o,i,a){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:i,mode:r,offset:t,dimension:n,forceShouldAnimate:a,snapshot:e(r,o,i,null)}}})),i=Re((function(e,r,n){return void 0===r&&(r=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:r,shouldAnimateDisplacement:n,snapshot:t(r)}}})),a=function(e,t,r){var o=r.movement.map[e],a=r.movement,u=r.merge,c=Boolean(u&&u.combine.draggableId===e),l=a.displacedBy.point,s=n(l.x,l.y);return c?i(o?s:We,t,!o||o.shouldAnimate):o&&o.isVisible?i(s,null,o.shouldAnimate):null};return function(t,i){return function(t,r){if(t.isDragging){if(t.critical.draggable.id!==r.draggableId)return null;var i=t.current.client.offset,a=t.dimensions.draggables[r.draggableId],u=t.movementMode,c=et(t.impact),l=(d=t.impact).merge?d.merge.combine.draggableId:null,s=t.forceShouldAnimate;return o(n(i.x,i.y),u,a,c,l,s)}var d;if("DROP_ANIMATING"===t.phase){var p=t.completed;if(p.result.draggableId!==r.draggableId)return null;var f=t.dimensions.draggables[r.draggableId],g=p.result,m=g.mode,v=xo(g),b=function(e){return e.combine?e.combine.draggableId:null}(g),h={duration:t.dropDuration,curve:Nr,moveTo:t.newHomeClientOffset,opacity:b?Rr.drop:null,scale:b?Br.drop:null};return{mapped:{type:"DRAGGING",offset:t.newHomeClientOffset,dimension:f,dropping:h,draggingOver:v,combineWith:b,mode:m,forceShouldAnimate:null,snapshot:e(m,v,b,h)}}}return null}(t,i)||function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:a(t.draggableId,e.critical.draggable.id,e.impact);if("DROP_ANIMATING"===e.phase){var r=e.completed;return r.result.draggableId===t.draggableId?null:a(t.draggableId,r.result.draggableId,r.impact)}return null}(t,i)||r}}),{lift:function(e){return{type:"LIFT",payload:e}},move:Cr,moveUp:function(){return{type:"MOVE_UP",payload:null}},moveDown:function(){return{type:"MOVE_DOWN",payload:null}},moveLeft:function(){return{type:"MOVE_LEFT",payload:null}},moveRight:function(){return{type:"MOVE_RIGHT",payload:null}},moveByWindowScroll:function(e){return{type:"MOVE_BY_WINDOW_SCROLL",payload:e}},drop:Pr,dropAnimationFinished:function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}}},null,{context:Fn,pure:!0,areStatePropsEqual:yo})((function(e){var t=(0,i.useRef)(null),r=l((function(e){t.current=e}),[]),n=l((function(){return t.current}),[]),o=co(Un);(0,i.useEffect)((function(){}));var a=e.children,u=e.draggableId,s=e.isDragDisabled,d=e.shouldRespectForcePress,p=e.disableInteractiveElementBlocking,f=e.index,g=e.mapped,v=e.moveUp,b=e.move,h=e.drop,y=e.moveDown,x=e.moveRight,w=e.moveLeft,D=e.moveByWindowScroll,I=e.lift,E=e.dropAnimationFinished;li(c((function(){return{draggableId:u,index:f,getDraggableRef:n}}),[u,n,f]));var S=l((function(e){t.current||m(!1),s&&m(!1);var r=e.clientSelection,n=e.movementMode;I({id:u,clientSelection:r,movementMode:n})}),[u,s,I]),C=l((function(){return d}),[d]),O=c((function(){return{onLift:S,onMove:function(e){return b({client:e})},onDrop:function(){return h({reason:"DROP"})},onCancel:function(){return h({reason:"CANCEL"})},onMoveUp:v,onMoveDown:y,onMoveRight:x,onMoveLeft:w,onWindowScroll:function(){return D({newScroll:nn()})}}}),[h,b,D,y,w,x,v,S]),P="DRAGGING"===g.type,N="DRAGGING"===g.type&&Boolean(g.dropping),R=ci(c((function(){return{draggableId:u,isDragging:P,isDropAnimating:N,isEnabled:!s,callbacks:O,getDraggableRef:n,canDragInteractiveElements:p,getShouldRespectForcePress:C}}),[O,p,u,n,C,s,P,N])),B=l((function(e){"DRAGGING"===g.type&&g.dropping&&"transform"===e.propertyName&&E()}),[E,g]),L=c((function(){var e=Po(g),t="DRAGGING"===g.type&&g.dropping?B:null;return{innerRef:r,draggableProps:{"data-react-beautiful-dnd-draggable":o.style,style:e,onTransitionEnd:t},dragHandleProps:R}}),[o.style,R,g,B,r]);return a(L,g.snapshot)}));si.defaultProps={isDragDisabled:!1,disableInteractiveElementBlocking:!1,shouldRespectForcePress:!1};var di=window.wp.apiFetch,pi=r.n(di),fi=window.wp.i18n;window.wp.hooks;const gi=(e,t)=>{let r=null;return function(...n){const o=this;window.clearTimeout(r),r=window.setTimeout((()=>{e.apply(o,n)}),t)}};var mi=r(5893);pi().use(pi().createRootURLMiddleware(window.epOrdering.restApiRoot));class vi extends e.Component{titleInput=null;debouncedDefaultResults=gi((()=>{this.getDefaultResults()}),200);doSearch=gi((()=>{const{searchText:e,searchResults:t}=this.state,r=e;t[r]=!1,this.setState({searchResults:t}),pi()({path:`/elasticpress/v1/pointer_search?s=${r}`}).then((e=>{t[r]=e,this.setState({searchResults:t})}))}),200);debouncedHandleTitleChange=gi((()=>{this.handleTitleChange()}),200);constructor(e){super(e),this.titleInput=document.getElementById("title"),this.state={pointers:window.epOrdering.pointers,posts:window.epOrdering.posts,title:this.titleInput.value,defaultResults:{},searchText:"",searchResults:{}}}componentDidMount(){this.titleInput.addEventListener("keyup",this.debouncedHandleTitleChange);const{title:e}=this.state;e?.length>0&&this.getDefaultResults()}componentWillUnmount(){this.titleInput.removeEventListener("keyup",this.debouncedHandleTitleChange)}handleTitleChange=()=>{this.setState({title:this.titleInput.value}),this.debouncedDefaultResults()};getDefaultResults=()=>{const{title:e}=this.state;pi()({path:`/elasticpress/v1/pointer_preview?s=${e}`}).then((t=>{const{defaultResults:r}=this.state;r[e]=t,this.setState({defaultResults:r})}))};removePointer=e=>{let{pointers:t}=this.state;delete t[t.indexOf(e)],t=t.filter((e=>null!==e)),this.setState({pointers:t})};getMergedPosts=()=>{let{pointers:e}=this.state;const{title:t,defaultResults:r}=this.state;let n=r[t].slice();const o={};return n.forEach((e=>{o[e.ID]=e})),e=e.sort(((e,t)=>e.order>t.order?1:-1)),e.forEach((e=>{o[e.ID]&&(delete n[n.indexOf(o[e.ID])],n=n.filter((e=>e))),n.splice(parseInt(e.order,10)-1,0,e)})),n};getNextAvailablePosition=()=>{const{pointers:e}=this.state,t={};for(let e=1;e<=window.epOrdering.postsPerPage;e++)t[e]=!0;e.forEach((e=>{delete t[e.order]}));const r=Object.keys(t);return 0!==r.length&&parseInt(r[0],10)};addPointer=e=>{const t=e.ID,{posts:r,pointers:n}=this.state;r[t]||(r[t]=e,this.setState({posts:r}));const o=this.getNextAvailablePosition();o?(n.push({ID:t,order:o}),this.setState({pointers:n})):window.alert((0,fi.__)("You have added the maximum number of custom results.","elasticpress"))};onDragComplete=e=>{if(!e.destination)return;const t=this.getMergedPosts(),r=parseInt(window.epOrdering.postsPerPage,10),n=e.source.index>=r?e.source.index-1:e.source.index,o=e.destination.index>r?e.destination.index-1:e.destination.index,[i]=t.splice(n,1);t.splice(o,0,i);const a=[];t.forEach(((t,r)=>{(t.order||t.ID===e.draggableId)&&a.push({ID:t.ID,order:r+1})})),this.setState({pointers:a})};searchResults=e=>{const{searchText:t}=this.state;return""===t?null:!1===e?(0,mi.jsxs)("div",{className:"loading",children:[(0,mi.jsx)("div",{className:"spinner is-active"}),"Loading..."]}):0===e.length?(0,mi.jsx)("div",{className:"no-results",children:(0,fi.__)("No results found.","elasticpress")}):e.map((e=>(0,mi.jsxs)("div",{className:"pointer-result",children:[(0,mi.jsx)("span",{className:"title",children:e.post_title}),(0,mi.jsx)("span",{role:"button",tabIndex:"0",className:"dashicons dashicons-plus add-pointer",onClick:t=>{t.preventDefault(),this.addPointer(e)},onKeyDown:t=>{t.preventDefault(),this.addPointer(e)},children:(0,mi.jsx)("span",{className:"screen-reader-text",children:(0,fi.__)("Add Post","elasticpress")})})]},e.ID)))};render(){const{posts:t,defaultResults:r,title:n,pointers:o,searchText:i,searchResults:a}=this.state;if(0===n.length)return(0,mi.jsx)("div",{className:"new-post",children:(0,mi.jsx)("p",{children:(0,fi.__)("Enter your search query above to preview the results.","elasticpress")})});if(!r[n])return(0,mi.jsxs)("div",{className:"loading",children:[(0,mi.jsx)("div",{className:"spinner is-active"}),(0,mi.jsx)("span",{children:(0,fi.__)("Loading Result Preview…","elasticpress")})]});const u={};r[n].forEach((e=>{u[e.ID]=e}));const c=this.getMergedPosts(),l=(s="ID",o.map((e=>e[s])));var s;const d=!!a[i]&&a[i].filter((e=>-1===l.indexOf(e.ID)));return(0,mi.jsxs)("div",{children:[(0,mi.jsx)("input",{type:"hidden",name:"search-ordering-nonce",value:window.epOrdering.nonce}),(0,mi.jsx)("input",{type:"hidden",name:"ordered_posts",value:JSON.stringify(o)}),(0,mi.jsx)(Yn,{onDragEnd:this.onDragComplete,children:(0,mi.jsx)(Io,{droppableId:"droppable",children:r=>(0,mi.jsxs)("div",{className:"pointers",...r.droppableProps,ref:r.innerRef,children:[c.map(((r,n)=>{const o=parseInt(window.epOrdering.postsPerPage,10)<=n?n+1:n;let{title:i}=r;void 0===i&&(i=void 0!==t[r.ID]?t[r.ID].post_title:u[r.ID].post_title);const a=void 0!==u[r.ID],c=!0===a?(0,fi.__)("Return to original position","elasticpress"):(0,fi.__)("Remove custom result from results list","elasticpress");return(0,mi.jsxs)(e.Fragment,{children:[parseInt(window.epOrdering.postsPerPage,10)===n&&(0,mi.jsx)(si,{draggableId:"divider",index:n,isDragDisabled:!1,children:e=>(0,mi.jsx)("div",{className:`next-page-notice ${n}`,ref:e.innerRef,...e.draggableProps,...e.dragHandleProps,children:(0,mi.jsx)("span",{children:(0,fi.__)("The following posts have been displaced to the next page of search results.","elasticpress")})})},"divider"),(0,mi.jsx)(si,{draggableId:r.ID,index:o,children:e=>(0,mi.jsxs)("div",{className:`pointer ${o}`,ref:e.innerRef,...e.draggableProps,children:[r.order&&!0===a&&(0,mi.jsx)("span",{className:"pointer-type",children:"RD"}),r.order&&!1===a&&(0,mi.jsx)("span",{className:"pointer-type",children:"CR"}),(0,mi.jsx)("strong",{className:"title",children:i}),(0,mi.jsxs)("div",{className:"pointer-actions",children:[(0,mi.jsx)("span",{className:"dashicons dashicons-menu handle",...e.dragHandleProps,title:(0,fi.__)("Drag post up or down to reposition","elasticpress")}),r.order&&(0,mi.jsx)("span",{role:"button",tabIndex:"0",title:c,className:"dashicons dashicons-undo delete-pointer",onClick:e=>{e.preventDefault(),this.removePointer(r)},onKeyDown:e=>{e.preventDefault(),this.removePointer(r)},children:(0,mi.jsx)("span",{className:"screen-reader-text",children:"Remove Post"})})]})]})},r.ID)]},r.ID)})),r.placeholder]})})}),(0,mi.jsxs)("div",{className:"legend",children:[(0,mi.jsxs)("div",{className:"legend-item",children:[(0,mi.jsx)("span",{className:"pointer-type",children:"CR"}),(0,mi.jsx)("span",{className:"type-description",children:(0,fi.__)("Custom Result (manually added to list)","elasticpress")})]}),(0,mi.jsxs)("div",{className:"legend-item",children:[(0,mi.jsx)("span",{className:"pointer-type",children:"RD"}),(0,mi.jsx)("span",{className:"type-description",children:(0,fi.__)("Reordered Default (originally in results, but repositioned)","elasticpress")})]})]}),(0,mi.jsxs)("div",{className:"pointer-search",children:[(0,mi.jsx)("h2",{className:"section-title",children:(0,fi.__)("Add to results","elasticpress")}),(0,mi.jsxs)("div",{className:"search-wrapper",children:[(0,mi.jsx)("div",{className:"input-wrap",children:(0,mi.jsx)("input",{type:"text",className:"widefat search-pointers",placeholder:"Search for Post",value:i,onChange:e=>{this.setState({searchText:e.target.value}),this.doSearch()}})}),(0,mi.jsx)("div",{className:"pointer-results",children:this.searchResults(d)})]})]})]})}}(0,e.render)((0,mi.jsx)(vi,{}),document.getElementById("ordering-app"))}()}();
1 +!function(){"use strict";var e={5160:function(e,t,n){var r=n(1609);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},i=r.useSyncExternalStore,a=r.useRef,s=r.useEffect,l=r.useMemo,c=r.useDebugValue},8418:function(e,t,n){n(5160)},1609:function(e){e.exports=window.React},9306:function(e,t,n){var r=n(4901),o=n(6823),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a function")}},6469:function(e,t,n){var r=n(8227),o=n(2360),i=n(4913).f,a=r("unscopables"),s=Array.prototype;void 0===s[a]&&i(s,a,{configurable:!0,value:o(null)}),e.exports=function(e){s[a][e]=!0}},8551:function(e,t,n){var r=n(34),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not an object")}},9617:function(e,t,n){var r=n(5397),o=n(5610),i=n(6198),a=function(e){return function(t,n,a){var s=r(t),l=i(s);if(0===l)return!e&&-1;var c,d=o(a,l);if(e&&n!==n){for(;l>d;)if((c=s[d++])!==c)return!0}else for(;l>d;d++)if((e||d in s)&&s[d]===n)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2195:function(e,t,n){var r=n(9504),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},7740:function(e,t,n){var r=n(9297),o=n(5031),i=n(7347),a=n(4913);e.exports=function(e,t,n){for(var s=o(t),l=a.f,c=i.f,d=0;d<s.length;d++){var u=s[d];r(e,u)||n&&r(n,u)||l(e,u,c(t,u))}}},6699:function(e,t,n){var r=n(3724),o=n(4913),i=n(6980);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},6980:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6840:function(e,t,n){var r=n(4901),o=n(4913),i=n(283),a=n(9433);e.exports=function(e,t,n,s){s||(s={});var l=s.enumerable,c=void 0!==s.name?s.name:t;if(r(n)&&i(n,c,s),s.global)l?e[t]=n:a(t,n);else{try{s.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=n:o.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},9433:function(e,t,n){var r=n(4576),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},3724:function(e,t,n){var r=n(9039);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:function(e,t,n){var r=n(4576),o=n(34),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},8727:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2839:function(e,t,n){var r=n(4576).navigator,o=r&&r.userAgent;e.exports=o?String(o):""},9519:function(e,t,n){var r,o,i=n(4576),a=n(2839),s=i.process,l=i.Deno,c=s&&s.versions||l&&l.version,d=c&&c.v8;d&&(o=(r=d.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},6518:function(e,t,n){var r=n(4576),o=n(7347).f,i=n(6699),a=n(6840),s=n(9433),l=n(7740),c=n(2796);e.exports=function(e,t){var n,d,u,p,f,g=e.target,m=e.global,b=e.stat;if(n=m?r:b?r[g]||s(g,{}):r[g]&&r[g].prototype)for(d in t){if(p=t[d],u=e.dontCallGetSet?(f=o(n,d))&&f.value:n[d],!c(m?d:g+(b?".":"#")+d,e.forced)&&void 0!==u){if(typeof p==typeof u)continue;l(p,u)}(e.sham||u&&u.sham)&&i(p,"sham",!0),a(n,d,p,e)}}},9039:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},616:function(e,t,n){var r=n(9039);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},9565:function(e,t,n){var r=n(616),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},350:function(e,t,n){var r=n(3724),o=n(9297),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),l=s&&"something"===function(){}.name,c=s&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},9504:function(e,t,n){var r=n(616),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);e.exports=r?a:function(e){return function(){return i.apply(e,arguments)}}},7751:function(e,t,n){var r=n(4576),o=n(4901);e.exports=function(e,t){return arguments.length<2?(n=r[e],o(n)?n:void 0):r[e]&&r[e][t];var n}},5966:function(e,t,n){var r=n(9306),o=n(4117);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},4576:function(e,t,n){var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:function(e,t,n){var r=n(9504),o=n(8981),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},421:function(e){e.exports={}},397:function(e,t,n){var r=n(7751);e.exports=r("document","documentElement")},5917:function(e,t,n){var r=n(3724),o=n(9039),i=n(4055);e.exports=!r&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},7055:function(e,t,n){var r=n(9504),o=n(9039),i=n(2195),a=Object,s=r("".split);e.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?s(e,""):a(e)}:a},3706:function(e,t,n){var r=n(9504),o=n(4901),i=n(7629),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},1181:function(e,t,n){var r,o,i,a=n(8622),s=n(4576),l=n(34),c=n(6699),d=n(9297),u=n(7629),p=n(6119),f=n(421),g="Object already initialized",m=s.TypeError,b=s.WeakMap;if(a||u.state){var h=u.state||(u.state=new b);h.get=h.get,h.has=h.has,h.set=h.set,r=function(e,t){if(h.has(e))throw new m(g);return t.facade=e,h.set(e,t),t},o=function(e){return h.get(e)||{}},i=function(e){return h.has(e)}}else{var v=p("state");f[v]=!0,r=function(e,t){if(d(e,v))throw new m(g);return t.facade=e,c(e,v,t),t},o=function(e){return d(e,v)?e[v]:{}},i=function(e){return d(e,v)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return n}}}},4901:function(e){var t="object"==typeof document&&document.all;e.exports="undefined"==typeof t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2796:function(e,t,n){var r=n(9039),o=n(4901),i=/#|\.prototype\./,a=function(e,t){var n=l[s(e)];return n===d||n!==c&&(o(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",d=a.POLYFILL="P";e.exports=a},4117:function(e){e.exports=function(e){return null===e||void 0===e}},34:function(e,t,n){var r=n(4901);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},6395:function(e){e.exports=!1},757:function(e,t,n){var r=n(7751),o=n(4901),i=n(1625),a=n(7040),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,s(e))}},6198:function(e,t,n){var r=n(8014);e.exports=function(e){return r(e.length)}},283:function(e,t,n){var r=n(9504),o=n(9039),i=n(4901),a=n(9297),s=n(3724),l=n(350).CONFIGURABLE,c=n(3706),d=n(1181),u=d.enforce,p=d.get,f=String,g=Object.defineProperty,m=r("".slice),b=r("".replace),h=r([].join),v=s&&!o((function(){return 8!==g((function(){}),"length",{value:8}).length})),y=String(String).split("String"),x=e.exports=function(e,t,n){"Symbol("===m(f(t),0,7)&&(t="["+b(f(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!a(e,"name")||l&&e.name!==t)&&(s?g(e,"name",{value:t,configurable:!0}):e.name=t),v&&n&&a(n,"arity")&&e.length!==n.arity&&g(e,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&g(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=u(e);return a(r,"source")||(r.source=h(y,"string"==typeof t?t:"")),e};Function.prototype.toString=x((function(){return i(this)&&p(this).source||c(this)}),"toString")},741:function(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},2360:function(e,t,n){var r,o=n(8551),i=n(6801),a=n(8727),s=n(421),l=n(397),c=n(4055),d=n(6119),u="prototype",p="script",f=d("IE_PROTO"),g=function(){},m=function(e){return"<"+p+">"+e+"</"+p+">"},b=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}h="undefined"!=typeof document?document.domain&&r?b(r):function(){var e,t=c("iframe"),n="java"+p+":";return t.style.display="none",l.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F}():b(r);for(var e=a.length;e--;)delete h[u][a[e]];return h()};s[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(g[u]=o(e),n=new g,g[u]=null,n[f]=e):n=h(),void 0===t?n:i.f(n,t)}},6801:function(e,t,n){var r=n(3724),o=n(8686),i=n(4913),a=n(8551),s=n(5397),l=n(1072);t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=l(t),c=o.length,d=0;c>d;)i.f(e,n=o[d++],r[n]);return e}},4913:function(e,t,n){var r=n(3724),o=n(5917),i=n(8686),a=n(8551),s=n(6969),l=TypeError,c=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u="enumerable",p="configurable",f="writable";t.f=r?i?function(e,t,n){if(a(e),t=s(t),a(n),"function"===typeof e&&"prototype"===t&&"value"in n&&f in n&&!n[f]){var r=d(e,t);r&&r[f]&&(e[t]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:u in n?n[u]:r[u],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(a(e),t=s(t),a(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},7347:function(e,t,n){var r=n(3724),o=n(9565),i=n(8773),a=n(6980),s=n(5397),l=n(6969),c=n(9297),d=n(5917),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=s(e),t=l(t),d)try{return u(e,t)}catch(e){}if(c(e,t))return a(!o(i.f,e,t),e[t])}},8480:function(e,t,n){var r=n(1828),o=n(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},3717:function(e,t){t.f=Object.getOwnPropertySymbols},1625:function(e,t,n){var r=n(9504);e.exports=r({}.isPrototypeOf)},1828:function(e,t,n){var r=n(9504),o=n(9297),i=n(5397),a=n(9617).indexOf,s=n(421),l=r([].push);e.exports=function(e,t){var n,r=i(e),c=0,d=[];for(n in r)!o(s,n)&&o(r,n)&&l(d,n);for(;t.length>c;)o(r,n=t[c++])&&(~a(d,n)||l(d,n));return d}},1072:function(e,t,n){var r=n(1828),o=n(8727);e.exports=Object.keys||function(e){return r(e,o)}},8773:function(e,t){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},4270:function(e,t,n){var r=n(9565),o=n(4901),i=n(34),a=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&o(n=e.toString)&&!i(s=r(n,e)))return s;if(o(n=e.valueOf)&&!i(s=r(n,e)))return s;if("string"!==t&&o(n=e.toString)&&!i(s=r(n,e)))return s;throw new a("Can't convert object to primitive value")}},5031:function(e,t,n){var r=n(7751),o=n(9504),i=n(8480),a=n(3717),s=n(8551),l=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(s(e)),n=a.f;return n?l(t,n(e)):t}},7750:function(e,t,n){var r=n(4117),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},6119:function(e,t,n){var r=n(5745),o=n(3392),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},7629:function(e,t,n){var r=n(6395),o=n(4576),i=n(9433),a="__core-js_shared__",s=e.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.39.0",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(e,t,n){var r=n(7629);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},4495:function(e,t,n){var r=n(9519),o=n(9039),i=n(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},5610:function(e,t,n){var r=n(1291),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},5397:function(e,t,n){var r=n(7055),o=n(7750);e.exports=function(e){return r(o(e))}},1291:function(e,t,n){var r=n(741);e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},8014:function(e,t,n){var r=n(1291),o=Math.min;e.exports=function(e){var t=r(e);return t>0?o(t,9007199254740991):0}},8981:function(e,t,n){var r=n(7750),o=Object;e.exports=function(e){return o(r(e))}},2777:function(e,t,n){var r=n(9565),o=n(34),i=n(757),a=n(5966),s=n(4270),l=n(8227),c=TypeError,d=l("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,l=a(e,d);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!o(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},6969:function(e,t,n){var r=n(2777),o=n(757);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},6823:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},3392:function(e,t,n){var r=n(9504),o=0,i=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},7040:function(e,t,n){var r=n(4495);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:function(e,t,n){var r=n(3724),o=n(9039);e.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8622:function(e,t,n){var r=n(4576),o=n(4901),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},8227:function(e,t,n){var r=n(4576),o=n(5745),i=n(9297),a=n(3392),s=n(4495),l=n(7040),c=r.Symbol,d=o("wks"),u=l?c.for||c:c&&c.withoutSetter||a;e.exports=function(e){return i(d,e)||(d[e]=s&&i(c,e)?c[e]:u("Symbol."+e)),d[e]}},4423:function(e,t,n){var r=n(6518),o=n(9617).includes,i=n(9039),a=n(6469);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r=window.wp.element,o=(n(4423),n(1609)),i=n.n(o),a=window.ReactDOM,s=n.n(a);function l(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var c=(()=>"function"===typeof Symbol&&Symbol.observable||"@@observable")(),d=()=>Math.random().toString(36).substring(7).split("").join("."),u={INIT:`@@redux/INIT${d()}`,REPLACE:`@@redux/REPLACE${d()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${d()}`};function p(e){if("object"!==typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function f(e,t,n){if("function"!==typeof e)throw new Error(l(2));if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(l(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(l(1));return n(f)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,d=!1;function g(){a===i&&(a=new Map,i.forEach(((e,t)=>{a.set(t,e)})))}function m(){if(d)throw new Error(l(3));return o}function b(e){if("function"!==typeof e)throw new Error(l(4));if(d)throw new Error(l(5));let t=!0;g();const n=s++;return a.set(n,e),function(){if(t){if(d)throw new Error(l(6));t=!1,g(),a.delete(n),i=null}}}function h(e){if(!p(e))throw new Error(l(7));if("undefined"===typeof e.type)throw new Error(l(8));if("string"!==typeof e.type)throw new Error(l(17));if(d)throw new Error(l(9));try{d=!0,o=r(o,e)}finally{d=!1}return(i=a).forEach((e=>{e()})),e}h({type:u.INIT});return{dispatch:h,subscribe:b,getState:m,replaceReducer:function(e){if("function"!==typeof e)throw new Error(l(10));r=e,h({type:u.REPLACE})},[c]:function(){const e=b;return{subscribe(t){if("object"!==typeof t||null===t)throw new Error(l(11));function n(){const e=t;e.next&&e.next(m())}n();return{unsubscribe:e(n)}},[c](){return this}}}}}function g(e,t){return function(...n){return t(e.apply(this,n))}}function m(e,t){if("function"===typeof e)return g(e,t);if("object"!==typeof e||null===e)throw new Error(l(16));const n={};for(const r in e){const o=e[r];"function"===typeof o&&(n[r]=g(o,t))}return n}function b(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}n(8418);var h=o.version.startsWith("19"),v=Symbol.for(h?"react.transitional.element":"react.element"),y=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),E=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),A=S,N=P;function B(e){if("object"===typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case v:switch(e=e.type){case x:case D:case I:case O:case R:return e;default:switch(e=e&&e.$$typeof){case E:case S:case C:case P:case w:return e;default:return t}}case y:return t}}}function T(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,u,p=!1;function f(p,f){const g=!i(f,l),m=!o(p,s,f,l);return s=p,l=f,g&&m?(c=e(s,l),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):g?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):m?function(){const t=e(s,l),r=!a(t,c);return c=t,r&&(u=n(c,d,l)),u}():u}return function(o,i){return p?f(o,i):(s=o,l=i,c=e(s,l),d=t(r,l),u=n(c,d,l),p=!0,u)}}function L(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function M(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function G(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=M(e);let o=r(t,n);return"function"===typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=M(o),o=r(t,n)),o},r}}function _(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function F(e,t,n){return{...n,...e,...t}}function j(e){e()}var k={notify(){},get:()=>[]};function W(e,t){let n,r=k,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){j((()=>{let t=e;for(;t;)t.callback(),t=t.next}))},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function l(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=k)}const c={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>r};return c}var $=(()=>!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement))(),U=(()=>"undefined"!==typeof navigator&&"ReactNative"===navigator.product)(),H=(()=>$||U?o.useLayoutEffect:o.useEffect)();function q(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function V(e,t){if(q(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!q(e[n[r]],t[n[r]]))return!1;return!0}var z={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Y={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},X={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},J={[A]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[N]:X};function K(e){return B(e)===P?X:J[e.$$typeof]||z}var Q=Object.defineProperty,Z=Object.getOwnPropertyNames,ee=Object.getOwnPropertySymbols,te=Object.getOwnPropertyDescriptor,ne=Object.getPrototypeOf,re=Object.prototype;function oe(e,t){if("string"!==typeof t){if(re){const n=ne(t);n&&n!==re&&oe(e,n)}let n=Z(t);ee&&(n=n.concat(ee(t)));const r=K(e),o=K(t);for(let i=0;i<n.length;++i){const a=n[i];if(!Y[a]&&(!o||!o[a])&&(!r||!r[a])){const n=te(t,a);try{Q(e,a,n)}catch(e){}}}}return e}var ie=Symbol.for("react-redux-context"),ae="undefined"!==typeof globalThis?globalThis:{};function se(){if(!o.createContext)return{};const e=ae[ie]??=new Map;let t=e.get(o.createContext);return t||(t=o.createContext(null),e.set(o.createContext,t)),t}var le=se(),ce=[null,null];function de(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function ue(e,t){return e===t}var pe=function(e,t,n,{pure:r,areStatesEqual:i=ue,areOwnPropsEqual:a=V,areStatePropsEqual:s=V,areMergedPropsEqual:l=V,forwardRef:c=!1,context:d=le}={}){const u=d,p=function(e){return e?"function"===typeof e?G(e):_(e,"mapStateToProps"):L((()=>({})))}(e),f=function(e){return e&&"object"===typeof e?L((t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"===typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t))):e?"function"===typeof e?G(e):_(e,"mapDispatchToProps"):L((e=>({dispatch:e})))}(t),g=function(e){return e?"function"===typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,n,a){const s=e(t,n,a);return i?r(s,o)||(o=s):(i=!0,o=s),o}}}(e):_(e,"mergeProps"):()=>F}(n),m=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:m,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:p,initMapDispatchToProps:f,initMergeProps:g,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:a,areMergedPropsEqual:l};function d(t){const[n,i,a]=o.useMemo((()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]}),[t]),s=o.useMemo((()=>u),[n,u]),l=o.useContext(s),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),d=Boolean(l)&&Boolean(l.store);const p=c?t.store:l.store,f=d?l.getServerState:p.getState,g=o.useMemo((()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){return T(t(e,o),n(e,o),r(e,o),e,o)}(p.dispatch,r)),[p]),[b,h]=o.useMemo((()=>{if(!m)return ce;const e=W(p,c?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[p,c,l]),v=o.useMemo((()=>c?l:{...l,subscription:b}),[c,l,b]),y=o.useRef(void 0),x=o.useRef(a),I=o.useRef(void 0),D=o.useRef(!1),w=o.useRef(!1),E=o.useRef(void 0);H((()=>(w.current=!0,()=>{w.current=!1})),[]);const S=o.useMemo((()=>()=>I.current&&a===x.current?I.current:g(p.getState(),a)),[p,a]),O=o.useMemo((()=>e=>b?function(e,t,n,r,o,i,a,s,l,c,d){if(!e)return()=>{};let u=!1,p=null;const f=()=>{if(u||!s.current)return;const e=t.getState();let n,f;try{n=r(e,o.current)}catch(e){f=e,p=e}f||(p=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,d())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(m,p,b,g,x,y,D,w,I,h,e):()=>{}),[b]);var R,P,C;let A;R=de,P=[x,y,D,a,I,h],H((()=>R(...P)),C);try{A=o.useSyncExternalStore(O,S,f?()=>g(f(),a):S)}catch(e){throw E.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${E.current.stack}\n\n`),e}H((()=>{E.current=void 0,I.current=void 0,y.current=A}));const N=o.useMemo((()=>o.createElement(e,{...A,ref:i})),[i,e,A]);return o.useMemo((()=>m?o.createElement(s.Provider,{value:v},N):N),[s,N,v])}const b=o.memo(d);if(b.WrappedComponent=e,b.displayName=d.displayName=n,c){const t=o.forwardRef((function(e,t){return o.createElement(b,{...e,reactReduxForwardedRef:t})}));return t.displayName=n,t.WrappedComponent=e,oe(t,e)}return oe(b,e)}};var fe=function(e){const{children:t,context:n,serverState:r,store:i}=e,a=o.useMemo((()=>{const e=W(i);return{store:i,subscription:e,getServerState:r?()=>r:void 0}}),[i,r]),s=o.useMemo((()=>i.getState()),[i]);H((()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}}),[a,s]);const l=n||le;return o.createElement(l.Provider,{value:a},t)};var ge="Invariant failed";var me=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}}},be=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},he=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},ve={top:0,right:0,bottom:0,left:0},ye=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?ve:n,o=e.border,i=void 0===o?ve:o,a=e.padding,s=void 0===a?ve:a,l=me(be(t,r)),c=me(he(t,i)),d=me(he(c,s));return{marginBox:l,borderBox:me(t),paddingBox:c,contentBox:d,margin:r,border:i,padding:s}},xe=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(e){if(!e)throw new Error(ge)}(!1),n},Ie=function(e,t){var n,r,o=e.borderBox,i=e.border,a=e.margin,s=e.padding,l=(r=t,{top:(n=o).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return ye({borderBox:l,border:i,margin:a,padding:s})},De=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Ie(e,t)},we=function(e,t){var n={top:xe(t.marginTop),right:xe(t.marginRight),bottom:xe(t.marginBottom),left:xe(t.marginLeft)},r={top:xe(t.paddingTop),right:xe(t.paddingRight),bottom:xe(t.paddingBottom),left:xe(t.paddingLeft)},o={top:xe(t.borderTopWidth),right:xe(t.borderRightWidth),bottom:xe(t.borderBottomWidth),left:xe(t.borderLeftWidth)};return ye({borderBox:e,margin:n,padding:r,border:o})},Ee=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return we(t,n)},Se=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function Oe(){return Oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oe.apply(null,arguments)}function Re(e,t){}Re.bind(null,"warn"),Re.bind(null,"error");function Pe(){}function Ce(e,t,n){const r=t.map((t=>{const r=function(e,t){return{...e,...t}}(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}}));return function(){r.forEach((e=>{e()}))}}const Ae="Invariant failed";class Ne extends Error{}function Be(e,t){throw new Ne(Ae)}Ne.prototype.toString=function(){return this.message};class Te extends i().Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=Pe,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort();e.error instanceof Ne&&e.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=Ce(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof Ne))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const Le=e=>e+1,Me=(e,t)=>{const n=e.droppableId===t.droppableId,r=Le(e.index),o=Le(t.index);return n?`\n You have moved the item from position ${r}\n to position ${o}\n `:`\n You have moved the item from position ${r}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${o}\n `},Ge=(e,t,n)=>t.droppableId===n.droppableId?`\n The item ${e}\n has been combined with ${n.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${n.draggableId}\n in list ${n.droppableId}\n `,_e=e=>`\n The item has returned to its starting position\n of ${Le(e.index)}\n`,Fe={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:e=>`\n You have lifted an item in position ${Le(e.source.index)}\n`,onDragUpdate:e=>{const t=e.destination;if(t)return Me(e.source,t);const n=e.combine;return n?Ge(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},onDragEnd:e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${_e(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${Me(e.source,t)}\n `:n?`\n You have dropped the item.\n ${Ge(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${_e(e.source)}\n `}};function je(e,t){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(n=e[o],r=t[o],!(n===r||Number.isNaN(n)&&Number.isNaN(r)))return!1;var n,r;return!0}function ke(e,t){const n=(0,o.useState)((()=>({inputs:t,result:e()})))[0],r=(0,o.useRef)(!0),i=(0,o.useRef)(n),a=r.current||Boolean(t&&i.current.inputs&&je(t,i.current.inputs))?i.current:{inputs:t,result:e()};return(0,o.useEffect)((()=>{r.current=!1,i.current=a}),[a]),a.result}function We(e,t){return ke((()=>e),t)}const $e={x:0,y:0},Ue=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),He=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),qe=(e,t)=>e.x===t.x&&e.y===t.y,Ve=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),ze=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},Ye=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Xe=(e,t)=>Math.min(...t.map((t=>Ye(e,t)))),Je=e=>t=>({x:e(t.x),y:e(t.y)});const Ke=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Qe=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],Ze=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=me({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n})(t.pageMarginBox,e):me(e);var et=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=((e,t)=>t?Ke(e,t.scroll.diff.displacement):e)(e.marginBox,r),i=((e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e)(o,n,t);return{page:e,withPlaceholder:t,active:Ze(i,r)}},tt=(e,t)=>{e.frame||Be();const n=e.frame,r=He(t,n.scroll.initial),o=Ve(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=et({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function nt(e,t=je){let n=null;function r(...r){if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;const o=e.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return r.clear=function(){n=null},r}const rt=nt((e=>e.reduce(((e,t)=>(e[t.descriptor.id]=t,e)),{}))),ot=nt((e=>e.reduce(((e,t)=>(e[t.descriptor.id]=t,e)),{}))),it=nt((e=>Object.values(e))),at=nt((e=>Object.values(e)));var st=nt(((e,t)=>{const n=at(t).filter((t=>e===t.descriptor.droppableId)).sort(((e,t)=>e.descriptor.index-t.descriptor.index));return n}));function lt(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function ct(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var dt=nt(((e,t)=>t.filter((t=>t.descriptor.id!==e.descriptor.id)))),ut=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const pt={point:$e,value:0},ft={invisible:{},visible:{},all:[]},gt={displaced:ft,displacedBy:pt,at:null};var mt=(e,t)=>n=>e<=n&&n<=t,bt=e=>{const t=mt(e.top,e.bottom),n=mt(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;const a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;if(a&&s)return!0;return a&&i||s&&o}},ht=e=>{const t=mt(e.top,e.bottom),n=mt(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const vt={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},yt={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};const xt=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:$e;return Ke(e,n)})(e,t):e;return((e,t,n)=>!!t.subject.active&&n(t.subject.active)(e))(i,t,o)&&((e,t,n)=>n(t)(e))(i,n,o)},It=e=>xt({...e,isVisibleThroughFrameFn:ht});function Dt({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce((function(e,a){const s=function(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return me(be(n,r))}(a,n),l=a.descriptor.id;e.all.push(l);var c;if(!(c={target:s,destination:t,viewport:r,withDroppableDisplacement:!0},xt({...c,isVisibleThroughFrameFn:bt})))return e.invisible[a.descriptor.id]=!0,e;const d=((e,t,n)=>{if("boolean"===typeof n)return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return!i||i.shouldAnimate})(l,i,o),u={draggableId:l,shouldAnimate:d};return e.visible[l]=u,e}),{all:[],visible:{},invisible:{}})}function wt({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=function(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(e,{inHomeList:t});return{displaced:ft,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function Et({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=ut(e,n);if(null==a)return wt({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find((e=>e.descriptor.index===a));if(!c)return wt({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const d=dt(e,t),u=t.indexOf(c);return{displaced:Dt({afterDragging:d.slice(u),destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function St(e,t){return Boolean(t.effected[e])}var Ot=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||Be(),"REORDER"===c.type){const r=(({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,a=n[0].descriptor.index,s=n[n.length-1].descriptor.index;return i<a||i>(t?s:s+1)?null:i})({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return null==r?null:Et({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:r})}const d=(({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,a=n[i].descriptor.index;return St(i,o)?e?a:a-1:e?a+1:a})({isMovingForward:e,destination:o,displaced:a.displaced,draggables:r,combine:c.combine,afterCritical:l});return null==d?null:Et({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})},Rt=({afterCritical:e,impact:t,draggables:n})=>{const r=ct(t);r||Be();const o=r.draggableId,i=n[o].page.borderBox.center,a=(({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=Boolean(e.visible[n]||e.invisible[n]);return St(n,t)?o?$e:Ve(r.point):o?r.point:$e})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return Ue(i,a)};const Pt=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,Ct=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,At=({axis:e,moveRelativeTo:t,isMoving:n})=>ze(e.line,t.marginBox[e.end]+Pt(e,n),Ct(e,t.marginBox,n)),Nt=({axis:e,moveRelativeTo:t,isMoving:n})=>ze(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),Ct(e,t.marginBox,n));var Bt=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=st(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>ze(e.line,t.contentBox[e.start]+Pt(e,n),Ct(e,t.contentBox,n)))({axis:s,moveInto:r.page,isMoving:a});const{displaced:l,displacedBy:c}=e,d=l.all[0];if(d){const e=n[d];if(St(d,o))return Nt({axis:s,moveRelativeTo:e.page,isMoving:a});const t=Ie(e.page,c.point);return Nt({axis:s,moveRelativeTo:t,isMoving:a})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return a.borderBox.center;if(St(u.descriptor.id,o)){const e=Ie(u.page,Ve(o.displacedBy.point));return At({axis:s,moveRelativeTo:e,isMoving:a})}return At({axis:s,moveRelativeTo:u.page,isMoving:a})},Tt=(e,t)=>{const n=e.frame;return n?Ue(t,n.scroll.diff.displacement):t};var Lt=e=>{const t=(({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return n&&a?"REORDER"===a.type?Bt({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):Rt({impact:e,draggables:r,afterCritical:o}):i})(e),n=e.droppable;return n?Tt(n,t):t},Mt=(e,t)=>{const n=He(t,e.scroll.initial),r=Ve(n);return{frame:me({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function Gt(e,t){return e.map((e=>t[e]))}var _t=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=((e,t)=>Ue(e.scroll.diff.displacement,t))(n,e),o=He(r,t.page.borderBox.center);return Ue(t.client.borderBox.center,o)},Ft=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=He(n,e.page.borderBox.center),s={target:Ke(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?(e=>{return xt({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=mt(e.top,e.bottom),r=mt(e.left,e.right);return e=>t===vt?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(s):It(s)},jt=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!n.isEnabled)return null;const c=st(n.descriptor.id,r),d=ut(t,n),u=(({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled)return null;if(!lt(o))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:n.descriptor.id}};return{...o,at:t}}const a=o.displaced.all,s=a.length?a[0]:null;if(e)return s?i(s):null;const l=dt(t,r);if(!s)return l.length?i(l[l.length-1].descriptor.id):null;const c=l.findIndex((e=>e.descriptor.id===s));-1===c&&Be();const d=c-1;return d<0?null:i(l[d].descriptor.id)})({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||Ot({isMovingForward:e,isInHomeList:d,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!u)return null;const p=Lt({impact:u,draggable:t,droppable:n,draggables:r,afterCritical:l});if(Ft({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})){return{clientSelection:_t({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:u,scrollJumpRequest:null}}const f=He(p,a),g=(({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=Mt(t,Ue(t.scroll.current,o)),a=n.frame?tt(n,Ue(n.frame.scroll.current,o)):n,s=e.displaced,l=Dt({afterDragging:Gt(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=Dt({afterDragging:Gt(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),d={},u={},p=[s,l,c];return s.all.forEach((e=>{const t=function(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}(e,p);t?u[e]=t:d[e]=!0})),{...e,displaced:{all:s.all,invisible:d,visible:u}}})({impact:u,viewport:i,destination:n,draggables:r,maxScrollChange:f});return{clientSelection:s,impact:g,scrollJumpRequest:f}};const kt=e=>{const t=e.subject.active;return t||Be(),t};const Wt=(e,t)=>{const n=e.page.borderBox.center;return St(e.descriptor.id,t)?He(n,t.displacedBy.point):n},$t=(e,t)=>{const n=e.page.borderBox;return St(e.descriptor.id,t)?Ke(n,Ve(t.displacedBy.point)):n};var Ut=nt((function(e,t){const n=t[e.line];return{value:n,point:ze(e.line,n)}}));const Ht=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),qt=(e,t,n)=>{const r=e.frame;ut(t,e)&&Be(),e.subject.withPlaceholder&&Be();const o=Ut(e.axis,t.displaceBy).point,i=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return ze(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],i=st(e.descriptor.id,n).reduce(((e,t)=>e+t.client.marginBox[r.size]),0)+t[r.line]-o;return i<=0?null:ze(r.line,i)})(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=et({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?Ue(r.scroll.max,i):r.scroll.max,l=Ht(r,s),c=et({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var Vt=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=(({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const a=n.axis,s=mt(i[a.start],i[a.end]),l=it(r).filter((e=>e!==n)).filter((e=>e.isEnabled)).filter((e=>Boolean(e.subject.active))).filter((e=>bt(o.frame)(kt(e)))).filter((t=>{const n=kt(t);return e?i[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<i[a.crossAxisStart]})).filter((e=>{const t=kt(e),n=mt(t[a.start],t[a.end]);return s(t[a.start])||s(t[a.end])||n(i[a.start])||n(i[a.end])})).sort(((t,n)=>{const r=kt(t)[a.crossAxisStart],o=kt(n)[a.crossAxisStart];return e?r-o:o-r})).filter(((e,t,n)=>kt(e)[a.crossAxisStart]===kt(n[0])[a.crossAxisStart]));if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter((e=>mt(kt(e)[a.start],kt(e)[a.end])(t[a.line])));return 1===c.length?c[0]:c.length>1?c.sort(((e,t)=>kt(e)[a.start]-kt(t)[a.start]))[0]:l.sort(((e,n)=>{const r=Xe(t,Qe(kt(e))),o=Xe(t,Qe(kt(n)));return r!==o?r-o:kt(e)[a.start]-kt(n)[a.start]}))[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=st(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>{const i=r.filter((e=>It({target:$t(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0}))).sort(((t,r)=>{const i=Ye(e,Tt(n,Wt(t,o))),a=Ye(e,Tt(n,Wt(r,o)));return i<a?-1:a<i?1:t.descriptor.index-r.descriptor.index}));return i[0]||null})({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),u=(({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(n.length)return null;const e={displaced:ft,displacedBy:pt,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=Lt({impact:e,draggable:r,droppable:i,draggables:o,afterCritical:s}),l=ut(r,i)?i:qt(i,r,o);return Ft({draggable:r,destination:l,newPageBorderBoxCenter:t,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}const l=Boolean(e[i.axis.line]<=t.page.borderBox.center[i.axis.line]),c=(()=>{const e=t.descriptor.index;return t.descriptor.id===r.descriptor.id||l?e:e+1})(),d=Ut(i.axis,r.displaceBy);return Et({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:d,last:ft,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!u)return null;const p=Lt({impact:u,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:_t({pageBorderBoxCenter:p,draggable:n,viewport:a}),impact:u,scrollJumpRequest:null}},zt=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};var Yt=({state:e,type:t})=>{const n=((e,t)=>{const n=zt(e);return n?t[n]:null})(e.impact,e.dimensions.droppables),r=Boolean(n),o=e.dimensions.droppables[e.critical.droppable.id],i=n||o,a=i.axis.direction,s="vertical"===a&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===a&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(s&&!r)return null;const l="MOVE_DOWN"===t||"MOVE_RIGHT"===t,c=e.dimensions.draggables[e.critical.draggable.id],d=e.current.page.borderBoxCenter,{draggables:u,droppables:p}=e.dimensions;return s?jt({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,destination:i,draggables:u,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):Vt({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,isOver:i,draggables:u,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function Xt(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function Jt(e){const t=mt(e.top,e.bottom),n=mt(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function Kt({pageBorderBox:e,draggable:t,droppables:n}){const r=it(n).filter((t=>{if(!t.isEnabled)return!1;const n=t.subject.active;if(!n)return!1;if(o=n,!((r=e).left<o.right&&r.right>o.left&&r.top<o.bottom&&r.bottom>o.top))return!1;var r,o;if(Jt(n)(e.center))return!0;const i=t.axis,a=n.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=mt(n[i.crossAxisStart],n[i.crossAxisEnd]),d=c(s),u=c(l);return!d&&!u||(d?s<a:l>a)}));return r.length?1===r.length?r[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map((t=>{const n=t.axis,o=ze(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:Ye(r,o)}})).sort(((e,t)=>t.distance-e.distance));return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:r}):null}const Qt=(e,t)=>me(Ke(e,t));function Zt({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var en=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=Qt(t.page.borderBox,e),l=Kt({pageBorderBox:s,draggable:t,droppables:r});if(!l)return gt;const c=r[l],d=st(c.descriptor.id,n),u=((e,t)=>{const n=e.frame;return n?Qt(t,n.scroll.diff.value):t})(c,s);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:o,afterCritical:i})=>{if(!r.isCombineEnabled)return null;const a=r.axis,s=Ut(r.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],u=dt(e,o).find((e=>{const t=e.descriptor.id,r=e.page.borderBox,o=r[a.size]/4,s=St(t,i),u=Zt({displaced:n.displaced,id:t});return s?u?d>r[a.start]+o&&d<r[a.end]-o:c>r[a.start]-l+o&&c<r[a.end]-l-o:u?d>r[a.start]+l+o&&d<r[a.end]+l-o:c>r[a.start]+o&&c<r[a.end]-o}));return u?{displacedBy:s,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:u.descriptor.id,droppableId:r.descriptor.id}}}:null})({pageBorderBoxWithDroppableScroll:u,draggable:t,previousImpact:o,destination:c,insideDestination:d,afterCritical:a})||(({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:a})=>{const s=n.axis,l=Ut(n.axis,t.displaceBy),c=l.value,d=e[s.start],u=e[s.end],p=function({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:dt(t,r).find((e=>{const t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=St(t,a),i=Zt({displaced:o,id:t});return r?i?u<=n:d<n-c:i?u<=n+c:d<n}))||null,inHomeList:ut(t,n)});return Et({draggable:t,insideDestination:r,destination:n,viewport:i,last:o,displacedBy:l,index:p})})({pageBorderBoxWithDroppableScroll:u,draggable:t,destination:c,insideDestination:d,last:o.displaced,viewport:i,afterCritical:a})},tn=(e,t)=>({...e,[t.descriptor.id]:t});const nn=({previousImpact:e,impact:t,droppables:n})=>{const r=zt(e),o=zt(t);if(!r)return n;if(r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const a=(e=>{const t=e.subject.withPlaceholder;t||Be();const n=e.frame;if(!n){const t=et({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||Be();const o=Ht(n,r),i=et({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return tn(n,a)};var rn=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const a=r||e.viewport,s=n||e.dimensions,l=t||e.current.client.selection,c=He(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:Ue(e.initial.client.borderBoxCenter,c)},u={selection:Ue(d.selection,a.scroll.current),borderBoxCenter:Ue(d.borderBoxCenter,a.scroll.current),offset:Ue(d.offset,a.scroll.diff.value)},p={client:d,page:u};if("COLLECTING"===e.phase)return{...e,dimensions:s,viewport:a,current:p};const f=s.draggables[e.critical.draggable.id],g=o||en({pageOffset:u.offset,draggable:f,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=(({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=nn({previousImpact:r,impact:o,droppables:n}),a=zt(o);if(!a)return i;const s=n[a];if(ut(e,s))return i;if(s.subject.withPlaceholder)return i;const l=qt(s,e,t);return tn(i,l)})({draggable:f,impact:g,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:m},impact:g,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}};var on=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,a=function(e,t){return e.map((e=>t[e]))}(i.all,n),s=Dt({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},an=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=Lt({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return _t({pageBorderBoxCenter:a,draggable:t,viewport:o})},sn=({state:e,dimensions:t,viewport:n})=>{"SNAP"!==e.movementMode&&Be();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=zt(r);c||Be();const d=s[c],u=on({impact:r,viewport:o,destination:d,draggables:a}),p=an({impact:u,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return rn({impact:u,clientSelection:p,state:e,dimensions:i,viewport:o})},ln=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=Ut(t.axis,e.displaceBy),i=st(t.descriptor.id,n),a=i.indexOf(e);-1===a&&Be();const s=i.slice(a+1),l=s.reduce(((e,t)=>(e[t.descriptor.id]=!0,e)),{}),c={inVirtualList:"virtual"===t.descriptor.mode,displacedBy:o,effected:l};var d;return{impact:{displaced:Dt({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(d=e.descriptor,{index:d.index,droppableId:d.droppableId})}},afterCritical:c}};const cn=e=>{0},dn=e=>{0};var un=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map((e=>{const o=e.descriptor.droppableId,i=(e=>{const t=e.frame;return t||Be(),t})(t[o]),a=i.scroll.diff.value,s=(({draggable:e,offset:t,initialWindowScroll:n})=>{const r=Ie(e.client,t),o=De(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}})({draggable:e,offset:Ue(r,a),initialWindowScroll:n.scroll.initial});return s}))};const pn=e=>"SNAP"===e.movementMode,fn=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:tn(e.droppables,t)}))(e.dimensions,t);return!pn(e)||n?rn({state:e,dimensions:r}):sn({state:e,dimensions:r})};function gn(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const mn={phase:"IDLE",completed:null,shouldFlush:!1};var bn=(e=mn,t)=>{if("FLUSH"===t.type)return{...mn,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&Be();const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[n.draggable.id],l=i.droppables[n.droppable.id],c={selection:r,borderBoxCenter:s.client.borderBox.center,offset:$e},d={client:c,page:{selection:Ue(c.selection,o.scroll.initial),borderBoxCenter:Ue(c.selection,o.scroll.initial),offset:Ue(c.selection,o.scroll.diff.value)}},u=it(i.droppables).every((e=>!e.isFixedOnPage)),{impact:p,afterCritical:f}=ln({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:i,initial:d,current:d,isWindowScrollAllowed:u,impact:p,afterCritical:f,onLiftImpact:p,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&Be();return{...e,phase:"COLLECTING"}}if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&Be(),(({state:e,published:t})=>{cn();const n=t.modified.map((t=>{const n=e.dimensions.droppables[t.droppableId];return tt(n,t.scroll)})),r={...e.dimensions.droppables,...rt(n)},o=ot(un({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach((e=>{delete i[e]}));const a={droppables:r,draggables:i},s=zt(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],d=a.droppables[e.critical.droppable.id],{impact:u,afterCritical:p}=ln({draggable:c,home:d,draggables:i,viewport:e.viewport}),f=l&&l.isCombineEnabled?e.impact:u,g=en({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:f,viewport:e.viewport,afterCritical:p});dn();const m={...e,phase:"DRAGGING",impact:g,onLiftImpact:u,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?m:{...m,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;Xt(e)||Be();const{client:n}=t.payload;return qe(n,e.current.client.selection)?e:rn({state:e,clientSelection:n,impact:pn(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return gn(e);if("COLLECTING"===e.phase)return gn(e);Xt(e)||Be();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=tt(o,r);return fn(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Xt(e)||Be();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Be(),o.isEnabled===r&&Be();const i={...o,isEnabled:r};return fn(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Xt(e)||Be();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Be(),o.isCombineEnabled===r&&Be();const i={...o,isCombineEnabled:r};return fn(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;Xt(e)||Be(),e.isWindowScrollAllowed||Be();const n=t.payload.newScroll;if(qe(e.viewport.scroll.current,n))return gn(e);const r=Mt(e.viewport,n);return pn(e)?sn({state:e,viewport:r}):rn({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!Xt(e))return e;const n=t.payload.maxScroll;if(qe(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&Be();const n=Yt({state:e,type:t.type});return n?rn({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;"COLLECTING"!==e.phase&&Be();return{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&Be();return{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};function hn(e,t){return e instanceof Object&&"type"in e&&e.type===t}const vn=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),yn=()=>({type:"COLLECTION_STARTING",payload:null}),xn=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),In=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Dn=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),wn=e=>({type:"MOVE",payload:e}),En=()=>({type:"MOVE_UP",payload:null}),Sn=()=>({type:"MOVE_DOWN",payload:null}),On=()=>({type:"MOVE_RIGHT",payload:null}),Rn=()=>({type:"MOVE_LEFT",payload:null}),Pn=e=>({type:"DROP_COMPLETE",payload:e}),Cn=e=>({type:"DROP",payload:e}),An=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});const Nn="cubic-bezier(.2,1,.1,1)",Bn={drop:0,combining:.7},Tn={drop:.75},Ln={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Mn=`${Ln.outOfTheWay}s ${"cubic-bezier(0.2, 0, 0, 1)"}`,Gn={fluid:`opacity ${Mn}`,snap:`transform ${Mn}, opacity ${Mn}`,drop:e=>{const t=`${e}s ${Nn}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Mn}`,placeholder:`height ${Mn}, width ${Mn}, margin ${Mn}`},_n=e=>qe(e,$e)?void 0:`translate(${e.x}px, ${e.y}px)`,Fn=_n,jn=(e,t)=>{const n=_n(e);if(n)return t?`${n} scale(${Tn.drop})`:n},{minDropTime:kn,maxDropTime:Wn}=Ln,$n=Wn-kn;const Un=({getState:e,dispatch:t})=>n=>r=>{if(!hn(r,"DROP"))return void n(r);const o=e(),i=r.payload.reason;if("COLLECTING"===o.phase)return void t((e=>({type:"DROP_PENDING",payload:e}))({reason:i}));if("IDLE"===o.phase)return;"DROP_PENDING"===o.phase&&o.isWaiting&&Be(),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&Be();const a=o.critical,s=o.dimensions,l=s.draggables[o.critical.draggable.id],{impact:c,didDropInsideDroppable:d}=(({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>{if(!n.at||"DROP"!==t)return{impact:on({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1};return"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:ft},didDropInsideDroppable:!0}})({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),u=d?lt(c):null,p=d?ct(c):null,f={index:a.draggable.index,droppableId:a.droppable.id},g={draggableId:l.descriptor.id,type:l.descriptor.type,source:f,reason:i,mode:o.movementMode,destination:u,combine:p},m=(({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=zt(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=an({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return He(d,t.client.borderBox.center)})({impact:c,draggable:l,dimensions:s,viewport:o.viewport,afterCritical:o.afterCritical}),b={critical:o.critical,afterCritical:o.afterCritical,result:g,impact:c};if(!(!qe(o.current.client.offset,m)||Boolean(g.combine)))return void t(Pn({completed:b}));const h=(({current:e,destination:t,reason:n})=>{const r=Ye(e,t);if(r<=0)return kn;if(r>=1500)return Wn;const o=kn+$n*(r/1500);return Number(("CANCEL"===n?.6*o:o).toFixed(2))})({current:o.current.client.offset,destination:m,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:m,dropDuration:h,completed:b}))};var Hn=()=>({x:window.pageXOffset,y:window.pageYOffset});function qn({onWindowScroll:e}){const t=Se((function(){e(Hn())})),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let r=Pe;function o(){return r!==Pe}return{start:function(){o()&&Be(),r=Ce(window,[n])},stop:function(){o()||Be(),t.cancel(),r(),r=Pe},isActive:o}}const Vn=e=>{const t=qn({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{!t.isActive()&&hn(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>hn(e,"DROP_COMPLETE")||hn(e,"DROP_ANIMATE")||hn(e,"FLUSH"))(n)&&t.stop(),e(n)}};var zn=()=>{const e=[];return{add:t=>{const n=setTimeout((()=>(t=>{const n=e.findIndex((e=>e.timerId===t));-1===n&&Be();const[r]=e.splice(n,1);r.callback()})(n))),r={timerId:n,callback:t};e.push(r)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach((e=>{clearTimeout(e.timerId),e.callback()}))}}};const Yn=(e,t)=>{cn(),t(),dn()},Xn=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Jn(e,t,n,r){if(!e)return void n(r(t));const o=(e=>{let t=!1,n=!1;const r=setTimeout((()=>{n=!0})),o=o=>{t||n||(t=!0,e(o),clearTimeout(r))};return o.wasCalled=()=>t,o})(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}var Kn=(e,t)=>{const n=((e,t)=>{const n=zn();let r=null;const o=n=>{r||Be(),r=null,Yn(0,(()=>Jn(e().onDragEnd,n,t,Fe.onDragEnd)))};return{beforeCapture:(t,n)=>{r&&Be(),Yn(0,(()=>{const r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:(t,n)=>{r&&Be(),Yn(0,(()=>{const r=e().onBeforeDragStart;r&&r(Xn(t,n))}))},start:(o,i)=>{r&&Be();const a=Xn(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add((()=>{Yn(0,(()=>Jn(e().onDragStart,a,t,Fe.onDragStart)))}))},update:(o,i)=>{const a=lt(i),s=ct(i);r||Be();const l=!((e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r})(o,r.lastCritical);l&&(r.lastCritical=o);const c=(u=a,!(null==(d=r.lastLocation)&&null==u||null!=d&&null!=u&&d.droppableId===u.droppableId&&d.index===u.index));var d,u;c&&(r.lastLocation=a);const p=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(r.lastCombine,s);if(p&&(r.lastCombine=s),!l&&!c&&!p)return;const f={...Xn(o,r.mode),combine:s,destination:a};n.add((()=>{Yn(0,(()=>Jn(e().onDragUpdate,f,t,Fe.onDragUpdate)))}))},flush:()=>{r||Be(),n.flush()},drop:o,abort:()=>{if(!r)return;const e={...Xn(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>r=>{if(hn(r,"BEFORE_INITIAL_CAPTURE"))return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if(hn(r,"INITIAL_PUBLISH")){const e=r.payload.critical;return n.beforeStart(e,r.payload.movementMode),t(r),void n.start(e,r.payload.movementMode)}if(hn(r,"DROP_COMPLETE")){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),hn(r,"FLUSH"))return void n.abort();const o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}};const Qn=e=>t=>n=>{if(!hn(n,"DROP_ANIMATION_FINISHED"))return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&Be(),e.dispatch(Pn({completed:r.completed}))},Zn=e=>{let t=null,n=null;return r=>o=>{if((hn(o,"FLUSH")||hn(o,"DROP_COMPLETE")||hn(o,"DROP_ANIMATION_FINISHED"))&&(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),!hn(o,"DROP_ANIMATE"))return;const i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((()=>{n=null,t=Ce(window,[i])}))}};var er=e=>t=>n=>r=>{if((e=>hn(e,"DROP_COMPLETE")||hn(e,"DROP_ANIMATE")||hn(e,"FLUSH"))(r))return e.stop(),void n(r);if(hn(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();return"DRAGGING"!==o.phase&&Be(),void e.start(o)}n(r),e.scroll(t.getState())};const tr=e=>t=>n=>{if(t(n),!hn(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Cn({reason:r.reason})))},nr=b;var rr=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>{return f(bn,nr(function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(l(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map((e=>e(a)));return i=b(...s)(o.dispatch),{...o,dispatch:i}}}((a=n,()=>e=>t=>{hn(t,"INITIAL_PUBLISH")&&a.dragging(),hn(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(hn(t,"FLUSH")||hn(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>n=>{(hn(n,"DROP_COMPLETE")||hn(n,"FLUSH")||hn(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>r=>o=>{if(!hn(o,"LIFT"))return void r(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&n(Pn({completed:l.completed})),"IDLE"!==t().phase&&Be(),n({type:"FLUSH",payload:null}),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:s}});const c={draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},{critical:d,dimensions:u,viewport:p}=e.startPublishing(c);n({type:"INITIAL_PUBLISH",payload:{critical:d,dimensions:u,clientSelection:a,movementMode:s,viewport:p}})})(e),Un,Qn,Zn,tr,er(i),Vn,(e=>{let t=!1;return()=>n=>r=>{if(hn(r,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if(hn(r,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(hn(r,"DROP_COMPLETE")){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),Kn(r,o))));var a};var or=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=He({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},ir=()=>{const e=document.documentElement;return e||Be(),e},ar=()=>{const e=ir();return or({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},sr=({critical:e,scrollOptions:t,registry:n})=>{cn();const r=(()=>{const e=Hn(),t=ar(),n=e.y,r=e.x,o=ir(),i=o.clientWidth,a=o.clientHeight;return{frame:me({top:n,left:r,right:r+i,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:$e,displacement:$e}}}})(),o=r.scroll.current,i=e.droppable,a=n.droppable.getAllByType(i.type).map((e=>e.callbacks.getDimensionAndWatchScroll(o,t))),s=n.draggable.getAllByType(e.draggable.type).map((e=>e.getDimension(o))),l={draggables:ot(s),droppables:rt(a)};dn();return{dimensions:l,critical:e,viewport:r}};function lr(e,t,n){if(n.descriptor.id===t.id)return!1;if(n.descriptor.type!==t.type)return!1;return"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode}var cr=(e,t)=>{let n=null;const r=function({registry:e,callbacks:t}){let n={additions:{},removals:{},modified:{}},r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame((()=>{r=null,cn();const{additions:o,removals:i,modified:a}=n,s=Object.keys(o).map((t=>e.draggable.getById(t).getDimension($e))).sort(((e,t)=>e.descriptor.index-t.descriptor.index)),l=Object.keys(a).map((t=>({droppableId:t,scroll:e.droppable.getById(t).callbacks.getScrollWhileDragging()}))),c={additions:s,removals:Object.keys(i),modified:l};n={additions:{},removals:{},modified:{}},dn(),t.publish(c)})))};return{add:e=>{const t=e.descriptor.id;n.additions[t]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[t]&&delete n.removals[t],o()},remove:e=>{const t=e.descriptor;n.removals[t.id]=!0,n.modified[t.droppableId]=!0,n.additions[t.id]&&delete n.additions[t.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=t=>{n||Be();const o=n.critical.draggable;"ADDITION"===t.type&&lr(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&lr(e,o,t.value)&&r.remove(t.value)},i={updateDroppableIsEnabled:(r,o)=>{e.droppable.exists(r)||Be(),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:(r,o)=>{n&&(e.droppable.exists(r)||Be(),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:o}))},scrollDroppable:(t,r)=>{n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:(r,o)=>{n&&(e.droppable.exists(r)||Be(),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:t=>{n&&Be();const r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:i.descriptor},s=e.subscribe(o);return n={critical:a,unsubscribe:s},sr({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!n)return;r.stop();const t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((e=>e.callbacks.dragStopped())),n.unsubscribe(),n=null}};return i},dr=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason),ur=e=>{window.scrollBy(e.x,e.y)};const pr=nt((e=>it(e).filter((e=>!!e.isEnabled&&!!e.frame))));var fr=({center:e,destination:t,droppables:n})=>{if(t){const e=n[t];return e.frame?e:null}const r=((e,t)=>{const n=pr(t).find((t=>(t.frame||Be(),Jt(t.frame.pageMarginBox)(e))))||null;return n})(e,n);return r};const gr={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var mr=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;if(0===r)return 0;return(n-e)/r},br=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=((e,t,n=()=>gr)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const o=1-mr({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=r.maxPixelScroll*r.ease(o);return Math.ceil(i)})(e,t,o);return 0===i?0:r?Math.max(((e,t,n)=>{const r=n(),o=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,a=t,s=i,l=Date.now()-a;if(l>=i)return e;if(l<o)return 1;const c=mr({startOfRange:o,endOfRange:s,current:l}),d=e*r.ease(c);return Math.ceil(d)})(i,n,o),1):i},hr=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,n=()=>gr)=>{const r=n();return{startScrollingFrom:e[t.size]*r.startFromPercentage,maxScrollValueAt:e[t.size]*r.maxScrollAtPercentage}})(e,r,i);return t[r.end]<t[r.start]?br({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*br({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const vr=Je((e=>0===e?0:e));var yr=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},s=hr({container:t,distanceToEdges:a,dragStartTime:e,axis:vt,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=hr({container:t,distanceToEdges:a,dragStartTime:e,axis:yt,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=vr({x:l,y:s});if(qe(c,$e))return null;const d=(({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,o=t.width>e.width;return o||r?o&&r?null:{x:o?0:n.x,y:r?0:n.y}:n})({container:t,subject:n,proposedScroll:c});return d?qe(d,$e)?null:d:null};const xr=Je((e=>0===e?0:e>0?1:-1)),Ir=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{const o=Ue(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return qe(i,$e)?null:i}})(),Dr=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=xr(n),i=Ir({max:r,current:t,change:o});return!i||(0!==o.x&&0===i.x||0!==o.y&&0===i.y)},wr=(e,t)=>Dr({current:e.scroll.current,max:e.scroll.max,change:t}),Er=(e,t)=>{const n=e.frame;return!!n&&Dr({current:n.scroll.current,max:n.scroll.max,change:t})};var Sr=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,s=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const o=(({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=yr({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&wr(e,a)?a:null})({dragStartTime:t,viewport:e.viewport,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(o)return void r(o)}const l=fr({center:a,destination:zt(e.impact),droppables:e.dimensions.droppables});if(!l)return;const c=(({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=yr({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Er(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)},Or=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(e,n)=>{if(!Er(e,n))return n;const r=((e,t)=>{const n=e.frame;return n&&Er(e,t)?Ir({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!r)return t(e.descriptor.id,n),null;const o=He(n,r);t(e.descriptor.id,o);return He(n,o)},o=(e,t,r)=>{if(!e)return r;if(!wr(t,r))return r;const o=((e,t)=>{if(!wr(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return Ir({current:r,max:n,change:t})})(t,r);if(!o)return n(r),null;const i=He(r,o);n(i);return He(r,i)};return t=>{const n=t.scrollJumpRequest;if(!n)return;const i=zt(t.impact);i||Be();const a=r(t.dimensions.droppables[i],n);if(!a)return;const s=t.viewport,l=o(t.isWindowScrollAllowed,s,a);l&&((t,n)=>{const r=Ue(t.current.client.selection,n);e({client:r})})(t,l)}},Rr=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>gr})=>{const r=Se(e),o=Se(t);let i=null;const a=e=>{i||Be();const{shouldUseTimeDampening:t,dragStartTime:a}=i;Sr({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{cn(),i&&Be();const t=Date.now();let r=!1;const o=()=>{r=!0};Sr({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:n}),i={dragStartTime:t,shouldUseTimeDampening:r},dn(),r&&a(e)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=Or({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{r().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}};const Pr="data-rfd",Cr=(()=>{const e=`${Pr}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Ar=(()=>{const e=`${Pr}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Nr=(()=>{const e=`${Pr}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Br={contextId:`${Pr}-scroll-container-context-id`},Tr=(e,t)=>e.map((e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""})).join(" ");const Lr="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?o.useLayoutEffect:o.useEffect,Mr=()=>{const e=document.querySelector("head");return e||Be(),e},Gr=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function _r(e,t){const n=ke((()=>(e=>{const t=(n=e,e=>`[${e}="${n}"]`);var n;const r=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(Cr.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}})(),o=[(()=>{const e=`\n transition: ${Gn.outOfTheWay};\n `;return{selector:t(Ar.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(Nr.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:Tr(o,"always"),resting:Tr(o,"resting"),dragging:Tr(o,"dragging"),dropAnimating:Tr(o,"dropAnimating"),userCancel:Tr(o,"userCancel")}})(e)),[e]),r=(0,o.useRef)(null),i=(0,o.useRef)(null),a=We(nt((e=>{const t=i.current;t||Be(),t.textContent=e})),[]),s=We((e=>{const t=r.current;t||Be(),t.textContent=e}),[]);Lr((()=>{(r.current||i.current)&&Be();const o=Gr(t),l=Gr(t);return r.current=o,i.current=l,o.setAttribute(`${Pr}-always`,e),l.setAttribute(`${Pr}-dynamic`,e),Mr().appendChild(o),Mr().appendChild(l),s(n.always),a(n.resting),()=>{const e=e=>{const t=e.current;t||Be(),Mr().removeChild(t),e.current=null};e(r),e(i)}}),[t,s,a,n.always,n.resting,e]);const l=We((()=>a(n.dragging)),[a,n.dragging]),c=We((e=>{a("DROP"!==e?n.userCancel:n.dropAnimating)}),[a,n.dropAnimating,n.userCancel]),d=We((()=>{i.current&&a(n.resting)}),[a,n.resting]);return ke((()=>({dragging:l,dropping:c,resting:d})),[l,c,d])}function Fr(e,t){return Array.from(e.querySelectorAll(t))}var jr=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function kr(e){return e instanceof jr(e).HTMLElement}function Wr(e,t){const n=`[${Cr.contextId}="${e}"]`,r=Fr(document,n);if(!r.length)return null;const o=r.find((e=>e.getAttribute(Cr.draggableId)===t));return o&&kr(o)?o:null}function $r(){const e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((t=>t(e)))}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:(t,n)=>{const r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],e.droppables[t.descriptor.droppableId]&&n({type:"REMOVAL",value:t}))},getById:function(e){const t=r(e);return t||Be(),t},findById:r,exists:e=>Boolean(r(e)),getAllByType:t=>Object.values(e.draggables).filter((e=>e.descriptor.type===t))},droppable:{register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=o(e);return t||Be(),t},findById:o,exists:e=>Boolean(o(e)),getAllByType:t=>Object.values(e.droppables).filter((e=>e.descriptor.type===t))},subscribe:function(e){return t.push(e),function(){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Ur=i().createContext(null),Hr=()=>{const e=document.body;return e||Be(),e};const qr={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};const Vr={separator:"::"};function zr(e,t=Vr){const n=i().useId();return ke((()=>`${e}${t.separator}${n}`),[t.separator,e,n])}var Yr=i().createContext(null);function Xr(e){0}function Jr(e,t){Xr()}function Kr(){Jr()}function Qr(e){const t=(0,o.useRef)(e);return(0,o.useEffect)((()=>{t.current=e})),t}function Zr(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const eo=9,to=13,no=33,ro=34,oo=35,io=36,ao={[to]:!0,[eo]:!0};var so=e=>{ao[e.keyCode]&&e.preventDefault()};const lo=(()=>{const e="visibilitychange";if("undefined"===typeof document)return e;return[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find((e=>`on${e}`in document))||e})();const co={type:"IDLE"};function uo({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:o,clientY:i}=e;if(0!==t)return;const a={x:o,y:i},s=n();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&Be();const l=s.point;if(c=l,d=a,!(Math.abs(d.x-c.x)>=5||Math.abs(d.y-c.y)>=5))return;var c,d;e.preventDefault();const u=s.actions.fluidLift(a);r({type:"DRAGGING",actions:u})}},{eventName:"mouseup",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===n().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==n().type)return 27===t.keyCode?(t.preventDefault(),void e()):void so(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===n().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const r=n();"IDLE"===r.type&&Be(),r.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:lo,fn:e}]}function po(){}const fo={[ro]:!0,[no]:!0,[io]:!0,[oo]:!0};function go(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:r=>27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(fo[r.keyCode]?r.preventDefault():so(r))},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:lo,fn:n}]}const mo={type:"IDLE"};const bo=["input","button","textarea","select","option","optgroup","video","audio"];function ho(e,t){if(null==t)return!1;if(bo.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&ho(e,t.parentElement)}function vo(e,t){const n=t.target;return!!kr(n)&&ho(e,n)}var yo=e=>me(e.getBoundingClientRect()).center;const xo=(()=>{const e="matches";if("undefined"===typeof document)return e;return[e,"msMatchesSelector","webkitMatchesSelector"].find((e=>e in Element.prototype))||e})();function Io(e,t){return null==e?null:e[xo](t)?e:Io(e.parentElement,t)}function Do(e,t){return e.closest?e.closest(t):Io(e,t)}function wo(e,t){const n=t.target;if(!function(e){return e instanceof jr(e).Element}(n))return null;const r=function(e){return`[${Cr.contextId}="${e}"]`}(e),o=Do(n,r);return o&&kr(o)?o:null}function Eo(e){e.preventDefault()}function So({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!!n()&&e===t}function Oo({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!!o&&(!!o.options.isEnabled&&!!dr(t.getState(),r))}function Ro({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!Oo({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const s=r.draggable.getById(o),l=function(e,t){const n=`[${Ar.contextId}="${e}"]`,r=Fr(document,n).find((e=>e.getAttribute(Ar.id)===t));return r&&kr(r)?r:null}(t,s.descriptor.id);if(!l)return null;if(a&&!s.options.canDragInteractiveElements&&vo(l,a))return null;const c=e.claim(i||Pe);let d="PRE_DRAG";function u(){return s.options.shouldRespectForcePress}function p(){return e.isActive(c)}const f=function(e,t){So({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function g(t){function r(){e.release(),d="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=Ce(window,[{eventName:"click",fn:Eo,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(Cn({reason:e}))}return"PRE_DRAG"!==d&&(r(),Be()),n.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),d="DRAGGING",{isActive:()=>So({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>So({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,fluidLift:function(e){const t=Se((e=>{f((()=>wn({client:e})))}));return{...g({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>f(En),moveRight:()=>f(On),moveDown:()=>f(Sn),moveLeft:()=>f(Rn)};return g({liftActionArgs:{id:o,clientSelection:yo(l),movementMode:"SNAP"},cleanup:Pe,actions:e})},abort:function(){So({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&e.release()}}}const Po=[function(e){const t=(0,o.useRef)(co),n=(0,o.useRef)(Pe),r=ke((()=>({eventName:"mousedown",fn:function(t){if(t.defaultPrevented)return;if(0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,s,{sourceEvent:t});if(!o)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};n.current(),d(o,i)}})),[e]),i=ke((()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}})),[e]),a=We((function(){n.current=Ce(window,[i,r],{passive:!1,capture:!0})}),[i,r]),s=We((()=>{"IDLE"!==t.current.type&&(t.current=co,n.current(),a())}),[a]),l=We((()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),c=We((function(){const e=uo({cancel:l,completed:s,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=Ce(window,e,{capture:!0,passive:!1})}),[l,s]),d=We((function(e,n){"IDLE"!==t.current.type&&Be(),t.current={type:"PENDING",point:n,actions:e},c()}),[c]);Lr((function(){return a(),function(){n.current()}}),[a])},function(e){const t=(0,o.useRef)(po),n=ke((()=>({eventName:"keydown",fn:function(n){if(n.defaultPrevented)return;if(32!==n.keyCode)return;const o=e.findClosestDraggableId(n);if(!o)return;const i=e.tryGetLock(o,l,{sourceEvent:n});if(!i)return;n.preventDefault();let a=!0;const s=i.snapLift();function l(){a||Be(),a=!1,t.current(),r()}t.current(),t.current=Ce(window,go(s,l),{capture:!0,passive:!1})}})),[e]),r=We((function(){t.current=Ce(window,[n],{passive:!1,capture:!0})}),[n]);Lr((function(){return r(),function(){t.current()}}),[r])},function(e){const t=(0,o.useRef)(mo),n=(0,o.useRef)(Pe),r=We((function(){return t.current}),[]),i=We((function(e){t.current=e}),[]),a=ke((()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,l,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:s}=i,c={x:a,y:s};n.current(),p(o,c)}})),[e]),s=We((function(){n.current=Ce(window,[a],{capture:!0,passive:!1})}),[a]),l=We((()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(mo),n.current(),s())}),[s,i]),c=We((()=>{const e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),d=We((function(){const e={capture:!0,passive:!1},t={cancel:c,completed:l,getPhase:r},o=Ce(window,function({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const r=n();if("DRAGGING"!==r.type)return void e();r.hasMoved=!0;const{clientX:o,clientY:i}=t.touches[0],a={x:o,y:i};t.preventDefault(),r.actions.move(a)}},{eventName:"touchend",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===n().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const r=n();"IDLE"===r.type&&Be();const o=t.touches[0];if(!o)return;if(!(o.force>=.15))return;const i=r.actions.shouldRespectForcePress();if("PENDING"!==r.type)return i?r.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:lo,fn:e}]}(t),e),i=Ce(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:n=>{"DRAGGING"===t().type?(27===n.keyCode&&n.preventDefault(),e()):e()}},{eventName:lo,fn:e}]}(t),e);n.current=function(){o(),i()}}),[c,r,l]),u=We((function(){const e=r();"PENDING"!==e.type&&Be();const t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,i]),p=We((function(e,t){"IDLE"!==r().type&&Be();const n=setTimeout(u,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),d()}),[d,r,i,u]);Lr((function(){return s(),function(){n.current();const e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(mo))}}),[r,s,i]),Lr((function(){return Ce(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])}),[])}];function Co({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:i}){const a=[...i?Po:[],...r||[]],s=(0,o.useState)((()=>function(){let e=null;function t(){e||Be(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&Be();const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()))[0],l=We((function(e,t){Zr(e)&&!Zr(t)&&s.tryAbandon()}),[s]);Lr((function(){let e=t.getState();return t.subscribe((()=>{const n=t.getState();l(e,n),e=n}))}),[s,t,l]),Lr((()=>s.tryAbandon),[s.tryAbandon]);const c=We((e=>Oo({lockAPI:s,registry:n,store:t,draggableId:e})),[s,n,t]),d=We(((r,o,i)=>Ro({lockAPI:s,registry:n,contextId:e,store:t,draggableId:r,forceSensorStop:o||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null})),[e,s,n,t]),u=We((t=>function(e,t){const n=wo(e,t);return n?n.getAttribute(Cr.draggableId):null}(e,t)),[e]),p=We((e=>{const t=n.draggable.findById(e);return t?t.options:null}),[n.draggable]),f=We((function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))}),[s,t]),g=We((()=>s.isClaimed()),[s]),m=ke((()=>({canGetLock:c,tryGetLock:d,findClosestDraggableId:u,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:g})),[c,d,u,p,f,g]);Xr();for(let e=0;e<a.length;e++)a[e](m)}function Ao(e){return e.current||Be(),e.current}function No(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:s,dragHandleUsageInstructions:l}=e,c=(0,o.useRef)(null);Kr();const d=Qr(e),u=We((()=>(e=>({onBeforeCapture:t=>{(0,a.flushSync)((()=>{e.onBeforeCapture&&e.onBeforeCapture(t)}))},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(d.current)),[d]),p=We((()=>(e=>({...gr,...e.autoScrollerOptions,durationDampening:{...gr.durationDampening,...e.autoScrollerOptions}}))(d.current)),[d]),f=function(e){const t=ke((()=>(e=>`rfd-announcement-${e}`)(e)),[e]),n=(0,o.useRef)(null);(0,o.useEffect)((function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Oe(e.style,qr),Hr().appendChild(e),function(){setTimeout((function(){const t=Hr();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]);const r=We((e=>{const t=n.current;t&&(t.textContent=e)}),[]);return r}(t),g=function({contextId:e,text:t}){const n=zr("hidden-text",{separator:"-"}),r=ke((()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:n})),[n,e]);return(0,o.useEffect)((function(){const e=document.createElement("div");return e.id=r,e.textContent=t,e.style.display="none",Hr().appendChild(e),function(){const t=Hr();t.contains(e)&&t.removeChild(e)}}),[r,t]),r}({contextId:t,text:l}),b=_r(t,s),h=We((e=>{Ao(c).dispatch(e)}),[]),v=ke((()=>m({publishWhileDragging:vn,updateDroppableScroll:xn,updateDroppableIsEnabled:In,updateDroppableIsCombineEnabled:Dn,collectionStarting:yn},h)),[h]),y=function(){const e=ke($r,[]);return(0,o.useEffect)((()=>function(){e.clean()}),[e]),e}(),x=ke((()=>cr(y,v)),[y,v]),I=ke((()=>Rr({scrollWindow:ur,scrollDroppable:x.scrollDroppable,getAutoScrollerOptions:p,...m({move:wn},h)})),[x.scrollDroppable,h,p]),D=function(e){const t=(0,o.useRef)({}),n=(0,o.useRef)(null),r=(0,o.useRef)(null),i=(0,o.useRef)(!1),a=We((function(e,n){const r={id:e,focus:n};return t.current[e]=r,function(){const n=t.current;n[e]!==r&&delete n[e]}}),[]),s=We((function(t){const n=Wr(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),l=We((function(e,t){n.current===e&&(n.current=t)}),[]),c=We((function(){r.current||i.current&&(r.current=requestAnimationFrame((()=>{r.current=null;const e=n.current;e&&s(e)})))}),[s]),d=We((function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(Cr.draggableId)===e&&(n.current=e)}),[]);return Lr((()=>(i.current=!0,function(){i.current=!1;const e=r.current;e&&cancelAnimationFrame(e)})),[]),ke((()=>({register:a,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l})),[a,d,c,l])}(t),w=ke((()=>rr({announce:f,autoScroller:I,dimensionMarshal:x,focusMarshal:D,getResponders:u,styleMarshal:b})),[f,I,x,D,u,b]);c.current=w;const E=We((()=>{const e=Ao(c);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),S=We((()=>{const e=Ao(c).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging}),[]);n(ke((()=>({isDragging:S,tryAbort:E})),[S,E]));const O=We((e=>dr(Ao(c).getState(),e)),[]),R=We((()=>Xt(Ao(c).getState())),[]),P=ke((()=>({marshal:x,focus:D,contextId:t,canLift:O,isMovementAllowed:R,dragHandleUsageInstructionsId:g,registry:y})),[t,x,g,D,O,R,y]);return Co({contextId:t,store:w,registry:y,customSensors:r||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,o.useEffect)((()=>E),[E]),i().createElement(Yr.Provider,{value:P},i().createElement(fe,{context:Ur,store:w},e.children))}function Bo(e){const t=i().useId(),n=e.dragHandleUsageInstructions||Fe.dragHandleUsageInstructions;return i().createElement(Te,null,(r=>i().createElement(No,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children)))}const To=5e3,Lo=4500,Mo=(e,t)=>t?Gn.drop(t.duration):e?Gn.snap:Gn.fluid,Go=(e,t)=>{if(e)return t?Bn.drop:Bn.combining};function _o(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:n,combineWith:r,dropping:o}=e,i=Boolean(r),a=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),s=Boolean(o),l=s?jn(n,i):Fn(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Mo(a,o),transform:l,opacity:Go(i,s),zIndex:s?Lo:To,pointerEvents:"none"}}(e):{transform:Fn((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}function Fo(e){const t=zr("draggable"),{descriptor:n,registry:r,getDraggableRef:i,canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l}=e,c=ke((()=>({canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l})),[a,l,s]),d=We((e=>{const t=i();return t||Be(),function(e,t,n=$e){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=we(o,r),a=De(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(n,t,e)}),[n,i]),u=ke((()=>({uniqueId:t,descriptor:n,options:c,getDimension:d})),[n,d,c,t]),p=(0,o.useRef)(u),f=(0,o.useRef)(!0);Lr((()=>(r.draggable.register(p.current),()=>r.draggable.unregister(p.current))),[r.draggable]),Lr((()=>{if(f.current)return void(f.current=!1);const e=p.current;p.current=u,r.draggable.update(u,e)}),[u,r.draggable])}var jo=i().createContext(null);function ko(e){const t=(0,o.useContext)(e);return t||Be(),t}function Wo(e){e.preventDefault()}var $o=(e,t)=>e===t,Uo=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function Ho(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const qo={mapped:{type:"SECONDARY",offset:$e,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ho(null)}};const Vo=pe((()=>{const e=function(){const e=nt(((e,t)=>({x:e,y:t}))),t=nt(((e,t,n=null,r=null,o=null)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}))),n=nt(((e,n,r,o,i=null,a=null,s=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,o,i,a,null)}})));return(r,o)=>{if(Zr(r)){if(r.critical.draggable.id!==o.draggableId)return null;const t=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=zt(r.impact),l=(i=r.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(t.x,t.y),r.movementMode,a,o.isClone,s,l,c)}var i;if("DROP_ANIMATING"===r.phase){const e=r.completed;if(e.result.draggableId!==o.draggableId)return null;const n=o.isClone,i=r.dimensions.draggables[o.draggableId],a=e.result,s=a.mode,l=Uo(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:r.dropDuration,curve:Nn,moveTo:r.newHomeClientOffset,opacity:c?Bn.drop:null,scale:c?Tn.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:i,dropping:d,draggingOver:l,combineWith:c,mode:s,forceShouldAnimate:null,snapshot:t(s,n,l,c,d)}}}return null}}(),t=function(){const e=nt(((e,t)=>({x:e,y:t}))),t=nt(Ho),n=nt(((e,n=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}))),r=e=>e?n($e,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=ct(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return r(d);if(i.displaced.invisible[t])return null;const o=Ve(a.displacedBy.point),s=e(o.x,o.y);return n(s,d,!0)}if(l)return r(d);const u=i.displacedBy.point,p=e(u.x,u.y);return n(p,d,s.shouldAnimate)};return(e,t)=>{if(Zr(e))return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){const n=e.completed;return n.result.draggableId===t.draggableId?null:o(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return(n,r)=>e(n,r)||t(n,r)||qo}),{dropAnimationFinished:An},null,{context:Ur,areStatePropsEqual:$o})((e=>{const t=(0,o.useRef)(null),n=We(((e=null)=>{t.current=e}),[]),r=We((()=>t.current),[]),{contextId:s,dragHandleUsageInstructionsId:l,registry:c}=ko(Yr),{type:d,droppableId:u}=ko(jo),p=ke((()=>({id:e.draggableId,index:e.index,type:d,droppableId:u})),[e.draggableId,e.index,d,u]),{children:f,draggableId:g,isEnabled:m,shouldRespectForcePress:b,canDragInteractiveElements:h,isClone:v,mapped:y,dropAnimationFinished:x}=e;if(Jr(),Xr(),!v){Fo(ke((()=>({descriptor:p,registry:c,getDraggableRef:r,canDragInteractiveElements:h,shouldRespectForcePress:b,isEnabled:m})),[p,c,r,h,b,m]))}const I=ke((()=>m?{tabIndex:0,role:"button","aria-describedby":l,"data-rfd-drag-handle-draggable-id":g,"data-rfd-drag-handle-context-id":s,draggable:!1,onDragStart:Wo}:null),[s,l,g,m]),D=We((e=>{"DRAGGING"===y.type&&y.dropping&&"transform"===e.propertyName&&(0,a.flushSync)(x)}),[x,y]),w=ke((()=>{const e=_o(y),t="DRAGGING"===y.type&&y.dropping?D:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":s,"data-rfd-draggable-id":g,style:e,onTransitionEnd:t},dragHandleProps:I}}),[s,I,g,y,D,n]),E=ke((()=>({draggableId:p.id,type:p.type,source:{index:p.index,droppableId:p.droppableId}})),[p.droppableId,p.id,p.index,p.type]);return i().createElement(i().Fragment,null,f(w,y.snapshot,E))}));function zo(e){return ko(jo).isUsingCloneFor!==e.draggableId||e.isClone?i().createElement(Vo,e):null}function Yo(e){const t="boolean"!==typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return i().createElement(zo,Oe({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const Xo=e=>t=>e===t,Jo=Xo("scroll"),Ko=Xo("auto"),Qo=(Xo("visible"),(e,t)=>t(e.overflowX)||t(e.overflowY)),Zo=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Qo(n,Jo)||Qo(n,Ko)})(e)?e:Zo(e.parentElement);var ei=e=>({x:e.scrollLeft,y:e.scrollTop});const ti=e=>{if(!e)return!1;return"fixed"===window.getComputedStyle(e).position||ti(e.parentElement)};var ni=({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=n.closestScrollable,c=((e,t)=>{const n=Ee(e);if(!t)return n;if(e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,s=be({top:r,right:a,bottom:i,left:o},n.border);return ye({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})})(e,l),d=De(c,r),u=(()=>{if(!l)return null;const e=Ee(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:De(e,r),scroll:ei(l),scrollSize:t,shouldClipSubject:s}})(),p=(({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:e,client:t}=s,n=or({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:n,diff:{value:$e,displacement:$e}}}})(),c="vertical"===o?vt:yt;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:et({page:a,withPlaceholder:null,axis:c,frame:l})}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:n.isFixedOnPage,direction:o,client:c,page:d,closest:u});return p};const ri={passive:!1},oi={passive:!0};var ii=e=>e.shouldPublishImmediately?ri:oi;const ai=e=>e&&e.env.closestScrollable||null;function si(e){const t=(0,o.useRef)(null),n=ko(Yr),r=zr("droppable"),{registry:i,marshal:a}=n,s=Qr(e),l=ke((()=>({id:e.droppableId,type:e.type,mode:e.mode})),[e.droppableId,e.mode,e.type]),c=(0,o.useRef)(l),d=ke((()=>nt(((e,n)=>{t.current||Be();const r={x:e,y:n};a.updateDroppableScroll(l.id,r)}))),[l.id,a]),u=We((()=>{const e=t.current;return e&&e.env.closestScrollable?ei(e.env.closestScrollable):$e}),[]),p=We((()=>{const e=u();d(e.x,e.y)}),[u,d]),f=ke((()=>Se(p)),[p]),g=We((()=>{const e=t.current,n=ai(e);e&&n||Be();e.scrollOptions.shouldPublishImmediately?p():f()}),[f,p]),m=We(((e,r)=>{t.current&&Be();const o=s.current,i=o.getDroppableRef();i||Be();const a=(e=>({closestScrollable:Zo(e),isFixedOnPage:ti(e)}))(i),c={ref:i,descriptor:l,env:a,scrollOptions:r};t.current=c;const d=ni({ref:i,descriptor:l,env:a,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),u=a.closestScrollable;return u&&(u.setAttribute(Br.contextId,n.contextId),u.addEventListener("scroll",g,ii(c.scrollOptions))),d}),[n.contextId,l,g,s]),b=We((()=>{const e=t.current,n=ai(e);return e&&n||Be(),ei(n)}),[]),h=We((()=>{const e=t.current;e||Be();const n=ai(e);t.current=null,n&&(f.cancel(),n.removeAttribute(Br.contextId),n.removeEventListener("scroll",g,ii(e.scrollOptions)))}),[g,f]),v=We((e=>{const n=t.current;n||Be();const r=ai(n);r||Be(),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),y=ke((()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:b,dragStopped:h,scroll:v})),[h,m,b,v]),x=ke((()=>({uniqueId:r,descriptor:l,callbacks:y})),[y,l,r]);Lr((()=>(c.current=x.descriptor,i.droppable.register(x),()=>{t.current&&h(),i.droppable.unregister(x)})),[y,l,h,x,a,i.droppable]),Lr((()=>{t.current&&a.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)}),[e.isDropDisabled,a]),Lr((()=>{t.current&&a.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,a])}function li(){}const ci={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},di=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||"close"===n?ci:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==n?Gn.placeholder:null}};var ui=i().memo((e=>{const t=(0,o.useRef)(null),n=We((()=>{t.current&&(clearTimeout(t.current),t.current=null)}),[]),{animate:r,onTransitionEnd:a,onClose:s,contextId:l}=e,[c,d]=(0,o.useState)("open"===e.animate);(0,o.useEffect)((()=>c?"open"!==r?(n(),d(!1),li):t.current?li:(t.current=setTimeout((()=>{t.current=null,d(!1)})),n):li),[r,c,n]);const u=We((e=>{"height"===e.propertyName&&(a(),"close"===r&&s())}),[r,s,a]),p=di({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return i().createElement(e.placeholder.tagName,{style:p,"data-rfd-placeholder-context-id":l,onTransitionEnd:u,ref:e.innerRef})}));class pi extends i().PureComponent{constructor(...e){super(...e),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}const fi={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||Be(),document.body}},gi=e=>{let t,n={...e};for(t in fi)void 0===e[t]&&(n={...n,[t]:fi[t]});return n},mi=(e,t)=>e===t.droppable.type,bi=(e,t)=>t.draggables[e.draggable.id],hi=pe((()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=nt((e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}))),r=nt(((r,o,i,a,s,l)=>{const c=s.descriptor.id;if(s.descriptor.droppableId===r){const e=l?{render:l,dragging:n(s.descriptor)}:null,t={isDraggingOver:i,draggingOverWith:i?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:t,useClone:e}}if(!o)return t;if(!a)return e;const d={isDraggingOver:i,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:d,useClone:null}}));return(n,o)=>{const i=gi(o),a=i.droppableId,s=i.type,l=!i.isDropDisabled,c=i.renderClone;if(Zr(n)){const e=n.critical;if(!mi(s,e))return t;const o=bi(e,n.dimensions),i=zt(n.impact)===a;return r(a,l,i,i,o,c)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!mi(s,e.critical))return t;const o=bi(e.critical,n.dimensions);return r(a,l,Uo(e.result)===a,zt(e.impact)===a,o,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!mi(s,r.critical))return t;const o=zt(r.impact)===a,i=Boolean(r.impact.at&&"COMBINE"===r.impact.at.type),l=r.critical.droppable.id===a;return o?i?e:t:l?e:t}return t}}),{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},((e,t,n)=>({...gi(n),...e,...t})),{context:Ur,areStatePropsEqual:$o})((e=>{const t=(0,o.useContext)(Yr);t||Be();const{contextId:n,isMovementAllowed:r}=t,a=(0,o.useRef)(null),l=(0,o.useRef)(null),{children:c,droppableId:d,type:u,mode:p,direction:f,ignoreContainerClipping:g,isDropDisabled:m,isCombineEnabled:b,snapshot:h,useClone:v,updateViewportMaxScroll:y,getContainerForClone:x}=e,I=We((()=>a.current),[]),D=We(((e=null)=>{a.current=e}),[]),w=(We((()=>l.current),[]),We(((e=null)=>{l.current=e}),[]));Jr();const E=We((()=>{r()&&y({maxScroll:ar()})}),[r,y]);si({droppableId:d,type:u,mode:p,direction:f,isDropDisabled:m,isCombineEnabled:b,ignoreContainerClipping:g,getDroppableRef:I});const S=ke((()=>i().createElement(pi,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(({onClose:e,data:t,animate:r})=>i().createElement(ui,{placeholder:t,onClose:e,innerRef:w,animate:r,contextId:n,onTransitionEnd:E})))),[n,E,e.placeholder,e.shouldAnimatePlaceholder,w]),O=ke((()=>({innerRef:D,placeholder:S,droppableProps:{"data-rfd-droppable-id":d,"data-rfd-droppable-context-id":n}})),[n,d,S,D]),R=v?v.dragging.draggableId:null,P=ke((()=>({droppableId:d,type:u,isUsingCloneFor:R})),[d,R,u]);return i().createElement(jo.Provider,{value:P},c(O,h),function(){if(!v)return null;const{dragging:e,render:t}=v,n=i().createElement(zo,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},((n,r)=>t(n,r,e)));return s().createPortal(n,x())}())}));var vi=window.wp.apiFetch,yi=n.n(vi),xi=window.wp.i18n;window.wp.hooks;const Ii=(e,t)=>{let n=null;return function(...r){const o=this;window.clearTimeout(n),n=window.setTimeout((()=>{e.apply(o,r)}),t)}},Di=(e,t)=>e.map((e=>e[t]));function wi(){return wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wi.apply(null,arguments)}yi().use(yi().createRootURLMiddleware(window.epOrdering.restApiRoot));class Ei extends r.Component{titleInput=null;publishButton=null;debouncedDefaultResults=Ii((()=>{this.getDefaultResults()}),200);doSearch=Ii((()=>{const{searchText:e,searchResults:t}=this.state,n=e;t[n]=!1,this.setState({searchResults:t}),yi()({path:`/elasticpress/v1/pointer_search?s=${n}`}).then((e=>{t[n]=e,this.setState({searchResults:t})}))}),200);debouncedHandleTitleChange=Ii((()=>{this.handleTitleChange()}),200);constructor(e){super(e),this.titleInput=document.getElementById("title"),this.publishButton=document.getElementById("publish"),this.state={pointers:window.epOrdering.pointers,posts:window.epOrdering.posts,title:this.titleInput.value,defaultResults:{},searchText:"",searchResults:{},removedPointers:[]}}componentDidMount(){this.titleInput.addEventListener("keyup",this.debouncedHandleTitleChange);const{title:e}=this.state;e?.length>0&&this.getDefaultResults(),this.updatePublishButtonState()}componentDidUpdate(){this.updatePublishButtonState()}componentWillUnmount(){this.titleInput.removeEventListener("keyup",this.debouncedHandleTitleChange)}updatePublishButtonState=()=>{const{title:e,defaultResults:t}=this.state,n=0===e.length||!t[e];this.publishButton.disabled=n};handleTitleChange=()=>{this.setState({title:this.titleInput.value}),this.debouncedDefaultResults()};getDefaultResults=()=>{const{title:e}=this.state;yi()({path:`/elasticpress/v1/pointer_preview?s=${e}`}).then((t=>{const{defaultResults:n}=this.state;n[e]=t,this.setState({defaultResults:n})}))};removePointer=e=>{let{pointers:t}=this.state;const{removedPointers:n}=this.state;delete t[t.indexOf(e)],t=t.filter((e=>null!==e)),n.push(e.ID),this.setState({pointers:t})};getMergedPosts=()=>{let{pointers:e}=this.state;const{title:t,defaultResults:n}=this.state;let r=n[t].slice();e=e.sort(((e,t)=>e.order>t.order?1:-1));const o=Di(e,"ID");return r=r.filter((e=>-1===o.indexOf(e.ID))),e.forEach((e=>{r.splice(parseInt(e.order,10)-1,0,e)})),r};getNextAvailablePosition=()=>{const{pointers:e}=this.state,t={};for(let e=1;e<=window.epOrdering.postsPerPage;e++)t[e]=!0;e.forEach((e=>{delete t[e.order]}));const n=Object.keys(t);return 0!==n.length&&parseInt(n[0],10)};addPointer=e=>{const t=e.ID,{posts:n,pointers:r}=this.state;n[t]||(n[t]=e,this.setState({posts:n}));const o=this.getNextAvailablePosition();o?(r.push({ID:t,order:o,type:"custom-result"}),this.setState({pointers:r})):window.alert((0,xi.__)("You have added the maximum number of custom results.","elasticpress"))};onDragComplete=e=>{if(!e.destination)return;const t=this.getMergedPosts(),n=parseInt(window.epOrdering.postsPerPage,10),r=e.source.index>=n?e.source.index-1:e.source.index,o=e.destination.index>n?e.destination.index-1:e.destination.index,[i]=t.splice(r,1);t.splice(o,0,i);const a=[];t.forEach(((t,n)=>{(t.order||Number(t.ID)===Number(e.draggableId))&&a.push({ID:t.ID,order:n+1,type:t?.type||"reordered"})})),this.setState({pointers:a})};searchResults=e=>{const{searchText:t}=this.state;return""===t?null:!1===e?React.createElement("div",{className:"loading"},React.createElement("div",{className:"spinner is-active"}),"Loading..."):0===e.length?React.createElement("div",{className:"no-results"},(0,xi.__)("No results found.","elasticpress")):e.map((e=>React.createElement("div",{className:"pointer-result",key:e.ID},React.createElement("span",{className:"title"},e.post_title),React.createElement("span",{role:"button",tabIndex:"0",className:"dashicons dashicons-plus add-pointer",onClick:t=>{t.preventDefault(),this.addPointer(e)},onKeyDown:t=>{t.preventDefault(),this.addPointer(e)}},React.createElement("span",{className:"screen-reader-text"},(0,xi.__)("Add Post","elasticpress"))))))};render(){const{posts:e,defaultResults:t,title:n,pointers:o,removedPointers:i,searchText:a,searchResults:s}=this.state;if(0===n.length)return React.createElement("div",{className:"new-post"},React.createElement("p",null,(0,xi.__)("Enter your search query above to preview the results.","elasticpress")));if(!t[n])return React.createElement("div",{className:"loading"},React.createElement("div",{className:"spinner is-active"}),React.createElement("span",null,(0,xi.__)("Loading Result Preview…","elasticpress")));const l={};t[n].forEach((e=>{l[e.ID]=e}));const c=this.getMergedPosts(),d=Di(o,"ID"),u=!!s[a]&&s[a].filter((e=>-1===d.indexOf(e.ID)));return React.createElement("div",null,React.createElement("input",{type:"hidden",name:"search-ordering-nonce",value:window.epOrdering.nonce}),React.createElement("input",{type:"hidden",name:"ordered_posts",value:JSON.stringify(o)}),React.createElement(Bo,{onDragEnd:this.onDragComplete},React.createElement(hi,{droppableId:"droppable"},(t=>React.createElement("div",wi({className:"pointers"},t.droppableProps,{ref:t.innerRef}),c.map(((t,n)=>{const o=parseInt(window.epOrdering.postsPerPage,10)<=n?n+1:n,a=i.includes(t.ID);let{title:s}=t;void 0===s&&(s=void 0!==e[t.ID]?e[t.ID].post_title:l[t.ID].post_title);const c=t?.type||"reordered",d="reordered"===c?(0,xi.__)("Return to original position","elasticpress"):(0,xi.__)("Remove custom result from results list","elasticpress");return React.createElement(r.Fragment,{key:t.ID},parseInt(window.epOrdering.postsPerPage,10)===n&&React.createElement(Yo,{key:"divider",draggableId:"divider",index:n,isDragDisabled:!1},(e=>React.createElement("div",wi({className:`next-page-notice ${n}`,ref:e.innerRef},e.draggableProps,e.dragHandleProps),React.createElement("span",null,(0,xi.__)("The following posts have been displaced to the next page of search results.","elasticpress"))))),React.createElement(Yo,{key:t.ID,draggableId:String(t.ID),index:o},(e=>React.createElement("div",wi({className:`pointer ${o} ${a?"removed":""}`,ref:e.innerRef},e.draggableProps),t.order&&"reordered"===c&&React.createElement("span",{className:"pointer-type"},"RD"),t.order&&"reordered"!==c&&React.createElement("span",{className:"pointer-type"},"CR"),React.createElement("strong",{className:"title"},s),React.createElement("div",{className:"pointer-actions"},t.order&&React.createElement("span",{role:"button",tabIndex:"0",title:d,className:"dashicons dashicons-undo delete-pointer",onClick:e=>{e.preventDefault(),this.removePointer(t)},onKeyDown:e=>{e.preventDefault(),this.removePointer(t)}},React.createElement("span",{className:"screen-reader-text"},"Remove Post")),React.createElement("span",wi({className:"dashicons dashicons-menu handle"},e.dragHandleProps,{title:(0,xi.__)("Drag post up or down to reposition","elasticpress")})))))))})),t.placeholder)))),React.createElement("div",{className:"legend"},React.createElement("div",{className:"legend-item"},React.createElement("span",{className:"pointer-type"},"CR"),React.createElement("span",{className:"type-description"},(0,xi.__)("Custom Result (manually added to list)","elasticpress"))),React.createElement("div",{className:"legend-item"},React.createElement("span",{className:"pointer-type"},"RD"),React.createElement("span",{className:"type-description"},(0,xi.__)("Reordered Default (originally in results, but repositioned)","elasticpress")))),React.createElement("div",{className:"pointer-search"},React.createElement("h2",{className:"section-title"},(0,xi.__)("Add to results","elasticpress")),React.createElement("div",{className:"search-wrapper"},React.createElement("div",{className:"input-wrap"},React.createElement("input",{type:"text",className:"widefat search-pointers",placeholder:"Search for Post",value:a,onChange:e=>{this.setState({searchText:e.target.value}),this.doSearch()}})),React.createElement("div",{className:"pointer-results"},this.searchResults(u)))))}}const Si=document.getElementById("ordering-app");if("function"===typeof r.createRoot){(0,r.createRoot)(Si).render(React.createElement(Ei,null))}else(0,r.render)(React.createElement(Ei,null),Si)}();