@pie-element/rubric 8.2.1 → 8.2.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -43
- package/configure/CHANGELOG.md +25 -38
- package/configure/package.json +5 -5
- package/controller/CHANGELOG.md +39 -3
- package/controller/package.json +1 -1
- package/module/configure.js +1 -1
- package/module/element.js +1 -1
- package/module/index.html +1 -1
- package/module/manifest.json +3 -3
- package/module/print.html +1 -1
- package/module/print.js +1 -1
- package/package.json +3 -3
package/module/configure.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_dll_react as e,_dll_react_dom as t,_dll_mui__material as n,_dll_mui__icons_material as r,_dll_prop_types as o,_dll_mui__material_styles as i,_dll_debug as a,_dll_mui__material_colors as s,_dll_react_dom_client as l}from"../../../@pie-lib/shared-module@6.0.0/module/index.js";import{_dll_pie_lib__config_ui as c}from"../../../@pie-lib/config-module@5.0.0/module/index.js";import{_dll_pie_lib__editable_html_tip_tap as d}from"../../../@pie-lib/editable-html-module@8.0.0/module/index.js";function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p,g={},f={exports:{}};(p=f).exports=function(e){return e&&e.__esModule?e:{default:e}},p.exports.__esModule=!0,p.exports.default=p.exports,u(f.exports);var m={exports:{}},b={exports:{}},h={exports:{}};!function(e){function t(n){return e.exports=t="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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(h),u(h.exports);var v={exports:{}};!function(e){var t=h.exports.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(v),u(v.exports),function(e){var t=h.exports.default,n=v.exports;e.exports=function(e){var r=n(e,"string");return"symbol"==t(r)?r:r+""},e.exports.__esModule=!0,e.exports.default=e.exports}(b),u(b.exports),function(e){var t=b.exports;e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(m),u(m.exports);var y={};Object.defineProperty(y,"__esModule",{value:!0});class x extends CustomEvent{constructor(e,t=!1){super(x.TYPE,{bubbles:!0,detail:{update:e,reset:t}}),this.update=e,this.reset=t}}x.TYPE="model.updated",y.ModelUpdatedEvent=x;class I extends CustomEvent{constructor(e,t){super(I.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}I.TYPE="delete.image",y.DeleteImageEvent=I;class E extends CustomEvent{constructor(e){super(E.TYPE,{bubbles:!0,detail:e}),this.handler=e}}E.TYPE="insert.image",y.InsertImageEvent=E;class D extends CustomEvent{constructor(e,t){super(D.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}D.TYPE="delete.sound",y.DeleteSoundEvent=D;class w extends CustomEvent{constructor(e){super(w.TYPE,{bubbles:!0,detail:e}),this.handler=e}}w.TYPE="insert.sound",y.InsertSoundEvent=w;var C={},S="object"==typeof global&&global&&global.Object===Object&&global,A="object"==typeof self&&self&&self.Object===Object&&self,P=(S||A||Function("return this")()).Symbol,O=Object.prototype,_=O.hasOwnProperty,N=O.toString,R=P?P.toStringTag:void 0,B=Object.prototype.toString,T=P?P.toStringTag:void 0;function M(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":T&&T in Object(e)?function(e){var t=_.call(e,R),n=e[R];try{e[R]=void 0;var r=!0}catch(e){}var o=N.call(e);return r&&(t?e[R]=n:delete e[R]),o}(e):function(e){return B.call(e)}(e)}var L=/\s/,G=/^\s+/;function F(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var j=/^[-+]0x[0-9a-f]+$/i,k=/^0b[01]+$/i,$=/^0o[0-7]+$/i,W=parseInt;function U(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==M(e)}(e))return NaN;if(F(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=F(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&L.test(e.charAt(t)););return t}(e)+1).replace(G,""):e}(e);var n=k.test(e);return n||$.test(e)?W(e.slice(2),n?2:8):j.test(e)?NaN:+e}var H=1/0;function q(e){return e?(e=U(e))===H||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function V(e){var t=q(e),n=t%1;return t==t?n?t-n:t:0}function z(e){return e}var Y=/^(?:0|[1-9]\d*)$/;function Z(e,t,n){if(!F(n))return!1;var r=typeof t;return!!("number"==r?function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){if(!F(e))return!1;var t=M(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)}(n)&&function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Y.test(e))&&e>-1&&e%1==0&&e<t}(t,n.length):"string"==r&&t in n)&&function(e,t){return e===t||e!=e&&t!=t}(n[t],e)}var J=Math.ceil,X=Math.max,K=function(e,t,n){return n&&"number"!=typeof n&&Z(e,t,n)&&(t=n=void 0),e=q(e),void 0===t?(t=e,e=0):t=q(t),function(e,t,n){for(var r=-1,o=X(J((t-e)/(n||1)),0),i=Array(o);o--;)i[++r]=e,e+=n;return i}(e,t,n=void 0===n?e<t?1:-1:q(n))};function Q(e,t,n){var r=null==e?0:e.length;return r?function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,(t=r-(t=n||void 0===t?1:V(t)))<0?0:t,r):[]}var ee=4294967295,te=Math.min;function ne(e,t){if((e=V(e))<1||e>9007199254740991)return[];var n,r=ee,o=te(e,ee);e-=ee;for(var i=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(o,t="function"==typeof(n=t)?n:z);++r<e;)t(r);return i}function re(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 oe="function"==typeof Symbol&&Symbol.observable||"@@observable",ie=()=>Math.random().toString(36).substring(7).split("").join("."),ae={INIT:`@@redux/INIT${ie()}`,REPLACE:`@@redux/REPLACE${ie()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ie()}`};function se(e,t,n){if("function"!=typeof e)throw new Error(re(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(re(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(re(1));return n(se)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((e,t)=>{a.set(t,e)}))}function d(){if(l)throw new Error(re(3));return o}function u(e){if("function"!=typeof e)throw new Error(re(4));if(l)throw new Error(re(5));let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error(re(6));t=!1,c(),a.delete(n),i=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(re(7));if(void 0===e.type)throw new Error(re(8));if("string"!=typeof e.type)throw new Error(re(17));if(l)throw new Error(re(9));try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}return p({type:ae.INIT}),{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(re(10));r=e,p({type:ae.REPLACE})},[oe]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(re(11));function n(){const e=t;e.next&&e.next(d())}return n(),{unsubscribe:e(n)}},[oe](){return this}}}}}function le(e,t){return function(...n){return t(e.apply(this,n))}}function ce(e,t){if("function"==typeof e)return le(e,t);if("object"!=typeof e||null===e)throw new Error(re(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=le(o,t))}return n}function de(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}var ue={exports:{}},pe={},ge=e,fe="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},me=ge.useSyncExternalStore,be=ge.useRef,he=ge.useEffect,ve=ge.useMemo,ye=ge.useDebugValue;pe.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=be(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=ve(function(){function e(e){if(!l){if(l=!0,i=e,e=r(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return s=t}return s=e}if(t=s,fe(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(i=e,t):(i=e,s=n)}var i,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,o]);var s=me(e,i[0],i[1]);return he(function(){a.hasValue=!0,a.value=s},[s]),ye(s),s},ue.exports=pe;const xe=e;var Ie=xe.version.startsWith("19"),Ee=Symbol.for(Ie?"react.transitional.element":"react.element"),De=Symbol.for("react.portal"),we=Symbol.for("react.fragment"),Ce=Symbol.for("react.strict_mode"),Se=Symbol.for("react.profiler"),Ae=Symbol.for("react.consumer"),Pe=Symbol.for("react.context"),Oe=Symbol.for("react.forward_ref"),_e=Symbol.for("react.suspense"),Ne=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),Be=Symbol.for("react.lazy"),Te=Oe,Me=Re;function Le(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function Ge(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Fe(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=Ge(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=Ge(o),o=r(t,n)),o},r}}function je(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function ke(e,t,n){return{...n,...e,...t}}var $e={notify(){},get:()=>[]};function We(e,t){let n,r=$e,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(){(()=>{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=$e)}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 Ue=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),He="undefined"!=typeof navigator&&"ReactNative"===navigator.product,qe=Ue||He?xe.useLayoutEffect:xe.useEffect;function Ve(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function ze(e,t){if(Ve(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])||!Ve(e[n[r]],t[n[r]]))return!1;return!0}var Ye={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ze={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Je={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Xe={[Te]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Me]:Je};function Ke(e){return function(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case Ee:switch(e=e.type){case we:case Se:case Ce:case _e:case Ne:return e;default:switch(e=e&&e.$$typeof){case Pe:case Oe:case Be:case Re:case Ae:return e;default:return t}}case De:return t}}}(e)===Re}(e)?Je:Xe[e.$$typeof]||Ye}var Qe=Object.defineProperty,et=Object.getOwnPropertyNames,tt=Object.getOwnPropertySymbols,nt=Object.getOwnPropertyDescriptor,rt=Object.getPrototypeOf,ot=Object.prototype;function it(e,t){if("string"!=typeof t){if(ot){const n=rt(t);n&&n!==ot&&it(e,n)}let n=et(t);tt&&(n=n.concat(tt(t)));const r=Ke(e),o=Ke(t);for(let i=0;i<n.length;++i){const a=n[i];if(!(Ze[a]||o&&o[a]||r&&r[a])){const n=nt(t,a);try{Qe(e,a,n)}catch(e){}}}}return e}var at=Symbol.for("react-redux-context"),st="undefined"!=typeof globalThis?globalThis:{},lt=function(){if(!xe.createContext)return{};const e=st[at]??=new Map;let t=e.get(xe.createContext);return t||(t=xe.createContext(null),e.set(xe.createContext,t)),t}(),ct=[null,null];function dt(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function ut(e,t){return e===t}var pt=function(e,t,n,{pure:r,areStatesEqual:o=ut,areOwnPropsEqual:i=ze,areStatePropsEqual:a=ze,areMergedPropsEqual:s=ze,forwardRef:l=!1,context:c=lt}={}){const d=c,u=function(e){return e?"function"==typeof e?Fe(e):je(e,"mapStateToProps"):Le(()=>({}))}(e),p=function(e){return e&&"object"==typeof e?Le(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?Fe(e):je(e,"mapDispatchToProps"):Le(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):je(e,"mergeProps"):()=>ke}(n),f=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:f,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:u,initMapDispatchToProps:p,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function c(t){const[n,o,i]=xe.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),a=xe.useMemo(()=>{let e=d;return function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}}([n,"optionalAccess",e=>e.Consumer]),e},[n,d]),s=xe.useContext(a),l=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),c=Boolean(s)&&Boolean(s.store),u=l?t.store:s.store,p=c?s.getServerState:u.getState,g=xe.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){return function(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,u,p=!1;function g(p,g){const f=!i(g,l),m=!o(p,s,g,l);return s=p,l=g,f&&m?(c=e(s,l),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):f?(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?g(o,i):(s=o,l=i,c=e(s,l),d=t(r,l),u=n(c,d,l),p=!0,u)}}(t(e,o),n(e,o),r(e,o),e,o)}(u.dispatch,r),[u]),[m,b]=xe.useMemo(()=>{if(!f)return ct;const e=We(u,l?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[u,l,s]),h=xe.useMemo(()=>l?s:{...s,subscription:m},[l,s,m]),v=xe.useRef(void 0),y=xe.useRef(i),x=xe.useRef(void 0),I=xe.useRef(!1),E=xe.useRef(!1),D=xe.useRef(void 0);qe(()=>(E.current=!0,()=>{E.current=!1}),[]);const w=xe.useMemo(()=>()=>x.current&&i===y.current?x.current:g(u.getState(),i),[u,i]),C=xe.useMemo(()=>e=>m?function(e,t,n,r,o,i,a,s,l,c,d){if(!e)return()=>{};let u=!1,p=null;const g=()=>{if(u||!s.current)return;const e=t.getState();let n,g;try{n=r(e,o.current)}catch(e){g=e,p=e}g||(p=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,d())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(f,u,m,g,y,v,I,E,x,b,e):()=>{},[m]);var S,A;let P;S=dt,A=[y,v,I,i,x,b],qe(()=>S(...A),undefined);try{P=xe.useSyncExternalStore(C,w,p?()=>g(p(),i):w)}catch(e){throw D.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${D.current.stack}\n\n`),e}qe(()=>{D.current=void 0,x.current=void 0,v.current=P});const O=xe.useMemo(()=>xe.createElement(e,{...P,ref:o}),[o,e,P]);return xe.useMemo(()=>f?xe.createElement(a.Provider,{value:h},O):O,[a,O,h])}const m=xe.memo(c);if(m.WrappedComponent=e,m.displayName=c.displayName=n,l){const t=xe.forwardRef(function(e,t){return xe.createElement(m,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,it(t,e)}return it(m,e)}},gt=function(e){const{children:t,context:n,serverState:r,store:o}=e,i=xe.useMemo(()=>{const e=We(o);return{store:o,subscription:e,getServerState:r?()=>r:void 0}},[o,r]),a=xe.useMemo(()=>o.getState(),[o]);qe(()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==o.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[i,a]);const s=n||lt;return xe.createElement(s.Provider,{value:i},t)};function ft(e=lt){return function(){return xe.useContext(e)}}var mt=ft();function bt(e=lt){const t=e===lt?mt:ft(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var ht=bt();!function(e=lt){const t=e===lt?ht:bt(e),n=()=>t().dispatch;Object.assign(n,{withTypes:()=>n})}();var vt=(e,t)=>e===t;!function(e=lt){const t=e===lt?mt:ft(e),n=(e,n={})=>{const{equalityFn:r=vt}="function"==typeof n?{equalityFn:n}:n,o=t(),{store:i,subscription:a,getServerState:s}=o;xe.useRef(!0);const l=xe.useCallback({[e.name]:t=>e(t)}[e.name],[e]),c=ue.exports.useSyncExternalStoreWithSelector(a.addNestedSub,i.getState,s||i.getState,l,r);return xe.useDebugValue(c),c};Object.assign(n,{withTypes:()=>n})}();var yt=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}}},xt=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},It=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Et={top:0,right:0,bottom:0,left:0},Dt=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?Et:n,o=e.border,i=void 0===o?Et:o,a=e.padding,s=void 0===a?Et:a,l=yt(xt(t,r)),c=yt(It(t,i)),d=yt(It(c,s));return{marginBox:l,borderBox:yt(t),paddingBox:c,contentBox:d,margin:r,border:i,padding:s}},wt=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(){throw new Error("Invariant failed")}(),n},Ct=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 Dt({borderBox:l,border:i,margin:a,padding:s})},St=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Ct(e,t)},At=function(e,t){var n={top:wt(t.marginTop),right:wt(t.marginRight),bottom:wt(t.marginBottom),left:wt(t.marginLeft)},r={top:wt(t.paddingTop),right:wt(t.paddingRight),bottom:wt(t.paddingBottom),left:wt(t.paddingLeft)},o={top:wt(t.borderTopWidth),right:wt(t.borderRightWidth),bottom:wt(t.borderBottomWidth),left:wt(t.borderLeftWidth)};return Dt({borderBox:e,margin:n,padding:r,border:o})},Pt=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return At(t,n)},Ot=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 _t(){return _t=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},_t.apply(null,arguments)}const Nt=e,{useState:Rt}=e,{useRef:Bt}=e,{useEffect:Tt}=e,{useLayoutEffect:Mt}=e,{useContext:Lt}=e,Gt=t,{flushSync:Ft}=t;function jt(e,t){}function kt(){}function $t(e,t,n){const r=t.map(t=>{const r=(o=n,i=t.options,{...o,...i});var o,i;return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}});return function(){r.forEach(e=>{e()})}}jt.bind(null,"warn"),jt.bind(null,"error");class Wt extends Error{}function Ut(e,t){throw new Wt("Invariant failed")}Wt.prototype.toString=function(){return this.message};class Ht extends Nt.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=kt,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof Wt&&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=$t(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof Wt))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const qt=e=>e+1,Vt=(e,t)=>{const n=e.droppableId===t.droppableId,r=qt(e.index),o=qt(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 `},zt=(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 `,Yt=e=>`\n The item has returned to its starting position\n of ${qt(e.index)}\n`,Zt="\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",Jt=e=>`\n You have lifted an item in position ${qt(e.source.index)}\n`,Xt=e=>{const t=e.destination;if(t)return Vt(e.source,t);const n=e.combine;return n?zt(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},Kt=e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${Yt(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${Vt(e.source,t)}\n `:n?`\n You have dropped the item.\n ${zt(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${Yt(e.source)}\n `};function Qt(e,t){return e===t||!(!Number.isNaN(e)||!Number.isNaN(t))}function en(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Qt(e[n],t[n]))return!1;return!0}function tn(e,t){const n=Rt(()=>({inputs:t,result:e()}))[0],r=Bt(!0),o=Bt(n),i=r.current||Boolean(t&&o.current.inputs&&en(t,o.current.inputs))?o.current:{inputs:t,result:e()};return Tt(()=>{r.current=!1,o.current=i},[i]),i.result}function nn(e,t){return tn(()=>e,t)}const rn={x:0,y:0},on=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),an=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),sn=(e,t)=>e.x===t.x&&e.y===t.y,ln=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),cn=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},dn=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),un=(e,t)=>Math.min(...t.map(t=>dn(e,t))),pn=e=>t=>({x:e(t.x),y:e(t.y)}),gn=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),fn=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}],mn=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=yt({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):yt(e);var bn=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=((e,t)=>t?gn(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:mn(i,r)}},hn=(e,t)=>{e.frame||Ut();const n=e.frame,r=an(t,n.scroll.initial),o=ln(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=bn({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function vn(e,t=en){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 yn=vn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),xn=vn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),In=vn(e=>Object.values(e)),En=vn(e=>Object.values(e));var Dn=vn((e,t)=>En(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index));function wn(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Cn(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Sn=vn((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),An=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Pn={point:rn,value:0},On={invisible:{},visible:{},all:[]},_n={displaced:On,displacedBy:Pn,at:null};var Nn=(e,t)=>n=>e<=n&&n<=t,Rn=e=>{const t=Nn(e.top,e.bottom),n=Nn(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;return!(!a||!s)||(a&&i||s&&o)}},Bn=e=>{const t=Nn(e.top,e.bottom),n=Nn(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const Tn={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Mn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Ln=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:rn;return gn(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)},Gn=e=>Ln({...e,isVisibleThroughFrameFn:Bn});function Fn({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 yt(xt(n,r))}(a,n),l=a.descriptor.id;var c;if(e.all.push(l),c={target:s,destination:t,viewport:r,withDroppableDisplacement:!0},!Ln({...c,isVisibleThroughFrameFn:Rn}))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 jn({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:On,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function kn({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=An(e,n);if(null==a)return jn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find(e=>e.descriptor.index===a);if(!c)return jn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const d=Sn(e,t),u=t.indexOf(c);return{displaced:Fn({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 $n(e,t){return Boolean(t.effected[e])}const Wn=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,Un=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,Hn=({axis:e,moveRelativeTo:t,isMoving:n})=>cn(e.line,t.marginBox[e.end]+Wn(e,n),Un(e,t.marginBox,n)),qn=({axis:e,moveRelativeTo:t,isMoving:n})=>cn(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),Un(e,t.marginBox,n));var Vn=(e,t)=>{const n=e.frame;return n?on(t,n.scroll.diff.displacement):t},zn=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?(({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=Dn(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>cn(e.line,t.contentBox[e.start]+Wn(e,n),Un(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($n(d,o))return qn({axis:s,moveRelativeTo:e.page,isMoving:a});const t=Ct(e.page,c.point);return qn({axis:s,moveRelativeTo:t,isMoving:a})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return a.borderBox.center;if($n(u.descriptor.id,o)){const e=Ct(u.page,ln(o.displacedBy.point));return Hn({axis:s,moveRelativeTo:e,isMoving:a})}return Hn({axis:s,moveRelativeTo:u.page,isMoving:a})})({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):(({afterCritical:e,impact:t,draggables:n})=>{const r=Cn(t);r||Ut();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 $n(n,t)?o?rn:ln(r.point):o?r.point:rn})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return on(i,a)})({impact:e,draggables:r,afterCritical:o}):i})(e),n=e.droppable;return n?Vn(n,t):t},Yn=(e,t)=>{const n=an(t,e.scroll.initial),r=ln(n);return{frame:yt({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 Zn(e,t){return e.map(e=>t[e])}var Jn=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=((e,t)=>on(e.scroll.diff.displacement,t))(n,e),o=an(r,t.page.borderBox.center);return on(t.client.borderBox.center,o)},Xn=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=an(n,e.page.borderBox.center),s={target:gn(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?(e=>{return Ln({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=Nn(e.top,e.bottom),r=Nn(e.left,e.right);return e=>t===Tn?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(s):Gn(s)},Kn=({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=Dn(n.descriptor.id,r),d=An(t,n),u=(({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled)return null;if(!wn(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=Sn(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&&Ut();const d=c-1;return d<0?null:i(l[d].descriptor.id)})({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||(({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||Ut(),"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:kn({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 $n(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:kn({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})})({isMovingForward:e,isInHomeList:d,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!u)return null;const p=zn({impact:u,draggable:t,droppable:n,draggables:r,afterCritical:l});if(Xn({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Jn({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:u,scrollJumpRequest:null};const g=an(p,a),f=(({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=Yn(t,on(t.scroll.current,o)),a=n.frame?hn(n,on(n.frame.scroll.current,o)):n,s=e.displaced,l=Fn({afterDragging:Zn(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=Fn({afterDragging:Zn(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:g});return{clientSelection:s,impact:f,scrollJumpRequest:g}};const Qn=e=>{const t=e.subject.active;return t||Ut(),t},er=(e,t)=>{const n=e.page.borderBox.center;return $n(e.descriptor.id,t)?an(n,t.displacedBy.point):n},tr=(e,t)=>{const n=e.page.borderBox;return $n(e.descriptor.id,t)?gn(n,ln(t.displacedBy.point)):n};var nr=vn(function(e,t){const n=t[e.line];return{value:n,point:cn(e.line,n)}});const rr=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),or=(e,t,n)=>{const r=e.frame;An(t,e)&&Ut(),e.subject.withPlaceholder&&Ut();const o=nr(e.axis,t.displaceBy).point,i=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return cn(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],i=Dn(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[r.size],0)+t[r.line]-o;return i<=0?null:cn(r.line,i)})(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=bn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?on(r.scroll.max,i):r.scroll.max,l=rr(r,s),c=bn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var ir=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},ar=({state:e,type:t})=>{const n=((e,t)=>{const n=ir(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?Kn({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,destination:i,draggables:u,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):(({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=Nn(i[a.start],i[a.end]),l=In(r).filter(e=>e!==n).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>Rn(o.frame)(Qn(e))).filter(t=>{const n=Qn(t);return e?i[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<i[a.crossAxisStart]}).filter(e=>{const t=Qn(e),n=Nn(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=Qn(t)[a.crossAxisStart],o=Qn(n)[a.crossAxisStart];return e?r-o:o-r}).filter((e,t,n)=>Qn(e)[a.crossAxisStart]===Qn(n[0])[a.crossAxisStart]);if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter(e=>Nn(Qn(e)[a.start],Qn(e)[a.end])(t[a.line]));return 1===c.length?c[0]:c.length>1?c.sort((e,t)=>Qn(e)[a.start]-Qn(t)[a.start])[0]:l.sort((e,n)=>{const r=un(t,fn(Qn(e))),o=un(t,fn(Qn(n)));return r!==o?r-o:Qn(e)[a.start]-Qn(n)[a.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=Dn(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>{const i=r.filter(e=>Gn({target:tr(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,r)=>{const i=dn(e,Vn(n,er(t,o))),a=dn(e,Vn(n,er(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:On,displacedBy:Pn,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=zn({impact:e,draggable:r,droppable:i,draggables:o,afterCritical:s}),l=An(r,i)?i:or(i,r,o);return Xn({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=nr(i.axis,r.displaceBy);return kn({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:d,last:On,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!u)return null;const p=zn({impact:u,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:Jn({pageBorderBoxCenter:p,draggable:n,viewport:a}),impact:u,scrollJumpRequest:null}})({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,isOver:i,draggables:u,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function sr(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function lr(e){const t=Nn(e.top,e.bottom),n=Nn(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}const cr=(e,t)=>yt(gn(e,t));function dr({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var ur=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=cr(t.page.borderBox,e),l=function({pageBorderBox:e,draggable:t,droppables:n}){const r=In(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(lr(n)(e.center))return!0;const i=t.axis,a=n.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=Nn(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=cn(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:dn(r,o)}}).sort((e,t)=>t.distance-e.distance);return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:r}):null}({pageBorderBox:s,draggable:t,droppables:r});if(!l)return _n;const c=r[l],d=Dn(c.descriptor.id,n),u=((e,t)=>{const n=e.frame;return n?cr(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=nr(r.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],u=Sn(e,o).find(e=>{const t=e.descriptor.id,r=e.page.borderBox,o=r[a.size]/4,s=$n(t,i),u=dr({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=nr(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:Sn(t,r).find(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=$n(t,a),i=dr({displaced:o,id:t});return r?i?u<=n:d<n-c:i?u<=n+c:d<n})||null,inHomeList:An(t,n)});return kn({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})},pr=(e,t)=>({...e,[t.descriptor.id]:t});var gr=({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=an(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:on(e.initial.client.borderBoxCenter,c)},u={selection:on(d.selection,a.scroll.current),borderBoxCenter:on(d.borderBoxCenter,a.scroll.current),offset:on(d.offset,a.scroll.diff.value)},p={client:d,page:u};if("COLLECTING"===e.phase)return{...e,dimensions:s,viewport:a,current:p};const g=s.draggables[e.critical.draggable.id],f=o||ur({pageOffset:u.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=(({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=(({previousImpact:e,impact:t,droppables:n})=>{const r=ir(e),o=ir(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||Ut();const n=e.frame;if(!n){const t=bn({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||Ut();const o=rr(n,r),i=bn({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return pr(n,a)})({previousImpact:r,impact:o,droppables:n}),a=ir(o);if(!a)return i;const s=n[a];if(An(e,s))return i;if(s.subject.withPlaceholder)return i;const l=or(s,e,t);return pr(i,l)})({draggable:g,impact:f,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:m},impact:f,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}},fr=({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=Fn({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},mr=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=zn({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return Jn({pageBorderBoxCenter:a,draggable:t,viewport:o})},br=({state:e,dimensions:t,viewport:n})=>{"SNAP"!==e.movementMode&&Ut();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=ir(r);c||Ut();const d=s[c],u=fr({impact:r,viewport:o,destination:d,draggables:a}),p=mr({impact:u,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return gr({impact:u,clientSelection:p,state:e,dimensions:i,viewport:o})},hr=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=nr(t.axis,e.displaceBy),i=Dn(t.descriptor.id,n),a=i.indexOf(e);-1===a&&Ut();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:Fn({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 vr=e=>"SNAP"===e.movementMode,yr=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:pr(e.droppables,t)}))(e.dimensions,t);return!vr(e)||n?gr({state:e,dimensions:r}):br({state:e,dimensions:r})};function xr(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const Ir={phase:"IDLE",completed:null,shouldFlush:!1};var Er=(e=Ir,t)=>{if("FLUSH"===t.type)return{...Ir,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&Ut();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:rn},d={client:c,page:{selection:on(c.selection,o.scroll.initial),borderBoxCenter:on(c.selection,o.scroll.initial),offset:on(c.selection,o.scroll.diff.value)}},u=In(i.droppables).every(e=>!e.isFixedOnPage),{impact:p,afterCritical:g}=hr({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:g,onLiftImpact:p,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&Ut(),{...e,phase:"COLLECTING"});if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&Ut(),(({state:e,published:t})=>{const n=t.modified.map(t=>{const n=e.dimensions.droppables[t.droppableId];return hn(n,t.scroll)}),r={...e.dimensions.droppables,...yn(n)},o=xn((({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||Ut(),t})(t[o]),a=i.scroll.diff.value,s=(({draggable:e,offset:t,initialWindowScroll:n})=>{const r=Ct(e.client,t),o=St(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}})({draggable:e,offset:on(r,a),initialWindowScroll:n.scroll.initial});return s})})({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=ir(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}=hr({draggable:c,home:d,draggables:i,viewport:e.viewport}),g=l&&l.isCombineEnabled?e.impact:u,f=ur({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:g,viewport:e.viewport,afterCritical:p}),m={...e,phase:"DRAGGING",impact:f,onLiftImpact:u,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?m:{...m,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;sr(e)||Ut();const{client:n}=t.payload;return sn(n,e.current.client.selection)?e:gr({state:e,clientSelection:n,impact:vr(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return xr(e);if("COLLECTING"===e.phase)return xr(e);sr(e)||Ut();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=hn(o,r);return yr(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;sr(e)||Ut();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Ut(),o.isEnabled===r&&Ut();const i={...o,isEnabled:r};return yr(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;sr(e)||Ut();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Ut(),o.isCombineEnabled===r&&Ut();const i={...o,isCombineEnabled:r};return yr(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;sr(e)||Ut(),e.isWindowScrollAllowed||Ut();const n=t.payload.newScroll;if(sn(e.viewport.scroll.current,n))return xr(e);const r=Yn(e.viewport,n);return vr(e)?br({state:e,viewport:r}):gr({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!sr(e))return e;const n=t.payload.maxScroll;if(sn(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&&Ut();const n=ar({state:e,type:t.type});return n?gr({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;return"COLLECTING"!==e.phase&&Ut(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&Ut(),{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 Dr(e,t){return e instanceof Object&&"type"in e&&e.type===t}const wr=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Cr=()=>({type:"COLLECTION_STARTING",payload:null}),Sr=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Ar=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Pr=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Or=e=>({type:"MOVE",payload:e}),_r=()=>({type:"MOVE_UP",payload:null}),Nr=()=>({type:"MOVE_DOWN",payload:null}),Rr=()=>({type:"MOVE_RIGHT",payload:null}),Br=()=>({type:"MOVE_LEFT",payload:null}),Tr=e=>({type:"DROP_COMPLETE",payload:e}),Mr=e=>({type:"DROP",payload:e}),Lr="cubic-bezier(.2,1,.1,1)",Gr=0,Fr=.7,jr=.75,kr={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},$r=`${kr.outOfTheWay}s cubic-bezier(0.2, 0, 0, 1)`,Wr={fluid:`opacity ${$r}`,snap:`transform ${$r}, opacity ${$r}`,drop:e=>{const t=`${e}s ${Lr}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${$r}`,placeholder:`height ${$r}, width ${$r}, margin ${$r}`},Ur=e=>sn(e,rn)?void 0:`translate(${e.x}px, ${e.y}px)`,Hr=Ur,{minDropTime:qr,maxDropTime:Vr}=kr,zr=Vr-qr,Yr=({getState:e,dispatch:t})=>n=>r=>{if(!Dr(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&&Ut(),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&Ut();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})=>n.at&&"DROP"===t?"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:On},didDropInsideDroppable:!0}:{impact:fr({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1})({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?wn(c):null,p=d?Cn(c):null,g={index:a.draggable.index,droppableId:a.droppable.id},f={draggableId:l.descriptor.id,type:l.descriptor.type,source:g,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=ir(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=mr({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return an(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:f,impact:c};if(sn(o.current.client.offset,m)&&!Boolean(f.combine))return void t(Tr({completed:b}));const h=(({current:e,destination:t,reason:n})=>{const r=dn(e,t);if(r<=0)return qr;if(r>=1500)return Vr;const o=qr+zr*(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 Zr=()=>({x:window.pageXOffset,y:window.pageYOffset});const Jr=e=>{const t=function({onWindowScroll:e}){const t=Ot(function(){e(Zr())}),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let r=kt;function o(){return r!==kt}return{start:function(){o()&&Ut(),r=$t(window,[n])},stop:function(){o()||Ut(),t.cancel(),r(),r=kt},isActive:o}}({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{!t.isActive()&&Dr(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>Dr(e,"DROP_COMPLETE")||Dr(e,"DROP_ANIMATE")||Dr(e,"FLUSH"))(n)&&t.stop(),e(n)}};const Xr=(e,t)=>{t()},Kr=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Qr(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 eo=(e,t)=>{const n=((e,t)=>{const n=(()=>{const e=[];return{add:t=>{const n=setTimeout(()=>(t=>{const n=e.findIndex(e=>e.timerId===t);-1===n&&Ut();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()})}}})();let r=null;const o=n=>{r||Ut(),r=null,Xr(0,()=>Qr(e().onDragEnd,n,t,Kt))};return{beforeCapture:(t,n)=>{r&&Ut(),Xr(0,()=>{const r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},beforeStart:(t,n)=>{r&&Ut(),Xr(0,()=>{const r=e().onBeforeDragStart;r&&r(Kr(t,n))})},start:(o,i)=>{r&&Ut();const a=Kr(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add(()=>{Xr(0,()=>Qr(e().onDragStart,a,t,Jt))})},update:(o,i)=>{const a=wn(i),s=Cn(i);r||Ut();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 g={...Kr(o,r.mode),combine:s,destination:a};n.add(()=>{Xr(0,()=>Qr(e().onDragUpdate,g,t,Xt))})},flush:()=>{r||Ut(),n.flush()},drop:o,abort:()=>{if(!r)return;const e={...Kr(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>r=>{if(Dr(r,"BEFORE_INITIAL_CAPTURE"))return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if(Dr(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(Dr(r,"DROP_COMPLETE")){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),Dr(r,"FLUSH"))return void n.abort();const o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}};const to=e=>t=>n=>{if(!Dr(n,"DROP_ANIMATION_FINISHED"))return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&Ut(),e.dispatch(Tr({completed:r.completed}))},no=e=>{let t=null,n=null;return r=>o=>{if((Dr(o,"FLUSH")||Dr(o,"DROP_COMPLETE")||Dr(o,"DROP_ANIMATION_FINISHED"))&&(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),!Dr(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=$t(window,[i])})}};const ro=e=>t=>n=>{if(t(n),!Dr(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Mr({reason:r.reason})))},oo=de;var io=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>{return se(Er,oo(function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(re(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=de(...s)(o.dispatch),{...o,dispatch:i}}}((a=n,()=>e=>t=>{Dr(t,"INITIAL_PUBLISH")&&a.dragging(),Dr(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(Dr(t,"FLUSH")||Dr(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>n=>{(Dr(n,"DROP_COMPLETE")||Dr(n,"FLUSH")||Dr(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>r=>o=>{if(!Dr(o,"LIFT"))return void r(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&n(Tr({completed:l.completed})),"IDLE"!==t().phase&&Ut(),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),Yr,to,no,ro,(e=>t=>n=>r=>{if((e=>Dr(e,"DROP_COMPLETE")||Dr(e,"DROP_ANIMATE")||Dr(e,"FLUSH"))(r))return e.stop(),void n(r);if(Dr(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();return"DRAGGING"!==o.phase&&Ut(),void e.start(o)}n(r),e.scroll(t.getState())})(i),Jr,(e=>{let t=!1;return()=>n=>r=>{if(Dr(r,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if(Dr(r,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(Dr(r,"DROP_COMPLETE")){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),eo(r,o))));var a},ao=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=an({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},so=()=>{const e=document.documentElement;return e||Ut(),e},lo=()=>{const e=so();return ao({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function co(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var uo=(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;const{additions:o,removals:i,modified:a}=n,s=Object.keys(o).map(t=>e.draggable.getById(t).getDimension(rn)).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:{}},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||Ut();const o=n.critical.draggable;"ADDITION"===t.type&&co(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&co(e,o,t.value)&&r.remove(t.value)},i={updateDroppableIsEnabled:(r,o)=>{e.droppable.exists(r)||Ut(),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:(r,o)=>{n&&(e.droppable.exists(r)||Ut(),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)||Ut(),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:t=>{n&&Ut();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},(({critical:e,scrollOptions:t,registry:n})=>{const r=(()=>{const e=Zr(),t=lo(),n=e.y,r=e.x,o=so(),i=o.clientWidth,a=o.clientHeight;return{frame:yt({top:n,left:r,right:r+i,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:rn,displacement:rn}}}})(),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));return{dimensions:{draggables:xn(s),droppables:yn(a)},critical:e,viewport:r}})({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},po=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason,go=e=>{window.scrollBy(e.x,e.y)};const fo=vn(e=>In(e).filter(e=>!!e.isEnabled&&!!e.frame));const mo={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var bo=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return 0===r?0:(n-e)/r},ho=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=((e,t,n=()=>mo)=>{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-bo({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=bo({startOfRange:o,endOfRange:s,current:l}),d=e*r.ease(c);return Math.ceil(d)})(i,n,o),1):i},vo=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,n=()=>mo)=>{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]?ho({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*ho({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const yo=pn(e=>0===e?0:e);var xo=({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=vo({container:t,distanceToEdges:a,dragStartTime:e,axis:Tn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=vo({container:t,distanceToEdges:a,dragStartTime:e,axis:Mn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=yo({x:l,y:s});if(sn(c,rn))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?sn(d,rn)?null:d:null};const Io=pn(e=>0===e?0:e>0?1:-1),Eo=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{const o=on(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return sn(i,rn)?null:i}})(),Do=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=Io(n),i=Eo({max:r,current:t,change:o});return!i||0!==o.x&&0===i.x||0!==o.y&&0===i.y},wo=(e,t)=>Do({current:e.scroll.current,max:e.scroll.max,change:t}),Co=(e,t)=>{const n=e.frame;return!!n&&Do({current:n.scroll.current,max:n.scroll.max,change:t})};var So=({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=xo({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&wo(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=(({center:e,destination:t,droppables:n})=>{if(t){const e=n[t];return e.frame?e:null}const r=((e,t)=>fo(t).find(t=>(t.frame||Ut(),lr(t.frame.pageMarginBox)(e)))||null)(e,n);return r})({center:a,destination:ir(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=xo({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Co(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)};const Ao="data-rfd",Po=(()=>{const e=`${Ao}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Oo=(()=>{const e=`${Ao}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),_o=(()=>{const e=`${Ao}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),No={contextId:`${Ao}-scroll-container-context-id`},Ro=(e,t)=>e.map(e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""}).join(" "),Bo="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?Mt:Tt,To=()=>{const e=document.querySelector("head");return e||Ut(),e},Mo=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Lo(e,t){return Array.from(e.querySelectorAll(t))}var Go=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Fo(e){return e instanceof Go(e).HTMLElement}function jo(){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||Ut(),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||Ut(),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 ko=Nt.createContext(null),$o=()=>{const e=document.body;return e||Ut(),e};const Wo={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Uo={separator:"::"};function Ho(e,t=Uo){const n=Nt.useId();return tn(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}var qo=Nt.createContext(null);function Vo(e){const t=Bt(e);return Tt(()=>{t.current=e}),t}function zo(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const Yo=9,Zo=13,Jo=33,Xo=34,Ko=35,Qo=36,ei={[Zo]:!0,[Yo]:!0};var ti=e=>{ei[e.keyCode]&&e.preventDefault()};const ni=(()=>{const e="visibilitychange";return"undefined"==typeof document?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})(),ri={type:"IDLE"};function oi(){}const ii={[Xo]:!0,[Jo]:!0,[Qo]:!0,[Ko]:!0};const ai={type:"IDLE"},si=["input","button","textarea","select","option","optgroup","video","audio"];function li(e,t){if(null==t)return!1;if(si.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&li(e,t.parentElement)}function ci(e,t){const n=t.target;return!!Fo(n)&&li(e,n)}var di=e=>yt(e.getBoundingClientRect()).center;const ui=(()=>{const e="matches";return"undefined"==typeof document?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function pi(e,t){return null==e?null:e[ui](t)?e:pi(e.parentElement,t)}function gi(e,t){return e.closest?e.closest(t):pi(e,t)}function fi(e){e.preventDefault()}function mi({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!!n()&&e===t}function bi({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!!o&&!!o.options.isEnabled&&!!po(t.getState(),r)}const hi=[function(e){const t=Bt(ri),n=Bt(kt),r=tn(()=>({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,a,{sourceEvent:t});if(!o)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};n.current(),c(o,i)}}),[e]),o=tn(()=>({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]),i=nn(function(){n.current=$t(window,[o,r],{passive:!1,capture:!0})},[o,r]),a=nn(()=>{"IDLE"!==t.current.type&&(t.current=ri,n.current(),i())},[i]),s=nn(()=>{const e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=nn(function(){const e=function({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);if("PENDING"!==s.type&&Ut(),l=s.point,c=a,!(Math.abs(c.x-l.x)>=5||Math.abs(c.y-l.y)>=5))return;var l,c;e.preventDefault();const d=s.actions.fluidLift(a);r({type:"DRAGGING",actions:d})}},{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 ti(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&&Ut(),r.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:ni,fn:e}]}({cancel:s,completed:a,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=$t(window,e,{capture:!0,passive:!1})},[s,a]),c=nn(function(e,n){"IDLE"!==t.current.type&&Ut(),t.current={type:"PENDING",point:n,actions:e},l()},[l]);Bo(function(){return i(),function(){n.current()}},[i])},function(e){const t=Bt(oi),n=tn(()=>({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||Ut(),a=!1,t.current(),r()}t.current(),t.current=$t(window,function(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(ii[r.keyCode]?r.preventDefault():ti(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:ni,fn:n}]}(s,l),{capture:!0,passive:!1})}}),[e]),r=nn(function(){t.current=$t(window,[n],{passive:!1,capture:!0})},[n]);Bo(function(){return r(),function(){t.current()}},[r])},function(e){const t=Bt(ai),n=Bt(kt),r=nn(function(){return t.current},[]),o=nn(function(e){t.current=e},[]),i=tn(()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,s,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:l}=i,c={x:a,y:l};n.current(),u(o,c)}}),[e]),a=nn(function(){n.current=$t(window,[i],{capture:!0,passive:!1})},[i]),s=nn(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(ai),n.current(),a())},[a,o]),l=nn(()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=nn(function(){const e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:r},o=$t(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&&Ut();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:ni,fn:e}]}(t),e),i=$t(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:ni,fn:e}]}(t),e);n.current=function(){o(),i()}},[l,r,s]),d=nn(function(){const e=r();"PENDING"!==e.type&&Ut();const t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})},[r,o]),u=nn(function(e,t){"IDLE"!==r().type&&Ut();const n=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()},[c,r,o,d]);Bo(function(){return a(),function(){n.current();const e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(ai))}},[r,a,o]),Bo(function(){return $t(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function vi({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:o}){const i=[...o?hi:[],...r||[]],a=Rt(()=>function(){let e=null;function t(){e||Ut(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&Ut();const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],s=nn(function(e,t){zo(e)&&!zo(t)&&a.tryAbandon()},[a]);Bo(function(){let e=t.getState();return t.subscribe(()=>{const n=t.getState();s(e,n),e=n})},[a,t,s]),Bo(()=>a.tryAbandon,[a.tryAbandon]);const l=nn(e=>bi({lockAPI:a,registry:n,store:t,draggableId:e}),[a,n,t]),c=nn((r,o,i)=>function({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!bi({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const s=r.draggable.getById(o),l=function(e,t){const n=`[${Oo.contextId}="${e}"]`,r=Lo(document,n).find(e=>e.getAttribute(Oo.id)===t);return r&&Fo(r)?r:null}(t,s.descriptor.id);if(!l)return null;if(a&&!s.options.canDragInteractiveElements&&ci(l,a))return null;const c=e.claim(i||kt);let d="PRE_DRAG";function u(){return s.options.shouldRespectForcePress}function p(){return e.isActive(c)}const g=function(e,t){mi({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function f(t){function r(){e.release(),d="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=$t(window,[{eventName:"click",fn:fi,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(Mr({reason:e}))}return"PRE_DRAG"!==d&&(r(),Ut()),n.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),d="DRAGGING",{isActive:()=>mi({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>mi({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,fluidLift:function(e){const t=Ot(e=>{g(()=>Or({client:e}))});return{...f({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>g(_r),moveRight:()=>g(Rr),moveDown:()=>g(Nr),moveLeft:()=>g(Br)};return f({liftActionArgs:{id:o,clientSelection:di(l),movementMode:"SNAP"},cleanup:kt,actions:e})},abort:function(){mi({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&e.release()}}}({lockAPI:a,registry:n,contextId:e,store:t,draggableId:r,forceSensorStop:o||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[e,a,n,t]),d=nn(t=>function(e,t){const n=function(e,t){const n=t.target;if(!((r=n)instanceof Go(r).Element))return null;var r;const o=function(e){return`[${Po.contextId}="${e}"]`}(e),i=gi(n,o);return i&&Fo(i)?i:null}(e,t);return n?n.getAttribute(Po.draggableId):null}(e,t),[e]),u=nn(e=>{const t=n.draggable.findById(e);return t?t.options:null},[n.draggable]),p=nn(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))},[a,t]),g=nn(()=>a.isClaimed(),[a]),f=tn(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:u,tryReleaseLock:p,isLockClaimed:g}),[l,c,d,u,p,g]);for(let e=0;e<i.length;e++)i[e](f)}function yi(e){return e.current||Ut(),e.current}function xi(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:o,dragHandleUsageInstructions:i}=e,a=Bt(null),s=Vo(e),l=nn(()=>(e=>({onBeforeCapture:t=>{Ft(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(s.current),[s]),c=nn(()=>(e=>({...mo,...e.autoScrollerOptions,durationDampening:{...mo.durationDampening,...e.autoScrollerOptions}}))(s.current),[s]),d=function(e){const t=tn(()=>(e=>`rfd-announcement-${e}`)(e),[e]),n=Bt(null);return Tt(function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),_t(e.style,Wo),$o().appendChild(e),function(){setTimeout(function(){const t=$o();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)})}},[t]),nn(e=>{const t=n.current;t&&(t.textContent=e)},[])}(t),u=function({contextId:e,text:t}){const n=Ho("hidden-text",{separator:"-"}),r=tn(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:n}),[n,e]);return Tt(function(){const e=document.createElement("div");return e.id=r,e.textContent=t,e.style.display="none",$o().appendChild(e),function(){const t=$o();t.contains(e)&&t.removeChild(e)}},[r,t]),r}({contextId:t,text:i}),p=function(e,t){const n=tn(()=>(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(Po.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: ${Wr.outOfTheWay};\n `;return{selector:t(Oo.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(_o.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:Ro(o,"always"),resting:Ro(o,"resting"),dragging:Ro(o,"dragging"),dropAnimating:Ro(o,"dropAnimating"),userCancel:Ro(o,"userCancel")}})(e),[e]),r=Bt(null),o=Bt(null),i=nn(vn(e=>{const t=o.current;t||Ut(),t.textContent=e}),[]),a=nn(e=>{const t=r.current;t||Ut(),t.textContent=e},[]);Bo(()=>{(r.current||o.current)&&Ut();const s=Mo(t),l=Mo(t);return r.current=s,o.current=l,s.setAttribute(`${Ao}-always`,e),l.setAttribute(`${Ao}-dynamic`,e),To().appendChild(s),To().appendChild(l),a(n.always),i(n.resting),()=>{const e=e=>{const t=e.current;t||Ut(),To().removeChild(t),e.current=null};e(r),e(o)}},[t,a,i,n.always,n.resting,e]);const s=nn(()=>i(n.dragging),[i,n.dragging]),l=nn(e=>{i("DROP"!==e?n.userCancel:n.dropAnimating)},[i,n.dropAnimating,n.userCancel]),c=nn(()=>{o.current&&i(n.resting)},[i,n.resting]);return tn(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}(t,o),g=nn(e=>{yi(a).dispatch(e)},[]),f=tn(()=>ce({publishWhileDragging:wr,updateDroppableScroll:Sr,updateDroppableIsEnabled:Ar,updateDroppableIsCombineEnabled:Pr,collectionStarting:Cr},g),[g]),m=function(){const e=tn(jo,[]);return Tt(()=>function(){e.clean()},[e]),e}(),b=tn(()=>uo(m,f),[m,f]),h=tn(()=>(({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>mo})=>{const r=Ot(e),o=Ot(t);let i=null;const a=e=>{i||Ut();const{shouldUseTimeDampening:t,dragStartTime:a}=i;So({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{i&&Ut();const t=Date.now();let r=!1;const o=()=>{r=!0};So({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:n}),i={dragStartTime:t,shouldUseTimeDampening:r},r&&a(e)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=(({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(e,n)=>{if(!Co(e,n))return n;const r=((e,t)=>{const n=e.frame;return n&&Co(e,t)?Eo({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!r)return t(e.descriptor.id,n),null;const o=an(n,r);return t(e.descriptor.id,o),an(n,o)},o=(e,t,r)=>{if(!e)return r;if(!wo(t,r))return r;const o=((e,t)=>{if(!wo(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return Eo({current:r,max:n,change:t})})(t,r);if(!o)return n(r),null;const i=an(r,o);return n(i),an(r,i)};return t=>{const n=t.scrollJumpRequest;if(!n)return;const i=ir(t.impact);i||Ut();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=on(t.current.client.selection,n);e({client:r})})(t,l)}})({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}})({scrollWindow:go,scrollDroppable:b.scrollDroppable,getAutoScrollerOptions:c,...ce({move:Or},g)}),[b.scrollDroppable,g,c]),v=function(e){const t=Bt({}),n=Bt(null),r=Bt(null),o=Bt(!1),i=nn(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]}},[]),a=nn(function(t){const n=function(e,t){const n=`[${Po.contextId}="${e}"]`,r=Lo(document,n);if(!r.length)return null;const o=r.find(e=>e.getAttribute(Po.draggableId)===t);return o&&Fo(o)?o:null}(e,t);n&&n!==document.activeElement&&n.focus()},[e]),s=nn(function(e,t){n.current===e&&(n.current=t)},[]),l=nn(function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const e=n.current;e&&a(e)}))},[a]),c=nn(function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(Po.draggableId)===e&&(n.current=e)},[]);return Bo(()=>(o.current=!0,function(){o.current=!1;const e=r.current;e&&cancelAnimationFrame(e)}),[]),tn(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}(t),y=tn(()=>io({announce:d,autoScroller:h,dimensionMarshal:b,focusMarshal:v,getResponders:l,styleMarshal:p}),[d,h,b,v,l,p]);a.current=y;const x=nn(()=>{const e=yi(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),I=nn(()=>{const e=yi(a).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);n(tn(()=>({isDragging:I,tryAbort:x}),[I,x]));const E=nn(e=>po(yi(a).getState(),e),[]),D=nn(()=>sr(yi(a).getState()),[]),w=tn(()=>({marshal:b,focus:v,contextId:t,canLift:E,isMovementAllowed:D,dragHandleUsageInstructionsId:u,registry:m}),[t,b,u,v,E,D,m]);return vi({contextId:t,store:y,registry:m,customSensors:r||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),Tt(()=>x,[x]),Nt.createElement(qo.Provider,{value:w},Nt.createElement(gt,{context:ko,store:y},e.children))}function Ii(e){const t=Nt.useId(),n=e.dragHandleUsageInstructions||Zt;return Nt.createElement(Ht,null,r=>Nt.createElement(xi,{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 Ei=(e,t)=>t?Wr.drop(t.duration):e?Wr.snap:Wr.fluid,Di=(e,t)=>{if(e)return t?Gr:Fr};function wi(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?((e,t)=>{const n=Ur(e);if(n)return t?`${n} scale(${jr})`:n})(n,i):Hr(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Ei(a,o),transform:l,opacity:Di(i,s),zIndex:s?4500:5e3,pointerEvents:"none"}}(e):{transform:Hr((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}var Ci=Nt.createContext(null);function Si(e){const t=Lt(e);return t||Ut(),t}function Ai(e){e.preventDefault()}var Pi=(e,t)=>e===t,Oi=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function _i(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Ni={mapped:{type:"SECONDARY",offset:rn,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:_i(null)}},Ri=pt(()=>{const e=function(){const e=vn((e,t)=>({x:e,y:t})),t=vn((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=vn((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(zo(r)){if(r.critical.draggable.id!==o.draggableId)return null;const t=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=ir(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=Oi(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:r.dropDuration,curve:Lr,moveTo:r.newHomeClientOffset,opacity:c?Gr:null,scale:c?jr: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=vn((e,t)=>({x:e,y:t})),t=vn(_i),n=vn((e,n=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}})),r=e=>e?n(rn,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=Cn(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return r(d);if(i.displaced.invisible[t])return null;const o=ln(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(zo(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)||Ni},{dropAnimationFinished:()=>({type:"DROP_ANIMATION_FINISHED",payload:null})},null,{context:ko,areStatePropsEqual:Pi})(e=>{const t=Bt(null),n=nn((e=null)=>{t.current=e},[]),r=nn(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=Si(qo),{type:s,droppableId:l}=Si(Ci),c=tn(()=>({id:e.draggableId,index:e.index,type:s,droppableId:l}),[e.draggableId,e.index,s,l]),{children:d,draggableId:u,isEnabled:p,shouldRespectForcePress:g,canDragInteractiveElements:f,isClone:m,mapped:b,dropAnimationFinished:h}=e;m||function(e){const t=Ho("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=tn(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=nn(e=>{const t=o();return t||Ut(),function(e,t,n=rn){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=At(o,r),a=St(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,o]),d=tn(()=>({uniqueId:t,descriptor:n,options:l,getDimension:c}),[n,c,l,t]),u=Bt(d),p=Bt(!0);Bo(()=>(r.draggable.register(u.current),()=>r.draggable.unregister(u.current)),[r.draggable]),Bo(()=>{if(p.current)return void(p.current=!1);const e=u.current;u.current=d,r.draggable.update(d,e)},[d,r.draggable])}(tn(()=>({descriptor:c,registry:a,getDraggableRef:r,canDragInteractiveElements:f,shouldRespectForcePress:g,isEnabled:p}),[c,a,r,f,g,p]));const v=tn(()=>p?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":u,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:Ai}:null,[o,i,u,p]),y=nn(e=>{"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&Ft(h)},[h,b]),x=tn(()=>{const e=wi(b),t="DRAGGING"===b.type&&b.dropping?y:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":u,style:e,onTransitionEnd:t},dragHandleProps:v}},[o,v,u,b,y,n]),I=tn(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Nt.createElement(Nt.Fragment,null,d(x,b.snapshot,I))});function Bi(e){return Si(Ci).isUsingCloneFor!==e.draggableId||e.isClone?Nt.createElement(Ri,e):null}function Ti(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return Nt.createElement(Bi,_t({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const Mi=e=>t=>e===t,Li=Mi("scroll"),Gi=Mi("auto"),Fi=(e,t)=>t(e.overflowX)||t(e.overflowY),ji=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Fi(n,Li)||Fi(n,Gi)})(e)?e:ji(e.parentElement);var ki=e=>({x:e.scrollLeft,y:e.scrollTop});const $i=e=>!!e&&("fixed"===window.getComputedStyle(e).position||$i(e.parentElement));const Wi={passive:!1},Ui={passive:!0};var Hi=e=>e.shouldPublishImmediately?Wi:Ui;const qi=e=>e&&e.env.closestScrollable||null;function Vi(e){const t=Bt(null),n=Si(qo),r=Ho("droppable"),{registry:o,marshal:i}=n,a=Vo(e),s=tn(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=Bt(s),c=tn(()=>vn((e,n)=>{t.current||Ut();const r={x:e,y:n};i.updateDroppableScroll(s.id,r)}),[s.id,i]),d=nn(()=>{const e=t.current;return e&&e.env.closestScrollable?ki(e.env.closestScrollable):rn},[]),u=nn(()=>{const e=d();c(e.x,e.y)},[d,c]),p=tn(()=>Ot(u),[u]),g=nn(()=>{const e=t.current,n=qi(e);e&&n||Ut(),e.scrollOptions.shouldPublishImmediately?u():p()},[p,u]),f=nn((e,r)=>{t.current&&Ut();const o=a.current,i=o.getDroppableRef();i||Ut();const l={closestScrollable:ji(c=i),isFixedOnPage:$i(c)};var c;const d={ref:i,descriptor:s,env:l,scrollOptions:r};t.current=d;const u=(({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=Pt(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=xt({top:r,right:a,bottom:i,left:o},n.border);return Dt({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})})(e,l),d=St(c,r),u=(()=>{if(!l)return null;const e=Pt(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:St(e,r),scroll:ki(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=ao({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:rn,displacement:rn}}}})(),c="vertical"===o?Tn:Mn;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:bn({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})({ref:i,descriptor:s,env:l,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),p=l.closestScrollable;return p&&(p.setAttribute(No.contextId,n.contextId),p.addEventListener("scroll",g,Hi(d.scrollOptions))),u},[n.contextId,s,g,a]),m=nn(()=>{const e=t.current,n=qi(e);return e&&n||Ut(),ki(n)},[]),b=nn(()=>{const e=t.current;e||Ut();const n=qi(e);t.current=null,n&&(p.cancel(),n.removeAttribute(No.contextId),n.removeEventListener("scroll",g,Hi(e.scrollOptions)))},[g,p]),h=nn(e=>{const n=t.current;n||Ut();const r=qi(n);r||Ut(),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),v=tn(()=>({getDimensionAndWatchScroll:f,getScrollWhileDragging:m,dragStopped:b,scroll:h}),[b,f,m,h]),y=tn(()=>({uniqueId:r,descriptor:s,callbacks:v}),[v,s,r]);Bo(()=>(l.current=y.descriptor,o.droppable.register(y),()=>{t.current&&b(),o.droppable.unregister(y)}),[v,s,b,y,i,o.droppable]),Bo(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Bo(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function zi(){}const Yi={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};var Zi=Nt.memo(e=>{const t=Bt(null),n=nn(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=Rt("open"===e.animate);Tt(()=>s?"open"!==r?(n(),l(!1),zi):t.current?zi:(t.current=setTimeout(()=>{t.current=null,l(!1)}),n):zi,[r,s,n]);const c=nn(e=>{"height"===e.propertyName&&(o(),"close"===r&&i())},[r,i,o]),d=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||"close"===n?Yi:{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?Wr.placeholder:null}})({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return Nt.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})});class Ji extends Nt.PureComponent{constructor(...e){super(...e),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}const Xi={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||Ut(),document.body}},Ki=e=>{let t,n={...e};for(t in Xi)void 0===e[t]&&(n={...n,[t]:Xi[t]});return n},Qi=(e,t)=>e===t.droppable.type,ea=(e,t)=>t.draggables[e.draggable.id],ta=pt(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=vn(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),r=vn((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=Ki(o),a=i.droppableId,s=i.type,l=!i.isDropDisabled,c=i.renderClone;if(zo(n)){const e=n.critical;if(!Qi(s,e))return t;const o=ea(e,n.dimensions),i=ir(n.impact)===a;return r(a,l,i,i,o,c)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!Qi(s,e.critical))return t;const o=ea(e.critical,n.dimensions);return r(a,l,Oi(e.result)===a,ir(e.impact)===a,o,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!Qi(s,r.critical))return t;const o=ir(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)=>({...Ki(n),...e,...t}),{context:ko,areStatePropsEqual:Pi})(e=>{const t=Lt(qo);t||Ut();const{contextId:n,isMovementAllowed:r}=t,o=Bt(null),i=Bt(null),{children:a,droppableId:s,type:l,mode:c,direction:d,ignoreContainerClipping:u,isDropDisabled:p,isCombineEnabled:g,snapshot:f,useClone:m,updateViewportMaxScroll:b,getContainerForClone:h}=e,v=nn(()=>o.current,[]),y=nn((e=null)=>{o.current=e},[]);nn(()=>i.current,[]);const x=nn((e=null)=>{i.current=e},[]),I=nn(()=>{r()&&b({maxScroll:lo()})},[r,b]);Vi({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:p,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:v});const E=tn(()=>Nt.createElement(Ji,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:r})=>Nt.createElement(Zi,{placeholder:t,onClose:e,innerRef:x,animate:r,contextId:n,onTransitionEnd:I})),[n,I,e.placeholder,e.shouldAnimatePlaceholder,x]),D=tn(()=>({innerRef:y,placeholder:E,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,E,y]),w=m?m.dragging.draggableId:null,C=tn(()=>({droppableId:s,type:l,isUsingCloneFor:w}),[s,w,l]);return Nt.createElement(Ci.Provider,{value:C},a(D,f),function(){if(!m)return null;const{dragging:e,render:t}=m,n=Nt.createElement(Bi,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(n,r)=>t(n,r,e));return Gt.createPortal(n,h())}())}),{Menu:na}=n,{MenuItem:ra}=n,{IconButton:oa}=n,{MoreVert:ia}=r,{MoreHoriz:aa}=r,sa=o,la=e;class ca extends la.Component{static __initStatic(){this.propTypes={opts:sa.object,onClick:sa.func.isRequired}}constructor(e){super(e),ca.prototype.__init.call(this),ca.prototype.__init2.call(this),this.state={anchorEl:void 0,open:!1}}__init(){this.handleClick=e=>this.setState({open:!0,anchorEl:e.currentTarget})}__init2(){this.handleRequestClose=()=>this.setState({open:!1})}render(){const{opts:e,onClick:t}=this.props,{open:n,anchorEl:r}=this.state,o=Object.keys(e)||[],i=e=>()=>{t(e),this.handleRequestClose()},a=n?"inherit":"disabled";return la.createElement("div",null,la.createElement("div",{onClick:this.handleClick},la.createElement(oa,{size:"large"},n?la.createElement(ia,{color:a}):la.createElement(aa,{color:a}))),la.createElement(na,{id:"point-menu",anchorEl:r,open:n,onClose:this.handleRequestClose,style:{transform:"translate(-15px, -15px)"},transformOrigin:{vertical:"center",horizontal:"right"}},o.map((t,n)=>la.createElement(ra,{key:n,onClick:i(t)},e[t]))))}}ca.__initStatic();class da extends la.Component{static __initStatic2(){this.propTypes={onChange:sa.func.isRequired,showSampleAnswer:sa.bool.isRequired}}render(){const{onChange:e,showSampleAnswer:t}=this.props,n=t?"Provide Sample Response":"Remove Sample Response";return la.createElement(ca,{onClick:t=>e(t),opts:{sample:n}})}}da.__initStatic2();const ua=e,pa=o,{styled:ga}=i,{InputLabel:fa}=n,{OutlinedInput:ma}=n,{Select:ba}=n,{FormControl:ha}=n,{MenuItem:va}=n,{Checkbox:ya}=n,{FormGroup:xa}=n,{FormControlLabel:Ia}=n,{Typography:Ea}=n,{DragIndicator:Da}=r,wa=a,{grey:Ca}=s,Sa=d,{InputContainer:Aa}=c,Pa=wa("pie-lib:rubric:authoring"),Oa=(e,t,n)=>{const r=Array.from(e),[o]=r.splice(t,1);return r.splice(n,0,o),r},_a=pa.shape({excludeZero:pa.bool,points:pa.arrayOf(pa.string),sampleAnswers:pa.arrayOf(pa.string),maxPoints:pa.number,rubriclessInstruction:pa.string}),Na=e=>{const{value:t,onChange:n,max:r}=e,o="max-points-label";return ua.createElement(ha,{sx:{minWidth:120,m:1},variant:"outlined"},ua.createElement(fa,{id:o},"Max Points"),ua.createElement(ba,{labelId:o,label:"Max Points",value:t,onChange:e=>n(e.target.value),input:ua.createElement(ma,{label:"Max Points"}),MenuProps:{transitionDuration:{enter:225,exit:195}}},K(1,r+1).map(e=>ua.createElement(va,{key:`${e}`,value:e},e))))},Ra=e=>null===e||"null"===e,Ba=ga("div")(()=>({display:"flex",width:"100%",position:"relative"})),Ta=ga("div")(({theme:e})=>({width:"100%",backgroundColor:`${e.palette.common.white}`})),Ma=ga(Da)(({theme:e})=>({paddingTop:e.spacing(1),color:Ca[500]})),La=ga(Ea)(({theme:e})=>({color:Ca[500],paddingBottom:e.spacing(1),textTransform:"uppercase"})),Ga=ga("div")(({theme:e})=>({paddingLeft:e.spacing(3)})),Fa=ga("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingLeft:e.spacing(3),paddingTop:e.spacing(1)})),ja=ga("div")(()=>({position:"absolute",right:0})),ka=e=>{const{points:t,content:n,sampleAnswer:r,mathMlOptions:o={},error:i,pluginOpts:a={}}=e,s=`${t} ${t<=1?"pt":"pts"}`,l=Ra(r);return ua.createElement("div",null,ua.createElement(La,{variant:"overline"},s),ua.createElement(Ba,null,ua.createElement(Ma,null),ua.createElement(Ta,null,ua.createElement(Sa,{error:i,pluginProps:a,markup:n,onChange:e.onChange,mathMlOptions:o})),ua.createElement(ja,null,ua.createElement(da,{showSampleAnswer:l,onChange:e.onMenuChange}))),i&&ua.createElement(Fa,null,i),!l&&ua.createElement(Ga,null,ua.createElement(Ma,{as:Ea,variant:"overline"},"Sample Response"),ua.createElement(Ta,null,ua.createElement(Sa,{markup:r,pluginProps:a,onChange:e.onSampleChange,mathMlOptions:o}))))},$a=ga("div")(({theme:e})=>({backgroundColor:Ca[200],borderWidth:1,borderStyle:"solid",borderColor:Ca[300],padding:e.spacing(2),margin:e.spacing(1)})),Wa=ga(Aa)(({theme:e})=>({width:"100%",paddingTop:e.spacing(2.5),marginBottom:e.spacing(2),marginTop:e.spacing(1),"& .MuiFormControl-root":{width:"100%"},"& > .MuiFormLabel-root.MuiInputLabel-shrink":{fontSize:e.typography.fontSize+2,transform:"translate(0, 1.5px) scale(0.75)"}})),Ua=ga("div")(()=>({display:"none"})),Ha=ga("div")(({theme:e})=>({paddingTop:e.spacing(1),paddingBottom:e.spacing(1)})),qa=ga(Ea)(({theme:e})=>({paddingLeft:e.spacing(1),margin:e.spacing(1)}));class Va extends ua.Component{constructor(...e){super(...e),Va.prototype.__init.call(this),Va.prototype.__init2.call(this),Va.prototype.__init3.call(this),Va.prototype.__init4.call(this),Va.prototype.__init5.call(this),Va.prototype.__init6.call(this),Va.prototype.__init7.call(this),Va.prototype.__init8.call(this),Va.prototype.__init9.call(this)}static __initStatic(){this.propTypes={value:_a,config:pa.object,pluginOpts:pa.object,rubricless:pa.bool,onChange:pa.func}}static __initStatic2(){this.defaultProps={}}__init(){this.dragEnd=e=>{if(!e.destination)return;const{value:t,onChange:n}=this.props,r=Oa(t.points,e.source.index,e.destination.index),o=Oa(t.sampleAnswers,e.source.index,e.destination.index);n({...t,points:r,sampleAnswers:o})}}__init2(){this.changeRubriclessInstruction=e=>{const{value:t,onChange:n}=this.props;n({...t,rubriclessInstruction:e})}}__init3(){this.changeMaxPoints=e=>{const{value:t,onChange:n,rubricless:r}=this.props,o=t.points.length-1;let i,a;Pa("current",o,"new: ",e),e>o&&(i=ne(e-o).map(()=>"").concat(t.points),a=ne(e-o).map(()=>null).concat(t.sampleAnswers)),e<o&&(Pa("less than"),i=Q(t.points,e+1),a=Q(t.sampleAnswers,e+1)),n(i&&!r?{...t,points:i,sampleAnswers:a,maxPoints:e}:{...t,maxPoints:e})}}__init4(){this.changeContent=(e,t,n)=>{if(Pa(`changeModel[${n}]:`,e,t),"points"!==n&&"sampleAnswers"!==n)return;const{value:r,onChange:o}=this.props,i=r[n]&&Array.from(r[n]);i.splice(e,1,t),Pa(`changeModel[${n}]:`,i),o({...r,[n]:i})}}__init5(){this.excludeZeros=()=>{const{value:e,onChange:t}=this.props;t({...e,excludeZero:!e.excludeZero})}}__init6(){this.getPointForIndex=(e,t)=>(t.excludeZero?t.points.length-1+1:t.points.length-1)-e}__init7(){this.getMaxPoint=e=>e.excludeZero?e.points.length:e.points.length-1}__init8(){this.shouldRenderPoint=(e,t)=>this.getPointForIndex(e,t)>0||!t.excludeZero}__init9(){this.onPointMenuChange=(e,t)=>{if("sample"===t){const{value:t}=this.props,n=Array.from(t.sampleAnswers||[]);Ra(n[e])?this.changeContent(e,"","sampleAnswers"):this.changeContent(e,null,"sampleAnswers")}}}render(){const{value:e,mathMlOptions:t={},config:n={},rubricless:r=!1,pluginOpts:o={}}=this.props;let{excludeZeroEnabled:i=!0,maxPointsEnabled:a=!0,errors:s={},rubriclessInstructionEnabled:l=!1,maxPoints:c=10}=e||{};const{rubriclessInstruction:d={},maxMaxPoints:u=10}=n||{},{pointsDescriptorsErrors:p}=s||{};e&&Number.isFinite(e.maxPoints)&&console.warn("maxPoints is deprecated - remove from model");const g=r?c:e.excludeZero?e.points.length:e.points.length-1;return ua.createElement("div",null,ua.createElement(qa,{variant:"h5"},"Rubric"),ua.createElement(xa,{row:!0},a&&ua.createElement(Na,{max:u<100?u:100,value:g,onChange:this.changeMaxPoints,pluginOpts:o}),i&&ua.createElement(Ia,{label:"Exclude zeros",control:ua.createElement(ya,{checked:e.excludeZero,onChange:this.excludeZeros})})),l&&r&&ua.createElement(Wa,{label:d.label},ua.createElement(Sa,{markup:e.rubriclessInstruction||"",onChange:this.changeRubriclessInstruction,pluginProps:o,nonEmpty:!1,disableUnderline:!0,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:t,autoWidthToolbar:!0})),ua.createElement("div",null,r?ua.createElement(Ua,null):ua.createElement($a,null,ua.createElement(Ii,{onDragEnd:this.dragEnd},ua.createElement(ta,{droppableId:"droppable"},n=>ua.createElement("div",{...n.droppableProps,ref:n.innerRef},e.points.map((n,r)=>this.shouldRenderPoint(r,e)&&ua.createElement(Ti,{key:`${n.points}-${r}`,index:r,draggableId:r.toString()},i=>ua.createElement(Ha,{ref:i.innerRef,...i.draggableProps,...i.dragHandleProps},ua.createElement(ka,{points:this.getPointForIndex(r,e),content:n,error:p&&p[e.points.length-1-r],sampleAnswer:e.sampleAnswers&&e.sampleAnswers[r],onChange:e=>this.changeContent(r,e,"points"),onSampleChange:e=>this.changeContent(r,e,"sampleAnswers"),onMenuChange:e=>this.onPointMenuChange(r,e),mathMlOptions:t,pluginOpts:o})))),n.placeholder))))))}}Va.__initStatic(),Va.__initStatic2();const za=e=>{const{rubricless:t=!1,config:n={},pluginOpts:r={}}=e||{},o=Array.from(e.value.points||[]).reverse();let i=Array.from(e.value.sampleAnswers||[]).reverse();o.length>i.length&&(i=ne(o.length-i.length).map(()=>null).concat(i));const a={...e.value,points:o,sampleAnswers:i};return ua.createElement(Va,{value:a,config:n,onChange:t=>{e.onChange({...t,points:Array.from(t.points||[]).reverse(),sampleAnswers:Array.from(t.sampleAnswers||[]).reverse()})},rubricless:t,pluginOpts:r})};za.propTypes={value:_a,config:pa.object,pluginOpts:pa.object,rubricless:pa.bool,getIndex:pa.func,onChange:pa.func};var Ya=function(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}(Object.freeze({__proto__:null,Authoring:za,RUBRIC_TYPES:{SIMPLE_RUBRIC:"simpleRubric",MULTI_TRAIT_RUBRIC:"multiTraitRubric",RUBRICLESS:"rubricless"}}));const Za=e,Ja=i,Xa=c;function Ka(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}var Qa=f.exports;Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var es=Qa(m.exports),ts=Qa(Za),ns=Ya,rs=Ja,os=Xa;const{Panel:is,toggle:as}=os.settings,ss=(0,rs.styled)("div")(({theme:e,width:t})=>({maxWidth:t,fontFamily:"Cerebri Sans",fontSize:e.typography.fontSize}));class ls extends ts.default.Component{constructor(...e){super(...e),(0,es.default)(this,"verifyRubriclessModel",(e,t)=>{const{rubricless:n=!1}=t||{};return n?(({points:e,sampleAnswers:t,...n})=>n)(e):e})}render(){const{model:e,configuration:t,onConfigurationChanged:n,onModelChanged:r,imageSupport:o}=this.props||{},{baseInputConfiguration:i={},contentDimensions:a={},settingsPanelDisabled:s,showExcludeZero:l={},showMaxPoint:c={},mathMlOptions:d={},rubricless:u=!1,rubriclessInstruction:p,width:g}=t||{},f=this.verifyRubriclessModel(e,t),{extraCSSRules:m}=e,b={excludeZeroEnabled:l.settings&&as(l.label),maxPointsEnabled:c.settings&&as(c.label),rubriclessInstructionEnabled:u&&p.settings&&as(p.label)};return ts.default.createElement(os.layout.ConfigLayout,{extraCSSRules:m,dimensions:a,hideSettings:s,settings:ts.default.createElement(is,{model:e,onChangeModel:r,configuration:t,onChangeConfiguration:n,pluginOpts:(h=Ka([p,"optionalAccess",e=>e.inputConfiguration]),Object.assign({...i},h||{})),groups:{Properties:b},imageSupport:o})},ts.default.createElement(ss,{width:g},ts.default.createElement(ns.Authoring,{value:f,config:t,onChange:r,mathMlOptions:d,rubricless:u,pluginOpts:i,imageSupport:o})));var h}}C.default=ls;var cs={};Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0,cs.default={model:{points:["","","",""],sampleAnswers:[null,null,null,null],maxPoints:3,excludeZero:!1,excludeZeroEnabled:!0,maxPointsEnabled:!0},configuration:{baseInputConfiguration:{h3:{disabled:!0},audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1},textAlign:{disabled:!0},showParagraphs:{disabled:!1},separateParagraphs:{disabled:!0}},rubriclessInstruction:{inputConfiguration:{audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1}}},showExcludeZero:{settings:!0,label:"Ability to exclude zero"},showMaxPoint:{settings:!0,label:"Show max points dropdown"},settingsPanelDisabled:!1,mathMlOptions:{mmlOutput:!1,mmlEditing:!1},maxMaxPoints:9}};const ds=e,us=l,ps=a;function gs(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}var fs=f.exports;Object.defineProperty(g,"__esModule",{value:!0});var ms=g.default=void 0,bs=fs(m.exports),hs=y,vs=fs(ds),ys=us,xs=fs(ps),Is=fs(C),Es=fs(cs);const Ds=e=>({...Es.default.model,...e}),ws=e=>({...Es.default.configuration,...e});class Cs extends HTMLElement{constructor(){super(),(0,bs.default)(this,"updateModelAccordingToReceivedProps",e=>{const t={...this._model};if(!e)return t;const n={...e};1===n.maxPoints&&(n.excludeZero=!1);const{maxPoints:r,excludeZero:o}=n||{};n.points=n.points?[...n.points]:[],n.sampleAnswers=n.sampleAnswers?[...n.sampleAnswers]:[];const i=o?r:r+1,a=n.points.length,s=gs([t,"optionalAccess",e=>e.excludeZero])!==gs([e,"optionalAccess",e=>e.excludeZero]),l=gs([t,"optionalAccess",e=>e.maxPoints])!==gs([e,"optionalAccess",e=>e.maxPoints]);if(a<i){if(s&&!o&&(n.points=["",...n.points],n.sampleAnswers=[null,...n.sampleAnswers]),l)for(let e=0;e<i-a;e++)n.points.push(""),n.sampleAnswers.push(null)}else a>i&&(s&&o&&(n.points=n.points.slice(1),n.sampleAnswers=n.sampleAnswers.slice(1)),l&&(n.points=n.points.slice(0,i),n.sampleAnswers=n.sampleAnswers.slice(0,i)));return n}),(0,bs.default)(this,"onConfigurationChanged",e=>{this._configuration=ws(e),this._model&&this.onModelChanged(this._model),this._render()}),this._root=null,xs.default.log("constructor called"),this._model=Ds(),this._configuration=ws(),this.onModelChanged=this.onModelChanged.bind(this),this.onConfigurationChanged=this.onConfigurationChanged.bind(this)}set model(e){this._model=this.updateModelAccordingToReceivedProps(Ds(e)),this._render()}set configuration(e){this._configuration=ws(e),this._render()}onModelChanged(e){this._model=this.updateModelAccordingToReceivedProps(e),this._render(),this.dispatchEvent(new hs.ModelUpdatedEvent(this._model,!1))}insertImage(e){this.dispatchEvent(new hs.InsertImageEvent(e))}onDeleteImage(e,t){this.dispatchEvent(new hs.DeleteImageEvent(e,t))}connectedCallback(){this._render()}_render(){if(this._model){let e=vs.default.createElement(Is.default,{model:this._model,configuration:this._configuration,onModelChanged:this.onModelChanged,onConfigurationChanged:this.onConfigurationChanged,imageSupport:{add:this.insertImage.bind(this),delete:this.onDeleteImage.bind(this)}});this._root||(this._root=(0,ys.createRoot)(this)),this._root.render(e)}}disconnectedCallback(){this._root&&(this._root.unmount(),this._root=null)}}ms=g.default=Cs;export{ms as default};
|
|
1
|
+
import{_dll_react as e,_dll_react_dom as t,_dll_mui__material as n,_dll_mui__icons_material as r,_dll_prop_types as o,_dll_mui__material_styles as i,_dll_debug as a,_dll_mui__material_colors as s,_dll_react_dom_client as l}from"../../../@pie-lib/shared-module@^5.1.1/module/index.js";import{_dll_pie_lib__config_ui as c}from"../../../@pie-lib/config-module@^4.0.4/module/index.js";import{_dll_pie_lib__editable_html_tip_tap as d}from"../../../@pie-lib/editable-html-module@^7.1.1/module/index.js";function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p,g={},f={exports:{}};(p=f).exports=function(e){return e&&e.__esModule?e:{default:e}},p.exports.__esModule=!0,p.exports.default=p.exports,u(f.exports);var m={exports:{}},b={exports:{}},h={exports:{}};!function(e){function t(n){return e.exports=t="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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(h),u(h.exports);var v={exports:{}};!function(e){var t=h.exports.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(v),u(v.exports),function(e){var t=h.exports.default,n=v.exports;e.exports=function(e){var r=n(e,"string");return"symbol"==t(r)?r:r+""},e.exports.__esModule=!0,e.exports.default=e.exports}(b),u(b.exports),function(e){var t=b.exports;e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(m),u(m.exports);var y={};Object.defineProperty(y,"__esModule",{value:!0});class x extends CustomEvent{constructor(e,t=!1){super(x.TYPE,{bubbles:!0,detail:{update:e,reset:t}}),this.update=e,this.reset=t}}x.TYPE="model.updated",y.ModelUpdatedEvent=x;class I extends CustomEvent{constructor(e,t){super(I.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}I.TYPE="delete.image",y.DeleteImageEvent=I;class E extends CustomEvent{constructor(e){super(E.TYPE,{bubbles:!0,detail:e}),this.handler=e}}E.TYPE="insert.image",y.InsertImageEvent=E;class D extends CustomEvent{constructor(e,t){super(D.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}D.TYPE="delete.sound",y.DeleteSoundEvent=D;class w extends CustomEvent{constructor(e){super(w.TYPE,{bubbles:!0,detail:e}),this.handler=e}}w.TYPE="insert.sound",y.InsertSoundEvent=w;var C={},S="object"==typeof global&&global&&global.Object===Object&&global,A="object"==typeof self&&self&&self.Object===Object&&self,P=(S||A||Function("return this")()).Symbol,O=Object.prototype,_=O.hasOwnProperty,N=O.toString,R=P?P.toStringTag:void 0,B=Object.prototype.toString,T=P?P.toStringTag:void 0;function M(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":T&&T in Object(e)?function(e){var t=_.call(e,R),n=e[R];try{e[R]=void 0;var r=!0}catch(e){}var o=N.call(e);return r&&(t?e[R]=n:delete e[R]),o}(e):function(e){return B.call(e)}(e)}var L=/\s/,G=/^\s+/;function F(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var j=/^[-+]0x[0-9a-f]+$/i,k=/^0b[01]+$/i,$=/^0o[0-7]+$/i,W=parseInt;function U(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==M(e)}(e))return NaN;if(F(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=F(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&L.test(e.charAt(t)););return t}(e)+1).replace(G,""):e}(e);var n=k.test(e);return n||$.test(e)?W(e.slice(2),n?2:8):j.test(e)?NaN:+e}var H=1/0;function q(e){return e?(e=U(e))===H||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function V(e){var t=q(e),n=t%1;return t==t?n?t-n:t:0}function z(e){return e}var Y=/^(?:0|[1-9]\d*)$/;function Z(e,t,n){if(!F(n))return!1;var r=typeof t;return!!("number"==r?function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){if(!F(e))return!1;var t=M(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)}(n)&&function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Y.test(e))&&e>-1&&e%1==0&&e<t}(t,n.length):"string"==r&&t in n)&&function(e,t){return e===t||e!=e&&t!=t}(n[t],e)}var J=Math.ceil,X=Math.max,K=function(e,t,n){return n&&"number"!=typeof n&&Z(e,t,n)&&(t=n=void 0),e=q(e),void 0===t?(t=e,e=0):t=q(t),function(e,t,n){for(var r=-1,o=X(J((t-e)/(n||1)),0),i=Array(o);o--;)i[++r]=e,e+=n;return i}(e,t,n=void 0===n?e<t?1:-1:q(n))};function Q(e,t,n){var r=null==e?0:e.length;return r?function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,(t=r-(t=n||void 0===t?1:V(t)))<0?0:t,r):[]}var ee=4294967295,te=Math.min;function ne(e,t){if((e=V(e))<1||e>9007199254740991)return[];var n,r=ee,o=te(e,ee);e-=ee;for(var i=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(o,t="function"==typeof(n=t)?n:z);++r<e;)t(r);return i}function re(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 oe="function"==typeof Symbol&&Symbol.observable||"@@observable",ie=()=>Math.random().toString(36).substring(7).split("").join("."),ae={INIT:`@@redux/INIT${ie()}`,REPLACE:`@@redux/REPLACE${ie()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ie()}`};function se(e,t,n){if("function"!=typeof e)throw new Error(re(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(re(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(re(1));return n(se)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((e,t)=>{a.set(t,e)}))}function d(){if(l)throw new Error(re(3));return o}function u(e){if("function"!=typeof e)throw new Error(re(4));if(l)throw new Error(re(5));let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error(re(6));t=!1,c(),a.delete(n),i=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(re(7));if(void 0===e.type)throw new Error(re(8));if("string"!=typeof e.type)throw new Error(re(17));if(l)throw new Error(re(9));try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}return p({type:ae.INIT}),{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(re(10));r=e,p({type:ae.REPLACE})},[oe]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(re(11));function n(){const e=t;e.next&&e.next(d())}return n(),{unsubscribe:e(n)}},[oe](){return this}}}}}function le(e,t){return function(...n){return t(e.apply(this,n))}}function ce(e,t){if("function"==typeof e)return le(e,t);if("object"!=typeof e||null===e)throw new Error(re(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=le(o,t))}return n}function de(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}var ue={exports:{}},pe={},ge=e,fe="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},me=ge.useSyncExternalStore,be=ge.useRef,he=ge.useEffect,ve=ge.useMemo,ye=ge.useDebugValue;pe.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=be(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=ve(function(){function e(e){if(!l){if(l=!0,i=e,e=r(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return s=t}return s=e}if(t=s,fe(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(i=e,t):(i=e,s=n)}var i,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,o]);var s=me(e,i[0],i[1]);return he(function(){a.hasValue=!0,a.value=s},[s]),ye(s),s},ue.exports=pe;const xe=e;var Ie=xe.version.startsWith("19"),Ee=Symbol.for(Ie?"react.transitional.element":"react.element"),De=Symbol.for("react.portal"),we=Symbol.for("react.fragment"),Ce=Symbol.for("react.strict_mode"),Se=Symbol.for("react.profiler"),Ae=Symbol.for("react.consumer"),Pe=Symbol.for("react.context"),Oe=Symbol.for("react.forward_ref"),_e=Symbol.for("react.suspense"),Ne=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),Be=Symbol.for("react.lazy"),Te=Oe,Me=Re;function Le(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function Ge(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Fe(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=Ge(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=Ge(o),o=r(t,n)),o},r}}function je(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function ke(e,t,n){return{...n,...e,...t}}var $e={notify(){},get:()=>[]};function We(e,t){let n,r=$e,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(){(()=>{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=$e)}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 Ue=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),He="undefined"!=typeof navigator&&"ReactNative"===navigator.product,qe=Ue||He?xe.useLayoutEffect:xe.useEffect;function Ve(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function ze(e,t){if(Ve(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])||!Ve(e[n[r]],t[n[r]]))return!1;return!0}var Ye={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ze={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Je={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Xe={[Te]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Me]:Je};function Ke(e){return function(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case Ee:switch(e=e.type){case we:case Se:case Ce:case _e:case Ne:return e;default:switch(e=e&&e.$$typeof){case Pe:case Oe:case Be:case Re:case Ae:return e;default:return t}}case De:return t}}}(e)===Re}(e)?Je:Xe[e.$$typeof]||Ye}var Qe=Object.defineProperty,et=Object.getOwnPropertyNames,tt=Object.getOwnPropertySymbols,nt=Object.getOwnPropertyDescriptor,rt=Object.getPrototypeOf,ot=Object.prototype;function it(e,t){if("string"!=typeof t){if(ot){const n=rt(t);n&&n!==ot&&it(e,n)}let n=et(t);tt&&(n=n.concat(tt(t)));const r=Ke(e),o=Ke(t);for(let i=0;i<n.length;++i){const a=n[i];if(!(Ze[a]||o&&o[a]||r&&r[a])){const n=nt(t,a);try{Qe(e,a,n)}catch(e){}}}}return e}var at=Symbol.for("react-redux-context"),st="undefined"!=typeof globalThis?globalThis:{},lt=function(){if(!xe.createContext)return{};const e=st[at]??=new Map;let t=e.get(xe.createContext);return t||(t=xe.createContext(null),e.set(xe.createContext,t)),t}(),ct=[null,null];function dt(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function ut(e,t){return e===t}var pt=function(e,t,n,{pure:r,areStatesEqual:o=ut,areOwnPropsEqual:i=ze,areStatePropsEqual:a=ze,areMergedPropsEqual:s=ze,forwardRef:l=!1,context:c=lt}={}){const d=c,u=function(e){return e?"function"==typeof e?Fe(e):je(e,"mapStateToProps"):Le(()=>({}))}(e),p=function(e){return e&&"object"==typeof e?Le(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?Fe(e):je(e,"mapDispatchToProps"):Le(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):je(e,"mergeProps"):()=>ke}(n),f=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:f,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:u,initMapDispatchToProps:p,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function c(t){const[n,o,i]=xe.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),a=xe.useMemo(()=>{let e=d;return function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}}([n,"optionalAccess",e=>e.Consumer]),e},[n,d]),s=xe.useContext(a),l=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),c=Boolean(s)&&Boolean(s.store),u=l?t.store:s.store,p=c?s.getServerState:u.getState,g=xe.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){return function(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,u,p=!1;function g(p,g){const f=!i(g,l),m=!o(p,s,g,l);return s=p,l=g,f&&m?(c=e(s,l),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):f?(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?g(o,i):(s=o,l=i,c=e(s,l),d=t(r,l),u=n(c,d,l),p=!0,u)}}(t(e,o),n(e,o),r(e,o),e,o)}(u.dispatch,r),[u]),[m,b]=xe.useMemo(()=>{if(!f)return ct;const e=We(u,l?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[u,l,s]),h=xe.useMemo(()=>l?s:{...s,subscription:m},[l,s,m]),v=xe.useRef(void 0),y=xe.useRef(i),x=xe.useRef(void 0),I=xe.useRef(!1),E=xe.useRef(!1),D=xe.useRef(void 0);qe(()=>(E.current=!0,()=>{E.current=!1}),[]);const w=xe.useMemo(()=>()=>x.current&&i===y.current?x.current:g(u.getState(),i),[u,i]),C=xe.useMemo(()=>e=>m?function(e,t,n,r,o,i,a,s,l,c,d){if(!e)return()=>{};let u=!1,p=null;const g=()=>{if(u||!s.current)return;const e=t.getState();let n,g;try{n=r(e,o.current)}catch(e){g=e,p=e}g||(p=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,d())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(f,u,m,g,y,v,I,E,x,b,e):()=>{},[m]);var S,A;let P;S=dt,A=[y,v,I,i,x,b],qe(()=>S(...A),undefined);try{P=xe.useSyncExternalStore(C,w,p?()=>g(p(),i):w)}catch(e){throw D.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${D.current.stack}\n\n`),e}qe(()=>{D.current=void 0,x.current=void 0,v.current=P});const O=xe.useMemo(()=>xe.createElement(e,{...P,ref:o}),[o,e,P]);return xe.useMemo(()=>f?xe.createElement(a.Provider,{value:h},O):O,[a,O,h])}const m=xe.memo(c);if(m.WrappedComponent=e,m.displayName=c.displayName=n,l){const t=xe.forwardRef(function(e,t){return xe.createElement(m,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,it(t,e)}return it(m,e)}},gt=function(e){const{children:t,context:n,serverState:r,store:o}=e,i=xe.useMemo(()=>{const e=We(o);return{store:o,subscription:e,getServerState:r?()=>r:void 0}},[o,r]),a=xe.useMemo(()=>o.getState(),[o]);qe(()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==o.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[i,a]);const s=n||lt;return xe.createElement(s.Provider,{value:i},t)};function ft(e=lt){return function(){return xe.useContext(e)}}var mt=ft();function bt(e=lt){const t=e===lt?mt:ft(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var ht=bt();!function(e=lt){const t=e===lt?ht:bt(e),n=()=>t().dispatch;Object.assign(n,{withTypes:()=>n})}();var vt=(e,t)=>e===t;!function(e=lt){const t=e===lt?mt:ft(e),n=(e,n={})=>{const{equalityFn:r=vt}="function"==typeof n?{equalityFn:n}:n,o=t(),{store:i,subscription:a,getServerState:s}=o;xe.useRef(!0);const l=xe.useCallback({[e.name]:t=>e(t)}[e.name],[e]),c=ue.exports.useSyncExternalStoreWithSelector(a.addNestedSub,i.getState,s||i.getState,l,r);return xe.useDebugValue(c),c};Object.assign(n,{withTypes:()=>n})}();var yt=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}}},xt=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},It=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Et={top:0,right:0,bottom:0,left:0},Dt=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?Et:n,o=e.border,i=void 0===o?Et:o,a=e.padding,s=void 0===a?Et:a,l=yt(xt(t,r)),c=yt(It(t,i)),d=yt(It(c,s));return{marginBox:l,borderBox:yt(t),paddingBox:c,contentBox:d,margin:r,border:i,padding:s}},wt=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(){throw new Error("Invariant failed")}(),n},Ct=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 Dt({borderBox:l,border:i,margin:a,padding:s})},St=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Ct(e,t)},At=function(e,t){var n={top:wt(t.marginTop),right:wt(t.marginRight),bottom:wt(t.marginBottom),left:wt(t.marginLeft)},r={top:wt(t.paddingTop),right:wt(t.paddingRight),bottom:wt(t.paddingBottom),left:wt(t.paddingLeft)},o={top:wt(t.borderTopWidth),right:wt(t.borderRightWidth),bottom:wt(t.borderBottomWidth),left:wt(t.borderLeftWidth)};return Dt({borderBox:e,margin:n,padding:r,border:o})},Pt=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return At(t,n)},Ot=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 _t(){return _t=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},_t.apply(null,arguments)}const Nt=e,{useState:Rt}=e,{useRef:Bt}=e,{useEffect:Tt}=e,{useLayoutEffect:Mt}=e,{useContext:Lt}=e,Gt=t,{flushSync:Ft}=t;function jt(e,t){}function kt(){}function $t(e,t,n){const r=t.map(t=>{const r=(o=n,i=t.options,{...o,...i});var o,i;return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}});return function(){r.forEach(e=>{e()})}}jt.bind(null,"warn"),jt.bind(null,"error");class Wt extends Error{}function Ut(e,t){throw new Wt("Invariant failed")}Wt.prototype.toString=function(){return this.message};class Ht extends Nt.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=kt,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof Wt&&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=$t(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof Wt))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const qt=e=>e+1,Vt=(e,t)=>{const n=e.droppableId===t.droppableId,r=qt(e.index),o=qt(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 `},zt=(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 `,Yt=e=>`\n The item has returned to its starting position\n of ${qt(e.index)}\n`,Zt="\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",Jt=e=>`\n You have lifted an item in position ${qt(e.source.index)}\n`,Xt=e=>{const t=e.destination;if(t)return Vt(e.source,t);const n=e.combine;return n?zt(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},Kt=e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${Yt(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${Vt(e.source,t)}\n `:n?`\n You have dropped the item.\n ${zt(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${Yt(e.source)}\n `};function Qt(e,t){return e===t||!(!Number.isNaN(e)||!Number.isNaN(t))}function en(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Qt(e[n],t[n]))return!1;return!0}function tn(e,t){const n=Rt(()=>({inputs:t,result:e()}))[0],r=Bt(!0),o=Bt(n),i=r.current||Boolean(t&&o.current.inputs&&en(t,o.current.inputs))?o.current:{inputs:t,result:e()};return Tt(()=>{r.current=!1,o.current=i},[i]),i.result}function nn(e,t){return tn(()=>e,t)}const rn={x:0,y:0},on=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),an=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),sn=(e,t)=>e.x===t.x&&e.y===t.y,ln=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),cn=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},dn=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),un=(e,t)=>Math.min(...t.map(t=>dn(e,t))),pn=e=>t=>({x:e(t.x),y:e(t.y)}),gn=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),fn=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}],mn=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=yt({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):yt(e);var bn=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=((e,t)=>t?gn(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:mn(i,r)}},hn=(e,t)=>{e.frame||Ut();const n=e.frame,r=an(t,n.scroll.initial),o=ln(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=bn({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function vn(e,t=en){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 yn=vn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),xn=vn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),In=vn(e=>Object.values(e)),En=vn(e=>Object.values(e));var Dn=vn((e,t)=>En(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index));function wn(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Cn(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Sn=vn((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),An=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Pn={point:rn,value:0},On={invisible:{},visible:{},all:[]},_n={displaced:On,displacedBy:Pn,at:null};var Nn=(e,t)=>n=>e<=n&&n<=t,Rn=e=>{const t=Nn(e.top,e.bottom),n=Nn(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;return!(!a||!s)||(a&&i||s&&o)}},Bn=e=>{const t=Nn(e.top,e.bottom),n=Nn(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const Tn={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Mn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Ln=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:rn;return gn(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)},Gn=e=>Ln({...e,isVisibleThroughFrameFn:Bn});function Fn({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 yt(xt(n,r))}(a,n),l=a.descriptor.id;var c;if(e.all.push(l),c={target:s,destination:t,viewport:r,withDroppableDisplacement:!0},!Ln({...c,isVisibleThroughFrameFn:Rn}))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 jn({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:On,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function kn({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=An(e,n);if(null==a)return jn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find(e=>e.descriptor.index===a);if(!c)return jn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const d=Sn(e,t),u=t.indexOf(c);return{displaced:Fn({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 $n(e,t){return Boolean(t.effected[e])}const Wn=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,Un=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,Hn=({axis:e,moveRelativeTo:t,isMoving:n})=>cn(e.line,t.marginBox[e.end]+Wn(e,n),Un(e,t.marginBox,n)),qn=({axis:e,moveRelativeTo:t,isMoving:n})=>cn(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),Un(e,t.marginBox,n));var Vn=(e,t)=>{const n=e.frame;return n?on(t,n.scroll.diff.displacement):t},zn=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?(({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=Dn(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>cn(e.line,t.contentBox[e.start]+Wn(e,n),Un(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($n(d,o))return qn({axis:s,moveRelativeTo:e.page,isMoving:a});const t=Ct(e.page,c.point);return qn({axis:s,moveRelativeTo:t,isMoving:a})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return a.borderBox.center;if($n(u.descriptor.id,o)){const e=Ct(u.page,ln(o.displacedBy.point));return Hn({axis:s,moveRelativeTo:e,isMoving:a})}return Hn({axis:s,moveRelativeTo:u.page,isMoving:a})})({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):(({afterCritical:e,impact:t,draggables:n})=>{const r=Cn(t);r||Ut();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 $n(n,t)?o?rn:ln(r.point):o?r.point:rn})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return on(i,a)})({impact:e,draggables:r,afterCritical:o}):i})(e),n=e.droppable;return n?Vn(n,t):t},Yn=(e,t)=>{const n=an(t,e.scroll.initial),r=ln(n);return{frame:yt({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 Zn(e,t){return e.map(e=>t[e])}var Jn=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=((e,t)=>on(e.scroll.diff.displacement,t))(n,e),o=an(r,t.page.borderBox.center);return on(t.client.borderBox.center,o)},Xn=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=an(n,e.page.borderBox.center),s={target:gn(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?(e=>{return Ln({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=Nn(e.top,e.bottom),r=Nn(e.left,e.right);return e=>t===Tn?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(s):Gn(s)},Kn=({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=Dn(n.descriptor.id,r),d=An(t,n),u=(({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled)return null;if(!wn(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=Sn(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&&Ut();const d=c-1;return d<0?null:i(l[d].descriptor.id)})({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||(({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||Ut(),"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:kn({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 $n(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:kn({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})})({isMovingForward:e,isInHomeList:d,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!u)return null;const p=zn({impact:u,draggable:t,droppable:n,draggables:r,afterCritical:l});if(Xn({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Jn({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:u,scrollJumpRequest:null};const g=an(p,a),f=(({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=Yn(t,on(t.scroll.current,o)),a=n.frame?hn(n,on(n.frame.scroll.current,o)):n,s=e.displaced,l=Fn({afterDragging:Zn(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=Fn({afterDragging:Zn(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:g});return{clientSelection:s,impact:f,scrollJumpRequest:g}};const Qn=e=>{const t=e.subject.active;return t||Ut(),t},er=(e,t)=>{const n=e.page.borderBox.center;return $n(e.descriptor.id,t)?an(n,t.displacedBy.point):n},tr=(e,t)=>{const n=e.page.borderBox;return $n(e.descriptor.id,t)?gn(n,ln(t.displacedBy.point)):n};var nr=vn(function(e,t){const n=t[e.line];return{value:n,point:cn(e.line,n)}});const rr=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),or=(e,t,n)=>{const r=e.frame;An(t,e)&&Ut(),e.subject.withPlaceholder&&Ut();const o=nr(e.axis,t.displaceBy).point,i=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return cn(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],i=Dn(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[r.size],0)+t[r.line]-o;return i<=0?null:cn(r.line,i)})(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=bn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?on(r.scroll.max,i):r.scroll.max,l=rr(r,s),c=bn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var ir=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},ar=({state:e,type:t})=>{const n=((e,t)=>{const n=ir(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?Kn({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,destination:i,draggables:u,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):(({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=Nn(i[a.start],i[a.end]),l=In(r).filter(e=>e!==n).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>Rn(o.frame)(Qn(e))).filter(t=>{const n=Qn(t);return e?i[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<i[a.crossAxisStart]}).filter(e=>{const t=Qn(e),n=Nn(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=Qn(t)[a.crossAxisStart],o=Qn(n)[a.crossAxisStart];return e?r-o:o-r}).filter((e,t,n)=>Qn(e)[a.crossAxisStart]===Qn(n[0])[a.crossAxisStart]);if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter(e=>Nn(Qn(e)[a.start],Qn(e)[a.end])(t[a.line]));return 1===c.length?c[0]:c.length>1?c.sort((e,t)=>Qn(e)[a.start]-Qn(t)[a.start])[0]:l.sort((e,n)=>{const r=un(t,fn(Qn(e))),o=un(t,fn(Qn(n)));return r!==o?r-o:Qn(e)[a.start]-Qn(n)[a.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=Dn(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>{const i=r.filter(e=>Gn({target:tr(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,r)=>{const i=dn(e,Vn(n,er(t,o))),a=dn(e,Vn(n,er(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:On,displacedBy:Pn,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=zn({impact:e,draggable:r,droppable:i,draggables:o,afterCritical:s}),l=An(r,i)?i:or(i,r,o);return Xn({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=nr(i.axis,r.displaceBy);return kn({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:d,last:On,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!u)return null;const p=zn({impact:u,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:Jn({pageBorderBoxCenter:p,draggable:n,viewport:a}),impact:u,scrollJumpRequest:null}})({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,isOver:i,draggables:u,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function sr(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function lr(e){const t=Nn(e.top,e.bottom),n=Nn(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}const cr=(e,t)=>yt(gn(e,t));function dr({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var ur=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=cr(t.page.borderBox,e),l=function({pageBorderBox:e,draggable:t,droppables:n}){const r=In(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(lr(n)(e.center))return!0;const i=t.axis,a=n.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=Nn(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=cn(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:dn(r,o)}}).sort((e,t)=>t.distance-e.distance);return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:r}):null}({pageBorderBox:s,draggable:t,droppables:r});if(!l)return _n;const c=r[l],d=Dn(c.descriptor.id,n),u=((e,t)=>{const n=e.frame;return n?cr(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=nr(r.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],u=Sn(e,o).find(e=>{const t=e.descriptor.id,r=e.page.borderBox,o=r[a.size]/4,s=$n(t,i),u=dr({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=nr(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:Sn(t,r).find(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=$n(t,a),i=dr({displaced:o,id:t});return r?i?u<=n:d<n-c:i?u<=n+c:d<n})||null,inHomeList:An(t,n)});return kn({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})},pr=(e,t)=>({...e,[t.descriptor.id]:t});var gr=({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=an(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:on(e.initial.client.borderBoxCenter,c)},u={selection:on(d.selection,a.scroll.current),borderBoxCenter:on(d.borderBoxCenter,a.scroll.current),offset:on(d.offset,a.scroll.diff.value)},p={client:d,page:u};if("COLLECTING"===e.phase)return{...e,dimensions:s,viewport:a,current:p};const g=s.draggables[e.critical.draggable.id],f=o||ur({pageOffset:u.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=(({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=(({previousImpact:e,impact:t,droppables:n})=>{const r=ir(e),o=ir(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||Ut();const n=e.frame;if(!n){const t=bn({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||Ut();const o=rr(n,r),i=bn({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return pr(n,a)})({previousImpact:r,impact:o,droppables:n}),a=ir(o);if(!a)return i;const s=n[a];if(An(e,s))return i;if(s.subject.withPlaceholder)return i;const l=or(s,e,t);return pr(i,l)})({draggable:g,impact:f,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:m},impact:f,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}},fr=({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=Fn({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},mr=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=zn({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return Jn({pageBorderBoxCenter:a,draggable:t,viewport:o})},br=({state:e,dimensions:t,viewport:n})=>{"SNAP"!==e.movementMode&&Ut();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=ir(r);c||Ut();const d=s[c],u=fr({impact:r,viewport:o,destination:d,draggables:a}),p=mr({impact:u,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return gr({impact:u,clientSelection:p,state:e,dimensions:i,viewport:o})},hr=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=nr(t.axis,e.displaceBy),i=Dn(t.descriptor.id,n),a=i.indexOf(e);-1===a&&Ut();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:Fn({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 vr=e=>"SNAP"===e.movementMode,yr=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:pr(e.droppables,t)}))(e.dimensions,t);return!vr(e)||n?gr({state:e,dimensions:r}):br({state:e,dimensions:r})};function xr(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const Ir={phase:"IDLE",completed:null,shouldFlush:!1};var Er=(e=Ir,t)=>{if("FLUSH"===t.type)return{...Ir,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&Ut();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:rn},d={client:c,page:{selection:on(c.selection,o.scroll.initial),borderBoxCenter:on(c.selection,o.scroll.initial),offset:on(c.selection,o.scroll.diff.value)}},u=In(i.droppables).every(e=>!e.isFixedOnPage),{impact:p,afterCritical:g}=hr({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:g,onLiftImpact:p,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&Ut(),{...e,phase:"COLLECTING"});if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&Ut(),(({state:e,published:t})=>{const n=t.modified.map(t=>{const n=e.dimensions.droppables[t.droppableId];return hn(n,t.scroll)}),r={...e.dimensions.droppables,...yn(n)},o=xn((({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||Ut(),t})(t[o]),a=i.scroll.diff.value,s=(({draggable:e,offset:t,initialWindowScroll:n})=>{const r=Ct(e.client,t),o=St(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}})({draggable:e,offset:on(r,a),initialWindowScroll:n.scroll.initial});return s})})({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=ir(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}=hr({draggable:c,home:d,draggables:i,viewport:e.viewport}),g=l&&l.isCombineEnabled?e.impact:u,f=ur({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:g,viewport:e.viewport,afterCritical:p}),m={...e,phase:"DRAGGING",impact:f,onLiftImpact:u,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?m:{...m,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;sr(e)||Ut();const{client:n}=t.payload;return sn(n,e.current.client.selection)?e:gr({state:e,clientSelection:n,impact:vr(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return xr(e);if("COLLECTING"===e.phase)return xr(e);sr(e)||Ut();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=hn(o,r);return yr(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;sr(e)||Ut();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Ut(),o.isEnabled===r&&Ut();const i={...o,isEnabled:r};return yr(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;sr(e)||Ut();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Ut(),o.isCombineEnabled===r&&Ut();const i={...o,isCombineEnabled:r};return yr(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;sr(e)||Ut(),e.isWindowScrollAllowed||Ut();const n=t.payload.newScroll;if(sn(e.viewport.scroll.current,n))return xr(e);const r=Yn(e.viewport,n);return vr(e)?br({state:e,viewport:r}):gr({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!sr(e))return e;const n=t.payload.maxScroll;if(sn(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&&Ut();const n=ar({state:e,type:t.type});return n?gr({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;return"COLLECTING"!==e.phase&&Ut(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&Ut(),{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 Dr(e,t){return e instanceof Object&&"type"in e&&e.type===t}const wr=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Cr=()=>({type:"COLLECTION_STARTING",payload:null}),Sr=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Ar=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Pr=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Or=e=>({type:"MOVE",payload:e}),_r=()=>({type:"MOVE_UP",payload:null}),Nr=()=>({type:"MOVE_DOWN",payload:null}),Rr=()=>({type:"MOVE_RIGHT",payload:null}),Br=()=>({type:"MOVE_LEFT",payload:null}),Tr=e=>({type:"DROP_COMPLETE",payload:e}),Mr=e=>({type:"DROP",payload:e}),Lr="cubic-bezier(.2,1,.1,1)",Gr=0,Fr=.7,jr=.75,kr={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},$r=`${kr.outOfTheWay}s cubic-bezier(0.2, 0, 0, 1)`,Wr={fluid:`opacity ${$r}`,snap:`transform ${$r}, opacity ${$r}`,drop:e=>{const t=`${e}s ${Lr}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${$r}`,placeholder:`height ${$r}, width ${$r}, margin ${$r}`},Ur=e=>sn(e,rn)?void 0:`translate(${e.x}px, ${e.y}px)`,Hr=Ur,{minDropTime:qr,maxDropTime:Vr}=kr,zr=Vr-qr,Yr=({getState:e,dispatch:t})=>n=>r=>{if(!Dr(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&&Ut(),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&Ut();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})=>n.at&&"DROP"===t?"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:On},didDropInsideDroppable:!0}:{impact:fr({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1})({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?wn(c):null,p=d?Cn(c):null,g={index:a.draggable.index,droppableId:a.droppable.id},f={draggableId:l.descriptor.id,type:l.descriptor.type,source:g,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=ir(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=mr({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return an(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:f,impact:c};if(sn(o.current.client.offset,m)&&!Boolean(f.combine))return void t(Tr({completed:b}));const h=(({current:e,destination:t,reason:n})=>{const r=dn(e,t);if(r<=0)return qr;if(r>=1500)return Vr;const o=qr+zr*(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 Zr=()=>({x:window.pageXOffset,y:window.pageYOffset});const Jr=e=>{const t=function({onWindowScroll:e}){const t=Ot(function(){e(Zr())}),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let r=kt;function o(){return r!==kt}return{start:function(){o()&&Ut(),r=$t(window,[n])},stop:function(){o()||Ut(),t.cancel(),r(),r=kt},isActive:o}}({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{!t.isActive()&&Dr(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>Dr(e,"DROP_COMPLETE")||Dr(e,"DROP_ANIMATE")||Dr(e,"FLUSH"))(n)&&t.stop(),e(n)}};const Xr=(e,t)=>{t()},Kr=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Qr(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 eo=(e,t)=>{const n=((e,t)=>{const n=(()=>{const e=[];return{add:t=>{const n=setTimeout(()=>(t=>{const n=e.findIndex(e=>e.timerId===t);-1===n&&Ut();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()})}}})();let r=null;const o=n=>{r||Ut(),r=null,Xr(0,()=>Qr(e().onDragEnd,n,t,Kt))};return{beforeCapture:(t,n)=>{r&&Ut(),Xr(0,()=>{const r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},beforeStart:(t,n)=>{r&&Ut(),Xr(0,()=>{const r=e().onBeforeDragStart;r&&r(Kr(t,n))})},start:(o,i)=>{r&&Ut();const a=Kr(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add(()=>{Xr(0,()=>Qr(e().onDragStart,a,t,Jt))})},update:(o,i)=>{const a=wn(i),s=Cn(i);r||Ut();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 g={...Kr(o,r.mode),combine:s,destination:a};n.add(()=>{Xr(0,()=>Qr(e().onDragUpdate,g,t,Xt))})},flush:()=>{r||Ut(),n.flush()},drop:o,abort:()=>{if(!r)return;const e={...Kr(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>r=>{if(Dr(r,"BEFORE_INITIAL_CAPTURE"))return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if(Dr(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(Dr(r,"DROP_COMPLETE")){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),Dr(r,"FLUSH"))return void n.abort();const o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}};const to=e=>t=>n=>{if(!Dr(n,"DROP_ANIMATION_FINISHED"))return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&Ut(),e.dispatch(Tr({completed:r.completed}))},no=e=>{let t=null,n=null;return r=>o=>{if((Dr(o,"FLUSH")||Dr(o,"DROP_COMPLETE")||Dr(o,"DROP_ANIMATION_FINISHED"))&&(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),!Dr(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=$t(window,[i])})}};const ro=e=>t=>n=>{if(t(n),!Dr(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Mr({reason:r.reason})))},oo=de;var io=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>{return se(Er,oo(function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(re(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=de(...s)(o.dispatch),{...o,dispatch:i}}}((a=n,()=>e=>t=>{Dr(t,"INITIAL_PUBLISH")&&a.dragging(),Dr(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(Dr(t,"FLUSH")||Dr(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>n=>{(Dr(n,"DROP_COMPLETE")||Dr(n,"FLUSH")||Dr(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>r=>o=>{if(!Dr(o,"LIFT"))return void r(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&n(Tr({completed:l.completed})),"IDLE"!==t().phase&&Ut(),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),Yr,to,no,ro,(e=>t=>n=>r=>{if((e=>Dr(e,"DROP_COMPLETE")||Dr(e,"DROP_ANIMATE")||Dr(e,"FLUSH"))(r))return e.stop(),void n(r);if(Dr(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();return"DRAGGING"!==o.phase&&Ut(),void e.start(o)}n(r),e.scroll(t.getState())})(i),Jr,(e=>{let t=!1;return()=>n=>r=>{if(Dr(r,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if(Dr(r,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(Dr(r,"DROP_COMPLETE")){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),eo(r,o))));var a},ao=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=an({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},so=()=>{const e=document.documentElement;return e||Ut(),e},lo=()=>{const e=so();return ao({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function co(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var uo=(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;const{additions:o,removals:i,modified:a}=n,s=Object.keys(o).map(t=>e.draggable.getById(t).getDimension(rn)).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:{}},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||Ut();const o=n.critical.draggable;"ADDITION"===t.type&&co(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&co(e,o,t.value)&&r.remove(t.value)},i={updateDroppableIsEnabled:(r,o)=>{e.droppable.exists(r)||Ut(),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:(r,o)=>{n&&(e.droppable.exists(r)||Ut(),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)||Ut(),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:t=>{n&&Ut();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},(({critical:e,scrollOptions:t,registry:n})=>{const r=(()=>{const e=Zr(),t=lo(),n=e.y,r=e.x,o=so(),i=o.clientWidth,a=o.clientHeight;return{frame:yt({top:n,left:r,right:r+i,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:rn,displacement:rn}}}})(),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));return{dimensions:{draggables:xn(s),droppables:yn(a)},critical:e,viewport:r}})({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},po=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason,go=e=>{window.scrollBy(e.x,e.y)};const fo=vn(e=>In(e).filter(e=>!!e.isEnabled&&!!e.frame));const mo={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var bo=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return 0===r?0:(n-e)/r},ho=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=((e,t,n=()=>mo)=>{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-bo({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=bo({startOfRange:o,endOfRange:s,current:l}),d=e*r.ease(c);return Math.ceil(d)})(i,n,o),1):i},vo=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,n=()=>mo)=>{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]?ho({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*ho({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const yo=pn(e=>0===e?0:e);var xo=({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=vo({container:t,distanceToEdges:a,dragStartTime:e,axis:Tn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=vo({container:t,distanceToEdges:a,dragStartTime:e,axis:Mn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=yo({x:l,y:s});if(sn(c,rn))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?sn(d,rn)?null:d:null};const Io=pn(e=>0===e?0:e>0?1:-1),Eo=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{const o=on(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return sn(i,rn)?null:i}})(),Do=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=Io(n),i=Eo({max:r,current:t,change:o});return!i||0!==o.x&&0===i.x||0!==o.y&&0===i.y},wo=(e,t)=>Do({current:e.scroll.current,max:e.scroll.max,change:t}),Co=(e,t)=>{const n=e.frame;return!!n&&Do({current:n.scroll.current,max:n.scroll.max,change:t})};var So=({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=xo({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&wo(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=(({center:e,destination:t,droppables:n})=>{if(t){const e=n[t];return e.frame?e:null}const r=((e,t)=>fo(t).find(t=>(t.frame||Ut(),lr(t.frame.pageMarginBox)(e)))||null)(e,n);return r})({center:a,destination:ir(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=xo({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Co(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)};const Ao="data-rfd",Po=(()=>{const e=`${Ao}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Oo=(()=>{const e=`${Ao}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),_o=(()=>{const e=`${Ao}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),No={contextId:`${Ao}-scroll-container-context-id`},Ro=(e,t)=>e.map(e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""}).join(" "),Bo="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?Mt:Tt,To=()=>{const e=document.querySelector("head");return e||Ut(),e},Mo=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Lo(e,t){return Array.from(e.querySelectorAll(t))}var Go=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Fo(e){return e instanceof Go(e).HTMLElement}function jo(){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||Ut(),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||Ut(),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 ko=Nt.createContext(null),$o=()=>{const e=document.body;return e||Ut(),e};const Wo={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Uo={separator:"::"};function Ho(e,t=Uo){const n=Nt.useId();return tn(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}var qo=Nt.createContext(null);function Vo(e){const t=Bt(e);return Tt(()=>{t.current=e}),t}function zo(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const Yo=9,Zo=13,Jo=33,Xo=34,Ko=35,Qo=36,ei={[Zo]:!0,[Yo]:!0};var ti=e=>{ei[e.keyCode]&&e.preventDefault()};const ni=(()=>{const e="visibilitychange";return"undefined"==typeof document?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})(),ri={type:"IDLE"};function oi(){}const ii={[Xo]:!0,[Jo]:!0,[Qo]:!0,[Ko]:!0};const ai={type:"IDLE"},si=["input","button","textarea","select","option","optgroup","video","audio"];function li(e,t){if(null==t)return!1;if(si.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&li(e,t.parentElement)}function ci(e,t){const n=t.target;return!!Fo(n)&&li(e,n)}var di=e=>yt(e.getBoundingClientRect()).center;const ui=(()=>{const e="matches";return"undefined"==typeof document?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function pi(e,t){return null==e?null:e[ui](t)?e:pi(e.parentElement,t)}function gi(e,t){return e.closest?e.closest(t):pi(e,t)}function fi(e){e.preventDefault()}function mi({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!!n()&&e===t}function bi({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!!o&&!!o.options.isEnabled&&!!po(t.getState(),r)}const hi=[function(e){const t=Bt(ri),n=Bt(kt),r=tn(()=>({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,a,{sourceEvent:t});if(!o)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};n.current(),c(o,i)}}),[e]),o=tn(()=>({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]),i=nn(function(){n.current=$t(window,[o,r],{passive:!1,capture:!0})},[o,r]),a=nn(()=>{"IDLE"!==t.current.type&&(t.current=ri,n.current(),i())},[i]),s=nn(()=>{const e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=nn(function(){const e=function({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);if("PENDING"!==s.type&&Ut(),l=s.point,c=a,!(Math.abs(c.x-l.x)>=5||Math.abs(c.y-l.y)>=5))return;var l,c;e.preventDefault();const d=s.actions.fluidLift(a);r({type:"DRAGGING",actions:d})}},{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 ti(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&&Ut(),r.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:ni,fn:e}]}({cancel:s,completed:a,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=$t(window,e,{capture:!0,passive:!1})},[s,a]),c=nn(function(e,n){"IDLE"!==t.current.type&&Ut(),t.current={type:"PENDING",point:n,actions:e},l()},[l]);Bo(function(){return i(),function(){n.current()}},[i])},function(e){const t=Bt(oi),n=tn(()=>({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||Ut(),a=!1,t.current(),r()}t.current(),t.current=$t(window,function(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(ii[r.keyCode]?r.preventDefault():ti(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:ni,fn:n}]}(s,l),{capture:!0,passive:!1})}}),[e]),r=nn(function(){t.current=$t(window,[n],{passive:!1,capture:!0})},[n]);Bo(function(){return r(),function(){t.current()}},[r])},function(e){const t=Bt(ai),n=Bt(kt),r=nn(function(){return t.current},[]),o=nn(function(e){t.current=e},[]),i=tn(()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,s,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:l}=i,c={x:a,y:l};n.current(),u(o,c)}}),[e]),a=nn(function(){n.current=$t(window,[i],{capture:!0,passive:!1})},[i]),s=nn(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(ai),n.current(),a())},[a,o]),l=nn(()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=nn(function(){const e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:r},o=$t(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&&Ut();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:ni,fn:e}]}(t),e),i=$t(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:ni,fn:e}]}(t),e);n.current=function(){o(),i()}},[l,r,s]),d=nn(function(){const e=r();"PENDING"!==e.type&&Ut();const t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})},[r,o]),u=nn(function(e,t){"IDLE"!==r().type&&Ut();const n=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()},[c,r,o,d]);Bo(function(){return a(),function(){n.current();const e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(ai))}},[r,a,o]),Bo(function(){return $t(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function vi({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:o}){const i=[...o?hi:[],...r||[]],a=Rt(()=>function(){let e=null;function t(){e||Ut(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&Ut();const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],s=nn(function(e,t){zo(e)&&!zo(t)&&a.tryAbandon()},[a]);Bo(function(){let e=t.getState();return t.subscribe(()=>{const n=t.getState();s(e,n),e=n})},[a,t,s]),Bo(()=>a.tryAbandon,[a.tryAbandon]);const l=nn(e=>bi({lockAPI:a,registry:n,store:t,draggableId:e}),[a,n,t]),c=nn((r,o,i)=>function({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!bi({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const s=r.draggable.getById(o),l=function(e,t){const n=`[${Oo.contextId}="${e}"]`,r=Lo(document,n).find(e=>e.getAttribute(Oo.id)===t);return r&&Fo(r)?r:null}(t,s.descriptor.id);if(!l)return null;if(a&&!s.options.canDragInteractiveElements&&ci(l,a))return null;const c=e.claim(i||kt);let d="PRE_DRAG";function u(){return s.options.shouldRespectForcePress}function p(){return e.isActive(c)}const g=function(e,t){mi({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function f(t){function r(){e.release(),d="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=$t(window,[{eventName:"click",fn:fi,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(Mr({reason:e}))}return"PRE_DRAG"!==d&&(r(),Ut()),n.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),d="DRAGGING",{isActive:()=>mi({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>mi({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,fluidLift:function(e){const t=Ot(e=>{g(()=>Or({client:e}))});return{...f({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>g(_r),moveRight:()=>g(Rr),moveDown:()=>g(Nr),moveLeft:()=>g(Br)};return f({liftActionArgs:{id:o,clientSelection:di(l),movementMode:"SNAP"},cleanup:kt,actions:e})},abort:function(){mi({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&e.release()}}}({lockAPI:a,registry:n,contextId:e,store:t,draggableId:r,forceSensorStop:o||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[e,a,n,t]),d=nn(t=>function(e,t){const n=function(e,t){const n=t.target;if(!((r=n)instanceof Go(r).Element))return null;var r;const o=function(e){return`[${Po.contextId}="${e}"]`}(e),i=gi(n,o);return i&&Fo(i)?i:null}(e,t);return n?n.getAttribute(Po.draggableId):null}(e,t),[e]),u=nn(e=>{const t=n.draggable.findById(e);return t?t.options:null},[n.draggable]),p=nn(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))},[a,t]),g=nn(()=>a.isClaimed(),[a]),f=tn(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:u,tryReleaseLock:p,isLockClaimed:g}),[l,c,d,u,p,g]);for(let e=0;e<i.length;e++)i[e](f)}function yi(e){return e.current||Ut(),e.current}function xi(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:o,dragHandleUsageInstructions:i}=e,a=Bt(null),s=Vo(e),l=nn(()=>(e=>({onBeforeCapture:t=>{Ft(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(s.current),[s]),c=nn(()=>(e=>({...mo,...e.autoScrollerOptions,durationDampening:{...mo.durationDampening,...e.autoScrollerOptions}}))(s.current),[s]),d=function(e){const t=tn(()=>(e=>`rfd-announcement-${e}`)(e),[e]),n=Bt(null);return Tt(function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),_t(e.style,Wo),$o().appendChild(e),function(){setTimeout(function(){const t=$o();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)})}},[t]),nn(e=>{const t=n.current;t&&(t.textContent=e)},[])}(t),u=function({contextId:e,text:t}){const n=Ho("hidden-text",{separator:"-"}),r=tn(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:n}),[n,e]);return Tt(function(){const e=document.createElement("div");return e.id=r,e.textContent=t,e.style.display="none",$o().appendChild(e),function(){const t=$o();t.contains(e)&&t.removeChild(e)}},[r,t]),r}({contextId:t,text:i}),p=function(e,t){const n=tn(()=>(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(Po.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: ${Wr.outOfTheWay};\n `;return{selector:t(Oo.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(_o.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:Ro(o,"always"),resting:Ro(o,"resting"),dragging:Ro(o,"dragging"),dropAnimating:Ro(o,"dropAnimating"),userCancel:Ro(o,"userCancel")}})(e),[e]),r=Bt(null),o=Bt(null),i=nn(vn(e=>{const t=o.current;t||Ut(),t.textContent=e}),[]),a=nn(e=>{const t=r.current;t||Ut(),t.textContent=e},[]);Bo(()=>{(r.current||o.current)&&Ut();const s=Mo(t),l=Mo(t);return r.current=s,o.current=l,s.setAttribute(`${Ao}-always`,e),l.setAttribute(`${Ao}-dynamic`,e),To().appendChild(s),To().appendChild(l),a(n.always),i(n.resting),()=>{const e=e=>{const t=e.current;t||Ut(),To().removeChild(t),e.current=null};e(r),e(o)}},[t,a,i,n.always,n.resting,e]);const s=nn(()=>i(n.dragging),[i,n.dragging]),l=nn(e=>{i("DROP"!==e?n.userCancel:n.dropAnimating)},[i,n.dropAnimating,n.userCancel]),c=nn(()=>{o.current&&i(n.resting)},[i,n.resting]);return tn(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}(t,o),g=nn(e=>{yi(a).dispatch(e)},[]),f=tn(()=>ce({publishWhileDragging:wr,updateDroppableScroll:Sr,updateDroppableIsEnabled:Ar,updateDroppableIsCombineEnabled:Pr,collectionStarting:Cr},g),[g]),m=function(){const e=tn(jo,[]);return Tt(()=>function(){e.clean()},[e]),e}(),b=tn(()=>uo(m,f),[m,f]),h=tn(()=>(({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>mo})=>{const r=Ot(e),o=Ot(t);let i=null;const a=e=>{i||Ut();const{shouldUseTimeDampening:t,dragStartTime:a}=i;So({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{i&&Ut();const t=Date.now();let r=!1;const o=()=>{r=!0};So({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:n}),i={dragStartTime:t,shouldUseTimeDampening:r},r&&a(e)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=(({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(e,n)=>{if(!Co(e,n))return n;const r=((e,t)=>{const n=e.frame;return n&&Co(e,t)?Eo({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!r)return t(e.descriptor.id,n),null;const o=an(n,r);return t(e.descriptor.id,o),an(n,o)},o=(e,t,r)=>{if(!e)return r;if(!wo(t,r))return r;const o=((e,t)=>{if(!wo(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return Eo({current:r,max:n,change:t})})(t,r);if(!o)return n(r),null;const i=an(r,o);return n(i),an(r,i)};return t=>{const n=t.scrollJumpRequest;if(!n)return;const i=ir(t.impact);i||Ut();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=on(t.current.client.selection,n);e({client:r})})(t,l)}})({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}})({scrollWindow:go,scrollDroppable:b.scrollDroppable,getAutoScrollerOptions:c,...ce({move:Or},g)}),[b.scrollDroppable,g,c]),v=function(e){const t=Bt({}),n=Bt(null),r=Bt(null),o=Bt(!1),i=nn(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]}},[]),a=nn(function(t){const n=function(e,t){const n=`[${Po.contextId}="${e}"]`,r=Lo(document,n);if(!r.length)return null;const o=r.find(e=>e.getAttribute(Po.draggableId)===t);return o&&Fo(o)?o:null}(e,t);n&&n!==document.activeElement&&n.focus()},[e]),s=nn(function(e,t){n.current===e&&(n.current=t)},[]),l=nn(function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const e=n.current;e&&a(e)}))},[a]),c=nn(function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(Po.draggableId)===e&&(n.current=e)},[]);return Bo(()=>(o.current=!0,function(){o.current=!1;const e=r.current;e&&cancelAnimationFrame(e)}),[]),tn(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}(t),y=tn(()=>io({announce:d,autoScroller:h,dimensionMarshal:b,focusMarshal:v,getResponders:l,styleMarshal:p}),[d,h,b,v,l,p]);a.current=y;const x=nn(()=>{const e=yi(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),I=nn(()=>{const e=yi(a).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);n(tn(()=>({isDragging:I,tryAbort:x}),[I,x]));const E=nn(e=>po(yi(a).getState(),e),[]),D=nn(()=>sr(yi(a).getState()),[]),w=tn(()=>({marshal:b,focus:v,contextId:t,canLift:E,isMovementAllowed:D,dragHandleUsageInstructionsId:u,registry:m}),[t,b,u,v,E,D,m]);return vi({contextId:t,store:y,registry:m,customSensors:r||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),Tt(()=>x,[x]),Nt.createElement(qo.Provider,{value:w},Nt.createElement(gt,{context:ko,store:y},e.children))}function Ii(e){const t=Nt.useId(),n=e.dragHandleUsageInstructions||Zt;return Nt.createElement(Ht,null,r=>Nt.createElement(xi,{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 Ei=(e,t)=>t?Wr.drop(t.duration):e?Wr.snap:Wr.fluid,Di=(e,t)=>{if(e)return t?Gr:Fr};function wi(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?((e,t)=>{const n=Ur(e);if(n)return t?`${n} scale(${jr})`:n})(n,i):Hr(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Ei(a,o),transform:l,opacity:Di(i,s),zIndex:s?4500:5e3,pointerEvents:"none"}}(e):{transform:Hr((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}var Ci=Nt.createContext(null);function Si(e){const t=Lt(e);return t||Ut(),t}function Ai(e){e.preventDefault()}var Pi=(e,t)=>e===t,Oi=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function _i(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Ni={mapped:{type:"SECONDARY",offset:rn,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:_i(null)}},Ri=pt(()=>{const e=function(){const e=vn((e,t)=>({x:e,y:t})),t=vn((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=vn((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(zo(r)){if(r.critical.draggable.id!==o.draggableId)return null;const t=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=ir(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=Oi(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:r.dropDuration,curve:Lr,moveTo:r.newHomeClientOffset,opacity:c?Gr:null,scale:c?jr: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=vn((e,t)=>({x:e,y:t})),t=vn(_i),n=vn((e,n=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}})),r=e=>e?n(rn,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=Cn(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return r(d);if(i.displaced.invisible[t])return null;const o=ln(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(zo(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)||Ni},{dropAnimationFinished:()=>({type:"DROP_ANIMATION_FINISHED",payload:null})},null,{context:ko,areStatePropsEqual:Pi})(e=>{const t=Bt(null),n=nn((e=null)=>{t.current=e},[]),r=nn(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=Si(qo),{type:s,droppableId:l}=Si(Ci),c=tn(()=>({id:e.draggableId,index:e.index,type:s,droppableId:l}),[e.draggableId,e.index,s,l]),{children:d,draggableId:u,isEnabled:p,shouldRespectForcePress:g,canDragInteractiveElements:f,isClone:m,mapped:b,dropAnimationFinished:h}=e;m||function(e){const t=Ho("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=tn(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=nn(e=>{const t=o();return t||Ut(),function(e,t,n=rn){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=At(o,r),a=St(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,o]),d=tn(()=>({uniqueId:t,descriptor:n,options:l,getDimension:c}),[n,c,l,t]),u=Bt(d),p=Bt(!0);Bo(()=>(r.draggable.register(u.current),()=>r.draggable.unregister(u.current)),[r.draggable]),Bo(()=>{if(p.current)return void(p.current=!1);const e=u.current;u.current=d,r.draggable.update(d,e)},[d,r.draggable])}(tn(()=>({descriptor:c,registry:a,getDraggableRef:r,canDragInteractiveElements:f,shouldRespectForcePress:g,isEnabled:p}),[c,a,r,f,g,p]));const v=tn(()=>p?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":u,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:Ai}:null,[o,i,u,p]),y=nn(e=>{"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&Ft(h)},[h,b]),x=tn(()=>{const e=wi(b),t="DRAGGING"===b.type&&b.dropping?y:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":u,style:e,onTransitionEnd:t},dragHandleProps:v}},[o,v,u,b,y,n]),I=tn(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Nt.createElement(Nt.Fragment,null,d(x,b.snapshot,I))});function Bi(e){return Si(Ci).isUsingCloneFor!==e.draggableId||e.isClone?Nt.createElement(Ri,e):null}function Ti(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return Nt.createElement(Bi,_t({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const Mi=e=>t=>e===t,Li=Mi("scroll"),Gi=Mi("auto"),Fi=(e,t)=>t(e.overflowX)||t(e.overflowY),ji=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Fi(n,Li)||Fi(n,Gi)})(e)?e:ji(e.parentElement);var ki=e=>({x:e.scrollLeft,y:e.scrollTop});const $i=e=>!!e&&("fixed"===window.getComputedStyle(e).position||$i(e.parentElement));const Wi={passive:!1},Ui={passive:!0};var Hi=e=>e.shouldPublishImmediately?Wi:Ui;const qi=e=>e&&e.env.closestScrollable||null;function Vi(e){const t=Bt(null),n=Si(qo),r=Ho("droppable"),{registry:o,marshal:i}=n,a=Vo(e),s=tn(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=Bt(s),c=tn(()=>vn((e,n)=>{t.current||Ut();const r={x:e,y:n};i.updateDroppableScroll(s.id,r)}),[s.id,i]),d=nn(()=>{const e=t.current;return e&&e.env.closestScrollable?ki(e.env.closestScrollable):rn},[]),u=nn(()=>{const e=d();c(e.x,e.y)},[d,c]),p=tn(()=>Ot(u),[u]),g=nn(()=>{const e=t.current,n=qi(e);e&&n||Ut(),e.scrollOptions.shouldPublishImmediately?u():p()},[p,u]),f=nn((e,r)=>{t.current&&Ut();const o=a.current,i=o.getDroppableRef();i||Ut();const l={closestScrollable:ji(c=i),isFixedOnPage:$i(c)};var c;const d={ref:i,descriptor:s,env:l,scrollOptions:r};t.current=d;const u=(({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=Pt(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=xt({top:r,right:a,bottom:i,left:o},n.border);return Dt({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})})(e,l),d=St(c,r),u=(()=>{if(!l)return null;const e=Pt(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:St(e,r),scroll:ki(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=ao({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:rn,displacement:rn}}}})(),c="vertical"===o?Tn:Mn;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:bn({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})({ref:i,descriptor:s,env:l,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),p=l.closestScrollable;return p&&(p.setAttribute(No.contextId,n.contextId),p.addEventListener("scroll",g,Hi(d.scrollOptions))),u},[n.contextId,s,g,a]),m=nn(()=>{const e=t.current,n=qi(e);return e&&n||Ut(),ki(n)},[]),b=nn(()=>{const e=t.current;e||Ut();const n=qi(e);t.current=null,n&&(p.cancel(),n.removeAttribute(No.contextId),n.removeEventListener("scroll",g,Hi(e.scrollOptions)))},[g,p]),h=nn(e=>{const n=t.current;n||Ut();const r=qi(n);r||Ut(),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),v=tn(()=>({getDimensionAndWatchScroll:f,getScrollWhileDragging:m,dragStopped:b,scroll:h}),[b,f,m,h]),y=tn(()=>({uniqueId:r,descriptor:s,callbacks:v}),[v,s,r]);Bo(()=>(l.current=y.descriptor,o.droppable.register(y),()=>{t.current&&b(),o.droppable.unregister(y)}),[v,s,b,y,i,o.droppable]),Bo(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Bo(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function zi(){}const Yi={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};var Zi=Nt.memo(e=>{const t=Bt(null),n=nn(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=Rt("open"===e.animate);Tt(()=>s?"open"!==r?(n(),l(!1),zi):t.current?zi:(t.current=setTimeout(()=>{t.current=null,l(!1)}),n):zi,[r,s,n]);const c=nn(e=>{"height"===e.propertyName&&(o(),"close"===r&&i())},[r,i,o]),d=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||"close"===n?Yi:{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?Wr.placeholder:null}})({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return Nt.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})});class Ji extends Nt.PureComponent{constructor(...e){super(...e),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}const Xi={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||Ut(),document.body}},Ki=e=>{let t,n={...e};for(t in Xi)void 0===e[t]&&(n={...n,[t]:Xi[t]});return n},Qi=(e,t)=>e===t.droppable.type,ea=(e,t)=>t.draggables[e.draggable.id],ta=pt(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=vn(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),r=vn((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=Ki(o),a=i.droppableId,s=i.type,l=!i.isDropDisabled,c=i.renderClone;if(zo(n)){const e=n.critical;if(!Qi(s,e))return t;const o=ea(e,n.dimensions),i=ir(n.impact)===a;return r(a,l,i,i,o,c)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!Qi(s,e.critical))return t;const o=ea(e.critical,n.dimensions);return r(a,l,Oi(e.result)===a,ir(e.impact)===a,o,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!Qi(s,r.critical))return t;const o=ir(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)=>({...Ki(n),...e,...t}),{context:ko,areStatePropsEqual:Pi})(e=>{const t=Lt(qo);t||Ut();const{contextId:n,isMovementAllowed:r}=t,o=Bt(null),i=Bt(null),{children:a,droppableId:s,type:l,mode:c,direction:d,ignoreContainerClipping:u,isDropDisabled:p,isCombineEnabled:g,snapshot:f,useClone:m,updateViewportMaxScroll:b,getContainerForClone:h}=e,v=nn(()=>o.current,[]),y=nn((e=null)=>{o.current=e},[]);nn(()=>i.current,[]);const x=nn((e=null)=>{i.current=e},[]),I=nn(()=>{r()&&b({maxScroll:lo()})},[r,b]);Vi({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:p,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:v});const E=tn(()=>Nt.createElement(Ji,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:r})=>Nt.createElement(Zi,{placeholder:t,onClose:e,innerRef:x,animate:r,contextId:n,onTransitionEnd:I})),[n,I,e.placeholder,e.shouldAnimatePlaceholder,x]),D=tn(()=>({innerRef:y,placeholder:E,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,E,y]),w=m?m.dragging.draggableId:null,C=tn(()=>({droppableId:s,type:l,isUsingCloneFor:w}),[s,w,l]);return Nt.createElement(Ci.Provider,{value:C},a(D,f),function(){if(!m)return null;const{dragging:e,render:t}=m,n=Nt.createElement(Bi,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(n,r)=>t(n,r,e));return Gt.createPortal(n,h())}())}),{Menu:na}=n,{MenuItem:ra}=n,{IconButton:oa}=n,{MoreVert:ia}=r,{MoreHoriz:aa}=r,sa=o,la=e;class ca extends la.Component{static __initStatic(){this.propTypes={opts:sa.object,onClick:sa.func.isRequired}}constructor(e){super(e),ca.prototype.__init.call(this),ca.prototype.__init2.call(this),this.state={anchorEl:void 0,open:!1}}__init(){this.handleClick=e=>this.setState({open:!0,anchorEl:e.currentTarget})}__init2(){this.handleRequestClose=()=>this.setState({open:!1})}render(){const{opts:e,onClick:t}=this.props,{open:n,anchorEl:r}=this.state,o=Object.keys(e)||[],i=e=>()=>{t(e),this.handleRequestClose()},a=n?"inherit":"disabled";return la.createElement("div",null,la.createElement("div",{onClick:this.handleClick},la.createElement(oa,{size:"large"},n?la.createElement(ia,{color:a}):la.createElement(aa,{color:a}))),la.createElement(na,{id:"point-menu",anchorEl:r,open:n,onClose:this.handleRequestClose,style:{transform:"translate(-15px, -15px)"},transformOrigin:{vertical:"center",horizontal:"right"}},o.map((t,n)=>la.createElement(ra,{key:n,onClick:i(t)},e[t]))))}}ca.__initStatic();class da extends la.Component{static __initStatic2(){this.propTypes={onChange:sa.func.isRequired,showSampleAnswer:sa.bool.isRequired}}render(){const{onChange:e,showSampleAnswer:t}=this.props,n=t?"Provide Sample Response":"Remove Sample Response";return la.createElement(ca,{onClick:t=>e(t),opts:{sample:n}})}}da.__initStatic2();const ua=e,pa=o,{styled:ga}=i,{InputLabel:fa}=n,{OutlinedInput:ma}=n,{Select:ba}=n,{FormControl:ha}=n,{MenuItem:va}=n,{Checkbox:ya}=n,{FormGroup:xa}=n,{FormControlLabel:Ia}=n,{Typography:Ea}=n,{DragIndicator:Da}=r,wa=a,{grey:Ca}=s,Sa=d,{InputContainer:Aa}=c,Pa=wa("pie-lib:rubric:authoring"),Oa=(e,t,n)=>{const r=Array.from(e),[o]=r.splice(t,1);return r.splice(n,0,o),r},_a=pa.shape({excludeZero:pa.bool,points:pa.arrayOf(pa.string),sampleAnswers:pa.arrayOf(pa.string),maxPoints:pa.number,rubriclessInstruction:pa.string}),Na=e=>{const{value:t,onChange:n,max:r}=e,o="max-points-label";return ua.createElement(ha,{sx:{minWidth:120,m:1},variant:"outlined"},ua.createElement(fa,{id:o},"Max Points"),ua.createElement(ba,{labelId:o,label:"Max Points",value:t,onChange:e=>n(e.target.value),input:ua.createElement(ma,{label:"Max Points"}),MenuProps:{transitionDuration:{enter:225,exit:195}}},K(1,r+1).map(e=>ua.createElement(va,{key:`${e}`,value:e},e))))},Ra=e=>null===e||"null"===e,Ba=ga("div")(()=>({display:"flex",width:"100%",position:"relative"})),Ta=ga("div")(({theme:e})=>({width:"100%",backgroundColor:`${e.palette.common.white}`})),Ma=ga(Da)(({theme:e})=>({paddingTop:e.spacing(1),color:Ca[500]})),La=ga(Ea)(({theme:e})=>({color:Ca[500],paddingBottom:e.spacing(1),textTransform:"uppercase"})),Ga=ga("div")(({theme:e})=>({paddingLeft:e.spacing(3)})),Fa=ga("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingLeft:e.spacing(3),paddingTop:e.spacing(1)})),ja=ga("div")(()=>({position:"absolute",right:0})),ka=e=>{const{points:t,content:n,sampleAnswer:r,mathMlOptions:o={},error:i,pluginOpts:a={}}=e,s=`${t} ${t<=1?"pt":"pts"}`,l=Ra(r);return ua.createElement("div",null,ua.createElement(La,{variant:"overline"},s),ua.createElement(Ba,null,ua.createElement(Ma,null),ua.createElement(Ta,null,ua.createElement(Sa,{error:i,pluginProps:a,markup:n,onChange:e.onChange,mathMlOptions:o})),ua.createElement(ja,null,ua.createElement(da,{showSampleAnswer:l,onChange:e.onMenuChange}))),i&&ua.createElement(Fa,null,i),!l&&ua.createElement(Ga,null,ua.createElement(Ma,{as:Ea,variant:"overline"},"Sample Response"),ua.createElement(Ta,null,ua.createElement(Sa,{markup:r,pluginProps:a,onChange:e.onSampleChange,mathMlOptions:o}))))},$a=ga("div")(({theme:e})=>({backgroundColor:Ca[200],borderWidth:1,borderStyle:"solid",borderColor:Ca[300],padding:e.spacing(2),margin:e.spacing(1)})),Wa=ga(Aa)(({theme:e})=>({width:"100%",paddingTop:e.spacing(2.5),marginBottom:e.spacing(2),marginTop:e.spacing(1),"& .MuiFormControl-root":{width:"100%"},"& > .MuiFormLabel-root.MuiInputLabel-shrink":{fontSize:e.typography.fontSize+2,transform:"translate(0, 1.5px) scale(0.75)"}})),Ua=ga("div")(()=>({display:"none"})),Ha=ga("div")(({theme:e})=>({paddingTop:e.spacing(1),paddingBottom:e.spacing(1)})),qa=ga(Ea)(({theme:e})=>({paddingLeft:e.spacing(1),margin:e.spacing(1)}));class Va extends ua.Component{constructor(...e){super(...e),Va.prototype.__init.call(this),Va.prototype.__init2.call(this),Va.prototype.__init3.call(this),Va.prototype.__init4.call(this),Va.prototype.__init5.call(this),Va.prototype.__init6.call(this),Va.prototype.__init7.call(this),Va.prototype.__init8.call(this),Va.prototype.__init9.call(this)}static __initStatic(){this.propTypes={value:_a,config:pa.object,pluginOpts:pa.object,rubricless:pa.bool,onChange:pa.func}}static __initStatic2(){this.defaultProps={}}__init(){this.dragEnd=e=>{if(!e.destination)return;const{value:t,onChange:n}=this.props,r=Oa(t.points,e.source.index,e.destination.index),o=Oa(t.sampleAnswers,e.source.index,e.destination.index);n({...t,points:r,sampleAnswers:o})}}__init2(){this.changeRubriclessInstruction=e=>{const{value:t,onChange:n}=this.props;n({...t,rubriclessInstruction:e})}}__init3(){this.changeMaxPoints=e=>{const{value:t,onChange:n,rubricless:r}=this.props,o=t.points.length-1;let i,a;Pa("current",o,"new: ",e),e>o&&(i=ne(e-o).map(()=>"").concat(t.points),a=ne(e-o).map(()=>null).concat(t.sampleAnswers)),e<o&&(Pa("less than"),i=Q(t.points,e+1),a=Q(t.sampleAnswers,e+1)),n(i&&!r?{...t,points:i,sampleAnswers:a,maxPoints:e}:{...t,maxPoints:e})}}__init4(){this.changeContent=(e,t,n)=>{if(Pa(`changeModel[${n}]:`,e,t),"points"!==n&&"sampleAnswers"!==n)return;const{value:r,onChange:o}=this.props,i=r[n]&&Array.from(r[n]);i.splice(e,1,t),Pa(`changeModel[${n}]:`,i),o({...r,[n]:i})}}__init5(){this.excludeZeros=()=>{const{value:e,onChange:t}=this.props;t({...e,excludeZero:!e.excludeZero})}}__init6(){this.getPointForIndex=(e,t)=>(t.excludeZero?t.points.length-1+1:t.points.length-1)-e}__init7(){this.getMaxPoint=e=>e.excludeZero?e.points.length:e.points.length-1}__init8(){this.shouldRenderPoint=(e,t)=>this.getPointForIndex(e,t)>0||!t.excludeZero}__init9(){this.onPointMenuChange=(e,t)=>{if("sample"===t){const{value:t}=this.props,n=Array.from(t.sampleAnswers||[]);Ra(n[e])?this.changeContent(e,"","sampleAnswers"):this.changeContent(e,null,"sampleAnswers")}}}render(){const{value:e,mathMlOptions:t={},config:n={},rubricless:r=!1,pluginOpts:o={}}=this.props;let{excludeZeroEnabled:i=!0,maxPointsEnabled:a=!0,errors:s={},rubriclessInstructionEnabled:l=!1,maxPoints:c=10}=e||{};const{rubriclessInstruction:d={},maxMaxPoints:u=10}=n||{},{pointsDescriptorsErrors:p}=s||{};e&&Number.isFinite(e.maxPoints)&&console.warn("maxPoints is deprecated - remove from model");const g=r?c:e.excludeZero?e.points.length:e.points.length-1;return ua.createElement("div",null,ua.createElement(qa,{variant:"h5"},"Rubric"),ua.createElement(xa,{row:!0},a&&ua.createElement(Na,{max:u<100?u:100,value:g,onChange:this.changeMaxPoints,pluginOpts:o}),i&&ua.createElement(Ia,{label:"Exclude zeros",control:ua.createElement(ya,{checked:e.excludeZero,onChange:this.excludeZeros})})),l&&r&&ua.createElement(Wa,{label:d.label},ua.createElement(Sa,{markup:e.rubriclessInstruction||"",onChange:this.changeRubriclessInstruction,pluginProps:o,nonEmpty:!1,disableUnderline:!0,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:t,autoWidthToolbar:!0})),ua.createElement("div",null,r?ua.createElement(Ua,null):ua.createElement($a,null,ua.createElement(Ii,{onDragEnd:this.dragEnd},ua.createElement(ta,{droppableId:"droppable"},n=>ua.createElement("div",{...n.droppableProps,ref:n.innerRef},e.points.map((n,r)=>this.shouldRenderPoint(r,e)&&ua.createElement(Ti,{key:`${n.points}-${r}`,index:r,draggableId:r.toString()},i=>ua.createElement(Ha,{ref:i.innerRef,...i.draggableProps,...i.dragHandleProps},ua.createElement(ka,{points:this.getPointForIndex(r,e),content:n,error:p&&p[e.points.length-1-r],sampleAnswer:e.sampleAnswers&&e.sampleAnswers[r],onChange:e=>this.changeContent(r,e,"points"),onSampleChange:e=>this.changeContent(r,e,"sampleAnswers"),onMenuChange:e=>this.onPointMenuChange(r,e),mathMlOptions:t,pluginOpts:o})))),n.placeholder))))))}}Va.__initStatic(),Va.__initStatic2();const za=e=>{const{rubricless:t=!1,config:n={},pluginOpts:r={}}=e||{},o=Array.from(e.value.points||[]).reverse();let i=Array.from(e.value.sampleAnswers||[]).reverse();o.length>i.length&&(i=ne(o.length-i.length).map(()=>null).concat(i));const a={...e.value,points:o,sampleAnswers:i};return ua.createElement(Va,{value:a,config:n,onChange:t=>{e.onChange({...t,points:Array.from(t.points||[]).reverse(),sampleAnswers:Array.from(t.sampleAnswers||[]).reverse()})},rubricless:t,pluginOpts:r})};za.propTypes={value:_a,config:pa.object,pluginOpts:pa.object,rubricless:pa.bool,getIndex:pa.func,onChange:pa.func};var Ya=function(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}(Object.freeze({__proto__:null,Authoring:za,RUBRIC_TYPES:{SIMPLE_RUBRIC:"simpleRubric",MULTI_TRAIT_RUBRIC:"multiTraitRubric",RUBRICLESS:"rubricless"}}));const Za=e,Ja=i,Xa=c;function Ka(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}var Qa=f.exports;Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var es=Qa(m.exports),ts=Qa(Za),ns=Ya,rs=Ja,os=Xa;const{Panel:is,toggle:as}=os.settings,ss=(0,rs.styled)("div")(({theme:e,width:t})=>({maxWidth:t,fontFamily:"Cerebri Sans",fontSize:e.typography.fontSize}));class ls extends ts.default.Component{constructor(...e){super(...e),(0,es.default)(this,"verifyRubriclessModel",(e,t)=>{const{rubricless:n=!1}=t||{};return n?(({points:e,sampleAnswers:t,...n})=>n)(e):e})}render(){const{model:e,configuration:t,onConfigurationChanged:n,onModelChanged:r,imageSupport:o}=this.props||{},{baseInputConfiguration:i={},contentDimensions:a={},settingsPanelDisabled:s,showExcludeZero:l={},showMaxPoint:c={},mathMlOptions:d={},rubricless:u=!1,rubriclessInstruction:p,width:g}=t||{},f=this.verifyRubriclessModel(e,t),{extraCSSRules:m}=e,b={excludeZeroEnabled:l.settings&&as(l.label),maxPointsEnabled:c.settings&&as(c.label),rubriclessInstructionEnabled:u&&p.settings&&as(p.label)};return ts.default.createElement(os.layout.ConfigLayout,{extraCSSRules:m,dimensions:a,hideSettings:s,settings:ts.default.createElement(is,{model:e,onChangeModel:r,configuration:t,onChangeConfiguration:n,pluginOpts:(h=Ka([p,"optionalAccess",e=>e.inputConfiguration]),Object.assign({...i},h||{})),groups:{Properties:b},imageSupport:o})},ts.default.createElement(ss,{width:g},ts.default.createElement(ns.Authoring,{value:f,config:t,onChange:r,mathMlOptions:d,rubricless:u,pluginOpts:i,imageSupport:o})));var h}}C.default=ls;var cs={};Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0,cs.default={model:{points:["","","",""],sampleAnswers:[null,null,null,null],maxPoints:3,excludeZero:!1,excludeZeroEnabled:!0,maxPointsEnabled:!0},configuration:{baseInputConfiguration:{h3:{disabled:!0},audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1},textAlign:{disabled:!0},showParagraphs:{disabled:!1},separateParagraphs:{disabled:!0}},rubriclessInstruction:{inputConfiguration:{audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1}}},showExcludeZero:{settings:!0,label:"Ability to exclude zero"},showMaxPoint:{settings:!0,label:"Show max points dropdown"},settingsPanelDisabled:!1,mathMlOptions:{mmlOutput:!1,mmlEditing:!1},maxMaxPoints:9}};const ds=e,us=l,ps=a;function gs(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}var fs=f.exports;Object.defineProperty(g,"__esModule",{value:!0});var ms=g.default=void 0,bs=fs(m.exports),hs=y,vs=fs(ds),ys=us,xs=fs(ps),Is=fs(C),Es=fs(cs);const Ds=e=>({...Es.default.model,...e}),ws=e=>({...Es.default.configuration,...e});class Cs extends HTMLElement{constructor(){super(),(0,bs.default)(this,"updateModelAccordingToReceivedProps",e=>{const t={...this._model};if(!e)return t;const n={...e};1===n.maxPoints&&(n.excludeZero=!1);const{maxPoints:r,excludeZero:o}=n||{};n.points=n.points?[...n.points]:[],n.sampleAnswers=n.sampleAnswers?[...n.sampleAnswers]:[];const i=o?r:r+1,a=n.points.length,s=gs([t,"optionalAccess",e=>e.excludeZero])!==gs([e,"optionalAccess",e=>e.excludeZero]),l=gs([t,"optionalAccess",e=>e.maxPoints])!==gs([e,"optionalAccess",e=>e.maxPoints]);if(a<i){if(s&&!o&&(n.points=["",...n.points],n.sampleAnswers=[null,...n.sampleAnswers]),l)for(let e=0;e<i-a;e++)n.points.push(""),n.sampleAnswers.push(null)}else a>i&&(s&&o&&(n.points=n.points.slice(1),n.sampleAnswers=n.sampleAnswers.slice(1)),l&&(n.points=n.points.slice(0,i),n.sampleAnswers=n.sampleAnswers.slice(0,i)));return n}),(0,bs.default)(this,"onConfigurationChanged",e=>{this._configuration=ws(e),this._model&&this.onModelChanged(this._model),this._render()}),this._root=null,xs.default.log("constructor called"),this._model=Ds(),this._configuration=ws(),this.onModelChanged=this.onModelChanged.bind(this),this.onConfigurationChanged=this.onConfigurationChanged.bind(this)}set model(e){this._model=this.updateModelAccordingToReceivedProps(Ds(e)),this._render()}set configuration(e){this._configuration=ws(e),this._render()}onModelChanged(e){this._model=this.updateModelAccordingToReceivedProps(e),this._render(),this.dispatchEvent(new hs.ModelUpdatedEvent(this._model,!1))}insertImage(e){this.dispatchEvent(new hs.InsertImageEvent(e))}onDeleteImage(e,t){this.dispatchEvent(new hs.DeleteImageEvent(e,t))}connectedCallback(){this._render()}_render(){if(this._model){let e=vs.default.createElement(Is.default,{model:this._model,configuration:this._configuration,onModelChanged:this.onModelChanged,onConfigurationChanged:this.onConfigurationChanged,imageSupport:{add:this.insertImage.bind(this),delete:this.onDeleteImage.bind(this)}});this._root||(this._root=(0,ys.createRoot)(this)),this._root.render(e)}}disconnectedCallback(){this._root&&this._root.unmount()}}ms=g.default=Cs;export{ms as default};
|