vendor: 2,888 bytes, lines 1-6
1import{c as lo,aE as ao,r as x,ah as B,aF as co,aG as qr,k as zr,a as Yr,l as ve,j as v,F as uo,B as ne,t as ye,h as X,L as po,x as fo,D as go,s as rr,af as mo,a6 as bo,a7 as ho,a8 as vo,a9 as yo,I as te,J as it,ap as xo,aq as Do,ar as So,as as Io,at as nr,an as Co}from"./index-C4LWZPK9.js";import{F as Eo}from"./FileUploader-DVCKECt2.js";import{T as wo}from"./textarea-G6LYtFU8.js";import{T as Ao,a as Po,b as or,c as ir}from"./tabs-k4Vtuswt.js";import{i as Ro}from"./tiny-invariant-BaFNuDhB.js";import{P as No}from"./plus-Nk5sUbpA.js";import{E as Oo}from"./eye-BuNnJwN2.js";import{E as Bo}from"./eye-off-cXKwYb2J.js";import{P as To}from"./pencil-DiYrB8i9.js";import"./upload-CkiK-kaT.js";import"./external-link-lrsG04FH.js";/** 2 * @license lucide-react v0.475.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Lo=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Mo=lo("GripVertical",Lo);function _e(){return _e=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},_e.apply(null,arguments)}function G(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 _o=typeof Symbol=="function"&&Symbol.observable||"@@observable",sr=_o,lr=()=>Math.random().toString(36).substring(7).split("").join("."),Fo={INIT:`@@redux/INIT${lr()}`,REPLACE:`@@redux/REPLACE${lr()}`},ar=Fo;function Go(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Kr(e,t,r){if(typeof e!="function")throw new Error(G(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(G(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(G(1));return r(Kr)(e,t)}let n=e,o=t,i=new Map,s=i,l=0,a=!1;function u(){s===i&&(s=new Map,i.forEach((m,S)=>{s.set(S,m)}))}function p(){if(a)throw new Error(G(3));return o}function c(m){if(typeof m!="function")throw new Error(G(4));if(a)throw new Error(G(5));let S=!0;u();const I=l++;return s.set(I,m),function(){if(S){if(a)throw new Error(G(6));S=!1,u(),s.delete(I),i=null}}}function d(m){if(!Go(m))throw new Error(G(7));if(typeof m.type>"u")throw new Error(G(8));if(typeof m.type!="string")throw new Error(G(17));if(a)throw new Error(G(9));try{a=!0,o=n(o,m)}finally{a=!1}
6return(i=s).forEach(I=>{I()}),m}function f(m){if(typeof m!="function")throw new Error(G(10));n=m,d({type:ar.REPLACE})}function g(){const m=c;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(G(11));function I(){const D=S;D.next&&D.next(p())}return I(),{unsubscribe:m(I)}},[sr](){return this}}}return d({type:ar.INIT}),{dispatch:d,subscribe:c,getState:p,replaceReducer:f,[sr]:g}}function cr(e,t){return function(...r){return t(e.apply(this,r))}}function ur(e,t){if(typeof e=="function")return cr(e,t);if(typeof e!="object"||e===null)throw new Error(G(16));const r={};for(const n in e){const o=e[n];typeof o=="function"&&(r[n]=cr(o,t))}return r}function Jr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function $o(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(G(15))};const s={getState:o.getState,dispatch:(a,...u)=>i(a,...u)},l=e.map(a=>a(s));return i=Jr(...l)(o.dispatch),{...o,dispatch:i}}}var st={exports:{}},lt={};/** 7 * @license React 8 * use-sync-external-store-with-selector.production.js 9 * 10 * Copyright (c) Meta Platforms, Inc. and affiliates. 11 * 12 * This source code is licensed under the MIT license found in the 13 * LICENSE file in the root directory of this source tree. 14 */var dr;function jo(){if(dr)return lt;dr=1;var e=ao();function t(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,s=e.useMemo,l=e.useDebugValue;return lt.useSyncExternalStoreWithSelector=function(a,u,p,c,d){var f=o(null);if(f.current===null){var g={hasValue:!1,value:null};f.current=g}else g=f.current;f=s(function(){function m(E){if(!S){if(S=!0,I=E,E=c(E),d!==void 0&&g.hasValue){var w=g.value;if(d(w,E))return h=w}return h=E}if(w=h,r(I,E))return w;var R=c(E);return d!==void 0&&d(w,R)?(I=E,w):(I=E,h=R)}var S=!1,I,h,D=p===void 0?null:p;return[function(){return m(u())},D===null?void 0:function(){return m(D())}]},[u,p,c,d]);var b=n(a,f[0],f[1]);return i(function(){g.hasValue=!0,g.value=b},[b]),l(b),b},lt}var pr;function Wo(){return pr||(pr=1,st.exports=jo()),st.exports}Wo();var ko=x.version.startsWith("19"),Vo=Symbol.for(ko?"react.transitional.element":"react.element"),Uo=Symbol.for("react.portal"),Ho=Symbol.for("react.fragment"),qo=Symbol.for("react.strict_mode"),zo=Symbol.for("react.profiler"),Yo=Symbol.for("react.consumer"),Ko=Symbol.for("react.context"),Xr=Symbol.for("react.forward_ref"),Jo=Symbol.for("react.suspense"),Xo=Symbol.for("react.suspense_list"),Rt=Symbol.for("react.memo"),Qo=Symbol.for("react.lazy"),Zo=Xr,ei=Rt;function ti(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case Vo:switch(e=e.type,e){case Ho:case zo:case qo:case Jo:case Xo:return e;default:switch(e=e&&e.$$typeof,e){case Ko:case Xr:case Qo:case Rt:return e;case Yo:return e;default:return t}}case Uo:return t}}}function ri(e){return ti(e)===Rt}function ni(e,t,r,n,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let l=!1,a,u,p,c,d;function f(I,h){return a=I,u=h,p=e(a,u),c=t(n,u),d=r(p,c,u),l=!0,d}function g(){return p=e(a,u),t.dependsOnOwnProps&&(c=t(n,u)),d=r(p,c,u),d}function b(){return e.dependsOnOwnProps&&(p=e(a,u)),t.dependsOnOwnProps&&(c=t(n,u)),d=r(p,c,u),d}function m(){const I=e(a,u),h=!s(I,p);return p=I,h&&(d=r(p,c,u)),d}function S(I,h){const D=!i(h,u),E=!o(I,a,h,u);return a=I,u=h,D&&E?g():D?b():E?m():d}return function(h,D){return l?S(h,D):f(h,D)}}function oi(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:n,...o}){const i=t(e,o),s=r(e,o),l=n(e,o);return ni(i,s,l,e,o)}function ii(e,t){const r={};for(const n in e){const o=e[n];typeof o=="function"&&(r[n]=(...i)=>t(o(...i)))}return r}function Dt(e){return function(r){const n=e(r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function fr(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Qr(e,t){return function(n,{displayName:o}){const i=function(l,a){return i.dependsOnOwnProps?i.mapToProps(l,a):i.mapToProps(l,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(l,a){i.mapToProps=e,i.dependsOnOwnProps=fr(e);let u=i(l,a);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=fr(u),u=i(l,a)),u},i}}function Nt(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function si(e){return e&&typeof e=="object"?Dt(t=>ii(e,t)):e?typeof e=="function"?Qr(e):Nt(e,"mapDispatchToProps"):Dt(t=>({dispatch:t}))}function li(e){return e?typeof e=="function"?Qr(e):Nt(e,"mapStateToProps"):Dt(()=>({}))}function ai(e,t,r){return{...r,...e,...t}}function ci(e){return function(r,{displayName:n,areMergedPropsEqual:o}){let i=!1,s;return function(a,u,p){const c=e(a,u,p);
vendor: 4,262 bytes, line 14
14return i?o(c,s)||(s=c):(i=!0,s=c),s}}}function ui(e){return e?typeof e=="function"?ci(e):Nt(e,"mergeProps"):()=>ai}function di(e){e()}function pi(){let e=null,t=null;return{clear(){e=null,t=null},notify(){di(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},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||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var gr={notify(){},get:()=>[]};function Zr(e,t){let r,n=gr,o=0,i=!1;function s(b){p();const m=n.subscribe(b);let S=!1;return()=>{S||(S=!0,m(),c())}}function l(){n.notify()}function a(){g.onStateChange&&g.onStateChange()}function u(){return i}function p(){o++,r||(r=t?t.addNestedSub(a):e.subscribe(a),n=pi())}function c(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=gr)}function d(){i||(i=!0,p())}function f(){i&&(i=!1,c())}const g={addNestedSub:s,notifyNestedSubs:l,handleChangeWrapper:a,isSubscribed:u,trySubscribe:d,tryUnsubscribe:f,getListeners:()=>n};return g}var fi=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gi=fi(),mi=()=>typeof navigator<"u"&&navigator.product==="ReactNative",bi=mi(),hi=()=>gi||bi?x.useLayoutEffect:x.useEffect,Fe=hi();function mr(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function at(e,t){if(mr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(t,r[o])||!mr(e[r[o]],t[r[o]]))return!1;return!0}var vi={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},yi={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xi={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},en={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Di={[Zo]:xi,[ei]:en};function br(e){return ri(e)?en:Di[e.$$typeof]||vi}var Si=Object.defineProperty,Ii=Object.getOwnPropertyNames,hr=Object.getOwnPropertySymbols,Ci=Object.getOwnPropertyDescriptor,Ei=Object.getPrototypeOf,vr=Object.prototype;function St(e,t){if(typeof t!="string"){if(vr){const i=Ei(t);i&&i!==vr&&St(e,i)}let r=Ii(t);hr&&(r=r.concat(hr(t)));const n=br(e),o=br(t);for(let i=0;i<r.length;++i){const s=r[i];if(!yi[s]&&!(o&&o[s])&&!(n&&n[s])){const l=Ci(t,s);try{Si(e,s,l)}catch{}}}}return e}var ct=Symbol.for("react-redux-context"),ut=typeof globalThis<"u"?globalThis:{};function wi(){if(!x.createContext)return{};const e=ut[ct]??(ut[ct]=new Map);let t=e.get(x.createContext);return t||(t=x.createContext(null),e.set(x.createContext,t)),t}var tn=wi(),Ai=[null,null];function Pi(e,t,r){Fe(()=>e(...t),r)}function Ri(e,t,r,n,o,i){e.current=n,r.current=!1,o.current&&(o.current=null,i())}function Ni(e,t,r,n,o,i,s,l,a,u,p){if(!e)return()=>{};let c=!1,d=null;const f=()=>{if(c||!l.current)return;const b=t.getState();let m,S;try{m=n(b,o.current)}catch(I){S=I,d=I}S||(d=null),m===i.current?s.current||u():(i.current=m,a.current=m,s.current=!0,p())};return r.onStateChange=f,r.trySubscribe(),f(),()=>{if(c=!0,r.tryUnsubscribe(),r.onStateChange=null,d)throw d}}function Oi(e,t){return e===t}function Bi(e,t,r,{pure:n,areStatesEqual:o=Oi,areOwnPropsEqual:i=at,areStatePropsEqual:s=at,areMergedPropsEqual:l=at,forwardRef:a=!1,context:u=tn}={}){const p=u,c=li(e),d=si(t),f=ui(r),g=!!e;return m=>{const S=m.displayName||m.name||"Component",I=`Connect(${S})`,h={shouldHandleStateChanges:g,displayName:I,wrappedComponentName:S,WrappedComponent:m,initMapStateToProps:c,initMapDispatchToProps:d,initMergeProps:f,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:l};function D(R){const[N,V,O]=x.useMemo(()=>{const{reactReduxForwardedRef:U,...ge}=R;return[R.context,U,ge]},[R]),T=x.useMemo(()=>{let U=p;return N!=null&&N.Consumer,U},[N,p]),$=x.useContext(T),J=!!R.store&&!!R.store.getState&&!!R.store.dispatch,Qe=!!$&&!!$.store,K=J?R.store:$.store,Xt=Qe?$.getServerState:K.getState,Ze=x.useMemo(()=>oi(K.dispatch,h),[K]),[pe,Qt]=x.useMemo(()=>
14{if(!g)return Ai;const U=Zr(K,J?void 0:$.subscription),ge=U.notifyNestedSubs.bind(U);return[U,ge]},[K,J,$]),Zt=x.useMemo(()=>J?$:{...$,subscription:pe},[J,$,pe]),et=x.useRef(void 0),tt=x.useRef(O),fe=x.useRef(void 0),er=x.useRef(!1),rt=x.useRef(!1),nt=x.useRef(void 0);Fe(()=>(rt.current=!0,()=>{rt.current=!1}),[]);const tr=x.useMemo(()=>()=>fe.current&&O===tt.current?fe.current:Ze(K.getState(),O),[K,O]),so=x.useMemo(()=>ge=>pe?Ni(g,K,pe,Ze,tt,et,er,rt,fe,Qt,ge):()=>{},[pe]);Pi(Ri,[tt,et,er,O,fe,Qt]);let Oe;try{Oe=x.useSyncExternalStore(so,tr,Xt?()=>Ze(Xt(),O):tr)}catch(U){throw nt.current&&(U.message+=` 15The error may be correlated with this previous error: 16${nt.current.stack} 17 18`),U}Fe(()=>{nt.current=void 0,fe.current=void 0,et.current=Oe});const ot=x.useMemo(()=>x.createElement(m,{...Oe,ref:V}),[V,m,Oe]);return x.useMemo(()=>g?x.createElement(T.Provider,{value:Zt},ot):ot,[T,ot,Zt])}const w=x.memo(D);if(w.WrappedComponent=m,w.displayName=D.displayName=I,a){const N=x.forwardRef(function(O,T){return x.createElement(w,{...O,reactReduxForwardedRef:T})});return N.displayName=I,N.WrappedComponent=m,St(N,m)}return St(w,m)}}var rn=Bi;function Ti(e){const{children:t,context:r,serverState:n,store:o}=e,i=x.useMemo(()=>{const a=Zr(o);return{store:o,subscription:a,getServerState:n?()=>n:void 0}},[o,n]),s=x.useMemo(()=>o.getState(),[o]);Fe(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),s!==o.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,s]);const l=r||tn;return x.createElement(l.Provider,{value:i},t)}var Li=Ti;function Mi(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function nn(e,t){var r=x.useState(function(){return{inputs:t,result:e()}})[0],n=x.useRef(!0),o=x.useRef(r),i=n.current||!!(t&&o.current.inputs&&Mi(t,o.current.inputs)),s=i?o.current:{inputs:t,result:e()};return x.useEffect(function(){n.current=!1,o.current=s},[s]),s.result}function _i(e,t){return nn(function(){return e},t)}var A=nn,C=_i,Y=function(t){var r=t.top,n=t.right,o=t.bottom,i=t.left,s=n-i,l=o-r,a={top:r,right:n,bottom:o,left:i,width:s,height:l,x:i,y:r,center:{x:(n+i)/2,y:(o+r)/2}};return a},Ot=function(t,r){return{top:t.top-r.top,left:t.left-r.left,bottom:t.bottom+r.bottom,right:t.right+r.right}},yr=function(t,r){return{top:t.top+r.top,left:t.left+r.left,bottom:t.bottom-r.bottom,right:t.right-r.right}},Fi=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},dt={top:0,right:0,bottom:0,left:0},Bt=function(t){var r=t.borderBox,n=t.margin,o=n===void 0?dt:n,i=t.border,s=i===void 0?dt:i,l=t.padding,a=l===void 0?dt:l,u=Y(Ot(r,o)),p=Y(yr(r,s)),c=Y(yr(p,a));return{marginBox:u,borderBox:Y(r),paddingBox:p,contentBox:c,margin:o,border:s,padding:a}},H=function(t){var r=t.slice(0,-2),n=t.slice(-2);if(n!=="px")return 0;var o=Number(r);return isNaN(o)&&Ro(),o},Gi=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Ge=function(t,r){var n=t.borderBox,o=t.border,i=t.margin,s=t.padding,l=Fi(n,r);return Bt({borderBox:l,border:o,margin:i,padding:s})},$e=function(t,r){return r===void 0&&(r=Gi()),Ge(t,r)},on=function(t,r){var n={top:H(r.marginTop),right:H(r.marginRight),bottom:H(r.marginBottom),left:H(r.marginLeft)},o={top:H(r.paddingTop),right:H(r.paddingRight),bottom:H(r.paddingBottom),left:H(r.paddingLeft)},i={top:H(r.borderTopWidth),right:H(r.borderRightWidth),bottom:H(r.borderBottomWidth),left:H(r.borderLeftWidth)};return Bt({borderBox:t,margin:n,padding:o,border:i})},sn=function(t){var r=t.getBoundingClientRect(),n=window.getComputedStyle(t);return on(r,n)},xr=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function $i(e,t){return!!(e===t||xr(e)&&xr(t))}function ji(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!$i(e[r],t[r]))return!1;return!0}function L(e,t){t===void 0&&(t=ji);var r=null;function n(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(r&&r.lastThis===this&&t(o,r.lastArgs))return r.lastResult;var s=e.apply(this,o);return r={lastResult:s,lastArgs:o,lastThis:this},s}return n.clear=function(){r=null},n}var Se=function(t){var r=[],n=null,o=function(){for(var s=arguments.length,l=new Array(s),a=0;a<s;a++)l[a]=arguments[a];r=l,!n&&(n=requestAnimationFrame(function(){n=null,t.apply(void 0,r)}))};return o.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},o};function ln(e,t){}ln.bind(null,"warn");ln.bind(null,"error");function Q(){}function Wi(e,t){return{...e,...t}}function q(e,t,r){const n=t.map(o=>{const i=Wi(r,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});
18return function(){n.forEach(i=>{i()})}}const ki="Invariant failed";class je extends Error{}je.prototype.toString=function(){return this.message};function y(e,t){throw new je(ki)}class Vi extends B.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=Q,this.onWindowError=r=>{const n=this.getCallbacks();n.isDragging()&&n.tryAbort(),r.error instanceof je&&r.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=r=>{this.callbacks=r}}componentDidMount(){this.unbind=q(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof je){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const Ui=` 19 Press space bar to start a drag. 20 When dragging you can use the arrow keys to move the item around and escape to cancel. 21 Some screen readers may require you to be in focus mode or to use your pass through key 22`,We=e=>e+1,Hi=e=>` 23 You have lifted an item in position ${We(e.source.index)} 24`,an=(e,t)=>{const r=e.droppableId===t.droppableId,n=We(e.index),o=We(t.index);return r?` 25 You have moved the item from position ${n} 26 to position ${o} 27 `:` 28 You have moved the item from position ${n} 29 in list ${e.droppableId} 30 to list ${t.droppableId} 31 in position ${o} 32 `},cn=(e,t,r)=>t.droppableId===r.droppableId?` 33 The item ${e} 34 has been combined with ${r.draggableId}`:` 35 The item ${e} 36 in list ${t.droppableId} 37 has been combined with ${r.draggableId} 38 in list ${r.droppableId} 39 `,qi=e=>{const t=e.destination;if(t)return an(e.source,t);const r=e.combine;return r?cn(e.draggableId,e.source,r):"You are over an area that cannot be dropped on"},Dr=e=>` 40 The item has returned to its starting position 41 of ${We(e.index)} 42`,zi=e=>{if(e.reason==="CANCEL")return` 43 Movement cancelled. 44 ${Dr(e.source)} 45 `;const t=e.destination,r=e.combine;return t?` 46 You have dropped the item. 47 ${an(e.source,t)} 48 `:r?` 49 You have dropped the item. 50 ${cn(e.draggableId,e.source,r)} 51 `:` 52 The item has been dropped while not over a drop area. 53 ${Dr(e.source)} 54 `},Me={dragHandleUsageInstructions:Ui,onDragStart:Hi,onDragUpdate:qi,onDragEnd:zi},M={x:0,y:0},_=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),j=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Z=(e,t)=>e.x===t.x&&e.y===t.y,ce=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),ie=(e,t,r=0)=>e==="x"?{x:t,y:r}:{x:r,y:t},Ie=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Sr=(e,t)=>Math.min(...t.map(r=>Ie(e,r))),un=e=>t=>({x:e(t.x),y:e(t.y)});var Yi=(e,t)=>{const r=Y({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};const Re=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Ir=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}],Ki={top:0,right:0,bottom:0,left:0},Ji=(e,t)=>t?Re(e,t.scroll.diff.displacement):e,Xi=(e,t,r)=>r&&r.increasedBy?{...e,[t.end]:e[t.end]+r.increasedBy[t.line]}:e,Qi=(e,t)=>t&&t.shouldClipSubject?Yi(t.pageMarginBox,e):Y(e);var se=({page:e,withPlaceholder:t,axis:r,frame:n})=>{const o=Ji(e.marginBox,n),i=Xi(o,r,t),s=Qi(i,n);return{page:e,withPlaceholder:t,active:s}},Tt=(e,t)=>{e.frame||y();const r=e.frame,n=j(t,r.scroll.initial),o=ce(n),i={...r,scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}},s=se({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:s}};const dn=L(e=>e.reduce((t,r)=>(t[r.descriptor.id]=r,t),{})),pn=L(e=>e.reduce((t,r)=>(t[r.descriptor.id]=r,t),{})),He=L(e=>Object.values(e)),Zi=L(e=>Object.values(e));var ue=L((e,t)=>Zi(t).filter(n=>e===n.descriptor.droppableId).sort((n,o)=>n.descriptor.index-o.descriptor.index));function Lt(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function qe(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var ze=L((e,t)=>t.filter(r=>r.descriptor.id!==e.descriptor.id)),es=({isMovingForward:e,draggable:t,destination:r,insideDestination:n,previousImpact:o})=>
54{if(!r.isCombineEnabled||!Lt(o))return null;function s(f){const g={type:"COMBINE",combine:{draggableId:f,droppableId:r.descriptor.id}};return{...o,at:g}}const l=o.displaced.all,a=l.length?l[0]:null;if(e)return a?s(a):null;const u=ze(t,n);if(!a){if(!u.length)return null;const f=u[u.length-1];return s(f.descriptor.id)}const p=u.findIndex(f=>f.descriptor.id===a);p===-1&&y();const c=p-1;if(c<0)return null;const d=u[c];return s(d.descriptor.id)},de=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const fn={point:M,value:0},Ce={invisible:{},visible:{},all:[]},ts={displaced:Ce,displacedBy:fn,at:null};var z=(e,t)=>r=>e<=r&&r<=t,gn=e=>{const t=z(e.top,e.bottom),r=z(e.left,e.right);return n=>{if(t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right))return!0;const i=t(n.top)||t(n.bottom),s=r(n.left)||r(n.right);if(i&&s)return!0;const a=n.top<e.top&&n.bottom>e.bottom,u=n.left<e.left&&n.right>e.right;return a&&u?!0:a&&s||u&&i}},rs=e=>{const t=z(e.top,e.bottom),r=z(e.left,e.right);return n=>t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right)};const Mt={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},mn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var ns=e=>t=>{const r=z(t.top,t.bottom),n=z(t.left,t.right);return o=>e===Mt?r(o.top)&&r(o.bottom):n(o.left)&&n(o.right)};const os=(e,t)=>{const r=t.frame?t.frame.scroll.diff.displacement:M;return Re(e,r)},is=(e,t,r)=>t.subject.active?r(t.subject.active)(e):!1,ss=(e,t,r)=>r(t)(e),_t=({target:e,destination:t,viewport:r,withDroppableDisplacement:n,isVisibleThroughFrameFn:o})=>{const i=n?os(e,t):e;return is(i,t,o)&&ss(i,r,o)},ls=e=>_t({...e,isVisibleThroughFrameFn:gn}),bn=e=>_t({...e,isVisibleThroughFrameFn:rs}),as=e=>_t({...e,isVisibleThroughFrameFn:ns(e.destination.axis)}),cs=(e,t,r)=>{if(typeof r=="boolean")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:!0};function us(e,t){const r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return Y(Ot(r,n))}function Ee({afterDragging:e,destination:t,displacedBy:r,viewport:n,forceShouldAnimate:o,last:i}){return e.reduce(function(l,a){const u=us(a,r),p=a.descriptor.id;if(l.all.push(p),!ls({target:u,destination:t,viewport:n,withDroppableDisplacement:!0}))return l.invisible[a.descriptor.id]=!0,l;const d=cs(p,i,o),f={draggableId:p,shouldAnimate:d};return l.visible[p]=f,l},{all:[],visible:{},invisible:{}})}function ds(e,t){if(!e.length)return 0;const r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function Cr({insideDestination:e,inHomeList:t,displacedBy:r,destination:n}){const o=ds(e,{inHomeList:t});return{displaced:Ce,displacedBy:r,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function ke({draggable:e,insideDestination:t,destination:r,viewport:n,displacedBy:o,last:i,index:s,forceShouldAnimate:l}){const a=de(e,r);if(s==null)return Cr({insideDestination:t,inHomeList:a,displacedBy:o,destination:r});const u=t.find(g=>g.descriptor.index===s);if(!u)return Cr({insideDestination:t,inHomeList:a,displacedBy:o,destination:r});const p=ze(e,t),c=t.indexOf(u),d=p.slice(c);return{displaced:Ee({afterDragging:d,destination:r,displacedBy:o,last:i,viewport:n.frame,forceShouldAnimate:l}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:s}}}}function ee(e,t){return!!t.effected[e]}var ps=({isMovingForward:e,destination:t,draggables:r,combine:n,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=n.draggableId,l=r[i].descriptor.index;return ee(i,o)?e?l:l-1:e?l+1:l},fs=({isMovingForward:e,isInHomeList:t,insideDestination:r,location:n})=>{if(!r.length)return null;const o=n.index,i=e?o+1:o-1,s=r[0].descriptor.index,l=r[r.length-1].descriptor.index,a=t?l:l+1;return i<s||i>a?null:i},gs=({isMovingForward:e,isInHomeList:t,draggable:r,draggables:n,destination:o,insideDestination:i,previousImpact:s,viewport:l,afterCritical:a})=>{const u=s.at;if(u||y(),u.type==="REORDER"){const c=fs({isMovingForward:e,isInHomeList:t,location:u.destination,insideDestination:i});return c==null?null:ke({draggable:r,insideDestination:i,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:c})}const p=ps({isMovingForward:e,destination:o,displaced:s.displaced,draggables:n,combine:u.combine,afterCritical:a});return p==null?null:ke({draggable:r,insideDestination:i,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:p})}
54,ms=({displaced:e,afterCritical:t,combineWith:r,displacedBy:n})=>{const o=!!(e.visible[r]||e.invisible[r]);return ee(r,t)?o?M:ce(n.point):o?n.point:M},bs=({afterCritical:e,impact:t,draggables:r})=>{const n=qe(t);n||y();const o=n.draggableId,i=r[o].page.borderBox.center,s=ms({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return _(i,s)};const hn=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,hs=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,Ft=(e,t,r)=>t[e.crossAxisStart]+r.margin[e.crossAxisStart]+r.borderBox[e.crossAxisSize]/2,Er=({axis:e,moveRelativeTo:t,isMoving:r})=>ie(e.line,t.marginBox[e.end]+hn(e,r),Ft(e,t.marginBox,r)),wr=({axis:e,moveRelativeTo:t,isMoving:r})=>ie(e.line,t.marginBox[e.start]-hs(e,r),Ft(e,t.marginBox,r)),vs=({axis:e,moveInto:t,isMoving:r})=>ie(e.line,t.contentBox[e.start]+hn(e,r),Ft(e,t.contentBox,r));var ys=({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o})=>{const i=ue(n.descriptor.id,r),s=t.page,l=n.axis;if(!i.length)return vs({axis:l,moveInto:n.page,isMoving:s});const{displaced:a,displacedBy:u}=e,p=a.all[0];if(p){const d=r[p];if(ee(p,o))return wr({axis:l,moveRelativeTo:d.page,isMoving:s});const f=Ge(d.page,u.point);return wr({axis:l,moveRelativeTo:f,isMoving:s})}const c=i[i.length-1];if(c.descriptor.id===t.descriptor.id)return s.borderBox.center;if(ee(c.descriptor.id,o)){const d=Ge(c.page,ce(o.displacedBy.point));return Er({axis:l,moveRelativeTo:d,isMoving:s})}return Er({axis:l,moveRelativeTo:c.page,isMoving:s})},It=(e,t)=>
54{const r=e.frame;return r?_(t,r.scroll.diff.displacement):t};const xs=({impact:e,draggable:t,droppable:r,draggables:n,afterCritical:o})=>{const i=t.page.borderBox.center,s=e.at;return!r||!s?i:s.type==="REORDER"?ys({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o}):bs({impact:e,draggables:n,afterCritical:o})};var Ye=e=>{const t=xs(e),r=e.droppable;return r?It(r,t):t},vn=(e,t)=>{const r=j(t,e.scroll.initial),n=ce(r);return{frame:Y({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 Ar(e,t){return e.map(r=>t[r])}function Ds(e,t){for(let r=0;r<t.length;r++){const n=t[r].visible[e];if(n)return n}return null}var Ss=({impact:e,viewport:t,destination:r,draggables:n,maxScrollChange:o})=>{const i=vn(t,_(t.scroll.current,o)),s=r.frame?Tt(r,_(r.frame.scroll.current,o)):r,l=e.displaced,a=Ee({afterDragging:Ar(l.all,n),destination:r,displacedBy:e.displacedBy,viewport:i.frame,last:l,forceShouldAnimate:!1}),u=Ee({afterDragging:Ar(l.all,n),destination:s,displacedBy:e.displacedBy,viewport:t.frame,last:l,forceShouldAnimate:!1}),p={},c={},d=[l,a,u];return l.all.forEach(g=>{const b=Ds(g,d);if(b){c[g]=b;return}p[g]=!0}),{...e,displaced:{all:l.all,invisible:p,visible:c}}},Is=(e,t)=>_(e.scroll.diff.displacement,t),Gt=({pageBorderBoxCenter:e,draggable:t,viewport:r})=>{const n=Is(r,e),o=j(n,t.page.borderBox.center);return _(t.client.borderBox.center,o)},yn=({draggable:e,destination:t,newPageBorderBoxCenter:r,viewport:n,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const s=j(r,e.page.borderBox.center),a={target:Re(e.page.borderBox,s),destination:t,withDroppableDisplacement:o,viewport:n};return i?as(a):bn(a)},Cs=({isMovingForward:e,draggable:t,destination:r,draggables:n,previousImpact:o,viewport:i,previousPageBorderBoxCenter:s,previousClientSelection:l,afterCritical:a})=>{if(!r.isEnabled)return null;const u=ue(r.descriptor.id,n),p=de(t,r),c=es({isMovingForward:e,draggable:t,destination:r,insideDestination:u,previousImpact:o})||gs({isMovingForward:e,isInHomeList:p,draggable:t,draggables:n,destination:r,insideDestination:u,previousImpact:o,viewport:i,afterCritical:a});if(!c)return null;const d=Ye({impact:c,draggable:t,droppable:r,draggables:n,afterCritical:a});if(yn({draggable:t,destination:r,newPageBorderBoxCenter:d,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Gt({pageBorderBoxCenter:d,draggable:t,viewport:i}),impact:c,scrollJumpRequest:null};const g=j(d,s),b=Ss({impact:c,viewport:i,destination:r,draggables:n,maxScrollChange:g});return{clientSelection:l,impact:b,scrollJumpRequest:g}};const F=e=>{const t=e.subject.active;return t||y(),t};var Es=({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:n,viewport:o})=>{const i=r.subject.active;if(!i)return null;const s=r.axis,l=z(i[s.start],i[s.end]),a=He(n).filter(p=>p!==r).filter(p=>p.isEnabled).filter(p=>!!p.subject.active).filter(p=>gn(o.frame)(F(p))).filter(p=>{const c=F(p);return e?i[s.crossAxisEnd]<c[s.crossAxisEnd]:c[s.crossAxisStart]<i[s.crossAxisStart]}).filter(p=>{const c=F(p),d=z(c[s.start],c[s.end]);return l(c[s.start])||l(c[s.end])||d(i[s.start])||d(i[s.end])}).sort((p,c)=>{const d=F(p)[s.crossAxisStart],f=F(c)[s.crossAxisStart];return e?d-f:f-d}).filter((p,c,d)=>F(p)[s.crossAxisStart]===F(d[0])[s.crossAxisStart]);if(!a.length)return null;if(a.length===1)return a[0];const u=a.filter(p=>z(F(p)[s.start],F(p)[s.end])(t[s.line]));return u.length===1?u[0]:u.length>1?u.sort((p,c)=>F(p)[s.start]-F(c)[s.start])[0]:a.sort((p,c)=>{const d=Sr(t,Ir(F(p))),f=Sr(t,Ir(F(c)));return d!==f?d-f:F(p)[s.start]-F(c)[s.start]})[0]};const Pr=(e,t)=>{const r=e.page.borderBox.center;return ee(e.descriptor.id,t)?j(r,t.displacedBy.point):r},ws=(e,t)=>{const r=e.page.borderBox;return ee(e.descriptor.id,t)?Re(r,ce(t.displacedBy.point)):r};var As=({pageBorderBoxCenter:e,viewport:t,destination:r,insideDestination:n,afterCritical:o})=>n.filter(s=>bn({target:ws(s,o),destination:r,viewport:t.frame,withDroppableDisplacement:!0})).sort((s,l)=>{const a=Ie(e,It(r,Pr(s,o))),u=Ie(e,It(r,Pr(l,o)));return a<u?-1:u<a?1:s.descriptor.index-l.descriptor.index})[0]||null,Ne=L(function(t,r){const n=r[t.line];return{value:n,point:ie(t.line,n)}});const Ps=(e,t,r)=>{const n=e.axis;
54if(e.descriptor.mode==="virtual")return ie(n.line,t[n.line]);const o=e.subject.page.contentBox[n.size],a=ue(e.descriptor.id,r).reduce((u,p)=>u+p.client.marginBox[n.size],0)+t[n.line]-o;return a<=0?null:ie(n.line,a)},xn=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),Dn=(e,t,r)=>{const n=e.frame;de(t,e)&&y(),e.subject.withPlaceholder&&y();const o=Ne(e.axis,t.displaceBy).point,i=Ps(e,o,r),s={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!n){const p=se({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:e.frame});return{...e,subject:p}}const l=i?_(n.scroll.max,i):n.scroll.max,a=xn(n,l),u=se({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:a});return{...e,subject:u,frame:a}},Rs=e=>{const t=e.subject.withPlaceholder;t||y();const r=e.frame;if(!r){const s=se({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:s}}const n=t.oldFrameMaxScroll;n||y();const o=xn(r,n),i=se({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}};var Ns=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:r,draggable:n,draggables:o,destination:i,viewport:s,afterCritical:l})=>{if(!t){if(r.length)return null;const c={displaced:Ce,displacedBy:fn,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},d=Ye({impact:c,draggable:n,droppable:i,draggables:o,afterCritical:l}),f=de(n,i)?i:Dn(i,n,o);return yn({draggable:n,destination:f,newPageBorderBoxCenter:d,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}const a=e[i.axis.line]<=t.page.borderBox.center[i.axis.line],u=(()=>{const c=t.descriptor.index;return t.descriptor.id===n.descriptor.id||a?c:c+1})(),p=Ne(i.axis,n.displaceBy);return ke({draggable:n,insideDestination:r,destination:i,viewport:s,displacedBy:p,last:Ce,index:u})},Os=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:r,isOver:n,draggables:o,droppables:i,viewport:s,afterCritical:l})=>{const a=Es({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:i,viewport:s});if(!a)return null;const u=ue(a.descriptor.id,o),p=As({pageBorderBoxCenter:t,viewport:s,destination:a,insideDestination:u,afterCritical:l}),c=Ns({previousPageBorderBoxCenter:t,destination:a,draggable:r,draggables:o,moveRelativeTo:p,insideDestination:u,viewport:s,afterCritical:l});if(!c)return null;const d=Ye({impact:c,draggable:r,droppable:a,draggables:o,afterCritical:l});return{clientSelection:Gt({pageBorderBoxCenter:d,draggable:r,viewport:s}),impact:c,scrollJumpRequest:null}},W=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const Bs=(e,t)=>{const r=W(e);return r?t[r]:null};var Ts=({state:e,type:t})=>{const r=Bs(e.impact,e.dimensions.droppables),n=!!r,o=e.dimensions.droppables[e.critical.droppable.id],i=r||o,s=i.axis.direction,l=s==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||s==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(l&&!n)return null;const a=t==="MOVE_DOWN"||t==="MOVE_RIGHT",u=e.dimensions.draggables[e.critical.draggable.id],p=e.current.page.borderBoxCenter,{draggables:c,droppables:d}=e.dimensions;return l?Cs({isMovingForward:a,previousPageBorderBoxCenter:p,draggable:u,destination:i,draggables:c,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):Os({isMovingForward:a,previousPageBorderBoxCenter:p,draggable:u,isOver:i,draggables:c,droppables:d,viewport:e.viewport,afterCritical:e.afterCritical})};function oe(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Sn(e){const t=z(e.top,e.bottom),r=z(e.left,e.right);return function(o){return t(o.y)&&r(o.x)}}function Ls(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Ms({pageBorderBox:e,draggable:t,candidates:r}){const n=t.page.borderBox.center,o=r.map(i=>{const s=i.axis,l=ie(i.axis.line,e.center[s.line],i.page.borderBox.center[s.crossAxisLine]);return{id:i.descriptor.id,distance:Ie(n,l)}}).sort((i,s)=>s.distance-i.distance);return o[0]?o[0].id:null}function _s({pageBorderBox:e,draggable:t,droppables:r}){const n=He(r).filter(o=>{if(!o.isEnabled)return!1;const i=o.subject.active;if(!i||!Ls(e,i))return!1;if(Sn(i)(e.center))return!0;const s=o.axis,l=i.center[s.crossAxisLine],a=e[s.crossAxisStart],u=e[s.crossAxisEnd],p=z(i[s.crossAxisStart],i[s.crossAxisEnd]),c=p(a),d=p(u);return!c&&!d?!0:c?a<l:u>l});return n.length?n.length===1?n[0].descriptor.id:Ms({pageBorderBox:e,draggable:t,candidates:n}):null}const In=(e,t)=>Y(Re(e,t));var Fs=(e,t)=>{const r=e.frame;return r?In(t,r.scroll.diff.value):t};
54function Cn({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function Gs({draggable:e,closest:t,inHomeList:r}){return t?r&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var $s=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:r,insideDestination:n,last:o,viewport:i,afterCritical:s})=>{const l=r.axis,a=Ne(r.axis,t.displaceBy),u=a.value,p=e[l.start],c=e[l.end],f=ze(t,n).find(b=>{const m=b.descriptor.id,S=b.page.borderBox.center[l.line],I=ee(m,s),h=Cn({displaced:o,id:m});return I?h?c<=S:p<S-u:h?c<=S+u:p<S})||null,g=Gs({draggable:t,closest:f,inHomeList:de(t,r)});return ke({draggable:t,insideDestination:n,destination:r,viewport:i,last:o,displacedBy:a,index:g})};const js=4;var Ws=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:r,destination:n,insideDestination:o,afterCritical:i})=>{if(!n.isCombineEnabled)return null;const s=n.axis,l=Ne(n.axis,e.displaceBy),a=l.value,u=t[s.start],p=t[s.end],d=ze(e,o).find(g=>{const b=g.descriptor.id,m=g.page.borderBox,I=m[s.size]/js,h=ee(b,i),D=Cn({displaced:r.displaced,id:b});return h?D?p>m[s.start]+I&&p<m[s.end]-I:u>m[s.start]-a+I&&u<m[s.end]-a-I:D?p>m[s.start]+a+I&&p<m[s.end]+a-I:u>m[s.start]+I&&u<m[s.end]-I});return d?{displacedBy:l,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:d.descriptor.id,droppableId:n.descriptor.id}}}:null},En=({pageOffset:e,draggable:t,draggables:r,droppables:n,previousImpact:o,viewport:i,afterCritical:s})=>{const l=In(t.page.borderBox,e),a=_s({pageBorderBox:l,draggable:t,droppables:n});if(!a)return ts;const u=n[a],p=ue(u.descriptor.id,r),c=Fs(u,l);return Ws({pageBorderBoxWithDroppableScroll:c,draggable:t,previousImpact:o,destination:u,insideDestination:p,afterCritical:s})||$s({pageBorderBoxWithDroppableScroll:c,draggable:t,destination:u,insideDestination:p,last:o.displaced,viewport:i,afterCritical:s})},$t=(e,t)=>({...e,[t.descriptor.id]:t});const ks=({previousImpact:e,impact:t,droppables:r})=>{const n=W(e),o=W(t);if(!n||n===o)return r;const i=r[n];if(!i.subject.withPlaceholder)return r;const s=Rs(i);return $t(r,s)};var Vs=({draggable:e,draggables:t,droppables:r,previousImpact:n,impact:o})=>{const i=ks({previousImpact:n,impact:o,droppables:r}),s=W(o);if(!s)return i;const l=r[s];if(de(e,l)||l.subject.withPlaceholder)return i;const a=Dn(l,e,t);return $t(i,a)},xe=({state:e,clientSelection:t,dimensions:r,viewport:n,impact:o,scrollJumpRequest:i})=>{const s=n||e.viewport,l=r||e.dimensions,a=t||e.current.client.selection,u=j(a,e.initial.client.selection),p={offset:u,selection:a,borderBoxCenter:_(e.initial.client.borderBoxCenter,u)},c={selection:_(p.selection,s.scroll.current),borderBoxCenter:_(p.borderBoxCenter,s.scroll.current),offset:_(p.offset,s.scroll.diff.value)},d={client:p,page:c};if(e.phase==="COLLECTING")return{...e,dimensions:l,viewport:s,current:d};const f=l.draggables[e.critical.draggable.id],g=o||En({pageOffset:c.offset,draggable:f,draggables:l.draggables,droppables:l.droppables,previousImpact:e.impact,viewport:s,afterCritical:e.afterCritical}),b=Vs({draggable:f,impact:g,previousImpact:e.impact,draggables:l.draggables,droppables:l.droppables});return{...e,current:d,dimensions:{draggables:l.draggables,droppables:b},impact:g,viewport:s,scrollJumpRequest:i||null,forceShouldAnimate:i?!1:null}};function Us(e,t){return e.map(r=>t[r])}var wn=({impact:e,viewport:t,draggables:r,destination:n,forceShouldAnimate:o})=>{const i=e.displaced,s=Us(i.all,r),l=Ee({afterDragging:s,destination:n,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:l}},An=({impact:e,draggable:t,droppable:r,draggables:n,viewport:o,afterCritical:i})=>{const s=Ye({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:i});return Gt({pageBorderBoxCenter:s,draggable:t,viewport:o})},Pn=({state:e,dimensions:t,viewport:r})=>{e.movementMode!=="SNAP"&&y();const n=e.impact,o=r||e.viewport,i=t||e.dimensions,{draggables:s,droppables:l}=i,a=s[e.critical.draggable.id],u=W(n);u||y();const p=l[u],c=wn({impact:n,viewport:o,destination:p,draggables:s}),d=An({impact:c,draggable:a,droppable:p,draggables:s,viewport:o,afterCritical:e.afterCritical});return xe({impact:c,clientSelection:d,state:e,dimensions:i,viewport:o})},Hs=e=>({index:e.index,droppableId:e.droppableId}),Rn=({draggable:e,home:t,draggables:r,viewport:n})=>{const o=Ne(t.axis,e.displaceBy),i=ue(t.descriptor.id,r),s=i.indexOf(e);s===-1&&y();const l=i.slice(s+1),a=l.reduce((d,f)=>(d[f.descriptor.id]=!0,d),{}),u={inVirtualList:t.descriptor.mode==="virtual",displacedBy:o,effected:a};return{impact:{displaced:Ee({afterDragging:l,destination:t,displacedBy:o,last:null,viewport:n.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:Hs(e.descriptor)}},afterCritical:u}},qs=(e,t)=>({draggables:e.draggables,droppables:$t(e.droppables,t)}),zs=({draggable:e,offset:t,initialWindowScroll:r})=>{const n=Ge(e.client,t),o=$e(n,r);return{...e,placeholder:{...e.placeholder,client:n},client:n,page:o}},Ys=e=>{const t=e.frame;return t||y(),t},Ks=({additions:e,updatedDroppables:t,viewport:r})=>{const n=r.scroll.diff.value;return e.map(o=>{const i=o.descriptor.droppableId,s=t[i],a=Ys(s).scroll.diff.value,u=_(n,a);return zs({draggable:o,offset:u,initialWindowScroll:r.scroll.initial})})},Js=({state:e,published:t})=>{const r=t.modified.map(S=>{const I=e.dimensions.droppables[S.droppableId];return Tt(I,S.scroll)}),n={...e.dimensions.droppables,...dn(r)},o=pn(Ks({additions:t.additions,updatedDroppables:n,viewport:e.viewport})),i={...e.dimensions.draggables,...o};
54t.removals.forEach(S=>{delete i[S]});const s={droppables:n,draggables:i},l=W(e.impact),a=l?s.droppables[l]:null,u=s.draggables[e.critical.draggable.id],p=s.droppables[e.critical.droppable.id],{impact:c,afterCritical:d}=Rn({draggable:u,home:p,draggables:i,viewport:e.viewport}),f=a&&a.isCombineEnabled?e.impact:c,g=En({pageOffset:e.current.page.offset,draggable:s.draggables[e.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:f,viewport:e.viewport,afterCritical:d}),b={...e,phase:"DRAGGING",impact:g,onLiftImpact:c,dimensions:s,afterCritical:d,forceShouldAnimate:!1};return e.phase==="COLLECTING"?b:{...b,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const Ct=e=>e.movementMode==="SNAP",pt=(e,t,r)=>{const n=qs(e.dimensions,t);return!Ct(e)||r?xe({state:e,dimensions:n}):Pn({state:e,dimensions:n})};function ft(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const Rr={phase:"IDLE",completed:null,shouldFlush:!1};var Xs=(e=Rr,t)=>{if(t.type==="FLUSH")return{...Rr,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&y();const{critical:r,clientSelection:n,viewport:o,dimensions:i,movementMode:s}=t.payload,l=i.draggables[r.draggable.id],a=i.droppables[r.droppable.id],u={selection:n,borderBoxCenter:l.client.borderBox.center,offset:M},p={client:u,page:{selection:_(u.selection,o.scroll.initial),borderBoxCenter:_(u.selection,o.scroll.initial),offset:_(u.selection,o.scroll.diff.value)}},c=He(i.droppables).every(b=>!b.isFixedOnPage),{impact:d,afterCritical:f}=Rn({draggable:l,home:a,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:s,dimensions:i,initial:p,current:p,isWindowScrollAllowed:c,impact:d,afterCritical:f,onLiftImpact:d,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&y(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||y(),Js({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;oe(e)||y();const{client:r}=t.payload;return Z(r,e.current.client.selection)?e:xe({state:e,clientSelection:r,impact:Ct(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return ft(e);oe(e)||y();const{id:r,newScroll:n}=t.payload,o=e.dimensions.droppables[r];if(!o)return e;const i=Tt(o,n);return pt(e,i,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;oe(e)||y();const{id:r,isEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||y(),o.isEnabled===n&&y();const i={...o,isEnabled:n};return pt(e,i,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;oe(e)||y();const{id:r,isCombineEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||y(),o.isCombineEnabled===n&&y();const i={...o,isCombineEnabled:n};return pt(e,i,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;oe(e)||y(),e.isWindowScrollAllowed||y();const r=t.payload.newScroll;if(Z(e.viewport.scroll.current,r))return ft(e);const n=vn(e.viewport,r);return Ct(e)?Pn({state:e,viewport:n}):xe({state:e,viewport:n})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!oe(e))return e;const r=t.payload.maxScroll;if(Z(r,e.viewport.scroll.max))return e;const n={...e.viewport,scroll:{...e.viewport.scroll,max:r}};return{...e,viewport:n}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&y();const r=Ts({state:e,type:t.type});return r?xe({state:e,impact:r.impact,clientSelection:r.clientSelection,scrollJumpRequest:r.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const r=t.payload.reason;return e.phase!=="COLLECTING"&&y(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:r}}if(t.type==="DROP_ANIMATE"){const{completed:r,dropDuration:n,newHomeClientOffset:o}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||y(),{phase:"DROP_ANIMATING",completed:r,dropDuration:n,newHomeClientOffset:o,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:r}=t.payload;return{phase:"IDLE",completed:r,shouldFlush:!1}}return e};function P(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Qs=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),Zs=e=>({type:"LIFT",payload:e}),el=e=>({type:"INITIAL_PUBLISH",payload:e}),tl=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),rl=()=>({type:"COLLECTION_STARTING",payload:null}),nl=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),ol=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),il=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Nn=e=>({type:"MOVE",payload:e}),sl=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),ll=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),al=()=>({type:"MOVE_UP",payload:null}),cl=()=>({type:"MOVE_DOWN",payload:null}),ul=()=>({type:"MOVE_RIGHT",payload:null}),dl=()=>({type:"MOVE_LEFT",payload:null}),jt=()=>({type:"FLUSH",payload:null}),pl=e=>({type:"DROP_ANIMATE",payload:e}),Wt=e=>({type:"DROP_COMPLETE",payload:e}),On=e=>({type:"DROP",payload:e}),fl=e=>({type:"DROP_PENDING",payload:e}),Bn=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var gl=e=>({getState:t,dispatch:r})=>n=>o=>{if(!P(o,"LIFT")){n(o);return}const{id:i,clientSelection:s,movementMode:l}=o.payload,a=t();a.phase==="DROP_ANIMATING"&&r(Wt({completed:a.completed})),t().phase!=="IDLE"&&y(),r(jt()),r(Qs({draggableId:i,movementMode:l}));const p={draggableId:i,scrollOptions:{shouldPublishImmediately:l==="SNAP"}},{critical:c,dimensions:d,viewport:f}=e.startPublishing(p);r(el({critical:c,dimensions:d,clientSelection:s,movementMode:l,viewport:f}))},ml=e=>()=>t=>r=>{P(r,"INITIAL_PUBLISH")&&e.dragging(),P(r,"DROP_ANIMATE")&&e.dropping(r.payload.completed.result.reason),(P(r,"FLUSH")||P(r,"DROP_COMPLETE"))&&e.resting(),t(r)};const kt={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},we={opacity:{drop:0,combining:.7},scale:{drop:.75}},Tn={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},re=`${Tn.outOfTheWay}s ${kt.outOfTheWay}`,De={fluid:`opacity ${re}`,snap:`transform ${re}, opacity ${re}`,drop:e=>{const t=`${e}s ${kt.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${re}`,placeholder:`height ${re}, width ${re}, margin ${re}`},Nr=e=>Z(e,M)?void 0:`translate(${e.x}px, ${e.y}px)`,Et={moveTo:Nr,drop:(e,t)=>{const r=Nr(e);
54if(r)return t?`${r} scale(${we.scale.drop})`:r}},{minDropTime:wt,maxDropTime:Ln}=Tn,bl=Ln-wt,Or=1500,hl=.6;var vl=({current:e,destination:t,reason:r})=>{const n=Ie(e,t);if(n<=0)return wt;if(n>=Or)return Ln;const o=n/Or,i=wt+bl*o,s=r==="CANCEL"?i*hl:i;return Number(s.toFixed(2))},yl=({impact:e,draggable:t,dimensions:r,viewport:n,afterCritical:o})=>{const{draggables:i,droppables:s}=r,l=W(e),a=l?s[l]:null,u=s[t.descriptor.droppableId],p=An({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:a||u,viewport:n});return j(p,t.client.borderBox.center)},xl=({draggables:e,reason:t,lastImpact:r,home:n,viewport:o,onLiftImpact:i})=>!r.at||t!=="DROP"?{impact:wn({draggables:e,impact:i,destination:n,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:r.at.type==="REORDER"?{impact:r,didDropInsideDroppable:!0}:{impact:{...r,displaced:Ce},didDropInsideDroppable:!0};const Dl=({getState:e,dispatch:t})=>r=>n=>{if(!P(n,"DROP")){r(n);return}const o=e(),i=n.payload.reason;if(o.phase==="COLLECTING"){t(fl({reason:i}));return}if(o.phase==="IDLE")return;o.phase==="DROP_PENDING"&&o.isWaiting&&y(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||y();const l=o.critical,a=o.dimensions,u=a.draggables[o.critical.draggable.id],{impact:p,didDropInsideDroppable:c}=xl({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}),d=c?Lt(p):null,f=c?qe(p):null,g={index:l.draggable.index,droppableId:l.droppable.id},b={draggableId:u.descriptor.id,type:u.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:d,combine:f},m=yl({impact:p,draggable:u,dimensions:a,viewport:o.viewport,afterCritical:o.afterCritical}),S={critical:o.critical,afterCritical:o.afterCritical,result:b,impact:p};if(!(!Z(o.current.client.offset,m)||!!b.combine)){t(Wt({completed:S}));return}const h=vl({current:o.current.client.offset,destination:m,reason:i});t(pl({newHomeClientOffset:m,dropDuration:h,completed:S}))};var Mn=()=>({x:window.pageXOffset,y:window.pageYOffset});function Sl(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function Il({onWindowScroll:e}){function t(){e(Mn())}const r=Se(t),n=Sl(r);let o=Q;function i(){return o!==Q}function s(){i()&&y(),o=q(window,[n])}function l(){i()||y(),r.cancel(),o(),o=Q}return{start:s,stop:l,isActive:i}}const Cl=e=>P(e,"DROP_COMPLETE")||P(e,"DROP_ANIMATE")||P(e,"FLUSH"),El=e=>{const t=Il({onWindowScroll:r=>{e.dispatch(sl({newScroll:r}))}});return r=>n=>{!t.isActive()&&P(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&Cl(n)&&t.stop(),r(n)}};var wl=e=>{let t=!1,r=!1;const n=setTimeout(()=>{r=!0}),o=i=>{t||r||(t=!0,e(i),clearTimeout(n))};return o.wasCalled=()=>t,o},Al=()=>{const e=[],t=o=>{const i=e.findIndex(l=>l.timerId===o);i===-1&&y();const[s]=e.splice(i,1);s.callback()};return{add:o=>{const i=setTimeout(()=>t(i)),s={timerId:i,callback:o};e.push(s)},flush:()=>
54{if(!e.length)return;const o=[...e];e.length=0,o.forEach(i=>{clearTimeout(i.timerId),i.callback()})}}};const Pl=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,Rl=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,Nl=(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},me=(e,t)=>{t()},Be=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function gt(e,t,r,n){if(!e){r(n(t));return}const o=wl(r);e(t,{announce:o}),o.wasCalled()||r(n(t))}var Ol=(e,t)=>{const r=Al();let n=null;const o=(c,d)=>{n&&y(),me("onBeforeCapture",()=>{const f=e().onBeforeCapture;f&&f({draggableId:c,mode:d})})},i=(c,d)=>{n&&y(),me("onBeforeDragStart",()=>{const f=e().onBeforeDragStart;f&&f(Be(c,d))})},s=(c,d)=>{n&&y();const f=Be(c,d);n={mode:d,lastCritical:c,lastLocation:f.source,lastCombine:null},r.add(()=>{me("onDragStart",()=>gt(e().onDragStart,f,t,Me.onDragStart))})},l=(c,d)=>{const f=Lt(d),g=qe(d);n||y();const b=!Nl(c,n.lastCritical);b&&(n.lastCritical=c);const m=!Pl(n.lastLocation,f);m&&(n.lastLocation=f);const S=!Rl(n.lastCombine,g);if(S&&(n.lastCombine=g),!b&&!m&&!S)return;const I={...Be(c,n.mode),combine:g,destination:f};r.add(()=>{me("onDragUpdate",()=>gt(e().onDragUpdate,I,t,Me.onDragUpdate))})},a=()=>{n||y(),r.flush()},u=c=>{n||y(),n=null,me("onDragEnd",()=>gt(e().onDragEnd,c,t,Me.onDragEnd))};return{beforeCapture:o,beforeStart:i,start:s,update:l,flush:a,drop:u,abort:()=>{if(!n)return;const c={...Be(n.lastCritical,n.mode),combine:null,destination:null,reason:"CANCEL"};u(c)}}},Bl=(e,t)=>{const r=Ol(e,t);return n=>o=>i=>{if(P(i,"BEFORE_INITIAL_CAPTURE")){r.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(P(i,"INITIAL_PUBLISH")){const l=i.payload.critical;r.beforeStart(l,i.payload.movementMode),o(i),r.start(l,i.payload.movementMode);return}if(P(i,"DROP_COMPLETE")){const l=i.payload.completed.result;r.flush(),o(i),r.drop(l);return}if(o(i),P(i,"FLUSH")){r.abort();return}const s=n.getState();s.phase==="DRAGGING"&&r.update(s.critical,s.impact)}};const Tl=e=>t=>r=>{if(!P(r,"DROP_ANIMATION_FINISHED")){t(r);return}const n=e.getState();n.phase!=="DROP_ANIMATING"&&y(),e.dispatch(Wt({completed:n.completed}))},Ll=e=>{let t=null,r=null;function n(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}return o=>i=>{if((P(i,"FLUSH")||P(i,"DROP_COMPLETE")||P(i,"DROP_ANIMATION_FINISHED"))&&n(),o(i),!P(i,"DROP_ANIMATE"))return;const s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(Bn())}};r=requestAnimationFrame(()=>{r=null,t=q(window,[s])})}};var Ml=e=>()=>t=>r=>{(P(r,"DROP_COMPLETE")||P(r,"FLUSH")||P(r,"DROP_ANIMATE"))&&e.stopPublishing(),t(r)},_l=e=>{let t=!1;return()=>r=>n=>{if(P(n,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),e.tryRestoreFocusRecorded();return}if(r(n),!!t){if(P(n,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(P(n,"DROP_COMPLETE")){t=!1;const o=n.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const Fl=e=>P(e,"DROP_COMPLETE")||P(e,"DROP_ANIMATE")||P(e,"FLUSH");var Gl=e=>t=>r=>n=>{if(Fl(n)){e.stop(),r(n);return}if(P(n,"INITIAL_PUBLISH")){r(n);const o=t.getState();o.phase!=="DRAGGING"&&y(),e.start(o);return}r(n),e.scroll(t.getState())};const $l=e=>t=>r=>{if(t(r),!P(r,"PUBLISH_WHILE_DRAGGING"))return;const n=e.getState();n.phase==="DROP_PENDING"&&(n.isWaiting||e.dispatch(On({reason:n.reason})))},jl=Jr;var Wl=({dimensionMarshal:e,focusMarshal:t,styleMarshal:r,getResponders:n,announce:o,autoScroller:i})=>Kr(Xs,jl($o(ml(r),Ml(e),gl(e),Dl,Tl,Ll,$l,Gl(i),El,_l(t),Bl(n,o))));const mt=()=>({additions:{},removals:{},modified:{}});function kl({registry:e,callbacks:t}){let r=mt(),n=null;const o=()=>{n||(t.collectionStarting(),n=requestAnimationFrame(()=>{n=null;const{additions:a,removals:u,modified:p}=r,c=Object.keys(a).map(g=>e.draggable.getById(g).getDimension(M)).sort((g,b)=>g.descriptor.index-b.descriptor.index),d=Object.keys(p).map(g=>{const m=e.droppable.getById(g).callbacks.getScrollWhileDragging();return{droppableId:g,scroll:m}}),f={additions:c,removals:Object.keys(u),modified:d};r=mt(),t.publish(f)}))};return{add:a=>{const u=a.descriptor.id;r.additions[u]=a,r.modified[a.descriptor.droppableId]=!0,r.removals[u]&&delete r.removals[u],o()},remove:a=>{const u=a.descriptor;r.removals[u.id]=!0,r.modified[u.droppableId]=!0,r.additions[u.id]&&delete r.additions[u.id],o()},stop:()=>{n&&(cancelAnimationFrame(n),n=null,r=mt())}}}var _n=({scrollHeight:e,scrollWidth:t,height:r,width:n})=>{const o=j({x:t,y:e},{x:n,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},Fn=()=>{const e=document.documentElement;return e||y(),e},Gn=()=>{const e=Fn();return _n({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},Vl=()=>{const e=Mn(),t=Gn(),r=e.y,n=e.x,o=Fn(),i=o.clientWidth,s=o.clientHeight,l=n+i,a=r+s;return{frame:Y({top:r,left:n,right:l,bottom:a}),scroll:{initial:e,current:e,max:t,diff:{value:M,displacement:M}}}},Ul=({critical:e,scrollOptions:t,registry:r})=>{const n=Vl(),o=n.scroll.current,i=e.droppable,s=r.droppable.getAllByType(i.type).map(p=>p.callbacks.getDimensionAndWatchScroll(o,t)),l=r.draggable.getAllByType(e.draggable.type).map(p=>p.getDimension(o));return{dimensions:{draggables:pn(l),droppables:dn(s)},critical:e,viewport:n}};function Br(e,t,r){return!(r.descriptor.id===t.id||r.descriptor.type!==t.type||e.droppable.getById(r.descriptor.droppableId).descriptor.mode!=="virtual")}var Hl=(e,t)=>{let r=null;const n=kl({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=(d,f)=>{e.droppable.exists(d)||y(),r&&t.updateDroppableIsEnabled({id:d,isEnabled:f})},i=(d,f)=>
54{r&&(e.droppable.exists(d)||y(),t.updateDroppableIsCombineEnabled({id:d,isCombineEnabled:f}))},s=(d,f)=>{r&&(e.droppable.exists(d)||y(),t.updateDroppableScroll({id:d,newScroll:f}))},l=(d,f)=>{r&&e.droppable.getById(d).callbacks.scroll(f)},a=()=>{if(!r)return;n.stop();const d=r.critical.droppable;e.droppable.getAllByType(d.type).forEach(f=>f.callbacks.dragStopped()),r.unsubscribe(),r=null},u=d=>{r||y();const f=r.critical.draggable;d.type==="ADDITION"&&Br(e,f,d.value)&&n.add(d.value),d.type==="REMOVAL"&&Br(e,f,d.value)&&n.remove(d.value)};return{updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:l,updateDroppableScroll:s,startPublishing:d=>{r&&y();const f=e.draggable.getById(d.draggableId),g=e.droppable.getById(f.descriptor.droppableId),b={draggable:f.descriptor,droppable:g.descriptor},m=e.subscribe(u);return r={critical:b,unsubscribe:m},Ul({critical:b,registry:e,scrollOptions:d.scrollOptions})},stopPublishing:a}},$n=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",ql=e=>{window.scrollBy(e.x,e.y)};const zl=L(e=>He(e).filter(t=>!(!t.isEnabled||!t.frame))),Yl=(e,t)=>zl(t).find(n=>(n.frame||y(),Sn(n.frame.pageMarginBox)(e)))||null;var Kl=({center:e,destination:t,droppables:r})=>{if(t){const o=r[t];return o.frame?o:null}return Yl(e,r)};const Ae={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var Jl=(e,t,r=()=>Ae)=>{const n=r(),o=e[t.size]*n.startFromPercentage,i=e[t.size]*n.maxScrollAtPercentage;return{startScrollingFrom:o,maxScrollValueAt:i}},jn=({startOfRange:e,endOfRange:t,current:r})=>{const n=t-e;return n===0?0:(r-e)/n},Vt=1,Xl=(e,t,r=()=>Ae)=>{const n=r();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return n.maxPixelScroll;if(e===t.startScrollingFrom)return Vt;const i=1-jn({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),s=n.maxPixelScroll*n.ease(i);return Math.ceil(s)},Ql=(e,t,r)=>{const n=r(),o=n.durationDampening.accelerateAt,i=n.durationDampening.stopDampeningAt,s=t,l=i,u=Date.now()-s;if(u>=i)return e;if(u<o)return Vt;const p=jn({startOfRange:o,endOfRange:l,current:u}),c=e*n.ease(p);return Math.ceil(c)},Tr=({distanceToEdge:e,thresholds:t,dragStartTime:r,shouldUseTimeDampening:n,getAutoScrollerOptions:o})=>{const i=Xl(e,t,o);return i===0?0:n?Math.max(Ql(i,r,o),Vt):i},Lr=({container:e,distanceToEdges:t,dragStartTime:r,axis:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=Jl(e,n,i);return t[n.end]<t[n.start]?Tr({distanceToEdge:t[n.end],thresholds:s,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*Tr({distanceToEdge:t[n.start],thresholds:s,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})},Zl=({container:e,subject:t,proposedScroll:r})=>{const n=t.height>e.height,o=t.width>e.width;return!o&&!n?r:o&&n?null:{x:o?0:r.x,y:n?0:r.y}};const ea=un(e=>e===0?0:e);var Wn=({dragStartTime:e,container:t,subject:r,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s={top:n.y-t.top,right:t.right-n.x,bottom:t.bottom-n.y,left:n.x-t.left},l=Lr({container:t,distanceToEdges:s,dragStartTime:e,axis:Mt,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),a=Lr({container:t,distanceToEdges:s,dragStartTime:e,axis:mn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),u=ea({x:a,y:l});if(Z(u,M))return null;const p=Zl({container:t,subject:r,proposedScroll:u});return p?Z(p,M)?null:p:null};const ta=un(e=>e===0?0:e>0?1:-1),Ut=(()=>{const e=(t,r)=>t<0?t:t>r?t-r:0;return({current:t,max:r,change:n})=>{const o=_(t,n),i={x:e(o.x,r.x),y:e(o.y,r.y)};return Z(i,M)?null:i}})(),kn=({max:e,current:t,change:r})=>{const n={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=ta(r),i=Ut({max:n,current:t,change:o});return!i||o.x!==0&&i.x===0||o.y!==0&&i.y===0},Ht=(e,t)=>kn({current:e.scroll.current,max:e.scroll.max,change:t}),ra=(e,t)=>{if(!Ht(e,t))return null;const r=e.scroll.max,n=e.scroll.current;return Ut({current:n,max:r,change:t})},qt=(e,t)=>{const r=e.frame;return r?kn({current:r.scroll.current,max:r.scroll.max,change:t}):!1},na=(e,t)=>{const r=e.frame;return!r||!qt(e,t)?null:Ut({current:r.scroll.current,max:r.scroll.max,change:t})};var oa=({viewport:e,subject:t,center:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=Wn({dragStartTime:n,container:e.frame,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Ht(e,s)?s:null},ia=({droppable:e,subject:t,center:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=e.frame;if(!s)return null;const l=Wn({dragStartTime:n,container:s.pageMarginBox,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return l&&qt(e,l)?l:null},Mr=({state:e,dragStartTime:t,shouldUseTimeDampening:r,scrollWindow:n,scrollDroppable:o,getAutoScrollerOptions:i})=>{const s=e.current.page.borderBoxCenter,a=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const c=e.viewport,d=oa({dragStartTime:t,viewport:c,subject:a,center:s,shouldUseTimeDampening:r,getAutoScrollerOptions:i});if(d){n(d);return}}const u=Kl({center:s,destination:W(e.impact),droppables:e.dimensions.droppables});if(!u)return;const p=ia({dragStartTime:t,droppable:u,subject:a,center:s,shouldUseTimeDampening:r,getAutoScrollerOptions:i});p&&o(u.descriptor.id,p)},sa=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:r=()=>Ae})=>{const n=Se(e),o=Se(t);let i=null;const s=u=>{i||y();const{shouldUseTimeDampening:p,dragStartTime:c}=i;Mr({state:u,scrollWindow:n,scrollDroppable:o,dragStartTime:c,shouldUseTimeDampening:p,getAutoScrollerOptions:r})};return{start:u=>{i&&y();const p=Date.now();let c=!1;const d=()=>{c=!0};Mr({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:d,scrollDroppable:d,getAutoScrollerOptions:r}),i={dragStartTime:p,shouldUseTimeDampening:c},c&&s(u)},stop:()=>
54{i&&(n.cancel(),o.cancel(),i=null)},scroll:s}},la=({move:e,scrollDroppable:t,scrollWindow:r})=>{const n=(l,a)=>{const u=_(l.current.client.selection,a);e({client:u})},o=(l,a)=>{if(!qt(l,a))return a;const u=na(l,a);if(!u)return t(l.descriptor.id,a),null;const p=j(a,u);return t(l.descriptor.id,p),j(a,p)},i=(l,a,u)=>{if(!l||!Ht(a,u))return u;const p=ra(a,u);if(!p)return r(u),null;const c=j(u,p);return r(c),j(u,c)};return l=>{const a=l.scrollJumpRequest;if(!a)return;const u=W(l.impact);u||y();const p=o(l.dimensions.droppables[u],a);if(!p)return;const c=l.viewport,d=i(l.isWindowScrollAllowed,c,p);d&&n(l,d)}},aa=({scrollDroppable:e,scrollWindow:t,move:r,getAutoScrollerOptions:n})=>{const o=sa({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:n}),i=la({move:r,scrollWindow:t,scrollDroppable:e});return{scroll:a=>{if(!(n().disabled||a.phase!=="DRAGGING")){if(a.movementMode==="FLUID"){o.scroll(a);return}a.scrollJumpRequest&&i(a)}},start:o.start,stop:o.stop}};const le="data-rfd",ae=(()=>{const e=`${le}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),At=(()=>{const e=`${le}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),ca=(()=>{const e=`${le}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),_r={contextId:`${le}-scroll-container-context-id`},ua=e=>t=>`[${t}="${e}"]`,be=(e,t)=>e.map(r=>{const n=r.styles[t];return n?`${r.selector} { ${n} }`:""}).join(" "),da="pointer-events: none;";var pa=e=>{const t=ua(e),r=(()=>{const l=` 55 cursor: -webkit-grab; 56 cursor: grab; 57 `;return{selector:t(ae.contextId),styles:{always:` 58 -webkit-touch-callout: none; 59 -webkit-tap-highlight-color: rgba(0,0,0,0); 60 touch-action: manipulation; 61 `,resting:l,dragging:da,dropAnimating:l}}})(),n=(()=>{const l=` 62 transition: ${De.outOfTheWay}; 63 `;return{selector:t(At.contextId),styles:{dragging:l,dropAnimating:l,userCancel:l}}})(),o={selector:t(ca.contextId),styles:{always:"overflow-anchor: none;"}},s=[n,r,o,{selector:"body",styles:{dragging:` 64 cursor: grabbing; 65 cursor: -webkit-grabbing; 66 user-select: none; 67 -webkit-user-select: none; 68 -moz-user-select: none; 69 -ms-user-select: none; 70 overflow-anchor: none; 71 `}}];return{always:be(s,"always"),resting:be(s,"resting"),dragging:be(s,"dragging"),dropAnimating:be(s,"dropAnimating"),userCancel:be(s,"userCancel")}};const k=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect,bt=()=>{const e=document.querySelector("head");return e||y(),e},Fr=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function fa(e,t){const r=A(()=>pa(e),[e]),n=x.useRef(null),o=x.useRef(null),i=C(L(c=>{const d=o.current;d||y(),d.textContent=c}),[]),s=C(c=>{const d=n.current;d||y(),d.textContent=c},[]);k(()=>{!n.current&&!o.current||y();const c=Fr(t),d=Fr(t);return n.current=c,o.current=d,c.setAttribute(`${le}-always`,e),d.setAttribute(`${le}-dynamic`,e),bt().appendChild(c),bt().appendChild(d),s(r.always),i(r.resting),()=>{const f=g=>{const b=g.current;b||y(),bt().removeChild(b),g.current=null};f(n),f(o)}},[t,s,i,r.always,r.resting,e]);const l=C(()=>i(r.dragging),[i,r.dragging]),a=C(c=>{if(c==="DROP"){i(r.dropAnimating);return}i(r.userCancel)},[i,r.dropAnimating,r.userCancel]),u=C(()=>{o.current&&i(r.resting)},[i,r.resting]);return A(()=>({dragging:l,dropping:a,resting:u}),[l,a,u])}function Vn(e,t){return Array.from(e.querySelectorAll(t))}var Un=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Ke(e){return e instanceof Un(e).HTMLElement}function ga(e,t){const r=`[${ae.contextId}="${e}"]`,n=Vn(document,r);if(!n.length)return null;const o=n.find(i=>i.getAttribute(ae.draggableId)===t);return!o||!Ke(o)?null:o}function ma(e){const t=x.useRef({}),r=x.useRef(null),n=x.useRef(null),o=x.useRef(!1),i=C(function(d,f){const g={id:d,focus:f};return t.current[d]=g,function(){const m=t.current;m[d]!==g&&delete m[d]}},[]),s=C(function(d){const f=ga(e,d);
71f&&f!==document.activeElement&&f.focus()},[e]),l=C(function(d,f){r.current===d&&(r.current=f)},[]),a=C(function(){n.current||o.current&&(n.current=requestAnimationFrame(()=>{n.current=null;const d=r.current;d&&s(d)}))},[s]),u=C(function(d){r.current=null;const f=document.activeElement;f&&f.getAttribute(ae.draggableId)===d&&(r.current=d)},[]);return k(()=>(o.current=!0,function(){o.current=!1;const d=n.current;d&&cancelAnimationFrame(d)}),[]),A(()=>({register:i,tryRecordFocus:u,tryRestoreFocusRecorded:a,tryShiftRecord:l}),[i,u,a,l])}function ba(){const e={draggables:{},droppables:{}},t=[];function r(c){return t.push(c),function(){const f=t.indexOf(c);f!==-1&&t.splice(f,1)}}function n(c){t.length&&t.forEach(d=>d(c))}function o(c){return e.draggables[c]||null}function i(c){const d=o(c);return d||y(),d}const s={register:c=>{e.draggables[c.descriptor.id]=c,n({type:"ADDITION",value:c})},update:(c,d)=>{const f=e.draggables[d.descriptor.id];f&&f.uniqueId===c.uniqueId&&(delete e.draggables[d.descriptor.id],e.draggables[c.descriptor.id]=c)},unregister:c=>{const d=c.descriptor.id,f=o(d);f&&c.uniqueId===f.uniqueId&&(delete e.draggables[d],e.droppables[c.descriptor.droppableId]&&n({type:"REMOVAL",value:c}))},getById:i,findById:o,exists:c=>!!o(c),getAllByType:c=>Object.values(e.draggables).filter(d=>d.descriptor.type===c)};function l(c){return e.droppables[c]||null}function a(c){const d=l(c);return d||y(),d}const u={register:c=>{e.droppables[c.descriptor.id]=c},unregister:c=>{const d=l(c.descriptor.id);d&&c.uniqueId===d.uniqueId&&delete e.droppables[c.descriptor.id]},getById:a,findById:l,exists:c=>!!l(c),getAllByType:c=>Object.values(e.droppables).filter(d=>d.descriptor.type===c)};function p(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:u,subscribe:r,clean:p}}function ha(){const e=A(ba,[]);return x.useEffect(()=>function(){e.clean()},[e]),e}var zt=B.createContext(null),Ve=()=>{const e=document.body;return e||y(),e};const va={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},ya=e=>`rfd-announcement-${e}`;function xa(e){const t=A(()=>ya(e),[e]),r=x.useRef(null);return x.useEffect(function(){const i=document.createElement("div");return r.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),_e(i.style,va),Ve().appendChild(i),function(){setTimeout(function(){const a=Ve();a.contains(i)&&a.removeChild(i),i===r.current&&(r.current=null)})}},[t]),C(o=>{const i=r.current;if(i){i.textContent=o;return}},[])}const Da={separator:"::"};function Yt(e,t=Da){const r=B.useId();return A(()=>`${e}${t.separator}${r}`,[t.separator,e,r])}function Sa({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function Ia({contextId:e,text:t}){const r=Yt("hidden-text",{separator:"-"}),n=A(()=>Sa({contextId:e,uniqueId:r}),[r,e]);return x.useEffect(function(){const i=document.createElement("div");return i.id=n,i.textContent=t,i.style.display="none",Ve().appendChild(i),function(){const l=Ve();l.contains(i)&&l.removeChild(i)}},[n,t]),n}var Je=B.createContext(null);function Hn(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),t}function Ca(){let e=null;function t(){return!!e}function r(s){return s===e}function n(s){e&&y();const l={abandon:s};return e=l,l}function o(){e||y(),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:r,claim:n,release:o,tryAbandon:i}}function Pe(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const Ea=9,wa=13,Kt=27,qn=32,Aa=33,Pa=34,Ra=35,Na=36,Oa=37,Ba=38,Ta=39,La=40,Ma={[wa]:!0,[Ea]:!0};var zn=e=>{Ma[e.keyCode]&&e.preventDefault()};const Xe=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(n=>`on${n}`in document)||e})(),Yn=0,Gr=5;function _a(e,t){return Math.abs(t.x-e.x)>=Gr||Math.abs(t.y-e.y)>=Gr}const $r={type:"IDLE"};function Fa({cancel:e,completed:t,getPhase:r,setPhase:n}){return[{eventName:"mousemove",fn:o=>{const{button:i,clientX:s,clientY:l}=o;if(i!==Yn)return;const a={x:s,y:l},u=r();if(u.type==="DRAGGING"){o.preventDefault(),u.actions.move(a);return}u.type!=="PENDING"&&y();const p=u.point;if(!_a(p,a))return;o.preventDefault();const c=u.actions.fluidLift(a);n({type:"DRAGGING",actions:c})}},{eventName:"mouseup",fn:o=>{const i=r();if(i.type!=="DRAGGING"){e();return}o.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:o=>{r().type==="DRAGGING"&&o.preventDefault(),e()}},{eventName:"keydown",fn:o=>
71{if(r().type==="PENDING"){e();return}if(o.keyCode===Kt){o.preventDefault(),e();return}zn(o)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{r().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:o=>{const i=r();if(i.type==="IDLE"&&y(),i.actions.shouldRespectForcePress()){e();return}o.preventDefault()}},{eventName:Xe,fn:e}]}function Ga(e){const t=x.useRef($r),r=x.useRef(Q),n=A(()=>({eventName:"mousedown",fn:function(c){if(c.defaultPrevented||c.button!==Yn||c.ctrlKey||c.metaKey||c.shiftKey||c.altKey)return;const d=e.findClosestDraggableId(c);if(!d)return;const f=e.tryGetLock(d,s,{sourceEvent:c});if(!f)return;c.preventDefault();const g={x:c.clientX,y:c.clientY};r.current(),u(f,g)}}),[e]),o=A(()=>({eventName:"webkitmouseforcewillbegin",fn:p=>{if(p.defaultPrevented)return;const c=e.findClosestDraggableId(p);if(!c)return;const d=e.findOptionsForDraggable(c);d&&(d.shouldRespectForcePress||e.canGetLock(c)&&p.preventDefault())}}),[e]),i=C(function(){const c={passive:!1,capture:!0};r.current=q(window,[o,n],c)},[o,n]),s=C(()=>{t.current.type!=="IDLE"&&(t.current=$r,r.current(),i())},[i]),l=C(()=>{const p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),a=C(function(){const c={capture:!0,passive:!1},d=Fa({cancel:l,completed:s,getPhase:()=>t.current,setPhase:f=>{t.current=f}});r.current=q(window,d,c)},[l,s]),u=C(function(c,d){t.current.type!=="IDLE"&&y(),t.current={type:"PENDING",point:d,actions:c},a()},[a]);k(function(){return i(),function(){r.current()}},[i])}function $a(){}const ja={[Pa]:!0,[Aa]:!0,[Na]:!0,[Ra]:!0};function Wa(e,t){function r(){t(),e.cancel()}function n(){t(),e.drop()}return[{eventName:"keydown",fn:o=>{if(o.keyCode===Kt){o.preventDefault(),r();return}if(o.keyCode===qn){o.preventDefault(),n();return}if(o.keyCode===La){o.preventDefault(),e.moveDown();return}if(o.keyCode===Ba){o.preventDefault(),e.moveUp();return}if(o.keyCode===Ta){o.preventDefault(),e.moveRight();return}if(o.keyCode===Oa){o.preventDefault(),e.moveLeft();return}if(ja[o.keyCode]){o.preventDefault();return}zn(o)}},{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:Xe,fn:r}]}function ka(e){const t=x.useRef($a),r=A(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==qn)return;const s=e.findClosestDraggableId(i);if(!s)return;const l=e.tryGetLock(s,p,{sourceEvent:i});if(!l)return;i.preventDefault();let a=!0;const u=l.snapLift();t.current();function p(){a||y(),a=!1,t.current(),n()}t.current=q(window,Wa(u,p),{capture:!0,passive:!1})}}),[e]),n=C(function(){const i={passive:!1,capture:!0};t.current=q(window,[r],i)},[r]);k(function(){return n(),function(){t.current()}},[n])}const ht={type:"IDLE"},Va=120,Ua=.15;function Ha({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:r=>{r.preventDefault()}},{eventName:"keydown",fn:r=>{if(t().type!=="DRAGGING"){e();return}r.keyCode===Kt&&r.preventDefault(),e()}},{eventName:Xe,fn:e}]}function qa({cancel:e,completed:t,getPhase:r}){return[{eventName:"touchmove",options:{capture:!1},fn:n=>{const o=r();if(o.type!=="DRAGGING"){e();return}o.hasMoved=!0;const{clientX:i,clientY:s}=n.touches[0],l={x:i,y:s};n.preventDefault(),o.actions.move(l)}},{eventName:"touchend",fn:n=>{const o=r();if(o.type!=="DRAGGING"){e();return}n.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:n=>{if(r().type!=="DRAGGING"){e();return}n.preventDefault(),e()}},{eventName:"touchforcechange",fn:n=>{const o=r();o.type==="IDLE"&&y();const i=n.touches[0];if(!i||!(i.force>=Ua))return;const l=o.actions.shouldRespectForcePress();if(o.type==="PENDING"){l&&e();return}if(l){if(o.hasMoved){n.preventDefault();return}e();return}n.preventDefault()}},{eventName:Xe,fn:e}]}function za(e){const t=x.useRef(ht),r=x.useRef(Q),n=C(function(){return t.current},[]),o=C(function(f){t.current=f},[]),i=A(()=>({eventName:"touchstart",fn:function(f){if(f.defaultPrevented)return;const g=e.findClosestDraggableId(f);if(!g)return;const b=e.tryGetLock(g,l,{sourceEvent:f});if(!b)return;const m=f.touches[0],{clientX:S,clientY:I}=m,h={x:S,y:I};r.current(),c(b,h)}}),[e]),s=C(function(){const f={capture:!0,passive:!1};r.current=q(window,[i],f)},[i]),l=C(()=>{const d=t.current;d.type!=="IDLE"&&(d.type==="PENDING"&&clearTimeout(d.longPressTimerId),o(ht),r.current(),s())},[s,o]),a=C(()=>{const d=t.current;l(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[l]),u=C(function(){const f={capture:!0,passive:!1},g={cancel:a,completed:l,getPhase:n}
71,b=q(window,qa(g),f),m=q(window,Ha(g),f);r.current=function(){b(),m()}},[a,n,l]),p=C(function(){const f=n();f.type!=="PENDING"&&y();const g=f.actions.fluidLift(f.point);o({type:"DRAGGING",actions:g,hasMoved:!1})},[n,o]),c=C(function(f,g){n().type!=="IDLE"&&y();const b=setTimeout(p,Va);o({type:"PENDING",point:g,actions:f,longPressTimerId:b}),u()},[u,n,o,p]);k(function(){return s(),function(){r.current();const g=n();g.type==="PENDING"&&(clearTimeout(g.longPressTimerId),o(ht))}},[n,s,o]),k(function(){return q(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const Ya=["input","button","textarea","select","option","optgroup","video","audio"];function Kn(e,t){if(t==null)return!1;if(Ya.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return n==="true"||n===""?!0:t===e?!1:Kn(e,t.parentElement)}function Ka(e,t){const r=t.target;return Ke(r)?Kn(e,r):!1}var Ja=e=>Y(e.getBoundingClientRect()).center;function Xa(e){return e instanceof Un(e).Element}const Qa=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(n=>n in Element.prototype)||e})();function Jn(e,t){return e==null?null:e[Qa](t)?e:Jn(e.parentElement,t)}function Za(e,t){return e.closest?e.closest(t):Jn(e,t)}function ec(e){return`[${ae.contextId}="${e}"]`}function tc(e,t){const r=t.target;if(!Xa(r))return null;const n=ec(e),o=Za(r,n);return!o||!Ke(o)?null:o}function rc(e,t){const r=tc(e,t);return r?r.getAttribute(ae.draggableId):null}function nc(e,t){const r=`[${At.contextId}="${e}"]`,o=Vn(document,r).find(i=>i.getAttribute(At.id)===t);return!o||!Ke(o)?null:o}function oc(e){e.preventDefault()}function Te({expected:e,phase:t,isLockActive:r,shouldWarn:n}){return!(!r()||e!==t)}function Xn({lockAPI:e,store:t,registry:r,draggableId:n}){if(e.isClaimed())return!1;const o=r.draggable.findById(n);return!(!o||!o.options.isEnabled||!$n(t.getState(),n))}function ic({lockAPI:e,contextId:t,store:r,registry:n,draggableId:o,forceSensorStop:i,sourceEvent:s}){if(!Xn({lockAPI:e,store:r,registry:n,draggableId:o}))return null;const a=n.draggable.getById(o),u=nc(t,a.descriptor.id);if(!u||s&&!a.options.canDragInteractiveElements&&Ka(u,s))return null;const p=e.claim(i||Q);let c="PRE_DRAG";function d(){return a.options.shouldRespectForcePress}function f(){return e.isActive(p)}function g(E,w){Te({expected:E,phase:c,isLockActive:f,shouldWarn:!0})&&r.dispatch(w())}const b=g.bind(null,"DRAGGING");function m(E){function w(){e.release(),c="COMPLETED"}c!=="PRE_DRAG"&&(w(),y()),r.dispatch(Zs(E.liftActionArgs)),c="DRAGGING";function R(N,V={shouldBlockNextClick:!1}){if(E.cleanup(),V.shouldBlockNextClick){const O=q(window,[{eventName:"click",fn:oc,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(O)}w(),r.dispatch(On({reason:N}))}return{isActive:()=>Te({expected:"DRAGGING",phase:c,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:d,drop:N=>R("DROP",N),cancel:N=>R("CANCEL",N),...E.actions}}function S(E){const w=Se(N=>{b(()=>Nn({client:N}))});return{...m({liftActionArgs:{id:o,clientSelection:E,movementMode:"FLUID"},cleanup:()=>w.cancel(),actions:{move:w}}),move:w}}function I(){const E={moveUp:()=>b(al),moveRight:()=>b(ul),moveDown:()=>b(cl),moveLeft:()=>b(dl)};return m({liftActionArgs:{id:o,clientSelection:Ja(u),movementMode:"SNAP"},cleanup:Q,actions:E})}function h(){Te({expected:"PRE_DRAG",phase:c,isLockActive:f,shouldWarn:!0})&&e.release()}return{isActive:()=>Te({expected:"PRE_DRAG",phase:c,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:d,fluidLift:S,snapLift:I,abort:h}}const sc=[Ga,ka,za];function lc({contextId:e,store:t,registry:r,customSensors:n,enableDefaultSensors:o}){const i=[...o?sc:[],...n||[]],s=x.useState(()=>Ca())[0],l=C(function(m,S){Pe(m)&&!Pe(S)&&s.tryAbandon()},[s]);k(function(){let m=t.getState();return t.subscribe(()=>{const I=t.getState();l(m,I),m=I})},[s,t,l]),k(()=>s.tryAbandon,[s.tryAbandon]);const a=C(b=>Xn({lockAPI:s,registry:r,store:t,draggableId:b}),[s,r,t]),u=C((b,m,S)=>ic({lockAPI:s,registry:r,contextId:e,store:t,draggableId:b,forceSensorStop:m||null,sourceEvent:S&&S.sourceEvent?S.sourceEvent:null}),[e,s,r,t]),p=C(b=>rc(e,b),[e]),c=C(b=>{const m=r.draggable.findById(b);return m?m.options:null},[r.draggable]),d=C(function(){s.isClaimed()&&(s.tryAbandon(),t.getState().phase!=="IDLE"&&t.dis
71patch(jt()))},[s,t]),f=C(()=>s.isClaimed(),[s]),g=A(()=>({canGetLock:a,tryGetLock:u,findClosestDraggableId:p,findOptionsForDraggable:c,tryReleaseLock:d,isLockClaimed:f}),[a,u,p,c,d,f]);for(let b=0;b<i.length;b++)i[b](g)}const ac=e=>({onBeforeCapture:t=>{const r=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};qr.flushSync(r)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),cc=e=>({...Ae,...e.autoScrollerOptions,durationDampening:{...Ae.durationDampening,...e.autoScrollerOptions}});function he(e){return e.current||y(),e.current}function uc(e){const{contextId:t,setCallbacks:r,sensors:n,nonce:o,dragHandleUsageInstructions:i}=e,s=x.useRef(null),l=Hn(e),a=C(()=>ac(l.current),[l]),u=C(()=>cc(l.current),[l]),p=xa(t),c=Ia({contextId:t,text:i}),d=fa(t,o),f=C(O=>{he(s).dispatch(O)},[]),g=A(()=>ur({publishWhileDragging:tl,updateDroppableScroll:nl,updateDroppableIsEnabled:ol,updateDroppableIsCombineEnabled:il,collectionStarting:rl},f),[f]),b=ha(),m=A(()=>Hl(b,g),[b,g]),S=A(()=>aa({scrollWindow:ql,scrollDroppable:m.scrollDroppable,getAutoScrollerOptions:u,...ur({move:Nn},f)}),[m.scrollDroppable,f,u]),I=ma(t),h=A(()=>Wl({announce:p,autoScroller:S,dimensionMarshal:m,focusMarshal:I,getResponders:a,styleMarshal:d}),[p,S,m,I,a,d]);s.current=h;const D=C(()=>{const O=he(s);O.getState().phase!=="IDLE"&&O.dispatch(jt())},[]),E=C(()=>{const O=he(s).getState();return O.phase==="DROP_ANIMATING"?!0:O.phase==="IDLE"?!1:O.isDragging},[]),w=A(()=>({isDragging:E,tryAbort:D}),[E,D]);r(w);const R=C(O=>$n(he(s).getState(),O),[]),N=C(()=>oe(he(s).getState()),[]),V=A(()=>({marshal:m,focus:I,contextId:t,canLift:R,isMovementAllowed:N,dragHandleUsageInstructionsId:c,registry:b}),[t,m,c,I,R,N,b]);return lc({contextId:t,store:h,registry:b,customSensors:n||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),x.useEffect(()=>D,[D]),B.createElement(Je.Provider,{value:V},B.createElement(Li,{context:zt,store:h},e.children))}function dc(){return B.useId()}function pc(e){const t=dc(),r=e.dragHandleUsageInstructions||Me.dragHandleUsageInstructions;return B.createElement(Vi,null,n=>B.createElement(uc,{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 jr={dragging:5e3,dropAnimating:4500},fc=(e,t)=>t?De.drop(t.duration):e?De.snap:De.fluid,gc=(e,t)=>{if(e)return t?we.opacity.drop:we.opacity.combining},mc=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function bc(e){const r=e.dimension.client,{offset:n,combineWith:o,dropping:i}=e,s=!!o,l=mc(e),a=!!i,u=a?Et.drop(n,s):Et.moveTo(n);return{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:fc(l,i),transform:u,opacity:gc(s,a),zIndex:a?jr.dropAnimating:jr.dragging,pointerEvents:"none"}}function hc(e){return{transform:Et.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function vc(e){return e.type==="DRAGGING"?bc(e):hc(e)}function yc(e,t,r=M){const n=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=on(o,n),s=$e(i,r),l={client:i,tagName:t.tagName.toLowerCase(),display:n.display},a={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:e,placeholder:l,displaceBy:a,client:i,page:s}}function xc(e){const t=Yt("draggable"),{descriptor:r,registry:n,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:s,isEnabled:l}=e,a=A(()=>({canDragInteractiveElements:i,shouldRespectForcePress:s,isEnabled:l}),[i,l,s]),u=C(f=>{const g=o();return g||y(),yc(r,g,f)},[r,o]),p=A(()=>({uniqueId:t,descriptor:r,options:a,getDimension:u}),[r,u,a,t]),c=x.useRef(p),d=x.useRef(!0);k(()=>(n.draggable.register(c.current),()=>n.draggable.unregister(c.current)),[n.draggable]),k(()=>{if(d.current){d.current=!1;return}const f=c.current;c.current=p,n.draggable.update(p,f)},[p,n.draggable])}var Jt=B.createContext(null);function Ue(e){const t=x.useContext(e);return t||y(),t}function Dc(e){e.preventDefault()}const Sc=e=>{const t=x.useRef(null),r=C((w=null)=>{t.current=w},[]),n=C(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:s}=Ue(Je),{type:l,droppableId:a}=Ue(Jt),u=A(()=>({id:e.draggableId,index:e.index,type:l,droppableId:a}),[e.draggableId,e.index,l,a]),{children:p,draggableId:c,isEnabled:d,shouldRespectForcePress:f,canDragInteractiveElements:g,isClone:b,mapped:m,dropAnimationFinished:S}=e;if(!b){const w=A(()=>({descriptor:u,registry:s,getDraggableRef:n,canDragInteractiveElements:g,shouldRespectForcePress:f,isEnabled:d}),[u,s,n,g,f,d]);xc(w)}const I=A(()=>d?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":c,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:Dc}:null,[o,i,c,d]),h=C(w=>{m.type==="DRAGGING"&&m.dropping&&w.propertyName==="transform"&&qr.flushSync(S)},[S,m]),D=A(()=>{const w=vc(m),R=m.type==="DRAGGING"&&m.dropping?h:void 0;return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":c,style:w,onTransitionEnd:R},dragHandleProps:I}},[o,I,c,m,h,r]),E=A(()=>({draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}),[u.droppableId,u.id,u.index,u.type]);return B.createElement(B.Fragment,null,p(D,m.snapshot,E))};var Qn=(e,t)=>e===t,Zn=e=>{const{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};const Ic=e=>e.combine?e.combine.draggableId:null,Cc=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function Ec(){const e=L((o,i)=>({x:o,y:i})),t=L((o,i,s=null,l=null,a=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!a,dropAnimation:a,mode:o,draggingOver:s,combineWith:l,combineTargetFor:null})),r=L((o,i,s,l,a=null,u=null,p=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:a,combineWith:u,mode:i,offset:o,dimension:s,forceShouldAnimate:p,snapshot:t(i,l,a,u,null)}}));return(o,i)=>{if(Pe(o)){if(o.critical.draggable.id!==i.draggableId)return null;const s=o.current.client.offset,l=o.dimensions.draggables[i.draggableId],a=W(o.impact),u=Cc(o.impact),p=o.forceShouldAnimate;return r(e(s.x,s.y),o.movementMode,l,i.isClone,a,u,p)}if(o.phase==="DROP_ANIMATING"){const s=o.completed;if(s.result.draggableId!==i.draggableId)return null;const l=i.isClone,a=o.dimensions.draggables[i.draggableId],u=s.result,p=u.mode,c=Zn(u),d=Ic(u),g={duration:o.dropDuration,curve:kt.drop,moveTo:o.newHomeClientOffset,opacity:d?we.opacity.drop:null,
71scale:d?we.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:a,dropping:g,draggingOver:c,combineWith:d,mode:p,forceShouldAnimate:null,snapshot:t(p,l,c,d,g)}}}return null}}function eo(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const wc={mapped:{type:"SECONDARY",offset:M,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:eo(null)}};function Ac(){const e=L((s,l)=>({x:s,y:l})),t=L(eo),r=L((s,l=null,a)=>({mapped:{type:"SECONDARY",offset:s,combineTargetFor:l,shouldAnimateDisplacement:a,snapshot:t(l)}})),n=s=>s?r(M,s,!0):null,o=(s,l,a,u)=>{const p=a.displaced.visible[s],c=!!(u.inVirtualList&&u.effected[s]),d=qe(a),f=d&&d.draggableId===s?l:null;if(!p){if(!c)return n(f);if(a.displaced.invisible[s])return null;const m=ce(u.displacedBy.point),S=e(m.x,m.y);return r(S,f,!0)}if(c)return n(f);const g=a.displacedBy.point,b=e(g.x,g.y);return r(b,f,p.shouldAnimate)};return(s,l)=>{if(Pe(s))return s.critical.draggable.id===l.draggableId?null:o(l.draggableId,s.critical.draggable.id,s.impact,s.afterCritical);if(s.phase==="DROP_ANIMATING"){const a=s.completed;return a.result.draggableId===l.draggableId?null:o(l.draggableId,a.result.draggableId,a.impact,a.afterCritical)}return null}}const Pc=()=>{const e=Ec(),t=Ac();return(n,o)=>e(n,o)||t(n,o)||wc},Rc={dropAnimationFinished:Bn},Nc=rn(Pc,Rc,null,{context:zt,areStatePropsEqual:Qn})(Sc);function to(e){return Ue(Jt).isUsingCloneFor===e.draggableId&&!e.isClone?null:B.createElement(Nc,e)}function Oc(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,r=!!e.disableInteractiveElementBlocking,n=!!e.shouldRespectForcePress;return B.createElement(to,_e({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:n}))}const ro=e=>t=>e===t,Bc=ro("scroll"),Tc=ro("auto"),Wr=(e,t)=>t(e.overflowX)||t(e.overflowY),Lc=e=>{const t=window.getComputedStyle(e),r={overflowX:t.overflowX,overflowY:t.overflowY};return Wr(r,Bc)||Wr(r,Tc)},Mc=()=>!1,no=e=>e==null?null:e===document.body?Mc()?e:null:e===document.documentElement?null:Lc(e)?e:no(e.parentElement);var Pt=e=>({x:e.scrollLeft,y:e.scrollTop});const oo=e=>e?window.getComputedStyle(e).position==="fixed"?!0:oo(e.parentElement):!1;var _c=e=>{const t=no(e),r=oo(e);return{closestScrollable:t,isFixedOnPage:r}},Fc=({descriptor:e,isEnabled:t,isCombineEnabled:r,isFixedOnPage:n,direction:o,client:i,page:s,closest:l})=>{const a=(()=>{if(!l)return null;const{scrollSize:d,client:f}=l,g=_n({scrollHeight:d.scrollHeight,scrollWidth:d.scrollWidth,height:f.paddingBox.height,width:f.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:f,scrollSize:d,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:g,diff:{value:M,displacement:M}}}})(),u=o==="vertical"?Mt:mn,p=se({page:s,withPlaceholder:null,axis:u,frame:a});return{descriptor:e,isCombineEnabled:r,isFixedOnPage:n,axis:u,isEnabled:t,client:i,page:s,frame:a,subject:p}};const Gc=(e,t)=>{const r=sn(e);if(!t||e!==t)return r;const n=r.paddingBox.top-t.scrollTop,o=r.paddingBox.left-t.scrollLeft,i=n+t.scrollHeight,s=o+t.scrollWidth,a=Ot({top:n,right:s,bottom:i,left:o},r.border);return Bt({borderBox:a,margin:r.margin,border:r.border,padding:r.padding})};var $c=({ref:e,descriptor:t,env:r,windowScroll:n,direction:o,isDropDisabled:i,isCombineEnabled:s,shouldClipSubject:l})=>{const a=r.closestScrollable,u=Gc(e,a),p=$e(u,n),c=(()=>{if(!a)return null;const f=sn(a),g={scrollHeight:a.scrollHeight,scrollWidth:a.scrollWidth};return{client:f,page:$e(f,n),scroll:Pt(a),scrollSize:g,shouldClipSubject:l}})();return Fc({descriptor:t,isEnabled:!i,isCombineEnabled:s,isFixedOnPage:r.isFixedOnPage,direction:o,client:u,page:p,closest:c})};const jc={passive:!1},Wc={passive:!0};var kr=e=>e.shouldPublishImmediately?jc:Wc;const Le=e=>e&&e.env.closestScrollable||null;function kc(e){const t=x.useRef(null),r=Ue(Je),n=Yt("droppable"),{registry:o,marshal:i}=r,s=Hn(e),l=A(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),a=x.useRef(l),u=A(()=>L((D,E)=>{t.current||y();const w={x:D,y:E};i.updateDroppableScroll(l.id,w)}),[l.id,i]),p=C(()=>{const D=t.current;return!D||!D.env.closestScrollable?M:Pt(D.env.closestScrollable)},[]),c=C(()=>{const D=p();u(D.x,D.y)},[p,u]),d=A(()=>Se(c),[c]),f=C(()=>{const D=t.current,E=Le(D);if(D&&E||y(),D.scrollOptions.shouldPublishImmediately){c();return}d()},[d,c]),g=C((D,E)=>{t.current&&y();const w=s.current,R=w.getDroppableRef();R||y();const N=_c(R),V={ref:R,descriptor:l,env:N,scrollOptions:E};t.current=V;const O=$c({ref:R,descriptor:l,env:N,windowScroll:D,direction:w.direction,isDropDisabled:w.isDropDisabled,isCombine
71Enabled:w.isCombineEnabled,shouldClipSubject:!w.ignoreContainerClipping}),T=N.closestScrollable;return T&&(T.setAttribute(_r.contextId,r.contextId),T.addEventListener("scroll",f,kr(V.scrollOptions))),O},[r.contextId,l,f,s]),b=C(()=>{const D=t.current,E=Le(D);return D&&E||y(),Pt(E)},[]),m=C(()=>{const D=t.current;D||y();const E=Le(D);t.current=null,E&&(d.cancel(),E.removeAttribute(_r.contextId),E.removeEventListener("scroll",f,kr(D.scrollOptions)))},[f,d]),S=C(D=>{const E=t.current;E||y();const w=Le(E);w||y(),w.scrollTop+=D.y,w.scrollLeft+=D.x},[]),I=A(()=>({getDimensionAndWatchScroll:g,getScrollWhileDragging:b,dragStopped:m,scroll:S}),[m,g,b,S]),h=A(()=>({uniqueId:n,descriptor:l,callbacks:I}),[I,l,n]);k(()=>(a.current=h.descriptor,o.droppable.register(h),()=>{t.current&&m(),o.droppable.unregister(h)}),[I,l,m,h,i,o.droppable]),k(()=>{t.current&&i.updateDroppableIsEnabled(a.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),k(()=>{t.current&&i.updateDroppableIsCombineEnabled(a.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function vt(){}const Vr={width:0,height:0,margin:Ki},Vc=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>e||r==="close"?Vr:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},Uc=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>{const n=Vc({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:r!=="none"?De.placeholder:null}},Hc=e=>{const t=x.useRef(null),r=C(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:n,onTransitionEnd:o,onClose:i,contextId:s}=e,[l,a]=x.useState(e.animate==="open");x.useEffect(()=>l?n!=="open"?(r(),a(!1),vt):t.current?vt:(t.current=setTimeout(()=>{t.current=null,a(!1)}),r):vt,[n,l,r]);const u=C(c=>{c.propertyName==="height"&&(o(),n==="close"&&i())},[n,i,o]),p=Uc({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return B.createElement(e.placeholder.tagName,{style:p,"data-rfd-placeholder-context-id":s,onTransitionEnd:u,ref:e.innerRef})};var qc=B.memo(Hc);class zc extends B.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,r){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:r.isVisible?{isVisible:!0,data:r.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const Yc=e=>{const t=x.useContext(Je);t||y();const{contextId:r,isMovementAllowed:n}=t,o=x.useRef(null),i=x.useRef(null),{children:s,droppableId:l,type:a,mode:u,direction:p,ignoreContainerClipping:c,isDropDisabled:d,isCombine
71Enabled:f,snapshot:g,useClone:b,updateViewportMaxScroll:m,getContainerForClone:S}=e,I=C(()=>o.current,[]),h=C((T=null)=>{o.current=T},[]);C(()=>i.current,[]);const D=C((T=null)=>{i.current=T},[]),E=C(()=>{n()&&m({maxScroll:Gn()})},[n,m]);kc({droppableId:l,type:a,mode:u,direction:p,isDropDisabled:d,isCombineEnabled:f,ignoreContainerClipping:c,getDroppableRef:I});const w=A(()=>B.createElement(zc,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:T,data:$,animate:J})=>B.createElement(qc,{placeholder:$,onClose:T,innerRef:D,animate:J,contextId:r,onTransitionEnd:E})),[r,E,e.placeholder,e.shouldAnimatePlaceholder,D]),R=A(()=>({innerRef:h,placeholder:w,droppableProps:{"data-rfd-droppable-id":l,"data-rfd-droppable-context-id":r}}),[r,l,w,h]),N=b?b.dragging.draggableId:null,V=A(()=>({droppableId:l,type:a,isUsingCloneFor:N}),[l,N,a]);function O(){if(!b)return null;const{dragging:T,render:$}=b,J=B.createElement(to,{draggableId:T.draggableId,index:T.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(Qe,K)=>$(Qe,K,T));return co.createPortal(J,S())}return B.createElement(Jt.Provider,{value:V},s(R,g),O())};function Kc(){return document.body||y(),document.body}const Ur={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Kc},io=e=>{let t={...e},r;for(r in Ur)e[r]===void 0&&(t={...t,[r]:Ur[r]});return t},yt=(e,t)=>e===t.droppable.type,Hr=(e,t)=>t.draggables[e.draggable.id],Jc=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=L(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),n=L((i,s,l,a,u,p)=>{const c=u.descriptor.id;if(u.descriptor.droppableId===i){const g=p?{render:p,dragging:r(u.descriptor)}:null,b={isDraggingOver:l,draggingOverWith:l?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!1,snapshot:b,useClone:g}}if(!s)return t;if(!a)return e;const f={isDraggingOver:l,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!0,snapshot:f,useClone:null}});return(i,s)=>{const l=io(s),a=l.droppableId,u=l.type,p=!l.isDropDisabled,c=l.renderClone;if(Pe(i)){const d=i.critical;if(!yt(u,d))return t;const f=Hr(d,i.dimensions),g=W(i.impact)===a;return n(a,p,g,g,f,c)}if(i.phase==="DROP_ANIMATING"){const d=i.completed;if(!yt(u,d.critical))return t;const f=Hr(d.critical,i.dimensions);return n(a,p,Zn(d.result)===a,W(d.impact)===a,f,c)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const d=i.completed;if(!yt(u,d.critical))return t;const f=W(d.impact)===a,g=!!(d.impact.at&&d.impact.at.type==="COMBINE"),b=d.critical.droppable.id===a;return f?g?e:t:b?e:t}return t}},Xc={updateViewportMaxScroll:ll},Qc=rn(Jc,Xc,(e,t,r)=>({...io(r),...e,...t}),{context:zt,areStatePropsEqual:Qn})(Yc);var Zc=Qc;function eu({category:e}){const t=zr(),{data:r=[],isLoading:n}=Yr({queryKey:["category-content-order",e.slug],queryFn:()=>X.entities.VideoContent.filter({status:"published"},"-created_date",500)}),o=r.filter(u=>(u.categories||[]).includes(e.slug)),[i,s]=x.useState([]);x.useEffect(()=>{const u=[...o].sort((p,c)=>{var g,b;const d=((g=p.category_sort_orders)==null?void 0:g[e.slug])??9999,f=((b=c.category_sort_orders)==null?void 0:b[e.slug])??9999;return d-f});s(u)},[r,e.slug]);const l=ve({mutationFn:async u=>{await Promise.all(u.map((p,c)=>X.entities.VideoContent.update(p.id,{category_sort_orders:{...p.category_sort_orders||{},[e.slug]:c}})))},onSuccess:()=>{t.invalidateQueries({queryKey:["category-content-order",e.slug]}),ye.success("Order saved")},onError:()=>ye.error("Failed to save order")}),a=u=>{if(!u.destination)return;const p=Array.from(i),[c]=p.splice(u.source.index,1);p.splice(u.destination.index,0,c),s(p)};return n?v.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:"Loading content..."}):i.length===0?v.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:"No published content in this category yet."}):v.jsxs("div",{className:"space-y-3",children:[v.jsx("p",{className:"text-xs text-muted-foreground",children:"Drag to reorder. Click Save Order when done."}),v.jsx(pc,{onDragEnd:a,children:v.jsx(Zc,{droppableId:"category-content",children:u=>v.jsxs("div",{ref:u.innerRef,...u.droppableProps,className:"space-y-1 max-h-72 overflow-y-auto pr-1",children:[i.map((p,c)=>v.jsx(Oc,{draggableId:p.id,index:c,children:(d,f)=>v.jsxs("div",{ref:d.innerRef,...d.draggableProps,className:`flex items-center gap-2 px-2 py-2 rounded-lg border text-sm transition-colors ${f.isDragging?"bg-secondary border-primary shadow-lg":"bg-secondary/40 border-border"}`,children:[v.jsx("div",{...d.dragHandleProps,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing",children:v.jsx(Mo,{className:"w-4 h-4"})}),p.thumbnail_url?v.jsx("img",{src:p.thumbnail_url,alt:"",className:"w-10 h-6 object-cover rounded shrink-0"}):v.jsx("div",{className:"w-10 h-6 bg-secondary rounded flex items-center justify-center shrink-0",children:v.jsx(uo,{className:"w-3 h-3 text-muted-foreground"})}),v.jsx("span",{className:"flex-1 truncate font-medium",children:p.title}),v.jsxs("span",{className:"text-[10px] text-muted-foreground shrink-0",children:["#",c+1]})]})},p.id)),u.placeholder]})})}),v.jsx(ne,{type:"button",size:"sm",disabled:l.isPending,onClick:()=>l.mutate(i),className:"w-full bg-primary hover:bg-primary/90",children:l.isPending?"Saving...":"Save Order"})]})}const tu=[{name:"Movies",slug:"movies",thumbnail_style:"poster",sort_order:1,visible:!0},{name:"Series",slug:"series",thumbnail_style:"wide",sort_order:2,visible:!0},{name:"Documentaries",slug:"documentaries",thumbnail_style:"wide",sort_order:3,visible:!0},{name:"Courses",slug:"courses",thumbnail_style:"wide",sort_order:4,visible:!0},{name:"Live",slug:"live",thumbnail_style:"wide",sort_order:5,visible:!0},{name:"Sports",slug:"sports",thumbnail_style:"wide",sort_order:6,visible:!0},{name:"Music",slug:"music",thumbnail_style:"wide",sort_order:7,visible:!0},{name:"Kids",slug:"kids",thumbnail_style:"wide",sort_order:8,visible:!0}],xt={name:"",slug:"",description:"",hero_banner_url:"",thumbnail_style:"wide",sort_order:0,visible:!0};
71function gu(){const[e,t]=x.useState(!1),[r,n]=x.useState(null),[o,i]=x.useState(xt),s=zr(),{data:l=[],isLoading:a}=Yr({queryKey:["admin-categories"],queryFn:()=>X.entities.Category.list("sort_order",100)}),u=ve({mutationFn:h=>r?X.entities.Category.update(r.id,h):X.entities.Category.create(h),onSuccess:()=>{s.invalidateQueries({queryKey:["admin-categories"]}),ye.success(r?"Category updated":"Category created"),f()}}),p=ve({mutationFn:h=>X.entities.Category.delete(h),onSuccess:()=>{s.invalidateQueries({queryKey:["admin-categories"]}),ye.success("Deleted")}}),c=ve({mutationFn:({id:h,visible:D})=>X.entities.Category.update(h,{visible:D}),onSuccess:()=>s.invalidateQueries({queryKey:["admin-categories"]})}),d=ve({mutationFn:({id:h,sort_order:D})=>X.entities.Category.update(h,{sort_order:D}),onSuccess:()=>s.invalidateQueries({queryKey:["admin-categories"]})}),f=()=>{t(!1),n(null),i(xt)},g=h=>{n(h),i({...h}),t(!0)},b=()=>{i({...xt,sort_order:l.length+1}),t(!0)},m=(h,D)=>{if(D===0)return;const E=l[D-1];d.mutate({id:h.id,sort_order:E.sort_order}),d.mutate({id:E.id,sort_order:h.sort_order})},S=(h,D)=>{if(D===l.length-1)return;const E=l[D+1];d.mutate({id:h.id,sort_order:E.sort_order}),d.mutate({id:E.id,sort_order:h.sort_order})},I=async()=>{for(const h of tu)await X.entities.Category.create(h);s.invalidateQueries({queryKey:["admin-categories"]}),ye.success("Default categories created")};return v.jsxs("div",{children:[v.jsxs("div",{className:"flex items-center justify-between mb-6",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(po,{className:"w-6 h-6 text-primary"}),v.jsx("h1",{className:"text-2xl font-display font-bold",children:"Category Manager"})]}),v.jsxs("div",{className:"flex gap-2",children:[l.length===0&&v.jsx(ne,{variant:"outline",onClick:I,children:"Seed Defaults"}),v.jsxs(ne,{className:"gap-2 bg-primary hover:bg-primary/90",onClick:b,children:[v.jsx(No,{className:"w-4 h-4"})," Add Category"]})]})]}),v.jsx(fo,{className:"bg-secondary/30",children:v.jsx(go,{className:"p-0",children:a?v.jsx("div",{className:"p-8 text-center text-muted-foreground",children:"Loading..."}):l.length===0?v.jsxs("div",{className:"p-8 text-center text-muted-foreground",children:[v.jsx("p",{children:"No categories yet."}),v.jsx("p",{className:"text-sm mt-1",children:'Click "Seed Defaults" to add the standard categories, or add your own.'})]}):v.jsx("div",{className:"divide-y divide-border",children:l.map((h,D)=>v.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[v.jsxs("div",{className:"flex flex-col gap-0.5",children:[v.jsx("button",{onClick:()=>m(h,D),disabled:D===0,className:"text-muted-foreground hover:text-foreground disabled:opacity-20 text-xs leading-none",children:"â²"}),v.jsx("button",{onClick:()=>S(h,D),disabled:D===l.length-1,className:"text-muted-foreground hover:text-foreground disabled:opacity-20 text-xs leading-none",children:"â¼"})]}),v.jsx("span",{className:"w-6 text-xs text-muted-foreground text-center",children:h.sort_order}),v.jsx("div",{className:"flex-1 min-w-0",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"font-medium",children:h.name}),v.jsx(rr,{variant:"outline",className:"text-[10px]",children:h.slug})]})}),v.jsx(rr,{variant:"secondary",className:"text-xs capitalize shrink-0",children:h.thumbnail_style==="poster"?"ð¬ Poster (2:3)":"ðº Wide (16:9)"}),v.jsx("button",{onClick:()=>c.mutate({id:h.id,visible:!h.visible}),className:`shrink-0 ${h.visible?"text-primary":"text-muted-foreground"}`,title:h.visible?"Visible":"Hidden",children:h.visible?v.jsx(Oo,{className:"w-4 h-4"}):v.jsx(Bo,{className:"w-4 h-4"})}),v.jsxs("div",{className:"flex gap-1 shrink-0",children:[v.jsx(ne,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>g(h),children:v.jsx(To,{className:"w-3.5 h-3.5"})}),v.jsx(ne,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive",onClick:()=>{confirm("Delete this category?")&&p.mutate(h.id)},children:v.jsx(mo,{className:"w-3.5 h-3.5"})})]})]},h.id))})})}),v.jsx(bo,{open:e,onOpenChange:h=>{h||f()},children:v.jsxs(ho,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[v.jsx(vo,{children:v.jsx(yo,{children:r?"Edit Category":"Add Category"})}),v.jsxs(Ao,{defaultValue:"details",children:[v.jsxs(Po,{className:"w-full mb-4",children:[v.jsx(or,{value:"details",className:"flex-1",children:"Details"}),r&&v.jsx(or,{value:"order",className:"flex-1",children:"Content Order"})]}),v.jsx(ir,{value:"details",children:v.jsxs("form",{onSubmit:h=>{h.preventDefault(),u.mutate(o)},className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx(te,{children:"Display Name *"}),v.jsx(it,{value:o.name,onChange:h=>i({...o,name:h.target.value}),placeholder:"e.g. Movies",required:!0})]}),v.jsxs("div",{children:[v.jsxs(te,{children:["Slug * ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(used for filtering, lowercase no spaces)"})]}),v.jsx(it,{value:o.slug,onChange:h=>i({...o,slug:h.target.value.toLowerCase().replace(/\s+/g,"_")}),placeholder:"e.g. movies",required:!0})]}),v.jsxs("div",{children:[v.jsx(te,{children:"Thumbnail Style"}),v.jsxs(xo,{value:o.thumbnail_style,onValueChange:h=>i({...o,thumbnail_style:h}
71),children:[v.jsx(Do,{children:v.jsx(So,{})}),v.jsxs(Io,{children:[v.jsx(nr,{value:"wide",children:"ðº Wide (16:9) â Apple TV style"}),v.jsx(nr,{value:"poster",children:"ð¬ Poster (2:3) â Movie poster style"})]})]}),v.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:o.thumbnail_style==="poster"?"Upload thumbnails at 800Ã1200px (2:3 ratio) for best results":"Upload thumbnails at 1920Ã1080px (16:9 ratio) for best results"})]}),v.jsxs("div",{children:[v.jsx(te,{children:"Sort Order"}),v.jsx(it,{type:"number",value:o.sort_order,onChange:h=>i({...o,sort_order:Number(h.target.value)})})]}),v.jsxs("div",{children:[v.jsx(te,{children:"Description (for hero panel)"}),v.jsx(wo,{value:o.description||"",onChange:h=>i({...o,description:h.target.value}),placeholder:"Brief synopsis shown on category page...",rows:3})]}),v.jsxs("div",{children:[v.jsx(te,{children:"Hero Banner Image"}),v.jsx(Eo,{label:"Hero Banner",value:o.hero_banner_url||"",onChange:h=>i({...o,hero_banner_url:h}),accept:"image/*",previewType:"image",dimensionHint:"1920Ã600px â hero banner"})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Co,{checked:!!o.visible,onCheckedChange:h=>i({...o,visible:h})}),v.jsx(te,{children:"Visible on Home Screen"})]}),v.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[v.jsx(ne,{type:"button",variant:"outline",onClick:f,children:"Cancel"}),v.jsx(ne,{type:"submit",disabled:u.isPending,children:u.isPending?"Saving...":"Save"})]})]})}),r&&v.jsx(ir,{value:"order",children:v.jsx(eu,{category:r})})]})]})})]})}export{gu as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.