@pie-element/complex-rubric 7.1.0-next.19 → 7.1.0-next.28

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/module/print.js CHANGED
@@ -1 +1 @@
1
- import{_dll_react as e,_dll_mui__material_styles as t,_dll_mui__material as r,_dll_mui__material_collapse as n,_dll_pie_lib__render_ui as o,_dll_prop_types as i,_dll_react_dom_client as a,_dll_debug as s,_dll_mui__icons_material as l,_dll_react_dom as c,_dll_mui__material_colors as d}from"../../../@pie-lib/shared-module@^5.2.1/module/index.js";import{_dll_pie_lib__math_rendering as u}from"../../../@pie-lib/math-rendering-module@^5.0.6/module/index.js";import{_dll_pie_lib__editable_html_tip_tap as p}from"../../../@pie-lib/editable-html-module@^7.1.3/module/index.js";import{_dll_pie_lib__config_ui as g}from"../../../@pie-lib/config-module@^4.0.6/module/index.js";const m=e,{styled:f}=t,{ListItem:b}=r,{List:h}=r,v=n,{color:y}=o,{UiLayout:x}=o,E=i,I=f(x)({color:y.text(),backgroundColor:y.background(),"&:not(.MathJax) table":{borderCollapse:"collapse"},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:"8px 12px",textAlign:"left"},"& ul p, & ol p":{marginBottom:0,marginTop:0,lineHeight:"normal"}}),D=f(b)({display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px 0px"}),w=f("div")({color:y.text()}),S=f("h3")({color:y.text(),fontSize:"16px",fontWeight:"700",margin:0,paddingBottom:"6px"}),C=f("h4")({color:y.text(),fontSize:"16px",fontWeight:"normal",margin:0,paddingBottom:"6px"}),P=f("h2")(({theme:e})=>({display:"flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:e.typography.fontSize,fontWeight:"500",color:y.tertiary(),margin:0})),O=f("span")({display:"inline-flex",transition:"transform 0.2s",marginLeft:2,alignSelf:"center"}),A=f("h2")({position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0,whiteSpace:"nowrap"}),R=E.shape({excludeZero:E.bool,points:E.arrayOf(E.string),sampleAnswers:E.arrayOf(E.string),animationsDisabled:E.bool});class _ extends m.Component{__init(){this.dudUrl="javascript:;"}constructor(e){super(e),_.prototype.__init.call(this),_.prototype.__init2.call(this),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}static __initStatic(){this.propTypes={model:E.object.isRequired,animationsDisabled:E.bool,value:R}}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}__init2(){this.shouldRenderPoint=(e,t)=>!t.excludeZero||0!==e}render(){const{model:e,value:t}=this.props;let{animationsDisabled:r}=this.props;if(r=r||t.animationsDisabled,t&&t.points){const{extraCSSRules:n}=e||{},{points:o,sampleAnswers:i}=t,a=m.createElement(h,{component:"nav"},o.slice(0).reverse().map((e,r)=>{r=o.length-r-1;const n=t.excludeZero?r+1:r;return m.createElement(m.Fragment,{key:r},m.createElement(D,{key:`P${r}`},m.createElement(S,null,1===n?`${n} PT`:`${n} PTS`),m.createElement(w,{dangerouslySetInnerHTML:{__html:e}})),i&&i[r]&&m.createElement(D,{key:`S${r}`},m.createElement(C,null,"Sample Answer"),m.createElement(w,{dangerouslySetInnerHTML:{__html:i[r]}})))}));return m.createElement(I,{extraCSSRules:n},m.createElement(A,null,"Rubric"),r?a:m.createElement(m.Fragment,null,m.createElement(P,{id:"rubric-toggle",tabIndex:0,role:"button","aria-expanded":this.state.rubricOpen,onClick:this.toggleRubric,onKeyPress:e=>{"Enter"!==e.key&&" "!==e.key||this.toggleRubric()}},this.state.linkPrefix," Rubric",m.createElement(O,{"aria-hidden":"true"},this.state.rubricOpen?m.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},m.createElement("polyline",{points:"18 15 12 9 6 15"})):m.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},m.createElement("polyline",{points:"6 9 12 15 18 9"})))),m.createElement(v,{in:this.state.rubricOpen,timeout:{enter:225,exit:195}},a)))}return null}}_.__initStatic();const B=e,{createRoot:N}=a,T=s,{renderMath:L}=u;class M extends HTMLElement{constructor(){super(),T.log("constructor called"),this.onModelChanged=this.onModelChanged.bind(this),this._root=null}set model(e){this._model=e,this._render()}onModelChanged(e){this._model=e,this._render()}connectedCallback(){this._render()}_render(){if(this._model){const e=B.createElement(_,{value:this._model});this._root||(this._root=N(this)),this._root.render(e),queueMicrotask(()=>{L(this)})}}disconnectedCallback(){this._root&&this._root.unmount()}}var k={};Object.defineProperty(k,"__esModule",{value:!0});class G extends CustomEvent{constructor(e,t,r){super(G.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e,hasModel:r}}),this.component=e,this.complete=t}}G.TYPE="model-set";var W=k.ModelSetEvent=G;class F extends CustomEvent{constructor(e,t){super(F.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e}}),this.component=e,this.complete=t}}F.TYPE="session-changed",k.SessionChangedEvent=F;const $=e,j=i,{styled:U}=t,{color:H}=o,q=U("td")({color:H.primaryDark(),verticalAlign:"middle"}),V=U("div")({color:H.secondaryBackground(),textAlign:"center"}),z=e=>{const{trait:t,traitIndex:r,scaleIndex:n,showStandards:o,showDescription:i,scorePointsValues:a}=e,{name:s,standards:l,scorePointsDescriptors:c,description:d}=t||{};return $.createElement("tr",{key:`scale-${n}-trait-${r}`},$.createElement(q,null,$.createElement("div",{dangerouslySetInnerHTML:{__html:s}})),o?$.createElement("td",null,$.createElement("div",{dangerouslySetInnerHTML:{__html:l.join(",")}})):null,i?$.createElement("td",null,$.createElement("div",{dangerouslySetInnerHTML:{__html:d}})):null,a&&a.map((e,t)=>{let r;try{r=c[a.length-t-1]||""}catch(e){r=""}return $.createElement("td",{key:`table-cell-${t}`},r?$.createElement("div",{dangerouslySetInnerHTML:{__html:r}}):$.createElement(V,{dangerouslySetInnerHTML:{__html:"No Description"}}))}))};z.propTypes={showStandards:j.bool,showDescription:j.bool,scorePointsValues:j.arrayOf(j.number),scaleIndex:j.number,traitIndex:j.number,trait:j.shape({name:j.string,standards:j.arrayOf(j.string),scorePointsDescriptors:j.arrayOf(j.string),description:j.string})};const Y=e,Z=i,{styled:J}=t,{color:X}=o,{ArrowBackIos:K}=l,{ArrowForwardIos:Q}=l,ee=J("div")({display:"flex",position:"relative"}),te=J("div")({width:"100%",overflow:"auto"}),re=J("table")(({theme:e})=>({borderSpacing:0,marginBottom:e.spacing(2),borderRadius:"4px",color:X.text(),fontSize:e.typography.fontSize,lineHeight:"16px",overflow:"unset","& ul, ol":{marginBlockStart:0,paddingInlineStart:e.spacing(2)},"& th":{padding:e.spacing(2),textAlign:"left",backgroundColor:X.secondaryBackground(),verticalAlign:"bottom"},"& th div":{width:"200px"},"& td":{width:"200px",padding:`${e.spacing(2)} ${e.spacing(1)}`,verticalAlign:"top"}})),ne=J("table")({"& td":{border:0,padding:0,textAlign:"center",minWidth:"200px"}}),oe=J("div")({marginBottom:"4px"}),ie=J("td")({fontWeight:"normal"}),ae=({show:e,onClick:t,extraStyles:r,children:n})=>Y.createElement("div",{style:{height:"calc(100% - 1px)",top:"1px",display:e?"flex":"none",width:"50px",margin:"auto",position:"absolute",alignItems:"center",justifyContent:"center",cursor:"pointer",...r},onClick:t},n);ae.propTypes={show:Z.bool,onClick:Z.func,extraStyles:Z.object,children:Z.object};class se extends Y.Component{constructor(...e){super(...e),se.prototype.__init.call(this),se.prototype.__init2.call(this),se.prototype.__init3.call(this)}__init(){this.state={}}componentDidMount(){this.tableWrapper&&this.tableWrapper.offsetWidth<this.tableWrapper.scrollWidth&&this.setState({showRight:!0})}__init2(){this.scrollLeft=()=>{this.tableWrapper.scrollLeft-=this.tableWrapper.offsetWidth/2,this.setState({showRight:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}}__init3(){this.scrollRight=()=>{const e=this.tableWrapper.scrollLeft;this.tableWrapper.scrollLeft+=this.tableWrapper.offsetWidth/2,this.setState({showRight:e!==this.tableWrapper.scrollLeft&&this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}}render(){const{showRight:e,showLeft:t}=this.state,{scale:r,scaleIndex:n,showDescription:o,showPointsLabels:i,showStandards:a,arrowsDisabled:s}=this.props,{excludeZero:l,maxPoints:c,traitLabel:d,traits:u,scorePointsLabels:p}=r||{};let g,m,f,b=[];try{for(let e=c;e>=l;e-=1)b.push(e);const{traitStandards:e,traitDescriptions:t}=u.reduce((e,t)=>({traitStandards:[...e.traitStandards,...t.standards||[]],traitDescriptions:[...e.traitDescriptions,...t.description||[]]}),{traitStandards:[],traitDescriptions:[]});g=o&&t.length,m=i&&p.length,f=a&&e.length}catch(e){g=!1,m=!1,f=!1}return Y.createElement(ee,null,Y.createElement(ae,{show:t&&!s,onClick:this.scrollLeft,extraStyles:{left:0,background:`linear-gradient(to right, white, ${X.background()})`}},Y.createElement(K,null)),Y.createElement(te,{ref:e=>{this.tableWrapper=e},onScroll:()=>{this.setState({showRight:this.tableWrapper.scrollLeft+this.tableWrapper.offsetWidth<this.tableWrapper.scrollWidth-5&&this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}},s&&(e||t)?Y.createElement("div",null,"The item is too large to fit in print mode."):null,Y.createElement(re,{key:`scale-${n}`},Y.createElement("thead",null,Y.createElement("tr",null,Y.createElement("th",null,Y.createElement("div",{dangerouslySetInnerHTML:{__html:d}})),f?Y.createElement("th",null,Y.createElement("div",null,"Standard(s)")):null,g?Y.createElement("th",null,Y.createElement("div",null,"Description")):null,b&&b.map((e,t)=>{let r="";try{r=p[b.length-t-1]||""}catch(e){r=""}return Y.createElement("th",{key:`table-header-${t}`},Y.createElement(ne,null,Y.createElement("thead",null,m?Y.createElement("tr",null,Y.createElement("td",null,Y.createElement(oe,{dangerouslySetInnerHTML:{__html:r}}))):null,Y.createElement("tr",null,Y.createElement(ie,null,1===e?`${e} point`:`${e} points`)))))}))),Y.createElement("tbody",null,u&&u.map((e,t)=>Y.createElement(z,{key:`trait_${n}_${t}`,trait:e,traitIndex:t,showDescription:!!g,showStandards:!!f,scaleIndex:n,scorePointsValues:b,excludeZero:l}))))),Y.createElement(ae,{show:e&&!s,onClick:this.scrollRight,extraStyles:{right:0,background:`linear-gradient(to left, white, ${X.background()})`}},Y.createElement(Q,null)))}}se.propTypes={scaleIndex:Z.number,scale:Z.shape({excludeZero:Z.bool,maxPoints:Z.number,scorePointsLabels:Z.arrayOf(Z.string),traitLabel:Z.string,traits:Z.arrayOf(Z.shape({name:Z.string,standards:Z.arrayOf(Z.string),scorePointsDescriptors:Z.arrayOf(Z.string),description:Z.string}))}),showPointsLabels:Z.bool,showDescription:Z.bool,showStandards:Z.bool,arrowsDisabled:Z.bool};const le=e,ce=i,{Link:de}=r,ue=n,{color:pe}=o,{UiLayout:ge}=o;class me extends le.Component{constructor(e){super(e),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}render(){const{model:e}=this.props;let{animationsDisabled:t}=this.props;const{extraCSSRules:r,halfScoring:n,scales:o,visible:i,pointLabels:a,description:s,standards:l,arrowsDisabled:c}=e||{};if(t=t||e.animationsDisabled,!o||!i)return null;const d=le.createElement(ge,{extraCSSRules:r,style:{fontFamily:"Cerebri Sans",color:pe.text(),backgroundColor:pe.background()}},n?le.createElement("div",{style:{marginBottom:"16px"}},"* Half-point or in-between scores are permitted under this rubric."):null,o.map((e,t)=>le.createElement(se,{key:`scale_${t}`,scale:e,scaleIndex:t,showPointsLabels:a,showDescription:s,showStandards:l,arrowsDisabled:c})));return t?d:le.createElement(ge,{extraCSSRules:r,style:{color:pe.text(),backgroundColor:pe.background()}},le.createElement(de,{style:{backgroundColor:pe.background()},href:this.dudUrl,onClick:this.toggleRubric},this.state.linkPrefix," Rubric"),le.createElement(ue,{style:{marginTop:"16px"},in:this.state.rubricOpen,timeout:{enter:225,exit:195}},d))}}me.propTypes={model:ce.shape({halfScoring:ce.bool,scales:ce.arrayOf(ce.shape({excludeZero:ce.bool,maxPoints:ce.number,scorePointsLabels:ce.arrayOf(ce.string),traitLabel:ce.string,traits:ce.arrayOf(ce.shape({name:ce.string,description:ce.string,scorePointsDescriptors:ce.arrayOf(ce.string),standards:ce.arrayOf(ce.string)}))})),visible:ce.bool,pointLabels:ce.bool,description:ce.bool,standards:ce.bool,animationsDisabled:ce.bool}),animationsDisabled:ce.bool};const fe=e,{createRoot:be}=a,{renderMath:he}=u;class ve extends HTMLElement{constructor(){super(),this._model={},this._session=null,this._root=null}set model(e){this._model=e,this.dispatchEvent(new W(this.tagName.toLowerCase(),this._session,!!this._model)),this._render()}set session(e){this._session=e}get session(){return this._session}connectedCallback(){this._render()}_render(){const e=fe.createElement(me,{model:this._model,session:this._session});this._root||(this._root=be(this)),this._root.render(e),queueMicrotask(()=>{he(this)})}disconnectedCallback(){this._root&&this._root.unmount()}}var ye="object"==typeof global&&global&&global.Object===Object&&global,xe="object"==typeof self&&self&&self.Object===Object&&self,Ee=(ye||xe||Function("return this")()).Symbol,Ie=Object.prototype,De=Ie.hasOwnProperty,we=Ie.toString,Se=Ee?Ee.toStringTag:void 0;var Ce=Object.prototype.toString;var Pe=Ee?Ee.toStringTag:void 0;function Oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Pe&&Pe in Object(e)?function(e){var t=De.call(e,Se),r=e[Se];try{e[Se]=void 0;var n=!0}catch(e){}var o=we.call(e);return n&&(t?e[Se]=r:delete e[Se]),o}(e):function(e){return Ce.call(e)}(e)}var Ae=/\s/;var Re=/^\s+/;function _e(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Ae.test(e.charAt(t)););return t}(e)+1).replace(Re,""):e}function Be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Ne=/^[-+]0x[0-9a-f]+$/i,Te=/^0b[01]+$/i,Le=/^0o[0-7]+$/i,Me=parseInt;function ke(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]"==Oe(e)}(e))return NaN;if(Be(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Be(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=_e(e);var r=Te.test(e);return r||Le.test(e)?Me(e.slice(2),r?2:8):Ne.test(e)?NaN:+e}var Ge=1/0;function We(e){return e?(e=ke(e))===Ge||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Fe(e){var t=We(e),r=t%1;return t==t?r?t-r:t:0}function $e(e){return e}var je=/^(?:0|[1-9]\d*)$/;function Ue(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){if(!Be(e))return!1;var t=Oe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)}function He(e,t,r){if(!Be(r))return!1;var n=typeof t;return!!("number"==n?Ue(r)&&function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&je.test(e))&&e>-1&&e%1==0&&e<t}(t,r.length):"string"==n&&t in r)&&function(e,t){return e===t||e!=e&&t!=t}(r[t],e)}var qe=Math.ceil,Ve=Math.max;var ze,Ye=function(e,t,r){return r&&"number"!=typeof r&&He(e,t,r)&&(t=r=void 0),e=We(e),void 0===t?(t=e,e=0):t=We(t),function(e,t,r,n){for(var o=-1,i=Ve(qe((t-e)/(r||1)),0),a=Array(i);i--;)a[n?i:++o]=e,e+=r;return a}(e,t,r=void 0===r?e<t?1:-1:We(r),ze)},Ze=Ye;function Je(e,t,r){var n=null==e?0:e.length;return n?function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}(e,(t=n-(t=r||void 0===t?1:Fe(t)))<0?0:t,n):[]}var Xe=4294967295,Ke=Math.min;function Qe(e,t){if((e=Fe(e))<1||e>9007199254740991)return[];var r,n=Xe,o=Ke(e,Xe);e-=Xe;for(var i=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(o,t="function"==typeof(r=t)?r:$e);++n<e;)t(n);return i}function et(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 tt="function"==typeof Symbol&&Symbol.observable||"@@observable",rt=()=>Math.random().toString(36).substring(7).split("").join("."),nt={INIT:`@@redux/INIT${rt()}`,REPLACE:`@@redux/REPLACE${rt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${rt()}`};function ot(e,t,r){if("function"!=typeof e)throw new Error(et(2));if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(et(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(et(1));return r(ot)(e,t)}let n=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(et(3));return o}function u(e){if("function"!=typeof e)throw new Error(et(4));if(l)throw new Error(et(5));let t=!0;c();const r=s++;return a.set(r,e),function(){if(t){if(l)throw new Error(et(6));t=!1,c(),a.delete(r),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(et(7));if(void 0===e.type)throw new Error(et(8));if("string"!=typeof e.type)throw new Error(et(17));if(l)throw new Error(et(9));try{l=!0,o=n(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}p({type:nt.INIT});return{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(et(10));n=e,p({type:nt.REPLACE})},[tt]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(et(11));function r(){const e=t;e.next&&e.next(d())}r();return{unsubscribe:e(r)}},[tt](){return this}}}}}function it(e,t){return function(...r){return t(e.apply(this,r))}}function at(e,t){if("function"==typeof e)return it(e,t);if("object"!=typeof e||null===e)throw new Error(et(16));const r={};for(const n in e){const o=e[n];"function"==typeof o&&(r[n]=it(o,t))}return r}function st(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}var lt={exports:{}},ct={};var dt=e;var ut="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},pt=dt.useSyncExternalStore,gt=dt.useRef,mt=dt.useEffect,ft=dt.useMemo,bt=dt.useDebugValue;ct.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var i=gt(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=ft(function(){function e(e){if(!l){if(l=!0,i=e,e=n(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return s=t}return s=e}if(t=s,ut(i,e))return t;var r=n(e);return void 0!==o&&o(t,r)?(i=e,t):(i=e,s=r)}var i,s,l=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,n,o]);var s=pt(e,i[0],i[1]);return mt(function(){a.hasValue=!0,a.value=s},[s]),bt(s),s},lt.exports=ct;const ht=e;var vt=ht.version.startsWith("19"),yt=Symbol.for(vt?"react.transitional.element":"react.element"),xt=Symbol.for("react.portal"),Et=Symbol.for("react.fragment"),It=Symbol.for("react.strict_mode"),Dt=Symbol.for("react.profiler"),wt=Symbol.for("react.consumer"),St=Symbol.for("react.context"),Ct=Symbol.for("react.forward_ref"),Pt=Symbol.for("react.suspense"),Ot=Symbol.for("react.suspense_list"),At=Symbol.for("react.memo"),Rt=Symbol.for("react.lazy"),_t=Ct,Bt=At;function Nt(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case yt:switch(e=e.type){case Et:case Dt:case It:case Pt:case Ot:return e;default:switch(e=e&&e.$$typeof){case St:case Ct:case Rt:case At:case wt:return e;default:return t}}case xt:return t}}}(e)===At}function Tt(e,t,r,n,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,u,p=!1;function g(p,g){const m=!i(g,l),f=!o(p,s,g,l);return s=p,l=g,m&&f?(c=e(s,l),t.dependsOnOwnProps&&(d=t(n,l)),u=r(c,d,l),u):m?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(d=t(n,l)),u=r(c,d,l),u):f?function(){const t=e(s,l),n=!a(t,c);return c=t,n&&(u=r(c,d,l)),u}():u}return function(o,i){return p?g(o,i):(s=o,l=i,c=e(s,l),d=t(n,l),u=r(c,d,l),p=!0,u)}}function Lt(e){return function(t){const r=e(t);function n(){return r}return n.dependsOnOwnProps=!1,n}}function Mt(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function kt(e,t){return function(t,{displayName:r}){const n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=Mt(e);let o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=Mt(o),o=n(t,r)),o},n}}function Gt(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function Wt(e,t,r){return{...r,...e,...t}}var Ft={notify(){},get:()=>[]};function $t(e,t){let r,n=Ft,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,r||(r=t?t.addNestedSub(a):e.subscribe(a),n=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 r=e;for(;r;)t.push(r),r=r.next;return t},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){n&&null!==e&&(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function l(){o--,r&&0===o&&(r(),r=void 0,n.clear(),n=Ft)}const c={addNestedSub:function(e){s();const t=n.subscribe(e);let r=!1;return()=>{r||(r=!0,t(),l())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>n};return c}var jt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Ut="undefined"!=typeof navigator&&"ReactNative"===navigator.product,Ht=jt||Ut?ht.useLayoutEffect:ht.useEffect;function qt(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Vt(e,t){if(qt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!qt(e[r[n]],t[r[n]]))return!1;return!0}var zt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Yt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Zt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Jt={[_t]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Bt]:Zt};function Xt(e){return Nt(e)?Zt:Jt[e.$$typeof]||zt}var Kt=Object.defineProperty,Qt=Object.getOwnPropertyNames,er=Object.getOwnPropertySymbols,tr=Object.getOwnPropertyDescriptor,rr=Object.getPrototypeOf,nr=Object.prototype;function or(e,t){if("string"!=typeof t){if(nr){const r=rr(t);r&&r!==nr&&or(e,r)}let r=Qt(t);er&&(r=r.concat(er(t)));const n=Xt(e),o=Xt(t);for(let i=0;i<r.length;++i){const a=r[i];if(!(Yt[a]||o&&o[a]||n&&n[a])){const r=tr(t,a);try{Kt(e,a,r)}catch(e){}}}}return e}var ir=Symbol.for("react-redux-context"),ar="undefined"!=typeof globalThis?globalThis:{};var sr=function(){if(!ht.createContext)return{};const e=ar[ir]??=new Map;let t=e.get(ht.createContext);return t||(t=ht.createContext(null),e.set(ht.createContext,t)),t}(),lr=[null,null];function cr(e,t,r,n,o,i){e.current=n,r.current=!1,o.current&&(o.current=null,i())}function dr(e,t){return e===t}var ur=function(e,t,r,{pure:n,areStatesEqual:o=dr,areOwnPropsEqual:i=Vt,areStatePropsEqual:a=Vt,areMergedPropsEqual:s=Vt,forwardRef:l=!1,context:c=sr}={}){const d=c,u=function(e){return e?"function"==typeof e?kt(e):Gt(e,"mapStateToProps"):Lt(()=>({}))}(e),p=function(e){return e&&"object"==typeof e?Lt(t=>function(e,t){const r={};for(const n in e){const o=e[n];"function"==typeof o&&(r[n]=(...e)=>t(o(...e)))}return r}(e,t)):e?"function"==typeof e?kt(e):Gt(e,"mapDispatchToProps"):Lt(e=>({dispatch:e}))}(t),g=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:r,areMergedPropsEqual:n}){let o,i=!1;return function(t,r,a){const s=e(t,r,a);return i?n(s,o)||(o=s):(i=!0,o=s),o}}}(e):Gt(e,"mergeProps"):()=>Wt}(r),m=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",r=`Connect(${t})`,n={shouldHandleStateChanges:m,displayName:r,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:u,initMapDispatchToProps:p,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function c(t){const[r,o,i]=ht.useMemo(()=>{const{reactReduxForwardedRef:e,...r}=t;return[t.context,e,r]},[t]),a=ht.useMemo(()=>{let e=d;return function(e){let t,r=e[0],n=1;for(;n<e.length;){const o=e[n],i=e[n+1];if(n+=2,("optionalAccess"===o||"optionalCall"===o)&&null==r)return;"access"===o||"optionalAccess"===o?(t=r,r=i(r)):"call"!==o&&"optionalCall"!==o||(r=i((...e)=>r.call(t,...e)),t=void 0)}}([r,"optionalAccess",e=>e.Consumer]),e},[r,d]),s=ht.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=ht.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:n,...o}){return Tt(t(e,o),r(e,o),n(e,o),e,o)}(u.dispatch,n),[u]),[f,b]=ht.useMemo(()=>{if(!m)return lr;const e=$t(u,l?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[u,l,s]),h=ht.useMemo(()=>l?s:{...s,subscription:f},[l,s,f]),v=ht.useRef(void 0),y=ht.useRef(i),x=ht.useRef(void 0),E=ht.useRef(!1),I=ht.useRef(!1),D=ht.useRef(void 0);Ht(()=>(I.current=!0,()=>{I.current=!1}),[]);const w=ht.useMemo(()=>()=>x.current&&i===y.current?x.current:g(u.getState(),i),[u,i]),S=ht.useMemo(()=>e=>f?function(e,t,r,n,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 r,g;try{r=n(e,o.current)}catch(e){g=e,p=e}g||(p=null),r===i.current?a.current||c():(i.current=r,l.current=r,a.current=!0,d())};return r.onStateChange=g,r.trySubscribe(),g(),()=>{if(u=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}(m,u,f,g,y,v,E,I,x,b,e):()=>{},[f]);var C,P,O;let A;C=cr,P=[y,v,E,i,x,b],Ht(()=>C(...P),O);try{A=ht.useSyncExternalStore(S,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}Ht(()=>{D.current=void 0,x.current=void 0,v.current=A});const R=ht.useMemo(()=>ht.createElement(e,{...A,ref:o}),[o,e,A]);return ht.useMemo(()=>m?ht.createElement(a.Provider,{value:h},R):R,[a,R,h])}const f=ht.memo(c);if(f.WrappedComponent=e,f.displayName=c.displayName=r,l){const t=ht.forwardRef(function(e,t){return ht.createElement(f,{...e,reactReduxForwardedRef:t})});return t.displayName=r,t.WrappedComponent=e,or(t,e)}return or(f,e)}};var pr=function(e){const{children:t,context:r,serverState:n,store:o}=e,i=ht.useMemo(()=>{const e=$t(o);return{store:o,subscription:e,getServerState:n?()=>n:void 0}},[o,n]),a=ht.useMemo(()=>o.getState(),[o]);Ht(()=>{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=r||sr;return ht.createElement(s.Provider,{value:i},t)};function gr(e=sr){return function(){return ht.useContext(e)}}var mr=gr();function fr(e=sr){const t=e===sr?mr:gr(e),r=()=>{const{store:e}=t();return e};return Object.assign(r,{withTypes:()=>r}),r}var br=fr();!function(e=sr){const t=e===sr?br:fr(e),r=()=>t().dispatch;Object.assign(r,{withTypes:()=>r})}();var hr=(e,t)=>e===t;!function(e=sr){const t=e===sr?mr:gr(e),r=(e,r={})=>{const{equalityFn:n=hr}="function"==typeof r?{equalityFn:r}:r,o=t(),{store:i,subscription:a,getServerState:s}=o;ht.useRef(!0);const l=ht.useCallback({[e.name]:t=>e(t)}[e.name],[e]),c=lt.exports.useSyncExternalStoreWithSelector(a.addNestedSub,i.getState,s||i.getState,l,n);return ht.useDebugValue(c),c};Object.assign(r,{withTypes:()=>r})}();var vr="Invariant failed";var yr=function(e){var t=e.top,r=e.right,n=e.bottom,o=e.left;return{top:t,right:r,bottom:n,left:o,width:r-o,height:n-t,x:o,y:t,center:{x:(r+o)/2,y:(n+t)/2}}},xr=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Er=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Ir={top:0,right:0,bottom:0,left:0},Dr=function(e){var t=e.borderBox,r=e.margin,n=void 0===r?Ir:r,o=e.border,i=void 0===o?Ir:o,a=e.padding,s=void 0===a?Ir:a,l=yr(xr(t,n)),c=yr(Er(t,i)),d=yr(Er(c,s));return{marginBox:l,borderBox:yr(t),paddingBox:c,contentBox:d,margin:n,border:i,padding:s}},wr=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var r=Number(t);return isNaN(r)&&function(e){if(!e)throw new Error(vr)}(!1),r},Sr=function(e,t){var r,n,o=e.borderBox,i=e.border,a=e.margin,s=e.padding,l=(n=t,{top:(r=o).top+n.y,left:r.left+n.x,bottom:r.bottom+n.y,right:r.right+n.x});return Dr({borderBox:l,border:i,margin:a,padding:s})},Cr=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Sr(e,t)},Pr=function(e,t){var r={top:wr(t.marginTop),right:wr(t.marginRight),bottom:wr(t.marginBottom),left:wr(t.marginLeft)},n={top:wr(t.paddingTop),right:wr(t.paddingRight),bottom:wr(t.paddingBottom),left:wr(t.paddingLeft)},o={top:wr(t.borderTopWidth),right:wr(t.borderRightWidth),bottom:wr(t.borderBottomWidth),left:wr(t.borderLeftWidth)};return Dr({borderBox:e,margin:r,padding:n,border:o})},Or=function(e){var t=e.getBoundingClientRect(),r=window.getComputedStyle(e);return Pr(t,r)},Ar=function(e){var t=[],r=null,n=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];t=o,r||(r=requestAnimationFrame(function(){r=null,e.apply(void 0,t)}))};return n.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},n};function Rr(){return Rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rr.apply(null,arguments)}const _r=e,{useState:Br}=e,{useRef:Nr}=e,{useEffect:Tr}=e,{useLayoutEffect:Lr}=e,{useContext:Mr}=e,kr=c,{flushSync:Gr}=c;function Wr(e,t){}function Fr(){}function $r(e,t,r){const n=t.map(t=>{const n=(o=r,i=t.options,{...o,...i});var o,i;return e.addEventListener(t.eventName,t.fn,n),function(){e.removeEventListener(t.eventName,t.fn,n)}});return function(){n.forEach(e=>{e()})}}Wr.bind(null,"warn"),Wr.bind(null,"error");class jr extends Error{}function Ur(e,t){throw new jr("Invariant failed")}jr.prototype.toString=function(){return this.message};class Hr extends _r.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=Fr,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort();e.error instanceof jr&&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=$r(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof jr))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const qr=e=>e+1,Vr=(e,t)=>{const r=e.droppableId===t.droppableId,n=qr(e.index),o=qr(t.index);return r?`\n You have moved the item from position ${n}\n to position ${o}\n `:`\n You have moved the item from position ${n}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${o}\n `},zr=(e,t,r)=>t.droppableId===r.droppableId?`\n The item ${e}\n has been combined with ${r.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${r.draggableId}\n in list ${r.droppableId}\n `,Yr=e=>`\n The item has returned to its starting position\n of ${qr(e.index)}\n`,Zr={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:e=>`\n You have lifted an item in position ${qr(e.source.index)}\n`,onDragUpdate:e=>{const t=e.destination;if(t)return Vr(e.source,t);const r=e.combine;return r?zr(e.draggableId,e.source,r):"You are over an area that cannot be dropped on"},onDragEnd:e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${Yr(e.source)}\n `;const t=e.destination,r=e.combine;return t?`\n You have dropped the item.\n ${Vr(e.source,t)}\n `:r?`\n You have dropped the item.\n ${zr(e.draggableId,e.source,r)}\n `:`\n The item has been dropped while not over a drop area.\n ${Yr(e.source)}\n `}};function Jr(e,t){return e===t||!(!Number.isNaN(e)||!Number.isNaN(t))}function Xr(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Jr(e[r],t[r]))return!1;return!0}function Kr(e,t){const r=Br(()=>({inputs:t,result:e()}))[0],n=Nr(!0),o=Nr(r),i=n.current||Boolean(t&&o.current.inputs&&Xr(t,o.current.inputs))?o.current:{inputs:t,result:e()};return Tr(()=>{n.current=!1,o.current=i},[i]),i.result}function Qr(e,t){return Kr(()=>e,t)}const en={x:0,y:0},tn=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),rn=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),nn=(e,t)=>e.x===t.x&&e.y===t.y,on=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),an=(e,t,r=0)=>"x"===e?{x:t,y:r}:{x:r,y:t},sn=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),ln=(e,t)=>Math.min(...t.map(t=>sn(e,t))),cn=e=>t=>({x:e(t.x),y:e(t.y)});const dn=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),un=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}],pn=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const r=yr({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r})(t.pageMarginBox,e):yr(e);var gn=({page:e,withPlaceholder:t,axis:r,frame:n})=>{const o=((e,t)=>t?dn(e,t.scroll.diff.displacement):e)(e.marginBox,n),i=((e,t,r)=>r&&r.increasedBy?{...e,[t.end]:e[t.end]+r.increasedBy[t.line]}:e)(o,r,t);return{page:e,withPlaceholder:t,active:pn(i,n)}},mn=(e,t)=>{e.frame||Ur();const r=e.frame,n=rn(t,r.scroll.initial),o=on(n),i={...r,scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}},a=gn({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function fn(e,t=Xr){let r=null;function n(...n){if(r&&r.lastThis===this&&t(n,r.lastArgs))return r.lastResult;const o=e.apply(this,n);return r={lastResult:o,lastArgs:n,lastThis:this},o}return n.clear=function(){r=null},n}const bn=fn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),hn=fn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),vn=fn(e=>Object.values(e)),yn=fn(e=>Object.values(e));var xn=fn((e,t)=>{const r=yn(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index);return r});function En(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function In(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Dn=fn((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),wn=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Sn={point:en,value:0},Cn={invisible:{},visible:{},all:[]},Pn={displaced:Cn,displacedBy:Sn,at:null};var On=(e,t)=>r=>e<=r&&r<=t,An=e=>{const t=On(e.top,e.bottom),r=On(e.left,e.right);return n=>{if(t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right))return!0;const o=t(n.top)||t(n.bottom),i=r(n.left)||r(n.right);if(o&&i)return!0;const a=n.top<e.top&&n.bottom>e.bottom,s=n.left<e.left&&n.right>e.right;if(a&&s)return!0;return a&&i||s&&o}},Rn=e=>{const t=On(e.top,e.bottom),r=On(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&r(e.left)&&r(e.right)};const _n={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Bn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};const Nn=({target:e,destination:t,viewport:r,withDroppableDisplacement:n,isVisibleThroughFrameFn:o})=>{const i=n?((e,t)=>{const r=t.frame?t.frame.scroll.diff.displacement:en;return dn(e,r)})(e,t):e;return((e,t,r)=>!!t.subject.active&&r(t.subject.active)(e))(i,t,o)&&((e,t,r)=>r(t)(e))(i,r,o)},Tn=e=>Nn({...e,isVisibleThroughFrameFn:Rn});function Ln({afterDragging:e,destination:t,displacedBy:r,viewport:n,forceShouldAnimate:o,last:i}){return e.reduce(function(e,a){const s=function(e,t){const r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return yr(xr(r,n))}(a,r),l=a.descriptor.id;e.all.push(l);var c;if(!(c={target:s,destination:t,viewport:n,withDroppableDisplacement:!0},Nn({...c,isVisibleThroughFrameFn:An})))return e.invisible[a.descriptor.id]=!0,e;const d=((e,t,r)=>{if("boolean"==typeof r)return r;if(!t)return!0;const{invisible:n,visible:o}=t;if(n[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 Mn({insideDestination:e,inHomeList:t,displacedBy:r,destination:n}){const o=function(e,t){if(!e.length)return 0;const r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}(e,{inHomeList:t});return{displaced:Cn,displacedBy:r,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function kn({draggable:e,insideDestination:t,destination:r,viewport:n,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=wn(e,r);if(null==a)return Mn({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const c=t.find(e=>e.descriptor.index===a);if(!c)return Mn({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const d=Dn(e,t),u=t.indexOf(c);return{displaced:Ln({afterDragging:d.slice(u),destination:r,displacedBy:o,last:i,viewport:n.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function Gn(e,t){return Boolean(t.effected[e])}var Wn=({isMovingForward:e,isInHomeList:t,draggable:r,draggables:n,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||Ur(),"REORDER"===c.type){const n=(({isMovingForward:e,isInHomeList:t,insideDestination:r,location:n})=>{if(!r.length)return null;const o=n.index,i=e?o+1:o-1,a=r[0].descriptor.index,s=r[r.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==n?null:kn({draggable:r,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:n})}const d=(({isMovingForward:e,destination:t,draggables:r,combine:n,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=n.draggableId,a=r[i].descriptor.index;return Gn(i,o)?e?a:a-1:e?a+1:a})({isMovingForward:e,destination:o,displaced:a.displaced,draggables:n,combine:c.combine,afterCritical:l});return null==d?null:kn({draggable:r,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})},Fn=({afterCritical:e,impact:t,draggables:r})=>{const n=In(t);n||Ur();const o=n.draggableId,i=r[o].page.borderBox.center,a=(({displaced:e,afterCritical:t,combineWith:r,displacedBy:n})=>{const o=Boolean(e.visible[r]||e.invisible[r]);return Gn(r,t)?o?en:on(n.point):o?n.point:en})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return tn(i,a)};const $n=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,jn=(e,t,r)=>t[e.crossAxisStart]+r.margin[e.crossAxisStart]+r.borderBox[e.crossAxisSize]/2,Un=({axis:e,moveRelativeTo:t,isMoving:r})=>an(e.line,t.marginBox[e.end]+$n(e,r),jn(e,t.marginBox,r)),Hn=({axis:e,moveRelativeTo:t,isMoving:r})=>an(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,r),jn(e,t.marginBox,r));var qn=({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o})=>{const i=xn(n.descriptor.id,r),a=t.page,s=n.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:r})=>an(e.line,t.contentBox[e.start]+$n(e,r),jn(e,t.contentBox,r)))({axis:s,moveInto:n.page,isMoving:a});const{displaced:l,displacedBy:c}=e,d=l.all[0];if(d){const e=r[d];if(Gn(d,o))return Hn({axis:s,moveRelativeTo:e.page,isMoving:a});const t=Sr(e.page,c.point);return Hn({axis:s,moveRelativeTo:t,isMoving:a})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return a.borderBox.center;if(Gn(u.descriptor.id,o)){const e=Sr(u.page,on(o.displacedBy.point));return Un({axis:s,moveRelativeTo:e,isMoving:a})}return Un({axis:s,moveRelativeTo:u.page,isMoving:a})},Vn=(e,t)=>{const r=e.frame;return r?tn(t,r.scroll.diff.displacement):t};var zn=e=>{const t=(({impact:e,draggable:t,droppable:r,draggables:n,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return r&&a?"REORDER"===a.type?qn({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o}):Fn({impact:e,draggables:n,afterCritical:o}):i})(e),r=e.droppable;return r?Vn(r,t):t},Yn=(e,t)=>{const r=rn(t,e.scroll.initial),n=on(r);return{frame:yr({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}}};function Zn(e,t){return e.map(e=>t[e])}var Jn=({pageBorderBoxCenter:e,draggable:t,viewport:r})=>{const n=((e,t)=>tn(e.scroll.diff.displacement,t))(r,e),o=rn(n,t.page.borderBox.center);return tn(t.client.borderBox.center,o)},Xn=({draggable:e,destination:t,newPageBorderBoxCenter:r,viewport:n,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=rn(r,e.page.borderBox.center),s={target:dn(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:n};return i?(e=>{return Nn({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const r=On(e.top,e.bottom),n=On(e.left,e.right);return e=>t===_n?r(e.top)&&r(e.bottom):n(e.left)&&n(e.right)})});var t})(s):Tn(s)},Kn=({isMovingForward:e,draggable:t,destination:r,draggables:n,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!r.isEnabled)return null;const c=xn(r.descriptor.id,n),d=wn(t,r),u=(({isMovingForward:e,draggable:t,destination:r,insideDestination:n,previousImpact:o})=>{if(!r.isCombineEnabled)return null;if(!En(o))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:r.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=Dn(t,n);if(!s)return l.length?i(l[l.length-1].descriptor.id):null;const c=l.findIndex(e=>e.descriptor.id===s);-1===c&&Ur();const d=c-1;return d<0?null:i(l[d].descriptor.id)})({isMovingForward:e,draggable:t,destination:r,insideDestination:c,previousImpact:o})||Wn({isMovingForward:e,isInHomeList:d,draggable:t,draggables:n,destination:r,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!u)return null;const p=zn({impact:u,draggable:t,droppable:r,draggables:n,afterCritical:l});if(Xn({draggable:t,destination:r,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})){return{clientSelection:Jn({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:u,scrollJumpRequest:null}}const g=rn(p,a),m=(({impact:e,viewport:t,destination:r,draggables:n,maxScrollChange:o})=>{const i=Yn(t,tn(t.scroll.current,o)),a=r.frame?mn(r,tn(r.frame.scroll.current,o)):r,s=e.displaced,l=Ln({afterDragging:Zn(s.all,n),destination:r,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=Ln({afterDragging:Zn(s.all,n),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 r=0;r<t.length;r++){const n=t[r].visible[e];if(n)return n}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:r,draggables:n,maxScrollChange:g});return{clientSelection:s,impact:m,scrollJumpRequest:g}};const Qn=e=>{const t=e.subject.active;return t||Ur(),t};const eo=(e,t)=>{const r=e.page.borderBox.center;return Gn(e.descriptor.id,t)?rn(r,t.displacedBy.point):r},to=(e,t)=>{const r=e.page.borderBox;return Gn(e.descriptor.id,t)?dn(r,on(t.displacedBy.point)):r};var ro=fn(function(e,t){const r=t[e.line];return{value:r,point:an(e.line,r)}});const no=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),oo=(e,t,r)=>{const n=e.frame;wn(t,e)&&Ur(),e.subject.withPlaceholder&&Ur();const o=ro(e.axis,t.displaceBy).point,i=((e,t,r)=>{const n=e.axis;if("virtual"===e.descriptor.mode)return an(n.line,t[n.line]);const o=e.subject.page.contentBox[n.size],i=xn(e.descriptor.id,r).reduce((e,t)=>e+t.client.marginBox[n.size],0)+t[n.line]-o;return i<=0?null:an(n.line,i)})(e,o,r),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!n){const t=gn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?tn(n.scroll.max,i):n.scroll.max,l=no(n,s),c=gn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var io=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:r,isOver:n,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=(({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:n,viewport:o})=>{const i=r.subject.active;if(!i)return null;const a=r.axis,s=On(i[a.start],i[a.end]),l=vn(n).filter(e=>e!==r).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>An(o.frame)(Qn(e))).filter(t=>{const r=Qn(t);return e?i[a.crossAxisEnd]<r[a.crossAxisEnd]:r[a.crossAxisStart]<i[a.crossAxisStart]}).filter(e=>{const t=Qn(e),r=On(t[a.start],t[a.end]);return s(t[a.start])||s(t[a.end])||r(i[a.start])||r(i[a.end])}).sort((t,r)=>{const n=Qn(t)[a.crossAxisStart],o=Qn(r)[a.crossAxisStart];return e?n-o:o-n}).filter((e,t,r)=>Qn(e)[a.crossAxisStart]===Qn(r[0])[a.crossAxisStart]);if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter(e=>On(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,r)=>{const n=ln(t,un(Qn(e))),o=ln(t,un(Qn(r)));return n!==o?n-o:Qn(e)[a.start]-Qn(r)[a.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:i,viewport:a});if(!l)return null;const c=xn(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:r,insideDestination:n,afterCritical:o})=>{const i=n.filter(e=>Tn({target:to(e,o),destination:r,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,n)=>{const i=sn(e,Vn(r,eo(t,o))),a=sn(e,Vn(r,eo(n,o)));return i<a?-1:a<i?1:t.descriptor.index-n.descriptor.index});return i[0]||null})({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),u=(({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:r,draggable:n,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(r.length)return null;const e={displaced:Cn,displacedBy:Sn,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=zn({impact:e,draggable:n,droppable:i,draggables:o,afterCritical:s}),l=wn(n,i)?i:oo(i,n,o);return Xn({draggable:n,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===n.descriptor.id||l?e:e+1})(),d=ro(i.axis,n.displaceBy);return kn({draggable:n,insideDestination:r,destination:i,viewport:a,displacedBy:d,last:Cn,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:r,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!u)return null;const p=zn({impact:u,draggable:r,droppable:l,draggables:o,afterCritical:s});return{clientSelection:Jn({pageBorderBoxCenter:p,draggable:r,viewport:a}),impact:u,scrollJumpRequest:null}},ao=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};var so=({state:e,type:t})=>{const r=((e,t)=>{const r=ao(e);return r?t[r]:null})(e.impact,e.dimensions.droppables),n=Boolean(r),o=e.dimensions.droppables[e.critical.droppable.id],i=r||o,a=i.axis.direction,s="vertical"===a&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===a&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(s&&!n)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}):io({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,isOver:i,draggables:u,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function lo(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function co(e){const t=On(e.top,e.bottom),r=On(e.left,e.right);return function(e){return t(e.y)&&r(e.x)}}function uo({pageBorderBox:e,draggable:t,droppables:r}){const n=vn(r).filter(t=>{if(!t.isEnabled)return!1;const r=t.subject.active;if(!r)return!1;if(o=r,!((n=e).left<o.right&&n.right>o.left&&n.top<o.bottom&&n.bottom>o.top))return!1;var n,o;if(co(r)(e.center))return!0;const i=t.axis,a=r.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=On(r[i.crossAxisStart],r[i.crossAxisEnd]),d=c(s),u=c(l);return!d&&!u||(d?s<a:l>a)});return n.length?1===n.length?n[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:r}){const n=t.page.borderBox.center,o=r.map(t=>{const r=t.axis,o=an(t.axis.line,e.center[r.line],t.page.borderBox.center[r.crossAxisLine]);return{id:t.descriptor.id,distance:sn(n,o)}}).sort((e,t)=>t.distance-e.distance);return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:n}):null}const po=(e,t)=>yr(dn(e,t));function go({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var mo=({pageOffset:e,draggable:t,draggables:r,droppables:n,previousImpact:o,viewport:i,afterCritical:a})=>{const s=po(t.page.borderBox,e),l=uo({pageBorderBox:s,draggable:t,droppables:n});if(!l)return Pn;const c=n[l],d=xn(c.descriptor.id,r),u=((e,t)=>{const r=e.frame;return r?po(t,r.scroll.diff.value):t})(c,s);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:r,destination:n,insideDestination:o,afterCritical:i})=>{if(!n.isCombineEnabled)return null;const a=n.axis,s=ro(n.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],u=Dn(e,o).find(e=>{const t=e.descriptor.id,n=e.page.borderBox,o=n[a.size]/4,s=Gn(t,i),u=go({displaced:r.displaced,id:t});return s?u?d>n[a.start]+o&&d<n[a.end]-o:c>n[a.start]-l+o&&c<n[a.end]-l-o:u?d>n[a.start]+l+o&&d<n[a.end]+l-o:c>n[a.start]+o&&c<n[a.end]-o});return u?{displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:u.descriptor.id,droppableId:n.descriptor.id}}}:null})({pageBorderBoxWithDroppableScroll:u,draggable:t,previousImpact:o,destination:c,insideDestination:d,afterCritical:a})||(({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:r,insideDestination:n,last:o,viewport:i,afterCritical:a})=>{const s=r.axis,l=ro(r.axis,t.displaceBy),c=l.value,d=e[s.start],u=e[s.end],p=function({draggable:e,closest:t,inHomeList:r}){return t?r&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:Dn(t,n).find(e=>{const t=e.descriptor.id,r=e.page.borderBox.center[s.line],n=Gn(t,a),i=go({displaced:o,id:t});return n?i?u<=r:d<r-c:i?u<=r+c:d<r})||null,inHomeList:wn(t,r)});return kn({draggable:t,insideDestination:n,destination:r,viewport:i,last:o,displacedBy:l,index:p})})({pageBorderBoxWithDroppableScroll:u,draggable:t,destination:c,insideDestination:d,last:o.displaced,viewport:i,afterCritical:a})},fo=(e,t)=>({...e,[t.descriptor.id]:t});const bo=({previousImpact:e,impact:t,droppables:r})=>{const n=ao(e),o=ao(t);if(!n)return r;if(n===o)return r;const i=r[n];if(!i.subject.withPlaceholder)return r;const a=(e=>{const t=e.subject.withPlaceholder;t||Ur();const r=e.frame;if(!r){const t=gn({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const n=t.oldFrameMaxScroll;n||Ur();const o=no(r,n),i=gn({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return fo(r,a)};var ho=({state:e,clientSelection:t,dimensions:r,viewport:n,impact:o,scrollJumpRequest:i})=>{const a=n||e.viewport,s=r||e.dimensions,l=t||e.current.client.selection,c=rn(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:tn(e.initial.client.borderBoxCenter,c)},u={selection:tn(d.selection,a.scroll.current),borderBoxCenter:tn(d.borderBoxCenter,a.scroll.current),offset:tn(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],m=o||mo({pageOffset:u.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),f=(({draggable:e,draggables:t,droppables:r,previousImpact:n,impact:o})=>{const i=bo({previousImpact:n,impact:o,droppables:r}),a=ao(o);if(!a)return i;const s=r[a];if(wn(e,s))return i;if(s.subject.withPlaceholder)return i;const l=oo(s,e,t);return fo(i,l)})({draggable:g,impact:m,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:f},impact:m,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}};var vo=({impact:e,viewport:t,draggables:r,destination:n,forceShouldAnimate:o})=>{const i=e.displaced,a=function(e,t){return e.map(e=>t[e])}(i.all,r),s=Ln({afterDragging:a,destination:n,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},yo=({impact:e,draggable:t,droppable:r,draggables:n,viewport:o,afterCritical:i})=>{const a=zn({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:i});return Jn({pageBorderBoxCenter:a,draggable:t,viewport:o})},xo=({state:e,dimensions:t,viewport:r})=>{"SNAP"!==e.movementMode&&Ur();const n=e.impact,o=r||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=ao(n);c||Ur();const d=s[c],u=vo({impact:n,viewport:o,destination:d,draggables:a}),p=yo({impact:u,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return ho({impact:u,clientSelection:p,state:e,dimensions:i,viewport:o})},Eo=({draggable:e,home:t,draggables:r,viewport:n})=>{const o=ro(t.axis,e.displaceBy),i=xn(t.descriptor.id,r),a=i.indexOf(e);-1===a&&Ur();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:Ln({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:n.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(d=e.descriptor,{index:d.index,droppableId:d.droppableId})}},afterCritical:c}},Io=({additions:e,updatedDroppables:t,viewport:r})=>{const n=r.scroll.diff.value;return e.map(e=>{const o=e.descriptor.droppableId,i=(e=>{const t=e.frame;return t||Ur(),t})(t[o]),a=i.scroll.diff.value,s=(({draggable:e,offset:t,initialWindowScroll:r})=>{const n=Sr(e.client,t),o=Cr(n,r);return{...e,placeholder:{...e.placeholder,client:n},client:n,page:o}})({draggable:e,offset:tn(n,a),initialWindowScroll:r.scroll.initial});return s})};const Do=e=>"SNAP"===e.movementMode,wo=(e,t,r)=>{const n=((e,t)=>({draggables:e.draggables,droppables:fo(e.droppables,t)}))(e.dimensions,t);return!Do(e)||r?ho({state:e,dimensions:n}):xo({state:e,dimensions:n})};function So(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const Co={phase:"IDLE",completed:null,shouldFlush:!1};var Po=(e=Co,t)=>{if("FLUSH"===t.type)return{...Co,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&Ur();const{critical:r,clientSelection:n,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[r.draggable.id],l=i.droppables[r.droppable.id],c={selection:n,borderBoxCenter:s.client.borderBox.center,offset:en},d={client:c,page:{selection:tn(c.selection,o.scroll.initial),borderBoxCenter:tn(c.selection,o.scroll.initial),offset:tn(c.selection,o.scroll.diff.value)}},u=vn(i.droppables).every(e=>!e.isFixedOnPage),{impact:p,afterCritical:g}=Eo({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:r,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){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&Ur();return{...e,phase:"COLLECTING"}}if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&Ur(),(({state:e,published:t})=>{const r=t.modified.map(t=>{const r=e.dimensions.droppables[t.droppableId];return mn(r,t.scroll)}),n={...e.dimensions.droppables,...bn(r)},o=hn(Io({additions:t.additions,updatedDroppables:n,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(e=>{delete i[e]});const a={droppables:n,draggables:i},s=ao(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}=Eo({draggable:c,home:d,draggables:i,viewport:e.viewport}),g=l&&l.isCombineEnabled?e.impact:u,m=mo({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}),f={...e,phase:"DRAGGING",impact:m,onLiftImpact:u,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?f:{...f,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;lo(e)||Ur();const{client:r}=t.payload;return nn(r,e.current.client.selection)?e:ho({state:e,clientSelection:r,impact:Do(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return So(e);if("COLLECTING"===e.phase)return So(e);lo(e)||Ur();const{id:r,newScroll:n}=t.payload,o=e.dimensions.droppables[r];if(!o)return e;const i=mn(o,n);return wo(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;lo(e)||Ur();const{id:r,isEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||Ur(),o.isEnabled===n&&Ur();const i={...o,isEnabled:n};return wo(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;lo(e)||Ur();const{id:r,isCombineEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||Ur(),o.isCombineEnabled===n&&Ur();const i={...o,isCombineEnabled:n};return wo(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;lo(e)||Ur(),e.isWindowScrollAllowed||Ur();const r=t.payload.newScroll;if(nn(e.viewport.scroll.current,r))return So(e);const n=Yn(e.viewport,r);return Do(e)?xo({state:e,viewport:n}):ho({state:e,viewport:n})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!lo(e))return e;const r=t.payload.maxScroll;if(nn(r,e.viewport.scroll.max))return e;const n={...e.viewport,scroll:{...e.viewport.scroll,max:r}};return{...e,viewport:n}}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&&Ur();const r=so({state:e,type:t.type});return r?ho({state:e,impact:r.impact,clientSelection:r.clientSelection,scrollJumpRequest:r.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const r=t.payload.reason;"COLLECTING"!==e.phase&&Ur();return{...e,phase:"DROP_PENDING",isWaiting:!0,reason:r}}if("DROP_ANIMATE"===t.type){const{completed:r,dropDuration:n,newHomeClientOffset:o}=t.payload;"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&Ur();return{phase:"DROP_ANIMATING",completed:r,dropDuration:n,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 Oo(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Ao=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Ro=()=>({type:"COLLECTION_STARTING",payload:null}),_o=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Bo=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),No=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),To=e=>({type:"MOVE",payload:e}),Lo=()=>({type:"MOVE_UP",payload:null}),Mo=()=>({type:"MOVE_DOWN",payload:null}),ko=()=>({type:"MOVE_RIGHT",payload:null}),Go=()=>({type:"MOVE_LEFT",payload:null}),Wo=e=>({type:"DROP_COMPLETE",payload:e}),Fo=e=>({type:"DROP",payload:e}),$o=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});const jo="cubic-bezier(.2,1,.1,1)",Uo={drop:0,combining:.7},Ho={drop:.75},qo={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Vo=`${qo.outOfTheWay}s ${"cubic-bezier(0.2, 0, 0, 1)"}`,zo={fluid:`opacity ${Vo}`,snap:`transform ${Vo}, opacity ${Vo}`,drop:e=>{const t=`${e}s ${jo}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Vo}`,placeholder:`height ${Vo}, width ${Vo}, margin ${Vo}`},Yo=e=>nn(e,en)?void 0:`translate(${e.x}px, ${e.y}px)`,Zo=Yo,Jo=(e,t)=>{const r=Yo(e);if(r)return t?`${r} scale(${Ho.drop})`:r},{minDropTime:Xo,maxDropTime:Ko}=qo,Qo=Ko-Xo;const ei=({getState:e,dispatch:t})=>r=>n=>{if(!Oo(n,"DROP"))return void r(n);const o=e(),i=n.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&&Ur(),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&Ur();const a=o.critical,s=o.dimensions,l=s.draggables[o.critical.draggable.id],{impact:c,didDropInsideDroppable:d}=(({draggables:e,reason:t,lastImpact:r,home:n,viewport:o,onLiftImpact:i})=>{if(!r.at||"DROP"!==t)return{impact:vo({draggables:e,impact:i,destination:n,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1};return"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:{...r,displaced:Cn},didDropInsideDroppable:!0}})({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),u=d?En(c):null,p=d?In(c):null,g={index:a.draggable.index,droppableId:a.droppable.id},m={draggableId:l.descriptor.id,type:l.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:u,combine:p},f=(({impact:e,draggable:t,dimensions:r,viewport:n,afterCritical:o})=>{const{draggables:i,droppables:a}=r,s=ao(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=yo({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:n});return rn(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:m,impact:c};if(!(!nn(o.current.client.offset,f)||Boolean(m.combine)))return void t(Wo({completed:b}));const h=(({current:e,destination:t,reason:r})=>{const n=sn(e,t);if(n<=0)return Xo;if(n>=1500)return Ko;const o=Xo+Qo*(n/1500);return Number(("CANCEL"===r?.6*o:o).toFixed(2))})({current:o.current.client.offset,destination:f,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:f,dropDuration:h,completed:b}))};var ti=()=>({x:window.pageXOffset,y:window.pageYOffset});function ri({onWindowScroll:e}){const t=Ar(function(){e(ti())}),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let n=Fr;function o(){return n!==Fr}return{start:function(){o()&&Ur(),n=$r(window,[r])},stop:function(){o()||Ur(),t.cancel(),n(),n=Fr},isActive:o}}const ni=e=>{const t=ri({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>r=>{!t.isActive()&&Oo(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>Oo(e,"DROP_COMPLETE")||Oo(e,"DROP_ANIMATE")||Oo(e,"FLUSH"))(r)&&t.stop(),e(r)}};var oi=()=>{const e=[];return{add:t=>{const r=setTimeout(()=>(t=>{const r=e.findIndex(e=>e.timerId===t);-1===r&&Ur();const[n]=e.splice(r,1);n.callback()})(r)),n={timerId:r,callback:t};e.push(n)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach(e=>{clearTimeout(e.timerId),e.callback()})}}};const ii=(e,t)=>{t()},ai=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function si(e,t,r,n){if(!e)return void r(n(t));const o=(e=>{let t=!1,r=!1;const n=setTimeout(()=>{r=!0}),o=o=>{t||r||(t=!0,e(o),clearTimeout(n))};return o.wasCalled=()=>t,o})(r);e(t,{announce:o}),o.wasCalled()||r(n(t))}var li=(e,t)=>{const r=((e,t)=>{const r=oi();let n=null;const o=r=>{n||Ur(),n=null,ii(0,()=>si(e().onDragEnd,r,t,Zr.onDragEnd))};return{beforeCapture:(t,r)=>{n&&Ur(),ii(0,()=>{const n=e().onBeforeCapture;n&&n({draggableId:t,mode:r})})},beforeStart:(t,r)=>{n&&Ur(),ii(0,()=>{const n=e().onBeforeDragStart;n&&n(ai(t,r))})},start:(o,i)=>{n&&Ur();const a=ai(o,i);n={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},r.add(()=>{ii(0,()=>si(e().onDragStart,a,t,Zr.onDragStart))})},update:(o,i)=>{const a=En(i),s=In(i);n||Ur();const l=!((e,t)=>{if(e===t)return!0;const r=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,n=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return r&&n})(o,n.lastCritical);l&&(n.lastCritical=o);const c=(u=a,!(null==(d=n.lastLocation)&&null==u||null!=d&&null!=u&&d.droppableId===u.droppableId&&d.index===u.index));var d,u;c&&(n.lastLocation=a);const p=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(n.lastCombine,s);if(p&&(n.lastCombine=s),!l&&!c&&!p)return;const g={...ai(o,n.mode),combine:s,destination:a};r.add(()=>{ii(0,()=>si(e().onDragUpdate,g,t,Zr.onDragUpdate))})},flush:()=>{n||Ur(),r.flush()},drop:o,abort:()=>{if(!n)return;const e={...ai(n.lastCritical,n.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>n=>{if(Oo(n,"BEFORE_INITIAL_CAPTURE"))return void r.beforeCapture(n.payload.draggableId,n.payload.movementMode);if(Oo(n,"INITIAL_PUBLISH")){const e=n.payload.critical;return r.beforeStart(e,n.payload.movementMode),t(n),void r.start(e,n.payload.movementMode)}if(Oo(n,"DROP_COMPLETE")){const e=n.payload.completed.result;return r.flush(),t(n),void r.drop(e)}if(t(n),Oo(n,"FLUSH"))return void r.abort();const o=e.getState();"DRAGGING"===o.phase&&r.update(o.critical,o.impact)}};const ci=e=>t=>r=>{if(!Oo(r,"DROP_ANIMATION_FINISHED"))return void t(r);const n=e.getState();"DROP_ANIMATING"!==n.phase&&Ur(),e.dispatch(Wo({completed:n.completed}))},di=e=>{let t=null,r=null;return n=>o=>{if((Oo(o,"FLUSH")||Oo(o,"DROP_COMPLETE")||Oo(o,"DROP_ANIMATION_FINISHED"))&&(r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)),n(o),!Oo(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})}};r=requestAnimationFrame(()=>{r=null,t=$r(window,[i])})}};var ui=e=>t=>r=>n=>{if((e=>Oo(e,"DROP_COMPLETE")||Oo(e,"DROP_ANIMATE")||Oo(e,"FLUSH"))(n))return e.stop(),void r(n);if(Oo(n,"INITIAL_PUBLISH")){r(n);const o=t.getState();return"DRAGGING"!==o.phase&&Ur(),void e.start(o)}r(n),e.scroll(t.getState())};const pi=e=>t=>r=>{if(t(r),!Oo(r,"PUBLISH_WHILE_DRAGGING"))return;const n=e.getState();"DROP_PENDING"===n.phase&&(n.isWaiting||e.dispatch(Fo({reason:n.reason})))},gi=st;var mi=({dimensionMarshal:e,focusMarshal:t,styleMarshal:r,getResponders:n,announce:o,autoScroller:i})=>{return ot(Po,gi(function(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(et(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=st(...s)(o.dispatch),{...o,dispatch:i}}}((a=r,()=>e=>t=>{Oo(t,"INITIAL_PUBLISH")&&a.dragging(),Oo(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(Oo(t,"FLUSH")||Oo(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>r=>{(Oo(r,"DROP_COMPLETE")||Oo(r,"FLUSH")||Oo(r,"DROP_ANIMATE"))&&e.stopPublishing(),t(r)})(e),(e=>({getState:t,dispatch:r})=>n=>o=>{if(!Oo(o,"LIFT"))return void n(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&r(Wo({completed:l.completed})),"IDLE"!==t().phase&&Ur(),r({type:"FLUSH",payload:null}),r({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);r({type:"INITIAL_PUBLISH",payload:{critical:d,dimensions:u,clientSelection:a,movementMode:s,viewport:p}})})(e),ei,ci,di,pi,ui(i),ni,(e=>{let t=!1;return()=>r=>n=>{if(Oo(n,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),void e.tryRestoreFocusRecorded();if(r(n),t){if(Oo(n,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(Oo(n,"DROP_COMPLETE")){t=!1;const r=n.payload.completed.result;r.combine&&e.tryShiftRecord(r.draggableId,r.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),li(n,o))));var a};var fi=({scrollHeight:e,scrollWidth:t,height:r,width:n})=>{const o=rn({x:t,y:e},{x:n,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},bi=()=>{const e=document.documentElement;return e||Ur(),e},hi=()=>{const e=bi();return fi({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},vi=({critical:e,scrollOptions:t,registry:r})=>{const n=(()=>{const e=ti(),t=hi(),r=e.y,n=e.x,o=bi(),i=o.clientWidth,a=o.clientHeight;return{frame:yr({top:r,left:n,right:n+i,bottom:r+a}),scroll:{initial:e,current:e,max:t,diff:{value:en,displacement:en}}}})(),o=n.scroll.current,i=e.droppable,a=r.droppable.getAllByType(i.type).map(e=>e.callbacks.getDimensionAndWatchScroll(o,t)),s=r.draggable.getAllByType(e.draggable.type).map(e=>e.getDimension(o));return{dimensions:{draggables:hn(s),droppables:bn(a)},critical:e,viewport:n}};function yi(e,t,r){if(r.descriptor.id===t.id)return!1;if(r.descriptor.type!==t.type)return!1;return"virtual"===e.droppable.getById(r.descriptor.droppableId).descriptor.mode}var xi=(e,t)=>{let r=null;const n=function({registry:e,callbacks:t}){let r={additions:{},removals:{},modified:{}},n=null;const o=()=>{n||(t.collectionStarting(),n=requestAnimationFrame(()=>{n=null;const{additions:o,removals:i,modified:a}=r,s=Object.keys(o).map(t=>e.draggable.getById(t).getDimension(en)).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};r={additions:{},removals:{},modified:{}},t.publish(c)}))};return{add:e=>{const t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],o()},remove:e=>{const t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],o()},stop:()=>{n&&(cancelAnimationFrame(n),n=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=t=>{r||Ur();const o=r.critical.draggable;"ADDITION"===t.type&&yi(e,o,t.value)&&n.add(t.value),"REMOVAL"===t.type&&yi(e,o,t.value)&&n.remove(t.value)},i={updateDroppableIsEnabled:(n,o)=>{e.droppable.exists(n)||Ur(),r&&t.updateDroppableIsEnabled({id:n,isEnabled:o})},updateDroppableIsCombineEnabled:(n,o)=>{r&&(e.droppable.exists(n)||Ur(),t.updateDroppableIsCombineEnabled({id:n,isCombineEnabled:o}))},scrollDroppable:(t,n)=>{r&&e.droppable.getById(t).callbacks.scroll(n)},updateDroppableScroll:(n,o)=>{r&&(e.droppable.exists(n)||Ur(),t.updateDroppableScroll({id:n,newScroll:o}))},startPublishing:t=>{r&&Ur();const n=e.draggable.getById(t.draggableId),i=e.droppable.getById(n.descriptor.droppableId),a={draggable:n.descriptor,droppable:i.descriptor},s=e.subscribe(o);return r={critical:a,unsubscribe:s},vi({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!r)return;n.stop();const t=r.critical.droppable;e.droppable.getAllByType(t.type).forEach(e=>e.callbacks.dragStopped()),r.unsubscribe(),r=null}};return i},Ei=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason),Ii=e=>{window.scrollBy(e.x,e.y)};const Di=fn(e=>vn(e).filter(e=>!!e.isEnabled&&!!e.frame));var wi=({center:e,destination:t,droppables:r})=>{if(t){const e=r[t];return e.frame?e:null}const n=((e,t)=>{const r=Di(t).find(t=>(t.frame||Ur(),co(t.frame.pageMarginBox)(e)))||null;return r})(e,r);return n};const Si={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var Ci=({startOfRange:e,endOfRange:t,current:r})=>{const n=t-e;if(0===n)return 0;return(r-e)/n},Pi=({distanceToEdge:e,thresholds:t,dragStartTime:r,shouldUseTimeDampening:n,getAutoScrollerOptions:o})=>{const i=((e,t,r=()=>Si)=>{const n=r();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return n.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const o=1-Ci({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=n.maxPixelScroll*n.ease(o);return Math.ceil(i)})(e,t,o);return 0===i?0:n?Math.max(((e,t,r)=>{const n=r(),o=n.durationDampening.accelerateAt,i=n.durationDampening.stopDampeningAt,a=t,s=i,l=Date.now()-a;if(l>=i)return e;if(l<o)return 1;const c=Ci({startOfRange:o,endOfRange:s,current:l}),d=e*n.ease(c);return Math.ceil(d)})(i,r,o),1):i},Oi=({container:e,distanceToEdges:t,dragStartTime:r,axis:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,r=()=>Si)=>{const n=r();return{startScrollingFrom:e[t.size]*n.startFromPercentage,maxScrollValueAt:e[t.size]*n.maxScrollAtPercentage}})(e,n,i);return t[n.end]<t[n.start]?Pi({distanceToEdge:t[n.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*Pi({distanceToEdge:t[n.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const Ai=cn(e=>0===e?0:e);var Ri=({dragStartTime:e,container:t,subject:r,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:n.y-t.top,right:t.right-n.x,bottom:t.bottom-n.y,left:n.x-t.left},s=Oi({container:t,distanceToEdges:a,dragStartTime:e,axis:_n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=Oi({container:t,distanceToEdges:a,dragStartTime:e,axis:Bn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=Ai({x:l,y:s});if(nn(c,en))return null;const d=(({container:e,subject:t,proposedScroll:r})=>{const n=t.height>e.height,o=t.width>e.width;return o||n?o&&n?null:{x:o?0:r.x,y:n?0:r.y}:r})({container:t,subject:r,proposedScroll:c});return d?nn(d,en)?null:d:null};const _i=cn(e=>0===e?0:e>0?1:-1),Bi=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:r,change:n})=>{const o=tn(t,n),i={x:e(o.x,r.x),y:e(o.y,r.y)};return nn(i,en)?null:i}})(),Ni=({max:e,current:t,change:r})=>{const n={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=_i(r),i=Bi({max:n,current:t,change:o});return!i||(0!==o.x&&0===i.x||0!==o.y&&0===i.y)},Ti=(e,t)=>Ni({current:e.scroll.current,max:e.scroll.max,change:t}),Li=(e,t)=>{const r=e.frame;return!!r&&Ni({current:r.scroll.current,max:r.scroll.max,change:t})};var Mi=({state:e,dragStartTime:t,shouldUseTimeDampening:r,scrollWindow:n,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:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=Ri({dragStartTime:n,container:e.frame,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&Ti(e,a)?a:null})({dragStartTime:t,viewport:e.viewport,subject:s,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});if(o)return void n(o)}const l=wi({center:a,destination:ao(e.impact),droppables:e.dimensions.droppables});if(!l)return;const c=(({droppable:e,subject:t,center:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=Ri({dragStartTime:n,container:a.pageMarginBox,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Li(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)},ki=({move:e,scrollDroppable:t,scrollWindow:r})=>{const n=(e,r)=>{if(!Li(e,r))return r;const n=((e,t)=>{const r=e.frame;return r&&Li(e,t)?Bi({current:r.scroll.current,max:r.scroll.max,change:t}):null})(e,r);if(!n)return t(e.descriptor.id,r),null;const o=rn(r,n);t(e.descriptor.id,o);return rn(r,o)},o=(e,t,n)=>{if(!e)return n;if(!Ti(t,n))return n;const o=((e,t)=>{if(!Ti(e,t))return null;const r=e.scroll.max,n=e.scroll.current;return Bi({current:n,max:r,change:t})})(t,n);if(!o)return r(n),null;const i=rn(n,o);r(i);return rn(n,i)};return t=>{const r=t.scrollJumpRequest;if(!r)return;const i=ao(t.impact);i||Ur();const a=n(t.dimensions.droppables[i],r);if(!a)return;const s=t.viewport,l=o(t.isWindowScrollAllowed,s,a);l&&((t,r)=>{const n=tn(t.current.client.selection,r);e({client:n})})(t,l)}};const Gi="data-rfd",Wi=(()=>{const e=`${Gi}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Fi=(()=>{const e=`${Gi}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),$i=(()=>{const e=`${Gi}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),ji={contextId:`${Gi}-scroll-container-context-id`},Ui=(e,t)=>e.map(e=>{const r=e.styles[t];return r?`${e.selector} { ${r} }`:""}).join(" ");const Hi="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?Lr:Tr,qi=()=>{const e=document.querySelector("head");return e||Ur(),e},Vi=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function zi(e,t){const r=Kr(()=>(e=>{const t=(r=e,e=>`[${e}="${r}"]`);var r;const n=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(Wi.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: ${zo.outOfTheWay};\n `;return{selector:t(Fi.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),n,{selector:t($i.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:Ui(o,"always"),resting:Ui(o,"resting"),dragging:Ui(o,"dragging"),dropAnimating:Ui(o,"dropAnimating"),userCancel:Ui(o,"userCancel")}})(e),[e]),n=Nr(null),o=Nr(null),i=Qr(fn(e=>{const t=o.current;t||Ur(),t.textContent=e}),[]),a=Qr(e=>{const t=n.current;t||Ur(),t.textContent=e},[]);Hi(()=>{(n.current||o.current)&&Ur();const s=Vi(t),l=Vi(t);return n.current=s,o.current=l,s.setAttribute(`${Gi}-always`,e),l.setAttribute(`${Gi}-dynamic`,e),qi().appendChild(s),qi().appendChild(l),a(r.always),i(r.resting),()=>{const e=e=>{const t=e.current;t||Ur(),qi().removeChild(t),e.current=null};e(n),e(o)}},[t,a,i,r.always,r.resting,e]);const s=Qr(()=>i(r.dragging),[i,r.dragging]),l=Qr(e=>{i("DROP"!==e?r.userCancel:r.dropAnimating)},[i,r.dropAnimating,r.userCancel]),c=Qr(()=>{o.current&&i(r.resting)},[i,r.resting]);return Kr(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function Yi(e,t){return Array.from(e.querySelectorAll(t))}var Zi=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Ji(e){return e instanceof Zi(e).HTMLElement}function Xi(e){const t=Nr({}),r=Nr(null),n=Nr(null),o=Nr(!1),i=Qr(function(e,r){const n={id:e,focus:r};return t.current[e]=n,function(){const r=t.current;r[e]!==n&&delete r[e]}},[]),a=Qr(function(t){const r=function(e,t){const r=`[${Wi.contextId}="${e}"]`,n=Yi(document,r);if(!n.length)return null;const o=n.find(e=>e.getAttribute(Wi.draggableId)===t);return o&&Ji(o)?o:null}(e,t);r&&r!==document.activeElement&&r.focus()},[e]),s=Qr(function(e,t){r.current===e&&(r.current=t)},[]),l=Qr(function(){n.current||o.current&&(n.current=requestAnimationFrame(()=>{n.current=null;const e=r.current;e&&a(e)}))},[a]),c=Qr(function(e){r.current=null;const t=document.activeElement;t&&t.getAttribute(Wi.draggableId)===e&&(r.current=e)},[]);Hi(()=>(o.current=!0,function(){o.current=!1;const e=n.current;e&&cancelAnimationFrame(e)}),[]);return Kr(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function Ki(){const e={draggables:{},droppables:{}},t=[];function r(e){t.length&&t.forEach(t=>t(e))}function n(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,r({type:"ADDITION",value:t})},update:(t,r)=>{const n=e.draggables[r.descriptor.id];n&&n.uniqueId===t.uniqueId&&(delete e.draggables[r.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const o=t.descriptor.id,i=n(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],e.droppables[t.descriptor.droppableId]&&r({type:"REMOVAL",value:t}))},getById:function(e){const t=n(e);return t||Ur(),t},findById:n,exists:e=>Boolean(n(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 r=o(t.descriptor.id);r&&t.uniqueId===r.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=o(e);return t||Ur(),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 r=t.indexOf(e);-1!==r&&t.splice(r,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Qi=_r.createContext(null),ea=()=>{const e=document.body;return e||Ur(),e};const ta={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};const ra={separator:"::"};function na(e,t=ra){const r=_r.useId();return Kr(()=>`${e}${t.separator}${r}`,[t.separator,e,r])}var oa=_r.createContext(null);function ia(e){const t=Nr(e);return Tr(()=>{t.current=e}),t}function aa(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const sa=9,la=13,ca=33,da=34,ua=35,pa=36,ga={[la]:!0,[sa]:!0};var ma=e=>{ga[e.keyCode]&&e.preventDefault()};const fa=(()=>{const e="visibilitychange";if("undefined"==typeof document)return e;return[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})();const ba={type:"IDLE"};function ha({cancel:e,completed:t,getPhase:r,setPhase:n}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:o,clientY:i}=e;if(0!==t)return;const a={x:o,y:i},s=r();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&Ur();const l=s.point;if(c=l,d=a,!(Math.abs(d.x-c.x)>=5||Math.abs(d.y-c.y)>=5))return;var c,d;e.preventDefault();const u=s.actions.fluidLift(a);n({type:"DRAGGING",actions:u})}},{eventName:"mouseup",fn:n=>{const o=r();"DRAGGING"===o.type?(n.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===r().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==r().type)return 27===t.keyCode?(t.preventDefault(),void e()):void ma(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===r().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const n=r();"IDLE"===n.type&&Ur(),n.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:fa,fn:e}]}function va(){}const ya={[da]:!0,[ca]:!0,[pa]:!0,[ua]:!0};function xa(e,t){function r(){t(),e.cancel()}return[{eventName:"keydown",fn:n=>27===n.keyCode?(n.preventDefault(),void r()):32===n.keyCode?(n.preventDefault(),t(),void e.drop()):40===n.keyCode?(n.preventDefault(),void e.moveDown()):38===n.keyCode?(n.preventDefault(),void e.moveUp()):39===n.keyCode?(n.preventDefault(),void e.moveRight()):37===n.keyCode?(n.preventDefault(),void e.moveLeft()):void(ya[n.keyCode]?n.preventDefault():ma(n))},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:fa,fn:r}]}const Ea={type:"IDLE"};const Ia=["input","button","textarea","select","option","optgroup","video","audio"];function Da(e,t){if(null==t)return!1;if(Ia.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return"true"===r||""===r||t!==e&&Da(e,t.parentElement)}function wa(e,t){const r=t.target;return!!Ji(r)&&Da(e,r)}var Sa=e=>yr(e.getBoundingClientRect()).center;const Ca=(()=>{const e="matches";if("undefined"==typeof document)return e;return[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function Pa(e,t){return null==e?null:e[Ca](t)?e:Pa(e.parentElement,t)}function Oa(e,t){return e.closest?e.closest(t):Pa(e,t)}function Aa(e,t){const r=t.target;if(!((n=r)instanceof Zi(n).Element))return null;var n;const o=function(e){return`[${Wi.contextId}="${e}"]`}(e),i=Oa(r,o);return i&&Ji(i)?i:null}function Ra(e){e.preventDefault()}function _a({expected:e,phase:t,isLockActive:r,shouldWarn:n}){return!!r()&&e===t}function Ba({lockAPI:e,store:t,registry:r,draggableId:n}){if(e.isClaimed())return!1;const o=r.draggable.findById(n);return!!o&&(!!o.options.isEnabled&&!!Ei(t.getState(),n))}function Na({lockAPI:e,contextId:t,store:r,registry:n,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!Ba({lockAPI:e,store:r,registry:n,draggableId:o}))return null;const s=n.draggable.getById(o),l=function(e,t){const r=`[${Fi.contextId}="${e}"]`,n=Yi(document,r).find(e=>e.getAttribute(Fi.id)===t);return n&&Ji(n)?n:null}(t,s.descriptor.id);if(!l)return null;if(a&&!s.options.canDragInteractiveElements&&wa(l,a))return null;const c=e.claim(i||Fr);let d="PRE_DRAG";function u(){return s.options.shouldRespectForcePress}function p(){return e.isActive(c)}const g=function(e,t){_a({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function m(t){function n(){e.release(),d="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=$r(window,[{eventName:"click",fn:Ra,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}n(),r.dispatch(Fo({reason:e}))}return"PRE_DRAG"!==d&&(n(),Ur()),r.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),d="DRAGGING",{isActive:()=>_a({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>_a({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,fluidLift:function(e){const t=Ar(e=>{g(()=>To({client:e}))});return{...m({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>g(Lo),moveRight:()=>g(ko),moveDown:()=>g(Mo),moveLeft:()=>g(Go)};return m({liftActionArgs:{id:o,clientSelection:Sa(l),movementMode:"SNAP"},cleanup:Fr,actions:e})},abort:function(){_a({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&e.release()}}}const Ta=[function(e){const t=Nr(ba),r=Nr(Fr),n=Kr(()=>({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 n=e.findClosestDraggableId(t);if(!n)return;const o=e.tryGetLock(n,a,{sourceEvent:t});if(!o)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};r.current(),c(o,i)}}),[e]),o=Kr(()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const n=e.findOptionsForDraggable(r);n&&(n.shouldRespectForcePress||e.canGetLock(r)&&t.preventDefault())}}),[e]),i=Qr(function(){r.current=$r(window,[o,n],{passive:!1,capture:!0})},[o,n]),a=Qr(()=>{"IDLE"!==t.current.type&&(t.current=ba,r.current(),i())},[i]),s=Qr(()=>{const e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=Qr(function(){const e=ha({cancel:s,completed:a,getPhase:()=>t.current,setPhase:e=>{t.current=e}});r.current=$r(window,e,{capture:!0,passive:!1})},[s,a]),c=Qr(function(e,r){"IDLE"!==t.current.type&&Ur(),t.current={type:"PENDING",point:r,actions:e},l()},[l]);Hi(function(){return i(),function(){r.current()}},[i])},function(e){const t=Nr(va),r=Kr(()=>({eventName:"keydown",fn:function(r){if(r.defaultPrevented)return;if(32!==r.keyCode)return;const o=e.findClosestDraggableId(r);if(!o)return;const i=e.tryGetLock(o,l,{sourceEvent:r});if(!i)return;r.preventDefault();let a=!0;const s=i.snapLift();function l(){a||Ur(),a=!1,t.current(),n()}t.current(),t.current=$r(window,xa(s,l),{capture:!0,passive:!1})}}),[e]),n=Qr(function(){t.current=$r(window,[r],{passive:!1,capture:!0})},[r]);Hi(function(){return n(),function(){t.current()}},[n])},function(e){const t=Nr(Ea),r=Nr(Fr),n=Qr(function(){return t.current},[]),o=Qr(function(e){t.current=e},[]),i=Kr(()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const o=e.tryGetLock(n,s,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:l}=i,c={x:a,y:l};r.current(),u(o,c)}}),[e]),a=Qr(function(){r.current=$r(window,[i],{capture:!0,passive:!1})},[i]),s=Qr(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(Ea),r.current(),a())},[a,o]),l=Qr(()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=Qr(function(){const e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:n},o=$r(window,function({cancel:e,completed:t,getPhase:r}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const n=r();if("DRAGGING"!==n.type)return void e();n.hasMoved=!0;const{clientX:o,clientY:i}=t.touches[0],a={x:o,y:i};t.preventDefault(),n.actions.move(a)}},{eventName:"touchend",fn:n=>{const o=r();"DRAGGING"===o.type?(n.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===r().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const n=r();"IDLE"===n.type&&Ur();const o=t.touches[0];if(!o)return;if(!(o.force>=.15))return;const i=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return i?n.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:fa,fn:e}]}(t),e),i=$r(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:r=>{"DRAGGING"===t().type?(27===r.keyCode&&r.preventDefault(),e()):e()}},{eventName:fa,fn:e}]}(t),e);r.current=function(){o(),i()}},[l,n,s]),d=Qr(function(){const e=n();"PENDING"!==e.type&&Ur();const t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})},[n,o]),u=Qr(function(e,t){"IDLE"!==n().type&&Ur();const r=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:r}),c()},[c,n,o,d]);Hi(function(){return a(),function(){r.current();const e=n();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(Ea))}},[n,a,o]),Hi(function(){return $r(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function La({contextId:e,store:t,registry:r,customSensors:n,enableDefaultSensors:o}){const i=[...o?Ta:[],...n||[]],a=Br(()=>function(){let e=null;function t(){e||Ur(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&Ur();const r={abandon:t};return e=r,r},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],s=Qr(function(e,t){aa(e)&&!aa(t)&&a.tryAbandon()},[a]);Hi(function(){let e=t.getState();return t.subscribe(()=>{const r=t.getState();s(e,r),e=r})},[a,t,s]),Hi(()=>a.tryAbandon,[a.tryAbandon]);const l=Qr(e=>Ba({lockAPI:a,registry:r,store:t,draggableId:e}),[a,r,t]),c=Qr((n,o,i)=>Na({lockAPI:a,registry:r,contextId:e,store:t,draggableId:n,forceSensorStop:o||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[e,a,r,t]),d=Qr(t=>function(e,t){const r=Aa(e,t);return r?r.getAttribute(Wi.draggableId):null}(e,t),[e]),u=Qr(e=>{const t=r.draggable.findById(e);return t?t.options:null},[r.draggable]),p=Qr(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))},[a,t]),g=Qr(()=>a.isClaimed(),[a]),m=Kr(()=>({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](m)}function Ma(e){return e.current||Ur(),e.current}function ka(e){const{contextId:t,setCallbacks:r,sensors:n,nonce:o,dragHandleUsageInstructions:i}=e,a=Nr(null),s=ia(e),l=Qr(()=>(e=>({onBeforeCapture:t=>{Gr(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(s.current),[s]),c=Qr(()=>(e=>({...Si,...e.autoScrollerOptions,durationDampening:{...Si.durationDampening,...e.autoScrollerOptions}}))(s.current),[s]),d=function(e){const t=Kr(()=>(e=>`rfd-announcement-${e}`)(e),[e]),r=Nr(null);return Tr(function(){const e=document.createElement("div");return r.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Rr(e.style,ta),ea().appendChild(e),function(){setTimeout(function(){const t=ea();t.contains(e)&&t.removeChild(e),e===r.current&&(r.current=null)})}},[t]),Qr(e=>{const t=r.current;t&&(t.textContent=e)},[])}(t),u=function({contextId:e,text:t}){const r=na("hidden-text",{separator:"-"}),n=Kr(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:r}),[r,e]);return Tr(function(){const e=document.createElement("div");return e.id=n,e.textContent=t,e.style.display="none",ea().appendChild(e),function(){const t=ea();t.contains(e)&&t.removeChild(e)}},[n,t]),n}({contextId:t,text:i}),p=zi(t,o),g=Qr(e=>{Ma(a).dispatch(e)},[]),m=Kr(()=>at({publishWhileDragging:Ao,updateDroppableScroll:_o,updateDroppableIsEnabled:Bo,updateDroppableIsCombineEnabled:No,collectionStarting:Ro},g),[g]),f=function(){const e=Kr(Ki,[]);return Tr(()=>function(){e.clean()},[e]),e}(),b=Kr(()=>xi(f,m),[f,m]),h=Kr(()=>(({scrollDroppable:e,scrollWindow:t,move:r,getAutoScrollerOptions:n})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:r=()=>Si})=>{const n=Ar(e),o=Ar(t);let i=null;const a=e=>{i||Ur();const{shouldUseTimeDampening:t,dragStartTime:a}=i;Mi({state:e,scrollWindow:n,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:r})};return{start:e=>{i&&Ur();const t=Date.now();let n=!1;const o=()=>{n=!0};Mi({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:r}),i={dragStartTime:t,shouldUseTimeDampening:n},n&&a(e)},stop:()=>{i&&(n.cancel(),o.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:n}),i=ki({move:r,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{n().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}})({scrollWindow:Ii,scrollDroppable:b.scrollDroppable,getAutoScrollerOptions:c,...at({move:To},g)}),[b.scrollDroppable,g,c]),v=Xi(t),y=Kr(()=>mi({announce:d,autoScroller:h,dimensionMarshal:b,focusMarshal:v,getResponders:l,styleMarshal:p}),[d,h,b,v,l,p]);a.current=y;const x=Qr(()=>{const e=Ma(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),E=Qr(()=>{const e=Ma(a).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);r(Kr(()=>({isDragging:E,tryAbort:x}),[E,x]));const I=Qr(e=>Ei(Ma(a).getState(),e),[]),D=Qr(()=>lo(Ma(a).getState()),[]),w=Kr(()=>({marshal:b,focus:v,contextId:t,canLift:I,isMovementAllowed:D,dragHandleUsageInstructionsId:u,registry:f}),[t,b,u,v,I,D,f]);return La({contextId:t,store:y,registry:f,customSensors:n||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),Tr(()=>x,[x]),_r.createElement(oa.Provider,{value:w},_r.createElement(pr,{context:Qi,store:y},e.children))}function Ga(e){const t=_r.useId(),r=e.dragHandleUsageInstructions||Zr.dragHandleUsageInstructions;return _r.createElement(Hr,null,n=>_r.createElement(ka,{nonce:e.nonce,contextId:t,setCallbacks:n,dragHandleUsageInstructions:r,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 Wa=5e3,Fa=4500,$a=(e,t)=>t?zo.drop(t.duration):e?zo.snap:zo.fluid,ja=(e,t)=>{if(e)return t?Uo.drop:Uo.combining};function Ua(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:r,combineWith:n,dropping:o}=e,i=Boolean(n),a=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),s=Boolean(o),l=s?Jo(r,i):Zo(r);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:$a(a,o),transform:l,opacity:ja(i,s),zIndex:s?Fa:Wa,pointerEvents:"none"}}(e):{transform:Zo((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}function Ha(e){const t=na("draggable"),{descriptor:r,registry:n,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=Kr(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=Qr(e=>{const t=o();return t||Ur(),function(e,t,r=en){const n=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Pr(o,n),a=Cr(i,r);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:n.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(r,t,e)},[r,o]),d=Kr(()=>({uniqueId:t,descriptor:r,options:l,getDimension:c}),[r,c,l,t]),u=Nr(d),p=Nr(!0);Hi(()=>(n.draggable.register(u.current),()=>n.draggable.unregister(u.current)),[n.draggable]),Hi(()=>{if(p.current)return void(p.current=!1);const e=u.current;u.current=d,n.draggable.update(d,e)},[d,n.draggable])}var qa=_r.createContext(null);function Va(e){const t=Mr(e);return t||Ur(),t}function za(e){e.preventDefault()}var Ya=(e,t)=>e===t,Za=e=>{const{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};function Ja(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Xa={mapped:{type:"SECONDARY",offset:en,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ja(null)}};const Ka=ur(()=>{const e=function(){const e=fn((e,t)=>({x:e,y:t})),t=fn((e,t,r=null,n=null,o=null)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:r,combineWith:n,combineTargetFor:null})),r=fn((e,r,n,o,i=null,a=null,s=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:r,offset:e,dimension:n,forceShouldAnimate:s,snapshot:t(r,o,i,a,null)}}));return(n,o)=>{if(aa(n)){if(n.critical.draggable.id!==o.draggableId)return null;const t=n.current.client.offset,a=n.dimensions.draggables[o.draggableId],s=ao(n.impact),l=(i=n.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,c=n.forceShouldAnimate;return r(e(t.x,t.y),n.movementMode,a,o.isClone,s,l,c)}var i;if("DROP_ANIMATING"===n.phase){const e=n.completed;if(e.result.draggableId!==o.draggableId)return null;const r=o.isClone,i=n.dimensions.draggables[o.draggableId],a=e.result,s=a.mode,l=Za(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:n.dropDuration,curve:jo,moveTo:n.newHomeClientOffset,opacity:c?Uo.drop:null,scale:c?Ho.drop:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:i,dropping:d,draggingOver:l,combineWith:c,mode:s,forceShouldAnimate:null,snapshot:t(s,r,l,c,d)}}}return null}}(),t=function(){const e=fn((e,t)=>({x:e,y:t})),t=fn(Ja),r=fn((e,r=null,n)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:r,shouldAnimateDisplacement:n,snapshot:t(r)}})),n=e=>e?r(en,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=In(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return n(d);if(i.displaced.invisible[t])return null;const o=on(a.displacedBy.point),s=e(o.x,o.y);return r(s,d,!0)}if(l)return n(d);const u=i.displacedBy.point,p=e(u.x,u.y);return r(p,d,s.shouldAnimate)};return(e,t)=>{if(aa(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 r=e.completed;return r.result.draggableId===t.draggableId?null:o(t.draggableId,r.result.draggableId,r.impact,r.afterCritical)}return null}}();return(r,n)=>e(r,n)||t(r,n)||Xa},{dropAnimationFinished:$o},null,{context:Qi,areStatePropsEqual:Ya})(e=>{const t=Nr(null),r=Qr((e=null)=>{t.current=e},[]),n=Qr(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=Va(oa),{type:s,droppableId:l}=Va(qa),c=Kr(()=>({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:m,isClone:f,mapped:b,dropAnimationFinished:h}=e;if(!f){Ha(Kr(()=>({descriptor:c,registry:a,getDraggableRef:n,canDragInteractiveElements:m,shouldRespectForcePress:g,isEnabled:p}),[c,a,n,m,g,p]))}const v=Kr(()=>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:za}:null,[o,i,u,p]),y=Qr(e=>{"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&Gr(h)},[h,b]),x=Kr(()=>{const e=Ua(b),t="DRAGGING"===b.type&&b.dropping?y:void 0;return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":u,style:e,onTransitionEnd:t},dragHandleProps:v}},[o,v,u,b,y,r]),E=Kr(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return _r.createElement(_r.Fragment,null,d(x,b.snapshot,E))});function Qa(e){return Va(qa).isUsingCloneFor!==e.draggableId||e.isClone?_r.createElement(Ka,e):null}function es(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,r=Boolean(e.disableInteractiveElementBlocking),n=Boolean(e.shouldRespectForcePress);return _r.createElement(Qa,Rr({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:n}))}const ts=e=>t=>e===t,rs=ts("scroll"),ns=ts("auto"),os=(e,t)=>t(e.overflowX)||t(e.overflowY),is=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),r={overflowX:t.overflowX,overflowY:t.overflowY};return os(r,rs)||os(r,ns)})(e)?e:is(e.parentElement);var as=e=>({x:e.scrollLeft,y:e.scrollTop});const ss=e=>{if(!e)return!1;return"fixed"===window.getComputedStyle(e).position||ss(e.parentElement)};var ls=({ref:e,descriptor:t,env:r,windowScroll:n,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=r.closestScrollable,c=((e,t)=>{const r=Or(e);if(!t)return r;if(e!==t)return r;const n=r.paddingBox.top-t.scrollTop,o=r.paddingBox.left-t.scrollLeft,i=n+t.scrollHeight,a=o+t.scrollWidth,s=xr({top:n,right:a,bottom:i,left:o},r.border);return Dr({borderBox:s,margin:r.margin,border:r.border,padding:r.padding})})(e,l),d=Cr(c,n),u=(()=>{if(!l)return null;const e=Or(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:Cr(e,n),scroll:as(l),scrollSize:t,shouldClipSubject:s}})(),p=(({descriptor:e,isEnabled:t,isCombineEnabled:r,isFixedOnPage:n,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:e,client:t}=s,r=fi({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:r,diff:{value:en,displacement:en}}}})(),c="vertical"===o?_n:Bn;return{descriptor:e,isCombineEnabled:r,isFixedOnPage:n,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:gn({page:a,withPlaceholder:null,axis:c,frame:l})}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:o,client:c,page:d,closest:u});return p};const cs={passive:!1},ds={passive:!0};var us=e=>e.shouldPublishImmediately?cs:ds;const ps=e=>e&&e.env.closestScrollable||null;function gs(e){const t=Nr(null),r=Va(oa),n=na("droppable"),{registry:o,marshal:i}=r,a=ia(e),s=Kr(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=Nr(s),c=Kr(()=>fn((e,r)=>{t.current||Ur();const n={x:e,y:r};i.updateDroppableScroll(s.id,n)}),[s.id,i]),d=Qr(()=>{const e=t.current;return e&&e.env.closestScrollable?as(e.env.closestScrollable):en},[]),u=Qr(()=>{const e=d();c(e.x,e.y)},[d,c]),p=Kr(()=>Ar(u),[u]),g=Qr(()=>{const e=t.current,r=ps(e);e&&r||Ur();e.scrollOptions.shouldPublishImmediately?u():p()},[p,u]),m=Qr((e,n)=>{t.current&&Ur();const o=a.current,i=o.getDroppableRef();i||Ur();const l={closestScrollable:is(c=i),isFixedOnPage:ss(c)};var c;const d={ref:i,descriptor:s,env:l,scrollOptions:n};t.current=d;const u=ls({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(ji.contextId,r.contextId),p.addEventListener("scroll",g,us(d.scrollOptions))),u},[r.contextId,s,g,a]),f=Qr(()=>{const e=t.current,r=ps(e);return e&&r||Ur(),as(r)},[]),b=Qr(()=>{const e=t.current;e||Ur();const r=ps(e);t.current=null,r&&(p.cancel(),r.removeAttribute(ji.contextId),r.removeEventListener("scroll",g,us(e.scrollOptions)))},[g,p]),h=Qr(e=>{const r=t.current;r||Ur();const n=ps(r);n||Ur(),n.scrollTop+=e.y,n.scrollLeft+=e.x},[]),v=Kr(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:f,dragStopped:b,scroll:h}),[b,m,f,h]),y=Kr(()=>({uniqueId:n,descriptor:s,callbacks:v}),[v,s,n]);Hi(()=>(l.current=y.descriptor,o.droppable.register(y),()=>{t.current&&b(),o.droppable.unregister(y)}),[v,s,b,y,i,o.droppable]),Hi(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Hi(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function ms(){}const fs={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},bs=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>{const n=(({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>e||"close"===r?fs:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:r});return{display:t.display,boxSizing:"border-box",width:n.width,height:n.height,marginTop:n.margin.top,marginRight:n.margin.right,marginBottom:n.margin.bottom,marginLeft:n.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?zo.placeholder:null}};var hs=_r.memo(e=>{const t=Nr(null),r=Qr(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:n,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=Br("open"===e.animate);Tr(()=>s?"open"!==n?(r(),l(!1),ms):t.current?ms:(t.current=setTimeout(()=>{t.current=null,l(!1)}),r):ms,[n,s,r]);const c=Qr(e=>{"height"===e.propertyName&&(o(),"close"===n&&i())},[n,i,o]),d=bs({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return _r.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})});class vs extends _r.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 ys={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||Ur(),document.body}},xs=e=>{let t,r={...e};for(t in ys)void 0===e[t]&&(r={...r,[t]:ys[t]});return r},Es=(e,t)=>e===t.droppable.type,Is=(e,t)=>t.draggables[e.draggable.id],Ds=ur(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=fn(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),n=fn((n,o,i,a,s,l)=>{const c=s.descriptor.id;if(s.descriptor.droppableId===n){const e=l?{render:l,dragging:r(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(r,o)=>{const i=xs(o),a=i.droppableId,s=i.type,l=!i.isDropDisabled,c=i.renderClone;if(aa(r)){const e=r.critical;if(!Es(s,e))return t;const o=Is(e,r.dimensions),i=ao(r.impact)===a;return n(a,l,i,i,o,c)}if("DROP_ANIMATING"===r.phase){const e=r.completed;if(!Es(s,e.critical))return t;const o=Is(e.critical,r.dimensions);return n(a,l,Za(e.result)===a,ao(e.impact)===a,o,c)}if("IDLE"===r.phase&&r.completed&&!r.shouldFlush){const n=r.completed;if(!Es(s,n.critical))return t;const o=ao(n.impact)===a,i=Boolean(n.impact.at&&"COMBINE"===n.impact.at.type),l=n.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,r)=>({...xs(r),...e,...t}),{context:Qi,areStatePropsEqual:Ya})(e=>{const t=Mr(oa);t||Ur();const{contextId:r,isMovementAllowed:n}=t,o=Nr(null),i=Nr(null),{children:a,droppableId:s,type:l,mode:c,direction:d,ignoreContainerClipping:u,isDropDisabled:p,isCombineEnabled:g,snapshot:m,useClone:f,updateViewportMaxScroll:b,getContainerForClone:h}=e,v=Qr(()=>o.current,[]),y=Qr((e=null)=>{o.current=e},[]);Qr(()=>i.current,[]);const x=Qr((e=null)=>{i.current=e},[]),E=Qr(()=>{n()&&b({maxScroll:hi()})},[n,b]);gs({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:p,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:v});const I=Kr(()=>_r.createElement(vs,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:n})=>_r.createElement(hs,{placeholder:t,onClose:e,innerRef:x,animate:n,contextId:r,onTransitionEnd:E})),[r,E,e.placeholder,e.shouldAnimatePlaceholder,x]),D=Kr(()=>({innerRef:y,placeholder:I,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":r}}),[r,s,I,y]),w=f?f.dragging.draggableId:null,S=Kr(()=>({droppableId:s,type:l,isUsingCloneFor:w}),[s,w,l]);return _r.createElement(qa.Provider,{value:S},a(D,m),function(){if(!f)return null;const{dragging:e,render:t}=f,r=_r.createElement(Qa,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(r,n)=>t(r,n,e));return kr.createPortal(r,h())}())}),{Menu:ws}=r,{MenuItem:Ss}=r,{IconButton:Cs}=r,{MoreVert:Ps}=l,{MoreHoriz:Os}=l,As=i,Rs=e;class _s extends Rs.Component{static __initStatic(){this.propTypes={opts:As.object,onClick:As.func.isRequired}}constructor(e){super(e),_s.prototype.__init.call(this),_s.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:r,anchorEl:n}=this.state,o=Object.keys(e)||[],i=e=>()=>{t(e),this.handleRequestClose()},a=r?"inherit":"disabled";return Rs.createElement("div",null,Rs.createElement("div",{onClick:this.handleClick},Rs.createElement(Cs,{size:"large"},r?Rs.createElement(Ps,{color:a}):Rs.createElement(Os,{color:a}))),Rs.createElement(ws,{id:"point-menu",anchorEl:n,open:r,onClose:this.handleRequestClose,style:{transform:"translate(-15px, -15px)"},transformOrigin:{vertical:"center",horizontal:"right"}},o.map((t,r)=>Rs.createElement(Ss,{key:r,onClick:i(t)},e[t]))))}}_s.__initStatic();class Bs extends Rs.Component{static __initStatic2(){this.propTypes={onChange:As.func.isRequired,showSampleAnswer:As.bool.isRequired}}render(){const{onChange:e,showSampleAnswer:t}=this.props,r=t?"Provide Sample Response":"Remove Sample Response";return Rs.createElement(_s,{onClick:t=>e(t),opts:{sample:r}})}}Bs.__initStatic2();const Ns=e,Ts=i,{styled:Ls}=t,{InputLabel:Ms}=r,{OutlinedInput:ks}=r,{Select:Gs}=r,{FormControl:Ws}=r,{MenuItem:Fs}=r,{Checkbox:$s}=r,{FormGroup:js}=r,{FormControlLabel:Us}=r,{Typography:Hs}=r,{DragIndicator:qs}=l,Vs=s,{grey:zs}=d,Ys=p,{InputContainer:Zs}=g,Js=Vs("pie-lib:rubric:authoring"),Xs=(e,t,r)=>{const n=Array.from(e),[o]=n.splice(t,1);return n.splice(r,0,o),n},Ks=Ts.shape({excludeZero:Ts.bool,points:Ts.arrayOf(Ts.string),sampleAnswers:Ts.arrayOf(Ts.string),maxPoints:Ts.number,rubriclessInstruction:Ts.string}),Qs=e=>{const{value:t,onChange:r,max:n}=e,o="max-points-label";return Ns.createElement(Ws,{sx:{minWidth:120,m:1},variant:"outlined"},Ns.createElement(Ms,{id:o},"Max Points"),Ns.createElement(Gs,{labelId:o,label:"Max Points",value:t,onChange:e=>r(e.target.value),input:Ns.createElement(ks,{label:"Max Points"}),MenuProps:{transitionDuration:{enter:225,exit:195}}},Ze(1,n+1).map(e=>Ns.createElement(Fs,{key:`${e}`,value:e},e))))},el=e=>null===e||"null"===e,tl=Ls("div")(()=>({display:"flex",width:"100%",position:"relative"})),rl=Ls("div")(({theme:e})=>({width:"100%",backgroundColor:`${e.palette.common.white}`})),nl=Ls(qs)(({theme:e})=>({paddingTop:e.spacing(1),color:zs[500]})),ol=Ls(Hs)(({theme:e})=>({color:zs[500],paddingBottom:e.spacing(1),textTransform:"uppercase"})),il=Ls("div")(({theme:e})=>({paddingLeft:e.spacing(3)})),al=Ls("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingLeft:e.spacing(3),paddingTop:e.spacing(1)})),sl=Ls("div")(()=>({position:"absolute",right:0})),ll=e=>{const{points:t,content:r,sampleAnswer:n,mathMlOptions:o={},error:i,pluginOpts:a={}}=e,s=`${t} ${t<=1?"pt":"pts"}`,l=el(n);return Ns.createElement("div",null,Ns.createElement(ol,{variant:"overline"},s),Ns.createElement(tl,null,Ns.createElement(nl,null),Ns.createElement(rl,null,Ns.createElement(Ys,{error:i,pluginProps:a,markup:r,onChange:e.onChange,mathMlOptions:o})),Ns.createElement(sl,null,Ns.createElement(Bs,{showSampleAnswer:l,onChange:e.onMenuChange}))),i&&Ns.createElement(al,null,i),!l&&Ns.createElement(il,null,Ns.createElement(nl,{as:Hs,variant:"overline"},"Sample Response"),Ns.createElement(rl,null,Ns.createElement(Ys,{markup:n,pluginProps:a,onChange:e.onSampleChange,mathMlOptions:o}))))},cl=Ls("div")(({theme:e})=>({backgroundColor:zs[200],borderWidth:1,borderStyle:"solid",borderColor:zs[300],padding:e.spacing(2),margin:e.spacing(1)})),dl=Ls(Zs)(({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)"}})),ul=Ls("div")(()=>({display:"none"})),pl=Ls("div")(({theme:e})=>({paddingTop:e.spacing(1),paddingBottom:e.spacing(1)})),gl=Ls(Hs)(({theme:e})=>({paddingLeft:e.spacing(1),margin:e.spacing(1)}));class ml extends Ns.Component{constructor(...e){super(...e),ml.prototype.__init.call(this),ml.prototype.__init2.call(this),ml.prototype.__init3.call(this),ml.prototype.__init4.call(this),ml.prototype.__init5.call(this),ml.prototype.__init6.call(this),ml.prototype.__init7.call(this),ml.prototype.__init8.call(this),ml.prototype.__init9.call(this)}static __initStatic(){this.propTypes={value:Ks,config:Ts.object,pluginOpts:Ts.object,rubricless:Ts.bool,onChange:Ts.func}}static __initStatic2(){this.defaultProps={}}__init(){this.dragEnd=e=>{if(!e.destination)return;const{value:t,onChange:r}=this.props,n=Xs(t.points,e.source.index,e.destination.index),o=Xs(t.sampleAnswers,e.source.index,e.destination.index);r({...t,points:n,sampleAnswers:o})}}__init2(){this.changeRubriclessInstruction=e=>{const{value:t,onChange:r}=this.props;r({...t,rubriclessInstruction:e})}}__init3(){this.changeMaxPoints=e=>{const{value:t,onChange:r,rubricless:n}=this.props,o=t.points.length-1;let i,a;Js("current",o,"new: ",e),e>o&&(i=Qe(e-o).map(()=>"").concat(t.points),a=Qe(e-o).map(()=>null).concat(t.sampleAnswers)),e<o&&(Js("less than"),i=Je(t.points,e+1),a=Je(t.sampleAnswers,e+1)),r(i&&!n?{...t,points:i,sampleAnswers:a,maxPoints:e}:{...t,maxPoints:e})}}__init4(){this.changeContent=(e,t,r)=>{if(Js(`changeModel[${r}]:`,e,t),"points"!==r&&"sampleAnswers"!==r)return;const{value:n,onChange:o}=this.props,i=n[r]&&Array.from(n[r]);i.splice(e,1,t),Js(`changeModel[${r}]:`,i),o({...n,[r]: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,r=Array.from(t.sampleAnswers||[]);el(r[e])?this.changeContent(e,"","sampleAnswers"):this.changeContent(e,null,"sampleAnswers")}}}render(){const{value:e,mathMlOptions:t={},config:r={},rubricless:n=!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}=r||{},{pointsDescriptorsErrors:p}=s||{};e&&Number.isFinite(e.maxPoints)&&console.warn("maxPoints is deprecated - remove from model");const g=n?c:e.excludeZero?e.points.length:e.points.length-1;return Ns.createElement("div",null,Ns.createElement(gl,{variant:"h5"},"Rubric"),Ns.createElement(js,{row:!0},a&&Ns.createElement(Qs,{max:u<100?u:100,value:g,onChange:this.changeMaxPoints,pluginOpts:o}),i&&Ns.createElement(Us,{label:"Exclude zeros",control:Ns.createElement($s,{checked:e.excludeZero,onChange:this.excludeZeros})})),l&&n&&Ns.createElement(dl,{label:d.label},Ns.createElement(Ys,{markup:e.rubriclessInstruction||"",onChange:this.changeRubriclessInstruction,pluginProps:o,nonEmpty:!1,disableUnderline:!0,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:t,autoWidthToolbar:!0})),Ns.createElement("div",null,n?Ns.createElement(ul,null):Ns.createElement(cl,null,Ns.createElement(Ga,{onDragEnd:this.dragEnd},Ns.createElement(Ds,{droppableId:"droppable"},r=>Ns.createElement("div",{...r.droppableProps,ref:r.innerRef},e.points.map((r,n)=>this.shouldRenderPoint(n,e)&&Ns.createElement(es,{key:`${r.points}-${n}`,index:n,draggableId:n.toString()},i=>Ns.createElement(pl,{ref:i.innerRef,...i.draggableProps,...i.dragHandleProps},Ns.createElement(ll,{points:this.getPointForIndex(n,e),content:r,error:p&&p[e.points.length-1-n],sampleAnswer:e.sampleAnswers&&e.sampleAnswers[n],onChange:e=>this.changeContent(n,e,"points"),onSampleChange:e=>this.changeContent(n,e,"sampleAnswers"),onMenuChange:e=>this.onPointMenuChange(n,e),mathMlOptions:t,pluginOpts:o})))),r.placeholder))))))}}ml.__initStatic(),ml.__initStatic2(),Ts.object,Ts.object,Ts.bool,Ts.func,Ts.func;const fl="simpleRubric",bl="multiTraitRubric",hl="rubricless",vl="complex-rubric-simple",yl="complex-rubric-multi-trait";class xl extends M{}class El extends ve{}const Il={[fl]:`<${vl} id="simpleRubric" />`,[hl]:`<${vl} id="rubricless" />`,[bl]:`<${yl} id="multiTraitRubric" />`},Dl=(e,t)=>"instructor"===t.role?(e.mode="evaluate",e.animationsDisabled=!0,e):{};customElements.get(vl)||customElements.define(vl,xl),customElements.get(yl)||customElements.define(yl,El);class wl extends HTMLElement{constructor(){super(),this._model={},this._type=fl,this._options=null}set type(e){this._type=e}get type(){return this._type}set model(e){this._model=e;const t=this._type;switch(this.type=e.rubricType,this._type){case fl:default:customElements.whenDefined(vl).then(()=>{this.setRubricModel(this.simpleRubric)});break;case bl:customElements.whenDefined(yl).then(()=>{this.setMultiTraitRubricModel(this.multiTraitRubric)});break;case hl:customElements.whenDefined(vl).then(()=>{this.setRubriclessModel(this.rubricless)})}t!==this.type&&this._render()}setRubricModel(e){this._model&&this._model.rubrics&&this._model.rubrics.simpleRubric&&(e.model=Dl(this._model.rubrics.simpleRubric,this._options))}setMultiTraitRubricModel(e){if(this._model&&this._model.rubrics&&this._model.rubrics.multiTraitRubric){const{scales:t,excludeZero:r}=this._model.rubrics.multiTraitRubric||{},n=(t||[]).map(e=>({...e,excludeZero:r}));e.model={...Dl(this._model.rubrics.multiTraitRubric,this._options),visible:!0,arrowsDisabled:!0,scales:n}}}setRubriclessModel(e){this._model&&this._model.rubrics&&this._model.rubrics.rubricless&&(e.model=Dl(this._model.rubrics.rubricless,this._options))}set options(e){this._options=e}get multiTraitRubric(){return this.querySelector(`${yl}#multiTraitRubric`)}get simpleRubric(){return this.querySelector(`${vl}#simpleRubric`)}get rubricless(){return this.querySelector(`${vl}#rubricless`)}connectedCallback(){this._render()}_render(){this.innerHTML=Il[this._type]||""}}export{wl as default};
1
+ import{_dll_react as e,_dll_mui__material_styles as t,_dll_mui__material as r,_dll_mui__material_collapse as n,_dll_pie_lib__render_ui as o,_dll_prop_types as i,_dll_react_dom_client as a,_dll_debug as s,_dll_mui__icons_material as l,_dll_react_dom as c,_dll_mui__material_colors as d}from"../../../@pie-lib/shared-module@^5.2.2/module/index.js";import{_dll_pie_lib__math_rendering as u}from"../../../@pie-lib/math-rendering-module@^5.0.7/module/index.js";import{_dll_pie_lib__editable_html_tip_tap as p}from"../../../@pie-lib/editable-html-module@^7.1.4/module/index.js";import{_dll_pie_lib__config_ui as g}from"../../../@pie-lib/config-module@^4.0.7/module/index.js";const m=e,{styled:f}=t,{ListItem:b}=r,{List:h}=r,v=n,{color:y}=o,{UiLayout:x}=o,E=i,I=f(x)({color:y.text(),backgroundColor:y.background(),"&:not(.MathJax) table":{borderCollapse:"collapse"},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:"8px 12px",textAlign:"left"},"& ul p, & ol p":{marginBottom:0,marginTop:0,lineHeight:"normal"}}),D=f(b)({display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px 0px"}),w=f("div")({color:y.text()}),S=f("h3")({color:y.text(),fontSize:"16px",fontWeight:"700",margin:0,paddingBottom:"6px"}),C=f("h4")({color:y.text(),fontSize:"16px",fontWeight:"normal",margin:0,paddingBottom:"6px"}),P=f("h2")(({theme:e})=>({display:"flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:e.typography.fontSize,fontWeight:"500",color:y.tertiary(),margin:0})),O=f("span")({display:"inline-flex",transition:"transform 0.2s",marginLeft:2,alignSelf:"center"}),A=f("h2")({position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0,whiteSpace:"nowrap"}),R=E.shape({excludeZero:E.bool,points:E.arrayOf(E.string),sampleAnswers:E.arrayOf(E.string),animationsDisabled:E.bool});class _ extends m.Component{__init(){this.dudUrl="javascript:;"}constructor(e){super(e),_.prototype.__init.call(this),_.prototype.__init2.call(this),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}static __initStatic(){this.propTypes={model:E.object.isRequired,animationsDisabled:E.bool,value:R}}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}__init2(){this.shouldRenderPoint=(e,t)=>!t.excludeZero||0!==e}render(){const{model:e,value:t}=this.props;let{animationsDisabled:r}=this.props;if(r=r||t.animationsDisabled,t&&t.points){const{extraCSSRules:n}=e||{},{points:o,sampleAnswers:i}=t,a=m.createElement(h,{component:"nav"},o.slice(0).reverse().map((e,r)=>{r=o.length-r-1;const n=t.excludeZero?r+1:r;return m.createElement(m.Fragment,{key:r},m.createElement(D,{key:`P${r}`},m.createElement(S,null,1===n?`${n} PT`:`${n} PTS`),m.createElement(w,{dangerouslySetInnerHTML:{__html:e}})),i&&i[r]&&m.createElement(D,{key:`S${r}`},m.createElement(C,null,"Sample Answer"),m.createElement(w,{dangerouslySetInnerHTML:{__html:i[r]}})))}));return m.createElement(I,{extraCSSRules:n},m.createElement(A,null,"Rubric"),r?a:m.createElement(m.Fragment,null,m.createElement(P,{id:"rubric-toggle",tabIndex:0,role:"button","aria-expanded":this.state.rubricOpen,onClick:this.toggleRubric,onKeyPress:e=>{"Enter"!==e.key&&" "!==e.key||this.toggleRubric()}},this.state.linkPrefix," Rubric",m.createElement(O,{"aria-hidden":"true"},this.state.rubricOpen?m.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},m.createElement("polyline",{points:"18 15 12 9 6 15"})):m.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},m.createElement("polyline",{points:"6 9 12 15 18 9"})))),m.createElement(v,{in:this.state.rubricOpen,timeout:{enter:225,exit:195}},a)))}return null}}_.__initStatic();const B=e,{createRoot:N}=a,T=s,{renderMath:L}=u;class M extends HTMLElement{constructor(){super(),T.log("constructor called"),this.onModelChanged=this.onModelChanged.bind(this),this._root=null}set model(e){this._model=e,this._render()}onModelChanged(e){this._model=e,this._render()}connectedCallback(){this._render()}_render(){if(this._model){const e=B.createElement(_,{value:this._model});this._root||(this._root=N(this)),this._root.render(e),queueMicrotask(()=>{L(this)})}}disconnectedCallback(){this._root&&this._root.unmount()}}var k={};Object.defineProperty(k,"__esModule",{value:!0});class G extends CustomEvent{constructor(e,t,r){super(G.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e,hasModel:r}}),this.component=e,this.complete=t}}G.TYPE="model-set";var W=k.ModelSetEvent=G;class F extends CustomEvent{constructor(e,t){super(F.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e}}),this.component=e,this.complete=t}}F.TYPE="session-changed",k.SessionChangedEvent=F;const $=e,j=i,{styled:U}=t,{color:H}=o,q=U("td")({color:H.primaryDark(),verticalAlign:"middle"}),V=U("div")({color:H.secondaryBackground(),textAlign:"center"}),z=e=>{const{trait:t,traitIndex:r,scaleIndex:n,showStandards:o,showDescription:i,scorePointsValues:a}=e,{name:s,standards:l,scorePointsDescriptors:c,description:d}=t||{};return $.createElement("tr",{key:`scale-${n}-trait-${r}`},$.createElement(q,null,$.createElement("div",{dangerouslySetInnerHTML:{__html:s}})),o?$.createElement("td",null,$.createElement("div",{dangerouslySetInnerHTML:{__html:l.join(",")}})):null,i?$.createElement("td",null,$.createElement("div",{dangerouslySetInnerHTML:{__html:d}})):null,a&&a.map((e,t)=>{let r;try{r=c[a.length-t-1]||""}catch(e){r=""}return $.createElement("td",{key:`table-cell-${t}`},r?$.createElement("div",{dangerouslySetInnerHTML:{__html:r}}):$.createElement(V,{dangerouslySetInnerHTML:{__html:"No Description"}}))}))};z.propTypes={showStandards:j.bool,showDescription:j.bool,scorePointsValues:j.arrayOf(j.number),scaleIndex:j.number,traitIndex:j.number,trait:j.shape({name:j.string,standards:j.arrayOf(j.string),scorePointsDescriptors:j.arrayOf(j.string),description:j.string})};const Y=e,Z=i,{styled:J}=t,{color:X}=o,{ArrowBackIos:K}=l,{ArrowForwardIos:Q}=l,ee=J("div")({display:"flex",position:"relative"}),te=J("div")({width:"100%",overflow:"auto"}),re=J("table")(({theme:e})=>({borderSpacing:0,marginBottom:e.spacing(2),borderRadius:"4px",color:X.text(),fontSize:e.typography.fontSize,lineHeight:"16px",overflow:"unset","& ul, ol":{marginBlockStart:0,paddingInlineStart:e.spacing(2)},"& th":{padding:e.spacing(2),textAlign:"left",backgroundColor:X.secondaryBackground(),verticalAlign:"bottom"},"& th div":{width:"200px"},"& td":{width:"200px",padding:`${e.spacing(2)} ${e.spacing(1)}`,verticalAlign:"top"}})),ne=J("table")({"& td":{border:0,padding:0,textAlign:"center",minWidth:"200px"}}),oe=J("div")({marginBottom:"4px"}),ie=J("td")({fontWeight:"normal"}),ae=({show:e,onClick:t,extraStyles:r,children:n})=>Y.createElement("div",{style:{height:"calc(100% - 1px)",top:"1px",display:e?"flex":"none",width:"50px",margin:"auto",position:"absolute",alignItems:"center",justifyContent:"center",cursor:"pointer",...r},onClick:t},n);ae.propTypes={show:Z.bool,onClick:Z.func,extraStyles:Z.object,children:Z.object};class se extends Y.Component{constructor(...e){super(...e),se.prototype.__init.call(this),se.prototype.__init2.call(this),se.prototype.__init3.call(this)}__init(){this.state={}}componentDidMount(){this.tableWrapper&&this.tableWrapper.offsetWidth<this.tableWrapper.scrollWidth&&this.setState({showRight:!0})}__init2(){this.scrollLeft=()=>{this.tableWrapper.scrollLeft-=this.tableWrapper.offsetWidth/2,this.setState({showRight:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}}__init3(){this.scrollRight=()=>{const e=this.tableWrapper.scrollLeft;this.tableWrapper.scrollLeft+=this.tableWrapper.offsetWidth/2,this.setState({showRight:e!==this.tableWrapper.scrollLeft&&this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}}render(){const{showRight:e,showLeft:t}=this.state,{scale:r,scaleIndex:n,showDescription:o,showPointsLabels:i,showStandards:a,arrowsDisabled:s}=this.props,{excludeZero:l,maxPoints:c,traitLabel:d,traits:u,scorePointsLabels:p}=r||{};let g,m,f,b=[];try{for(let e=c;e>=l;e-=1)b.push(e);const{traitStandards:e,traitDescriptions:t}=u.reduce((e,t)=>({traitStandards:[...e.traitStandards,...t.standards||[]],traitDescriptions:[...e.traitDescriptions,...t.description||[]]}),{traitStandards:[],traitDescriptions:[]});g=o&&t.length,m=i&&p.length,f=a&&e.length}catch(e){g=!1,m=!1,f=!1}return Y.createElement(ee,null,Y.createElement(ae,{show:t&&!s,onClick:this.scrollLeft,extraStyles:{left:0,background:`linear-gradient(to right, white, ${X.background()})`}},Y.createElement(K,null)),Y.createElement(te,{ref:e=>{this.tableWrapper=e},onScroll:()=>{this.setState({showRight:this.tableWrapper.scrollLeft+this.tableWrapper.offsetWidth<this.tableWrapper.scrollWidth-5&&this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}},s&&(e||t)?Y.createElement("div",null,"The item is too large to fit in print mode."):null,Y.createElement(re,{key:`scale-${n}`},Y.createElement("thead",null,Y.createElement("tr",null,Y.createElement("th",null,Y.createElement("div",{dangerouslySetInnerHTML:{__html:d}})),f?Y.createElement("th",null,Y.createElement("div",null,"Standard(s)")):null,g?Y.createElement("th",null,Y.createElement("div",null,"Description")):null,b&&b.map((e,t)=>{let r="";try{r=p[b.length-t-1]||""}catch(e){r=""}return Y.createElement("th",{key:`table-header-${t}`},Y.createElement(ne,null,Y.createElement("thead",null,m?Y.createElement("tr",null,Y.createElement("td",null,Y.createElement(oe,{dangerouslySetInnerHTML:{__html:r}}))):null,Y.createElement("tr",null,Y.createElement(ie,null,1===e?`${e} point`:`${e} points`)))))}))),Y.createElement("tbody",null,u&&u.map((e,t)=>Y.createElement(z,{key:`trait_${n}_${t}`,trait:e,traitIndex:t,showDescription:!!g,showStandards:!!f,scaleIndex:n,scorePointsValues:b,excludeZero:l}))))),Y.createElement(ae,{show:e&&!s,onClick:this.scrollRight,extraStyles:{right:0,background:`linear-gradient(to left, white, ${X.background()})`}},Y.createElement(Q,null)))}}se.propTypes={scaleIndex:Z.number,scale:Z.shape({excludeZero:Z.bool,maxPoints:Z.number,scorePointsLabels:Z.arrayOf(Z.string),traitLabel:Z.string,traits:Z.arrayOf(Z.shape({name:Z.string,standards:Z.arrayOf(Z.string),scorePointsDescriptors:Z.arrayOf(Z.string),description:Z.string}))}),showPointsLabels:Z.bool,showDescription:Z.bool,showStandards:Z.bool,arrowsDisabled:Z.bool};const le=e,ce=i,{Link:de}=r,ue=n,{color:pe}=o,{UiLayout:ge}=o;class me extends le.Component{constructor(e){super(e),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}render(){const{model:e}=this.props;let{animationsDisabled:t}=this.props;const{extraCSSRules:r,halfScoring:n,scales:o,visible:i,pointLabels:a,description:s,standards:l,arrowsDisabled:c}=e||{};if(t=t||e.animationsDisabled,!o||!i)return null;const d=le.createElement(ge,{extraCSSRules:r,style:{fontFamily:"Cerebri Sans",color:pe.text(),backgroundColor:pe.background()}},n?le.createElement("div",{style:{marginBottom:"16px"}},"* Half-point or in-between scores are permitted under this rubric."):null,o.map((e,t)=>le.createElement(se,{key:`scale_${t}`,scale:e,scaleIndex:t,showPointsLabels:a,showDescription:s,showStandards:l,arrowsDisabled:c})));return t?d:le.createElement(ge,{extraCSSRules:r,style:{color:pe.text(),backgroundColor:pe.background()}},le.createElement(de,{style:{backgroundColor:pe.background()},href:this.dudUrl,onClick:this.toggleRubric},this.state.linkPrefix," Rubric"),le.createElement(ue,{style:{marginTop:"16px"},in:this.state.rubricOpen,timeout:{enter:225,exit:195}},d))}}me.propTypes={model:ce.shape({halfScoring:ce.bool,scales:ce.arrayOf(ce.shape({excludeZero:ce.bool,maxPoints:ce.number,scorePointsLabels:ce.arrayOf(ce.string),traitLabel:ce.string,traits:ce.arrayOf(ce.shape({name:ce.string,description:ce.string,scorePointsDescriptors:ce.arrayOf(ce.string),standards:ce.arrayOf(ce.string)}))})),visible:ce.bool,pointLabels:ce.bool,description:ce.bool,standards:ce.bool,animationsDisabled:ce.bool}),animationsDisabled:ce.bool};const fe=e,{createRoot:be}=a,{renderMath:he}=u;class ve extends HTMLElement{constructor(){super(),this._model={},this._session=null,this._root=null}set model(e){this._model=e,this.dispatchEvent(new W(this.tagName.toLowerCase(),this._session,!!this._model)),this._render()}set session(e){this._session=e}get session(){return this._session}connectedCallback(){this._render()}_render(){const e=fe.createElement(me,{model:this._model,session:this._session});this._root||(this._root=be(this)),this._root.render(e),queueMicrotask(()=>{he(this)})}disconnectedCallback(){this._root&&this._root.unmount()}}var ye="object"==typeof global&&global&&global.Object===Object&&global,xe="object"==typeof self&&self&&self.Object===Object&&self,Ee=(ye||xe||Function("return this")()).Symbol,Ie=Object.prototype,De=Ie.hasOwnProperty,we=Ie.toString,Se=Ee?Ee.toStringTag:void 0;var Ce=Object.prototype.toString;var Pe=Ee?Ee.toStringTag:void 0;function Oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Pe&&Pe in Object(e)?function(e){var t=De.call(e,Se),r=e[Se];try{e[Se]=void 0;var n=!0}catch(e){}var o=we.call(e);return n&&(t?e[Se]=r:delete e[Se]),o}(e):function(e){return Ce.call(e)}(e)}var Ae=/\s/;var Re=/^\s+/;function _e(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Ae.test(e.charAt(t)););return t}(e)+1).replace(Re,""):e}function Be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Ne=/^[-+]0x[0-9a-f]+$/i,Te=/^0b[01]+$/i,Le=/^0o[0-7]+$/i,Me=parseInt;function ke(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]"==Oe(e)}(e))return NaN;if(Be(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Be(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=_e(e);var r=Te.test(e);return r||Le.test(e)?Me(e.slice(2),r?2:8):Ne.test(e)?NaN:+e}var Ge=1/0;function We(e){return e?(e=ke(e))===Ge||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Fe(e){var t=We(e),r=t%1;return t==t?r?t-r:t:0}function $e(e){return e}var je=/^(?:0|[1-9]\d*)$/;function Ue(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){if(!Be(e))return!1;var t=Oe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)}function He(e,t,r){if(!Be(r))return!1;var n=typeof t;return!!("number"==n?Ue(r)&&function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&je.test(e))&&e>-1&&e%1==0&&e<t}(t,r.length):"string"==n&&t in r)&&function(e,t){return e===t||e!=e&&t!=t}(r[t],e)}var qe=Math.ceil,Ve=Math.max;var ze,Ye=function(e,t,r){return r&&"number"!=typeof r&&He(e,t,r)&&(t=r=void 0),e=We(e),void 0===t?(t=e,e=0):t=We(t),function(e,t,r,n){for(var o=-1,i=Ve(qe((t-e)/(r||1)),0),a=Array(i);i--;)a[n?i:++o]=e,e+=r;return a}(e,t,r=void 0===r?e<t?1:-1:We(r),ze)},Ze=Ye;function Je(e,t,r){var n=null==e?0:e.length;return n?function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}(e,(t=n-(t=r||void 0===t?1:Fe(t)))<0?0:t,n):[]}var Xe=4294967295,Ke=Math.min;function Qe(e,t){if((e=Fe(e))<1||e>9007199254740991)return[];var r,n=Xe,o=Ke(e,Xe);e-=Xe;for(var i=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(o,t="function"==typeof(r=t)?r:$e);++n<e;)t(n);return i}function et(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 tt="function"==typeof Symbol&&Symbol.observable||"@@observable",rt=()=>Math.random().toString(36).substring(7).split("").join("."),nt={INIT:`@@redux/INIT${rt()}`,REPLACE:`@@redux/REPLACE${rt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${rt()}`};function ot(e,t,r){if("function"!=typeof e)throw new Error(et(2));if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(et(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(et(1));return r(ot)(e,t)}let n=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(et(3));return o}function u(e){if("function"!=typeof e)throw new Error(et(4));if(l)throw new Error(et(5));let t=!0;c();const r=s++;return a.set(r,e),function(){if(t){if(l)throw new Error(et(6));t=!1,c(),a.delete(r),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(et(7));if(void 0===e.type)throw new Error(et(8));if("string"!=typeof e.type)throw new Error(et(17));if(l)throw new Error(et(9));try{l=!0,o=n(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}p({type:nt.INIT});return{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(et(10));n=e,p({type:nt.REPLACE})},[tt]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(et(11));function r(){const e=t;e.next&&e.next(d())}r();return{unsubscribe:e(r)}},[tt](){return this}}}}}function it(e,t){return function(...r){return t(e.apply(this,r))}}function at(e,t){if("function"==typeof e)return it(e,t);if("object"!=typeof e||null===e)throw new Error(et(16));const r={};for(const n in e){const o=e[n];"function"==typeof o&&(r[n]=it(o,t))}return r}function st(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}var lt={exports:{}},ct={};var dt=e;var ut="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},pt=dt.useSyncExternalStore,gt=dt.useRef,mt=dt.useEffect,ft=dt.useMemo,bt=dt.useDebugValue;ct.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var i=gt(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=ft(function(){function e(e){if(!l){if(l=!0,i=e,e=n(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return s=t}return s=e}if(t=s,ut(i,e))return t;var r=n(e);return void 0!==o&&o(t,r)?(i=e,t):(i=e,s=r)}var i,s,l=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,n,o]);var s=pt(e,i[0],i[1]);return mt(function(){a.hasValue=!0,a.value=s},[s]),bt(s),s},lt.exports=ct;const ht=e;var vt=ht.version.startsWith("19"),yt=Symbol.for(vt?"react.transitional.element":"react.element"),xt=Symbol.for("react.portal"),Et=Symbol.for("react.fragment"),It=Symbol.for("react.strict_mode"),Dt=Symbol.for("react.profiler"),wt=Symbol.for("react.consumer"),St=Symbol.for("react.context"),Ct=Symbol.for("react.forward_ref"),Pt=Symbol.for("react.suspense"),Ot=Symbol.for("react.suspense_list"),At=Symbol.for("react.memo"),Rt=Symbol.for("react.lazy"),_t=Ct,Bt=At;function Nt(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case yt:switch(e=e.type){case Et:case Dt:case It:case Pt:case Ot:return e;default:switch(e=e&&e.$$typeof){case St:case Ct:case Rt:case At:case wt:return e;default:return t}}case xt:return t}}}(e)===At}function Tt(e,t,r,n,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,u,p=!1;function g(p,g){const m=!i(g,l),f=!o(p,s,g,l);return s=p,l=g,m&&f?(c=e(s,l),t.dependsOnOwnProps&&(d=t(n,l)),u=r(c,d,l),u):m?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(d=t(n,l)),u=r(c,d,l),u):f?function(){const t=e(s,l),n=!a(t,c);return c=t,n&&(u=r(c,d,l)),u}():u}return function(o,i){return p?g(o,i):(s=o,l=i,c=e(s,l),d=t(n,l),u=r(c,d,l),p=!0,u)}}function Lt(e){return function(t){const r=e(t);function n(){return r}return n.dependsOnOwnProps=!1,n}}function Mt(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function kt(e,t){return function(t,{displayName:r}){const n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=Mt(e);let o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=Mt(o),o=n(t,r)),o},n}}function Gt(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function Wt(e,t,r){return{...r,...e,...t}}var Ft={notify(){},get:()=>[]};function $t(e,t){let r,n=Ft,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,r||(r=t?t.addNestedSub(a):e.subscribe(a),n=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 r=e;for(;r;)t.push(r),r=r.next;return t},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){n&&null!==e&&(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function l(){o--,r&&0===o&&(r(),r=void 0,n.clear(),n=Ft)}const c={addNestedSub:function(e){s();const t=n.subscribe(e);let r=!1;return()=>{r||(r=!0,t(),l())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>n};return c}var jt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Ut="undefined"!=typeof navigator&&"ReactNative"===navigator.product,Ht=jt||Ut?ht.useLayoutEffect:ht.useEffect;function qt(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Vt(e,t){if(qt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!qt(e[r[n]],t[r[n]]))return!1;return!0}var zt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Yt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Zt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Jt={[_t]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Bt]:Zt};function Xt(e){return Nt(e)?Zt:Jt[e.$$typeof]||zt}var Kt=Object.defineProperty,Qt=Object.getOwnPropertyNames,er=Object.getOwnPropertySymbols,tr=Object.getOwnPropertyDescriptor,rr=Object.getPrototypeOf,nr=Object.prototype;function or(e,t){if("string"!=typeof t){if(nr){const r=rr(t);r&&r!==nr&&or(e,r)}let r=Qt(t);er&&(r=r.concat(er(t)));const n=Xt(e),o=Xt(t);for(let i=0;i<r.length;++i){const a=r[i];if(!(Yt[a]||o&&o[a]||n&&n[a])){const r=tr(t,a);try{Kt(e,a,r)}catch(e){}}}}return e}var ir=Symbol.for("react-redux-context"),ar="undefined"!=typeof globalThis?globalThis:{};var sr=function(){if(!ht.createContext)return{};const e=ar[ir]??=new Map;let t=e.get(ht.createContext);return t||(t=ht.createContext(null),e.set(ht.createContext,t)),t}(),lr=[null,null];function cr(e,t,r,n,o,i){e.current=n,r.current=!1,o.current&&(o.current=null,i())}function dr(e,t){return e===t}var ur=function(e,t,r,{pure:n,areStatesEqual:o=dr,areOwnPropsEqual:i=Vt,areStatePropsEqual:a=Vt,areMergedPropsEqual:s=Vt,forwardRef:l=!1,context:c=sr}={}){const d=c,u=function(e){return e?"function"==typeof e?kt(e):Gt(e,"mapStateToProps"):Lt(()=>({}))}(e),p=function(e){return e&&"object"==typeof e?Lt(t=>function(e,t){const r={};for(const n in e){const o=e[n];"function"==typeof o&&(r[n]=(...e)=>t(o(...e)))}return r}(e,t)):e?"function"==typeof e?kt(e):Gt(e,"mapDispatchToProps"):Lt(e=>({dispatch:e}))}(t),g=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:r,areMergedPropsEqual:n}){let o,i=!1;return function(t,r,a){const s=e(t,r,a);return i?n(s,o)||(o=s):(i=!0,o=s),o}}}(e):Gt(e,"mergeProps"):()=>Wt}(r),m=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",r=`Connect(${t})`,n={shouldHandleStateChanges:m,displayName:r,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:u,initMapDispatchToProps:p,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function c(t){const[r,o,i]=ht.useMemo(()=>{const{reactReduxForwardedRef:e,...r}=t;return[t.context,e,r]},[t]),a=ht.useMemo(()=>{let e=d;return function(e){let t,r=e[0],n=1;for(;n<e.length;){const o=e[n],i=e[n+1];if(n+=2,("optionalAccess"===o||"optionalCall"===o)&&null==r)return;"access"===o||"optionalAccess"===o?(t=r,r=i(r)):"call"!==o&&"optionalCall"!==o||(r=i((...e)=>r.call(t,...e)),t=void 0)}}([r,"optionalAccess",e=>e.Consumer]),e},[r,d]),s=ht.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=ht.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:n,...o}){return Tt(t(e,o),r(e,o),n(e,o),e,o)}(u.dispatch,n),[u]),[f,b]=ht.useMemo(()=>{if(!m)return lr;const e=$t(u,l?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[u,l,s]),h=ht.useMemo(()=>l?s:{...s,subscription:f},[l,s,f]),v=ht.useRef(void 0),y=ht.useRef(i),x=ht.useRef(void 0),E=ht.useRef(!1),I=ht.useRef(!1),D=ht.useRef(void 0);Ht(()=>(I.current=!0,()=>{I.current=!1}),[]);const w=ht.useMemo(()=>()=>x.current&&i===y.current?x.current:g(u.getState(),i),[u,i]),S=ht.useMemo(()=>e=>f?function(e,t,r,n,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 r,g;try{r=n(e,o.current)}catch(e){g=e,p=e}g||(p=null),r===i.current?a.current||c():(i.current=r,l.current=r,a.current=!0,d())};return r.onStateChange=g,r.trySubscribe(),g(),()=>{if(u=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}(m,u,f,g,y,v,E,I,x,b,e):()=>{},[f]);var C,P,O;let A;C=cr,P=[y,v,E,i,x,b],Ht(()=>C(...P),O);try{A=ht.useSyncExternalStore(S,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}Ht(()=>{D.current=void 0,x.current=void 0,v.current=A});const R=ht.useMemo(()=>ht.createElement(e,{...A,ref:o}),[o,e,A]);return ht.useMemo(()=>m?ht.createElement(a.Provider,{value:h},R):R,[a,R,h])}const f=ht.memo(c);if(f.WrappedComponent=e,f.displayName=c.displayName=r,l){const t=ht.forwardRef(function(e,t){return ht.createElement(f,{...e,reactReduxForwardedRef:t})});return t.displayName=r,t.WrappedComponent=e,or(t,e)}return or(f,e)}};var pr=function(e){const{children:t,context:r,serverState:n,store:o}=e,i=ht.useMemo(()=>{const e=$t(o);return{store:o,subscription:e,getServerState:n?()=>n:void 0}},[o,n]),a=ht.useMemo(()=>o.getState(),[o]);Ht(()=>{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=r||sr;return ht.createElement(s.Provider,{value:i},t)};function gr(e=sr){return function(){return ht.useContext(e)}}var mr=gr();function fr(e=sr){const t=e===sr?mr:gr(e),r=()=>{const{store:e}=t();return e};return Object.assign(r,{withTypes:()=>r}),r}var br=fr();!function(e=sr){const t=e===sr?br:fr(e),r=()=>t().dispatch;Object.assign(r,{withTypes:()=>r})}();var hr=(e,t)=>e===t;!function(e=sr){const t=e===sr?mr:gr(e),r=(e,r={})=>{const{equalityFn:n=hr}="function"==typeof r?{equalityFn:r}:r,o=t(),{store:i,subscription:a,getServerState:s}=o;ht.useRef(!0);const l=ht.useCallback({[e.name]:t=>e(t)}[e.name],[e]),c=lt.exports.useSyncExternalStoreWithSelector(a.addNestedSub,i.getState,s||i.getState,l,n);return ht.useDebugValue(c),c};Object.assign(r,{withTypes:()=>r})}();var vr="Invariant failed";var yr=function(e){var t=e.top,r=e.right,n=e.bottom,o=e.left;return{top:t,right:r,bottom:n,left:o,width:r-o,height:n-t,x:o,y:t,center:{x:(r+o)/2,y:(n+t)/2}}},xr=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Er=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Ir={top:0,right:0,bottom:0,left:0},Dr=function(e){var t=e.borderBox,r=e.margin,n=void 0===r?Ir:r,o=e.border,i=void 0===o?Ir:o,a=e.padding,s=void 0===a?Ir:a,l=yr(xr(t,n)),c=yr(Er(t,i)),d=yr(Er(c,s));return{marginBox:l,borderBox:yr(t),paddingBox:c,contentBox:d,margin:n,border:i,padding:s}},wr=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var r=Number(t);return isNaN(r)&&function(e){if(!e)throw new Error(vr)}(!1),r},Sr=function(e,t){var r,n,o=e.borderBox,i=e.border,a=e.margin,s=e.padding,l=(n=t,{top:(r=o).top+n.y,left:r.left+n.x,bottom:r.bottom+n.y,right:r.right+n.x});return Dr({borderBox:l,border:i,margin:a,padding:s})},Cr=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Sr(e,t)},Pr=function(e,t){var r={top:wr(t.marginTop),right:wr(t.marginRight),bottom:wr(t.marginBottom),left:wr(t.marginLeft)},n={top:wr(t.paddingTop),right:wr(t.paddingRight),bottom:wr(t.paddingBottom),left:wr(t.paddingLeft)},o={top:wr(t.borderTopWidth),right:wr(t.borderRightWidth),bottom:wr(t.borderBottomWidth),left:wr(t.borderLeftWidth)};return Dr({borderBox:e,margin:r,padding:n,border:o})},Or=function(e){var t=e.getBoundingClientRect(),r=window.getComputedStyle(e);return Pr(t,r)},Ar=function(e){var t=[],r=null,n=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];t=o,r||(r=requestAnimationFrame(function(){r=null,e.apply(void 0,t)}))};return n.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},n};function Rr(){return Rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rr.apply(null,arguments)}const _r=e,{useState:Br}=e,{useRef:Nr}=e,{useEffect:Tr}=e,{useLayoutEffect:Lr}=e,{useContext:Mr}=e,kr=c,{flushSync:Gr}=c;function Wr(e,t){}function Fr(){}function $r(e,t,r){const n=t.map(t=>{const n=(o=r,i=t.options,{...o,...i});var o,i;return e.addEventListener(t.eventName,t.fn,n),function(){e.removeEventListener(t.eventName,t.fn,n)}});return function(){n.forEach(e=>{e()})}}Wr.bind(null,"warn"),Wr.bind(null,"error");class jr extends Error{}function Ur(e,t){throw new jr("Invariant failed")}jr.prototype.toString=function(){return this.message};class Hr extends _r.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=Fr,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort();e.error instanceof jr&&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=$r(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof jr))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const qr=e=>e+1,Vr=(e,t)=>{const r=e.droppableId===t.droppableId,n=qr(e.index),o=qr(t.index);return r?`\n You have moved the item from position ${n}\n to position ${o}\n `:`\n You have moved the item from position ${n}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${o}\n `},zr=(e,t,r)=>t.droppableId===r.droppableId?`\n The item ${e}\n has been combined with ${r.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${r.draggableId}\n in list ${r.droppableId}\n `,Yr=e=>`\n The item has returned to its starting position\n of ${qr(e.index)}\n`,Zr={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:e=>`\n You have lifted an item in position ${qr(e.source.index)}\n`,onDragUpdate:e=>{const t=e.destination;if(t)return Vr(e.source,t);const r=e.combine;return r?zr(e.draggableId,e.source,r):"You are over an area that cannot be dropped on"},onDragEnd:e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${Yr(e.source)}\n `;const t=e.destination,r=e.combine;return t?`\n You have dropped the item.\n ${Vr(e.source,t)}\n `:r?`\n You have dropped the item.\n ${zr(e.draggableId,e.source,r)}\n `:`\n The item has been dropped while not over a drop area.\n ${Yr(e.source)}\n `}};function Jr(e,t){return e===t||!(!Number.isNaN(e)||!Number.isNaN(t))}function Xr(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Jr(e[r],t[r]))return!1;return!0}function Kr(e,t){const r=Br(()=>({inputs:t,result:e()}))[0],n=Nr(!0),o=Nr(r),i=n.current||Boolean(t&&o.current.inputs&&Xr(t,o.current.inputs))?o.current:{inputs:t,result:e()};return Tr(()=>{n.current=!1,o.current=i},[i]),i.result}function Qr(e,t){return Kr(()=>e,t)}const en={x:0,y:0},tn=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),rn=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),nn=(e,t)=>e.x===t.x&&e.y===t.y,on=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),an=(e,t,r=0)=>"x"===e?{x:t,y:r}:{x:r,y:t},sn=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),ln=(e,t)=>Math.min(...t.map(t=>sn(e,t))),cn=e=>t=>({x:e(t.x),y:e(t.y)});const dn=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),un=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}],pn=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const r=yr({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r})(t.pageMarginBox,e):yr(e);var gn=({page:e,withPlaceholder:t,axis:r,frame:n})=>{const o=((e,t)=>t?dn(e,t.scroll.diff.displacement):e)(e.marginBox,n),i=((e,t,r)=>r&&r.increasedBy?{...e,[t.end]:e[t.end]+r.increasedBy[t.line]}:e)(o,r,t);return{page:e,withPlaceholder:t,active:pn(i,n)}},mn=(e,t)=>{e.frame||Ur();const r=e.frame,n=rn(t,r.scroll.initial),o=on(n),i={...r,scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}},a=gn({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function fn(e,t=Xr){let r=null;function n(...n){if(r&&r.lastThis===this&&t(n,r.lastArgs))return r.lastResult;const o=e.apply(this,n);return r={lastResult:o,lastArgs:n,lastThis:this},o}return n.clear=function(){r=null},n}const bn=fn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),hn=fn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),vn=fn(e=>Object.values(e)),yn=fn(e=>Object.values(e));var xn=fn((e,t)=>{const r=yn(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index);return r});function En(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function In(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Dn=fn((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),wn=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Sn={point:en,value:0},Cn={invisible:{},visible:{},all:[]},Pn={displaced:Cn,displacedBy:Sn,at:null};var On=(e,t)=>r=>e<=r&&r<=t,An=e=>{const t=On(e.top,e.bottom),r=On(e.left,e.right);return n=>{if(t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right))return!0;const o=t(n.top)||t(n.bottom),i=r(n.left)||r(n.right);if(o&&i)return!0;const a=n.top<e.top&&n.bottom>e.bottom,s=n.left<e.left&&n.right>e.right;if(a&&s)return!0;return a&&i||s&&o}},Rn=e=>{const t=On(e.top,e.bottom),r=On(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&r(e.left)&&r(e.right)};const _n={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Bn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};const Nn=({target:e,destination:t,viewport:r,withDroppableDisplacement:n,isVisibleThroughFrameFn:o})=>{const i=n?((e,t)=>{const r=t.frame?t.frame.scroll.diff.displacement:en;return dn(e,r)})(e,t):e;return((e,t,r)=>!!t.subject.active&&r(t.subject.active)(e))(i,t,o)&&((e,t,r)=>r(t)(e))(i,r,o)},Tn=e=>Nn({...e,isVisibleThroughFrameFn:Rn});function Ln({afterDragging:e,destination:t,displacedBy:r,viewport:n,forceShouldAnimate:o,last:i}){return e.reduce(function(e,a){const s=function(e,t){const r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return yr(xr(r,n))}(a,r),l=a.descriptor.id;e.all.push(l);var c;if(!(c={target:s,destination:t,viewport:n,withDroppableDisplacement:!0},Nn({...c,isVisibleThroughFrameFn:An})))return e.invisible[a.descriptor.id]=!0,e;const d=((e,t,r)=>{if("boolean"==typeof r)return r;if(!t)return!0;const{invisible:n,visible:o}=t;if(n[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 Mn({insideDestination:e,inHomeList:t,displacedBy:r,destination:n}){const o=function(e,t){if(!e.length)return 0;const r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}(e,{inHomeList:t});return{displaced:Cn,displacedBy:r,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function kn({draggable:e,insideDestination:t,destination:r,viewport:n,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=wn(e,r);if(null==a)return Mn({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const c=t.find(e=>e.descriptor.index===a);if(!c)return Mn({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const d=Dn(e,t),u=t.indexOf(c);return{displaced:Ln({afterDragging:d.slice(u),destination:r,displacedBy:o,last:i,viewport:n.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function Gn(e,t){return Boolean(t.effected[e])}var Wn=({isMovingForward:e,isInHomeList:t,draggable:r,draggables:n,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||Ur(),"REORDER"===c.type){const n=(({isMovingForward:e,isInHomeList:t,insideDestination:r,location:n})=>{if(!r.length)return null;const o=n.index,i=e?o+1:o-1,a=r[0].descriptor.index,s=r[r.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==n?null:kn({draggable:r,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:n})}const d=(({isMovingForward:e,destination:t,draggables:r,combine:n,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=n.draggableId,a=r[i].descriptor.index;return Gn(i,o)?e?a:a-1:e?a+1:a})({isMovingForward:e,destination:o,displaced:a.displaced,draggables:n,combine:c.combine,afterCritical:l});return null==d?null:kn({draggable:r,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})},Fn=({afterCritical:e,impact:t,draggables:r})=>{const n=In(t);n||Ur();const o=n.draggableId,i=r[o].page.borderBox.center,a=(({displaced:e,afterCritical:t,combineWith:r,displacedBy:n})=>{const o=Boolean(e.visible[r]||e.invisible[r]);return Gn(r,t)?o?en:on(n.point):o?n.point:en})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return tn(i,a)};const $n=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,jn=(e,t,r)=>t[e.crossAxisStart]+r.margin[e.crossAxisStart]+r.borderBox[e.crossAxisSize]/2,Un=({axis:e,moveRelativeTo:t,isMoving:r})=>an(e.line,t.marginBox[e.end]+$n(e,r),jn(e,t.marginBox,r)),Hn=({axis:e,moveRelativeTo:t,isMoving:r})=>an(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,r),jn(e,t.marginBox,r));var qn=({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o})=>{const i=xn(n.descriptor.id,r),a=t.page,s=n.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:r})=>an(e.line,t.contentBox[e.start]+$n(e,r),jn(e,t.contentBox,r)))({axis:s,moveInto:n.page,isMoving:a});const{displaced:l,displacedBy:c}=e,d=l.all[0];if(d){const e=r[d];if(Gn(d,o))return Hn({axis:s,moveRelativeTo:e.page,isMoving:a});const t=Sr(e.page,c.point);return Hn({axis:s,moveRelativeTo:t,isMoving:a})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return a.borderBox.center;if(Gn(u.descriptor.id,o)){const e=Sr(u.page,on(o.displacedBy.point));return Un({axis:s,moveRelativeTo:e,isMoving:a})}return Un({axis:s,moveRelativeTo:u.page,isMoving:a})},Vn=(e,t)=>{const r=e.frame;return r?tn(t,r.scroll.diff.displacement):t};var zn=e=>{const t=(({impact:e,draggable:t,droppable:r,draggables:n,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return r&&a?"REORDER"===a.type?qn({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o}):Fn({impact:e,draggables:n,afterCritical:o}):i})(e),r=e.droppable;return r?Vn(r,t):t},Yn=(e,t)=>{const r=rn(t,e.scroll.initial),n=on(r);return{frame:yr({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}}};function Zn(e,t){return e.map(e=>t[e])}var Jn=({pageBorderBoxCenter:e,draggable:t,viewport:r})=>{const n=((e,t)=>tn(e.scroll.diff.displacement,t))(r,e),o=rn(n,t.page.borderBox.center);return tn(t.client.borderBox.center,o)},Xn=({draggable:e,destination:t,newPageBorderBoxCenter:r,viewport:n,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=rn(r,e.page.borderBox.center),s={target:dn(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:n};return i?(e=>{return Nn({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const r=On(e.top,e.bottom),n=On(e.left,e.right);return e=>t===_n?r(e.top)&&r(e.bottom):n(e.left)&&n(e.right)})});var t})(s):Tn(s)},Kn=({isMovingForward:e,draggable:t,destination:r,draggables:n,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!r.isEnabled)return null;const c=xn(r.descriptor.id,n),d=wn(t,r),u=(({isMovingForward:e,draggable:t,destination:r,insideDestination:n,previousImpact:o})=>{if(!r.isCombineEnabled)return null;if(!En(o))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:r.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=Dn(t,n);if(!s)return l.length?i(l[l.length-1].descriptor.id):null;const c=l.findIndex(e=>e.descriptor.id===s);-1===c&&Ur();const d=c-1;return d<0?null:i(l[d].descriptor.id)})({isMovingForward:e,draggable:t,destination:r,insideDestination:c,previousImpact:o})||Wn({isMovingForward:e,isInHomeList:d,draggable:t,draggables:n,destination:r,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!u)return null;const p=zn({impact:u,draggable:t,droppable:r,draggables:n,afterCritical:l});if(Xn({draggable:t,destination:r,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})){return{clientSelection:Jn({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:u,scrollJumpRequest:null}}const g=rn(p,a),m=(({impact:e,viewport:t,destination:r,draggables:n,maxScrollChange:o})=>{const i=Yn(t,tn(t.scroll.current,o)),a=r.frame?mn(r,tn(r.frame.scroll.current,o)):r,s=e.displaced,l=Ln({afterDragging:Zn(s.all,n),destination:r,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=Ln({afterDragging:Zn(s.all,n),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 r=0;r<t.length;r++){const n=t[r].visible[e];if(n)return n}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:r,draggables:n,maxScrollChange:g});return{clientSelection:s,impact:m,scrollJumpRequest:g}};const Qn=e=>{const t=e.subject.active;return t||Ur(),t};const eo=(e,t)=>{const r=e.page.borderBox.center;return Gn(e.descriptor.id,t)?rn(r,t.displacedBy.point):r},to=(e,t)=>{const r=e.page.borderBox;return Gn(e.descriptor.id,t)?dn(r,on(t.displacedBy.point)):r};var ro=fn(function(e,t){const r=t[e.line];return{value:r,point:an(e.line,r)}});const no=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),oo=(e,t,r)=>{const n=e.frame;wn(t,e)&&Ur(),e.subject.withPlaceholder&&Ur();const o=ro(e.axis,t.displaceBy).point,i=((e,t,r)=>{const n=e.axis;if("virtual"===e.descriptor.mode)return an(n.line,t[n.line]);const o=e.subject.page.contentBox[n.size],i=xn(e.descriptor.id,r).reduce((e,t)=>e+t.client.marginBox[n.size],0)+t[n.line]-o;return i<=0?null:an(n.line,i)})(e,o,r),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!n){const t=gn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?tn(n.scroll.max,i):n.scroll.max,l=no(n,s),c=gn({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var io=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:r,isOver:n,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=(({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:n,viewport:o})=>{const i=r.subject.active;if(!i)return null;const a=r.axis,s=On(i[a.start],i[a.end]),l=vn(n).filter(e=>e!==r).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>An(o.frame)(Qn(e))).filter(t=>{const r=Qn(t);return e?i[a.crossAxisEnd]<r[a.crossAxisEnd]:r[a.crossAxisStart]<i[a.crossAxisStart]}).filter(e=>{const t=Qn(e),r=On(t[a.start],t[a.end]);return s(t[a.start])||s(t[a.end])||r(i[a.start])||r(i[a.end])}).sort((t,r)=>{const n=Qn(t)[a.crossAxisStart],o=Qn(r)[a.crossAxisStart];return e?n-o:o-n}).filter((e,t,r)=>Qn(e)[a.crossAxisStart]===Qn(r[0])[a.crossAxisStart]);if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter(e=>On(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,r)=>{const n=ln(t,un(Qn(e))),o=ln(t,un(Qn(r)));return n!==o?n-o:Qn(e)[a.start]-Qn(r)[a.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:i,viewport:a});if(!l)return null;const c=xn(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:r,insideDestination:n,afterCritical:o})=>{const i=n.filter(e=>Tn({target:to(e,o),destination:r,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,n)=>{const i=sn(e,Vn(r,eo(t,o))),a=sn(e,Vn(r,eo(n,o)));return i<a?-1:a<i?1:t.descriptor.index-n.descriptor.index});return i[0]||null})({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),u=(({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:r,draggable:n,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(r.length)return null;const e={displaced:Cn,displacedBy:Sn,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=zn({impact:e,draggable:n,droppable:i,draggables:o,afterCritical:s}),l=wn(n,i)?i:oo(i,n,o);return Xn({draggable:n,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===n.descriptor.id||l?e:e+1})(),d=ro(i.axis,n.displaceBy);return kn({draggable:n,insideDestination:r,destination:i,viewport:a,displacedBy:d,last:Cn,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:r,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!u)return null;const p=zn({impact:u,draggable:r,droppable:l,draggables:o,afterCritical:s});return{clientSelection:Jn({pageBorderBoxCenter:p,draggable:r,viewport:a}),impact:u,scrollJumpRequest:null}},ao=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};var so=({state:e,type:t})=>{const r=((e,t)=>{const r=ao(e);return r?t[r]:null})(e.impact,e.dimensions.droppables),n=Boolean(r),o=e.dimensions.droppables[e.critical.droppable.id],i=r||o,a=i.axis.direction,s="vertical"===a&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===a&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(s&&!n)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}):io({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,isOver:i,draggables:u,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function lo(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function co(e){const t=On(e.top,e.bottom),r=On(e.left,e.right);return function(e){return t(e.y)&&r(e.x)}}function uo({pageBorderBox:e,draggable:t,droppables:r}){const n=vn(r).filter(t=>{if(!t.isEnabled)return!1;const r=t.subject.active;if(!r)return!1;if(o=r,!((n=e).left<o.right&&n.right>o.left&&n.top<o.bottom&&n.bottom>o.top))return!1;var n,o;if(co(r)(e.center))return!0;const i=t.axis,a=r.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=On(r[i.crossAxisStart],r[i.crossAxisEnd]),d=c(s),u=c(l);return!d&&!u||(d?s<a:l>a)});return n.length?1===n.length?n[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:r}){const n=t.page.borderBox.center,o=r.map(t=>{const r=t.axis,o=an(t.axis.line,e.center[r.line],t.page.borderBox.center[r.crossAxisLine]);return{id:t.descriptor.id,distance:sn(n,o)}}).sort((e,t)=>t.distance-e.distance);return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:n}):null}const po=(e,t)=>yr(dn(e,t));function go({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var mo=({pageOffset:e,draggable:t,draggables:r,droppables:n,previousImpact:o,viewport:i,afterCritical:a})=>{const s=po(t.page.borderBox,e),l=uo({pageBorderBox:s,draggable:t,droppables:n});if(!l)return Pn;const c=n[l],d=xn(c.descriptor.id,r),u=((e,t)=>{const r=e.frame;return r?po(t,r.scroll.diff.value):t})(c,s);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:r,destination:n,insideDestination:o,afterCritical:i})=>{if(!n.isCombineEnabled)return null;const a=n.axis,s=ro(n.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],u=Dn(e,o).find(e=>{const t=e.descriptor.id,n=e.page.borderBox,o=n[a.size]/4,s=Gn(t,i),u=go({displaced:r.displaced,id:t});return s?u?d>n[a.start]+o&&d<n[a.end]-o:c>n[a.start]-l+o&&c<n[a.end]-l-o:u?d>n[a.start]+l+o&&d<n[a.end]+l-o:c>n[a.start]+o&&c<n[a.end]-o});return u?{displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:u.descriptor.id,droppableId:n.descriptor.id}}}:null})({pageBorderBoxWithDroppableScroll:u,draggable:t,previousImpact:o,destination:c,insideDestination:d,afterCritical:a})||(({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:r,insideDestination:n,last:o,viewport:i,afterCritical:a})=>{const s=r.axis,l=ro(r.axis,t.displaceBy),c=l.value,d=e[s.start],u=e[s.end],p=function({draggable:e,closest:t,inHomeList:r}){return t?r&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:Dn(t,n).find(e=>{const t=e.descriptor.id,r=e.page.borderBox.center[s.line],n=Gn(t,a),i=go({displaced:o,id:t});return n?i?u<=r:d<r-c:i?u<=r+c:d<r})||null,inHomeList:wn(t,r)});return kn({draggable:t,insideDestination:n,destination:r,viewport:i,last:o,displacedBy:l,index:p})})({pageBorderBoxWithDroppableScroll:u,draggable:t,destination:c,insideDestination:d,last:o.displaced,viewport:i,afterCritical:a})},fo=(e,t)=>({...e,[t.descriptor.id]:t});const bo=({previousImpact:e,impact:t,droppables:r})=>{const n=ao(e),o=ao(t);if(!n)return r;if(n===o)return r;const i=r[n];if(!i.subject.withPlaceholder)return r;const a=(e=>{const t=e.subject.withPlaceholder;t||Ur();const r=e.frame;if(!r){const t=gn({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const n=t.oldFrameMaxScroll;n||Ur();const o=no(r,n),i=gn({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return fo(r,a)};var ho=({state:e,clientSelection:t,dimensions:r,viewport:n,impact:o,scrollJumpRequest:i})=>{const a=n||e.viewport,s=r||e.dimensions,l=t||e.current.client.selection,c=rn(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:tn(e.initial.client.borderBoxCenter,c)},u={selection:tn(d.selection,a.scroll.current),borderBoxCenter:tn(d.borderBoxCenter,a.scroll.current),offset:tn(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],m=o||mo({pageOffset:u.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),f=(({draggable:e,draggables:t,droppables:r,previousImpact:n,impact:o})=>{const i=bo({previousImpact:n,impact:o,droppables:r}),a=ao(o);if(!a)return i;const s=r[a];if(wn(e,s))return i;if(s.subject.withPlaceholder)return i;const l=oo(s,e,t);return fo(i,l)})({draggable:g,impact:m,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:f},impact:m,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}};var vo=({impact:e,viewport:t,draggables:r,destination:n,forceShouldAnimate:o})=>{const i=e.displaced,a=function(e,t){return e.map(e=>t[e])}(i.all,r),s=Ln({afterDragging:a,destination:n,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},yo=({impact:e,draggable:t,droppable:r,draggables:n,viewport:o,afterCritical:i})=>{const a=zn({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:i});return Jn({pageBorderBoxCenter:a,draggable:t,viewport:o})},xo=({state:e,dimensions:t,viewport:r})=>{"SNAP"!==e.movementMode&&Ur();const n=e.impact,o=r||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=ao(n);c||Ur();const d=s[c],u=vo({impact:n,viewport:o,destination:d,draggables:a}),p=yo({impact:u,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return ho({impact:u,clientSelection:p,state:e,dimensions:i,viewport:o})},Eo=({draggable:e,home:t,draggables:r,viewport:n})=>{const o=ro(t.axis,e.displaceBy),i=xn(t.descriptor.id,r),a=i.indexOf(e);-1===a&&Ur();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:Ln({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:n.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(d=e.descriptor,{index:d.index,droppableId:d.droppableId})}},afterCritical:c}},Io=({additions:e,updatedDroppables:t,viewport:r})=>{const n=r.scroll.diff.value;return e.map(e=>{const o=e.descriptor.droppableId,i=(e=>{const t=e.frame;return t||Ur(),t})(t[o]),a=i.scroll.diff.value,s=(({draggable:e,offset:t,initialWindowScroll:r})=>{const n=Sr(e.client,t),o=Cr(n,r);return{...e,placeholder:{...e.placeholder,client:n},client:n,page:o}})({draggable:e,offset:tn(n,a),initialWindowScroll:r.scroll.initial});return s})};const Do=e=>"SNAP"===e.movementMode,wo=(e,t,r)=>{const n=((e,t)=>({draggables:e.draggables,droppables:fo(e.droppables,t)}))(e.dimensions,t);return!Do(e)||r?ho({state:e,dimensions:n}):xo({state:e,dimensions:n})};function So(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const Co={phase:"IDLE",completed:null,shouldFlush:!1};var Po=(e=Co,t)=>{if("FLUSH"===t.type)return{...Co,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&Ur();const{critical:r,clientSelection:n,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[r.draggable.id],l=i.droppables[r.droppable.id],c={selection:n,borderBoxCenter:s.client.borderBox.center,offset:en},d={client:c,page:{selection:tn(c.selection,o.scroll.initial),borderBoxCenter:tn(c.selection,o.scroll.initial),offset:tn(c.selection,o.scroll.diff.value)}},u=vn(i.droppables).every(e=>!e.isFixedOnPage),{impact:p,afterCritical:g}=Eo({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:r,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){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&Ur();return{...e,phase:"COLLECTING"}}if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&Ur(),(({state:e,published:t})=>{const r=t.modified.map(t=>{const r=e.dimensions.droppables[t.droppableId];return mn(r,t.scroll)}),n={...e.dimensions.droppables,...bn(r)},o=hn(Io({additions:t.additions,updatedDroppables:n,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(e=>{delete i[e]});const a={droppables:n,draggables:i},s=ao(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}=Eo({draggable:c,home:d,draggables:i,viewport:e.viewport}),g=l&&l.isCombineEnabled?e.impact:u,m=mo({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}),f={...e,phase:"DRAGGING",impact:m,onLiftImpact:u,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?f:{...f,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;lo(e)||Ur();const{client:r}=t.payload;return nn(r,e.current.client.selection)?e:ho({state:e,clientSelection:r,impact:Do(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return So(e);if("COLLECTING"===e.phase)return So(e);lo(e)||Ur();const{id:r,newScroll:n}=t.payload,o=e.dimensions.droppables[r];if(!o)return e;const i=mn(o,n);return wo(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;lo(e)||Ur();const{id:r,isEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||Ur(),o.isEnabled===n&&Ur();const i={...o,isEnabled:n};return wo(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;lo(e)||Ur();const{id:r,isCombineEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||Ur(),o.isCombineEnabled===n&&Ur();const i={...o,isCombineEnabled:n};return wo(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;lo(e)||Ur(),e.isWindowScrollAllowed||Ur();const r=t.payload.newScroll;if(nn(e.viewport.scroll.current,r))return So(e);const n=Yn(e.viewport,r);return Do(e)?xo({state:e,viewport:n}):ho({state:e,viewport:n})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!lo(e))return e;const r=t.payload.maxScroll;if(nn(r,e.viewport.scroll.max))return e;const n={...e.viewport,scroll:{...e.viewport.scroll,max:r}};return{...e,viewport:n}}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&&Ur();const r=so({state:e,type:t.type});return r?ho({state:e,impact:r.impact,clientSelection:r.clientSelection,scrollJumpRequest:r.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const r=t.payload.reason;"COLLECTING"!==e.phase&&Ur();return{...e,phase:"DROP_PENDING",isWaiting:!0,reason:r}}if("DROP_ANIMATE"===t.type){const{completed:r,dropDuration:n,newHomeClientOffset:o}=t.payload;"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&Ur();return{phase:"DROP_ANIMATING",completed:r,dropDuration:n,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 Oo(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Ao=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Ro=()=>({type:"COLLECTION_STARTING",payload:null}),_o=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Bo=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),No=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),To=e=>({type:"MOVE",payload:e}),Lo=()=>({type:"MOVE_UP",payload:null}),Mo=()=>({type:"MOVE_DOWN",payload:null}),ko=()=>({type:"MOVE_RIGHT",payload:null}),Go=()=>({type:"MOVE_LEFT",payload:null}),Wo=e=>({type:"DROP_COMPLETE",payload:e}),Fo=e=>({type:"DROP",payload:e}),$o=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});const jo="cubic-bezier(.2,1,.1,1)",Uo={drop:0,combining:.7},Ho={drop:.75},qo={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Vo=`${qo.outOfTheWay}s ${"cubic-bezier(0.2, 0, 0, 1)"}`,zo={fluid:`opacity ${Vo}`,snap:`transform ${Vo}, opacity ${Vo}`,drop:e=>{const t=`${e}s ${jo}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Vo}`,placeholder:`height ${Vo}, width ${Vo}, margin ${Vo}`},Yo=e=>nn(e,en)?void 0:`translate(${e.x}px, ${e.y}px)`,Zo=Yo,Jo=(e,t)=>{const r=Yo(e);if(r)return t?`${r} scale(${Ho.drop})`:r},{minDropTime:Xo,maxDropTime:Ko}=qo,Qo=Ko-Xo;const ei=({getState:e,dispatch:t})=>r=>n=>{if(!Oo(n,"DROP"))return void r(n);const o=e(),i=n.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&&Ur(),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&Ur();const a=o.critical,s=o.dimensions,l=s.draggables[o.critical.draggable.id],{impact:c,didDropInsideDroppable:d}=(({draggables:e,reason:t,lastImpact:r,home:n,viewport:o,onLiftImpact:i})=>{if(!r.at||"DROP"!==t)return{impact:vo({draggables:e,impact:i,destination:n,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1};return"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:{...r,displaced:Cn},didDropInsideDroppable:!0}})({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),u=d?En(c):null,p=d?In(c):null,g={index:a.draggable.index,droppableId:a.droppable.id},m={draggableId:l.descriptor.id,type:l.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:u,combine:p},f=(({impact:e,draggable:t,dimensions:r,viewport:n,afterCritical:o})=>{const{draggables:i,droppables:a}=r,s=ao(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=yo({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:n});return rn(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:m,impact:c};if(!(!nn(o.current.client.offset,f)||Boolean(m.combine)))return void t(Wo({completed:b}));const h=(({current:e,destination:t,reason:r})=>{const n=sn(e,t);if(n<=0)return Xo;if(n>=1500)return Ko;const o=Xo+Qo*(n/1500);return Number(("CANCEL"===r?.6*o:o).toFixed(2))})({current:o.current.client.offset,destination:f,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:f,dropDuration:h,completed:b}))};var ti=()=>({x:window.pageXOffset,y:window.pageYOffset});function ri({onWindowScroll:e}){const t=Ar(function(){e(ti())}),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let n=Fr;function o(){return n!==Fr}return{start:function(){o()&&Ur(),n=$r(window,[r])},stop:function(){o()||Ur(),t.cancel(),n(),n=Fr},isActive:o}}const ni=e=>{const t=ri({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>r=>{!t.isActive()&&Oo(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>Oo(e,"DROP_COMPLETE")||Oo(e,"DROP_ANIMATE")||Oo(e,"FLUSH"))(r)&&t.stop(),e(r)}};var oi=()=>{const e=[];return{add:t=>{const r=setTimeout(()=>(t=>{const r=e.findIndex(e=>e.timerId===t);-1===r&&Ur();const[n]=e.splice(r,1);n.callback()})(r)),n={timerId:r,callback:t};e.push(n)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach(e=>{clearTimeout(e.timerId),e.callback()})}}};const ii=(e,t)=>{t()},ai=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function si(e,t,r,n){if(!e)return void r(n(t));const o=(e=>{let t=!1,r=!1;const n=setTimeout(()=>{r=!0}),o=o=>{t||r||(t=!0,e(o),clearTimeout(n))};return o.wasCalled=()=>t,o})(r);e(t,{announce:o}),o.wasCalled()||r(n(t))}var li=(e,t)=>{const r=((e,t)=>{const r=oi();let n=null;const o=r=>{n||Ur(),n=null,ii(0,()=>si(e().onDragEnd,r,t,Zr.onDragEnd))};return{beforeCapture:(t,r)=>{n&&Ur(),ii(0,()=>{const n=e().onBeforeCapture;n&&n({draggableId:t,mode:r})})},beforeStart:(t,r)=>{n&&Ur(),ii(0,()=>{const n=e().onBeforeDragStart;n&&n(ai(t,r))})},start:(o,i)=>{n&&Ur();const a=ai(o,i);n={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},r.add(()=>{ii(0,()=>si(e().onDragStart,a,t,Zr.onDragStart))})},update:(o,i)=>{const a=En(i),s=In(i);n||Ur();const l=!((e,t)=>{if(e===t)return!0;const r=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,n=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return r&&n})(o,n.lastCritical);l&&(n.lastCritical=o);const c=(u=a,!(null==(d=n.lastLocation)&&null==u||null!=d&&null!=u&&d.droppableId===u.droppableId&&d.index===u.index));var d,u;c&&(n.lastLocation=a);const p=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(n.lastCombine,s);if(p&&(n.lastCombine=s),!l&&!c&&!p)return;const g={...ai(o,n.mode),combine:s,destination:a};r.add(()=>{ii(0,()=>si(e().onDragUpdate,g,t,Zr.onDragUpdate))})},flush:()=>{n||Ur(),r.flush()},drop:o,abort:()=>{if(!n)return;const e={...ai(n.lastCritical,n.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>n=>{if(Oo(n,"BEFORE_INITIAL_CAPTURE"))return void r.beforeCapture(n.payload.draggableId,n.payload.movementMode);if(Oo(n,"INITIAL_PUBLISH")){const e=n.payload.critical;return r.beforeStart(e,n.payload.movementMode),t(n),void r.start(e,n.payload.movementMode)}if(Oo(n,"DROP_COMPLETE")){const e=n.payload.completed.result;return r.flush(),t(n),void r.drop(e)}if(t(n),Oo(n,"FLUSH"))return void r.abort();const o=e.getState();"DRAGGING"===o.phase&&r.update(o.critical,o.impact)}};const ci=e=>t=>r=>{if(!Oo(r,"DROP_ANIMATION_FINISHED"))return void t(r);const n=e.getState();"DROP_ANIMATING"!==n.phase&&Ur(),e.dispatch(Wo({completed:n.completed}))},di=e=>{let t=null,r=null;return n=>o=>{if((Oo(o,"FLUSH")||Oo(o,"DROP_COMPLETE")||Oo(o,"DROP_ANIMATION_FINISHED"))&&(r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)),n(o),!Oo(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})}};r=requestAnimationFrame(()=>{r=null,t=$r(window,[i])})}};var ui=e=>t=>r=>n=>{if((e=>Oo(e,"DROP_COMPLETE")||Oo(e,"DROP_ANIMATE")||Oo(e,"FLUSH"))(n))return e.stop(),void r(n);if(Oo(n,"INITIAL_PUBLISH")){r(n);const o=t.getState();return"DRAGGING"!==o.phase&&Ur(),void e.start(o)}r(n),e.scroll(t.getState())};const pi=e=>t=>r=>{if(t(r),!Oo(r,"PUBLISH_WHILE_DRAGGING"))return;const n=e.getState();"DROP_PENDING"===n.phase&&(n.isWaiting||e.dispatch(Fo({reason:n.reason})))},gi=st;var mi=({dimensionMarshal:e,focusMarshal:t,styleMarshal:r,getResponders:n,announce:o,autoScroller:i})=>{return ot(Po,gi(function(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(et(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=st(...s)(o.dispatch),{...o,dispatch:i}}}((a=r,()=>e=>t=>{Oo(t,"INITIAL_PUBLISH")&&a.dragging(),Oo(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(Oo(t,"FLUSH")||Oo(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>r=>{(Oo(r,"DROP_COMPLETE")||Oo(r,"FLUSH")||Oo(r,"DROP_ANIMATE"))&&e.stopPublishing(),t(r)})(e),(e=>({getState:t,dispatch:r})=>n=>o=>{if(!Oo(o,"LIFT"))return void n(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&r(Wo({completed:l.completed})),"IDLE"!==t().phase&&Ur(),r({type:"FLUSH",payload:null}),r({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);r({type:"INITIAL_PUBLISH",payload:{critical:d,dimensions:u,clientSelection:a,movementMode:s,viewport:p}})})(e),ei,ci,di,pi,ui(i),ni,(e=>{let t=!1;return()=>r=>n=>{if(Oo(n,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),void e.tryRestoreFocusRecorded();if(r(n),t){if(Oo(n,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(Oo(n,"DROP_COMPLETE")){t=!1;const r=n.payload.completed.result;r.combine&&e.tryShiftRecord(r.draggableId,r.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),li(n,o))));var a};var fi=({scrollHeight:e,scrollWidth:t,height:r,width:n})=>{const o=rn({x:t,y:e},{x:n,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},bi=()=>{const e=document.documentElement;return e||Ur(),e},hi=()=>{const e=bi();return fi({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},vi=({critical:e,scrollOptions:t,registry:r})=>{const n=(()=>{const e=ti(),t=hi(),r=e.y,n=e.x,o=bi(),i=o.clientWidth,a=o.clientHeight;return{frame:yr({top:r,left:n,right:n+i,bottom:r+a}),scroll:{initial:e,current:e,max:t,diff:{value:en,displacement:en}}}})(),o=n.scroll.current,i=e.droppable,a=r.droppable.getAllByType(i.type).map(e=>e.callbacks.getDimensionAndWatchScroll(o,t)),s=r.draggable.getAllByType(e.draggable.type).map(e=>e.getDimension(o));return{dimensions:{draggables:hn(s),droppables:bn(a)},critical:e,viewport:n}};function yi(e,t,r){if(r.descriptor.id===t.id)return!1;if(r.descriptor.type!==t.type)return!1;return"virtual"===e.droppable.getById(r.descriptor.droppableId).descriptor.mode}var xi=(e,t)=>{let r=null;const n=function({registry:e,callbacks:t}){let r={additions:{},removals:{},modified:{}},n=null;const o=()=>{n||(t.collectionStarting(),n=requestAnimationFrame(()=>{n=null;const{additions:o,removals:i,modified:a}=r,s=Object.keys(o).map(t=>e.draggable.getById(t).getDimension(en)).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};r={additions:{},removals:{},modified:{}},t.publish(c)}))};return{add:e=>{const t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],o()},remove:e=>{const t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],o()},stop:()=>{n&&(cancelAnimationFrame(n),n=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=t=>{r||Ur();const o=r.critical.draggable;"ADDITION"===t.type&&yi(e,o,t.value)&&n.add(t.value),"REMOVAL"===t.type&&yi(e,o,t.value)&&n.remove(t.value)},i={updateDroppableIsEnabled:(n,o)=>{e.droppable.exists(n)||Ur(),r&&t.updateDroppableIsEnabled({id:n,isEnabled:o})},updateDroppableIsCombineEnabled:(n,o)=>{r&&(e.droppable.exists(n)||Ur(),t.updateDroppableIsCombineEnabled({id:n,isCombineEnabled:o}))},scrollDroppable:(t,n)=>{r&&e.droppable.getById(t).callbacks.scroll(n)},updateDroppableScroll:(n,o)=>{r&&(e.droppable.exists(n)||Ur(),t.updateDroppableScroll({id:n,newScroll:o}))},startPublishing:t=>{r&&Ur();const n=e.draggable.getById(t.draggableId),i=e.droppable.getById(n.descriptor.droppableId),a={draggable:n.descriptor,droppable:i.descriptor},s=e.subscribe(o);return r={critical:a,unsubscribe:s},vi({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!r)return;n.stop();const t=r.critical.droppable;e.droppable.getAllByType(t.type).forEach(e=>e.callbacks.dragStopped()),r.unsubscribe(),r=null}};return i},Ei=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason),Ii=e=>{window.scrollBy(e.x,e.y)};const Di=fn(e=>vn(e).filter(e=>!!e.isEnabled&&!!e.frame));var wi=({center:e,destination:t,droppables:r})=>{if(t){const e=r[t];return e.frame?e:null}const n=((e,t)=>{const r=Di(t).find(t=>(t.frame||Ur(),co(t.frame.pageMarginBox)(e)))||null;return r})(e,r);return n};const Si={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var Ci=({startOfRange:e,endOfRange:t,current:r})=>{const n=t-e;if(0===n)return 0;return(r-e)/n},Pi=({distanceToEdge:e,thresholds:t,dragStartTime:r,shouldUseTimeDampening:n,getAutoScrollerOptions:o})=>{const i=((e,t,r=()=>Si)=>{const n=r();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return n.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const o=1-Ci({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=n.maxPixelScroll*n.ease(o);return Math.ceil(i)})(e,t,o);return 0===i?0:n?Math.max(((e,t,r)=>{const n=r(),o=n.durationDampening.accelerateAt,i=n.durationDampening.stopDampeningAt,a=t,s=i,l=Date.now()-a;if(l>=i)return e;if(l<o)return 1;const c=Ci({startOfRange:o,endOfRange:s,current:l}),d=e*n.ease(c);return Math.ceil(d)})(i,r,o),1):i},Oi=({container:e,distanceToEdges:t,dragStartTime:r,axis:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,r=()=>Si)=>{const n=r();return{startScrollingFrom:e[t.size]*n.startFromPercentage,maxScrollValueAt:e[t.size]*n.maxScrollAtPercentage}})(e,n,i);return t[n.end]<t[n.start]?Pi({distanceToEdge:t[n.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*Pi({distanceToEdge:t[n.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const Ai=cn(e=>0===e?0:e);var Ri=({dragStartTime:e,container:t,subject:r,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:n.y-t.top,right:t.right-n.x,bottom:t.bottom-n.y,left:n.x-t.left},s=Oi({container:t,distanceToEdges:a,dragStartTime:e,axis:_n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=Oi({container:t,distanceToEdges:a,dragStartTime:e,axis:Bn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=Ai({x:l,y:s});if(nn(c,en))return null;const d=(({container:e,subject:t,proposedScroll:r})=>{const n=t.height>e.height,o=t.width>e.width;return o||n?o&&n?null:{x:o?0:r.x,y:n?0:r.y}:r})({container:t,subject:r,proposedScroll:c});return d?nn(d,en)?null:d:null};const _i=cn(e=>0===e?0:e>0?1:-1),Bi=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:r,change:n})=>{const o=tn(t,n),i={x:e(o.x,r.x),y:e(o.y,r.y)};return nn(i,en)?null:i}})(),Ni=({max:e,current:t,change:r})=>{const n={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=_i(r),i=Bi({max:n,current:t,change:o});return!i||(0!==o.x&&0===i.x||0!==o.y&&0===i.y)},Ti=(e,t)=>Ni({current:e.scroll.current,max:e.scroll.max,change:t}),Li=(e,t)=>{const r=e.frame;return!!r&&Ni({current:r.scroll.current,max:r.scroll.max,change:t})};var Mi=({state:e,dragStartTime:t,shouldUseTimeDampening:r,scrollWindow:n,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:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=Ri({dragStartTime:n,container:e.frame,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&Ti(e,a)?a:null})({dragStartTime:t,viewport:e.viewport,subject:s,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});if(o)return void n(o)}const l=wi({center:a,destination:ao(e.impact),droppables:e.dimensions.droppables});if(!l)return;const c=(({droppable:e,subject:t,center:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=Ri({dragStartTime:n,container:a.pageMarginBox,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Li(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)},ki=({move:e,scrollDroppable:t,scrollWindow:r})=>{const n=(e,r)=>{if(!Li(e,r))return r;const n=((e,t)=>{const r=e.frame;return r&&Li(e,t)?Bi({current:r.scroll.current,max:r.scroll.max,change:t}):null})(e,r);if(!n)return t(e.descriptor.id,r),null;const o=rn(r,n);t(e.descriptor.id,o);return rn(r,o)},o=(e,t,n)=>{if(!e)return n;if(!Ti(t,n))return n;const o=((e,t)=>{if(!Ti(e,t))return null;const r=e.scroll.max,n=e.scroll.current;return Bi({current:n,max:r,change:t})})(t,n);if(!o)return r(n),null;const i=rn(n,o);r(i);return rn(n,i)};return t=>{const r=t.scrollJumpRequest;if(!r)return;const i=ao(t.impact);i||Ur();const a=n(t.dimensions.droppables[i],r);if(!a)return;const s=t.viewport,l=o(t.isWindowScrollAllowed,s,a);l&&((t,r)=>{const n=tn(t.current.client.selection,r);e({client:n})})(t,l)}};const Gi="data-rfd",Wi=(()=>{const e=`${Gi}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Fi=(()=>{const e=`${Gi}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),$i=(()=>{const e=`${Gi}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),ji={contextId:`${Gi}-scroll-container-context-id`},Ui=(e,t)=>e.map(e=>{const r=e.styles[t];return r?`${e.selector} { ${r} }`:""}).join(" ");const Hi="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?Lr:Tr,qi=()=>{const e=document.querySelector("head");return e||Ur(),e},Vi=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function zi(e,t){const r=Kr(()=>(e=>{const t=(r=e,e=>`[${e}="${r}"]`);var r;const n=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(Wi.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: ${zo.outOfTheWay};\n `;return{selector:t(Fi.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),n,{selector:t($i.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:Ui(o,"always"),resting:Ui(o,"resting"),dragging:Ui(o,"dragging"),dropAnimating:Ui(o,"dropAnimating"),userCancel:Ui(o,"userCancel")}})(e),[e]),n=Nr(null),o=Nr(null),i=Qr(fn(e=>{const t=o.current;t||Ur(),t.textContent=e}),[]),a=Qr(e=>{const t=n.current;t||Ur(),t.textContent=e},[]);Hi(()=>{(n.current||o.current)&&Ur();const s=Vi(t),l=Vi(t);return n.current=s,o.current=l,s.setAttribute(`${Gi}-always`,e),l.setAttribute(`${Gi}-dynamic`,e),qi().appendChild(s),qi().appendChild(l),a(r.always),i(r.resting),()=>{const e=e=>{const t=e.current;t||Ur(),qi().removeChild(t),e.current=null};e(n),e(o)}},[t,a,i,r.always,r.resting,e]);const s=Qr(()=>i(r.dragging),[i,r.dragging]),l=Qr(e=>{i("DROP"!==e?r.userCancel:r.dropAnimating)},[i,r.dropAnimating,r.userCancel]),c=Qr(()=>{o.current&&i(r.resting)},[i,r.resting]);return Kr(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function Yi(e,t){return Array.from(e.querySelectorAll(t))}var Zi=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Ji(e){return e instanceof Zi(e).HTMLElement}function Xi(e){const t=Nr({}),r=Nr(null),n=Nr(null),o=Nr(!1),i=Qr(function(e,r){const n={id:e,focus:r};return t.current[e]=n,function(){const r=t.current;r[e]!==n&&delete r[e]}},[]),a=Qr(function(t){const r=function(e,t){const r=`[${Wi.contextId}="${e}"]`,n=Yi(document,r);if(!n.length)return null;const o=n.find(e=>e.getAttribute(Wi.draggableId)===t);return o&&Ji(o)?o:null}(e,t);r&&r!==document.activeElement&&r.focus()},[e]),s=Qr(function(e,t){r.current===e&&(r.current=t)},[]),l=Qr(function(){n.current||o.current&&(n.current=requestAnimationFrame(()=>{n.current=null;const e=r.current;e&&a(e)}))},[a]),c=Qr(function(e){r.current=null;const t=document.activeElement;t&&t.getAttribute(Wi.draggableId)===e&&(r.current=e)},[]);Hi(()=>(o.current=!0,function(){o.current=!1;const e=n.current;e&&cancelAnimationFrame(e)}),[]);return Kr(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function Ki(){const e={draggables:{},droppables:{}},t=[];function r(e){t.length&&t.forEach(t=>t(e))}function n(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,r({type:"ADDITION",value:t})},update:(t,r)=>{const n=e.draggables[r.descriptor.id];n&&n.uniqueId===t.uniqueId&&(delete e.draggables[r.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const o=t.descriptor.id,i=n(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],e.droppables[t.descriptor.droppableId]&&r({type:"REMOVAL",value:t}))},getById:function(e){const t=n(e);return t||Ur(),t},findById:n,exists:e=>Boolean(n(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 r=o(t.descriptor.id);r&&t.uniqueId===r.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=o(e);return t||Ur(),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 r=t.indexOf(e);-1!==r&&t.splice(r,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Qi=_r.createContext(null),ea=()=>{const e=document.body;return e||Ur(),e};const ta={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};const ra={separator:"::"};function na(e,t=ra){const r=_r.useId();return Kr(()=>`${e}${t.separator}${r}`,[t.separator,e,r])}var oa=_r.createContext(null);function ia(e){const t=Nr(e);return Tr(()=>{t.current=e}),t}function aa(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const sa=9,la=13,ca=33,da=34,ua=35,pa=36,ga={[la]:!0,[sa]:!0};var ma=e=>{ga[e.keyCode]&&e.preventDefault()};const fa=(()=>{const e="visibilitychange";if("undefined"==typeof document)return e;return[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})();const ba={type:"IDLE"};function ha({cancel:e,completed:t,getPhase:r,setPhase:n}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:o,clientY:i}=e;if(0!==t)return;const a={x:o,y:i},s=r();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&Ur();const l=s.point;if(c=l,d=a,!(Math.abs(d.x-c.x)>=5||Math.abs(d.y-c.y)>=5))return;var c,d;e.preventDefault();const u=s.actions.fluidLift(a);n({type:"DRAGGING",actions:u})}},{eventName:"mouseup",fn:n=>{const o=r();"DRAGGING"===o.type?(n.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===r().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==r().type)return 27===t.keyCode?(t.preventDefault(),void e()):void ma(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===r().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const n=r();"IDLE"===n.type&&Ur(),n.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:fa,fn:e}]}function va(){}const ya={[da]:!0,[ca]:!0,[pa]:!0,[ua]:!0};function xa(e,t){function r(){t(),e.cancel()}return[{eventName:"keydown",fn:n=>27===n.keyCode?(n.preventDefault(),void r()):32===n.keyCode?(n.preventDefault(),t(),void e.drop()):40===n.keyCode?(n.preventDefault(),void e.moveDown()):38===n.keyCode?(n.preventDefault(),void e.moveUp()):39===n.keyCode?(n.preventDefault(),void e.moveRight()):37===n.keyCode?(n.preventDefault(),void e.moveLeft()):void(ya[n.keyCode]?n.preventDefault():ma(n))},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:fa,fn:r}]}const Ea={type:"IDLE"};const Ia=["input","button","textarea","select","option","optgroup","video","audio"];function Da(e,t){if(null==t)return!1;if(Ia.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return"true"===r||""===r||t!==e&&Da(e,t.parentElement)}function wa(e,t){const r=t.target;return!!Ji(r)&&Da(e,r)}var Sa=e=>yr(e.getBoundingClientRect()).center;const Ca=(()=>{const e="matches";if("undefined"==typeof document)return e;return[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function Pa(e,t){return null==e?null:e[Ca](t)?e:Pa(e.parentElement,t)}function Oa(e,t){return e.closest?e.closest(t):Pa(e,t)}function Aa(e,t){const r=t.target;if(!((n=r)instanceof Zi(n).Element))return null;var n;const o=function(e){return`[${Wi.contextId}="${e}"]`}(e),i=Oa(r,o);return i&&Ji(i)?i:null}function Ra(e){e.preventDefault()}function _a({expected:e,phase:t,isLockActive:r,shouldWarn:n}){return!!r()&&e===t}function Ba({lockAPI:e,store:t,registry:r,draggableId:n}){if(e.isClaimed())return!1;const o=r.draggable.findById(n);return!!o&&(!!o.options.isEnabled&&!!Ei(t.getState(),n))}function Na({lockAPI:e,contextId:t,store:r,registry:n,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!Ba({lockAPI:e,store:r,registry:n,draggableId:o}))return null;const s=n.draggable.getById(o),l=function(e,t){const r=`[${Fi.contextId}="${e}"]`,n=Yi(document,r).find(e=>e.getAttribute(Fi.id)===t);return n&&Ji(n)?n:null}(t,s.descriptor.id);if(!l)return null;if(a&&!s.options.canDragInteractiveElements&&wa(l,a))return null;const c=e.claim(i||Fr);let d="PRE_DRAG";function u(){return s.options.shouldRespectForcePress}function p(){return e.isActive(c)}const g=function(e,t){_a({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function m(t){function n(){e.release(),d="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=$r(window,[{eventName:"click",fn:Ra,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}n(),r.dispatch(Fo({reason:e}))}return"PRE_DRAG"!==d&&(n(),Ur()),r.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),d="DRAGGING",{isActive:()=>_a({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>_a({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,fluidLift:function(e){const t=Ar(e=>{g(()=>To({client:e}))});return{...m({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>g(Lo),moveRight:()=>g(ko),moveDown:()=>g(Mo),moveLeft:()=>g(Go)};return m({liftActionArgs:{id:o,clientSelection:Sa(l),movementMode:"SNAP"},cleanup:Fr,actions:e})},abort:function(){_a({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&e.release()}}}const Ta=[function(e){const t=Nr(ba),r=Nr(Fr),n=Kr(()=>({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 n=e.findClosestDraggableId(t);if(!n)return;const o=e.tryGetLock(n,a,{sourceEvent:t});if(!o)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};r.current(),c(o,i)}}),[e]),o=Kr(()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const n=e.findOptionsForDraggable(r);n&&(n.shouldRespectForcePress||e.canGetLock(r)&&t.preventDefault())}}),[e]),i=Qr(function(){r.current=$r(window,[o,n],{passive:!1,capture:!0})},[o,n]),a=Qr(()=>{"IDLE"!==t.current.type&&(t.current=ba,r.current(),i())},[i]),s=Qr(()=>{const e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=Qr(function(){const e=ha({cancel:s,completed:a,getPhase:()=>t.current,setPhase:e=>{t.current=e}});r.current=$r(window,e,{capture:!0,passive:!1})},[s,a]),c=Qr(function(e,r){"IDLE"!==t.current.type&&Ur(),t.current={type:"PENDING",point:r,actions:e},l()},[l]);Hi(function(){return i(),function(){r.current()}},[i])},function(e){const t=Nr(va),r=Kr(()=>({eventName:"keydown",fn:function(r){if(r.defaultPrevented)return;if(32!==r.keyCode)return;const o=e.findClosestDraggableId(r);if(!o)return;const i=e.tryGetLock(o,l,{sourceEvent:r});if(!i)return;r.preventDefault();let a=!0;const s=i.snapLift();function l(){a||Ur(),a=!1,t.current(),n()}t.current(),t.current=$r(window,xa(s,l),{capture:!0,passive:!1})}}),[e]),n=Qr(function(){t.current=$r(window,[r],{passive:!1,capture:!0})},[r]);Hi(function(){return n(),function(){t.current()}},[n])},function(e){const t=Nr(Ea),r=Nr(Fr),n=Qr(function(){return t.current},[]),o=Qr(function(e){t.current=e},[]),i=Kr(()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const o=e.tryGetLock(n,s,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:l}=i,c={x:a,y:l};r.current(),u(o,c)}}),[e]),a=Qr(function(){r.current=$r(window,[i],{capture:!0,passive:!1})},[i]),s=Qr(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(Ea),r.current(),a())},[a,o]),l=Qr(()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=Qr(function(){const e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:n},o=$r(window,function({cancel:e,completed:t,getPhase:r}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const n=r();if("DRAGGING"!==n.type)return void e();n.hasMoved=!0;const{clientX:o,clientY:i}=t.touches[0],a={x:o,y:i};t.preventDefault(),n.actions.move(a)}},{eventName:"touchend",fn:n=>{const o=r();"DRAGGING"===o.type?(n.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===r().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const n=r();"IDLE"===n.type&&Ur();const o=t.touches[0];if(!o)return;if(!(o.force>=.15))return;const i=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return i?n.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:fa,fn:e}]}(t),e),i=$r(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:r=>{"DRAGGING"===t().type?(27===r.keyCode&&r.preventDefault(),e()):e()}},{eventName:fa,fn:e}]}(t),e);r.current=function(){o(),i()}},[l,n,s]),d=Qr(function(){const e=n();"PENDING"!==e.type&&Ur();const t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})},[n,o]),u=Qr(function(e,t){"IDLE"!==n().type&&Ur();const r=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:r}),c()},[c,n,o,d]);Hi(function(){return a(),function(){r.current();const e=n();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(Ea))}},[n,a,o]),Hi(function(){return $r(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function La({contextId:e,store:t,registry:r,customSensors:n,enableDefaultSensors:o}){const i=[...o?Ta:[],...n||[]],a=Br(()=>function(){let e=null;function t(){e||Ur(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&Ur();const r={abandon:t};return e=r,r},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],s=Qr(function(e,t){aa(e)&&!aa(t)&&a.tryAbandon()},[a]);Hi(function(){let e=t.getState();return t.subscribe(()=>{const r=t.getState();s(e,r),e=r})},[a,t,s]),Hi(()=>a.tryAbandon,[a.tryAbandon]);const l=Qr(e=>Ba({lockAPI:a,registry:r,store:t,draggableId:e}),[a,r,t]),c=Qr((n,o,i)=>Na({lockAPI:a,registry:r,contextId:e,store:t,draggableId:n,forceSensorStop:o||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[e,a,r,t]),d=Qr(t=>function(e,t){const r=Aa(e,t);return r?r.getAttribute(Wi.draggableId):null}(e,t),[e]),u=Qr(e=>{const t=r.draggable.findById(e);return t?t.options:null},[r.draggable]),p=Qr(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))},[a,t]),g=Qr(()=>a.isClaimed(),[a]),m=Kr(()=>({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](m)}function Ma(e){return e.current||Ur(),e.current}function ka(e){const{contextId:t,setCallbacks:r,sensors:n,nonce:o,dragHandleUsageInstructions:i}=e,a=Nr(null),s=ia(e),l=Qr(()=>(e=>({onBeforeCapture:t=>{Gr(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(s.current),[s]),c=Qr(()=>(e=>({...Si,...e.autoScrollerOptions,durationDampening:{...Si.durationDampening,...e.autoScrollerOptions}}))(s.current),[s]),d=function(e){const t=Kr(()=>(e=>`rfd-announcement-${e}`)(e),[e]),r=Nr(null);return Tr(function(){const e=document.createElement("div");return r.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Rr(e.style,ta),ea().appendChild(e),function(){setTimeout(function(){const t=ea();t.contains(e)&&t.removeChild(e),e===r.current&&(r.current=null)})}},[t]),Qr(e=>{const t=r.current;t&&(t.textContent=e)},[])}(t),u=function({contextId:e,text:t}){const r=na("hidden-text",{separator:"-"}),n=Kr(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:r}),[r,e]);return Tr(function(){const e=document.createElement("div");return e.id=n,e.textContent=t,e.style.display="none",ea().appendChild(e),function(){const t=ea();t.contains(e)&&t.removeChild(e)}},[n,t]),n}({contextId:t,text:i}),p=zi(t,o),g=Qr(e=>{Ma(a).dispatch(e)},[]),m=Kr(()=>at({publishWhileDragging:Ao,updateDroppableScroll:_o,updateDroppableIsEnabled:Bo,updateDroppableIsCombineEnabled:No,collectionStarting:Ro},g),[g]),f=function(){const e=Kr(Ki,[]);return Tr(()=>function(){e.clean()},[e]),e}(),b=Kr(()=>xi(f,m),[f,m]),h=Kr(()=>(({scrollDroppable:e,scrollWindow:t,move:r,getAutoScrollerOptions:n})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:r=()=>Si})=>{const n=Ar(e),o=Ar(t);let i=null;const a=e=>{i||Ur();const{shouldUseTimeDampening:t,dragStartTime:a}=i;Mi({state:e,scrollWindow:n,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:r})};return{start:e=>{i&&Ur();const t=Date.now();let n=!1;const o=()=>{n=!0};Mi({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:r}),i={dragStartTime:t,shouldUseTimeDampening:n},n&&a(e)},stop:()=>{i&&(n.cancel(),o.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:n}),i=ki({move:r,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{n().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}})({scrollWindow:Ii,scrollDroppable:b.scrollDroppable,getAutoScrollerOptions:c,...at({move:To},g)}),[b.scrollDroppable,g,c]),v=Xi(t),y=Kr(()=>mi({announce:d,autoScroller:h,dimensionMarshal:b,focusMarshal:v,getResponders:l,styleMarshal:p}),[d,h,b,v,l,p]);a.current=y;const x=Qr(()=>{const e=Ma(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),E=Qr(()=>{const e=Ma(a).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);r(Kr(()=>({isDragging:E,tryAbort:x}),[E,x]));const I=Qr(e=>Ei(Ma(a).getState(),e),[]),D=Qr(()=>lo(Ma(a).getState()),[]),w=Kr(()=>({marshal:b,focus:v,contextId:t,canLift:I,isMovementAllowed:D,dragHandleUsageInstructionsId:u,registry:f}),[t,b,u,v,I,D,f]);return La({contextId:t,store:y,registry:f,customSensors:n||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),Tr(()=>x,[x]),_r.createElement(oa.Provider,{value:w},_r.createElement(pr,{context:Qi,store:y},e.children))}function Ga(e){const t=_r.useId(),r=e.dragHandleUsageInstructions||Zr.dragHandleUsageInstructions;return _r.createElement(Hr,null,n=>_r.createElement(ka,{nonce:e.nonce,contextId:t,setCallbacks:n,dragHandleUsageInstructions:r,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 Wa=5e3,Fa=4500,$a=(e,t)=>t?zo.drop(t.duration):e?zo.snap:zo.fluid,ja=(e,t)=>{if(e)return t?Uo.drop:Uo.combining};function Ua(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:r,combineWith:n,dropping:o}=e,i=Boolean(n),a=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),s=Boolean(o),l=s?Jo(r,i):Zo(r);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:$a(a,o),transform:l,opacity:ja(i,s),zIndex:s?Fa:Wa,pointerEvents:"none"}}(e):{transform:Zo((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}function Ha(e){const t=na("draggable"),{descriptor:r,registry:n,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=Kr(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=Qr(e=>{const t=o();return t||Ur(),function(e,t,r=en){const n=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Pr(o,n),a=Cr(i,r);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:n.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(r,t,e)},[r,o]),d=Kr(()=>({uniqueId:t,descriptor:r,options:l,getDimension:c}),[r,c,l,t]),u=Nr(d),p=Nr(!0);Hi(()=>(n.draggable.register(u.current),()=>n.draggable.unregister(u.current)),[n.draggable]),Hi(()=>{if(p.current)return void(p.current=!1);const e=u.current;u.current=d,n.draggable.update(d,e)},[d,n.draggable])}var qa=_r.createContext(null);function Va(e){const t=Mr(e);return t||Ur(),t}function za(e){e.preventDefault()}var Ya=(e,t)=>e===t,Za=e=>{const{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};function Ja(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Xa={mapped:{type:"SECONDARY",offset:en,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ja(null)}};const Ka=ur(()=>{const e=function(){const e=fn((e,t)=>({x:e,y:t})),t=fn((e,t,r=null,n=null,o=null)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:r,combineWith:n,combineTargetFor:null})),r=fn((e,r,n,o,i=null,a=null,s=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:r,offset:e,dimension:n,forceShouldAnimate:s,snapshot:t(r,o,i,a,null)}}));return(n,o)=>{if(aa(n)){if(n.critical.draggable.id!==o.draggableId)return null;const t=n.current.client.offset,a=n.dimensions.draggables[o.draggableId],s=ao(n.impact),l=(i=n.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,c=n.forceShouldAnimate;return r(e(t.x,t.y),n.movementMode,a,o.isClone,s,l,c)}var i;if("DROP_ANIMATING"===n.phase){const e=n.completed;if(e.result.draggableId!==o.draggableId)return null;const r=o.isClone,i=n.dimensions.draggables[o.draggableId],a=e.result,s=a.mode,l=Za(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:n.dropDuration,curve:jo,moveTo:n.newHomeClientOffset,opacity:c?Uo.drop:null,scale:c?Ho.drop:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:i,dropping:d,draggingOver:l,combineWith:c,mode:s,forceShouldAnimate:null,snapshot:t(s,r,l,c,d)}}}return null}}(),t=function(){const e=fn((e,t)=>({x:e,y:t})),t=fn(Ja),r=fn((e,r=null,n)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:r,shouldAnimateDisplacement:n,snapshot:t(r)}})),n=e=>e?r(en,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=In(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return n(d);if(i.displaced.invisible[t])return null;const o=on(a.displacedBy.point),s=e(o.x,o.y);return r(s,d,!0)}if(l)return n(d);const u=i.displacedBy.point,p=e(u.x,u.y);return r(p,d,s.shouldAnimate)};return(e,t)=>{if(aa(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 r=e.completed;return r.result.draggableId===t.draggableId?null:o(t.draggableId,r.result.draggableId,r.impact,r.afterCritical)}return null}}();return(r,n)=>e(r,n)||t(r,n)||Xa},{dropAnimationFinished:$o},null,{context:Qi,areStatePropsEqual:Ya})(e=>{const t=Nr(null),r=Qr((e=null)=>{t.current=e},[]),n=Qr(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=Va(oa),{type:s,droppableId:l}=Va(qa),c=Kr(()=>({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:m,isClone:f,mapped:b,dropAnimationFinished:h}=e;if(!f){Ha(Kr(()=>({descriptor:c,registry:a,getDraggableRef:n,canDragInteractiveElements:m,shouldRespectForcePress:g,isEnabled:p}),[c,a,n,m,g,p]))}const v=Kr(()=>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:za}:null,[o,i,u,p]),y=Qr(e=>{"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&Gr(h)},[h,b]),x=Kr(()=>{const e=Ua(b),t="DRAGGING"===b.type&&b.dropping?y:void 0;return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":u,style:e,onTransitionEnd:t},dragHandleProps:v}},[o,v,u,b,y,r]),E=Kr(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return _r.createElement(_r.Fragment,null,d(x,b.snapshot,E))});function Qa(e){return Va(qa).isUsingCloneFor!==e.draggableId||e.isClone?_r.createElement(Ka,e):null}function es(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,r=Boolean(e.disableInteractiveElementBlocking),n=Boolean(e.shouldRespectForcePress);return _r.createElement(Qa,Rr({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:n}))}const ts=e=>t=>e===t,rs=ts("scroll"),ns=ts("auto"),os=(e,t)=>t(e.overflowX)||t(e.overflowY),is=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),r={overflowX:t.overflowX,overflowY:t.overflowY};return os(r,rs)||os(r,ns)})(e)?e:is(e.parentElement);var as=e=>({x:e.scrollLeft,y:e.scrollTop});const ss=e=>{if(!e)return!1;return"fixed"===window.getComputedStyle(e).position||ss(e.parentElement)};var ls=({ref:e,descriptor:t,env:r,windowScroll:n,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=r.closestScrollable,c=((e,t)=>{const r=Or(e);if(!t)return r;if(e!==t)return r;const n=r.paddingBox.top-t.scrollTop,o=r.paddingBox.left-t.scrollLeft,i=n+t.scrollHeight,a=o+t.scrollWidth,s=xr({top:n,right:a,bottom:i,left:o},r.border);return Dr({borderBox:s,margin:r.margin,border:r.border,padding:r.padding})})(e,l),d=Cr(c,n),u=(()=>{if(!l)return null;const e=Or(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:Cr(e,n),scroll:as(l),scrollSize:t,shouldClipSubject:s}})(),p=(({descriptor:e,isEnabled:t,isCombineEnabled:r,isFixedOnPage:n,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:e,client:t}=s,r=fi({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:r,diff:{value:en,displacement:en}}}})(),c="vertical"===o?_n:Bn;return{descriptor:e,isCombineEnabled:r,isFixedOnPage:n,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:gn({page:a,withPlaceholder:null,axis:c,frame:l})}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:o,client:c,page:d,closest:u});return p};const cs={passive:!1},ds={passive:!0};var us=e=>e.shouldPublishImmediately?cs:ds;const ps=e=>e&&e.env.closestScrollable||null;function gs(e){const t=Nr(null),r=Va(oa),n=na("droppable"),{registry:o,marshal:i}=r,a=ia(e),s=Kr(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=Nr(s),c=Kr(()=>fn((e,r)=>{t.current||Ur();const n={x:e,y:r};i.updateDroppableScroll(s.id,n)}),[s.id,i]),d=Qr(()=>{const e=t.current;return e&&e.env.closestScrollable?as(e.env.closestScrollable):en},[]),u=Qr(()=>{const e=d();c(e.x,e.y)},[d,c]),p=Kr(()=>Ar(u),[u]),g=Qr(()=>{const e=t.current,r=ps(e);e&&r||Ur();e.scrollOptions.shouldPublishImmediately?u():p()},[p,u]),m=Qr((e,n)=>{t.current&&Ur();const o=a.current,i=o.getDroppableRef();i||Ur();const l={closestScrollable:is(c=i),isFixedOnPage:ss(c)};var c;const d={ref:i,descriptor:s,env:l,scrollOptions:n};t.current=d;const u=ls({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(ji.contextId,r.contextId),p.addEventListener("scroll",g,us(d.scrollOptions))),u},[r.contextId,s,g,a]),f=Qr(()=>{const e=t.current,r=ps(e);return e&&r||Ur(),as(r)},[]),b=Qr(()=>{const e=t.current;e||Ur();const r=ps(e);t.current=null,r&&(p.cancel(),r.removeAttribute(ji.contextId),r.removeEventListener("scroll",g,us(e.scrollOptions)))},[g,p]),h=Qr(e=>{const r=t.current;r||Ur();const n=ps(r);n||Ur(),n.scrollTop+=e.y,n.scrollLeft+=e.x},[]),v=Kr(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:f,dragStopped:b,scroll:h}),[b,m,f,h]),y=Kr(()=>({uniqueId:n,descriptor:s,callbacks:v}),[v,s,n]);Hi(()=>(l.current=y.descriptor,o.droppable.register(y),()=>{t.current&&b(),o.droppable.unregister(y)}),[v,s,b,y,i,o.droppable]),Hi(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Hi(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function ms(){}const fs={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},bs=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>{const n=(({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>e||"close"===r?fs:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:r});return{display:t.display,boxSizing:"border-box",width:n.width,height:n.height,marginTop:n.margin.top,marginRight:n.margin.right,marginBottom:n.margin.bottom,marginLeft:n.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?zo.placeholder:null}};var hs=_r.memo(e=>{const t=Nr(null),r=Qr(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:n,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=Br("open"===e.animate);Tr(()=>s?"open"!==n?(r(),l(!1),ms):t.current?ms:(t.current=setTimeout(()=>{t.current=null,l(!1)}),r):ms,[n,s,r]);const c=Qr(e=>{"height"===e.propertyName&&(o(),"close"===n&&i())},[n,i,o]),d=bs({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return _r.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})});class vs extends _r.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 ys={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||Ur(),document.body}},xs=e=>{let t,r={...e};for(t in ys)void 0===e[t]&&(r={...r,[t]:ys[t]});return r},Es=(e,t)=>e===t.droppable.type,Is=(e,t)=>t.draggables[e.draggable.id],Ds=ur(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=fn(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),n=fn((n,o,i,a,s,l)=>{const c=s.descriptor.id;if(s.descriptor.droppableId===n){const e=l?{render:l,dragging:r(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(r,o)=>{const i=xs(o),a=i.droppableId,s=i.type,l=!i.isDropDisabled,c=i.renderClone;if(aa(r)){const e=r.critical;if(!Es(s,e))return t;const o=Is(e,r.dimensions),i=ao(r.impact)===a;return n(a,l,i,i,o,c)}if("DROP_ANIMATING"===r.phase){const e=r.completed;if(!Es(s,e.critical))return t;const o=Is(e.critical,r.dimensions);return n(a,l,Za(e.result)===a,ao(e.impact)===a,o,c)}if("IDLE"===r.phase&&r.completed&&!r.shouldFlush){const n=r.completed;if(!Es(s,n.critical))return t;const o=ao(n.impact)===a,i=Boolean(n.impact.at&&"COMBINE"===n.impact.at.type),l=n.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,r)=>({...xs(r),...e,...t}),{context:Qi,areStatePropsEqual:Ya})(e=>{const t=Mr(oa);t||Ur();const{contextId:r,isMovementAllowed:n}=t,o=Nr(null),i=Nr(null),{children:a,droppableId:s,type:l,mode:c,direction:d,ignoreContainerClipping:u,isDropDisabled:p,isCombineEnabled:g,snapshot:m,useClone:f,updateViewportMaxScroll:b,getContainerForClone:h}=e,v=Qr(()=>o.current,[]),y=Qr((e=null)=>{o.current=e},[]);Qr(()=>i.current,[]);const x=Qr((e=null)=>{i.current=e},[]),E=Qr(()=>{n()&&b({maxScroll:hi()})},[n,b]);gs({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:p,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:v});const I=Kr(()=>_r.createElement(vs,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:n})=>_r.createElement(hs,{placeholder:t,onClose:e,innerRef:x,animate:n,contextId:r,onTransitionEnd:E})),[r,E,e.placeholder,e.shouldAnimatePlaceholder,x]),D=Kr(()=>({innerRef:y,placeholder:I,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":r}}),[r,s,I,y]),w=f?f.dragging.draggableId:null,S=Kr(()=>({droppableId:s,type:l,isUsingCloneFor:w}),[s,w,l]);return _r.createElement(qa.Provider,{value:S},a(D,m),function(){if(!f)return null;const{dragging:e,render:t}=f,r=_r.createElement(Qa,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(r,n)=>t(r,n,e));return kr.createPortal(r,h())}())}),{Menu:ws}=r,{MenuItem:Ss}=r,{IconButton:Cs}=r,{MoreVert:Ps}=l,{MoreHoriz:Os}=l,As=i,Rs=e;class _s extends Rs.Component{static __initStatic(){this.propTypes={opts:As.object,onClick:As.func.isRequired}}constructor(e){super(e),_s.prototype.__init.call(this),_s.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:r,anchorEl:n}=this.state,o=Object.keys(e)||[],i=e=>()=>{t(e),this.handleRequestClose()},a=r?"inherit":"disabled";return Rs.createElement("div",null,Rs.createElement("div",{onClick:this.handleClick},Rs.createElement(Cs,{size:"large"},r?Rs.createElement(Ps,{color:a}):Rs.createElement(Os,{color:a}))),Rs.createElement(ws,{id:"point-menu",anchorEl:n,open:r,onClose:this.handleRequestClose,style:{transform:"translate(-15px, -15px)"},transformOrigin:{vertical:"center",horizontal:"right"}},o.map((t,r)=>Rs.createElement(Ss,{key:r,onClick:i(t)},e[t]))))}}_s.__initStatic();class Bs extends Rs.Component{static __initStatic2(){this.propTypes={onChange:As.func.isRequired,showSampleAnswer:As.bool.isRequired}}render(){const{onChange:e,showSampleAnswer:t}=this.props,r=t?"Provide Sample Response":"Remove Sample Response";return Rs.createElement(_s,{onClick:t=>e(t),opts:{sample:r}})}}Bs.__initStatic2();const Ns=e,Ts=i,{styled:Ls}=t,{InputLabel:Ms}=r,{OutlinedInput:ks}=r,{Select:Gs}=r,{FormControl:Ws}=r,{MenuItem:Fs}=r,{Checkbox:$s}=r,{FormGroup:js}=r,{FormControlLabel:Us}=r,{Typography:Hs}=r,{DragIndicator:qs}=l,Vs=s,{grey:zs}=d,Ys=p,{InputContainer:Zs}=g,Js=Vs("pie-lib:rubric:authoring"),Xs=(e,t,r)=>{const n=Array.from(e),[o]=n.splice(t,1);return n.splice(r,0,o),n},Ks=Ts.shape({excludeZero:Ts.bool,points:Ts.arrayOf(Ts.string),sampleAnswers:Ts.arrayOf(Ts.string),maxPoints:Ts.number,rubriclessInstruction:Ts.string}),Qs=e=>{const{value:t,onChange:r,max:n}=e,o="max-points-label";return Ns.createElement(Ws,{sx:{minWidth:120,m:1},variant:"outlined"},Ns.createElement(Ms,{id:o},"Max Points"),Ns.createElement(Gs,{labelId:o,label:"Max Points",value:t,onChange:e=>r(e.target.value),input:Ns.createElement(ks,{label:"Max Points"}),MenuProps:{transitionDuration:{enter:225,exit:195}}},Ze(1,n+1).map(e=>Ns.createElement(Fs,{key:`${e}`,value:e},e))))},el=e=>null===e||"null"===e,tl=Ls("div")(()=>({display:"flex",width:"100%",position:"relative"})),rl=Ls("div")(({theme:e})=>({width:"100%",backgroundColor:`${e.palette.common.white}`})),nl=Ls(qs)(({theme:e})=>({paddingTop:e.spacing(1),color:zs[500]})),ol=Ls(Hs)(({theme:e})=>({color:zs[500],paddingBottom:e.spacing(1),textTransform:"uppercase"})),il=Ls("div")(({theme:e})=>({paddingLeft:e.spacing(3)})),al=Ls("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingLeft:e.spacing(3),paddingTop:e.spacing(1)})),sl=Ls("div")(()=>({position:"absolute",right:0})),ll=e=>{const{points:t,content:r,sampleAnswer:n,mathMlOptions:o={},error:i,pluginOpts:a={}}=e,s=`${t} ${t<=1?"pt":"pts"}`,l=el(n);return Ns.createElement("div",null,Ns.createElement(ol,{variant:"overline"},s),Ns.createElement(tl,null,Ns.createElement(nl,null),Ns.createElement(rl,null,Ns.createElement(Ys,{error:i,pluginProps:a,markup:r,onChange:e.onChange,mathMlOptions:o})),Ns.createElement(sl,null,Ns.createElement(Bs,{showSampleAnswer:l,onChange:e.onMenuChange}))),i&&Ns.createElement(al,null,i),!l&&Ns.createElement(il,null,Ns.createElement(nl,{as:Hs,variant:"overline"},"Sample Response"),Ns.createElement(rl,null,Ns.createElement(Ys,{markup:n,pluginProps:a,onChange:e.onSampleChange,mathMlOptions:o}))))},cl=Ls("div")(({theme:e})=>({backgroundColor:zs[200],borderWidth:1,borderStyle:"solid",borderColor:zs[300],padding:e.spacing(2),margin:e.spacing(1)})),dl=Ls(Zs)(({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)"}})),ul=Ls("div")(()=>({display:"none"})),pl=Ls("div")(({theme:e})=>({paddingTop:e.spacing(1),paddingBottom:e.spacing(1)})),gl=Ls(Hs)(({theme:e})=>({paddingLeft:e.spacing(1),margin:e.spacing(1)}));class ml extends Ns.Component{constructor(...e){super(...e),ml.prototype.__init.call(this),ml.prototype.__init2.call(this),ml.prototype.__init3.call(this),ml.prototype.__init4.call(this),ml.prototype.__init5.call(this),ml.prototype.__init6.call(this),ml.prototype.__init7.call(this),ml.prototype.__init8.call(this),ml.prototype.__init9.call(this)}static __initStatic(){this.propTypes={value:Ks,config:Ts.object,pluginOpts:Ts.object,rubricless:Ts.bool,onChange:Ts.func}}static __initStatic2(){this.defaultProps={}}__init(){this.dragEnd=e=>{if(!e.destination)return;const{value:t,onChange:r}=this.props,n=Xs(t.points,e.source.index,e.destination.index),o=Xs(t.sampleAnswers,e.source.index,e.destination.index);r({...t,points:n,sampleAnswers:o})}}__init2(){this.changeRubriclessInstruction=e=>{const{value:t,onChange:r}=this.props;r({...t,rubriclessInstruction:e})}}__init3(){this.changeMaxPoints=e=>{const{value:t,onChange:r,rubricless:n}=this.props,o=t.points.length-1;let i,a;Js("current",o,"new: ",e),e>o&&(i=Qe(e-o).map(()=>"").concat(t.points),a=Qe(e-o).map(()=>null).concat(t.sampleAnswers)),e<o&&(Js("less than"),i=Je(t.points,e+1),a=Je(t.sampleAnswers,e+1)),r(i&&!n?{...t,points:i,sampleAnswers:a,maxPoints:e}:{...t,maxPoints:e})}}__init4(){this.changeContent=(e,t,r)=>{if(Js(`changeModel[${r}]:`,e,t),"points"!==r&&"sampleAnswers"!==r)return;const{value:n,onChange:o}=this.props,i=n[r]&&Array.from(n[r]);i.splice(e,1,t),Js(`changeModel[${r}]:`,i),o({...n,[r]: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,r=Array.from(t.sampleAnswers||[]);el(r[e])?this.changeContent(e,"","sampleAnswers"):this.changeContent(e,null,"sampleAnswers")}}}render(){const{value:e,mathMlOptions:t={},config:r={},rubricless:n=!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}=r||{},{pointsDescriptorsErrors:p}=s||{};e&&Number.isFinite(e.maxPoints)&&console.warn("maxPoints is deprecated - remove from model");const g=n?c:e.excludeZero?e.points.length:e.points.length-1;return Ns.createElement("div",null,Ns.createElement(gl,{variant:"h5"},"Rubric"),Ns.createElement(js,{row:!0},a&&Ns.createElement(Qs,{max:u<100?u:100,value:g,onChange:this.changeMaxPoints,pluginOpts:o}),i&&Ns.createElement(Us,{label:"Exclude zeros",control:Ns.createElement($s,{checked:e.excludeZero,onChange:this.excludeZeros})})),l&&n&&Ns.createElement(dl,{label:d.label},Ns.createElement(Ys,{markup:e.rubriclessInstruction||"",onChange:this.changeRubriclessInstruction,pluginProps:o,nonEmpty:!1,disableUnderline:!0,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:t,autoWidthToolbar:!0})),Ns.createElement("div",null,n?Ns.createElement(ul,null):Ns.createElement(cl,null,Ns.createElement(Ga,{onDragEnd:this.dragEnd},Ns.createElement(Ds,{droppableId:"droppable"},r=>Ns.createElement("div",{...r.droppableProps,ref:r.innerRef},e.points.map((r,n)=>this.shouldRenderPoint(n,e)&&Ns.createElement(es,{key:`${r.points}-${n}`,index:n,draggableId:n.toString()},i=>Ns.createElement(pl,{ref:i.innerRef,...i.draggableProps,...i.dragHandleProps},Ns.createElement(ll,{points:this.getPointForIndex(n,e),content:r,error:p&&p[e.points.length-1-n],sampleAnswer:e.sampleAnswers&&e.sampleAnswers[n],onChange:e=>this.changeContent(n,e,"points"),onSampleChange:e=>this.changeContent(n,e,"sampleAnswers"),onMenuChange:e=>this.onPointMenuChange(n,e),mathMlOptions:t,pluginOpts:o})))),r.placeholder))))))}}ml.__initStatic(),ml.__initStatic2(),Ts.object,Ts.object,Ts.bool,Ts.func,Ts.func;const fl="simpleRubric",bl="multiTraitRubric",hl="rubricless",vl="complex-rubric-simple",yl="complex-rubric-multi-trait";class xl extends M{}class El extends ve{}const Il={[fl]:`<${vl} id="simpleRubric" />`,[hl]:`<${vl} id="rubricless" />`,[bl]:`<${yl} id="multiTraitRubric" />`},Dl=(e,t)=>"instructor"===t.role?(e.mode="evaluate",e.animationsDisabled=!0,e):{};customElements.get(vl)||customElements.define(vl,xl),customElements.get(yl)||customElements.define(yl,El);class wl extends HTMLElement{constructor(){super(),this._model={},this._type=fl,this._options=null}set type(e){this._type=e}get type(){return this._type}set model(e){this._model=e;const t=this._type;switch(this.type=e.rubricType,this._type){case fl:default:customElements.whenDefined(vl).then(()=>{this.setRubricModel(this.simpleRubric)});break;case bl:customElements.whenDefined(yl).then(()=>{this.setMultiTraitRubricModel(this.multiTraitRubric)});break;case hl:customElements.whenDefined(vl).then(()=>{this.setRubriclessModel(this.rubricless)})}t!==this.type&&this._render()}setRubricModel(e){this._model&&this._model.rubrics&&this._model.rubrics.simpleRubric&&(e.model=Dl(this._model.rubrics.simpleRubric,this._options))}setMultiTraitRubricModel(e){if(this._model&&this._model.rubrics&&this._model.rubrics.multiTraitRubric){const{scales:t,excludeZero:r}=this._model.rubrics.multiTraitRubric||{},n=(t||[]).map(e=>({...e,excludeZero:r}));e.model={...Dl(this._model.rubrics.multiTraitRubric,this._options),visible:!0,arrowsDisabled:!0,scales:n}}}setRubriclessModel(e){this._model&&this._model.rubrics&&this._model.rubrics.rubricless&&(e.model=Dl(this._model.rubrics.rubricless,this._options))}set options(e){this._options=e}get multiTraitRubric(){return this.querySelector(`${yl}#multiTraitRubric`)}get simpleRubric(){return this.querySelector(`${vl}#simpleRubric`)}get rubricless(){return this.querySelector(`${vl}#rubricless`)}connectedCallback(){this._render()}_render(){this.innerHTML=Il[this._type]||""}}export{wl as default};