reactdesk-core
Version:
A powerful React-based desktop environment library for creating Windows 11-like desktop interfaces with window management, taskbar, themes, and more
296 lines • 209 kB
JavaScript
"use strict";const e=require("react/jsx-runtime"),t=require("react"),n=require("styled-components"),r=require("react-dom");function o(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const i=o(t),a=(n,r)=>{const o=t.createContext(Object.create(null));return{Context:o,Provider:t.memo(({children:t,...i})=>e.jsxs(o.Provider,{value:n(i),children:[t,r]})),useContext:()=>t.useContext(o)}};var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function u(e,t){for(var n,r="",o=0,i=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=s,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var d={resolve:function(){for(var e,t="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var o;r>=0?o=arguments[r]:(void 0===e&&(e=process.cwd()),o=e),l(o),0!==o.length&&(t=o+"/"+t,n=47===o.charCodeAt(0))}return t=u(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(l(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=u(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return l(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];l(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":d.normalize(e)},relative:function(e,t){if(l(e),l(t),e===t)return"";if((e=d.resolve(e))===(t=d.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var r=e.length,o=r-n,i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var a=t.length-i,s=o<a?o:a,c=-1,u=0;u<=s;++u){if(u===s){if(a>s){if(47===t.charCodeAt(i+u))return t.slice(i+u+1);if(0===u)return t.slice(i+u)}else o>s&&(47===e.charCodeAt(n+u)?c=u:0===u&&(c=0));break}var p=e.charCodeAt(n+u);if(p!==t.charCodeAt(i+u))break;47===p&&(c=u)}var f="";for(u=n+c+1;u<=r;++u)u!==r&&47!==e.charCodeAt(u)||(0===f.length?f+="..":f+="/..");return f.length>0?f+t.slice(i+c):(i+=c,47===t.charCodeAt(i)&&++i,t.slice(i))},_makeLong:function(e){return e},dirname:function(e){if(l(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');l(e);var n,r=0,o=-1,i=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!i){r=n+1;break}}else-1===s&&(i=!1,s=n+1),a>=0&&(c===t.charCodeAt(a)?-1===--a&&(o=n):(a=-1,o=s))}return r===o?o=s:-1===o&&(o=e.length),e.slice(r,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!i){r=n+1;break}}else-1===o&&(i=!1,o=n+1);return-1===o?"":e.slice(r,o)},extname:function(e){l(e);for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(o=!1,r=a+1),46===s?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}("/",e)},parse:function(e){l(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),o=47===r;o?(t.root="/",n=1):n=0;for(var i=-1,a=0,s=-1,c=!0,u=e.length-1,d=0;u>=n;--u)if(47!==(r=e.charCodeAt(u)))-1===s&&(c=!1,s=u+1),46===r?-1===i?i=u:1!==d&&(d=1):-1!==i&&(d=-1);else if(!c){a=u+1;break}return-1===i||-1===s||0===d||1===d&&i===s-1&&i===a+1?-1!==s&&(t.base=t.name=0===a&&o?e.slice(1,s):e.slice(a,s)):(0===a&&o?(t.name=e.slice(1,i),t.base=e.slice(1,s)):(t.name=e.slice(a,i),t.base=e.slice(a,s)),t.ext=e.slice(i,s)),a>0?t.dir=e.slice(0,a-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};d.posix=d;var p=d;const f="win11",g={tabIndex:-1},m={as:"div",role:"button",...g},h=new Set([".heic",".heics",".heif",".heifs",".avci",".avcs"]),b=new Set([".cr2",".dng",".nef",".tif",".tiff"]),v={separator:!0},y=1e3,E={once:!0,passive:!0},x={preventScroll:!0},w={DOUBLE_CLICK:500,LONG_PRESS:500,MOUSE_IN_OUT:300,TASKBAR_ITEM:400,WINDOW:200},D={TASKBAR_ITEM:w.TASKBAR_ITEM/y,WINDOW:w.WINDOW/y},I="/System/Icons",S="/Users/Public/Icons",N=`${S}/Cache`,C={64:96},O={desktop:[16,32],document:[16,32],folder:[16,16],mounted:[16,16],music:[16,32],pc:[16,16],pictures:[16,32],user:[16,16],videos:[16,32]},A=[3,2,1],_=[16,32,48,96,144];let P;let L=[];const R=(e,t,n,r)=>{const o=p.basename(e,".webp"),[i,a]=O[o]||[],s=t*n,c=Math.min(144,i===t?Math.min(a,s):s);return`${p.join(p.dirname(e),`${C[c]||c}x${C[c]||c}`,`${o}${r}`).replace(/\\/g,"/")}${n>1?` ${n}x`:""}`},B=(e,t,n,r=[])=>{const o=[R(e,t,1,n),R(e,t,2,n),R(e,t,3,n)].filter(e=>0===r.length||r.includes(e.split(" ")[0])).join(", ");return(null==r?void 0:r.includes(o))?"":o},T=(e,t)=>{const n=new Set(new Set(t.map(t=>{const n=p.basename(e,p.extname(e));return Number(t.replace(`${I}/`,"").replace(`${S}/`,"").replace(`/${n}.png`,"").replace(`/${n}.webp`,"").split("x")[0])})));return _.filter(e=>!n.has(e)).map(t=>R(e,t,1,p.extname(e))).reverse().join(", ")},M=(e=0)=>"number"==typeof e?e:Number.parseFloat(e),k=()=>window.innerHeight,j=()=>window.innerWidth,$=e=>({width:e.clientWidth,height:e.clientHeight});let V;let F;const z=()=>"undefined"!=typeof window&&(F||(F=/^(?:(?!chrome|android).)*safari/i.test(window.navigator.userAgent),F)),G=e=>{try{e.cancelable&&(e.preventDefault(),e.stopPropagation())}catch{}},W=e=>({"aria-label":e,title:e});function U(){return Math.floor(Date.now()*Math.random())}const H=e=>"string"==typeof e&&(e.startsWith(I)||e.startsWith(S)&&!e.startsWith(N)),J=["MetaLeft","MetaRight","Escape"],X=async()=>{const e=document;try{e.exitFullscreen?await e.exitFullscreen():e.mozCancelFullScreen?await e.mozCancelFullScreen():e.webkitExitFullscreen&&await e.webkitExitFullscreen()}catch{}},{Provider:Y,useContext:Q}=a(()=>{const[e,n]=t.useState(null);return t.useEffect(()=>{const e=()=>{const{mozFullScreenElement:e,webkitFullscreenElement:t}=document,r=document.fullscreenElement||e||t;(async e=>{var t,n,r,o;try{e===document.documentElement?await(null==(n=null==(t=null==navigator?void 0:navigator.keyboard)?void 0:t.lock)?void 0:n.call(t,J)):null==(o=null==(r=null==navigator?void 0:navigator.keyboard)?void 0:r.unlock)||o.call(r)}catch{}})(r).then(()=>n(r))};return document.addEventListener("fullscreenchange",e,{passive:!0}),()=>document.removeEventListener("fullscreenchange",e)},[]),{fullscreenElement:e,toggleFullscreen:async(t,n)=>{!e||t&&t!==e?(e&&("undefined"!=typeof window&&(V||(V=/firefox/i.test(window.navigator.userAgent),V))||z())&&await X(),await(async(e,t)=>{try{e.requestFullscreen?await e.requestFullscreen(t):e.mozRequestFullScreen?await e.mozRequestFullScreen(t):e.webkitRequestFullscreen&&await e.webkitRequestFullscreen(t)}catch{}})(t||document.documentElement,{navigationUI:n||"hide"})):await X()}}});let q;const K=new Uint8Array(16);function Z(){if(!q&&(q="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!q))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return q(K)}const ee=[];for(let Cu=0;Cu<256;++Cu)ee.push((Cu+256).toString(16).slice(1));const te={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ne(e,t,n){if(te.randomUUID&&!t&&!e)return te.randomUUID();const r=(e=e||{}).random||(e.rng||Z)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return ee[e[t+0]]+ee[e[t+1]]+ee[e[t+2]]+ee[e[t+3]]+"-"+ee[e[t+4]]+ee[e[t+5]]+"-"+ee[e[t+6]]+ee[e[t+7]]+"-"+ee[e[t+8]]+ee[e[t+9]]+"-"+ee[e[t+10]]+ee[e[t+11]]+ee[e[t+12]]+ee[e[t+13]]+ee[e[t+14]]+ee[e[t+15]]}(r)}const re=()=>{const e={},t={},n=[],r={},o={},i=e=>{o[e]&&clearTimeout(o[e]),o[e]=setTimeout(()=>{delete r[e],delete o[e]},5e3)},a=t=>{const n=e[t];n&&(r[t].forEach(e=>{Object.keys(n).forEach(t=>{const{once:r,func:o}=n[t];o(...e),r&&delete n[t]})}),delete r[t])},s={emit(o,...i){(Array.isArray(o)?o:[o]).forEach(o=>{n.length>0&&n.forEach(e=>e(o,...i));const a=e[o],s=Object.keys(t).filter(e=>t[e].regex.test(o));a||s.length>0?(a&&Object.keys(a).forEach(e=>{const{once:t,func:n}=a[e];n(...i),t&&delete a[e]}),s.forEach(e=>{Object.keys(t[e].ids).forEach(n=>{const{once:r,func:o}=t[e].ids[n];o(...i),r&&delete t[e].ids[n]})})):(r[o]||(r[o]=[]),r[o].push(i))})},on(n,o){const a=ne(),s={func:o};if(n.includes("*")){const e=new RegExp("^"+n.replace("*",".*")+"$");t[n]||(t[n]={regex:e,ids:{}}),t[n].ids[a]=s}else e[n]||(e[n]={}),e[n][a]=s;if(r[n]){const e=[...r[n]];delete r[n],e.forEach(e=>o(...e)),i(n)}return a},once(n,o){const a=ne(),s={once:!0,func:o};if(n.includes("*")){const e=new RegExp("^"+n.replace("*",".*")+"$");t[n]||(t[n]={regex:e,ids:{}}),t[n].ids[a]=s}else e[n]||(e[n]={}),e[n][a]=s;if(r[n]){const e=[...r[n]];delete r[n],e.forEach(e=>o(...e)),i(n)}return a},off(n,r){if(n.includes("*")){const e=t[n];if(!e)return!1;Object.keys(e.ids).forEach(t=>{e.ids[t].func===r&&delete e.ids[t]})}else{const t=e[n];if(!t)return!1;Object.keys(t).forEach(e=>{t[e].func===r&&delete t[e]})}return!0},removeListenerByID:n=>(Object.keys(e).forEach(e=>s.removeListenerByEventAndID(e,n)),Object.keys(t).forEach(e=>{s.removeListenerByEventAndID(e,n)}),!0),removeListenerByEventAndID(n,r){if(n.includes("*")){const e=t[n];if(!e)return!0;delete e.ids[r]}else{const t=e[n];if(!t)return!0;delete t[r]}return!0},onEmit(e){n.push(e)},addToQueueWithTimeout:(e,t,...n)=>{r[e]||(r[e]=[]),r[e].push(n),setTimeout(()=>{a(e)},t)},handleTimeout:a};return{...s,eventsCache:e,patternCache:t,eventQueue:r}},{Provider:oe,useContext:ie}=a(()=>{const e=t.useRef(re()),n=t.useRef(re());return{events:e.current,actions:n.current}}),{Provider:ae,useContext:se}=a(()=>{const[e,n]=t.useState(Object.create(null)),[r,o]=t.useState(Object.create(null)),i=t.useRef(Object.create(null)),{events:a}=ie(),s=t.useRef(Object.create(null)),c=t.useCallback((e,t)=>{var r;const c=s.current;c[e]&&(null==(r=c[e])||r.unobserve(t));const l=new ResizeObserver(()=>{const n=$(t);i.current[e+"Size"]=n,o(t=>({...t,[e+"Size"]:n})),a.emit("event:elements/resize/windowsview",n)});l.observe(t);const u=$(t);i.current[e+"Size"]=u,o(t=>({...t,[e+"Size"]:u})),s.current={...c,[e]:l},n(n=>({...n,[e]:t}))},[a]),l=t.useCallback(e=>i.current[e+"Size"],[]);return{...e,...r,linkElement:c,elementsSizesRef:i,getLatestSize:l}}),ce=t.memo(({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.047 30.547L22.578 16 8.047 1.453 9.453.047 25.422 16 9.453 31.953l-1.406-1.406z"})})),le=t.memo(({className:t})=>{const{colors:r}=n.useTheme();return e.jsx("svg",{className:t,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M28.703 8.703l-16.703 16.719-8.703-8.719 1.406-1.406 7.297 7.281 15.297-15.281z",stroke:r.text,strokeWidth:"2"})})}),ue=t.memo(({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M16 10q1.234 0 2.328.469t1.914 1.289 1.289 1.914T22 16q0 1.25-.469 2.336t-1.289 1.906-1.914 1.289T16 22q-1.25 0-2.336-.469t-1.906-1.289-1.289-1.906T10 16q0-1.234.469-2.328t1.289-1.914 1.906-1.289T16 10z"})}));t.memo(()=>e.jsx("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M22 24l2-2v6h-24v-20h2v18h20v-2zM20 16q-2 0-3.914 0.398t-3.695 1.172-3.398 1.891-2.992 2.539v-2q0-1.938 0.5-3.727t1.414-3.344 2.188-2.828 2.828-2.188 3.344-1.414 3.727-0.5v-6l11 11-11 11v-6zM21.578 8q-0.875 0-1.641 0.016t-1.516 0.102-1.5 0.281-1.594 0.539q-1.359 0.563-2.523 1.438t-2.078 1.992-1.547 2.422-0.93 2.742q2.625-1.75 5.609-2.641t6.141-0.891h2v3.172l6.172-6.172-6.172-6.172v3.172h-0.422z"})}));const de=n.css`
border: 0px;
box-sizing: border-box;
font-variant-numeric: tabular-nums;
margin: 0px;
outline: 0px;
padding: 0px;
text-rendering: optimizelegibility;
`,pe=e=>{e.target instanceof HTMLTextAreaElement||e.preventDefault()},fe=n.button.attrs(({as:e})=>({onKeyDown:pe,type:e&&"button"!==e?void 0:"button"}))`
${de}
background-color: transparent;
font-family: inherit;
max-width: ${({$short:e})=>e?"31px":void 0};
width: 100%;
`,ge=n.img.attrs(({$eager:e=!1,$height:t,$width:n})=>({decoding:"async",draggable:!1,fetchpriority:e?"high":void 0,height:t,loading:e?"eager":"lazy",width:n}))`
${de}
aspect-ratio: 1;
user-select: none;
left: ${({$offset:e})=>e||void 0};
max-height: ${({$height:e})=>e}px;
max-width: ${({$width:e})=>e}px;
min-height: ${({$height:e})=>e}px;
min-width: ${({$width:e})=>e}px;
object-fit: contain;
opacity: ${({$moving:e})=>e?"50%":"100%"};
pointer-events: none;
top: ${({$offset:e})=>e||void 0};
visibility: ${({$loaded:e})=>e?"visible":"hidden"};
`,me=t.forwardRef((n,r)=>{const[o,i]=t.useState(!1),{displaySize:a=0,imgSize:s=0,src:c="",...l}=n,u=H(c),d=t.useMemo(()=>{const e=a>s?s:a||s;return{$height:e,$offset:a>s?a-s+"px":0,$width:e}},[a,s]),[p,f]=t.useState([]);t.useEffect(()=>()=>{var e;o&&c.startsWith("blob:")&&(e=c,URL.revokeObjectURL(e))},[o,c]);const g=e.jsx(ge,{ref:r,$loaded:o,onError:({target:e})=>{const{currentSrc:t=""}=e||{};try{const{pathname:e}=new URL(t);e&&!p.includes(e)&&f(t=>[...t,e])}catch{}},onLoad:()=>i(!0),src:u?R(c,s,1,".png"):c||void 0,srcSet:u?B(c,s,".png",p)||(0===p.length?"":T(c,p)):void 0,...l,...d});return e.jsxs("picture",{children:[u&&A.map(t=>{const n=R(c,s,t,".webp"),r=t-.99;return p.length>0&&p.includes(n.split(" ")[0])?null:e.jsx("source",{media:t>1?`(min-resolution: ${r}x), (-webkit-min-device-pixel-ratio: ${r})`:void 0,srcSet:n,type:"image/webp"},t)}),g]})}),he=t.memo(me),be=({action:r,checked:o,disabled:i,icon:a,isSubMenu:s,label:c,menu:l,primary:u,resetMenu:d,separator:p,SvgIcon:f,toggle:h,tooltip:b})=>{const v=t.useRef(null),[y,E]=t.useState(pn),[D,I]=t.useState(!1),{sizes:S}=n.useTheme(),N=t.useRef(0),[C,O]=t.useState(!1),A=t.useMemo(()=>window.matchMedia("(hover: hover)").matches,[]),_=t.useCallback(e=>{N.current&&(window.clearTimeout(N.current),N.current=0),N.current=window.setTimeout(()=>I(e),w.MOUSE_IN_OUT)},[]),P=({relatedTarget:e,type:t})=>{var n;e instanceof HTMLElement&&(null==(n=v.current)?void 0:n.contains(e))||(O(!1),"mouseleave"===t?_(!1):I(!1))},L=l?{onBlur:P,onMouseEnter:()=>{O(!0),l&&_(!0)},onMouseLeave:P}:{},R=t.useCallback(e=>{G(e),l?I(!0):(null==r||r(),d())},[r,l,d]);return t.useEffect(()=>{const e=v.current,t=!s&&l&&!D,n=n=>{t&&(G(n),null==e||e.focus(x)),l&&I(!0)};return null==e||e.addEventListener("touchstart",n,{passive:!t}),()=>null==e?void 0:e.removeEventListener("touchstart",n)},[s,l,D]),t.useLayoutEffect(()=>{if(l&&v.current){const{height:e,width:t}=v.current.getBoundingClientRect();E({x:t-S.contextMenu.subMenuOffset,y:0-e-S.contextMenu.subMenuOffset})}},[l,S.contextMenu.subMenuOffset]),e.jsxs("li",{ref:v,className:i?"disabled":void 0,title:b,...g,...l&&L,children:[p?e.jsx("hr",{}):e.jsxs(fe,{"aria-label":c,className:!D||A&&!C?void 0:"active",onMouseUp:R,...m,children:[a&&(new RegExp("\\p{Emoji_Presentation}","u").test(a)?e.jsx("span",{children:a}):e.jsx(he,{alt:c,imgSize:16,src:a})),o&&e.jsx(le,{className:"left"}),h&&e.jsx(ue,{className:"left"}),f&&e.jsx("div",{className:"icon",children:e.jsx(f,{})}),e.jsx("figcaption",{className:u?"primary":void 0,children:c}),l&&e.jsx(ce,{className:"right"})]}),D&&l&&e.jsx(fn,{subMenu:{items:l,...y}})]})},ve=t.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ye=t.createContext({}),Ee=t.createContext(null),xe="undefined"!=typeof document,we=xe?t.useLayoutEffect:t.useEffect,De=t.createContext({strict:!1}),Ie=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Se="data-"+Ie("framerAppearId");function Ne(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Ce(e){return"string"==typeof e||Array.isArray(e)}function Oe(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const Ae=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_e=["initial",...Ae];function Pe(e){return Oe(e.animate)||_e.some(t=>Ce(e[t]))}function Le(e){return Boolean(Pe(e)||e.variants)}function Re(e){const{initial:n,animate:r}=function(e,t){if(Pe(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Ce(t)?t:void 0,animate:Ce(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,t.useContext(ye));return t.useMemo(()=>({initial:n,animate:r}),[Be(n),Be(r)])}function Be(e){return Array.isArray(e)?e.join(" "):e}const Te={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Me={};for(const Cu in Te)Me[Cu]={isEnabled:e=>Te[Cu].some(t=>!!e[t])};function ke(e){for(const t in e)Me[t]={...Me[t],...e[t]}}const je=t.createContext({}),$e=t.createContext({}),Ve=Symbol.for("motionComponentSymbol");function Fe({preloadedFeatures:e,createVisualElement:n,useRender:r,useVisualState:o,Component:a}){e&&ke(e);const s=t.forwardRef(function(s,c){let l;const u={...t.useContext(ve),...s,layoutId:ze(s)},{isStatic:d}=u,p=Re(s),f=o(s,d);if(!d&&xe){p.visualElement=function(e,n,r,o){const{visualElement:i}=t.useContext(ye),a=t.useContext(De),s=t.useContext(Ee),c=t.useContext(ve).reducedMotion,l=t.useRef();o=o||a.renderer,!l.current&&o&&(l.current=o(e,{visualState:n,parent:i,props:r,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:c}));const u=l.current;t.useInsertionEffect(()=>{u&&u.update(r,s)});const d=t.useRef(Boolean(r[Se]&&!window.HandoffComplete));return we(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),t.useEffect(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,window.HandoffComplete=!0))}),u}(a,f,u,n);const r=t.useContext($e),o=t.useContext(De).strict;p.visualElement&&(l=p.visualElement.loadFeatures(u,o,e,r))}return i.createElement(ye.Provider,{value:p},l&&p.visualElement?i.createElement(l,{visualElement:p.visualElement,...u}):null,r(a,s,function(e,n,r){return t.useCallback(t=>{t&&e.mount&&e.mount(t),n&&(t?n.mount(t):n.unmount()),r&&("function"==typeof r?r(t):Ne(r)&&(r.current=t))},[n])}(f,p.visualElement,c),f,d,p.visualElement))});return s[Ve]=a,s}function ze({layoutId:e}){const n=t.useContext(je).id;return n&&void 0!==e?n+"-"+e:e}const Ge=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function We(e){return"string"==typeof e&&!e.includes("-")&&!!(Ge.indexOf(e)>-1||/[A-Z]/.test(e))}const Ue={},He=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Je=new Set(He);function Xe(e,{layout:t,layoutId:n}){return Je.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Ue[e]||"opacity"===e)}const Ye=e=>Boolean(e&&e.getVelocity),Qe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qe=He.length;const Ke=e=>t=>"string"==typeof t&&t.startsWith(e),Ze=Ke("--"),et=Ke("var(--"),tt=(e,t)=>t&&"number"==typeof e?t.transform(e):e,nt=(e,t,n)=>Math.min(Math.max(n,e),t),rt={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},ot={...rt,transform:e=>nt(0,1,e)},it={...rt,default:1};function at(e){return"string"==typeof e}const st=e=>({test:t=>at(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),ct=st("deg"),lt=st("%"),ut=st("px"),dt=st("vh"),pt=st("vw"),ft={...lt,parse:e=>lt.parse(e)/100,transform:e=>lt.transform(100*e)},gt={...rt,transform:Math.round},mt={borderWidth:ut,borderTopWidth:ut,borderRightWidth:ut,borderBottomWidth:ut,borderLeftWidth:ut,borderRadius:ut,radius:ut,borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomRightRadius:ut,borderBottomLeftRadius:ut,width:ut,maxWidth:ut,height:ut,maxHeight:ut,size:ut,top:ut,right:ut,bottom:ut,left:ut,padding:ut,paddingTop:ut,paddingRight:ut,paddingBottom:ut,paddingLeft:ut,margin:ut,marginTop:ut,marginRight:ut,marginBottom:ut,marginLeft:ut,rotate:ct,rotateX:ct,rotateY:ct,rotateZ:ct,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:ct,skewX:ct,skewY:ct,distance:ut,translateX:ut,translateY:ut,translateZ:ut,x:ut,y:ut,z:ut,perspective:ut,transformPerspective:ut,opacity:ot,originX:ft,originY:ft,originZ:ut,zIndex:gt,fillOpacity:ot,strokeOpacity:ot,numOctaves:gt};function ht(e,t,n,r){const{style:o,vars:i,transform:a,transformOrigin:s}=e;let c=!1,l=!1,u=!0;for(const d in t){const e=t[d];if(Ze(d)){i[d]=e;continue}const n=mt[d],r=tt(e,n);if(Je.has(d)){if(c=!0,a[d]=r,!u)continue;e!==(n.default||0)&&(u=!1)}else d.startsWith("origin")?(l=!0,s[d]=r):o[d]=r}if(t.transform||(c||r?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let a=0;a<qe;a++){const t=He[a];void 0!==e[t]&&(i+=`${Qe[t]||t}(${e[t]}) `)}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}(e.transform,n,u,r):o.transform&&(o.transform="none")),l){const{originX:e="50%",originY:t="50%",originZ:n=0}=s;o.transformOrigin=`${e} ${t} ${n}`}}const bt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vt(e,t,n){for(const r in t)Ye(t[r])||Xe(r,n)||(e[r]=t[r])}function yt(e,n,r){const o={};return vt(o,e.style||{},e),Object.assign(o,function({transformTemplate:e},n,r){return t.useMemo(()=>{const t={style:{},transform:{},transformOrigin:{},vars:{}};return ht(t,n,{enableHardwareAcceleration:!r},e),Object.assign({},t.vars,t.style)},[n])}(e,n,r)),e.transformValues?e.transformValues(o):o}function Et(e,t,n){const r={},o=yt(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const xt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function wt(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||xt.has(e)}let Dt=e=>!wt(e);try{(It=require("@emotion/is-prop-valid").default)&&(Dt=e=>e.startsWith("on")?!wt(e):It(e))}catch(Nu){}var It;function St(e,t,n){return"string"==typeof e?e:ut.transform(t+n*e)}const Nt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ct={offset:"strokeDashoffset",array:"strokeDasharray"};function Ot(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:c=0,...l},u,d,p){if(ht(e,l,u,p),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:g,dimensions:m}=e;f.transform&&(m&&(g.transform=f.transform),delete f.transform),m&&(void 0!==o||void 0!==i||g.transform)&&(g.transformOrigin=function(e,t,n){return`${St(t,e.x,e.width)} ${St(n,e.y,e.height)}`}(m,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==r&&(f.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Nt:Ct;e[i.offset]=ut.transform(-r);const a=ut.transform(t),s=ut.transform(n);e[i.array]=`${a} ${s}`}(f,a,s,c,!1)}const At=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),_t=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Pt(e,n,r,o){const i=t.useMemo(()=>{const t={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ot(t,n,{enableHardwareAcceleration:!1},_t(o),e.transformTemplate),{...t.attrs,style:{...t.style}}},[n]);if(e.style){const t={};vt(t,e.style,e),i.style={...t,...i.style}}return i}function Lt(e=!1){return(n,r,o,{latestValues:i},a)=>{const s=(We(n)?Pt:Et)(r,i,a,n),c=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Dt(o)||!0===n&&wt(o)||!t&&!wt(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof n,e),l={...c,...s,ref:o},{children:u}=r,d=t.useMemo(()=>Ye(u)?u.get():u,[u]);return t.createElement(n,{...l,children:d})}}function Rt(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Bt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Tt(e,t,n,r){Rt(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Bt.has(o)?o:Ie(o),t.attrs[o])}function Mt(e,t){const{style:n}=e,r={};for(const o in n)(Ye(n[o])||t.style&&Ye(t.style[o])||Xe(o,e))&&(r[o]=n[o]);return r}function kt(e,t){const n=Mt(e,t);for(const r in e)if(Ye(e[r])||Ye(t[r])){n[-1!==He.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return n}function jt(e,t,n,r={},o={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}function $t(e){const n=t.useRef(null);return null===n.current&&(n.current=e()),n.current}const Vt=e=>Array.isArray(e);function Ft(e){const t=Ye(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const zt=e=>(n,r)=>{const o=t.useContext(ye),i=t.useContext(Ee),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:Gt(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,n,o,i);return r?a():$t(a)};function Gt(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Ft(i[p]);let{initial:a,animate:s}=e;const c=Pe(e),l=Le(e);t&&l&&!c&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!Oe(d)){(Array.isArray(d)?d:[d]).forEach(t=>{const n=jt(e,t);if(!n)return;const{transitionEnd:r,transition:i,...a}=n;for(const e in a){let t=a[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]})}return o}const Wt=e=>e;class Ut{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);-1!==t&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}const Ht=["prepare","read","update","preRender","render","postRender"];const{schedule:Jt,cancel:Xt,state:Yt,steps:Qt}=function(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=Ht.reduce((e,t)=>(e[t]=function(e){let t=new Ut,n=new Ut,r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const c=s&&o,l=c?t:n;return i&&a.add(e),l.add(e)&&c&&o&&(r=t.order.length),e},cancel:e=>{n.remove(e),a.delete(e)},process:c=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let n=0;n<r;n++){const r=t.order[n];r(c),a.has(r)&&(s.schedule(r),e())}o=!1,i&&(i=!1,s.process(c))}}};return s}(()=>n=!0),e),{}),a=e=>i[e].process(o),s=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,Ht.forEach(a),o.isProcessing=!1,n&&t&&(r=!1,e(s))};return{schedule:Ht.reduce((t,a)=>{const c=i[a];return t[a]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(s)),c.schedule(t,i,a)),t},{}),cancel:e=>Ht.forEach(t=>i[t].cancel(e)),state:o,steps:i}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Wt,!0),qt={useVisualState:zt({scrapeMotionValuesFromProps:kt,createRenderState:At,onMount:(e,t,{renderState:n,latestValues:r})=>{Jt.read(()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}}),Jt.render(()=>{Ot(n,r,{enableHardwareAcceleration:!1},_t(t.tagName),e.transformTemplate),Tt(t,n)})}})},Kt={useVisualState:zt({scrapeMotionValuesFromProps:Mt,createRenderState:bt})};exports.warning=Wt,exports.invariant=Wt,"production"!==process.env.NODE_ENV&&(exports.warning=(e,t)=>{e||"undefined"==typeof console||console.warn(t)},exports.invariant=(e,t)=>{if(!e)throw new Error(t)});const Zt=function(e){function t(t,n={}){return Fe(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}(function(e,{forwardMotionProps:t=!1},n,r){return{...We(e)?qt:Kt,preloadedFeatures:n,useRender:Lt(t),createVisualElement:r,Component:e}});function en(){const e=t.useRef(!1);return we(()=>(e.current=!0,()=>{e.current=!1}),[]),e}class tn extends i.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function nn({children:e,isPresent:n}){const r=t.useId(),o=t.useRef(null),a=t.useRef({width:0,height:0,top:0,left:0});return t.useInsertionEffect(()=>{const{width:e,height:t,top:i,left:s}=a.current;if(n||!o.current||!e||!t)return;o.current.dataset.motionPopId=r;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${r}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n top: ${i}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(c)}},[n]),i.createElement(tn,{isPresent:n,childRef:o,sizeRef:a},i.cloneElement(e,{ref:o}))}const rn=({children:e,initial:n,isPresent:r,onExitComplete:o,custom:a,presenceAffectsLayout:s,mode:c})=>{const l=$t(on),u=t.useId(),d=t.useMemo(()=>({id:u,initial:n,isPresent:r,custom:a,onExitComplete:e=>{l.set(e,!0);for(const t of l.values())if(!t)return;o&&o()},register:e=>(l.set(e,!1),()=>l.delete(e))}),s?void 0:[r]);return t.useMemo(()=>{l.forEach((e,t)=>l.set(t,!1))},[r]),i.useEffect(()=>{!r&&!l.size&&o&&o()},[r]),"popLayout"===c&&(e=i.createElement(nn,{isPresent:r},e)),i.createElement(Ee.Provider,{value:d},e)};function on(){return new Map}const an=e=>e.key||"";const sn=({children:e,custom:n,initial:r=!0,onExitComplete:o,exitBeforeEnter:a,presenceAffectsLayout:s=!0,mode:c="sync"})=>{exports.invariant(!a,"Replace exitBeforeEnter with mode='wait'");const l=t.useContext(je).forceRender||function(){const e=en(),[n,r]=t.useState(0),o=t.useCallback(()=>{e.current&&r(n+1)},[n]);return[t.useCallback(()=>Jt.postRender(o),[o]),n]}()[0],u=en(),d=function(e){const n=[];return t.Children.forEach(e,e=>{t.isValidElement(e)&&n.push(e)}),n}(e);let p=d;const f=t.useRef(new Map).current,g=t.useRef(p),m=t.useRef(new Map).current,h=t.useRef(!0);var b;if(we(()=>{h.current=!1,function(e,t){e.forEach(e=>{const n=an(e);t.set(n,e)})}(d,m),g.current=p}),b=()=>{h.current=!0,m.clear(),f.clear()},t.useEffect(()=>()=>b(),[]),h.current)return i.createElement(i.Fragment,null,p.map(e=>i.createElement(rn,{key:an(e),isPresent:!0,initial:!!r&&void 0,presenceAffectsLayout:s,mode:c},e)));p=[...p];const v=g.current.map(an),y=d.map(an),E=v.length;for(let t=0;t<E;t++){const e=v[t];-1!==y.indexOf(e)||f.has(e)||f.set(e,void 0)}return"wait"===c&&f.size&&(p=[]),f.forEach((e,t)=>{if(-1!==y.indexOf(t))return;const r=m.get(t);if(!r)return;const a=v.indexOf(t);let h=e;if(!h){const e=()=>{f.delete(t);const e=Array.from(m.keys()).filter(e=>!y.includes(e));if(e.forEach(e=>m.delete(e)),g.current=d.filter(n=>{const r=an(n);return r===t||e.includes(r)}),!f.size){if(!1===u.current)return;l(),o&&o()}};h=i.createElement(rn,{key:an(r),isPresent:!1,onExitComplete:e,custom:n,presenceAffectsLayout:s,mode:c},r),f.set(t,h)}p.splice(a,0,h)}),p=p.map(e=>{const t=e.key;return f.has(t)?e:i.createElement(rn,{key:an(e),isPresent:!0,presenceAffectsLayout:s,mode:c},e)}),"production"!==process.env.NODE_ENV&&"wait"===c&&p.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.'),i.createElement(i.Fragment,null,f.size?p:p.map(e=>t.cloneElement(e)))};function cn({children:e,features:n,strict:r=!1}){const[,o]=t.useState(!ln(n)),a=t.useRef(void 0);if(!ln(n)){const{renderer:e,...t}=n;a.current=e,ke(t)}return t.useEffect(()=>{ln(n)&&n().then(({renderer:e,...t})=>{ke(t),a.current=e,o(!0)})},[]),i.createElement(De.Provider,{value:{renderer:a.current,strict:r}},e)}function ln(e){return"function"==typeof e}const un=n(Zt.nav).attrs(({$x:e,$y:t})=>({style:{transform:`translate(${e}px, ${t}px)`}}))`
${de}
background-color: rgb(43, 43, 43);
border: 1px solid rgb(160, 160, 160);
box-shadow:
1px 1px 1px hsla(0, 0%, 20%, 70%),
2px 2px 2px hsla(0, 0%, 10%, 70%);
color: rgb(255, 255, 255);
contain: layout;
font-size: 12px;
max-height: fit-content;
max-width: fit-content;
padding: 4px 2px;
position: fixed;
width: max-content;
z-index: ${({$isSubMenu:e})=>1e4+(e?1:0)};
ol {
list-style: none; /* Remove list style */
cursor: pointer;
padding: 0;
margin: 0;
li.disabled {
color: rgb(110, 110, 110);
pointer-events: none;
}
hr {
background-color: rgb(128, 128, 128);
height: 1px;
margin: 3px 8px;
}
li > div {
display: flex;
padding: 3px 0;
&:hover,
&.active {
background-color: rgb(65, 65, 65);
}
figcaption {
display: flex;
height: 16px;
line-height: 16px;
margin-left: 32px;
margin-right: 64px;
place-items: center;
position: relative;
top: -1px;
white-space: nowrap;
width: max-content;
&.primary {
font-weight: 700;
}
}
picture {
margin: 0 -24px 0 8px;
}
span {
margin: -1px -24px 0 8px;
}
svg {
fill: #fff;
height: 13px;
margin-top: 1px;
position: absolute;
width: 13px;
&.left {
left: 8px;
}
&.right {
right: 8px;
}
}
.icon > svg {
height: 15px;
left: 10px;
width: 15px;
}
}
}
`,dn={animate:{opacity:1},initial:{opacity:0},transition:{duration:D.WINDOW}},pn=()=>({x:0,y:0}),fn=({subMenu:n})=>{const{menu:r={},setMenu:o}=mn(),{items:i,staticX:a=0,staticY:s=0,x:c=0,y:l=0}=n||r||{},[u,d]=t.useState(pn()),p=t.useRef(null),{WindowsViewArea:f,WindowsViewAreaSize:m}=se(),h=t.useCallback(({relatedTarget:e}={})=>{var t;e instanceof HTMLElement&&(null==(t=p.current)?void 0:t.contains(e))||o(Object.create(null))},[o]),b=Boolean(n),v=t.useRef({}),y=t.useCallback(()=>{var e;if(!p.current||v.current.x===c&&v.current.y===l)return;v.current={x:c,y:l};let{height:t=0,width:r=0,x:o=0,y:i=0}=(null==(e=p.current)?void 0:e.getBoundingClientRect())||{},{height:u,width:g}=f?$(f):m;const h={x:0,y:0};if(t=M(t),r=M(r),g=M(g),u=M(u),!a){const e=Boolean(n)&&o+r>g;h.x=Math.round(Math.max(0,c+r-g))+(e?Math.round(r+((null==n?void 0:n.x)||0)):0);const t=e&&o-h.x<0?h.x-(h.x-o):0;t>0&&(h.x=t)}if(!s){const e=l+t>u?u-l:0,r=e+t>u?0:e,o=Boolean(n)&&i+t>u;h.y=Math.round(Math.max(0,l+t-(u-r)))+(o?Math.round(t+((null==n?void 0:n.y)||0)):0)}d(h)},[a,s,n,c,l,f]),w=t.useCallback(e=>{p.current=e,y()},[y]);return t.useEffect(()=>{var e;(null==(e=n||r)?void 0:e.items)&&(c||l)&&y()},[r,y,n,c,l]),t.useEffect(()=>{var e;if(i&&!n){const t=document.activeElement;if(t instanceof HTMLElement&&t!==document.body){const e={capture:!0,...E},n=({relatedTarget:e,type:r})=>{var o;e instanceof HTMLElement&&(null==(o=p.current)?void 0:o.contains(e))||h(),t.removeEventListener("click"===r?"blur":"click",n,{capture:!0})};t.addEventListener("click",n,e),t.addEventListener("blur",n,e)}else null==(e=p.current)||e.focus(x)}},[i,h,n]),t.useEffect(()=>{i||(v.current={})},[i,u.x,u.y,n]),t.useEffect(()=>{const e=({key:e})=>{"Escape"===e&&h()};return i&&window.addEventListener("keydown",e,{passive:!0}),()=>window.removeEventListener("keydown",e)},[i,h]),i?e.jsx(un,{ref:w,$isSubMenu:b,$x:a||c-u.x,$y:s||l-u.y,onBlurCapture:h,onContextMenu:G,...dn,...g,children:e.jsx("ol",{children:i.map((t,n)=>e.jsx(be,{isSubMenu:b,resetMenu:h,...t},`${t.label||"item"}-${n}`))})}):null},{Provider:gn,useContext:mn}=a(()=>{const[e,n]=t.useState(Object.create(null)),r=t.useRef(0),o=t.useRef();return{contextMenu:t.useCallback(e=>{const t=(t,r,o)=>{const{staticX:i,staticY:a}=o||{};let s=0,c=0;if(t){if(t.cancelable&&t.preventDefault(),"touches"in t){const e=t.touches[0];s=e.pageX,c=e.pageY}else s=t.pageX,c=t.pageY;const{scrollX:e,scrollY:n}=window;s+=e,c+=n}else if(r){const{height:e,x:t,y:n}=r;s=t,c=n+e;const{scrollX:o,scrollY:i}=window;s+=o,c+=i}const l=e(t);n({items:l.length>0?l:void 0,staticX:i,staticY:a,x:s,y:c})};return{onContextMenuCapture:t,...z()&&{onTouchEnd:e=>{o.current&&(e.preventDefault(),t(o.current),o.current=void 0),window.clearTimeout(r.current)},onTouchMove:()=>{o.current=void 0,window.clearTimeout(r.current)},onTouchStart:e=>{window.clearTimeout(r.current),r.current=window.setTimeout(()=>{o.current=e},w.LONG_PRESS)}}}},[]),menu:e,setMenu:n}},e.jsx(fn,{})),{Provider:hn,useContext:bn}=a(()=>{const[e,n]=t.useState(Object.create(null)),{events:r,actions:o}=ie(),i=t.useCallback(e=>{n(((e,t)=>n=>{var r;const{[e]:o,...i}=n;return o.windowIDs&&o.windowIDs.length>0&&(null==(r=o.windowIDs)||r.forEach(e=>t.emit("action:windows/close_transition",e))),i})(e,o))},[o]),a=t.useCallback(e=>{const t=U().toString();return n(((e,t)=>n=>({...n,[e]:{id:e,...t}}))(t,e)),r.emit("event:processes/new_process",{id:t,...e}),t},[r]),s=t.useCallback((e,t)=>{},[]),c=t.useCallback((e,t)=>{},[]);return t.useEffect(()=>{const e=[o.on("action:processes/create_process",a)];return()=>{e.forEach(e=>o.removeListenerByID(e))}},[o,a]),{processes:e,close:i,createProcess:a,addWindowIDToProcess:s,removeWindowIDFromProcess:c}});var vn={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Function]",a="[object Object]",c=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[o]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[i]=u["[object Map]"]=u["[object Number]"]=u[a]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var d="object"==typeof s&&s&&s.Object===Object&&s,p="object"==typeof self&&self&&self.Object===Object&&self,f=d||p||Function("return this")(),g=t&&!t.nodeType&&t,m=g&&e&&!e.nodeType&&e,h=m&&m.exports===g,b=h&&d.process,v=function(){try{var e=m&&m.require&&m.require("util").types;return e||b&&b.binding&&b.binding("util")}catch(t){}}(),y=v&&v.isTypedArray;var E,x=Array.prototype,w=Function.prototype,D=Object.prototype,I=f["__core-js_shared__"],S=w.toString,N=D.hasOwnProperty,C=(E=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",O=D.toString,A=S.call(Object),_=RegExp("^"+S.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=h?f.Buffer:void 0,L=f.Symbol,R=f.Uint8Array;P&&P.allocUnsafe;var B,T,M=(B=Object.getPrototypeOf,T=Object,function(e){return B(T(e))}),k=Object.create,j=D.propertyIsEnumerable,$=x.splice,V=L?L.toStringTag:void 0,F=function(){try{var e=pe(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),z=P?P.isBuffer:void 0,G=Math.max,W=Date.now,U=pe(f,"Map"),H=pe(Object,"create"),J=function(){function e(){}return function(t){if(!Ie(t))return{};if(k)return k(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function q(e){var t=this.__data__=new Y(e);this.size=t.size}function K(e,t){var n=ye(e),r=!n&&ve(e),o=!n&&!r&&xe(e),i=!n&&!r&&!o&&Ne(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var l in e)a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||fe(l,c))||s.push(l);return s}function Z(e,t,n){(void 0!==n&&!be(e[t],n)||void 0===n&&!(t in e))&&ne(e,t,n)}function ee(e,t,n){var r=e[t];N.call(e,t)&&be(r,n)&&(void 0!==n||t in e)||ne(e,t,n)}function te(e,t){for(var n=e.length;n--;)if(be(e[n][0],t))return n;return-1}function ne(e,t,n){"__proto__"==t&&F?F(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}X.prototype.clear=function(){this.__data__=H?H(null):{},this.size=0},X.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},X.prototype.get=function(e){var t=this.__data__;if(H){var r=t[e];return r===n?void 0:r}return N.call(t,e)?t[e]:void 0},X.prototype.has=function(e){var t=this.__data__;return H?void 0!==t[e]:N.call(t,e)},X.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=H&&void 0===t?n:t,this},Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=te(t,e);return!(n<0)&&(n==t.length-1?t.pop():$.call(t,n,1),--this.size,!0)},Y.prototype.get=function(e){var t=this.__data__,n=te(t,e);return n<0?void 0:t[n][1]},Y.prototype.has=function(e){return te(this.__data__,e)>-1},Y.prototype.set=function(e,t){var n=this.__data__,r=te(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Q.prototype.clear=function(){this.size=0,this.__data__={hash:new X,map:new(U||Y),string:new X}},Q.prototype.delete=function(e){var t=de(this,e).delete(e);return this.size-=t?1:0,t},Q.prototype.get=function(e){return de(this,e).get(e)},Q.prototype.has=function(e){return de(this,e).has(e)},Q.prototype.set=function(e,t){var n=de(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},q.prototype.clear=function(){this.__data__=new Y,this.size=0},q.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},q.prototype.get=function(e){return this.__data__.get(e)},q.prototype.has=function(e){return this.__data__.has(e)},q.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!U||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Q(r)}return n.set(e,t),this.size=n.size,this};var re=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":V&&V in Object(e)?function(e){var t=N.call(e,V),n=e[V];try{e[V]=void 0;var r=!0}catch(i){}var o=O.call(e);r&&(t?e[V]=n:delete e[V]);return o}(e):function(e){return O.call(e)}(e)}function ie(e){return Se(e)&&oe(e)==o}function ae(e){return!(!Ie(e)||function(e){return!!C&&C in e}(e))&&(we(e)?_:c).test(function(e){if(null!=e){try{return S.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function se(e){if(!Ie(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ge(e),n=[];for(var r in e)("constructor"!=r||!t&&N.call(e,r))&&n.push(r);return n}function ce(e,t,n,r,o){e!==t&&re(t,function(i,s){if(o||(o=new q),Ie(i))!function(e,t,n,r,o,i,s){var c=me(e,n),l=me(t,n),u=s.get(l);if(u)return void Z(e,n,u);var d=i?i(c,l,n+"",e,t,s):void 0,p=void 0===d;if(p){var f=ye(l),g=!f&&xe(l),m=!f&&!g&&Ne(l);d=l,f||g||m?ye(c)?d=c:Se(h=c)&&Ee(h)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(c):g?(p=!1,d=l.slice()):m?(p=!1,d=function(e){var t=(n=e.buffer,r=new n.constructor(n.byteLength),new R(r).set(new R(n)),r);var n,r;return new e.constructor(t,e.byteOffset,e.length)}(l)):d=[]:function(e){if(!Se(e)||oe(e)!=a)return!1;var t=M(e);if(null===t)return!0;var n=N.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&S.call(n)==A}(l)||ve(l)?(d=c,ve(c)?d=function(e){return function(e,t,n){var r=!n;n||(n={});var o=-1,i=t.length;for(;++o<i;){var a=t[o],s=void 0;void 0===s&&(s=e[a]),r?ne(n,a,s):ee(n,a,s)}return n}(e,Ce(e))}(c):Ie(c)&&!we(c)||(d=function(e){return"function"!=typeof e.constructor||ge(e)?{}:J(M(e))}(l))):p=!1}var h;p&&(s.set(l,d),o(d,l,r,i,s),s.delete(l));Z(e,n,d)}(e,t,s,n,ce,r,o);else{var c=r?r(me(e,s),i,s+"",e,t,o):void 0;void 0===c&&(c=i),Z(e,s,c)}},Ce)}function le(e,t){return he(function(e,t,n){return t=G(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=G(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,t,_e),e+"")}var ue=F?function(e,t){return F(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:_e;function de(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function pe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ae(n)?n:void 0}function fe(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&l.test(e))&&e>-1&&e%1==0&&e<t}function ge(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||D)}function me(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var he=function(e){var t=0,n=0;return function(){var r=W(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ue);function be(e,t){return e===t||e!=e&&t!=t}var ve=ie(function(){return arguments}())?ie:function(e){return Se(e)&&N.call(e,"callee")&&!j.call(e,"callee")},ye=Array.isArray;function Ee(e){return null!=e&&De(e.length)&&!we(e)}var xe=z||function(){return!1};function we(e){if(!Ie(e))return!1;var t=oe(e);return t==i||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function De(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Ie(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Se(e){return null!=e&&"object"==typeof e}var Ne=y?function(e){return function(t){return e(t)}}(y):function(e){return Se(e)&&De(e.length)&&!!u[oe(e)]};function Ce(e){return Ee(e)?K(e):se(e)}var Oe,Ae=(Oe=function(e,t,n){ce(e,t,n)},le(function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Oe.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!Ie(n))return!1;var r=typeof t;return!!("number"==r?Ee(n)&&fe(t,n.length):"string"==r&&t in n)&&be(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&Oe(e,a,n,o)}return e}));function _e(e){return e}e.exports=Ae}(vn,vn.exports);const yn=c(vn.exports),En=(e,t,n=!0)=>r=>{const{...o}=r;return o[e]&&(o[e]=n?yn(o[e],t):{...o[e],...t}),o},{Provider:xn,useContext:wn}=a(()=>{const[e,n]=t.useState(Object.create(null)),[r,o]=t.useState([]),{addWindowIDToProcess:i,removeWindowIDFromProcess:a}=bn(),{events:s,actions:c}=ie(),l=t.useCallback((e,t)=>n(((e,t,n)=>r=>{if(t)return En(e,{closing:t})(r);const{[e]:o,...i}=r;return o&&o.process&&n&&n(o.process.pid,e),i})(e,t,a)),[a]),u=t.useCallback((e,t,r)=>n(((e,t,n)=>r=>En(e,{[t]:n})(r))(e,t,r)),[]),d=t.useCallback((e,t)=>n(((e,t)=>n=>En(e,{icon:t})(n))(e,t)),[]),p=t.useCallback((e,t,r=!0)=>n(En(e,t,r)),[]),f=t.useCallback((e,t)=>n(En(e,{snap:t})),[]),g=t.useCallback(e=>{return n((t=e,e=>{var n;const r=!(null==(n=e[t])?void 0:n.maximized);if(r){const{componentWindow:n}=e[t];requestAnimationFrame(()=>null==n?void 0:n.focus(x))}return En(t,{maximized:r})(e)}));var t},[]),m=t.useCallback(e=>{return n((t=e,e=>{var n;return En(t,{minimized:!(null==(n=e[t])?void 0:n.minimized)})(e)}));var t},[]),h=t.useCallback((e,t)=>n(((e,t)=>n=>En(e,{title:t})(n))(e,t)),[]),b=t.useCallback(e=>{const r=U().toString();n(((e,n)=>r=>{let o;return o=t.isValidElement(n.Component)?()=>n.Component:n.Component,{...r,[e]:{...n,id:e,Component:o}}})(r,e)),o(e=>[...e,r]),e.process&&e.process.pid&&i(e.process.pid,r);const{Component:a,...c}=e;return s.emit("event:windows/new_window",{id:r,...c}),r},[i,s]),v=t.useCallback(e=>{l(e,!0),window.setTimeout(()=>{l(e),s.emit("event:windows/close",e)},w.WINDOW),s.emit("event:windows/close_transition",e)},[l,s]);return t.useEffect(()=>{const e=[c.on("action:windows/create_window",b)];return()=>{e.forEach(c.removeListenerByID)}},[c,b]),t.useEffect(()=>{const e=[c.on("action:windows/close",l),c.on("action:windows/close_transition",v)];return()=>{e.forEach(c.removeListenerByID)}},[c,v,l]),{update:p,linkElement:u,closeWithTransition:v,maximize:g,minimize:m,setSnap:f,createWindow:b,close:l,icon:d,title:h,windows:e}}),{Provider:Dn,useContext:In}=a(()=>{const{createProcess:e}=bn(),{createWindow:n,maximize:r}=wn();return{openAppByName:t.useCallback(e=>{},[]),openApp:t.useCallback(r=>{const{name:o,icon:i,...a}=r,s=e({name:o,icon:i});if((a.showWindow||a.windowContent)&&a.windowContent){let e;e=t.isValidElement(a.windowContent)?()=>a.windowContent:a.windowContent;let r={icon:i,title:o,Component:e,process:{pid:s}};a.windowConfig&&(r={...r,...a.windowConfig}),n(r)}},[e,n,r])}}),{Provider:Sn,useContext:Nn}=a(({config:e})=>{const[n,r]=t.useState([]),{openApp:o}=In(),i=t.useCallback(e=>{r(t=>{const n=new Map(e.map(e=>[e.name,e])),r=t.map(e=>{const t=n.get(e.name);return t?(console.log("Updating existing app:",e.name),t):e}),i=e.filter(e=>!t.some(t=>t.name===e.name));return i.forEach((e,t)=>{e.runOnStart&&(console.log("Running on start:",e.name),setTimeout(()=>o(e),1e3*t))}),[...r,...i]})},[o]);return t.useEffect(()=>{(null==e?void 0:e.applications)&&i(null==e?void 0:e.applications)},[null==e?void 0:e.applications,i]),{...e,taskbarPlacement:e.taskbarPlacement||"bottom",applications:n}}),{Provider:Cn,useContext:On}=a(({rd_window_id:e})=>{const{icon:n,title:r,closeWithTransition:o,update:i}=wn(),a=t.useRef(re()),s=t.useCallback(t=>n(e,t),[n,e]),c=t.useCallback(t=>r(e,t),[r,e]),l=t.useCallback(()=>o(e),[e,o]),u=t.useCallback((t,n=!0)=>i(e,t,n),[]);return t.useMemo(()=>({id:e,setWindowIcon:s,setWindowTitle:c,close:l,update:u,Events:a.current}),[e,s,c,l])}),{Provider:An,useContext:_n}=a(e=>{const[n,r]=t.useState(!1),[o,i]=t.useState(!1),[a,s]=t.useState(""),[c,l]=t.useState([]),[u,d]=t.useState(f),[p,g]=t.useState("local"),[m,h]=t.useState(""),[b,v]=t.useState(Object.create(null)),[y,E]=t.useState("fill"),[x,w]=t.useState(!1),D=t.useCallback(e=>l(t=>t[0]===e?t:[e,...t.filter(t=>t!==e)]),[]),I=t.useCallback(e=>l(t=>t.filter(t=>t!==e)),[]),S=t.useCallback((e,t)=>{t&&E(t),w(e)},[]),[N,C]=t.useState(!1),O=t.useRef(0);return t.useEffect(()=>{if(!O.current&&n&&!N){const e=()=>{};"requestIdleCallback"in window&&"function"==typeof window.requestIdleCallback&&requestIdleCallback(e)}},[p,m,N,n,u,y,x,b]),{clockSource:p,cursor:m,previewID:o,foregroundId:a,prependToStack:D,removeFromStack:I,stackOrder:c,themeName:u,wallpaperFit:y,wallpaper:x,windowStates:b,sessionLoaded:n,setClockSource:g,setCursor:h,setPreviewID:i,setForegroundId:s,setHaltSession:C,setThemeName:d,setWallpaper:S,setWindowStates:v}}),Pn=t.memo(()=>{const{processes:t}=bn();return e.jsx(e.Fragment,{children:Object.entries(t).map(([t,{Component:n}])=>t&&n&&e.jsx(n,{},t))})}),Ln={name:"Win11",systemFont:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",\n "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",\n sans-serif',colors:{background:"#000",fileEntry:{background:"hsla(207, 30%, 72%, 25%)",backgroundFocused:"hsla(207, 60%, 72%, 35%)",backgroundFocusedHover:"hsla(207, 90%, 72%, 30%)",border:"hsla(207, 30%, 72%, 30%)",borderFocused:"hsla(207, 60%, 72%, 35%)",borderFocusedHover:"hsla(207, 90%, 72%, 40%)",text:"#FFF",textShadow:"\n 0 0 1px rgba(0, 0, 0, 75%),\n 0 0 2px rgba(0, 0, 0, 50%),\n\n 0 1px 1px rgba(0, 0, 0, 75%),\n 0 1px 2px rgba(0, 0, 0, 50%),\n\n 0 2px 1px rgba(0, 0, 0, 75%),\n 0 2px 2px rgba(0, 0, 0, 50%)"},highlight:"hsla(207, 100%, 72%, 90%)",progress:"hsla(113, 78%, 56%, 90%)",progressBackground:"hsla(104, 22%, 45%, 70%)",progressBarRgb:"rgb(6, 176, 37)",selectionHighlight:"hsla(207, 100%, 45%, 90%)",selectionHighlightBackground:"hsla(207, 100%, 45%, 30%)",taskbar:{active:"hsla(0, 0%, 20%, 70%)",activeForeground:"hsla(0, 0%, 40%, 70%)",background:"hsla(0, 0%, 10%, 70%)",button:{color:"#FFF"},foreground:"hsla(0, 0%, 35%, 70%)",foregroundHover:"hsla(0, 0%, 45%, 70%)",foregroundProgress:"hsla(104, 22%, 45%, 30%)",hover:"hsla(0, 0%, 25%, 70%)",peekBorder:"hsla(0, 0%, 50%, 50%)"},text:"rgba(255, 255, 255, 90%)",titleBar:{background:"rgb(0, 0, 0)",backgroundHover:"rgb(26, 26, 26)",backgroundInactive:"rgb(40, 40, 40)",buttonInactive:"rgb(128, 128, 128)",closeHover:"rgb(232, 17, 35)",text:"rgb(255, 255, 255)",textInactive:"rgb(170, 170, 170)"},window:{background:"#808080",outline:"hsla(0, 0%, 25%, 75%)",outlineInactive:"hsla(0, 0%, 30%, 100%)",shadow:"0 0 14px 0 rgba(0, 0, 0, 50%)",shadowInactive:"0 0 10px 0 rgba(0, 0, 0, 45%)"}},formats:{dateModified:{hour:"numeric",hour12:!0,minute:"2-digit"}},sizes:{calendar:{maxHeight:357},clock:{fontSize:"12px",padding:5},contextMenu:{subMenuOffset:3},fileEntry:{fontSize:"12px",iconSize:"48px",maxIconTextDisplayWidth:72,maxListTextDisplayWidth:102,renamePadding:5,renameWidth:75},fileExplorer:{navBarHeight:"38px",navInputHeight:24,statusBarHeight:"23px"},fileManager:{columnGap:"1px",gridEntryHeight:"70px",gridEntryWidth:"74px",padding:"5px 0",rowGap:"28px"},search:{headerHeight:52,inputHeight:40,maxHeight:415,size:600},startMenu:{maxHeight:390,sideBar:{buttonHeight:48,expandedWidth:"228px",iconSize:"16px",width:48},size:320},taskbar:{blur:"5px",button:{iconSize:"15px",width:36},entry:{borderSize:"2px",fontSize:"12px",iconSize:"24px",maxWidth:"160px",peekControlsHeight:36,peekImage:{height:82,margin:8}},panelBlur:"12px"},titleBar:{buttonIconWidth:"10px",buttonWidth:"45px",fontSize:"12px",height:30,iconMarginRight:"4px",iconSize:"16px"},window:{cascadeOffset:26,outline:"2px"}}},Rn={win11:Ln,macOS:{...Ln}},Bn=async()=>(await Promise.resolve().then(()=>require("./motionFeatures-D0uyJ3hE.js"))).default,Tn=t.memo(({children:t})=>{const{themeName:r}=_n();return e.jsx(n.ThemeProvider,{theme:Rn[r]||Rn[f],children:e.jsx(cn,{features:Bn,strict:!0,children:t})})}),Mn=n.div`
${de}
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
background-color: #000;
font-family: ${({theme:e})=>e.systemFont};
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-synthesis: none;
text-rendering: optimizeLegibility;
text-size-adjust: none;
inset: 0px;
overflow: hidden;
overscroll-behavior: none;
&,
&::before,
&::after {
border: 0px;
box-sizing: border-box;
font-variant-numeric: tabular-nums;
margin: 0px;
outline: 0px;
padding: 0px;
text-rendering: optimizelegibility;
}
`,kn={bottom:["wintaskbar"]},jn={bottom:["macos-dock"]},$n={},Vn=n.nav`
${de}
backdrop-filter: saturate(3) blur(22px);
background-color: rgba(32, 32, 32, .75);
width: 100%;
height: ${48}px;
contain: size layout;
display: flex;
flex-direction: row;
justify-content: space-between;
z-index: 1003;
`,Fn=n.figure`
align-items: center;
display: flex;
justify-items: center;
justify-content: center;
position: relative;
picture {
width: 24px;
height: 24px;
}`,zn=t.memo(()=>e.jsx(Fn,{children:e.jsx(he,{alt:"Start",imgSize:24,src:"data:image/png;base64,EP8Vmf0mAJCLx0iLTCQwSDPM6CklJQBIi1wkYEiLdCRoSIPEQF/DzEiJXCQIV0iD7CBIi/oz20iJGujFwf//SIkH6wSLXCQ4i8NIi1wkMEiDxCBfw8zMzEyL3EmJWxhJiXMgV0iD7EBIiwWZgy4ASDPESIlEJDBIi/JJg2PgAEiLSThIiwFJunAjUHCBNjmZTY1D4EiNFXVhKABIiwD/Ffz8JgCL+IXAdUlIi1wkKEiJXCQgSIsDSbpwsFUcOL/9nEiL1kiLy0iLQFD/Fc/8JgCL+EiF23QbSIsDSbpw2tcYMD/E/UiLy0iLQBD/Fa78JgCQi8dIi0wkMEgzzOg+JCUASItcJGBIi3QkaEiDxEBfw8zMTIvcSYlbGEmJcyBXSIPsQEiLBd2CLgBIM8RIiUQkMEiL8kmDY+AASItJOEiLAUm6cCNQcIE2OZlNjUPgSI0VuWAoAEiLAP8VQPwmAIv4hcB1SUiLXCQoSIlcJCBIiwNJunDT3To9ByDWSIvWSIvLSItAYP8VE/wmAIv4SIXbdBtIiwNJunDa1xgwP8T9SIvLSItAEP8V8vsmAJCLx0iLTCQwSDPM6IIjJQBIi1wkYEiLdCRoSIPEQF/DzMxMi9xJiVsYSYlzIFdIg+xASIsFIYIuAEgzxEiJRCQwi/JJg2PgAEiLSThIiwFJunAjUHCBNjmZTY1D4EiNFf5fKABIiwD/FYX7JgCL+IXAdUtIi1wkKEiJXCQgSIsDSbpwS1haRwfwrYvWSIvLSIuA2AAAAP8VVvsmAIv4SIXbdBtIiwNJunDa1xgwP8T9SIvLSItAEP8VNfsmAJCLx0iLTCQwSDPM6MUiJQBIi1wkYEiLdCRoSIPEQF/DzEyL3EmJWxhJiXMgV0iD7EBIiwVlgS4ASDPESIlEJDBIi/JJg2PgAEiLSThIiwFJunAjUHCBNjmZTY1D4EiNFUFfKABIiwD/Fcj6JgCL+IXAdUxIi1wkKEiJXCQgSIsDSbpw2916KIY5kkiL1kiLy0iLgIAAAAD/FZj6JgCL+EiF23QbSIsDSbpw2tcYMD/E/UiLy0iLQBD/FXf6JgCQi8dIi0wkMEgzzOgHIiUASItcJGBIi3QkaEiDxEBfw8zMzEyL3EmJWxhJiXMgV0iD7EBIiwWlgC4ASDPESIlEJDBIi/pJg2PgAEiLSThIiwFJunAjUHCBNjmZTY1D4EiNFYFeKABIiwD/FQj6JgCL8IXAdUxIi1wkKEiJXCQgSIsDSbpwMNdwTYYV8UiL10iLy0iLgGABAAD/Fdj5JgCL8EiF23QbSIsDSbpw2tcYMD/E/UiLy0iLQBD/Fbf5JgCQi8ZIi0wkMEgzzOhHISUASItcJGBIi3QkaEiDxEBfw8zMzEyL3EmJWxhJiXMgV0iD7EBIiwXlfy4ASDPESIlEJDBIi/JJg2PgAEiLSThIiwFJunAjUHCBNjmZTY1D4EiNFcFdKABIiwD/FUj5JgCL+IXAdUxIi1wkKEiJXCQgSIsDSbpwi1ISyL5Z9UiL1kiLy0iLgAABAAD/FRj5JgCL+EiF23QbSIsDSbpw2tcYMD/E/UiLy0iLQBD/Fff4JgCQi8dIi0wkMEgzzOiHICUASItcJGBIi3QkaEiDxEBfw8zMzEyL3EmJWxhJiXMgV0iD7EBIiwUlfy4ASDPESIlEJDCL8kmDY+AASItJOEiLAUm6cCNQcIE2OZlNjUPgSI0VAl0oAEiLAP8VifgmAIv4hcB1SEiLXCQoSIlcJCBIiwNJunDK2lhrFpioi9ZIi8tIi0B4/xVd+CYAi/hIhdt0G0iLA0m6cNrXGDA/xP1Ii8tIi0AQ/xU8+CYAkIvHSItMJDBIM8zozB8lAEiLXCRgSIt0JGhIg8RAX8NIiVwkEFVWV0iD7HAPKXQkYEiLBWx+LgBIM8RIiUQkWEmL6UmL8GZID27ySINkJFAASItJOEiLAUm6cCNQcIE2OZlMjUQkUEiNFf5cKABIiwD/FcX3JgCL+IXAdVxIi1wkUEiJXCQwSIsDDxAG8w9/RCRASbpwOFIwyo9ckEyLzUyNRCRAZkgPfvJIi8tIi0BA/xWF9yYAi/hIhdt0G0iLA0m6cNrXGDA/xP1Ii8tIi0AQ/xVk9yYAkIvHSItMJFhIM8zo9B4lAEiLnCSYAAAADyh0JGBIg8RwX15dw8zMzEyL3EmJWxhJiXMgV0iD7EBIiwWNfS4ASDPESIlEJDBIi/JJg2PgAEiLSThIiwFJunAjUHCBNjmZTY1D4EiNFWlbKABIiwD/FfD2JgCL+IXAdUxIi1wkKEiJXCQgSIsDSbpwqd1yyCcNmUiL1kiLy0iLgOgAAAD/FcD2JgCL+EiF23QbSIsDSbpw2tcYMD/E/UiLy0iLQBD/FZ/2JgCQi8dIi0wkMEgzzOgvHiUASItcJGBIi3QkaEiDxEBfw8zMzEiJXCQgVVZXSIPsQEiLBdF8LgBIM8RIiUQkMEmL6EiL8kiDZCQoAEiLSThIiwFJunAjUHCBNjmZTI1EJChIjRWoWigASIsA/xUv9iYAi/iFwHVPSItcJChIiVwkIEiLA0m6cBDbFp2eyM1Mi8VIi9ZIi8tIi4BYAQAA/xX89SYAi/hIhdt0G0iLA0m6cNrXGDA/xP1Ii8tIi0AQ/xXb9SYAkIvHSItMJDBIM8zoax0lAEiLXCR4SIPEQF9eXcPMzEyL3EmJWxhJiXMgV0iD7EBIiwUNfC4ASDPESIlEJDBIi/JJg2PgAEiLSThIiwFJunAjUHCBNjmZTY1D4EiNFelZKABIiwD/FXD1JgCL+IXAdUxIi1wkKEiJXCQgSIsDSbpweNwcZo7gz0iL1kiLy0iLgEABAAD/FUD1JgCL+EiF23QbSIsDSbpw2tcYMD/E/UiLy0iLQBD/FR/1JgCQi8dIi0wkMEgzzOivHCUASItcJGBIi3QkaEiDxEBfw8zMzEBTSIPsIEiLmVABAABIhdt0GkiLC0iLQQhJunCa1xQcPqn4SIvL/xXQ9CYASIlcJDBIg2QkMABIi8NIg8QgW8NIg+woSIsJSIXJdBhIiwFJunDa1xgwP8T9SItAEP8VmfQmAJBIg8Qow8zMzMzMzMzMzMzMcThTFJa/WdlIiVwkEEiJdCQgV0iD7CBIi/JIhcl1BDPb6yNIi1k4SIXbdBpIiwNJunCa1xQcPqn4SIvLSItACP8VQvQmAEiJXCQwSIs9VtwxAEiF/3QaSIsHSbpwmtcUHD6p+EiLz0iLQAj/FRf0JgBIiXwkQEyLxkiL10iLy+ikDwAAkEiF/3QbSIsHSbpw2tcYMD/E/UiLz0iLQBD/FeTzJgCQSIXbdBpIiwNJunDa1xgwP8T9SIvLSItAEP8VxPMmAEiLXCQ4SIt0JEhIg8QgX8PMzMzMzMzMzMzMzMxxa9F6JD6M5UBTSIPsIDPbSIsBSbpwOFMUlr9Z2UiLgAgBAAD/FX7zJgCQ6wSLXCQwi8NIg8QgW8PMzMzMzMzMcahTMMk34PpIiVwkIFVWV0iD7CBIhcl1BDPb6yNIi1k4SIXbdBpIiwNJunCa1xQcPqn4SIvLSItACP8VKPMmAEiJXCRISIs9PNsxAEiF/3QaSIsHSbpwmtcUHD6p+EiLz0iL"})})),Gn=n(fe)`
background-color: ${({$active:e,$highlight:t,theme:n})=>e&&(t?n.colors.taskbar.foreground:"hsla(0, 0%, 25%, 50%)")};
display: flex;
fill: ${({theme:e})=>e.colors.taskbar.button.color};
height: 100%;
place-content: center;
place-items: center;
&& {
width: ${({theme:e})=>e.sizes.taskbar.button.width}px;
}
svg {
height: ${({theme:e})=>e.sizes.taskbar.button.iconSize};
}
&:hover {
background-color: ${({$active:e,theme:t})=>e?t.colors.taskbar.foreground:t.colors.taskbar.hover};
svg {
fill: ${({$highlight:e,theme:t})=>e?t.colors.highlight:void 0};
}
}
&:active {
background-color: hsla(0, 0%, 20%, 70%);
svg {
fill: ${({$highlight:e})=>e?"hsla(207, 100%, 60%, 80%)":void 0};
}
}
`,Wn=()=>{const{windows:e}=wn(),n=t.useRef({});return t.useEffect(()=>{n.current=e},[e]),n},Un=(e=!1)=>{const{contextMenu:n}=mn(),{minimize:r}=wn(),{stackOrder:o}=_n(),i=Wn(),{fullscreenElement:a,toggleFullscreen:s}=Q(),c=(...e)=>{};return t.useMemo(()=>null==n?void 0:n(()=>{const t=Object.entries(i.current),n=t.length>0&&!t.some(([,{minimized:e}])=>!e),c=[{action:()=>((e,t,n)=>{const r=t.length>0&&!t.some(t=>{var n;return!(null==(n=e[t])?void 0:n.minimized)}),o=r?[...t].reverse():t;r||(L=[]),o.forEach(t=>{var o;r?L.includes(t)&&n(t):(null==(o=e[t])?void 0:o.minimized)||(L.push(t),n(t))}),r&&requestAnimationFrame(()=>{var n,r;return null==(r=null==(n=e[t[0]])?void 0:n.componentWindow)?void 0:r.focus(x)})})(i.current,o,r),label:e?"Desktop":n?"Show open windows":"Show the desktop"}];return e?c.unshift({action:()=>{},label:"Terminal"},v,{action:()=>{},label:"File Explorer"},{action:()=>{},label:"Run"},v):c.unshift({action:()=>s(),label:a===document.documentElement?"Exit full screen":"Enter full screen"},v),c}),[n,a,r,e,c,i,o,s])},Hn=({startMenuVisible:n,toggleStartMenu:r})=>{const[o,i]=t.useState(!1),{taskbarStartIcon:a}=Nn(),s=t.useRef(!1),c=t.useCallback(async()=>{if(s.current)return;s.current=!0;const e=Object.prototype.hasOwnProperty.call(HTMLLinkElement.prototype,"imageSrcset"),t=[...document.querySelectorAll("link[rel=preload]")],n=[];null==n||n.forEach(n=>{const r=document.createElement("link");if(r.as="image",r.fetchPriority="high",r.rel="preload",r.type="image/webp",H(n))if(e)r.imageSrcset=B(n,48,".webp");else{const[e]=R(n,48,("number"==typeof P||(P=Math.min(Math.ceil(window.devicePixelRatio),3)),P),".webp").split(" ");r.href=e}else r.href=n;t.some(e=>{var t,n;return r.imageSrcset&&(null==(t=null==e?void 0:e.imageSrcset)?void 0:t.endsWith(r.imageSrcset))||r.href&&(null==(n=null==e?void 0:e.href)?void 0:n.endsWith(r.href))})||document.head.append(r)}),i(!0)},[]),l=t.useCallback(async({ctrlKey:e,shiftKey:t})=>{o||c(),r()},[c,o,r]),u=t.useMemo(()=>{if(!a)return e.jsx(zn,{});if("string"==typeof a)return e.jsx(Fn,{children:e.jsx(he,{alt:"Start",imgSize:24,src:a})});if(t.isValidElement(a))return e.jsx("div",{className:"icon",children:a});if("function"==typeof a){const t=a;return e.jsx("div",{className:"icon",children:e.jsx(t,{})})}},[a]);return e.jsx(Gn,{$active:n,onClick:l,onMouseOver:o?void 0:c,$highlight:!0,"data-rd-type":"rd_start_button",...m,...W("Start"),...Un(!0),children:u})},Jn=n.ol`
column-gap: 1px;
display: flex;
height: 100%;
margin: 0 3px;
padding: 0px;
position: relative;
overflow: hidden;
justify-items: center;
justify-content: center;
`;function Xn(e){return(Xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yn(e){var t=function(e,t){if("object"!=Xn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xn(t)?t:t+""}function Qn(e,t,n){return(t=Yn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qn(Object(n),!0).forEach(function(t){Qn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zn(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 er="function"==typeof Symbol&&Symbol.observable||"@@observable",tr=function(){return Math.random().toString(36).substring(7).split("").join(".")},nr={INIT:"@@redux/INIT"+tr(),REPLACE:"@@redux/REPLACE"+tr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+tr()}};function rr(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";var n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function or(e){var t=typeof e;return"production"!==process.env.NODE_ENV&&(t=rr(e)),t}function ir(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?Zn(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("production"===process.env.NODE_ENV?Zn(1):"Expected the enhancer to be a function. Instead, received: '"+or(n)+"'");return n(ir)(e,t)}if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?Zn(2):"Expected the root reducer to be a function. Instead, received: '"+or(e)+"'");var o=e,i=t,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function u(){if(c)throw new Error("production"===process.env.NODE_ENV?Zn(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function d(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?Zn(4):"Expected the listener to be a function. Instead, received: '"+or(e)+"'");if(c)throw new Error("production"===process.env.NODE_ENV?Zn(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var t=!0;return l(),s.push(e),function(){if(t){if(c)throw new Error("production"===process.env.NODE_ENV?Zn(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,l();var n=s.indexOf(e);s.splice(n,1),a=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error("production"===process.env.NODE_ENV?Zn(7):"Actions must be plain objects. Instead, the actual type was: '"+or(e)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(void 0===e.type)throw new Error("production"===process.env.NODE_ENV?Zn(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error("production"===process.env.NODE_ENV?Zn(9):"Reducers may not dispatch actions.");try{c=!0,i=o(i,e)}finally{c=!1}for(var t=a=s,n=0;n<t.length;n++){(0,t[n])()}return e}return p({type:nr.INIT}),(r={dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?Zn(10):"Expected the nextReducer to be a function. Instead, received: '"+or(e));o=e,p({type:nr.REPLACE})}})[er]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error("production"===process.env.NODE_ENV?Zn(11):"Expected the observer to be an object. Instead, received: '"+or(e)+"'");function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[er]=function(){return this},e},r}function ar(e,t){return function(){return t(e.apply(this,arguments))}}function sr(e,t){if("function"==typeof e)return ar(e,t);if("object"!=typeof e||null===e)throw new Error("production"===process.env.NODE_ENV?Zn(16):"bindActionCreators expected an object or a function, but instead received: '"+or(e)+'\'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=ar(o,t))}return n}function cr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}var lr,ur={exports:{}},dr={};var pr,fr={};
/**
* @license React
* use-sync-external-store-shim.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/"production"===process.env.NODE_ENV?ur.exports=function(){if(lr)return dr;lr=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(o){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),c=r({inst:{value:n,getSnapshot:t}}),l=c[0].inst,u=c[1];return i(function(){l.value=n,l.getSnapshot=t,s(l)&&u({inst:l})},[e,n,t]),o(function(){return s(l)&&u({inst:l}),e(function(){s(l)&&u({inst:l})})},[e]),a(n),n};return dr.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:c,dr}():ur.exports=(pr||(pr=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(o){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,i=n.useEffect,a=n.useLayoutEffect,s=n.useDebugValue,c=!1,l=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,u){c||void 0===n.startTransition||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=u();if(!l){var p=u();r(d,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}var f=(p=o({inst:{value:d,getSnapshot:u}}))[0].inst,g=p[1];return a(function(){f.value=d,f.getSnapshot=u,e(f)&&g({inst:f})},[t,d,u]),i(function(){return e(f)&&g({inst:f}),t(function(){e(f)&&g({inst:f})})},[t]),s(d),d};fr.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),fr);var gr,mr=ur.exports,hr={};var br,vr={};
/**
* @license React
* use-sync-external-store-shim/with-selector.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/"production"===process.env.NODE_ENV?function(){if(gr)return hr;gr=1;var e=t,n=mr,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;hr.useSyncExternalStoreWithSelector=function(e,t,n,l,u){var d=i(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=s(function(){function e(e){if(!a){if(a=!0,o=e,e=l(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=l(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,l,u]);var f=o(e,d[0],d[1]);return a(function(){p.hasValue=!0,p.value=f},[f]),c(f),f}}():br||(br=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=t,n=mr,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;vr.useSyncExternalStoreWithSelector=function(e,t,n,l,u){var d=i(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=s(function(){function e(e){if(!a){if(a=!0,o=e,e=l(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=l(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,l,u]);var f=o(e,d[0],d[1]);return a(function(){p.hasValue=!0,p.value=f},[f]),c(f),f},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}());let yr=function(e){e()};const Er=Symbol.for("react-redux-context"),xr="undefined"!=typeof globalThis?globalThis:{};function wr(){var e;if(!i.createContext)return{};const t=null!=(e=xr[Er])?e:xr[Er]=new Map;let n=t.get(i.createContext);return n||(n=i.createContext(null),"production"!==process.env.NODE_ENV&&(n.displayName="ReactRedux"),t.set(i.createContext,n)),n}const Dr=wr();function Ir(){return Ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ir.apply(null,arguments)}function Sr(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var Nr,Cr={exports:{}},Or={};var Ar,_r={};
/** @license React v16.13.1
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/"production"===process.env.NODE_ENV?Cr.exports=function(){if(Nr)return Or;Nr=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case c:case l:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case g:case f:case a:return e;default:return p}}case n:return p}}}function E(e){return y(e)===l}return Or.AsyncMode=c,Or.ConcurrentMode=l,Or.ContextConsumer=s,Or.ContextProvider=a,Or.Element=t,Or.ForwardRef=u,Or.Fragment=r,Or.Lazy=g,Or.Memo=f,Or.Portal=n,Or.Profiler=i,Or.StrictMode=o,Or.Suspense=d,Or.isAsyncMode=function(e){return E(e)||y(e)===c},Or.isConcurrentMode=E,Or.isContextConsumer=function(e){return y(e)===s},Or.isContextProvider=function(e){return y(e)===a},Or.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Or.isForwardRef=function(e){return y(e)===u},Or.isFragment=function(e){return y(e)===r},Or.isLazy=function(e){return y(e)===g},Or.isMemo=function(e){return y(e)===f},Or.isPortal=function(e){return y(e)===n},Or.isProfiler=function(e){return y(e)===i},Or.isStrictMode=function(e){return y(e)===o},Or.isSuspense=function(e){return y(e)===d},Or.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===l||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===h||e.$$typeof===b||e.$$typeof===v||e.$$typeof===m)},Or.typeOf=y,Or}():Cr.exports=(Ar||(Ar=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var m=e.type;switch(m){case c:case l:case r:case i:case o:case d:return m;default:var h=m&&m.$$typeof;switch(h){case s:case u:case g:case f:case a:return h;default:return p}}case n:return p}}}var E=c,x=l,w=s,D=a,I=t,S=u,N=r,C=g,O=f,A=n,_=i,P=o,L=d,R=!1;function B(e){return y(e)===l}_r.AsyncMode=E,_r.ConcurrentMode=x,_r.ContextConsumer=w,_r.ContextProvider=D,_r.Element=I,_r.ForwardRef=S,_r.Fragment=N,_r.Lazy=C,_r.Memo=O,_r.Portal=A,_r.Profiler=_,_r.StrictMode=P,_r.Suspense=L,_r.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(e)||y(e)===c},_r.isConcurrentMode=B,_r.isContextConsumer=function(e){return y(e)===s},_r.isContextProvider=function(e){return y(e)===a},_r.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},_r.isForwardRef=function(e){return y(e)===u},_r.isFragment=function(e){return y(e)===r},_r.isLazy=function(e){return y(e)===g},_r.isMemo=function(e){return y(e)===f},_r.isPortal=function(e){return y(e)===n},_r.isProfiler=function(e){return y(e)===i},_r.isStrictMode=function(e){return y(e)===o},_r.isSuspense=function(e){return y(e)===d},_r.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===l||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===h||e.$$typeof===b||e.$$typeof===v||e.$$typeof===m)},_r.typeOf=y}()),_r);var Pr=Cr.exports,Lr=Pr,Rr={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Br={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Tr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Mr={};function kr(e){return Lr.isMemo(e)?Tr:Mr[e.$$typeof]||Rr}Mr[Lr.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Mr[Lr.Memo]=Tr;var jr=Object.defineProperty,$r=Object.getOwnPropertyNames,Vr=Object.getOwnPropertySymbols,Fr=Object.getOwnPropertyDescriptor,zr=Object.getPrototypeOf,Gr=Object.prototype;var Wr=function e(t,n,r){if("string"!=typeof n){if(Gr){var o=zr(n);o&&o!==Gr&&e(t,o,r)}var i=$r(n);Vr&&(i=i.concat(Vr(n)));for(var a=kr(t),s=kr(n),c=0;c<i.length;++c){var l=i[c];if(!(Br[l]||r&&r[l]||s&&s[l]||a&&a[l])){var u=Fr(n,l);try{jr(t,l,u)}catch(d){}}}}return t};const Ur=c(Wr);var Hr,Jr={exports:{}},Xr={};var Yr,Qr={};
/**
* @license React
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/"production"===process.env.NODE_ENV?Jr.exports=function(){if(Hr)return Xr;Hr=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var g=e.$$typeof;switch(g){case t:switch(e=e.type){case r:case i:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case c:case s:case l:case f:case p:case a:return e;default:return g}}case n:return g}}}return e=Symbol.for("react.module.reference"),Xr.ContextConsumer=s,Xr.ContextProvider=a,Xr.Element=t,Xr.ForwardRef=l,Xr.Fragment=r,Xr.Lazy=f,Xr.Memo=p,Xr.Portal=n,Xr.Profiler=i,Xr.StrictMode=o,Xr.Suspense=u,Xr.SuspenseList=d,Xr.isAsyncMode=function(){return!1},Xr.isConcurrentMode=function(){return!1},Xr.isContextConsumer=function(e){return m(e)===s},Xr.isContextProvider=function(e){return m(e)===a},Xr.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Xr.isForwardRef=function(e){return m(e)===l},Xr.isFragment=function(e){return m(e)===r},Xr.isLazy=function(e){return m(e)===f},Xr.isMemo=function(e){return m(e)===p},Xr.isPortal=function(e){return m(e)===n},Xr.isProfiler=function(e){return m(e)===i},Xr.isStrictMode=function(e){return m(e)===o},Xr.isSuspense=function(e){return m(e)===u},Xr.isSuspenseList=function(e){return m(e)===d},Xr.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===u||t===d||t===g||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===l||t.$$typeof===e||void 0!==t.getModuleId)},Xr.typeOf=m,Xr}():Jr.exports=(Yr||(Yr=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var g=e.$$typeof;switch(g){case t:var m=e.type;switch(m){case r:case i:case o:case u:case d:return m;default:var h=m&&m.$$typeof;switch(h){case c:case s:case l:case f:case p:case a:return h;default:return g}}case n:return g}}}e=Symbol.for("react.module.reference");var h=s,b=a,v=t,y=l,E=r,x=f,w=p,D=n,I=i,S=o,N=u,C=d,O=!1,A=!1;Qr.ContextConsumer=h,Qr.ContextProvider=b,Qr.Element=v,Qr.ForwardRef=y,Qr.Fragment=E,Qr.Lazy=x,Qr.Memo=w,Qr.Portal=D,Qr.Profiler=I,Qr.StrictMode=S,Qr.Suspense=N,Qr.SuspenseList=C,Qr.isAsyncMode=function(e){return O||(O=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},Qr.isConcurrentMode=function(e){return A||(A=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},Qr.isContextConsumer=function(e){return m(e)===s},Qr.isContextProvider=function(e){return m(e)===a},Qr.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Qr.isForwardRef=function(e){return m(e)===l},Qr.isFragment=function(e){return m(e)===r},Qr.isLazy=function(e){return m(e)===f},Qr.isMemo=function(e){return m(e)===p},Qr.isPortal=function(e){return m(e)===n},Qr.isProfiler=function(e){return m(e)===i},Qr.isStrictMode=function(e){return m(e)===o},Qr.isSuspense=function(e){return m(e)===u},Qr.isSuspenseList=function(e){return m(e)===d},Qr.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===u||t===d||t===g||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===l||t.$$typeof===e||void 0!==t.getModuleId)},Qr.typeOf=m}()),Qr);var qr=Jr.exports;function Kr(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}function Zr(e,t){if(!e)throw new Error(`Unexpected value for ${t} in connect.`);"mapStateToProps"!==t&&"mapDispatchToProps"!==t||Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||Kr(`The selector for ${t} of connect did not specify a value for dependsOnOwnProps.`)}const eo=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function to(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,c,l,u,d,p=!1;function f(p,f){const g=!i(f,c),m=!o(p,s,f,c);return s=p,c=f,g&&m?(l=e(s,c),t.dependsOnOwnProps&&(u=t(r,c)),d=n(l,u,c),d):g?(e.dependsOnOwnProps&&(l=e(s,c)),t.dependsOnOwnProps&&(u=t(r,c)),d=n(l,u,c),d):m?function(){const t=e(s,c),r=!a(t,l);return l=t,r&&(d=n(l,u,c)),d}():d}return function(o,i){return p?f(o,i):(s=o,c=i,l=e(s,c),u=t(r,c),d=n(l,u,c),p=!0,d)}}function no(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Sr(t,eo);const a=n(e,i),s=r(e,i),c=o(e,i);return"production"!==process.env.NODE_ENV&&function(e,t,n){Zr(e,"mapStateToProps"),Zr(t,"mapDispatchToProps"),Zr(n,"mergeProps")}(a,s,c),to(a,s,c,e,i)}function ro(e,t,n){(function(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);if(null===t)return!0;let n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n})(e)||Kr(`${n}() in ${t} must return a plain object. Instead received ${e}.`)}function oo(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function io(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function ao(e,t){return function(n,{displayName:r}){const o=function(e,t){return o.dependsOnOwnProps?o.mapToProps(e,t):o.mapToProps(e,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(n,i){o.mapToProps=e,o.dependsOnOwnProps=io(e);let a=o(n,i);return"function"==typeof a&&(o.mapToProps=a,o.dependsOnOwnProps=io(a),a=o(n,i)),"production"!==process.env.NODE_ENV&&ro(a,r,t),a},o}}function so(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function co(e,t,n){return Ir({},n,e,t)}function lo(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,a,s){const c=e(t,a,s);return i?r(c,o)||(o=c):(i=!0,o=c,"production"!==process.env.NODE_ENV&&ro(o,n,"mergeProps")),o}}}(e):so(e,"mergeProps"):()=>co}function uo(){const e=yr;let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let e=t;for(;e;)e.callback(),e=e.next})},get(){let e=[],n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(e){let r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const po={notify(){},get:()=>[]};function fo(e,t){let n,r=po,o=0,i=!1;function a(){l.onStateChange&&l.onStateChange()}function s(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=uo())}function c(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=po)}const l={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),c())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,c())},getListeners:()=>r};return l}const go=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?i.useLayoutEffect:i.useEffect;function mo(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function ho(e,t){if(mo(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!mo(e[n[o]],t[n[o]]))return!1;return!0}const bo=["reactReduxForwardedRef"];let vo=()=>{throw new Error("uSES not initialized!")};const yo=[null,null];function Eo(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function xo(e,t){return e===t}let wo=!1;function Do(e,t,n,{pure:r,areStatesEqual:o=xo,areOwnPropsEqual:a=ho,areStatePropsEqual:s=ho,areMergedPropsEqual:c=ho,forwardRef:l=!1,context:u=Dr}={}){"production"!==process.env.NODE_ENV&&(void 0===r||wo||(wo=!0,Kr('The `pure` option has been removed. `connect` is now always a "pure/memoized" component')));const d=u,p=function(e){return e?"function"==typeof e?ao(e,"mapStateToProps"):so(e,"mapStateToProps"):oo(()=>({}))}(e),f=function(e){return e&&"object"==typeof e?oo(t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t)):e?"function"==typeof e?ao(e,"mapDispatchToProps"):so(e,"mapDispatchToProps"):oo(e=>({dispatch:e}))}(t),g=lo(n),m=Boolean(e);return e=>{if("production"!==process.env.NODE_ENV&&!qr.isValidElementType(e))throw new Error(`You must pass a component to the function returned by connect. Instead received ${(e=>{try{return JSON.stringify(e)}catch(t){return String(e)}})(e)}`);const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:m,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:p,initMapDispatchToProps:f,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:a,areMergedPropsEqual:c};function u(t){const[o,a,s]=i.useMemo(()=>{const{reactReduxForwardedRef:e}=t,n=Sr(t,bo);return[t.context,e,n]},[t]),c=i.useMemo(()=>o&&o.Consumer&&qr.isContextConsumer(i.createElement(o.Consumer,null))?o:d,[o,d]),l=i.useContext(c),u=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),p=Boolean(l)&&Boolean(l.store);if("production"!==process.env.NODE_ENV&&!u&&!p)throw new Error(`Could not find "store" in the context of "${n}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${n} in connect options.`);const f=u?t.store:l.store,g=p?l.getServerState:f.getState,h=i.useMemo(()=>no(f.dispatch,r),[f]),[b,v]=i.useMemo(()=>{if(!m)return yo;const e=fo(f,u?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[f,u,l]),y=i.useMemo(()=>u?l:Ir({},l,{subscription:b}),[u,l,b]),E=i.useRef(),x=i.useRef(s),w=i.useRef(),D=i.useRef(!1);i.useRef(!1);const I=i.useRef(!1),S=i.useRef();go(()=>(I.current=!0,()=>{I.current=!1}),[]);const N=i.useMemo(()=>()=>w.current&&s===x.current?w.current:h(f.getState(),s),[f,s]),C=i.useMemo(()=>e=>b?function(e,t,n,r,o,i,a,s,c,l,u){if(!e)return()=>{};let d=!1,p=null;const f=()=>{if(d||!s.current)return;const e=t.getState();let n,f;try{n=r(e,o.current)}catch(g){f=g,p=g}f||(p=null),n===i.current?a.current||l():(i.current=n,c.current=n,a.current=!0,u())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(m,f,b,h,x,E,D,I,w,v,e):()=>{},[b]);var O,A,_;let P;O=Eo,A=[x,E,D,s,w,v],go(()=>O(...A),_);try{P=vo(C,N,g?()=>h(g(),s):N)}catch(R){throw S.current&&(R.message+=`\nThe error may be correlated with this previous error:\n${S.current.stack}\n\n`),R}go(()=>{S.current=void 0,w.current=void 0,E.current=P});const L=i.useMemo(()=>i.createElement(e,Ir({},P,{ref:a})),[a,e,P]);return i.useMemo(()=>m?i.createElement(c.Provider,{value:y},L):L,[c,L,y])}const h=i.memo(u);if(h.WrappedComponent=e,h.displayName=u.displayName=n,l){const t=i.forwardRef(function(e,t){return i.createElement(h,Ir({},e,{reactReduxForwardedRef:t}))});return t.displayName=n,t.WrappedComponent=e,Ur(t,e)}return Ur(h,e)}}function Io({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:a="once"}){const s=i.useMemo(()=>{const t=fo(e);return{store:e,subscription:t,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:a}},[e,r,o,a]),c=i.useMemo(()=>e.getState(),[e]);go(()=>{const{subscription:t}=s;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),c!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}},[s,c]);const l=t||Dr;return i.createElement(l.Provider,{value:s},n)}var So,No;function Co(e,n){var r=t.useState(function(){return{inputs:n,result:e()}})[0],o=t.useRef(!0),i=t.useRef(r),a=o.current||Boolean(n&&i.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(n,i.current.inputs))?i.current:{inputs:n,result:e()};return t.useEffect(function(){o.current=!1,i.current=a},[a]),a.result}So=mr.useSyncExternalStore,vo=So,No=r.unstable_batchedUpdates,yr=No;var Oo=Co,Ao=function(e,t){return Co(function(){return e},t)},_o="production"===process.env.NODE_ENV,Po="Invariant failed";function Lo(e,t){if(_o)throw new Error(Po);var n="function"==typeof t?t():t,r=n?"".concat(Po,": ").concat(n):Po;throw new Error(r)}var Ro=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},Bo=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},To=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Mo={top:0,right:0,bottom:0,left:0},ko=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?Mo:n,o=e.border,i=void 0===o?Mo:o,a=e.padding,s=void 0===a?Mo:a,c=Ro(Bo(t,r)),l=Ro(To(t,i)),u=Ro(To(l,s));return{marginBox:c,borderBox:Ro(t),paddingBox:l,contentBox:u,margin:r,border:i,padding:s}},jo=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&("production"!==process.env.NODE_ENV?Lo(0,"Could not parse value [raw: "+e+", without suffix: "+t+"]"):Lo()),n},$o=function(e,t){var n,r,o=e.borderBox,i=e.border,a=e.margin,s=e.padding,c=(r=t,{top:(n=o).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return ko({borderBox:c,border:i,margin:a,padding:s})},Vo=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),$o(e,t)},Fo=function(e,t){var n={top:jo(t.marginTop),right:jo(t.marginRight),bottom:jo(t.marginBottom),left:jo(t.marginLeft)},r={top:jo(t.paddingTop),right:jo(t.paddingRight),bottom:jo(t.paddingBottom),left:jo(t.paddingLeft)},o={top:jo(t.borderTopWidth),right:jo(t.borderRightWidth),bottom:jo(t.borderBottomWidth),left:jo(t.borderLeftWidth)};return ko({borderBox:e,margin:n,padding:r,border:o})},zo=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return Fo(t,n)},Go=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Wo(e,t){return e===t||!(!Go(e)||!Go(t))}function Uo(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Wo(e[n],t[n]))return!1;return!0}function Ho(e,t){void 0===t&&(t=Uo);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}var Jo=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};const Xo="production"===process.env.NODE_ENV,Yo=/[ \t]{2,}/g,Qo=/^[ \t]*/gm,qo=e=>e.replace(Yo," ").replace(Qo,"").trim(),Ko=e=>qo(`\n %c@hello-pangea/dnd\n\n %c${qo(e)}\n\n %c👷 This is a development only message. It will be removed in production builds.\n`);function Zo(e,t){Xo||"undefined"!=typeof window&&window["__@hello-pangea/dnd-disable-dev-warnings"]||console[e](...(e=>[Ko(e),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"])(t))}const ei=Zo.bind(null,"warn"),ti=Zo.bind(null,"error");function ni(){}function ri(e,t,n){const r=t.map(t=>{const r=(o=n,i=t.options,{...o,...i});var o,i;return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}});return function(){r.forEach(e=>{e()})}}const oi="production"===process.env.NODE_ENV,ii="Invariant failed";class ai extends Error{}function si(e,t){throw new ai(oi?ii:`${ii}: ${t||""}`)}ai.prototype.toString=function(){return this.message};class ci extends t.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=ni,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&(t.tryAbort(),"production"!==process.env.NODE_ENV&&ei("\n An error was caught by our window 'error' event listener while a drag was occurring.\n The active drag has been aborted.\n "));const n=e.error;n instanceof ai&&(e.preventDefault(),"production"!==process.env.NODE_ENV&&ti(n.message))},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=ri(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(e instanceof ai)return"production"!==process.env.NODE_ENV&&ti(e.message),void this.setState({});throw e}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const li=e=>e+1,ui=(e,t)=>{const n=e.droppableId===t.droppableId,r=li(e.index),o=li(t.index);return n?`\n You have moved the item from position ${r}\n to position ${o}\n `:`\n You have moved the item from position ${r}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${o}\n `},di=(e,t,n)=>t.droppableId===n.droppableId?`\n The item ${e}\n has been combined with ${n.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${n.draggableId}\n in list ${n.droppableId}\n `,pi=e=>`\n The item has returned to its starting position\n of ${li(e.index)}\n`;var fi={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:e=>`\n You have lifted an item in position ${li(e.source.index)}\n`,onDragUpdate:e=>{const t=e.destination;if(t)return ui(e.source,t);const n=e.combine;return n?di(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},onDragEnd:e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${pi(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${ui(e.source,t)}\n `:n?`\n You have dropped the item.\n ${di(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${pi(e.source)}\n `}};const gi={x:0,y:0},mi=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),hi=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),bi=(e,t)=>e.x===t.x&&e.y===t.y,vi=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),yi=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},Ei=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),xi=(e,t)=>Math.min(...t.map(t=>Ei(e,t))),wi=e=>t=>({x:e(t.x),y:e(t.y)});const Di=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Ii=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}],Si=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=Ro({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n})(t.pageMarginBox,e):Ro(e);var Ni=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=((e,t)=>t?Di(e,t.scroll.diff.displacement):e)(e.marginBox,r),i=((e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e)(o,n,t);return{page:e,withPlaceholder:t,active:Si(i,r)}},Ci=(e,t)=>{e.frame||(process.env.NODE_ENV,si());const n=e.frame,r=hi(t,n.scroll.initial),o=vi(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=Ni({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};const Oi=Ho(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),Ai=Ho(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),_i=Ho(e=>Object.values(e)),Pi=Ho(e=>Object.values(e));var Li=Ho((e,t)=>Pi(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index));function Ri(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Bi(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Ti=Ho((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),Mi=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const ki={point:gi,value:0},ji={invisible:{},visible:{},all:[]};var $i={displaced:ji,displacedBy:ki,at:null},Vi=(e,t)=>n=>e<=n&&n<=t,Fi=e=>{const t=Vi(e.top,e.bottom),n=Vi(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;const a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;if(a&&s)return!0;return a&&i||s&&o}},zi=e=>{const t=Vi(e.top,e.bottom),n=Vi(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const Gi={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Wi={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};const Ui=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:gi;return Di(e,n)})(e,t):e;return((e,t,n)=>!!t.subject.active&&n(t.subject.active)(e))(i,t,o)&&((e,t,n)=>n(t)(e))(i,n,o)},Hi=e=>Ui({...e,isVisibleThroughFrameFn:zi});function Ji({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce(function(e,a){const s=function(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Ro(Bo(n,r))}(a,n),c=a.descriptor.id;e.all.push(c);var l;if(!(l={target:s,destination:t,viewport:r,withDroppableDisplacement:!0},Ui({...l,isVisibleThroughFrameFn:Fi})))return e.invisible[a.descriptor.id]=!0,e;const u=((e,t,n)=>{if("boolean"==typeof n)return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return!i||i.shouldAnimate})(c,i,o),d={draggableId:c,shouldAnimate:u};return e.visible[c]=d,e},{all:[],visible:{},invisible:{}})}function Xi({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=function(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(e,{inHomeList:t});return{displaced:ji,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function Yi({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const c=Mi(e,n);if(null==a)return Xi({insideDestination:t,inHomeList:c,displacedBy:o,destination:n});const l=t.find(e=>e.descriptor.index===a);if(!l)return Xi({insideDestination:t,inHomeList:c,displacedBy:o,destination:n});const u=Ti(e,t),d=t.indexOf(l);return{displaced:Ji({afterDragging:u.slice(d),destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function Qi(e,t){return Boolean(t.effected[e])}var qi=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:c})=>{const l=a.at;if(l||("production"!==process.env.NODE_ENV?si(0,"Cannot move in direction without previous impact location"):si()),"REORDER"===l.type){const r=(({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,a=n[0].descriptor.index,s=n[n.length-1].descriptor.index;return i<a||i>(t?s:s+1)?null:i})({isMovingForward:e,isInHomeList:t,location:l.destination,insideDestination:i});return null==r?null:Yi({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:r})}const u=(({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,a=n[i].descriptor.index;return Qi(i,o)?e?a:a-1:e?a+1:a})({isMovingForward:e,destination:o,displaced:a.displaced,draggables:r,combine:l.combine,afterCritical:c});return null==u?null:Yi({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:u})},Ki=({afterCritical:e,impact:t,draggables:n})=>{const r=Bi(t);r||(process.env.NODE_ENV,si());const o=r.draggableId,i=n[o].page.borderBox.center,a=(({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=Boolean(e.visible[n]||e.invisible[n]);return Qi(n,t)?o?gi:vi(r.point):o?r.point:gi})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return mi(i,a)};const Zi=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,ea=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,ta=({axis:e,moveRelativeTo:t,isMoving:n})=>yi(e.line,t.marginBox[e.end]+Zi(e,n),ea(e,t.marginBox,n)),na=({axis:e,moveRelativeTo:t,isMoving:n})=>yi(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),ea(e,t.marginBox,n));var ra=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=Li(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>yi(e.line,t.contentBox[e.start]+Zi(e,n),ea(e,t.contentBox,n)))({axis:s,moveInto:r.page,isMoving:a});const{displaced:c,displacedBy:l}=e,u=c.all[0];if(u){const e=n[u];if(Qi(u,o))return na({axis:s,moveRelativeTo:e.page,isMoving:a});const t=$o(e.page,l.point);return na({axis:s,moveRelativeTo:t,isMoving:a})}const d=i[i.length-1];if(d.descriptor.id===t.descriptor.id)return a.borderBox.center;if(Qi(d.descriptor.id,o)){const e=$o(d.page,vi(o.displacedBy.point));return ta({axis:s,moveRelativeTo:e,isMoving:a})}return ta({axis:s,moveRelativeTo:d.page,isMoving:a})},oa=(e,t)=>{const n=e.frame;return n?mi(t,n.scroll.diff.displacement):t};var ia=e=>{const t=(({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return n&&a?"REORDER"===a.type?ra({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):Ki({impact:e,draggables:r,afterCritical:o}):i})(e),n=e.droppable;return n?oa(n,t):t},aa=(e,t)=>{const n=hi(t,e.scroll.initial),r=vi(n);return{frame:Ro({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function sa(e,t){return e.map(e=>t[e])}var ca=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=((e,t)=>mi(e.scroll.diff.displacement,t))(n,e),o=hi(r,t.page.borderBox.center);return mi(t.client.borderBox.center,o)},la=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=hi(n,e.page.borderBox.center),s={target:Di(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?(e=>{return Ui({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=Vi(e.top,e.bottom),r=Vi(e.left,e.right);return e=>t===Gi?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(s):Hi(s)},ua=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:c})=>{if(!n.isEnabled)return null;const l=Li(n.descriptor.id,r),u=Mi(t,n),d=(({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled)return null;if(!Ri(o))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:n.descriptor.id}};return{...o,at:t}}const a=o.displaced.all,s=a.length?a[0]:null;if(e)return s?i(s):null;const c=Ti(t,r);if(!s)return c.length?i(c[c.length-1].descriptor.id):null;const l=c.findIndex(e=>e.descriptor.id===s);-1===l&&("production"!==process.env.NODE_ENV?si(0,"Could not find displaced item in set"):si());const u=l-1;return u<0?null:i(c[u].descriptor.id)})({isMovingForward:e,draggable:t,destination:n,insideDestination:l,previousImpact:o})||qi({isMovingForward:e,isInHomeList:u,draggable:t,draggables:r,destination:n,insideDestination:l,previousImpact:o,viewport:i,afterCritical:c});if(!d)return null;const p=ia({impact:d,draggable:t,droppable:n,draggables:r,afterCritical:c});if(la({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})){return{clientSelection:ca({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:d,scrollJumpRequest:null}}const f=hi(p,a),g=(({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=aa(t,mi(t.scroll.current,o)),a=n.frame?Ci(n,mi(n.frame.scroll.current,o)):n,s=e.displaced,c=Ji({afterDragging:sa(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),l=Ji({afterDragging:sa(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),u={},d={},p=[s,c,l];return s.all.forEach(e=>{const t=function(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}(e,p);t?d[e]=t:u[e]=!0}),{...e,displaced:{all:s.all,invisible:u,visible:d}}})({impact:d,viewport:i,destination:n,draggables:r,maxScrollChange:f});return{clientSelection:s,impact:g,scrollJumpRequest:f}};const da=e=>{const t=e.subject.active;return t||("production"!==process.env.NODE_ENV?si(0,"Cannot get clipped area from droppable"):si()),t};const pa=(e,t)=>{const n=e.page.borderBox.center;return Qi(e.descriptor.id,t)?hi(n,t.displacedBy.point):n},fa=(e,t)=>{const n=e.page.borderBox;return Qi(e.descriptor.id,t)?Di(n,vi(t.displacedBy.point)):n};var ga=Ho(function(e,t){const n=t[e.line];return{value:n,point:yi(e.line,n)}});const ma=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),ha=(e,t,n)=>{const r=e.frame;Mi(t,e)&&("production"!==process.env.NODE_ENV?si(0,"Should not add placeholder space to home list"):si()),e.subject.withPlaceholder&&("production"!==process.env.NODE_ENV?si(0,"Cannot add placeholder size to a subject when it already has one"):si());const o=ga(e.axis,t.displaceBy).point,i=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return yi(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],i=Li(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[r.size],0)+t[r.line]-o;return i<=0?null:yi(r.line,i)})(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=Ni({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?mi(r.scroll.max,i):r.scroll.max,c=ma(r,s),l=Ni({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:c});return{...e,subject:l,frame:c}};var ba=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const c=(({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const a=n.axis,s=Vi(i[a.start],i[a.end]),c=_i(r).filter(e=>e!==n).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>Fi(o.frame)(da(e))).filter(t=>{const n=da(t);return e?i[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<i[a.crossAxisStart]}).filter(e=>{const t=da(e),n=Vi(t[a.start],t[a.end]);return s(t[a.start])||s(t[a.end])||n(i[a.start])||n(i[a.end])}).sort((t,n)=>{const r=da(t)[a.crossAxisStart],o=da(n)[a.crossAxisStart];return e?r-o:o-r}).filter((e,t,n)=>da(e)[a.crossAxisStart]===da(n[0])[a.crossAxisStart]);if(!c.length)return null;if(1===c.length)return c[0];const l=c.filter(e=>Vi(da(e)[a.start],da(e)[a.end])(t[a.line]));return 1===l.length?l[0]:l.length>1?l.sort((e,t)=>da(e)[a.start]-da(t)[a.start])[0]:c.sort((e,n)=>{const r=xi(t,Ii(da(e))),o=xi(t,Ii(da(n)));return r!==o?r-o:da(e)[a.start]-da(n)[a.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!c)return null;const l=Li(c.descriptor.id,o),u=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>r.filter(e=>Hi({target:fa(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,r)=>{const i=Ei(e,oa(n,pa(t,o))),a=Ei(e,oa(n,pa(r,o)));return i<a?-1:a<i?1:t.descriptor.index-r.descriptor.index})[0]||null)({pageBorderBoxCenter:t,viewport:a,destination:c,insideDestination:l,afterCritical:s}),d=(({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(n.length)return null;const e={displaced:ji,displacedBy:ki,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=ia({impact:e,draggable:r,droppable:i,draggables:o,afterCritical:s}),c=Mi(r,i)?i:ha(i,r,o);return la({draggable:r,destination:c,newPageBorderBoxCenter:t,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}const c=Boolean(e[i.axis.line]<=t.page.borderBox.center[i.axis.line]),l=(()=>{const e=t.descriptor.index;return t.descriptor.id===r.descriptor.id||c?e:e+1})(),u=ga(i.axis,r.displaceBy);return Yi({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:u,last:ji,index:l})})({previousPageBorderBoxCenter:t,destination:c,draggable:n,draggables:o,moveRelativeTo:u,insideDestination:l,viewport:a,afterCritical:s});if(!d)return null;const p=ia({impact:d,draggable:n,droppable:c,draggables:o,afterCritical:s});return{clientSelection:ca({pageBorderBoxCenter:p,draggable:n,viewport:a}),impact:d,scrollJumpRequest:null}},va=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};var ya=({state:e,type:t})=>{const n=((e,t)=>{const n=va(e);return n?t[n]:null})(e.impact,e.dimensions.droppables),r=Boolean(n),o=e.dimensions.droppables[e.critical.droppable.id],i=n||o,a=i.axis.direction,s="vertical"===a&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===a&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(s&&!r)return null;const c="MOVE_DOWN"===t||"MOVE_RIGHT"===t,l=e.dimensions.draggables[e.critical.draggable.id],u=e.current.page.borderBoxCenter,{draggables:d,droppables:p}=e.dimensions;return s?ua({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:l,destination:i,draggables:d,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):ba({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:l,isOver:i,draggables:d,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function Ea(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function xa(e){const t=Vi(e.top,e.bottom),n=Vi(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function wa({pageBorderBox:e,draggable:t,droppables:n}){const r=_i(n).filter(t=>{if(!t.isEnabled)return!1;const n=t.subject.active;if(!n)return!1;if(o=n,!((r=e).left<o.right&&r.right>o.left&&r.top<o.bottom&&r.bottom>o.top))return!1;var r,o;if(xa(n)(e.center))return!0;const i=t.axis,a=n.center[i.crossAxisLine],s=e[i.crossAxisStart],c=e[i.crossAxisEnd],l=Vi(n[i.crossAxisStart],n[i.crossAxisEnd]),u=l(s),d=l(c);return!u&&!d||(u?s<a:c>a)});return r.length?1===r.length?r[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map(t=>{const n=t.axis,o=yi(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:Ei(r,o)}}).sort((e,t)=>t.distance-e.distance);return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:r}):null}const Da=(e,t)=>Ro(Di(e,t));function Ia({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var Sa=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=Da(t.page.borderBox,e),c=wa({pageBorderBox:s,draggable:t,droppables:r});if(!c)return $i;const l=r[c],u=Li(l.descriptor.id,n),d=((e,t)=>{const n=e.frame;return n?Da(t,n.scroll.diff.value):t})(l,s);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:o,afterCritical:i})=>{if(!r.isCombineEnabled)return null;const a=r.axis,s=ga(r.axis,e.displaceBy),c=s.value,l=t[a.start],u=t[a.end],d=Ti(e,o).find(e=>{const t=e.descriptor.id,r=e.page.borderBox,o=r[a.size]/4,s=Qi(t,i),d=Ia({displaced:n.displaced,id:t});return s?d?u>r[a.start]+o&&u<r[a.end]-o:l>r[a.start]-c+o&&l<r[a.end]-c-o:d?u>r[a.start]+c+o&&u<r[a.end]+c-o:l>r[a.start]+o&&l<r[a.end]-o});return d?{displacedBy:s,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:d.descriptor.id,droppableId:r.descriptor.id}}}:null})({pageBorderBoxWithDroppableScroll:d,draggable:t,previousImpact:o,destination:l,insideDestination:u,afterCritical:a})||(({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:a})=>{const s=n.axis,c=ga(n.axis,t.displaceBy),l=c.value,u=e[s.start],d=e[s.end],p=function({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:Ti(t,r).find(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=Qi(t,a),i=Ia({displaced:o,id:t});return r?i?d<=n:u<n-l:i?d<=n+l:u<n})||null,inHomeList:Mi(t,n)});return Yi({draggable:t,insideDestination:r,destination:n,viewport:i,last:o,displacedBy:c,index:p})})({pageBorderBoxWithDroppableScroll:d,draggable:t,destination:l,insideDestination:u,last:o.displaced,viewport:i,afterCritical:a})},Na=(e,t)=>({...e,[t.descriptor.id]:t});const Ca=({previousImpact:e,impact:t,droppables:n})=>{const r=va(e),o=va(t);if(!r)return n;if(r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const a=(e=>{const t=e.subject.withPlaceholder;t||("production"!==process.env.NODE_ENV?si(0,"Cannot remove placeholder form subject when there was none"):si());const n=e.frame;if(!n){const t=Ni({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||("production"!==process.env.NODE_ENV?si(0,"Expected droppable with frame to have old max frame scroll when removing placeholder"):si());const o=ma(n,r),i=Ni({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return Na(n,a)};var Oa=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const a=r||e.viewport,s=n||e.dimensions,c=t||e.current.client.selection,l=hi(c,e.initial.client.selection),u={offset:l,selection:c,borderBoxCenter:mi(e.initial.client.borderBoxCenter,l)},d={selection:mi(u.selection,a.scroll.current),borderBoxCenter:mi(u.borderBoxCenter,a.scroll.current),offset:mi(u.offset,a.scroll.diff.value)},p={client:u,page:d};if("COLLECTING"===e.phase)return{...e,dimensions:s,viewport:a,current:p};const f=s.draggables[e.critical.draggable.id],g=o||Sa({pageOffset:d.offset,draggable:f,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=(({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=Ca({previousImpact:r,impact:o,droppables:n}),a=va(o);if(!a)return i;const s=n[a];if(Mi(e,s))return i;if(s.subject.withPlaceholder)return i;const c=ha(s,e,t);return Na(i,c)})({draggable:f,impact:g,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:m},impact:g,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}};var Aa=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,a=function(e,t){return e.map(e=>t[e])}(i.all,n),s=Ji({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},_a=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=ia({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return ca({pageBorderBoxCenter:a,draggable:t,viewport:o})},Pa=({state:e,dimensions:t,viewport:n})=>{"SNAP"!==e.movementMode&&(process.env.NODE_ENV,si());const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,c=a[e.critical.draggable.id],l=va(r);l||("production"!==process.env.NODE_ENV?si(0,"Must be over a destination in SNAP movement mode"):si());const u=s[l],d=Aa({impact:r,viewport:o,destination:u,draggables:a}),p=_a({impact:d,draggable:c,droppable:u,draggables:a,viewport:o,afterCritical:e.afterCritical});return Oa({impact:d,clientSelection:p,state:e,dimensions:i,viewport:o})},La=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=ga(t.axis,e.displaceBy),i=Li(t.descriptor.id,n),a=i.indexOf(e);-1===a&&("production"!==process.env.NODE_ENV?si(0,"Expected draggable to be inside home list"):si());const s=i.slice(a+1),c=s.reduce((e,t)=>(e[t.descriptor.id]=!0,e),{}),l={inVirtualList:"virtual"===t.descriptor.mode,displacedBy:o,effected:c};var u;return{impact:{displaced:Ji({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(u=e.descriptor,{index:u.index,droppableId:u.droppableId})}},afterCritical:l}};const Ra=e=>{process.env.NODE_ENV},Ba=e=>{process.env.NODE_ENV};var Ta=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(e=>{const o=e.descriptor.droppableId,i=(e=>{const t=e.frame;return t||("production"!==process.env.NODE_ENV?si(0,"Expected Droppable to have a frame"):si()),t})(t[o]).scroll.diff.value,a=(({draggable:e,offset:t,initialWindowScroll:n})=>{const r=$o(e.client,t),o=Vo(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}})({draggable:e,offset:mi(r,i),initialWindowScroll:n.scroll.initial});return a})};const Ma=e=>"SNAP"===e.movementMode,ka=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:Na(e.droppables,t)}))(e.dimensions,t);return!Ma(e)||n?Oa({state:e,dimensions:r}):Pa({state:e,dimensions:r})};function ja(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const $a={phase:"IDLE",completed:null,shouldFlush:!1};var Va=(e=$a,t)=>{if("FLUSH"===t.type)return{...$a,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&("production"!==process.env.NODE_ENV?si(0,"INITIAL_PUBLISH must come after a IDLE phase"):si());const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[n.draggable.id],c=i.droppables[n.droppable.id],l={selection:r,borderBoxCenter:s.client.borderBox.center,offset:gi},u={client:l,page:{selection:mi(l.selection,o.scroll.initial),borderBoxCenter:mi(l.selection,o.scroll.initial),offset:mi(l.selection,o.scroll.diff.value)}},d=_i(i.droppables).every(e=>!e.isFixedOnPage),{impact:p,afterCritical:f}=La({draggable:s,home:c,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:i,initial:u,current:u,isWindowScrollAllowed:d,impact:p,afterCritical:f,onLiftImpact:p,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&("production"!==process.env.NODE_ENV?si(0,`Collection cannot start from phase ${e.phase}`):si());return{...e,phase:"COLLECTING"}}if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&("production"!==process.env.NODE_ENV?si(0,`Unexpected ${t.type} received in phase ${e.phase}`):si()),(({state:e,published:t})=>{Ra();const n=t.modified.map(t=>{const n=e.dimensions.droppables[t.droppableId];return Ci(n,t.scroll)}),r={...e.dimensions.droppables,...Oi(n)},o=Ai(Ta({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(e=>{delete i[e]});const a={droppables:r,draggables:i},s=va(e.impact),c=s?a.droppables[s]:null,l=a.draggables[e.critical.draggable.id],u=a.droppables[e.critical.droppable.id],{impact:d,afterCritical:p}=La({draggable:l,home:u,draggables:i,viewport:e.viewport}),f=c&&c.isCombineEnabled?e.impact:d,g=Sa({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:f,viewport:e.viewport,afterCritical:p});Ba();const m={...e,phase:"DRAGGING",impact:g,onLiftImpact:d,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?m:{...m,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;Ea(e)||("production"!==process.env.NODE_ENV?si(0,`${t.type} not permitted in phase ${e.phase}`):si());const{client:n}=t.payload;return bi(n,e.current.client.selection)?e:Oa({state:e,clientSelection:n,impact:Ma(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return ja(e);if("COLLECTING"===e.phase)return ja(e);Ea(e)||("production"!==process.env.NODE_ENV?si(0,`${t.type} not permitted in phase ${e.phase}`):si());const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=Ci(o,r);return ka(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Ea(e)||("production"!==process.env.NODE_ENV?si(0,`Attempting to move in an unsupported phase ${e.phase}`):si());const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||("production"!==process.env.NODE_ENV?si(0,`Cannot find Droppable[id: ${n}] to toggle its enabled state`):si()),o.isEnabled===r&&("production"!==process.env.NODE_ENV?si(0,`Trying to set droppable isEnabled to ${String(r)}\n but it is already ${String(o.isEnabled)}`):si());const i={...o,isEnabled:r};return ka(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Ea(e)||("production"!==process.env.NODE_ENV?si(0,`Attempting to move in an unsupported phase ${e.phase}`):si());const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||("production"!==process.env.NODE_ENV?si(0,`Cannot find Droppable[id: ${n}] to toggle its isCombineEnabled state`):si()),o.isCombineEnabled===r&&("production"!==process.env.NODE_ENV?si(0,`Trying to set droppable isCombineEnabled to ${String(r)}\n but it is already ${String(o.isCombineEnabled)}`):si());const i={...o,isCombineEnabled:r};return ka(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;Ea(e)||("production"!==process.env.NODE_ENV?si(0,`Cannot move by window in phase ${e.phase}`):si()),e.isWindowScrollAllowed||("production"!==process.env.NODE_ENV?si(0,"Window scrolling is currently not supported for fixed lists"):si());const n=t.payload.newScroll;if(bi(e.viewport.scroll.current,n))return ja(e);const r=aa(e.viewport,n);return Ma(e)?Pa({state:e,viewport:r}):Oa({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!Ea(e))return e;const n=t.payload.maxScroll;if(bi(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&("production"!==process.env.NODE_ENV?si(0,`${t.type} received while not in DRAGGING phase`):si());const n=ya({state:e,type:t.type});return n?Oa({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;"COLLECTING"!==e.phase&&("production"!==process.env.NODE_ENV?si(0,"Can only move into the DROP_PENDING phase from the COLLECTING phase"):si());return{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&("production"!==process.env.NODE_ENV?si(0,`Cannot animate drop from phase ${e.phase}`):si());return{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};const Fa=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),za=()=>({type:"COLLECTION_STARTING",payload:null}),Ga=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Wa=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Ua=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Ha=e=>({type:"MOVE",payload:e}),Ja=()=>({type:"MOVE_UP",payload:null}),Xa=()=>({type:"MOVE_DOWN",payload:null}),Ya=()=>({type:"MOVE_RIGHT",payload:null}),Qa=()=>({type:"MOVE_LEFT",payload:null}),qa=e=>({type:"DROP_COMPLETE",payload:e}),Ka=e=>({type:"DROP",payload:e}),Za=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});function es(e,t){if("production"!==process.env.NODE_ENV){!function(e){if(e.length<=1)return;const t=e.map(e=>e.descriptor.index),n={};for(let o=1;o<t.length;o++){const e=t[o];e!==t[o-1]+1&&(n[e]=!0)}if(!Object.keys(n).length)return;const r=t.map(e=>Boolean(n[e])?`[🔥${e}]`:`${e}`).join(", ");"production"!==process.env.NODE_ENV&&ei(`\n Detected non-consecutive <Draggable /> indexes.\n\n (This can cause unexpected bugs)\n\n ${r}\n `)}(Li(e.droppable.id,t.draggables))}}const ts="cubic-bezier(.2,1,.1,1)",ns={drop:0,combining:.7},rs={drop:.75},os={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},is=`${os.outOfTheWay}s ${"cubic-bezier(0.2, 0, 0, 1)"}`,as={fluid:`opacity ${is}`,snap:`transform ${is}, opacity ${is}`,drop:e=>{const t=`${e}s ${ts}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${is}`,placeholder:`height ${is}, width ${is}, margin ${is}`},ss=e=>bi(e,gi)?void 0:`translate(${e.x}px, ${e.y}px)`,cs=ss,ls=(e,t)=>{const n=ss(e);if(n)return t?`${n} scale(${rs.drop})`:n},{minDropTime:us,maxDropTime:ds}=os,ps=ds-us;var fs=({getState:e,dispatch:t})=>n=>r=>{if("DROP"!==r.type)return void n(r);const o=e(),i=r.payload.reason;if("COLLECTING"===o.phase)return void t((e=>({type:"DROP_PENDING",payload:e}))({reason:i}));if("IDLE"===o.phase)return;"DROP_PENDING"===o.phase&&o.isWaiting&&("production"!==process.env.NODE_ENV?si(0,"A DROP action occurred while DROP_PENDING and still waiting"):si()),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&("production"!==process.env.NODE_ENV?si(0,`Cannot drop in phase: ${o.phase}`):si());const a=o.critical,s=o.dimensions,c=s.draggables[o.critical.draggable.id],{impact:l,didDropInsideDroppable:u}=(({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>{if(!n.at||"DROP"!==t)return{impact:Aa({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1};return"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:ji},didDropInsideDroppable:!0}})({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),d=u?Ri(l):null,p=u?Bi(l):null,f={index:a.draggable.index,droppableId:a.droppable.id},g={draggableId:c.descriptor.id,type:c.descriptor.type,source:f,reason:i,mode:o.movementMode,destination:d,combine:p},m=(({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=va(e),c=s?a[s]:null,l=a[t.descriptor.droppableId],u=_a({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:c||l,viewport:r});return hi(u,t.client.borderBox.center)})({impact:l,draggable:c,dimensions:s,viewport:o.viewport,afterCritical:o.afterCritical}),h={critical:o.critical,afterCritical:o.afterCritical,result:g,impact:l};if(!(!bi(o.current.client.offset,m)||Boolean(g.combine)))return void t(qa({completed:h}));const b=(({current:e,destination:t,reason:n})=>{const r=Ei(e,t);if(r<=0)return us;if(r>=1500)return ds;const o=us+ps*(r/1500);return Number(("CANCEL"===n?.6*o:o).toFixed(2))})({current:o.current.client.offset,destination:m,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:m,dropDuration:b,completed:h}))},gs=()=>({x:window.pageXOffset,y:window.pageYOffset});function ms({onWindowScroll:e}){const t=Jo(function(){e(gs())}),n=(r=t,{eventName:"scroll",options:{passive:!0,capture:!1},fn:e=>{e.target!==window&&e.target!==window.document||r()}});var r;let o=ni;function i(){return o!==ni}return{start:function(){i()&&("production"!==process.env.NODE_ENV?si(0,"Cannot start scroll listener when already active"):si()),o=ri(window,[n])},stop:function(){i()||("production"!==process.env.NODE_ENV?si(0,"Cannot stop scroll listener when not active"):si()),t.cancel(),o(),o=ni},isActive:i}}var hs=e=>{const t=ms({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&(e=>"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type)(n)&&t.stop(),e(n)}},bs=()=>{const e=[];return{add:t=>{const n=setTimeout(()=>(t=>{const n=e.findIndex(e=>e.timerId===t);-1===n&&("production"!==process.env.NODE_ENV?si(0,"Could not find timer"):si());const[r]=e.splice(n,1);r.callback()})(n)),r={timerId:n,callback:t};e.push(r)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach(e=>{clearTimeout(e.timerId),e.callback()})}}};const vs=(e,t)=>{Ra(),t(),Ba()},ys=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Es(e,t,n,r){if(!e)return void n(r(t));const o=(e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),o=o=>{t?"production"!==process.env.NODE_ENV&&ei("Announcement already made. Not making a second announcement"):n?"production"!==process.env.NODE_ENV&&ei("\n Announcements cannot be made asynchronously.\n Default message has already been announced.\n "):(t=!0,e(o),clearTimeout(r))};return o.wasCalled=()=>t,o})(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}var xs=(e,t)=>{const n=((e,t)=>{const n=bs();let r=null;const o=n=>{r||("production"!==process.env.NODE_ENV?si(0,"Cannot fire onDragEnd when there is no matching onDragStart"):si()),r=null,vs(0,()=>Es(e().onDragEnd,n,t,fi.onDragEnd))};return{beforeCapture:(t,n)=>{r&&("production"!==process.env.NODE_ENV?si(0,"Cannot fire onBeforeCapture as a drag start has already been published"):si()),vs(0,()=>{const r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},beforeStart:(t,n)=>{r&&("production"!==process.env.NODE_ENV?si(0,"Cannot fire onBeforeDragStart as a drag start has already been published"):si()),vs(0,()=>{const r=e().onBeforeDragStart;r&&r(ys(t,n))})},start:(o,i)=>{r&&("production"!==process.env.NODE_ENV?si(0,"Cannot fire onBeforeDragStart as a drag start has already been published"):si());const a=ys(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add(()=>{vs(0,()=>Es(e().onDragStart,a,t,fi.onDragStart))})},update:(o,i)=>{const a=Ri(i),s=Bi(i);r||("production"!==process.env.NODE_ENV?si(0,"Cannot fire onDragMove when onDragStart has not been called"):si());const c=!((e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r})(o,r.lastCritical);c&&(r.lastCritical=o);const l=(d=a,!(null==(u=r.lastLocation)&&null==d||null!=u&&null!=d&&u.droppableId===d.droppableId&&u.index===d.index));var u,d;l&&(r.lastLocation=a);const p=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(r.lastCombine,s);if(p&&(r.lastCombine=s),!c&&!l&&!p)return;const f={...ys(o,r.mode),combine:s,destination:a};n.add(()=>{vs(0,()=>Es(e().onDragUpdate,f,t,fi.onDragUpdate))})},flush:()=>{r||("production"!==process.env.NODE_ENV?si(0,"Can only flush responders while dragging"):si()),n.flush()},drop:o,abort:()=>{if(!r)return;const e={...ys(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>r=>{if("BEFORE_INITIAL_CAPTURE"===r.type)return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if("INITIAL_PUBLISH"===r.type){const e=r.payload.critical;return n.beforeStart(e,r.payload.movementMode),t(r),void n.start(e,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),"FLUSH"===r.type)return void n.abort();const o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}};var ws=e=>t=>n=>{if("DROP_ANIMATION_FINISHED"!==n.type)return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&("production"!==process.env.NODE_ENV?si(0,"Cannot finish a drop animating when no drop is occurring"):si()),e.dispatch(qa({completed:r.completed}))};var Ds=e=>{let t=null,n=null;return r=>o=>{if("FLUSH"!==o.type&&"DROP_COMPLETE"!==o.type&&"DROP_ANIMATION_FINISHED"!==o.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),"DROP_ANIMATE"!==o.type)return;const i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame(()=>{n=null,t=ri(window,[i])})}};var Is=e=>t=>n=>{if(t(n),"PUBLISH_WHILE_DRAGGING"!==n.type)return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Ka({reason:r.reason})))};const Ss="production"!==process.env.NODE_ENV&&"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"@hello-pangea/dnd"}):cr;var Ns=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>{return ir(Va,Ss(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("production"===process.env.NODE_ENV?Zn(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=t.map(function(e){return e(o)});return r=cr.apply(void 0,i)(n.dispatch),Kn(Kn({},n),{},{dispatch:r})}}}((a=n,()=>e=>t=>{"INITIAL_PUBLISH"===t.type&&a.dragging(),"DROP_ANIMATE"===t.type&&a.dropping(t.payload.completed.result.reason),"FLUSH"!==t.type&&"DROP_COMPLETE"!==t.type||a.resting(),e(t)}),(e=>()=>t=>n=>{"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>r=>o=>{if("LIFT"!==o.type)return void r(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,c=t();"DROP_ANIMATING"===c.phase&&n(qa({completed:c.completed})),"IDLE"!==t().phase&&("production"!==process.env.NODE_ENV?si(0,"Unexpected phase to start a drag"):si()),n({type:"FLUSH",payload:null}),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:s}});const l={draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},{critical:u,dimensions:d,viewport:p}=e.startPublishing(l);es(u,d),n({type:"INITIAL_PUBLISH",payload:{critical:u,dimensions:d,clientSelection:a,movementMode:s,viewport:p}})})(e),fs,ws,Ds,Is,(e=>t=>n=>r=>{if((e=>"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type)(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);const o=t.getState();return"DRAGGING"!==o.phase&&("production"!==process.env.NODE_ENV?si(0,"Expected phase to be DRAGGING after INITIAL_PUBLISH"):si()),void e.start(o)}n(r),e.scroll(t.getState())})(i),hs,(e=>{let t=!1;return()=>n=>r=>{if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),xs(r,o))));var a};var Cs=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=hi({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},Os=()=>{const e=document.documentElement;return e||("production"!==process.env.NODE_ENV?si(0,"Cannot find document.documentElement"):si()),e},As=()=>{const e=Os();return Cs({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},_s=({critical:e,scrollOptions:t,registry:n})=>{Ra();const r=(()=>{const e=gs(),t=As(),n=e.y,r=e.x,o=Os(),i=o.clientWidth,a=o.clientHeight;return{frame:Ro({top:n,left:r,right:r+i,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:gi,displacement:gi}}}})(),o=r.scroll.current,i=e.droppable,a=n.droppable.getAllByType(i.type).map(e=>e.callbacks.getDimensionAndWatchScroll(o,t)),s=n.draggable.getAllByType(e.draggable.type).map(e=>e.getDimension(o)),c={draggables:Ai(s),droppables:Oi(a)};Ba();return{dimensions:c,critical:e,viewport:r}};function Ps(e,t,n){if(n.descriptor.id===t.id)return!1;if(n.descriptor.type!==t.type)return!1;return"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode||("production"!==process.env.NODE_ENV&&ei(`\n You are attempting to add or remove a Draggable [id: ${n.descriptor.id}]\n while a drag is occurring. This is only supported for virtual lists.\n\n See https://github.com/hello-pangea/dnd/blob/main/docs/patterns/virtual-lists.md\n `),!1)}var Ls=(e,t)=>{let n=null;const r=function({registry:e,callbacks:t}){let n={additions:{},removals:{},modified:{}},r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null,Ra();const{additions:o,removals:i,modified:a}=n,s=Object.keys(o).map(t=>e.draggable.getById(t).getDimension(gi)).sort((e,t)=>e.descriptor.index-t.descriptor.index),c=Object.keys(a).map(t=>({droppableId:t,scroll:e.droppable.getById(t).callbacks.getScrollWhileDragging()})),l={additions:s,removals:Object.keys(i),modified:c};n={additions:{},removals:{},modified:{}},Ba(),t.publish(l)}))};return{add:e=>{const t=e.descriptor.id;n.additions[t]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[t]&&delete n.removals[t],o()},remove:e=>{const t=e.descriptor;n.removals[t.id]=!0,n.modified[t.droppableId]=!0,n.additions[t.id]&&delete n.additions[t.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=t=>{n||("production"!==process.env.NODE_ENV?si(0,"Should only be subscribed when a collection is occurring"):si());const o=n.critical.draggable;"ADDITION"===t.type&&Ps(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&Ps(e,o,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:(r,o)=>{e.droppable.exists(r)||("production"!==process.env.NODE_ENV?si(0,`Cannot update is enabled flag of Droppable ${r} as it is not registered`):si()),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:(r,o)=>{n&&(e.droppable.exists(r)||("production"!==process.env.NODE_ENV?si(0,`Cannot update isCombineEnabled flag of Droppable ${r} as it is not registered`):si()),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:o}))},scrollDroppable:(t,r)=>{n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:(r,o)=>{n&&(e.droppable.exists(r)||("production"!==process.env.NODE_ENV?si(0,`Cannot update the scroll on Droppable ${r} as it is not registered`):si()),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:t=>{n&&("production"!==process.env.NODE_ENV?si(0,"Cannot start capturing critical dimensions as there is already a collection"):si());const r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:i.descriptor},s=e.subscribe(o);return n={critical:a,unsubscribe:s},_s({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!n)return;r.stop();const t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach(e=>e.callbacks.dragStopped()),n.unsubscribe(),n=null}}},Rs=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason),Bs=e=>{window.scrollBy(e.x,e.y)};const Ts=Ho(e=>_i(e).filter(e=>!!e.isEnabled&&!!e.frame));var Ms=({center:e,destination:t,droppables:n})=>{if(t){const e=n[t];return e.frame?e:null}const r=((e,t)=>Ts(t).find(t=>(t.frame||("production"!==process.env.NODE_ENV?si(0,"Invalid result"):si()),xa(t.frame.pageMarginBox)(e)))||null)(e,n);return r};const ks={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var js=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;if(0===r)return"production"!==process.env.NODE_ENV&&ei("\n Detected distance range of 0 in the fluid auto scroller\n This is unexpected and would cause a divide by 0 issue.\n Not allowing an auto scroll\n "),0;return(n-e)/r},$s=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=((e,t,n=()=>ks)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const o=1-js({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=r.maxPixelScroll*r.ease(o);return Math.ceil(i)})(e,t,o);return 0===i?0:r?Math.max(((e,t,n)=>{const r=n(),o=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,a=t,s=i,c=Date.now()-a;if(c>=i)return e;if(c<o)return 1;const l=js({startOfRange:o,endOfRange:s,current:c}),u=e*r.ease(l);return Math.ceil(u)})(i,n,o),1):i},Vs=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,n=()=>ks)=>{const r=n();return{startScrollingFrom:e[t.size]*r.startFromPercentage,maxScrollValueAt:e[t.size]*r.maxScrollAtPercentage}})(e,r,i);return t[r.end]<t[r.start]?$s({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*$s({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const Fs=wi(e=>0===e?0:e);var zs=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},s=Vs({container:t,distanceToEdges:a,dragStartTime:e,axis:Gi,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=Vs({container:t,distanceToEdges:a,dragStartTime:e,axis:Wi,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=Fs({x:c,y:s});if(bi(l,gi))return null;const u=(({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,o=t.width>e.width;return o||r?o&&r?null:{x:o?0:n.x,y:r?0:n.y}:n})({container:t,subject:n,proposedScroll:l});return u?bi(u,gi)?null:u:null};const Gs=wi(e=>0===e?0:e>0?1:-1),Ws=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{const o=mi(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return bi(i,gi)?null:i}})(),Us=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=Gs(n),i=Ws({max:r,current:t,change:o});return!i||(0!==o.x&&0===i.x||0!==o.y&&0===i.y)},Hs=(e,t)=>Us({current:e.scroll.current,max:e.scroll.max,change:t}),Js=(e,t)=>{const n=e.frame;return!!n&&Us({current:n.scroll.current,max:n.scroll.max,change:t})};var Xs=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,s=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const o=(({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=zs({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&Hs(e,a)?a:null})({dragStartTime:t,viewport:e.viewport,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(o)return void r(o)}const c=Ms({center:a,destination:va(e.impact),droppables:e.dimensions.droppables});if(!c)return;const l=(({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=zs({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Js(e,s)?s:null})({dragStartTime:t,droppable:c,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});l&&o(c.descriptor.id,l)},Ys=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(e,n)=>{if(!Js(e,n))return n;const r=((e,t)=>{const n=e.frame;return n&&Js(e,t)?Ws({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!r)return t(e.descriptor.id,n),null;const o=hi(n,r);t(e.descriptor.id,o);return hi(n,o)},o=(e,t,r)=>{if(!e)return r;if(!Hs(t,r))return r;const o=((e,t)=>{if(!Hs(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return Ws({current:r,max:n,change:t})})(t,r);if(!o)return n(r),null;const i=hi(r,o);n(i);return hi(r,i)};return t=>{const n=t.scrollJumpRequest;if(!n)return;const i=va(t.impact);i||("production"!==process.env.NODE_ENV?si(0,"Cannot perform a jump scroll when there is no destination"):si());const a=r(t.dimensions.droppables[i],n);if(!a)return;const s=t.viewport,c=o(t.isWindowScrollAllowed,s,a);c&&((t,n)=>{const r=mi(t.current.client.selection,n);e({client:r})})(t,c)}},Qs=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>ks})=>{const r=Jo(e),o=Jo(t);let i=null;const a=e=>{i||("production"!==process.env.NODE_ENV?si(0,"Cannot fluid scroll if not dragging"):si());const{shouldUseTimeDampening:t,dragStartTime:a}=i;Xs({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{Ra(),i&&("production"!==process.env.NODE_ENV?si(0,"Cannot start auto scrolling when already started"):si());const t=Date.now();let r=!1;const o=()=>{r=!0};Xs({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:n}),i={dragStartTime:t,shouldUseTimeDampening:r},Ba(),r&&a(e)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=Ys({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{r().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}};const qs="data-rfd",Ks=(()=>{const e=`${qs}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Zs=(()=>{const e=`${qs}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),ec=(()=>{const e=`${qs}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),tc={contextId:`${qs}-scroll-container-context-id`},nc=(e,t)=>e.map(e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""}).join(" ");var rc="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;const oc=()=>{const e=document.querySelector("head");return e||("production"!==process.env.NODE_ENV?si(0,"Cannot find the head to append a style to"):si()),e},ic=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function ac(e,n){const r=Oo(()=>(e=>{const t=(n=e,e=>`[${e}="${n}"]`);var n;const r=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(Ks.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}})(),o=[(()=>{const e=`\n transition: ${as.outOfTheWay};\n `;return{selector:t(Zs.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(ec.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:nc(o,"always"),resting:nc(o,"resting"),dragging:nc(o,"dragging"),dropAnimating:nc(o,"dropAnimating"),userCancel:nc(o,"userCancel")}})(e),[e]),o=t.useRef(null),i=t.useRef(null),a=Ao(Ho(e=>{const t=i.current;t||("production"!==process.env.NODE_ENV?si(0,"Cannot set dynamic style element if it is not set"):si()),t.textContent=e}),[]),s=Ao(e=>{const t=o.current;t||("production"!==process.env.NODE_ENV?si(0,"Cannot set dynamic style element if it is not set"):si()),t.textContent=e},[]);rc(()=>{(o.current||i.current)&&("production"!==process.env.NODE_ENV?si(0,"style elements already mounted"):si());const t=ic(n),c=ic(n);return o.current=t,i.current=c,t.setAttribute(`${qs}-always`,e),c.setAttribute(`${qs}-dynamic`,e),oc().appendChild(t),oc().appendChild(c),s(r.always),a(r.resting),()=>{const e=e=>{const t=e.current;t||("production"!==process.env.NODE_ENV?si(0,"Cannot unmount ref as it is not set"):si()),oc().removeChild(t),e.current=null};e(o),e(i)}},[n,s,a,r.always,r.resting,e]);const c=Ao(()=>a(r.dragging),[a,r.dragging]),l=Ao(e=>{a("DROP"!==e?r.userCancel:r.dropAnimating)},[a,r.dropAnimating,r.userCancel]),u=Ao(()=>{i.current&&a(r.resting)},[a,r.resting]);return Oo(()=>({dragging:c,dropping:l,resting:u}),[c,l,u])}function sc(e,t){return Array.from(e.querySelectorAll(t))}var cc=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function lc(e){return e instanceof cc(e).HTMLElement}function uc(e,t){const n=`[${Ks.contextId}="${e}"]`,r=sc(document,n);if(!r.length)return"production"!==process.env.NODE_ENV&&ei(`Unable to find any drag handles in the context "${e}"`),null;const o=r.find(e=>e.getAttribute(Ks.draggableId)===t);return o?lc(o)?o:("production"!==process.env.NODE_ENV&&ei("drag handle needs to be a HTMLElement"),null):("production"!==process.env.NODE_ENV&&ei(`Unable to find drag handle with id "${t}" as no handle with a matching id was found`),null)}function dc(){const e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach(t=>t(e))}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:(t,n)=>{const r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],e.droppables[t.descriptor.droppableId]&&n({type:"REMOVAL",value:t}))},getById:function(e){const t=r(e);return t||("production"!==process.env.NODE_ENV?si(0,`Cannot find draggable entry with id [${e}]`):si()),t},findById:r,exists:e=>Boolean(r(e)),getAllByType:t=>Object.values(e.draggables).filter(e=>e.descriptor.type===t)},droppable:{register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=o(e);return t||("production"!==process.env.NODE_ENV?si(0,`Cannot find droppable entry with id [${e}]`):si()),t},findById:o,exists:e=>Boolean(o(e)),getAllByType:t=>Object.values(e.droppables).filter(e=>e.descriptor.type===t)},subscribe:function(e){return t.push(e),function(){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var pc=t.createContext(null),fc=()=>{const e=document.body;return e||("production"!==process.env.NODE_ENV?si(0,"Cannot find document.body"):si()),e};var gc={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};let mc=0;const hc={separator:"::"};var bc="useId"in t?function(e,n=hc){const r=t.useId();return Oo(()=>`${e}${n.separator}${r}`,[n.separator,e,r])}:function(e,t=hc){return Oo(()=>`${e}${t.separator}${mc++}`,[t.separator,e])};var vc=t.createContext(null),yc="^16.8.5 || ^17.0.0 || ^18.0.0";const Ec=/(\d+)\.(\d+)\.(\d+)/,xc=e=>{const t=Ec.exec(e);null==t&&("production"!==process.env.NODE_ENV?si(0,`Unable to parse React version ${e}`):si());return{major:Number(t[1]),minor:Number(t[2]),patch:Number(t[3]),raw:e}};const wc="\n We expect a html5 doctype: <!doctype html>\n This is to ensure consistent browser layout and measurement\n\n More information: https://github.com/hello-pangea/dnd/blob/main/docs/guides/doctype.md\n";function Dc(e){"production"!==process.env.NODE_ENV&&e()}function Ic(e,n){Dc(()=>{t.useEffect(()=>{try{e()}catch(t){ti(`\n A setup problem was encountered.\n\n > ${t.message}\n `)}},n)})}function Sc(){Ic(()=>{((e,t)=>{const n=xc(e),r=xc(t);((e,t)=>t.major>e.major||!(t.major<e.major)&&(t.minor>e.minor||!(t.minor<e.minor)&&t.patch>=e.patch))(n,r)||"production"!==process.env.NODE_ENV&&ei(`\n React version: [${r.raw}]\n does not satisfy expected peer dependency version: [${n.raw}]\n\n This can result in run time bugs, and even fatal crashes\n `)})(yc,t.version),(e=>{const t=e.doctype;t?("html"!==t.name.toLowerCase()&&"production"!==process.env.NODE_ENV&&ei(`\n Unexpected <!doctype> found: (${t.name})\n\n ${wc}\n `),""!==t.publicId&&"production"!==process.env.NODE_ENV&&ei(`\n Unexpected <!doctype> publicId found: (${t.publicId})\n A html5 doctype does not have a publicId\n\n ${wc}\n `)):"production"!==process.env.NODE_ENV&&ei(`\n No <!doctype html> found.\n\n ${wc}\n `)})(document)},[])}function Nc(e){const n=t.useRef(e);return t.useEffect(()=>{n.current=e}),n}function Cc(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const Oc=9,Ac=13,_c=33,Pc=34,Lc=35,Rc=36,Bc={[Ac]:!0,[Oc]:!0};var Tc=e=>{Bc[e.keyCode]&&e.preventDefault()};var Mc=(()=>{const e="visibilitychange";if("undefined"==typeof document)return e;return[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})();const kc={type:"IDLE"};function jc({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:o,clientY:i}=e;if(0!==t)return;const a={x:o,y:i},s=n();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&("production"!==process.env.NODE_ENV?si(0,"Cannot be IDLE"):si());const c=s.point;if(l=c,u=a,!(Math.abs(u.x-l.x)>=5||Math.abs(u.y-l.y)>=5))return;var l,u;e.preventDefault();const d=s.actions.fluidLift(a);r({type:"DRAGGING",actions:d})}},{eventName:"mouseup",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===n().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==n().type)return 27===t.keyCode?(t.preventDefault(),void e()):void Tc(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===n().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const r=n();"IDLE"===r.type&&("production"!==process.env.NODE_ENV?si(0,"Unexpected phase"):si()),r.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:Mc,fn:e}]}function $c(){}const Vc={[Pc]:!0,[_c]:!0,[Rc]:!0,[Lc]:!0};function Fc(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:r=>27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(Vc[r.keyCode]?r.preventDefault():Tc(r))},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Mc,fn:n}]}const zc={type:"IDLE"};const Gc=["input","button","textarea","select","option","optgroup","video","audio"];function Wc(e,t){if(null==t)return!1;if(Gc.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&Wc(e,t.parentElement)}function Uc(e,t){const n=t.target;return!!lc(n)&&Wc(e,n)}var Hc=e=>Ro(e.getBoundingClientRect()).center;const Jc=(()=>{const e="matches";if("undefined"==typeof document)return e;return[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function Xc(e,t){return null==e?null:e[Jc](t)?e:Xc(e.parentElement,t)}function Yc(e,t){return e.closest?e.closest(t):Xc(e,t)}function Qc(e,t){const n=t.target;if(!((r=n)instanceof cc(r).Element))return"production"!==process.env.NODE_ENV&&ei("event.target must be a Element"),null;var r;const o=function(e){return`[${Ks.contextId}="${e}"]`}(e),i=Yc(n,o);return i?lc(i)?i:("production"!==process.env.NODE_ENV&&ei("drag handle must be a HTMLElement"),null):null}function qc(e){e.preventDefault()}function Kc({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return n()?e===t||(r&&"production"!==process.env.NODE_ENV&&ei(`\n Cannot perform action.\n The actions you used belong to an outdated phase\n\n Current phase: ${e}\n You called an action from outdated phase: ${t}\n\n Tips:\n\n - Do not use preDragActions actions after calling preDragActions.lift()\n `),!1):(r&&"production"!==process.env.NODE_ENV&&ei("\n Cannot perform action.\n The sensor no longer has an action lock.\n\n Tips:\n\n - Throw away your action handlers when forceStop() is called\n - Check actions.isActive() if you really need to\n "),!1)}function Zc({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return o?!!o.options.isEnabled&&!!Rs(t.getState(),r):("production"!==process.env.NODE_ENV&&ei(`Unable to find draggable with id: ${r}`),!1)}function el({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!Zc({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const s=r.draggable.getById(o),c=function(e,t){const n=`[${Zs.contextId}="${e}"]`,r=sc(document,n).find(e=>e.getAttribute(Zs.id)===t);return r?lc(r)?r:("production"!==process.env.NODE_ENV&&ei("Draggable element is not a HTMLElement"),null):null}(t,s.descriptor.id);if(!c)return"production"!==process.env.NODE_ENV&&ei(`Unable to find draggable element with id: ${o}`),null;if(a&&!s.options.canDragInteractiveElements&&Uc(c,a))return null;const l=e.claim(i||ni);let u="PRE_DRAG";function d(){return s.options.shouldRespectForcePress}function p(){return e.isActive(l)}const f=function(e,t){Kc({expected:e,phase:u,isLockActive:p,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function g(t){function r(){e.release(),u="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=ri(window,[{eventName:"click",fn:qc,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(Ka({reason:e}))}return"PRE_DRAG"!==u&&(r(),"production"!==process.env.NODE_ENV?si(0,`Cannot lift in phase ${u}`):si()),n.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),u="DRAGGING",{isActive:()=>Kc({expected:"DRAGGING",phase:u,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:d,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>Kc({expected:"PRE_DRAG",phase:u,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:d,fluidLift:function(e){const t=Jo(e=>{f(()=>Ha({client:e}))});return{...g({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>f(Ja),moveRight:()=>f(Ya),moveDown:()=>f(Xa),moveLeft:()=>f(Qa)};return g({liftActionArgs:{id:o,clientSelection:Hc(c),movementMode:"SNAP"},cleanup:ni,actions:e})},abort:function(){Kc({expected:"PRE_DRAG",phase:u,isLockActive:p,shouldWarn:!0})&&e.release()}}}const tl=[function(e){const n=t.useRef(kc),r=t.useRef(ni),o=Oo(()=>({eventName:"mousedown",fn:function(t){if(t.defaultPrevented)return;if(0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;const n=e.findClosestDraggableId(t);if(!n)return;const o=e.tryGetLock(n,s,{sourceEvent:t});if(!o)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};r.current(),u(o,i)}}),[e]),i=Oo(()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}),[e]),a=Ao(function(){r.current=ri(window,[i,o],{passive:!1,capture:!0})},[i,o]),s=Ao(()=>{"IDLE"!==n.current.type&&(n.current=kc,r.current(),a())},[a]),c=Ao(()=>{const e=n.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),l=Ao(function(){const e=jc({cancel:c,completed:s,getPhase:()=>n.current,setPhase:e=>{n.current=e}});r.current=ri(window,e,{capture:!0,passive:!1})},[c,s]),u=Ao(function(e,t){"IDLE"!==n.current.type&&("production"!==process.env.NODE_ENV?si(0,"Expected to move from IDLE to PENDING drag"):si()),n.current={type:"PENDING",point:t,actions:e},l()},[l]);rc(function(){return a(),function(){r.current()}},[a])},function(e){const n=t.useRef($c),r=Oo(()=>({eventName:"keydown",fn:function(t){if(t.defaultPrevented)return;if(32!==t.keyCode)return;const r=e.findClosestDraggableId(t);if(!r)return;const i=e.tryGetLock(r,c,{sourceEvent:t});if(!i)return;t.preventDefault();let a=!0;const s=i.snapLift();function c(){a||("production"!==process.env.NODE_ENV?si(0,"Cannot stop capturing a keyboard drag when not capturing"):si()),a=!1,n.current(),o()}n.current(),n.current=ri(window,Fc(s,c),{capture:!0,passive:!1})}}),[e]),o=Ao(function(){n.current=ri(window,[r],{passive:!1,capture:!0})},[r]);rc(function(){return o(),function(){n.current()}},[o])},function(e){const n=t.useRef(zc),r=t.useRef(ni),o=Ao(function(){return n.current},[]),i=Ao(function(e){n.current=e},[]),a=Oo(()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const o=e.tryGetLock(n,c,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:s}=i,l={x:a,y:s};r.current(),p(o,l)}}),[e]),s=Ao(function(){r.current=ri(window,[a],{capture:!0,passive:!1})},[a]),c=Ao(()=>{const e=n.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(zc),r.current(),s())},[s,i]),l=Ao(()=>{const e=n.current;c(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[c]),u=Ao(function(){const e={capture:!0,passive:!1},t={cancel:l,completed:c,getPhase:o},n=ri(window,function({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const r=n();if("DRAGGING"!==r.type)return void e();r.hasMoved=!0;const{clientX:o,clientY:i}=t.touches[0],a={x:o,y:i};t.preventDefault(),r.actions.move(a)}},{eventName:"touchend",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===n().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const r=n();"IDLE"===r.type&&(process.env.NODE_ENV,si());const o=t.touches[0];if(!o)return;if(!(o.force>=.15))return;const i=r.actions.shouldRespectForcePress();if("PENDING"!==r.type)return i?r.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:Mc,fn:e}]}(t),e),i=ri(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:n=>{"DRAGGING"===t().type?(27===n.keyCode&&n.preventDefault(),e()):e()}},{eventName:Mc,fn:e}]}(t),e);r.current=function(){n(),i()}},[l,o,c]),d=Ao(function(){const e=o();"PENDING"!==e.type&&("production"!==process.env.NODE_ENV?si(0,`Cannot start dragging from phase ${e.type}`):si());const t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})},[o,i]),p=Ao(function(e,t){"IDLE"!==o().type&&("production"!==process.env.NODE_ENV?si(0,"Expected to move from IDLE to PENDING drag"):si());const n=setTimeout(d,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),u()},[u,o,i,d]);rc(function(){return s(),function(){r.current();const e=o();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(zc))}},[o,s,i]),rc(function(){return ri(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function nl({contextId:e,store:n,registry:r,customSensors:o,enableDefaultSensors:i}){const a=[...i?tl:[],...o||[]],s=t.useState(()=>function(){let e=null;function t(){e||("production"!==process.env.NODE_ENV?si(0,"Cannot release lock when there is no lock"):si()),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&("production"!==process.env.NODE_ENV?si(0,"Cannot claim lock as it is already claimed"):si());const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],c=Ao(function(e,t){Cc(e)&&!Cc(t)&&s.tryAbandon()},[s]);rc(function(){let e=n.getState();return n.subscribe(()=>{const t=n.getState();c(e,t),e=t})},[s,n,c]),rc(()=>s.tryAbandon,[s.tryAbandon]);const l=Ao(e=>Zc({lockAPI:s,registry:r,store:n,draggableId:e}),[s,r,n]),u=Ao((t,o,i)=>el({lockAPI:s,registry:r,contextId:e,store:n,draggableId:t,forceSensorStop:o||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[e,s,r,n]),d=Ao(t=>function(e,t){const n=Qc(e,t);return n?n.getAttribute(Ks.draggableId):null}(e,t),[e]),p=Ao(e=>{const t=r.draggable.findById(e);return t?t.options:null},[r.draggable]),f=Ao(function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))},[s,n]),g=Ao(()=>s.isClaimed(),[s]),m=Oo(()=>({canGetLock:l,tryGetLock:u,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:g}),[l,u,d,p,f,g]);var h;h=a,Dc(()=>{const e=Nc(h);Ic(()=>{e.current.length!==h.length&&("production"!==process.env.NODE_ENV?si(0,"Cannot change the amount of sensor hooks after mounting"):si())})});for(let t=0;t<a.length;t++)a[t](m)}function rl(e){return e.current||("production"!==process.env.NODE_ENV?si(0,"Could not find store from lazy ref"):si()),e.current}function ol(e){const{contextId:n,setCallbacks:o,sensors:i,nonce:a,dragHandleUsageInstructions:s}=e,c=t.useRef(null);Sc();const l=Nc(e),u=Ao(()=>(e=>({onBeforeCapture:n=>{const o=()=>{e.onBeforeCapture&&e.onBeforeCapture(n)};t.version.startsWith("16")||t.version.startsWith("17")?o():r.flushSync(o)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(l.current),[l]),d=Ao(()=>(e=>({...ks,...e.autoScrollerOptions,durationDampening:{...ks.durationDampening,...e.autoScrollerOptions}}))(l.current),[l]),p=function(e){const n=Oo(()=>(e=>`rfd-announcement-${e}`)(e),[e]),r=t.useRef(null);return t.useEffect(function(){const e=document.createElement("div");return r.current=e,e.id=n,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Ir(e.style,gc),fc().appendChild(e),function(){setTimeout(function(){const t=fc();t.contains(e)&&t.removeChild(e),e===r.current&&(r.current=null)})}},[n]),Ao(e=>{const t=r.current;t?t.textContent=e:"production"!==process.env.NODE_ENV&&ei(`\n A screen reader message was trying to be announced but it was unable to do so.\n This can occur if you unmount your <DragDropContext /> in your onDragEnd.\n Consider calling provided.announce() before the unmount so that the instruction will\n not be lost for users relying on a screen reader.\n\n Message not passed to screen reader:\n\n "${e}"\n `)},[])}(n),f=function({contextId:e,text:n}){const r=bc("hidden-text",{separator:"-"}),o=Oo(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:r}),[r,e]);return t.useEffect(function(){const e=document.createElement("div");return e.id=o,e.textContent=n,e.style.display="none",fc().appendChild(e),function(){const t=fc();t.contains(e)&&t.removeChild(e)}},[o,n]),o}({contextId:n,text:s}),g=ac(n,a),m=Ao(e=>{rl(c).dispatch(e)},[]),h=Oo(()=>sr({publishWhileDragging:Fa,updateDroppableScroll:Ga,updateDroppableIsEnabled:Wa,updateDroppableIsCombineEnabled:Ua,collectionStarting:za},m),[m]),b=function(){const e=Oo(dc,[]);return t.useEffect(()=>function(){t.version.startsWith("16")||t.version.startsWith("17")?requestAnimationFrame(e.clean):e.clean()},[e]),e}(),v=Oo(()=>Ls(b,h),[b,h]),y=Oo(()=>Qs({scrollWindow:Bs,scrollDroppable:v.scrollDroppable,getAutoScrollerOptions:d,...sr({move:Ha},m)}),[v.scrollDroppable,m,d]),E=function(e){const n=t.useRef({}),r=t.useRef(null),o=t.useRef(null),i=t.useRef(!1),a=Ao(function(e,t){const r={id:e,focus:t};return n.current[e]=r,function(){const t=n.current;t[e]!==r&&delete t[e]}},[]),s=Ao(function(t){const n=uc(e,t);n&&n!==document.activeElement&&n.focus()},[e]),c=Ao(function(e,t){r.current===e&&(r.current=t)},[]),l=Ao(function(){o.current||i.current&&(o.current=requestAnimationFrame(()=>{o.current=null;const e=r.current;e&&s(e)}))},[s]),u=Ao(function(e){r.current=null;const t=document.activeElement;t&&t.getAttribute(Ks.draggableId)===e&&(r.current=e)},[]);return rc(()=>(i.current=!0,function(){i.current=!1;const e=o.current;e&&cancelAnimationFrame(e)}),[]),Oo(()=>({register:a,tryRecordFocus:u,tryRestoreFocusRecorded:l,tryShiftRecord:c}),[a,u,l,c])}(n),x=Oo(()=>Ns({announce:p,autoScroller:y,dimensionMarshal:v,focusMarshal:E,getResponders:u,styleMarshal:g}),[p,y,v,E,u,g]);"production"!==process.env.NODE_ENV&&c.current&&c.current!==x&&"production"!==process.env.NODE_ENV&&ei("unexpected store change"),c.current=x;const w=Ao(()=>{const e=rl(c);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),D=Ao(()=>{const e=rl(c).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);o(Oo(()=>({isDragging:D,tryAbort:w}),[D,w]));const I=Ao(e=>Rs(rl(c).getState(),e),[]),S=Ao(()=>Ea(rl(c).getState()),[]),N=Oo(()=>({marshal:v,focus:E,contextId:n,canLift:I,isMovementAllowed:S,dragHandleUsageInstructionsId:f,registry:b}),[n,v,f,E,I,S,b]);return nl({contextId:n,store:x,registry:b,customSensors:i||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),t.useEffect(()=>w,[w]),t.createElement(vc.Provider,{value:N},t.createElement(Io,{context:pc,store:x},e.children))}let il=0;var al="useId"in t?function(){return t.useId()}:function(){return Oo(()=>""+il++,[])};function sl(e){const n=al(),r=e.dragHandleUsageInstructions||fi.dragHandleUsageInstructions;return t.createElement(ci,null,o=>t.createElement(ol,{nonce:e.nonce,contextId:n,setCallbacks:o,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 cl=5e3,ll=4500,ul=(e,t)=>t?as.drop(t.duration):e?as.snap:as.fluid,dl=(e,t)=>{if(e)return t?ns.drop:ns.combining};function pl(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:n,combineWith:r,dropping:o}=e,i=Boolean(r),a=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),s=Boolean(o),c=s?ls(n,i):cs(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:ul(a,o),transform:c,opacity:dl(i,s),zIndex:s?ll:cl,pointerEvents:"none"}}(e):{transform:cs((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}function fl(e){const n=bc("draggable"),{descriptor:r,registry:o,getDraggableRef:i,canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:c}=e,l=Oo(()=>({canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:c}),[a,c,s]),u=Ao(e=>{const t=i();return t||("production"!==process.env.NODE_ENV?si(0,"Cannot get dimension when no ref is set"):si()),function(e,t,n=gi){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Fo(o,r),a=Vo(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(r,t,e)},[r,i]),d=Oo(()=>({uniqueId:n,descriptor:r,options:l,getDimension:u}),[r,u,l,n]),p=t.useRef(d),f=t.useRef(!0);rc(()=>(o.draggable.register(p.current),()=>o.draggable.unregister(p.current)),[o.draggable]),rc(()=>{if(f.current)return void(f.current=!1);const e=p.current;p.current=d,o.draggable.update(d,e)},[d,o.draggable])}var gl=t.createContext(null);function ml(e){e&&lc(e)||("production"!==process.env.NODE_ENV?si(0,"\n provided.innerRef has not been provided with a HTMLElement.\n\n You can find a guide on using the innerRef callback functions at:\n https://github.com/hello-pangea/dnd/blob/main/docs/guides/using-inner-ref.md\n "):si())}function hl(e){const n=t.useContext(e);return n||("production"!==process.env.NODE_ENV?si(0,"Could not find required context"):si()),n}function bl(e){e.preventDefault()}var vl=e=>{const n=t.useRef(null),o=Ao((e=null)=>{n.current=e},[]),i=Ao(()=>n.current,[]),{contextId:a,dragHandleUsageInstructionsId:s,registry:c}=hl(vc),{type:l,droppableId:u}=hl(gl),d=Oo(()=>({id:e.draggableId,index:e.index,type:l,droppableId:u}),[e.draggableId,e.index,l,u]),{children:p,draggableId:f,isEnabled:g,shouldRespectForcePress:m,canDragInteractiveElements:h,isClone:b,mapped:v,dropAnimationFinished:y}=e;if(function(e,t,n){Ic(()=>{function r(e){return`Draggable[id: ${e}]: `}const o=e.draggableId;o||("production"!==process.env.NODE_ENV?si(0,"Draggable requires a draggableId"):si()),"string"!=typeof o&&("production"!==process.env.NODE_ENV?si(0,`Draggable requires a [string] draggableId.\n Provided: [type: ${typeof o}] (value: ${o})`):si()),Number.isInteger(e.index)||("production"!==process.env.NODE_ENV?si(0,`${r(o)} requires an integer index prop`):si()),"DRAGGING"!==e.mapped.type&&(ml(n()),e.isEnabled&&(uc(t,o)||("production"!==process.env.NODE_ENV?si(0,`${r(o)} Unable to find drag handle`):si())))})}(e,a,i),function(e){Dc(()=>{const n=t.useRef(e);Ic(()=>{e!==n.current&&("production"!==process.env.NODE_ENV?si(0,"Draggable isClone prop value changed during component life"):si())},[e])})}(b),!b){fl(Oo(()=>({descriptor:d,registry:c,getDraggableRef:i,canDragInteractiveElements:h,shouldRespectForcePress:m,isEnabled:g}),[d,c,i,h,m,g]))}const E=Oo(()=>g?{tabIndex:0,role:"button","aria-describedby":s,"data-rfd-drag-handle-draggable-id":f,"data-rfd-drag-handle-context-id":a,draggable:!1,onDragStart:bl}:null,[a,s,f,g]),x=Ao(e=>{"DRAGGING"===v.type&&v.dropping&&"transform"===e.propertyName&&(t.version.startsWith("16")||t.version.startsWith("17")?y():r.flushSync(y))},[y,v]),w=Oo(()=>{const e=pl(v),t="DRAGGING"===v.type&&v.dropping?x:void 0;return{innerRef:o,draggableProps:{"data-rfd-draggable-context-id":a,"data-rfd-draggable-id":f,style:e,onTransitionEnd:t},dragHandleProps:E}},[a,E,f,v,x,o]),D=Oo(()=>({draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}),[d.droppableId,d.id,d.index,d.type]);return t.createElement(t.Fragment,null,p(w,v.snapshot,D))},yl=(e,t)=>e===t,El=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function xl(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const wl={mapped:{type:"SECONDARY",offset:gi,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:xl(null)}};var Dl=Do(()=>{const e=function(){const e=Ho((e,t)=>({x:e,y:t})),t=Ho((e,t,n=null,r=null,o=null)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null})),n=Ho((e,n,r,o,i=null,a=null,s=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,o,i,a,null)}}));return(r,o)=>{if(Cc(r)){if(r.critical.draggable.id!==o.draggableId)return null;const t=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=va(r.impact),c=(i=r.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,l=r.forceShouldAnimate;return n(e(t.x,t.y),r.movementMode,a,o.isClone,s,c,l)}var i;if("DROP_ANIMATING"===r.phase){const e=r.completed;if(e.result.draggableId!==o.draggableId)return null;const n=o.isClone,i=r.dimensions.draggables[o.draggableId],a=e.result,s=a.mode,c=El(a),l=(e=>e.combine?e.combine.draggableId:null)(a),u={duration:r.dropDuration,curve:ts,moveTo:r.newHomeClientOffset,opacity:l?ns.drop:null,scale:l?rs.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:i,dropping:u,draggingOver:c,combineWith:l,mode:s,forceShouldAnimate:null,snapshot:t(s,n,c,l,u)}}}return null}}(),t=function(){const e=Ho((e,t)=>({x:e,y:t})),t=Ho(xl),n=Ho((e,n=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}})),r=e=>e?n(gi,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],c=Boolean(a.inVirtualList&&a.effected[t]),l=Bi(i),u=l&&l.draggableId===t?o:null;if(!s){if(!c)return r(u);if(i.displaced.invisible[t])return null;const o=vi(a.displacedBy.point),s=e(o.x,o.y);return n(s,u,!0)}if(c)return r(u);const d=i.displacedBy.point,p=e(d.x,d.y);return n(p,u,s.shouldAnimate)};return(e,t)=>{if(Cc(e))return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){const n=e.completed;return n.result.draggableId===t.draggableId?null:o(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return(n,r)=>e(n,r)||t(n,r)||wl},{dropAnimationFinished:Za},null,{context:pc,areStatePropsEqual:yl})(vl);function Il(e){return hl(gl).isUsingCloneFor!==e.draggableId||e.isClone?t.createElement(Dl,e):null}function Sl(e){const n="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,r=Boolean(e.disableInteractiveElementBlocking),o=Boolean(e.shouldRespectForcePress);return t.createElement(Il,Ir({},e,{isClone:!1,isEnabled:n,canDragInteractiveElements:r,shouldRespectForcePress:o}))}const Nl=e=>t=>e===t,Cl=Nl("scroll"),Ol=Nl("auto"),Al=Nl("visible"),_l=(e,t)=>t(e.overflowX)||t(e.overflowY),Pl=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return _l(n,Cl)||_l(n,Ol)},Ll=e=>null==e?null:e===document.body?(()=>{if("production"===process.env.NODE_ENV)return!1;const e=fc(),t=document.documentElement;if(t||(process.env.NODE_ENV,si()),!Pl(e))return!1;const n=window.getComputedStyle(t);return((e,t)=>t(e.overflowX)&&t(e.overflowY))({overflowX:n.overflowX,overflowY:n.overflowY},Al)||"production"!==process.env.NODE_ENV&&ei("\n We have detected that your <body> element might be a scroll container.\n We have found no reliable way of detecting whether the <body> element is a scroll container.\n Under most circumstances a <body> scroll bar will be on the <html> element (document.documentElement)\n\n Because we cannot determine if the <body> is a scroll container, and generally it is not one,\n we will be treating the <body> as *not* a scroll container\n\n More information: https://github.com/hello-pangea/dnd/blob/main/docs/guides/how-we-detect-scroll-containers.md\n "),!1})()?e:null:e===document.documentElement?null:Pl(e)?e:Ll(e.parentElement);var Rl=e=>({x:e.scrollLeft,y:e.scrollTop});const Bl=e=>{if(!e)return!1;return"fixed"===window.getComputedStyle(e).position||Bl(e.parentElement)};var Tl=({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const c=n.closestScrollable,l=((e,t)=>{const n=zo(e);if(!t)return n;if(e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,s=Bo({top:r,right:a,bottom:i,left:o},n.border);return ko({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})})(e,c),u=Vo(l,r),d=(()=>{if(!c)return null;const e=zo(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:Vo(e,r),scroll:Rl(c),scrollSize:t,shouldClipSubject:s}})(),p=(({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:a,closest:s})=>{const c=(()=>{if(!s)return null;const{scrollSize:e,client:t}=s,n=Cs({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:n,diff:{value:gi,displacement:gi}}}})(),l="vertical"===o?Gi:Wi;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:l,isEnabled:t,client:i,page:a,frame:c,subject:Ni({page:a,withPlaceholder:null,axis:l,frame:c})}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:n.isFixedOnPage,direction:o,client:l,page:u,closest:d});return p};const Ml={passive:!1},kl={passive:!0};var jl=e=>e.shouldPublishImmediately?Ml:kl;const $l=e=>e&&e.env.closestScrollable||null;function Vl(e){const n=t.useRef(null),r=hl(vc),o=bc("droppable"),{registry:i,marshal:a}=r,s=Nc(e),c=Oo(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=t.useRef(c),u=Oo(()=>Ho((e,t)=>{n.current||("production"!==process.env.NODE_ENV?si(0,"Can only update scroll when dragging"):si());const r={x:e,y:t};a.updateDroppableScroll(c.id,r)}),[c.id,a]),d=Ao(()=>{const e=n.current;return e&&e.env.closestScrollable?Rl(e.env.closestScrollable):gi},[]),p=Ao(()=>{const e=d();u(e.x,e.y)},[d,u]),f=Oo(()=>Jo(p),[p]),g=Ao(()=>{const e=n.current,t=$l(e);e&&t||("production"!==process.env.NODE_ENV?si(0,"Could not find scroll options while scrolling"):si());e.scrollOptions.shouldPublishImmediately?p():f()},[f,p]),m=Ao((e,t)=>{n.current&&("production"!==process.env.NODE_ENV?si(0,"Cannot collect a droppable while a drag is occurring"):si());const o=s.current,i=o.getDroppableRef();i||("production"!==process.env.NODE_ENV?si(0,"Cannot collect without a droppable ref"):si());const a={closestScrollable:Ll(l=i),isFixedOnPage:Bl(l)};var l;const u={ref:i,descriptor:c,env:a,scrollOptions:t};n.current=u;const d=Tl({ref:i,descriptor:c,env:a,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),p=a.closestScrollable;return p&&(p.setAttribute(tc.contextId,r.contextId),p.addEventListener("scroll",g,jl(u.scrollOptions)),"production"!==process.env.NODE_ENV&&(e=>{if(!e)return;Ll(e.parentElement)&&"production"!==process.env.NODE_ENV&&ei("\n Droppable: unsupported nested scroll container detected.\n A Droppable can only have one scroll parent (which can be itself)\n Nested scroll containers are currently not supported.\n\n We hope to support nested scroll containers soon: https://github.com/atlassian/react-beautiful-dnd/issues/131\n ")})(p)),d},[r.contextId,c,g,s]),h=Ao(()=>{const e=n.current,t=$l(e);return e&&t||("production"!==process.env.NODE_ENV?si(0,"Can only recollect Droppable client for Droppables that have a scroll container"):si()),Rl(t)},[]),b=Ao(()=>{const e=n.current;e||("production"!==process.env.NODE_ENV?si(0,"Cannot stop drag when no active drag"):si());const t=$l(e);n.current=null,t&&(f.cancel(),t.removeAttribute(tc.contextId),t.removeEventListener("scroll",g,jl(e.scrollOptions)))},[g,f]),v=Ao(e=>{const t=n.current;t||("production"!==process.env.NODE_ENV?si(0,"Cannot scroll when there is no drag"):si());const r=$l(t);r||("production"!==process.env.NODE_ENV?si(0,"Cannot scroll a droppable with no closest scrollable"):si()),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),y=Oo(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:h,dragStopped:b,scroll:v}),[b,m,h,v]),E=Oo(()=>({uniqueId:o,descriptor:c,callbacks:y}),[y,c,o]);rc(()=>(l.current=E.descriptor,i.droppable.register(E),()=>{n.current&&("production"!==process.env.NODE_ENV&&ei("Unsupported: changing the droppableId or type of a Droppable during a drag"),b()),i.droppable.unregister(E)}),[y,c,b,E,a,i.droppable]),rc(()=>{n.current&&a.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,a]),rc(()=>{n.current&&a.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,a])}function Fl(){}const zl={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},Gl=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||"close"===n?zl:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==n?as.placeholder:null}};var Wl=t.memo(e=>{const n=t.useRef(null),r=Ao(()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]),{animate:o,onTransitionEnd:i,onClose:a,contextId:s}=e,[c,l]=t.useState("open"===e.animate);t.useEffect(()=>c?"open"!==o?(r(),l(!1),Fl):n.current?Fl:(n.current=setTimeout(()=>{n.current=null,l(!1)}),r):Fl,[o,c,r]);const u=Ao(e=>{"height"===e.propertyName&&(i(),"close"===o&&a())},[o,a,i]),d=Gl({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return t.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":s,onTransitionEnd:u,ref:e.innerRef})});function Ul(e){return"boolean"==typeof e}function Hl(e,t){t.forEach(t=>t(e))}const Jl=[function({props:e}){e.droppableId||("production"!==process.env.NODE_ENV?si(0,"A Droppable requires a droppableId prop"):si()),"string"!=typeof e.droppableId&&("production"!==process.env.NODE_ENV?si(0,`A Droppable requires a [string] droppableId. Provided: [${typeof e.droppableId}]`):si())},function({props:e}){Ul(e.isDropDisabled)||("production"!==process.env.NODE_ENV?si(0,"isDropDisabled must be a boolean"):si()),Ul(e.isCombineEnabled)||("production"!==process.env.NODE_ENV?si(0,"isCombineEnabled must be a boolean"):si()),Ul(e.ignoreContainerClipping)||("production"!==process.env.NODE_ENV?si(0,"ignoreContainerClipping must be a boolean"):si())},function({getDroppableRef:e}){ml(e())}],Xl=[function({props:e,getPlaceholderRef:t}){if(!e.placeholder)return;t()||"production"!==process.env.NODE_ENV&&ei(`\n Droppable setup issue [droppableId: "${e.droppableId}"]:\n DroppableProvided > placeholder could not be found.\n\n Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.\n More information: https://github.com/hello-pangea/dnd/blob/main/docs/api/droppable.md\n `)}],Yl=[function({props:e}){e.renderClone||("production"!==process.env.NODE_ENV?si(0,"Must provide a clone render function (renderClone) for virtual lists"):si())},function({getPlaceholderRef:e}){e()&&("production"!==process.env.NODE_ENV?si(0,"Expected virtual list to not have a placeholder"):si())}];class Ql extends t.PureComponent{constructor(...e){super(...e),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}var ql=e=>{const n=t.useContext(vc);n||("production"!==process.env.NODE_ENV?si(0,"Could not find app context"):si());const{contextId:o,isMovementAllowed:i}=n,a=t.useRef(null),s=t.useRef(null),{children:c,droppableId:l,type:u,mode:d,direction:p,ignoreContainerClipping:f,isDropDisabled:g,isCombineEnabled:m,snapshot:h,useClone:b,updateViewportMaxScroll:v,getContainerForClone:y}=e,E=Ao(()=>a.current,[]),x=Ao((e=null)=>{a.current=e},[]),w=Ao(()=>s.current,[]),D=Ao((e=null)=>{s.current=e},[]);var I;I={props:e,getDroppableRef:E,getPlaceholderRef:w},Ic(()=>{Hl(I,Jl),"standard"===I.props.mode&&Hl(I,Xl),"virtual"===I.props.mode&&Hl(I,Yl)});const S=Ao(()=>{i()&&v({maxScroll:As()})},[i,v]);Vl({droppableId:l,type:u,mode:d,direction:p,isDropDisabled:g,isCombineEnabled:m,ignoreContainerClipping:f,getDroppableRef:E});const N=Oo(()=>t.createElement(Ql,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:n,animate:r})=>t.createElement(Wl,{placeholder:n,onClose:e,innerRef:D,animate:r,contextId:o,onTransitionEnd:S})),[o,S,e.placeholder,e.shouldAnimatePlaceholder,D]),C=Oo(()=>({innerRef:x,placeholder:N,droppableProps:{"data-rfd-droppable-id":l,"data-rfd-droppable-context-id":o}}),[o,l,N,x]),O=b?b.dragging.draggableId:null,A=Oo(()=>({droppableId:l,type:u,isUsingCloneFor:O}),[l,O,u]);return t.createElement(gl.Provider,{value:A},c(C,h),function(){if(!b)return null;const{dragging:e,render:n}=b,o=t.createElement(Il,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(t,r)=>n(t,r,e));return r.createPortal(o,y())}())};const Kl={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||("production"!==process.env.NODE_ENV?si(0,"document.body is not ready"):si()),document.body}},Zl=e=>{let t,n={...e};for(t in Kl)void 0===e[t]&&(n={...n,[t]:Kl[t]});return n},eu=(e,t)=>e===t.droppable.type,tu=(e,t)=>t.draggables[e.draggable.id];var nu=Do(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=Ho(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),r=Ho((r,o,i,a,s,c)=>{const l=s.descriptor.id;if(s.descriptor.droppableId===r){const e=c?{render:c,dragging:n(s.descriptor)}:null,t={isDraggingOver:i,draggingOverWith:i?l:null,draggingFromThisWith:l,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:t,useClone:e}}if(!o)return t;if(!a)return e;const u={isDraggingOver:i,draggingOverWith:l,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:u,useClone:null}});return(n,o)=>{const i=Zl(o),a=i.droppableId,s=i.type,c=!i.isDropDisabled,l=i.renderClone;if(Cc(n)){const e=n.critical;if(!eu(s,e))return t;const o=tu(e,n.dimensions),i=va(n.impact)===a;return r(a,c,i,i,o,l)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!eu(s,e.critical))return t;const o=tu(e.critical,n.dimensions);return r(a,c,El(e.result)===a,va(e.impact)===a,o,l)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!eu(s,r.critical))return t;const o=va(r.impact)===a,i=Boolean(r.impact.at&&"COMBINE"===r.impact.at.type),c=r.critical.droppable.id===a;return o?i?e:t:c?e:t}return t}},{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},(e,t,n)=>({...Zl(n),...e,...t}),{context:pc,areStatePropsEqual:yl})(ql);const ru=t.lazy(()=>Promise.resolve().then(()=>require("./index-DZwMQg-m.js")).then(e=>e.index)),ou=n.div`
display: flex;
min-width: 0;
overflow: hidden;
place-content: center;
position: relative;
cursor: default;
`,iu=t.memo(({clockWidth:n})=>{const{windows:r}=wn(),{applications:o}=Nn(),[i,a]=t.useState([]),[s,c]=t.useState(new Map);t.useEffect(()=>{const e=Object.keys(r).map(e=>({type:"window",windowID:e}));a(e);const t=new Map;Object.keys(r).forEach((e,n)=>{t.set(e,n)}),c(t)},[]),t.useEffect(()=>{a(e=>{const t=Object.keys(r),n=e.filter(e=>t.includes(e.windowID));return t.filter(e=>!n.some(t=>t.windowID===e)).forEach(e=>{n.push({type:"window",windowID:e}),c(t=>{const r=new Map(t);return r.set(e,n.length-1),r})}),n.sort((e,t)=>(s.get(e.windowID)??0)-(s.get(t.windowID)??0)),n})},[r,s]);const l=t.useCallback(e=>{if(!e.destination)return;const t=Array.from(i),[n]=t.splice(e.source.index,1);t.splice(e.destination.index,0,n),a(t);const r=new Map;t.forEach((e,t)=>{r.set(e.windowID,t)}),c(r)},[i]),u=t.useMemo(()=>o.filter(e=>!!e.taskbarPin),[o]);return t.useEffect(()=>{},[u]),e.jsx(sl,{onDragEnd:l,children:e.jsx(nu,{droppableId:"droppable",direction:"horizontal",children:t=>e.jsxs(Jn,{$clockWidth:n,ref:t.innerRef,...t.droppableProps,children:[e.jsx(sn,{initial:!1,presenceAffectsLayout:!1,children:i.map((t,n)=>{const{windowID:o}=t,i=r[o];if(i&&!i.closing&&!i.hideTaskbarEntry){const{icon:t,title:r}=i;return e.jsx(Sl,{draggableId:o,index:n,children:(n,i)=>e.jsx(ou,{ref:n.innerRef,...n.draggableProps,...n.dragHandleProps,style:{userSelect:"none",...n.draggableProps.style,...i.isDragging&&{position:"fixed",top:void 0,transform:n.draggableProps.style.transform}},children:e.jsx(ru,{icon:t,id:o,title:r},o)})},o)}return null})}),t.placeholder]})})})}),au=n.div`
max-width: 100%;
display: flex;
${e=>e.$grow&&"flex-grow: 1;"}
`,su=t.memo(()=>{const[n,r]=t.useState(!1),[o,i]=t.useState(68),a=t.useCallback(e=>r(t=>e??!t),[]);return e.jsxs(e.Fragment,{children:[e.jsxs(Vn,{"data-rd-type":"rd_win_taskbar",...Un(),...g,children:[e.jsx(au,{"data-rd-type":"rd_taskbar_section"}),e.jsxs(au,{"data-rd-type":"rd_taskbar_section",children:[e.jsx(Hn,{startMenuVisible:n,toggleStartMenu:a}),e.jsx(iu,{clockWidth:o})]}),e.jsx(au,{"data-rd-type":"rd_taskbar_section"})]}),e.jsx(sn,{initial:!1,presenceAffectsLayout:!1})]})}),cu=n.div`
width: 100%;
height: 100%;
flex-grow: 1;
`,lu=t.memo(()=>e.jsx(cu,{className:"rd_desktop"})),uu=n.div`
width: 100%;
height: 100%;
position: absolute;
overflow: hidden;
top: 0;
left: 0;
`,du=t.lazy(()=>Promise.resolve().then(()=>require("./index-C0ezUIcG.js"))),pu=t.memo(({Component:n,id:r})=>{const o=t.useMemo(()=>({rd_window_id:r,id:r}),[r]),i=t.useMemo(()=>e.jsx(n,{...o}),[n,o]);return e.jsx(du,{id:r,children:i})}),fu=t.memo(()=>{const{windows:n={}}=wn(),{linkElement:r}=se(),o=t.useCallback(e=>{e&&r("WindowsViewArea",e)},[r]);return e.jsx(uu,{ref:o,className:"rd_windows_renderer",children:e.jsx(sn,{initial:!1,presenceAffectsLayout:!1,children:Object.entries(n).map(([t,{closing:n,Component:r}])=>t&&r&&!n&&e.jsx(pu,{id:t,Component:r},t))})})}),gu=n("div")`
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 0;
background-image: url(${e=>e.$imgSrc});
background-color: var(--wintheme);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
transition: all 0.2s ease;
`,mu=n.div`
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: ${e=>e.$background||"#0078d4"};
z-index: -1;
`,hu=t.memo(()=>{const{wallpaper:t}=_n(),{wallpaper:n}=Nn(),r=t||n;return"object"==typeof r&&null!==r&&"type"in r&&"image"===r.type?e.jsx(gu,{"data-rd-type":"rd_wallpaper_image",$imgSrc:r.src}):"string"==typeof r?r.match(/\.(jpg|jpeg|png|gif|svg|webp)$/i)||r.startsWith("http")?e.jsx(gu,{"data-rd-type":"rd_wallpaper_image",$imgSrc:r}):e.jsx(mu,{"data-rd-type":"rd_wallpaper_color",$background:r}):e.jsx(mu,{"data-rd-type":"rd_wallpaper_default",$background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"})}),bu=n.div`
position: relative;
width: 100%;
height: 100%;
flex-grow: 1;
`,vu=t.memo(({...t})=>e.jsxs(bu,{"data-rd-type":"rd_mainview",...t,children:[e.jsx(hu,{}),e.jsx(lu,{}),e.jsx(fu,{})]})),yu=t.memo(()=>{var t;const{themeLayout:n,disableTaskbar:r}=Nn(),o="win11"===n?kn:"macos"===n?jn:$n;return e.jsxs(e.Fragment,{children:[e.jsx(vu,{}),!r&&(null==(t=o.bottom)?void 0:t.includes("wintaskbar"))&&e.jsx(su,{})]})}),Eu=t.memo(({config:n})=>{const{openApp:r}=In(),{createWindow:o}=wn();return t.useEffect(()=>{var t;n.applications&&n.applications.forEach(e=>{e.runOnStart&&e.windowContent&&setTimeout(()=>{r(e)},100)}),(null==(t=n.initialState)?void 0:t.windows)&&n.initialState.windows.forEach((t,n)=>{setTimeout(()=>{o({...t,Component:t.Component||(()=>e.jsx("div",{children:"Empty Window"}))})},200*(n+1))})},[n.applications,n.initialState,r,o]),null}),xu=t.createContext({}),wu=({children:t,id:n,rd_window_id:r})=>e.jsx(xu.Provider,{value:{id:n,rd_window_id:r||n},children:t}),Du=({children:t,id:n})=>e.jsx(wu,{rd_window_id:n,id:n,children:t});exports.mountedInstances=0;const Iu=()=>"",Su=n=>{const r=t.useMemo(()=>n.config?n.config:n,[n]);return t.useEffect(()=>(exports.mountedInstances++,()=>{exports.mountedInstances--}),[]),e.jsx(oe,{children:e.jsx(Y,{children:e.jsx(An,{children:e.jsx(hn,{children:e.jsx(xn,{children:e.jsx(Dn,{children:e.jsx(Sn,{config:r,children:e.jsx(ae,{children:e.jsx(Tn,{children:e.jsx(Mn,{"data-rd-type":"rd_main",children:e.jsxs(gn,{children:[e.jsx(Eu,{config:r}),e.jsx(Pn,{}),e.jsx(Iu,{}),e.jsx(yu,{})]})})})})})})})})})})})};exports.AnimatePresence=sn,exports.Button=fe,exports.DEFAULT_SCROLLBAR_WIDTH=17,exports.DEFAULT_WINDOW_SIZE={height:510,width:640},exports.DIV_BUTTON_PROPS=m,exports.FOCUSABLE_ELEMENT=g,exports.HIGH_PRIORITY_ELEMENT={fetchpriority:"high"},exports.Icon=he,exports.LONG_PRESS_DELAY_MS=750,exports.MENU_SEPERATOR=v,exports.MILLISECONDS_IN_SECOND=y,exports.PEEK_MAX_WIDTH=200,exports.PREVENT_SCROLL=x,exports.Provider=Cn,exports.ReactDesk=Su,exports.TRANSITIONS_IN_MILLISECONDS=w,exports.TRANSITIONS_IN_SECONDS=D,exports.WIN_TASKBAR_HEIGHT=48,exports.WindowContainer=Du,exports.alpha=ot,exports.buildHTMLStyles=ht,exports.buildSVGAttrs=Ot,exports.calcInitialPosition=({offsetHeight:e},{right:t=0,left:n=0,top:r=0,bottom:o=0}={},{width:i=0,height:a=0}={})=>{const[s,c]=[k(),j()];return{x:M(i)>=c?0:n||c-t,y:M(a)+48>=s?0:r||s-o-e}},exports.camelCaseAttributes=Bt,exports.camelToDash=Ie,exports.cancelFrame=Xt,exports.clamp=nt,exports.colorRegex=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,exports.commonjsGlobal=s,exports.cssVariableRegex=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,exports.defaultStyles=de,exports.degrees=ct,exports.featureDefinitions=Me,exports.floatRegex=/(-)?([\d]*\.?[\d])+/g,exports.frame=Jt,exports.frameData=Yt,exports.getAugmentedNamespace=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n},exports.getDefaultExportFromCjs=c,exports.getElementSize=$,exports.haltEvent=G,exports.isAnimationControls=Oe,exports.isBrowser=xe,exports.isCSSVariableName=Ze,exports.isCSSVariableToken=et,exports.isCanvasDrawn=e=>{var t;if(!(e instanceof HTMLCanvasElement))return!1;if(0===e.width||0===e.height)return!1;const{data:n=[]}=(null==(t=e.getContext("2d",{willReadFrequently:!0}))?void 0:t.getImageData(0,0,e.width,e.height))||{};if(0===n.length)return!1;const r={0:0,255:0};for(const o of n){if(0!==o&&255!==o)return!0;r[o]+=1}return!(r[0]===n.length||r[255]===n.length||r[255]+r[0]===n.length&&r[0]/3===r[255])},exports.isControllingVariants=Pe,exports.isKeyframesTarget=Vt,exports.isMotionValue=Ye,exports.isRefObject=Ne,exports.isSVGComponent=We,exports.isSVGTag=_t,exports.isSafari=z,exports.isString=at,exports.isVariantLabel=Ce,exports.isVariantNode=Le,exports.label=W,exports.m=Zt,exports.noop=Wt,exports.number=rt,exports.numberValueTypes=mt,exports.optimizedAppearDataAttribute=Se,exports.percent=lt,exports.px=ut,exports.pxToNum=M,exports.reactIsExports=Pr,exports.renderHTML=Rt,exports.renderSVG=Tt,exports.resolveFinalValueInKeyframes=e=>Vt(e)?e[e.length-1]||0:e,exports.resolveVariantFromProps=jt,exports.sanitize=e=>Math.round(1e5*e)/1e5,exports.scrapeMotionValuesFromProps=Mt,exports.scrapeMotionValuesFromProps$1=kt,exports.singleColorRegex=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i,exports.transformPropOrder=He,exports.transformProps=Je,exports.useContext=_n,exports.useContext$1=wn,exports.useContext$2=Nn,exports.useContext$3=ie,exports.useContext$4=se,exports.useContext$5=On,exports.useContext$6=mn,exports.useContext$7=bn,exports.useContext$8=In,exports.useContext$9=Q,exports.useWindowsRef=Wn,exports.variantPriorityOrder=Ae,exports.variantProps=_e,exports.vh=dt,exports.viewHeight=k,exports.viewWidth=j,exports.vw=pt;
//# sourceMappingURL=index-B8LTnm77.js.map