@wellesley/vendor 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,11 @@
1
- export*from"https://cdn.jsdelivr.net/npm/@wellesley/vendor@1.0.5/react-router-dom.mjs";
1
+ import{r as f,R as zt}from"./index-DoZBmrkt.mjs";import{R as hn}from"./react-dom-BP11Y_IV.mjs";
2
+ /**
3
+ * @remix-run/router v1.15.2
4
+ *
5
+ * Copyright (c) Remix Software Inc.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE.md file in the root directory of this source tree.
9
+ *
10
+ * @license MIT
11
+ */function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},K.apply(this,arguments)}var z;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(z||(z={}));const ir="popstate";function Pr(e){void 0===e&&(e={});let t,{initialEntries:r=["/"],initialIndex:n,v5Compat:a=!1}=e;t=r.map(((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let o=l(n??t.length-1),i=z.Pop,s=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function u(){return t[o]}function c(e,r,n){void 0===r&&(r=null);let a=Me(t?u().pathname:"/",e,r,n);return ge("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function d(e){return"string"==typeof e?e:fe(e)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?ce(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){i=z.Push;let n=c(e,r);o+=1,t.splice(o,t.length,n),a&&s&&s({action:i,location:n,delta:1})},replace(e,r){i=z.Replace;let n=c(e,r);t[o]=n,a&&s&&s({action:i,location:n,delta:0})},go(e){i=z.Pop;let r=l(o+e),n=t[r];o=r,s&&s({action:i,location:n,delta:e})},listen:e=>(s=e,()=>{s=null})}}function Cr(e){return void 0===e&&(e={}),Dr((function(e,t){let{pathname:r,search:n,hash:a}=e.location;return Me("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:fe(t)}),null,e)}function Lr(e){return void 0===e&&(e={}),Dr((function(e,t){let{pathname:r="/",search:n="",hash:a=""}=ce(e.location.hash.substr(1));return!r.startsWith("/")&&!r.startsWith(".")&&(r="/"+r),Me("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:fe(t))}),(function(e,t){ge("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function L(e,t){if(!1===e||null===e||typeof e>"u")throw new Error(t)}function ge(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function mn(){return Math.random().toString(36).substr(2,8)}function lr(e,t){return{usr:e.state,key:e.key,idx:t}}function Me(e,t,r,n){return void 0===r&&(r=null),K({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?ce(t):t,{state:r,key:t&&t.key||n||mn()})}function fe(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function ce(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Dr(e,t,r,n){void 0===n&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s=z.Pop,l=null,u=c();function c(){return(i.state||{idx:null}).idx}function d(){s=z.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:h.location,delta:t})}function f(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,r="string"==typeof e?e:fe(e);return r=r.replace(/ $/,"%20"),L(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==u&&(u=0,i.replaceState(K({},i.state,{idx:u}),""));let h={get action(){return s},get location(){return e(a,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(ir,d),l=e,()=>{a.removeEventListener(ir,d),l=null}},createHref:e=>t(a,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=z.Push;let n=Me(h.location,e,t);r&&r(n,e),u=c()+1;let d=lr(n,u),f=h.createHref(n);try{i.pushState(d,"",f)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(f)}o&&l&&l({action:s,location:h.location,delta:1})},replace:function(e,t){s=z.Replace;let n=Me(h.location,e,t);r&&r(n,e),u=c();let a=lr(n,u),d=h.createHref(n);i.replaceState(a,"",d),o&&l&&l({action:s,location:h.location,delta:0})},go:e=>i.go(e)};return h}var W;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(W||(W={}));const pn=new Set(["lazy","caseSensitive","path","id","index","children"]);function vn(e){return!0===e.index}function At(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map(((e,a)=>{let o=[...r,a],i="string"==typeof e.id?e.id:o.join("-");if(L(!0!==e.index||!e.children,"Cannot specify children on an index route"),L(!n[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),vn(e)){let r=K({},e,t(e),{id:i});return n[i]=r,r}{let r=K({},e,t(e),{id:i,children:void 0});return n[i]=r,e.children&&(r.children=At(e.children,t,o,n)),r}}))}function ke(e,t,r){void 0===r&&(r="/");let n=ee(("string"==typeof t?ce(t):t).pathname||"/",r);if(null==n)return null;let a=_r(e);gn(a);let o=null;for(let e=0;null==o&&e<a.length;++e){let t=Dn(n);o=Cn(a[e],t)}return o}function Tr(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function _r(e,t,r,n){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n="");let a=(e,a,o)=>{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(L(i.relativePath.startsWith(n),'Absolute route path "'+i.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(n.length));let s=de([n,i.relativePath]),l=r.concat(i);e.children&&e.children.length>0&&(L(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),_r(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:xn(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of Mr(e.path))a(e,t,r);else a(e,t)})),t}function Mr(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return a?[o,""]:[o];let i=Mr(n.join("/")),s=[];return s.push(...i.map((e=>""===e?o:[o,e].join("/")))),a&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}function gn(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:Pn(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}const yn=/^:[\w-]+$/,bn=3,wn=2,Rn=1,En=10,Sn=-2,sr=e=>"*"===e;function xn(e,t){let r=e.split("/"),n=r.length;return r.some(sr)&&(n+=Sn),t&&(n+=wn),r.filter((e=>!sr(e))).reduce(((e,t)=>e+(yn.test(t)?bn:""===t?Rn:En)),n)}function Pn(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]))?e[e.length-1]-t[t.length-1]:0}function Cn(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let e=0;e<r.length;++e){let i=r[e],s=e===r.length-1,l="/"===a?t:t.slice(a.length)||"/",u=pt({path:i.relativePath,caseSensitive:i.caseSensitive,end:s},l);if(!u)return null;Object.assign(n,u.params);let c=i.route;o.push({params:n,pathname:de([a,u.pathname]),pathnameBase:Mn(de([a,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(a=de([a,u.pathnameBase]))}return o}function ao(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(ge(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=e=>null==e?"":"string"==typeof e?e:String(e);return n+r.split(/\/+/).map(((e,r,n)=>{if(r===n.length-1&&"*"===e)return a(t["*"]);const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,r]=o;let n=t[e];return L("?"===r||null!=n,'Missing ":'+e+'" param'),a(n)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function pt(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ln(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce(((e,t,r)=>{let{paramName:n,isOptional:a}=t;if("*"===n){let e=s[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[r];return e[n]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:i,pattern:e}}function Ln(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!0),ge("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Dn(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return ge(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function ee(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function Tn(e,t){void 0===t&&(t="/");let{pathname:r,search:n="",hash:a=""}="string"==typeof e?ce(e):e;return{pathname:r?r.startsWith("/")?r:_n(r,t):t,search:Fn(n),hash:Un(a)}}function _n(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}function Tt(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Fr(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function gt(e,t){let r=Fr(e);return t?r.map(((t,r)=>r===e.length-1?t.pathname:t.pathnameBase)):r.map((e=>e.pathnameBase))}function yt(e,t,r,n){let a;void 0===n&&(n=!1),"string"==typeof e?a=ce(e):(a=K({},e),L(!a.pathname||!a.pathname.includes("?"),Tt("?","pathname","search",a)),L(!a.pathname||!a.pathname.includes("#"),Tt("#","pathname","hash",a)),L(!a.search||!a.search.includes("#"),Tt("#","search","hash",a)));let o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=Tn(a,o),u=s&&"/"!==s&&s.endsWith("/"),c=(i||"."===s)&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const de=e=>e.join("/").replace(/\/\/+/g,"/"),Mn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Fn=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Un=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",oo=function(e,t){void 0===t&&(t={});let r="number"==typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),K({},r,{headers:n}))};class Ot extends Error{}class An{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],L(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise(((e,t)=>r=t)),this.controller=new AbortController;let n=()=>r(new Ot("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n),this.controller.signal.addEventListener("abort",n),this.data=Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:this.trackPromise(r,n)})}),{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then((t=>this.onSettle(r,e,void 0,t)),(t=>this.onSettle(r,e,t)));return r.catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,n){if(this.controller.signal.aborted&&r instanceof Ot)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===n){let r=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)}return void 0===n?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>n}),this.emit(!1,t),n)}emit(e,t){this.subscribers.forEach((r=>r(e,t)))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach(((e,t)=>this.pendingKeysSet.delete(t))),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise((t=>{this.subscribe((n=>{e.removeEventListener("abort",r),(n||this.done)&&t(n)}))}))}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return L(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:jn(n)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function On(e){return e instanceof Promise&&!0===e._tracked}function jn(e){if(!On(e))return e;if(e._error)throw e._error;return e._data}const io=function(e,t){return void 0===t&&(t={}),new An(e,"number"==typeof t?{status:t}:t)},In=function(e,t){void 0===t&&(t=302);let r=t;"number"==typeof r?r={status:r}:typeof r.status>"u"&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,K({},r,{headers:n}))},lo=(e,t)=>{let r=In(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class Kt{constructor(e,t,r,n){void 0===n&&(n=!1),this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ur(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const Ar=["post","put","patch","delete"],Nn=new Set(Ar),kn=["get",...Ar],Bn=new Set(kn),zn=new Set([301,302,303,307,308]),Kn=new Set([307,308]),_t={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Or={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ne={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},jr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ir="remix-router-transitions";function Ht(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;let a;if(L(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;a=e=>({hasErrorBoundary:t(e)})}else a=Hn;let o,i={},s=At(e.routes,a,void 0,i),l=e.basename||"/",u=K({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),c=null,d=new Set,f=null,h=null,p=null,m=null!=e.hydrationData,v=ke(s,e.history.location,l),y=null;if(null==v){let t=ie(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=vr(s);v=r,y={[n.id]:t}}let g,b=v.some((e=>e.route.lazy)),w=v.some((e=>e.route.loader));if(b)g=!1;else if(w)if(u.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;g=v.every((e=>e.route.loader&&!0!==e.route.loader.hydrate&&(t&&void 0!==t[e.route.id]||r&&void 0!==r[e.route.id])))}else g=null!=e.hydrationData;else g=!0;let E,S,R={historyAction:e.history.action,location:e.history.location,matches:v,initialized:g,navigation:_t,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||y,fetchers:new Map,blockers:new Map},x=z.Pop,D=!1,C=!1,k=new Map,P=null,_=!1,T=!1,A=[],M=[],U=new Map,j=0,O=-1,F=new Map,N=new Set,B=new Map,I=new Map,H=new Set,$=new Map,q=new Map,J=!1;function Y(e,t){void 0===t&&(t={}),R=K({},R,e);let r=[],n=[];u.v7_fetcherPersist&&R.fetchers.forEach(((e,t)=>{"idle"===e.state&&(H.has(t)?n.push(t):r.push(t))})),[...d].forEach((e=>e(R,{deletedFetchers:n,unstable_viewTransitionOpts:t.viewTransitionOpts,unstable_flushSync:!0===t.flushSync}))),u.v7_fetcherPersist&&(r.forEach((e=>R.fetchers.delete(e))),n.forEach((e=>ae(e))))}function V(t,r,n){var a,i;let l,{flushSync:u}=void 0===n?{}:n,c=null!=R.actionData&&null!=R.navigation.formMethod&&ue(R.navigation.formMethod)&&"loading"===R.navigation.state&&!0!==(null==(a=t.state)?void 0:a._isRedirect);l=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:c?R.actionData:null;let d=r.loaderData?pr(R.loaderData,r.loaderData,r.matches||[],r.errors):R.loaderData,f=R.blockers;f.size>0&&(f=new Map(f),f.forEach(((e,t)=>f.set(t,Ne))));let h,p=!0===D||null!=R.navigation.formMethod&&ue(R.navigation.formMethod)&&!0!==(null==(i=t.state)?void 0:i._isRedirect);if(o&&(s=o,o=void 0),_||x===z.Pop||(x===z.Push?e.history.push(t,t.state):x===z.Replace&&e.history.replace(t,t.state)),x===z.Pop){let e=k.get(R.location.pathname);e&&e.has(t.pathname)?h={currentLocation:R.location,nextLocation:t}:k.has(t.pathname)&&(h={currentLocation:t,nextLocation:R.location})}else if(C){let e=k.get(R.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),k.set(R.location.pathname,e)),h={currentLocation:R.location,nextLocation:t}}Y(K({},r,{actionData:l,loaderData:d,historyAction:x,location:t,initialized:!0,navigation:_t,revalidation:"idle",restoreScrollPosition:ve(t,r.matches||R.matches),preventScrollReset:p,blockers:f}),{viewTransitionOpts:h,flushSync:!0===u}),x=z.Pop,D=!1,C=!1,_=!1,T=!1,A=[],M=[]}async function Z(t,r,n){S&&S.abort(),S=null,x=t,_=!0===(n&&n.startUninterruptedRevalidation),function(e,t){if(f&&p){let r=me(e,t);f[r]=p()}}(R.location,R.matches),D=!0===(n&&n.preventScrollReset),C=!0===(n&&n.enableViewTransition);let c=o||s,d=n&&n.overrideNavigation,h=ke(c,r,l),m=!0===(n&&n.flushSync);if(!h){let e=ie(404,{pathname:r.pathname}),{matches:t,route:n}=vr(c);return pe(),void V(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:m})}if(R.initialized&&!T&&qn(R.location,r)&&!(n&&n.submission&&ue(n.submission.formMethod)))return void V(r,{matches:h},{flushSync:m});S=new AbortController;let v,y,g=Ye(e.history,r,S.signal,n&&n.submission);if(n&&n.pendingError)y={[Qe(h).route.id]:n.pendingError};else if(n&&n.submission&&ue(n.submission.formMethod)){let e=await async function(e,t,r,n,o){void 0===o&&(o={}),Q();let s=Qn(t,r);Y({navigation:s},{flushSync:!0===o.flushSync});let c,d=Nt(n,t);if(d.route.action||d.route.lazy){if(c=await qe("action",e,d,n,i,a,l,u.v7_relativeSplatPath),e.signal.aborted)return{shortCircuited:!0}}else c={type:W.error,error:ie(405,{method:e.method,pathname:t.pathname,routeId:d.route.id})};if(_e(c)){let e;return e=o&&null!=o.replace?o.replace:c.location===R.location.pathname+R.location.search,await G(R,c,{submission:r,replace:e}),{shortCircuited:!0}}if(Be(c)){let e=Qe(n,d.route.id);return!0!==(o&&o.replace)&&(x=z.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:c.error}}}if(Te(c))throw ie(400,{type:"defer-action"});return{pendingActionData:{[d.route.id]:c.data}}}(g,r,n.submission,h,{replace:n.replace,flushSync:m});if(e.shortCircuited)return;v=e.pendingActionData,y=e.pendingActionError,d=Mt(r,n.submission),m=!1,g=new Request(g.url,{signal:g.signal})}let{shortCircuited:b,loaderData:w,errors:E}=await async function(t,r,n,a,i,c,d,f,h,p,m){let v=a||Mt(r,i),y=i||c||br(v),g=o||s,[b,w]=cr(e.history,R,n,y,r,u.v7_partialHydration&&!0===f,T,A,M,H,B,N,g,l,p,m);if(pe((e=>!(n&&n.some((t=>t.route.id===e)))||b&&b.some((t=>t.route.id===e)))),O=++j,0===b.length&&0===w.length){let e=le();return V(r,K({matches:n,loaderData:{},errors:m||null},p?{actionData:p}:{},e?{fetchers:new Map(R.fetchers)}:{}),{flushSync:h}),{shortCircuited:!0}}if(!(_||u.v7_partialHydration&&f)){w.forEach((e=>{let t=R.fetchers.get(e.key),r=Ge(void 0,t?t.data:void 0);R.fetchers.set(e.key,r)}));let e=p||R.actionData;Y(K({navigation:v},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},w.length>0?{fetchers:new Map(R.fetchers)}:{}),{flushSync:h})}w.forEach((e=>{U.has(e.key)&&oe(e.key),e.controller&&U.set(e.key,e.controller)}));let E=()=>w.forEach((e=>oe(e.key)));S&&S.signal.addEventListener("abort",E);let{results:x,loaderResults:L,fetcherResults:D}=await X(R.matches,n,b,w,t);if(t.signal.aborted)return{shortCircuited:!0};S&&S.signal.removeEventListener("abort",E),w.forEach((e=>U.delete(e.key)));let C=gr(x);if(C){if(C.idx>=b.length){let e=w[C.idx-b.length].key;N.add(e)}return await G(R,C.result,{replace:d}),{shortCircuited:!0}}let{loaderData:k,errors:P}=mr(R,n,b,L,m,w,D,$);$.forEach(((e,t)=>{e.subscribe((r=>{(r||e.done)&&$.delete(t)}))})),u.v7_partialHydration&&f&&R.errors&&Object.entries(R.errors).filter((e=>{let[t]=e;return!b.some((e=>e.route.id===t))})).forEach((e=>{let[t,r]=e;P=Object.assign(P||{},{[t]:r})}));let F=le(),z=ce(O),W=F||z||w.length>0;return K({loaderData:k,errors:P},W?{fetchers:new Map(R.fetchers)}:{})}(g,r,h,d,n&&n.submission,n&&n.fetcherSubmission,n&&n.replace,n&&!0===n.initialHydration,m,v,y);b||(S=null,V(r,K({matches:h},v?{actionData:v}:{},{loaderData:w,errors:E})))}async function G(n,a,o){let{submission:i,fetcherSubmission:s,replace:u}=void 0===o?{}:o;a.revalidate&&(T=!0);let c=Me(n.location,a.location,{_isRedirect:!0});if(L(c,"Expected a location on the redirect navigation"),r){let r=!1;if(a.reloadDocument)r=!0;else if(jr.test(a.location)){const n=e.history.createURL(a.location);r=n.origin!==t.location.origin||null==ee(n.pathname,l)}if(r)return void(u?t.location.replace(a.location):t.location.assign(a.location))}S=null;let d=!0===u?z.Replace:z.Push,{formMethod:f,formAction:h,formEncType:p}=n.navigation;!i&&!s&&f&&h&&p&&(i=br(n.navigation));let m=i||s;if(Kn.has(a.status)&&m&&ue(m.formMethod))await Z(d,c,{submission:K({},m,{formAction:a.location}),preventScrollReset:D});else{let e=Mt(c,i);await Z(d,c,{overrideNavigation:e,fetcherSubmission:s,preventScrollReset:D})}}async function X(t,r,n,o,s){let c=await Promise.all([...n.map((e=>qe("loader",s,e,r,i,a,l,u.v7_relativeSplatPath))),...o.map((t=>t.matches&&t.match&&t.controller?qe("loader",Ye(e.history,t.path,t.controller.signal),t.match,t.matches,i,a,l,u.v7_relativeSplatPath):{type:W.error,error:ie(404,{pathname:t.path})}))]),d=c.slice(0,n.length),f=c.slice(n.length);return await Promise.all([yr(t,n,d,d.map((()=>s.signal)),!1,R.loaderData),yr(t,o.map((e=>e.match)),f,o.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:c,loaderResults:d,fetcherResults:f}}function Q(){T=!0,A.push(...pe()),B.forEach(((e,t)=>{U.has(t)&&(M.push(t),oe(t))}))}function te(e,t,r){void 0===r&&(r={}),R.fetchers.set(e,t),Y({fetchers:new Map(R.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function re(e,t,r,n){void 0===n&&(n={});let a=Qe(R.matches,t);ae(e),Y({errors:{[a.route.id]:r},fetchers:new Map(R.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function ne(e){return u.v7_fetcherPersist&&(I.set(e,(I.get(e)||0)+1),H.has(e)&&H.delete(e)),R.fetchers.get(e)||Or}function ae(e){let t=R.fetchers.get(e);U.has(e)&&!(t&&"loading"===t.state&&F.has(e))&&oe(e),B.delete(e),F.delete(e),N.delete(e),H.delete(e),R.fetchers.delete(e)}function oe(e){let t=U.get(e);L(t,"Expected fetch controller: "+e),t.abort(),U.delete(e)}function se(e){for(let t of e){let e=Re(ne(t).data);R.fetchers.set(t,e)}}function le(){let e=[],t=!1;for(let r of N){let n=R.fetchers.get(r);L(n,"Expected fetcher: "+r),"loading"===n.state&&(N.delete(r),e.push(r),t=!0)}return se(e),t}function ce(e){let t=[];for(let[r,n]of F)if(n<e){let e=R.fetchers.get(r);L(e,"Expected fetcher: "+r),"loading"===e.state&&(oe(r),F.delete(r),t.push(r))}return se(t),t.length>0}function de(e){R.blockers.delete(e),q.delete(e)}function fe(e,t){let r=R.blockers.get(e)||Ne;L("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let n=new Map(R.blockers);n.set(e,t),Y({blockers:n})}function he(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===q.size)return;q.size>1&&ge(!1,"A router only supports one blocker at a time");let a=Array.from(q.entries()),[o,i]=a[a.length-1],s=R.blockers.get(o);return s&&"proceeding"===s.state||!i({currentLocation:t,nextLocation:r,historyAction:n})?void 0:o}function pe(e){let t=[];return $.forEach(((r,n)=>{(!e||e(n))&&(r.cancel(),t.push(n),$.delete(n))})),t}function me(e,t){return h&&h(e,t.map((e=>Tr(e,R.loaderData))))||e.key}function ve(e,t){if(f){let r=me(e,t),n=f[r];if("number"==typeof n)return n}return null}return E={get basename(){return l},get future(){return u},get state(){return R},get routes(){return s},get window(){return t},initialize:function(){if(c=e.history.listen((t=>{let{action:r,location:n,delta:a}=t;if(J)return void(J=!1);ge(0===q.size||null!=a,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=he({currentLocation:R.location,nextLocation:n,historyAction:r});return o&&null!=a?(J=!0,e.history.go(-1*a),void fe(o,{state:"blocked",location:n,proceed(){fe(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(a)},reset(){let e=new Map(R.blockers);e.set(o,Ne),Y({blockers:e})}})):Z(r,n)})),r){ea(t,k);let e=()=>ta(t,k);t.addEventListener("pagehide",e),P=()=>t.removeEventListener("pagehide",e)}return R.initialized||Z(z.Pop,R.location,{initialHydration:!0}),E},subscribe:function(e){return d.add(e),()=>d.delete(e)},enableScrollRestoration:function(e,t,r){if(f=e,p=t,h=r||null,!m&&R.navigation===_t){m=!0;let e=ve(R.location,R.matches);null!=e&&Y({restoreScrollPosition:e})}return()=>{f=null,p=null,h=null}},navigate:async function t(r,n){if("number"==typeof r)return void e.history.go(r);let a=jt(R.location,R.matches,l,u.v7_prependBasename,r,u.v7_relativeSplatPath,null==n?void 0:n.fromRouteId,null==n?void 0:n.relative),{path:o,submission:i,error:s}=ur(u.v7_normalizeFormMethod,!1,a,n),c=R.location,d=Me(R.location,o,n&&n.state);d=K({},d,e.history.encodeLocation(d));let f=n&&null!=n.replace?n.replace:void 0,h=z.Push;!0===f?h=z.Replace:!1===f||null!=i&&ue(i.formMethod)&&i.formAction===R.location.pathname+R.location.search&&(h=z.Replace);let p=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,m=!0===(n&&n.unstable_flushSync),v=he({currentLocation:c,nextLocation:d,historyAction:h});if(!v)return await Z(h,d,{submission:i,pendingError:s,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.unstable_viewTransition,flushSync:m});fe(v,{state:"blocked",location:d,proceed(){fe(v,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(r,n)},reset(){let e=new Map(R.blockers);e.set(v,Ne),Y({blockers:e})}})},fetch:function(t,r,c,d){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");U.has(t)&&oe(t);let f=!0===(d&&d.unstable_flushSync),h=o||s,p=jt(R.location,R.matches,l,u.v7_prependBasename,c,u.v7_relativeSplatPath,r,null==d?void 0:d.relative),m=ke(h,p,l);if(!m)return void re(t,r,ie(404,{pathname:p}),{flushSync:f});let{path:v,submission:y,error:g}=ur(u.v7_normalizeFormMethod,!0,p,d);if(g)return void re(t,r,g,{flushSync:f});let b=Nt(m,v);D=!0===(d&&d.preventScrollReset),y&&ue(y.formMethod)?async function(t,r,n,c,d,f,h){if(Q(),B.delete(t),!c.route.action&&!c.route.lazy){let e=ie(405,{method:h.formMethod,pathname:n,routeId:r});return void re(t,r,e,{flushSync:f})}let p=R.fetchers.get(t);te(t,Zn(h,p),{flushSync:f});let m=new AbortController,v=Ye(e.history,n,m.signal,h);U.set(t,m);let y=j,g=await qe("action",v,c,d,i,a,l,u.v7_relativeSplatPath);if(v.signal.aborted)return void(U.get(t)===m&&U.delete(t));if(u.v7_fetcherPersist&&H.has(t)){if(_e(g)||Be(g))return void te(t,Re(void 0))}else{if(_e(g))return U.delete(t),O>y?void te(t,Re(void 0)):(N.add(t),te(t,Ge(h)),G(R,g,{fetcherSubmission:h}));if(Be(g))return void re(t,r,g.error)}if(Te(g))throw ie(400,{type:"defer-action"});let b=R.navigation.location||R.location,w=Ye(e.history,b,m.signal),E=o||s,D="idle"!==R.navigation.state?ke(E,R.navigation.location,l):R.matches;L(D,"Didn't find any matches after fetcher action");let C=++j;F.set(t,C);let k=Ge(h,g.data);R.fetchers.set(t,k);let[P,_]=cr(e.history,R,D,h,b,!1,T,A,M,H,B,N,E,l,{[c.route.id]:g.data},void 0);_.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,r=R.fetchers.get(t),n=Ge(void 0,r?r.data:void 0);R.fetchers.set(t,n),U.has(t)&&oe(t),e.controller&&U.set(t,e.controller)})),Y({fetchers:new Map(R.fetchers)});let z=()=>_.forEach((e=>oe(e.key)));m.signal.addEventListener("abort",z);let{results:K,loaderResults:W,fetcherResults:I}=await X(R.matches,D,P,_,w);if(m.signal.aborted)return;m.signal.removeEventListener("abort",z),F.delete(t),U.delete(t),_.forEach((e=>U.delete(e.key)));let q=gr(K);if(q){if(q.idx>=P.length){let e=_[q.idx-P.length].key;N.add(e)}return G(R,q.result)}let{loaderData:J,errors:Z}=mr(R,R.matches,P,W,void 0,_,I,$);if(R.fetchers.has(t)){let e=Re(g.data);R.fetchers.set(t,e)}ce(C),"loading"===R.navigation.state&&C>O?(L(x,"Expected pending action"),S&&S.abort(),V(R.navigation.location,{matches:D,loaderData:J,errors:Z,fetchers:new Map(R.fetchers)})):(Y({errors:Z,loaderData:pr(R.loaderData,J,D,Z),fetchers:new Map(R.fetchers)}),T=!1)}(t,r,v,b,m,f,y):(B.set(t,{routeId:r,path:v}),async function(t,r,n,o,s,c,d){let f=R.fetchers.get(t);te(t,Ge(d,f?f.data:void 0),{flushSync:c});let h=new AbortController,p=Ye(e.history,n,h.signal);U.set(t,h);let m=j,v=await qe("loader",p,o,s,i,a,l,u.v7_relativeSplatPath);if(Te(v)&&(v=await Br(v,p.signal,!0)||v),U.get(t)===h&&U.delete(t),!p.signal.aborted){if(H.has(t))return void te(t,Re(void 0));if(_e(v))return O>m?void te(t,Re(void 0)):(N.add(t),void await G(R,v));if(Be(v))return void re(t,r,v.error);L(!Te(v),"Unhandled fetcher deferred data"),te(t,Re(v.data))}}(t,r,v,b,m,f,y))},revalidate:function(){if(Q(),Y({revalidation:"loading"}),"submitting"!==R.navigation.state){if("idle"===R.navigation.state)return void Z(R.historyAction,R.location,{startUninterruptedRevalidation:!0});Z(x||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ne,deleteFetcher:function(e){if(u.v7_fetcherPersist){let t=(I.get(e)||0)-1;t<=0?(I.delete(e),H.add(e)):I.set(e,t)}else ae(e);Y({fetchers:new Map(R.fetchers)})},dispose:function(){c&&c(),P&&P(),d.clear(),S&&S.abort(),R.fetchers.forEach(((e,t)=>ae(t))),R.blockers.forEach(((e,t)=>de(t)))},getBlocker:function(e,t){let r=R.blockers.get(e)||Ne;return q.get(e)!==t&&q.set(e,t),r},deleteBlocker:de,_internalFetchControllers:U,_internalActiveDeferreds:$,_internalSetRoutes:function(e){i={},o=At(e,a,void 0,i)}},E}function Wn(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}function jt(e,t,r,n,a,o,i,s){let l,u;if(i){l=[];for(let e of t)if(l.push(e),e.route.id===i){u=e;break}}else l=t,u=t[t.length-1];let c=yt(a||".",gt(l,o),ee(e.pathname,r)||e.pathname,"path"===s);return null==a&&(c.search=e.search,c.hash=e.hash),(null==a||""===a||"."===a)&&u&&u.route.index&&!Wt(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n&&"/"!==r&&(c.pathname="/"===c.pathname?r:de([r,c.pathname])),fe(c)}function ur(e,t,r,n){if(!n||!Wn(n))return{path:r};if(n.formMethod&&!Xn(n.formMethod))return{path:r,error:ie(405,{method:n.formMethod})};let a,o,i=()=>({path:r,error:ie(400,{type:"invalid-body"})}),s=n.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),u=kr(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!ue(l))return i();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce(((e,t)=>{let[r,n]=t;return""+e+r+"="+n+"\n"}),""):String(n.body);return{path:r,submission:{formMethod:l,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!ue(l))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:l,formAction:u,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return i()}}}if(L("function"==typeof FormData,"FormData is not available in this environment"),n.formData)a=It(n.formData),o=n.formData;else if(n.body instanceof FormData)a=It(n.body),o=n.body;else if(n.body instanceof URLSearchParams)a=n.body,o=hr(a);else if(null==n.body)a=new URLSearchParams,o=new FormData;else try{a=new URLSearchParams(n.body),o=hr(a)}catch{return i()}let c={formMethod:l,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(ue(c.formMethod))return{path:r,submission:c};let d=ce(r);return t&&d.search&&Wt(d.search)&&a.append("index",""),d.search="?"+a,{path:fe(d),submission:c}}function $n(e,t){let r=e;if(t){let n=e.findIndex((e=>e.route.id===t));n>=0&&(r=e.slice(0,n))}return r}function cr(e,t,r,n,a,o,i,s,l,u,c,d,f,h,p,m){let v=m?Object.values(m)[0]:p?Object.values(p)[0]:void 0,y=e.createURL(t.location),g=e.createURL(a),b=m?Object.keys(m)[0]:void 0,w=$n(r,b).filter(((e,r)=>{let{route:a}=e;if(a.lazy)return!0;if(null==a.loader)return!1;if(o)return!!a.loader.hydrate||void 0===t.loaderData[a.id]&&(!t.errors||void 0===t.errors[a.id]);if(Vn(t.loaderData,t.matches[r],e)||s.some((t=>t===e.route.id)))return!0;let l=t.matches[r],u=e;return dr(e,K({currentUrl:y,currentParams:l.params,nextUrl:g,nextParams:u.params},n,{actionResult:v,defaultShouldRevalidate:i||y.pathname+y.search===g.pathname+g.search||y.search!==g.search||Nr(l,u)}))})),E=[];return c.forEach(((e,a)=>{if(o||!r.some((t=>t.route.id===e.routeId))||u.has(a))return;let s=ke(f,e.path,h);if(!s)return void E.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let c=t.fetchers.get(a),p=Nt(s,e.path),m=!1;m=!d.has(a)&&(!!l.includes(a)||(c&&"idle"!==c.state&&void 0===c.data?i:dr(p,K({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:g,nextParams:r[r.length-1].params},n,{actionResult:v,defaultShouldRevalidate:i})))),m&&E.push({key:a,routeId:e.routeId,path:e.path,matches:s,match:p,controller:new AbortController})})),[w,E]}function Vn(e,t,r){let n=!t||r.route.id!==t.route.id,a=void 0===e[r.route.id];return n||a}function Nr(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function dr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}async function fr(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];L(a,"No route found in manifest");let o={};for(let e in n){let t=void 0!==a[e]&&"hasErrorBoundary"!==e;ge(!t,'Route "'+a.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),!t&&!pn.has(e)&&(o[e]=n[e])}Object.assign(a,o),Object.assign(a,K({},t(a),{lazy:void 0}))}async function qe(e,t,r,n,a,o,i,s,l){void 0===l&&(l={});let u,c,d,f=e=>{let n,a=new Promise(((e,t)=>n=t));return d=()=>n(),t.signal.addEventListener("abort",d),Promise.race([e({request:t,params:r.params,context:l.requestContext}),a])};try{let n=r.route[e];if(r.route.lazy)if(n){let e,t=await Promise.all([f(n).catch((t=>{e=t})),fr(r.route,o,a)]);if(e)throw e;c=t[0]}else{if(await fr(r.route,o,a),n=r.route[e],!n){if("action"===e){let e=new URL(t.url),n=e.pathname+e.search;throw ie(405,{method:t.method,pathname:n,routeId:r.route.id})}return{type:W.data,data:void 0}}c=await f(n)}else{if(!n){let e=new URL(t.url);throw ie(404,{pathname:e.pathname+e.search})}c=await f(n)}L(void 0!==c,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){u=W.error,c=e}finally{d&&t.signal.removeEventListener("abort",d)}if(Gn(c)){let e,a=c.status;if(zn.has(a)){let e=c.headers.get("Location");if(L(e,"Redirects returned/thrown from loaders/actions must have a Location header"),jr.test(e)){if(!l.isStaticRequest){let r=new URL(t.url),n=e.startsWith("//")?new URL(r.protocol+e):new URL(e),a=null!=ee(n.pathname,i);n.origin===r.origin&&a&&(e=n.pathname+n.search+n.hash)}}else e=jt(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,e,s);if(l.isStaticRequest)throw c.headers.set("Location",e),c;return{type:W.redirect,status:a,location:e,revalidate:null!==c.headers.get("X-Remix-Revalidate"),reloadDocument:null!==c.headers.get("X-Remix-Reload-Document")}}if(l.isRouteRequest)throw{type:u===W.error?W.error:W.data,response:c};try{let t=c.headers.get("Content-Type");e=t&&/\bapplication\/json\b/.test(t)?null==c.body?null:await c.json():await c.text()}catch(e){return{type:W.error,error:e}}return u===W.error?{type:u,error:new Kt(a,c.statusText,e),headers:c.headers}:{type:W.data,data:e,statusCode:c.status,headers:c.headers}}return u===W.error?{type:u,error:c}:Yn(c)?{type:W.deferred,deferredData:c,statusCode:null==(h=c.init)?void 0:h.status,headers:(null==(p=c.init)?void 0:p.headers)&&new Headers(c.init.headers)}:{type:W.data,data:c};var h,p}function Ye(e,t,r,n){let a=e.createURL(kr(t)).toString(),o={signal:r};if(n&&ue(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=It(n.formData):o.body=n.formData}return new Request(a,o)}function It(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function hr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Jn(e,t,r,n,a){let o,i={},s=null,l=!1,u={};return r.forEach(((r,c)=>{let d=t[c].route.id;if(L(!_e(r),"Cannot handle redirect results in processLoaderData"),Be(r)){let t=Qe(e,d),a=r.error;n&&(a=Object.values(n)[0],n=void 0),s=s||{},null==s[t.route.id]&&(s[t.route.id]=a),i[d]=void 0,l||(l=!0,o=Ur(r.error)?r.error.status:500),r.headers&&(u[d]=r.headers)}else Te(r)?(a.set(d,r.deferredData),i[d]=r.deferredData.data):i[d]=r.data,null!=r.statusCode&&200!==r.statusCode&&!l&&(o=r.statusCode),r.headers&&(u[d]=r.headers)})),n&&(s=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:u}}function mr(e,t,r,n,a,o,i,s){let{loaderData:l,errors:u}=Jn(t,r,n,a,s);for(let t=0;t<o.length;t++){let{key:r,match:n,controller:a}=o[t];L(void 0!==i&&void 0!==i[t],"Did not find corresponding fetcher result");let s=i[t];if(!a||!a.signal.aborted)if(Be(s)){let t=Qe(e.matches,null==n?void 0:n.route.id);u&&u[t.route.id]||(u=K({},u,{[t.route.id]:s.error})),e.fetchers.delete(r)}else if(_e(s))L(!1,"Unhandled fetcher revalidation redirect");else if(Te(s))L(!1,"Unhandled fetcher deferred data");else{let t=Re(s.data);e.fetchers.set(r,t)}}return{loaderData:l,errors:u}}function pr(e,t,r,n){let a=K({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(a[r]=t[r]):void 0!==e[r]&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function Qe(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function vr(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ie(e,t){let{pathname:r,routeId:n,method:a,type:o}=void 0===t?{}:t,i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",a&&r&&n?s="You made a "+a+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===o?s="defer() is not supported in actions":"invalid-body"===o&&(s="Unable to encode submission body")):403===e?(i="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):404===e?(i="Not Found",s='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",a&&r&&n?s="You made a "+a.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+n+'", so there is no way to handle the request.':a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new Kt(e||500,i,new Error(s),!0)}function gr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(_e(r))return{result:r,idx:t}}}function kr(e){return fe(K({},"string"==typeof e?ce(e):e,{hash:""}))}function qn(e,t){return e.pathname===t.pathname&&e.search===t.search&&(""===e.hash?""!==t.hash:e.hash===t.hash||""!==t.hash)}function Te(e){return e.type===W.deferred}function Be(e){return e.type===W.error}function _e(e){return(e&&e.type)===W.redirect}function Yn(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}function Gn(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&typeof e.body<"u"}function Xn(e){return Bn.has(e.toLowerCase())}function ue(e){return Nn.has(e.toLowerCase())}async function yr(e,t,r,n,a,o){for(let i=0;i<r.length;i++){let s=r[i],l=t[i];if(!l)continue;let u=e.find((e=>e.route.id===l.route.id)),c=null!=u&&!Nr(u,l)&&void 0!==(o&&o[l.route.id]);if(Te(s)&&(a||c)){let e=n[i];L(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await Br(s,e,a).then((e=>{e&&(r[i]=e||r[i])}))}}}async function Br(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:W.data,data:e.deferredData.unwrappedData}}catch(e){return{type:W.error,error:e}}return{type:W.data,data:e.deferredData.data}}}function Wt(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Nt(e,t){let r="string"==typeof t?ce(t).search:t.search;if(e[e.length-1].route.index&&Wt(r||""))return e[e.length-1];let n=Fr(e);return n[n.length-1]}function br(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n){if(null!=a)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(null!=o)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(void 0!==i)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function Mt(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Qn(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ge(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Zn(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Re(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ea(e,t){try{let r=e.sessionStorage.getItem(Ir);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch{}}function ta(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(Ir,JSON.stringify(r))}catch(e){ge(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}function Ee(){return Ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ee.apply(this,arguments)}const et=f.createContext(null),bt=f.createContext(null),vt=f.createContext(null),le=f.createContext(null),tt=f.createContext(null),se=f.createContext({outlet:null,matches:[],isDataRoute:!1}),zr=f.createContext(null);function ra(e,t){let{relative:r}=void 0===t?{}:t;Fe()||L(!1);let{basename:n,navigator:a}=f.useContext(le),{hash:o,pathname:i,search:s}=rt(e,{relative:r}),l=i;return"/"!==n&&(l="/"===i?n:de([n,i])),a.createHref({pathname:l,search:s,hash:o})}function Fe(){return null!=f.useContext(tt)}function he(){return Fe()||L(!1),f.useContext(tt).location}function so(){return f.useContext(tt).navigationType}function uo(e){Fe()||L(!1);let{pathname:t}=he();return f.useMemo((()=>pt(e,t)),[t,e])}function Kr(e){f.useContext(le).static||f.useLayoutEffect(e)}function $t(){let{isDataRoute:e}=f.useContext(se);return e?ya():na()}function na(){Fe()||L(!1);let e=f.useContext(et),{basename:t,future:r,navigator:n}=f.useContext(le),{matches:a}=f.useContext(se),{pathname:o}=he(),i=JSON.stringify(gt(a,r.v7_relativeSplatPath)),s=f.useRef(!1);return Kr((()=>{s.current=!0})),f.useCallback((function(r,a){if(void 0===a&&(a={}),!s.current)return;if("number"==typeof r)return void n.go(r);let l=yt(r,JSON.parse(i),o,"path"===a.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:de([t,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)}),[t,n,i,o,e])}const Hr=f.createContext(null);function co(){return f.useContext(Hr)}function aa(e){let t=f.useContext(se).outlet;return t&&f.createElement(Hr.Provider,{value:e},t)}function fo(){let{matches:e}=f.useContext(se),t=e[e.length-1];return t?t.params:{}}function rt(e,t){let{relative:r}=void 0===t?{}:t,{future:n}=f.useContext(le),{matches:a}=f.useContext(se),{pathname:o}=he(),i=JSON.stringify(gt(a,n.v7_relativeSplatPath));return f.useMemo((()=>yt(e,JSON.parse(i),o,"path"===r)),[e,i,o,r])}function oa(e,t){return Wr(e,t)}function Wr(e,t,r,n){Fe()||L(!1);let{navigator:a}=f.useContext(le),{matches:o}=f.useContext(se),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u,c=he();if(t){var d;let e="string"==typeof t?ce(t):t;"/"===l||null!=(d=e.pathname)&&d.startsWith(l)||L(!1),u=e}else u=c;let h=u.pathname||"/",p=h;if("/"!==l){let e=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=ke(e,{pathname:p}),v=$r(m&&m.map((e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:de([l,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:de([l,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,r,n);return t&&v?f.createElement(tt.Provider,{value:{location:Ee({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:z.Pop}},v):v}function ia(){let e=ma(),t=Ur(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),r?f.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)}const la=f.createElement(ia,null);class sa extends f.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?f.createElement(se.Provider,{value:this.props.routeContext},f.createElement(zr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ua(e){let{routeContext:t,match:r,children:n}=e,a=f.useContext(et);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),f.createElement(se.Provider,{value:t},n)}function $r(e,t,r,n){var a;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){var o;if(null==(o=r)||!o.errors)return null;e=r.matches}let i=e,s=null==(a=r)?void 0:a.errors;if(null!=s){let e=i.findIndex((e=>e.route.id&&(null==s?void 0:s[e.route.id])));e>=0||L(!1),i=i.slice(0,Math.min(i.length,e+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:n}=r,a=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||a){l=!0,i=u>=0?i.slice(0,u+1):[i[0]];break}}}return i.reduceRight(((e,n,a)=>{let o,c=!1,d=null,h=null;r&&(o=s&&n.route.id?s[n.route.id]:void 0,d=n.route.errorElement||la,l&&(u<0&&0===a?(ba("route-fallback"),c=!0,h=null):u===a&&(c=!0,h=n.route.hydrateFallbackElement||null)));let p=t.concat(i.slice(0,a+1)),m=()=>{let t;return t=o?d:c?h:n.route.Component?f.createElement(n.route.Component,null):n.route.element?n.route.element:e,f.createElement(ua,{match:n,routeContext:{outlet:e,matches:p,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?f.createElement(sa,{location:r.location,revalidation:r.revalidation,component:d,error:o,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()}),null)}var wt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wt||{}),te=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(te||{});function Vt(e){let t=f.useContext(et);return t||L(!1),t}function xe(e){let t=f.useContext(bt);return t||L(!1),t}function ca(e){let t=f.useContext(se);return t||L(!1),t}function nt(e){let t=ca(),r=t.matches[t.matches.length-1];return r.route.id||L(!1),r.route.id}function da(){return nt(te.UseRouteId)}function fa(){return xe(te.UseNavigation).navigation}function ho(){let e=Vt(wt.UseRevalidator),t=xe(te.UseRevalidator);return f.useMemo((()=>({revalidate:e.router.revalidate,state:t.revalidation})),[e.router.revalidate,t.revalidation])}function ha(){let{matches:e,loaderData:t}=xe(te.UseMatches);return f.useMemo((()=>e.map((e=>Tr(e,t)))),[e,t])}function mo(){let e=xe(te.UseLoaderData),t=nt(te.UseLoaderData);if(!e.errors||null==e.errors[t])return e.loaderData[t];console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")")}function po(e){return xe(te.UseRouteLoaderData).loaderData[e]}function vo(){let e=xe(te.UseActionData),t=nt(te.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function ma(){var e;let t=f.useContext(zr),r=xe(te.UseRouteError),n=nt(te.UseRouteError);return void 0!==t?t:null==(e=r.errors)?void 0:e[n]}function pa(){let e=f.useContext(vt);return null==e?void 0:e._data}function go(){let e=f.useContext(vt);return null==e?void 0:e._error}let va=0;function ga(e){let{router:t,basename:r}=Vt(wt.UseBlocker),n=xe(te.UseBlocker),[a,o]=f.useState(""),i=f.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===r)return e(t);let{currentLocation:n,nextLocation:a,historyAction:o}=t;return e({currentLocation:Ee({},n,{pathname:ee(n.pathname,r)||n.pathname}),nextLocation:Ee({},a,{pathname:ee(a.pathname,r)||a.pathname}),historyAction:o})}),[r,e]);return f.useEffect((()=>{let e=String(++va);return o(e),()=>t.deleteBlocker(e)}),[t]),f.useEffect((()=>{""!==a&&t.getBlocker(a,i)}),[t,a,i]),a&&n.blockers.has(a)?n.blockers.get(a):Ne}function ya(){let{router:e}=Vt(wt.UseNavigateStable),t=nt(te.UseNavigateStable),r=f.useRef(!1);return Kr((()=>{r.current=!0})),f.useCallback((function(n,a){void 0===a&&(a={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,Ee({fromRouteId:t},a)))}),[e,t])}const wr={};function ba(e,t,r){wr[e]||(wr[e]=!0)}const wa="startTransition",Rr=zt[wa];function yo(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:o}=e,i=f.useRef();null==i.current&&(i.current=Pr({initialEntries:n,initialIndex:a,v5Compat:!0}));let s=i.current,[l,u]=f.useState({action:s.action,location:s.location}),{v7_startTransition:c}=o||{},d=f.useCallback((e=>{c&&Rr?Rr((()=>u(e))):u(e)}),[u,c]);return f.useLayoutEffect((()=>s.listen(d)),[s,d]),f.createElement(at,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:o})}function bo(e){let{to:t,replace:r,state:n,relative:a}=e;Fe()||L(!1);let{future:o,static:i}=f.useContext(le),{matches:s}=f.useContext(se),{pathname:l}=he(),u=$t(),c=yt(t,gt(s,o.v7_relativeSplatPath),l,"path"===a),d=JSON.stringify(c);return f.useEffect((()=>u(JSON.parse(d),{replace:r,state:n,relative:a})),[u,d,a,r,n]),null}function wo(e){return aa(e.context)}function Ra(e){L(!1)}function at(e){let{basename:t="/",children:r=null,location:n,navigationType:a=z.Pop,navigator:o,static:i=!1,future:s}=e;Fe()&&L(!1);let l=t.replace(/^\/*/,"/"),u=f.useMemo((()=>({basename:l,navigator:o,static:i,future:Ee({v7_relativeSplatPath:!1},s)})),[l,s,o,i]);"string"==typeof n&&(n=ce(n));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:m="default"}=n,v=f.useMemo((()=>{let e=ee(c,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:p,key:m},navigationType:a}}),[l,c,d,h,p,m,a]);return null==v?null:f.createElement(le.Provider,{value:u},f.createElement(tt.Provider,{children:r,value:v}))}function Ro(e){let{children:t,location:r}=e;return oa(kt(t),r)}function Eo(e){let{children:t,errorElement:r,resolve:n}=e;return f.createElement(Sa,{resolve:n,errorElement:r},f.createElement(xa,null,t))}var oe=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(oe||{});const Ea=new Promise((()=>{}));class Sa extends f.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,a=oe.pending;if(r instanceof Promise)if(this.state.error){a=oe.error;let e=this.state.error;n=Promise.reject().catch((()=>{})),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>e})}else r._tracked?(n=r,a=void 0!==n._error?oe.error:void 0!==n._data?oe.success:oe.pending):(a=oe.pending,Object.defineProperty(r,"_tracked",{get:()=>!0}),n=r.then((e=>Object.defineProperty(r,"_data",{get:()=>e})),(e=>Object.defineProperty(r,"_error",{get:()=>e}))));else a=oe.success,n=Promise.resolve(),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(a===oe.error&&n._error instanceof Ot)throw Ea;if(a===oe.error&&!t)throw n._error;if(a===oe.error)return f.createElement(vt.Provider,{value:n,children:t});if(a===oe.success)return f.createElement(vt.Provider,{value:n,children:e});throw n}}function xa(e){let{children:t}=e,r=pa(),n="function"==typeof t?t(r):t;return f.createElement(f.Fragment,null,n)}function kt(e,t){void 0===t&&(t=[]);let r=[];return f.Children.forEach(e,((e,n)=>{if(!f.isValidElement(e))return;let a=[...t,n];if(e.type===f.Fragment)return void r.push.apply(r,kt(e.props.children,a));e.type!==Ra&&L(!1),!e.props.index||!e.props.children||L(!1);let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=kt(e.props.children,a)),r.push(o)})),r}function So(e){return $r(e)}function Jt(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:f.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:f.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:f.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function xo(e,t){return Ht({basename:null==t?void 0:t.basename,future:Ee({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:Pr({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:Jt}).initialize()}function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z.apply(this,arguments)}function qt(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}const mt="get",Ft="application/x-www-form-urlencoded";function Rt(e){return null!=e&&"string"==typeof e.tagName}function Pa(e){return Rt(e)&&"button"===e.tagName.toLowerCase()}function Ca(e){return Rt(e)&&"form"===e.tagName.toLowerCase()}function La(e){return Rt(e)&&"input"===e.tagName.toLowerCase()}function Da(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ta(e,t){return!(0!==e.button||t&&"_self"!==t||Da(e))}function Bt(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map((e=>[r,e])):[[r,n]])}),[]))}function _a(e,t){let r=Bt(e);return t&&t.forEach(((e,n)=>{r.has(n)||t.getAll(n).forEach((e=>{r.append(n,e)}))})),r}let ft=null;function Ma(){if(null===ft)try{new FormData(document.createElement("form"),0),ft=!1}catch{ft=!0}return ft}const Fa=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ut(e){return null==e||Fa.has(e)?e:null}function Ua(e,t){let r,n,a,o,i;if(Ca(e)){let i=e.getAttribute("action");n=i?ee(i,t):null,r=e.getAttribute("method")||mt,a=Ut(e.getAttribute("enctype"))||Ft,o=new FormData(e)}else if(Pa(e)||La(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||i.getAttribute("action");if(n=s?ee(s,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||mt,a=Ut(e.getAttribute("formenctype"))||Ut(i.getAttribute("enctype"))||Ft,o=new FormData(i,e),!Ma()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?t+".":"";o.append(e+"x","0"),o.append(e+"y","0")}else t&&o.append(t,n)}}else{if(Rt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=mt,n=null,a=Ft,i=e}return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}const Aa=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Oa=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],ja=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],Ia="6";try{window.__reactRouterVersion=Ia}catch{}function Po(e,t){return Ht({basename:null==t?void 0:t.basename,future:Z({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:Cr({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||Vr(),routes:e,mapRouteProperties:Jt,window:null==t?void 0:t.window}).initialize()}function Co(e,t){return Ht({basename:null==t?void 0:t.basename,future:Z({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:Lr({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||Vr(),routes:e,mapRouteProperties:Jt,window:null==t?void 0:t.window}).initialize()}function Vr(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Z({},t,{errors:Na(t.errors)})),t}function Na(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new Kt(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){let t=window[n.__subType];if("function"==typeof t)try{let a=new t(n.message);a.stack="",r[e]=a}catch{}}if(null==r[e]){let t=new Error(n.message);t.stack="",r[e]=t}}else r[e]=n;return r}const Jr=f.createContext({isTransitioning:!1}),qr=f.createContext(new Map),ka="startTransition",Se=zt[ka],Ba="flushSync",Er=hn[Ba],za="useId",Sr=zt[za];function Ka(e){Se?Se(e):e()}function Xe(e){Er?Er(e):e()}class Ha{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function Lo(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=f.useState(r.state),[i,s]=f.useState(),[l,u]=f.useState({isTransitioning:!1}),[c,d]=f.useState(),[h,p]=f.useState(),[m,v]=f.useState(),y=f.useRef(new Map),{v7_startTransition:g}=n||{},b=f.useCallback((e=>{g?Ka(e):e()}),[g]),w=f.useCallback(((e,t)=>{let{deletedFetchers:n,unstable_flushSync:a,unstable_viewTransitionOpts:i}=t;n.forEach((e=>y.current.delete(e))),e.fetchers.forEach(((e,t)=>{void 0!==e.data&&y.current.set(t,e.data)}));let l=null==r.window||"function"!=typeof r.window.document.startViewTransition;if(i&&!l){if(a){Xe((()=>{h&&(c&&c.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})}));let t=r.window.document.startViewTransition((()=>{Xe((()=>o(e)))}));return t.finished.finally((()=>{Xe((()=>{d(void 0),p(void 0),s(void 0),u({isTransitioning:!1})}))})),void Xe((()=>p(t)))}h?(c&&c.resolve(),h.skipTransition(),v({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(s(e),u({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))}else a?Xe((()=>o(e))):b((()=>o(e)))}),[r.window,h,c,y,b]);f.useLayoutEffect((()=>r.subscribe(w)),[r,w]),f.useEffect((()=>{l.isTransitioning&&!l.flushSync&&d(new Ha)}),[l]),f.useEffect((()=>{if(c&&i&&r.window){let e=i,t=c.promise,n=r.window.document.startViewTransition((async()=>{b((()=>o(e))),await t}));n.finished.finally((()=>{d(void 0),p(void 0),s(void 0),u({isTransitioning:!1})})),p(n)}}),[b,i,c,r.window]),f.useEffect((()=>{c&&i&&a.location.key===i.location.key&&c.resolve()}),[c,h,a.location,i]),f.useEffect((()=>{!l.isTransitioning&&m&&(s(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),v(void 0))}),[l.isTransitioning,m]),f.useEffect((()=>{}),[]);let E=f.useMemo((()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})})),[r]),S=r.basename||"/",R=f.useMemo((()=>({router:r,navigator:E,static:!1,basename:S})),[r,E,S]);return f.createElement(f.Fragment,null,f.createElement(et.Provider,{value:R},f.createElement(bt.Provider,{value:a},f.createElement(qr.Provider,{value:y.current},f.createElement(Jr.Provider,{value:l},f.createElement(at,{basename:S,location:a.location,navigationType:a.historyAction,navigator:E,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},a.initialized||r.future.v7_partialHydration?f.createElement(Wa,{routes:r.routes,future:r.future,state:a}):t))))),null)}function Wa(e){let{routes:t,future:r,state:n}=e;return Wr(t,void 0,n,r)}function Do(e){let{basename:t,children:r,future:n,window:a}=e,o=f.useRef();null==o.current&&(o.current=Cr({window:a,v5Compat:!0}));let i=o.current,[s,l]=f.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},c=f.useCallback((e=>{u&&Se?Se((()=>l(e))):l(e)}),[l,u]);return f.useLayoutEffect((()=>i.listen(c)),[i,c]),f.createElement(at,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function To(e){let{basename:t,children:r,future:n,window:a}=e,o=f.useRef();null==o.current&&(o.current=Lr({window:a,v5Compat:!0}));let i=o.current,[s,l]=f.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},c=f.useCallback((e=>{u&&Se?Se((()=>l(e))):l(e)}),[l,u]);return f.useLayoutEffect((()=>i.listen(c)),[i,c]),f.createElement(at,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function _o(e){let{basename:t,children:r,future:n,history:a}=e,[o,i]=f.useState({action:a.action,location:a.location}),{v7_startTransition:s}=n||{},l=f.useCallback((e=>{s&&Se?Se((()=>i(e))):i(e)}),[i,s]);return f.useLayoutEffect((()=>a.listen(l)),[a,l]),f.createElement(at,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}const $a=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Va=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ja=f.forwardRef((function(e,t){let r,{onClick:n,relative:a,reloadDocument:o,replace:i,state:s,target:l,to:u,preventScrollReset:c,unstable_viewTransition:d}=e,h=qt(e,Aa),{basename:p}=f.useContext(le),m=!1;if("string"==typeof u&&Va.test(u)&&(r=u,$a))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),r=ee(t.pathname,p);t.origin===e.origin&&null!=r?u=r+t.search+t.hash:m=!0}catch{}let v=ra(u,{relative:a}),y=Ya(u,{replace:i,state:s,target:l,preventScrollReset:c,relative:a,unstable_viewTransition:d});return f.createElement("a",Z({},h,{href:r||v,onClick:m||o?n:function(e){n&&n(e),e.defaultPrevented||y(e)},ref:t,target:l}))})),Mo=f.forwardRef((function(e,t){let{"aria-current":r="page",caseSensitive:n=!1,className:a="",end:o=!1,style:i,to:s,unstable_viewTransition:l,children:u}=e,c=qt(e,Oa),d=rt(s,{relative:c.relative}),h=he(),p=f.useContext(bt),{navigator:m,basename:v}=f.useContext(le),y=null!=p&&to(d)&&!0===l,g=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,b=h.pathname,w=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(b=b.toLowerCase(),w=w?w.toLowerCase():null,g=g.toLowerCase()),w&&v&&(w=ee(w,v)||w);const E="/"!==g&&g.endsWith("/")?g.length-1:g.length;let S,R=b===g||!o&&b.startsWith(g)&&"/"===b.charAt(E),x=null!=w&&(w===g||!o&&w.startsWith(g)&&"/"===w.charAt(g.length)),L={isActive:R,isPending:x,isTransitioning:y},D=R?r:void 0;S="function"==typeof a?a(L):[a,R?"active":null,x?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof i?i(L):i;return f.createElement(Ja,Z({},c,{"aria-current":D,className:S,ref:t,style:C,to:s,unstable_viewTransition:l}),"function"==typeof u?u(L):u)})),qa=f.forwardRef(((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:a,replace:o,state:i,method:s=mt,action:l,onSubmit:u,relative:c,preventScrollReset:d,unstable_viewTransition:h}=e,p=qt(e,ja),m=Gr(),v=Qa(l,{relative:c}),y="get"===s.toLowerCase()?"get":"post";return f.createElement("form",Z({ref:t,method:y,action:v,onSubmit:a?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,a=(null==t?void 0:t.getAttribute("formmethod"))||s;m(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:o,state:i,relative:c,preventScrollReset:d,unstable_viewTransition:h})}},p))}));function Fo(e){let{getKey:t,storageKey:r}=e;return Za({getKey:t,storageKey:r}),null}var ze,Ze;function Et(e){let t=f.useContext(et);return t||L(!1),t}function Yt(e){let t=f.useContext(bt);return t||L(!1),t}function Ya(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:s}=void 0===t?{}:t,l=$t(),u=he(),c=rt(e,{relative:i});return f.useCallback((t=>{if(Ta(t,r)){t.preventDefault();let r=void 0!==n?n:fe(u)===fe(c);l(e,{replace:r,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:s})}}),[u,l,c,n,a,r,e,o,i,s])}function Uo(e){let t=f.useRef(Bt(e)),r=f.useRef(!1),n=he(),a=f.useMemo((()=>_a(n.search,r.current?null:t.current)),[n.search]),o=$t(),i=f.useCallback(((e,t)=>{const n=Bt("function"==typeof e?e(a):e);r.current=!0,o("?"+n,t)}),[o,a]);return[a,i]}function Ga(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}!function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"}(ze||(ze={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Ze||(Ze={}));let Xa=0,Yr=()=>"__"+String(++Xa)+"__";function Gr(){let{router:e}=Et(ze.UseSubmit),{basename:t}=f.useContext(le),r=da();return f.useCallback((function(n,a){void 0===a&&(a={}),Ga();let{action:o,method:i,encType:s,formData:l,body:u}=Ua(n,t);if(!1===a.navigate){let t=a.fetcherKey||Yr();e.fetch(t,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,unstable_flushSync:a.unstable_flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:r,unstable_flushSync:a.unstable_flushSync,unstable_viewTransition:a.unstable_viewTransition})}),[e,t,r])}function Qa(e,t){let{relative:r}=void 0===t?{}:t,{basename:n}=f.useContext(le),a=f.useContext(se);a||L(!1);let[o]=a.matches.slice(-1),i=Z({},rt(e||".",{relative:r})),s=he();if(null==e){i.search=s.search;let e=new URLSearchParams(i.search);e.has("index")&&""===e.get("index")&&(e.delete("index"),i.search=e.toString()?"?"+e.toString():"")}return(!e||"."===e)&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:de([n,i.pathname])),fe(i)}function Ao(e){var t;let{key:r}=void 0===e?{}:e,{router:n}=Et(ze.UseFetcher),a=Yt(Ze.UseFetcher),o=f.useContext(qr),i=f.useContext(se),s=null==(t=i.matches[i.matches.length-1])?void 0:t.route.id;o||L(!1),i||L(!1),null==s&&L(!1);let l=Sr?Sr():"",[u,c]=f.useState(r||l);r&&r!==u?c(r):u||c(Yr()),f.useEffect((()=>(n.getFetcher(u),()=>{n.deleteFetcher(u)})),[n,u]);let d=f.useCallback(((e,t)=>{s||L(!1),n.fetch(u,s,e,t)}),[u,s,n]),h=Gr(),p=f.useCallback(((e,t)=>{h(e,Z({},t,{navigate:!1,fetcherKey:u}))}),[u,h]),m=f.useMemo((()=>f.forwardRef(((e,t)=>f.createElement(qa,Z({},e,{navigate:!1,fetcherKey:u,ref:t}))))),[u]),v=a.fetchers.get(u)||Or,y=o.get(u);return f.useMemo((()=>Z({Form:m,submit:p,load:d},v,{data:y})),[m,p,d,v,y])}function Oo(){let e=Yt(Ze.UseFetchers);return Array.from(e.fetchers.entries()).map((e=>{let[t,r]=e;return Z({},r,{key:t})}))}const xr="react-router-scroll-positions";let ht={};function Za(e){let{getKey:t,storageKey:r}=void 0===e?{}:e,{router:n}=Et(ze.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=Yt(Ze.UseScrollRestoration),{basename:i}=f.useContext(le),s=he(),l=ha(),u=fa();f.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),eo(f.useCallback((()=>{if("idle"===u.state){let e=(t?t(s,l):null)||s.key;ht[e]=window.scrollY}try{sessionStorage.setItem(r||xr,JSON.stringify(ht))}catch{}window.history.scrollRestoration="auto"}),[r,t,u.state,s,l])),typeof document<"u"&&(f.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(r||xr);e&&(ht=JSON.parse(e))}catch{}}),[r]),f.useLayoutEffect((()=>{let e=t&&"/"!==i?(e,r)=>t(Z({},e,{pathname:ee(e.pathname,i)||e.pathname}),r):t,r=null==n?void 0:n.enableScrollRestoration(ht,(()=>window.scrollY),e);return()=>r&&r()}),[n,i,t]),f.useLayoutEffect((()=>{if(!1!==a){if("number"==typeof a)return void window.scrollTo(0,a);if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==o&&window.scrollTo(0,0)}}),[s,a,o]))}function jo(e,t){let{capture:r}=t||{};f.useEffect((()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}}),[e,r])}function eo(e,t){let{capture:r}={};f.useEffect((()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}}),[e,r])}function Io(e){let{when:t,message:r}=e,n=ga(t);f.useEffect((()=>{"blocked"===n.state&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())}),[n,r]),f.useEffect((()=>{"blocked"===n.state&&!t&&n.reset()}),[n,t])}function to(e,t){void 0===t&&(t={});let r=f.useContext(Jr);null==r&&L(!1);let{basename:n}=Et(ze.useViewTransitionState),a=rt(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=ee(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=ee(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=pt(a.pathname,i)||null!=pt(a.pathname,o)}export{Ot as AbortedDeferredError,Eo as Await,Do as BrowserRouter,qa as Form,To as HashRouter,Ja as Link,yo as MemoryRouter,Mo as NavLink,bo as Navigate,z as NavigationType,wo as Outlet,Ra as Route,at as Router,Lo as RouterProvider,Ro as Routes,Fo as ScrollRestoration,et as UNSAFE_DataRouterContext,bt as UNSAFE_DataRouterStateContext,qr as UNSAFE_FetchersContext,tt as UNSAFE_LocationContext,le as UNSAFE_NavigationContext,se as UNSAFE_RouteContext,Jr as UNSAFE_ViewTransitionContext,da as UNSAFE_useRouteId,Za as UNSAFE_useScrollRestoration,Po as createBrowserRouter,Co as createHashRouter,xo as createMemoryRouter,fe as createPath,kt as createRoutesFromChildren,kt as createRoutesFromElements,Bt as createSearchParams,io as defer,ao as generatePath,Ur as isRouteErrorResponse,oo as json,pt as matchPath,ke as matchRoutes,ce as parsePath,In as redirect,lo as redirectDocument,So as renderMatches,Tn as resolvePath,_o as unstable_HistoryRouter,Io as unstable_usePrompt,to as unstable_useViewTransitionState,vo as useActionData,go as useAsyncError,pa as useAsyncValue,jo as useBeforeUnload,ga as useBlocker,Ao as useFetcher,Oo as useFetchers,Qa as useFormAction,ra as useHref,Fe as useInRouterContext,Ya as useLinkClickHandler,mo as useLoaderData,he as useLocation,uo as useMatch,ha as useMatches,$t as useNavigate,fa as useNavigation,so as useNavigationType,aa as useOutlet,co as useOutletContext,fo as useParams,rt as useResolvedPath,ho as useRevalidator,ma as useRouteError,po as useRouteLoaderData,oa as useRoutes,Uo as useSearchParams,Gr as useSubmit};
@@ -1 +1 @@
1
- export*from"https://cdn.jsdelivr.net/npm/@wellesley/vendor@1.0.5/react-toastify.mjs";
1
+ import{r as b,e as y}from"./index-DoZBmrkt.mjs";function ut(t){var e,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=ut(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function F(){for(var t,e,n=0,o="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=ut(t))&&(o&&(o+=" "),o+=e);return o}const G=t=>"number"==typeof t&&!isNaN(t),Y=t=>"string"==typeof t,k=t=>"function"==typeof t,nt=t=>Y(t)||k(t)?t:null,it=t=>b.isValidElement(t)||Y(t)||k(t)||G(t);function vt(t,e,n){void 0===n&&(n=300);const{scrollHeight:o,style:s}=t;requestAnimationFrame((()=>{s.minHeight="initial",s.height=o+"px",s.transition=`all ${n}ms`,requestAnimationFrame((()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(e,n)}))}))}function st(t){let{enter:e,exit:n,appendPosition:o=!1,collapse:s=!0,collapseDuration:a=300}=t;return function(t){let{children:r,position:i,preventExitTransition:l,done:c,nodeRef:d,isIn:u,playToast:p}=t;const f=o?`${e}--${i}`:e,m=o?`${n}--${i}`:n,g=b.useRef(0);return b.useLayoutEffect((()=>{const t=d.current,e=f.split(" "),n=o=>{o.target===d.current&&(p(),t.removeEventListener("animationend",n),t.removeEventListener("animationcancel",n),0===g.current&&"animationcancel"!==o.type&&t.classList.remove(...e))};t.classList.add(...e),t.addEventListener("animationend",n),t.addEventListener("animationcancel",n)}),[]),b.useEffect((()=>{const t=d.current,e=()=>{t.removeEventListener("animationend",e),s?vt(t,c,a):c()};u||(l?e():(g.current=1,t.className+=` ${m}`,t.addEventListener("animationend",e)))}),[u]),y.createElement(y.Fragment,null,r)}}function ct(t,e){return null!=t?{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}:{}}const $=new Map;let J=[];const lt=new Set,ht=t=>lt.forEach((e=>e(t))),pt=()=>$.size>0;function ft(t,e){var n;if(e)return!(null==(n=$.get(e))||!n.isToastActive(t));let o=!1;return $.forEach((e=>{e.isToastActive(t)&&(o=!0)})),o}function mt(t,e){it(t)&&(pt()||J.push({content:t,options:e}),$.forEach((n=>{n.buildToast(t,e)})))}function dt(t,e){$.forEach((n=>{null!=e&&null!=e&&e.containerId?(null==e?void 0:e.containerId)===n.id&&n.toggle(t,null==e?void 0:e.id):n.toggle(t,null==e?void 0:e.id)}))}function Et(t){const{subscribe:e,getSnapshot:n,setProps:o}=b.useRef(function(t){const e=t.containerId||1;return{subscribe(n){const o=function(t,e,n){let o=1,s=0,a=[],r=[],i=[],l=e;const c=new Map,d=new Set,u=()=>{i=Array.from(c.values()),d.forEach((t=>t()))},p=t=>{r=null==t?[]:r.filter((e=>e!==t)),u()},f=t=>{const{toastId:e,onOpen:o,updateId:s,children:a}=t.props,i=null==s;t.staleId&&c.delete(t.staleId),c.set(e,t),r=[...r,t.props.toastId].filter((e=>e!==t.staleId)),u(),n(ct(t,i?"added":"updated")),i&&k(o)&&o(b.isValidElement(a)&&a.props)};return{id:t,props:l,observe:t=>(d.add(t),()=>d.delete(t)),toggle:(t,e)=>{c.forEach((n=>{null!=e&&e!==n.props.toastId||k(n.toggle)&&n.toggle(t)}))},removeToast:p,toasts:c,clearQueue:()=>{s-=a.length,a=[]},buildToast:(e,r)=>{if((e=>{let{containerId:n,toastId:o,updateId:s}=e;const a=n?n!==t:1!==t,r=c.has(o)&&null==s;return a||r})(r))return;const{toastId:i,updateId:d,data:m,staleId:y,delay:g}=r,h=()=>{p(i)},v=null==d;v&&s++;const T={...l,style:l.toastStyle,key:o++,...Object.fromEntries(Object.entries(r).filter((t=>{let[e,n]=t;return null!=n}))),toastId:i,updateId:d,data:m,closeToast:h,isIn:!1,className:nt(r.className||l.toastClassName),bodyClassName:nt(r.bodyClassName||l.bodyClassName),progressClassName:nt(r.progressClassName||l.progressClassName),autoClose:!r.isLoading&&(E=r.autoClose,I=l.autoClose,!1===E||G(E)&&E>0?E:I),deleteToast(){const t=c.get(i),{onClose:e,children:o}=t.props;k(e)&&e(b.isValidElement(o)&&o.props),n(ct(t,"removed")),c.delete(i),s--,s<0&&(s=0),a.length>0?f(a.shift()):u()}};var E,I;T.closeButton=l.closeButton,!1===r.closeButton||it(r.closeButton)?T.closeButton=r.closeButton:!0===r.closeButton&&(T.closeButton=!it(l.closeButton)||l.closeButton);let _=e;b.isValidElement(e)&&!Y(e.type)?_=b.cloneElement(e,{closeToast:h,toastProps:T,data:m}):k(e)&&(_=e({closeToast:h,toastProps:T,data:m}));const C={content:_,props:T,staleId:y};l.limit&&l.limit>0&&s>l.limit&&v?a.push(C):G(g)?setTimeout((()=>{f(C)}),g):f(C)},setProps(t){l=t},setToggle:(t,e)=>{c.get(t).toggle=e},isToastActive:t=>r.some((e=>e===t)),getSnapshot:()=>l.newestOnTop?i.reverse():i}}(e,t,ht);$.set(e,o);const s=o.observe(n);return J.forEach((t=>mt(t.content,t.options))),J=[],()=>{s(),$.delete(e)}},setProps(t){var n;null==(n=$.get(e))||n.setProps(t)},getSnapshot(){var t;return null==(t=$.get(e))?void 0:t.getSnapshot()}}}(t)).current;o(t);const s=b.useSyncExternalStore(e,n,n);return{getToastToRender:function(t){if(!s)return[];const e=new Map;return s.forEach((t=>{const{position:n}=t.props;e.has(n)||e.set(n,[]),e.get(n).push(t)})),Array.from(e,(e=>t(e[0],e[1])))},isToastActive:ft,count:null==s?void 0:s.length}}function Tt(t){const[e,n]=b.useState(!1),[o,s]=b.useState(!1),a=b.useRef(null),r=b.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:l,closeToast:c,onClick:d,closeOnClick:u}=t;var p,f;function m(){n(!0)}function y(){n(!1)}function g(n){const o=a.current;r.canDrag&&o&&(r.didMove=!0,e&&y(),r.delta="x"===t.draggableDirection?n.clientX-r.start:n.clientY-r.start,r.start!==n.clientX&&(r.canCloseOnClick=!1),o.style.transform=`translate3d(${"x"===t.draggableDirection?`${r.delta}px, var(--y)`:`0, calc(${r.delta}px + var(--y))`},0)`,o.style.opacity=""+(1-Math.abs(r.delta/r.removalDistance)))}function h(){document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",h);const e=a.current;if(r.canDrag&&r.didMove&&e){if(r.canDrag=!1,Math.abs(r.delta)>r.removalDistance)return s(!0),t.closeToast(),void t.collapseAll();e.style.transition="transform 0.2s, opacity 0.2s",e.style.removeProperty("transform"),e.style.removeProperty("opacity")}}null==(f=$.get((p={id:t.toastId,containerId:t.containerId,fn:n}).containerId||1))||f.setToggle(p.id,p.fn),b.useEffect((()=>{if(t.pauseOnFocusLoss)return document.hasFocus()||y(),window.addEventListener("focus",m),window.addEventListener("blur",y),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",y)}}),[t.pauseOnFocusLoss]);const v={onPointerDown:function(e){if(!0===t.draggable||t.draggable===e.pointerType){r.didMove=!1,document.addEventListener("pointermove",g),document.addEventListener("pointerup",h);const n=a.current;r.canCloseOnClick=!0,r.canDrag=!0,n.style.transition="none","x"===t.draggableDirection?(r.start=e.clientX,r.removalDistance=n.offsetWidth*(t.draggablePercent/100)):(r.start=e.clientY,r.removalDistance=n.offsetHeight*(80===t.draggablePercent?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(e){const{top:n,bottom:o,left:s,right:r}=a.current.getBoundingClientRect();"touchend"!==e.nativeEvent.type&&t.pauseOnHover&&e.clientX>=s&&e.clientX<=r&&e.clientY>=n&&e.clientY<=o?y():m()}};return i&&l&&(v.onMouseEnter=y,t.stacked||(v.onMouseLeave=m)),u&&(v.onClick=t=>{d&&d(t),r.canCloseOnClick&&c()}),{playToast:m,pauseToast:y,isRunning:e,preventExitTransition:o,toastRef:a,eventHandlers:v}}function bt(t){let{delay:e,isRunning:n,closeToast:o,type:s="default",hide:a,className:r,style:i,controlledProgress:l,progress:c,rtl:d,isIn:u,theme:p}=t;const f=a||l&&0===c,m={...i,animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};l&&(m.transform=`scaleX(${c})`);const g=F("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":d}),h=k(r)?r({rtl:d,type:s,defaultClassName:g}):F(g,r),v={[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{u&&o()}};return y.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":f},y.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${p} Toastify__progress-bar--${s}`}),y.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:h,style:m,...v}))}let It=1;const gt=()=>""+It++;function _t(t){return t&&(Y(t.toastId)||G(t.toastId))?t.toastId:gt()}function Z(t,e){return mt(t,e),e.toastId}function ot(t,e){return{...e,type:e&&e.type||t,toastId:_t(e)}}function tt(t){return(e,n)=>Z(e,ot(t,n))}function h(t,e){return Z(t,ot("default",e))}h.loading=(t,e)=>Z(t,ot("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),h.promise=function(t,e,n){let o,{pending:s,error:a,success:r}=e;s&&(o=Y(s)?h.loading(s,n):h.loading(s.render,{...n,...s}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(t,e,s)=>{if(null==e)return void h.dismiss(o);const a={type:t,...i,...n,data:s},r=Y(e)?{render:e}:e;return o?h.update(o,{...a,...r}):h(r.render,{...a,...r}),s},c=k(t)?t():t;return c.then((t=>l("success",r,t))).catch((t=>l("error",a,t))),c},h.success=tt("success"),h.info=tt("info"),h.error=tt("error"),h.warning=tt("warning"),h.warn=h.warning,h.dark=(t,e)=>Z(t,ot("default",{theme:"dark",...e})),h.dismiss=function(t){!function(t){var e;if(pt()){if(null==t||Y(e=t)||G(e))$.forEach((e=>{e.removeToast(t)}));else if(t&&("containerId"in t||"id"in t)){const e=$.get(t.containerId);e?e.removeToast(t.id):$.forEach((e=>{e.removeToast(t.id)}))}}else J=J.filter((e=>null!=t&&e.options.toastId!==t))}(t)},h.clearWaitingQueue=function(t){void 0===t&&(t={}),$.forEach((e=>{!e.props.limit||t.containerId&&e.id!==t.containerId||e.clearQueue()}))},h.isActive=ft,h.update=function(t,e){void 0===e&&(e={});const n=((t,e)=>{var n;let{containerId:o}=e;return null==(n=$.get(o||1))?void 0:n.toasts.get(t)})(t,e);if(n){const{props:o,content:s}=n,a={delay:100,...o,...e,toastId:e.toastId||t,updateId:gt()};a.toastId!==t&&(a.staleId=t);const r=a.render||s;delete a.render,Z(r,a)}},h.done=t=>{h.update(t,{progress:1})},h.onChange=function(t){return lt.add(t),()=>{lt.delete(t)}},h.play=t=>dt(!0,t),h.pause=t=>dt(!1,t);const Ct=typeof window<"u"?b.useLayoutEffect:b.useEffect,et=t=>{let{theme:e,type:n,isLoading:o,...s}=t;return y.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===e?"currentColor":`var(--toastify-icon-color-${n})`,...s})},rt={info:function(t){return y.createElement(et,{...t},y.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(t){return y.createElement(et,{...t},y.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(t){return y.createElement(et,{...t},y.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(t){return y.createElement(et,{...t},y.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return y.createElement("div",{className:"Toastify__spinner"})}},Lt=t=>{const{isRunning:e,preventExitTransition:n,toastRef:o,eventHandlers:s,playToast:a}=Tt(t),{closeButton:r,children:i,autoClose:l,onClick:c,type:d,hideProgressBar:u,closeToast:p,transition:f,position:m,className:g,style:h,bodyClassName:v,bodyStyle:T,progressClassName:E,progressStyle:I,updateId:_,role:C,progress:$,rtl:L,toastId:N,deleteToast:P,isIn:w,isLoading:A,closeOnClick:x,theme:B}=t,M=F("Toastify__toast",`Toastify__toast-theme--${B}`,`Toastify__toast--${d}`,{"Toastify__toast--rtl":L},{"Toastify__toast--close-on-click":x}),D=k(g)?g({rtl:L,position:m,type:d,defaultClassName:M}):F(M,g),O=function(t){let{theme:e,type:n,isLoading:o,icon:s}=t,a=null;const r={theme:e,type:n};return!1===s||(k(s)?a=s({...r,isLoading:o}):b.isValidElement(s)?a=b.cloneElement(s,r):o?a=rt.spinner():n in rt&&(a=rt[n](r))),a}(t),R=!!$||!l,S={closeToast:p,type:d,theme:B};let z=null;return!1===r||(z=k(r)?r(S):b.isValidElement(r)?b.cloneElement(r,S):function(t){let{closeToast:e,theme:n,ariaLabel:o="close"}=t;return y.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:t=>{t.stopPropagation(),e(t)},"aria-label":o},y.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},y.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(S)),y.createElement(f,{isIn:w,done:P,position:m,preventExitTransition:n,nodeRef:o,playToast:a},y.createElement("div",{id:N,onClick:c,"data-in":w,className:D,...s,style:h,ref:o},y.createElement("div",{...w&&{role:C},className:k(v)?v({type:d}):F("Toastify__toast-body",v),style:T},null!=O&&y.createElement("div",{className:F("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!A})},O),y.createElement("div",null,i)),z,y.createElement(bt,{..._&&!R?{key:`pb-${_}`}:{},rtl:L,theme:B,delay:l,isRunning:e,isIn:w,closeToast:p,hide:u,type:d,style:I,className:E,controlledProgress:R,progress:$||0})))},at=function(t,e){return void 0===e&&(e=!1),{enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}},Nt=st(at("bounce",!0)),kt=st(at("slide",!0)),Pt=st(at("zoom")),xt=st(at("flip")),$t={position:"top-right",transition:Nt,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function At(t){let e={...$t,...t};const n=t.stacked,[o,s]=b.useState(!0),a=b.useRef(null),{getToastToRender:r,isToastActive:i,count:l}=Et(e),{className:c,style:d,rtl:u,containerId:p}=e;function f(t){const e=F("Toastify__toast-container",`Toastify__toast-container--${t}`,{"Toastify__toast-container--rtl":u});return k(c)?c({position:t,rtl:u,defaultClassName:e}):F(e,nt(c))}function m(){n&&(s(!0),h.play())}return Ct((()=>{if(n){var t;const n=a.current.querySelectorAll('[data-in="true"]'),s=12,r=null==(t=e.position)?void 0:t.includes("top");let i=0,l=0;Array.from(n).reverse().forEach(((t,e)=>{const n=t;n.classList.add("Toastify__toast--stacked"),e>0&&(n.dataset.collapsed=`${o}`),n.dataset.pos||(n.dataset.pos=r?"top":"bot");const a=i*(o?.2:1)+(o?0:s*e);n.style.setProperty("--y",`${r?a:-1*a}px`),n.style.setProperty("--g",`${s}`),n.style.setProperty("--s",""+(1-(o?l:0))),i+=n.offsetHeight,l+=.025}))}}),[o,l,n]),y.createElement("div",{ref:a,className:"Toastify",id:p,onMouseEnter:()=>{n&&(s(!1),h.pause())},onMouseLeave:m},r(((t,e)=>{const o=e.length?{...d}:{...d,pointerEvents:"none"};return y.createElement("div",{className:f(t),style:o,key:`container-${t}`},e.map((t=>{let{content:e,props:o}=t;return y.createElement(Lt,{...o,stacked:n,collapseAll:m,isIn:i(o.toastId,o.containerId),style:o.style,key:`toast-${o.key}`},e)})))})))}export{Nt as Bounce,xt as Flip,rt as Icons,kt as Slide,At as ToastContainer,Pt as Zoom,vt as collapseToast,st as cssTransition,h as toast,Tt as useToast,Et as useToastContainer};
package/react.mjs CHANGED
@@ -1 +1 @@
1
- import*as e from"https://cdn.jsdelivr.net/npm/@wellesley/vendor@1.0.5/react.mjs";const{useState:t,useEffect:r,useContext:s,useReducer:a,useCallback:n,useMemo:o,useRef:u,useImperativeHandle:l,useLayoutEffect:c,useDebugValue:f,Children:i,Component:m,PureComponent:d,Fragment:p,Suspense:E,createContext:C,isValidElement:x,createElement:S,cloneElement:y,createRef:R,forwardRef:I,lazy:V,memo:b,Profiler:g,StrictMode:v,createFactory:D,startTransition:F,useDeferredValue:M,useId:P,useInsertionEffect:T,useSyncExternalStore:$,useTransition:h,version:k}=e;export{i as Children,m as Component,p as Fragment,g as Profiler,d as PureComponent,v as StrictMode,E as Suspense,y as cloneElement,C as createContext,S as createElement,D as createFactory,R as createRef,e as default,I as forwardRef,x as isValidElement,V as lazy,b as memo,F as startTransition,n as useCallback,s as useContext,f as useDebugValue,M as useDeferredValue,r as useEffect,P as useId,l as useImperativeHandle,T as useInsertionEffect,c as useLayoutEffect,o as useMemo,a as useReducer,u as useRef,t as useState,$ as useSyncExternalStore,h as useTransition,k as version};
1
+ import{R as e}from"./index-DoZBmrkt.mjs";const{useState:r,useEffect:s,useContext:a,useReducer:n,useCallback:o,useMemo:u,useRef:c,useImperativeHandle:l,useLayoutEffect:f,useDebugValue:i,Children:m,Component:d,PureComponent:E,Fragment:p,Suspense:C,createContext:R,isValidElement:S,createElement:x,cloneElement:y,createRef:I,forwardRef:V,lazy:b,memo:g,Profiler:v,StrictMode:D,createFactory:F,startTransition:M,useDeferredValue:P,useId:T,useInsertionEffect:h,useSyncExternalStore:k,useTransition:w,version:z}=e;export{m as Children,d as Component,p as Fragment,v as Profiler,E as PureComponent,D as StrictMode,C as Suspense,y as cloneElement,R as createContext,x as createElement,F as createFactory,I as createRef,e as default,V as forwardRef,S as isValidElement,b as lazy,g as memo,M as startTransition,o as useCallback,a as useContext,i as useDebugValue,P as useDeferredValue,s as useEffect,T as useId,l as useImperativeHandle,h as useInsertionEffect,f as useLayoutEffect,u as useMemo,n as useReducer,c as useRef,r as useState,k as useSyncExternalStore,w as useTransition,z as version};
@@ -1 +1 @@
1
- var kt=Object.defineProperty,Rt=(e,t,n)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$=(e,t,n)=>Rt(e,"symbol"!=typeof t?t+"":t,n);function A(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 jt="function"==typeof Symbol&&Symbol.observable||"@@observable",Fe=jt,pe=()=>Math.random().toString(36).substring(7).split("").join("."),Tt={INIT:`@@redux/INIT${pe()}`,REPLACE:`@@redux/REPLACE${pe()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pe()}`},Z=Tt;function se(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function ke(e,t,n){if("function"!=typeof e)throw new Error(A(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(A(0));if("function"==typeof t&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if("function"!=typeof n)throw new Error(A(1));return n(ke)(e,t)}let r=e,o=t,i=new Map,s=i,c=0,a=!1;function u(){s===i&&(s=new Map,i.forEach(((e,t)=>{s.set(t,e)})))}function l(){if(a)throw new Error(A(3));return o}function f(e){if("function"!=typeof e)throw new Error(A(4));if(a)throw new Error(A(5));let t=!0;u();const n=c++;return s.set(n,e),function(){if(t){if(a)throw new Error(A(6));t=!1,u(),s.delete(n),i=null}}}function d(e){if(!se(e))throw new Error(A(7));if(typeof e.type>"u")throw new Error(A(8));if("string"!=typeof e.type)throw new Error(A(17));if(a)throw new Error(A(9));try{a=!0,o=r(o,e)}finally{a=!1}return(i=s).forEach((e=>{e()})),e}return d({type:Z.INIT}),{dispatch:d,subscribe:f,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(A(10));r=e,d({type:Z.REPLACE})},[Fe]:function(){const e=f;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(A(11));function n(){const e=t;e.next&&e.next(l())}return n(),{unsubscribe:e(n)}},[Fe](){return this}}}}}function hn(e,t,n){return ke(e,t,n)}function Nt(e){Object.keys(e).forEach((t=>{const n=e[t];if(typeof n(void 0,{type:Z.INIT})>"u")throw new Error(A(12));if(typeof n(void 0,{type:Z.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(A(13))}))}function Qe(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o;try{Nt(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let i=!1;const s={};for(let o=0;o<r.length;o++){const c=r[o],a=n[c],u=e[c],l=a(u,t);if(typeof l>"u")throw t&&t.type,new Error(A(14));s[c]=l,i=i||l!==u}return i=i||r.length!==Object.keys(e).length,i?s:e}}function Le(e,t){return function(...n){return t(e.apply(this,n))}}function mn(e,t){if("function"==typeof e)return Le(e,t);if("object"!=typeof e||null===e)throw new Error(A(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=Le(o,t))}return n}function q(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function Dt(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(A(15))};const s={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},c=e.map((e=>e(s)));return i=q(...c)(o.dispatch),{...o,dispatch:i}}}function Re(e){return se(e)&&"type"in e&&"string"==typeof e.type}var Ye=Symbol.for("immer-nothing"),Ue=Symbol.for("immer-draftable"),C=Symbol.for("immer-state");function k(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var W=Object.getPrototypeOf;function T(e){return!!e&&!!e[C]}function N(e){var t;return!!e&&(Ze(e)||Array.isArray(e)||!!e[Ue]||!(null==(t=e.constructor)||!t[Ue])||ae(e)||ue(e))}var It=Object.prototype.constructor.toString();function Ze(e){if(!e||"object"!=typeof e)return!1;const t=W(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===It}function bn(e){return T(e)||k(15,e),e[C].base_}function K(e,t){0===ce(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function ce(e){const t=e[C];return t?t.type_:Array.isArray(e)?1:ae(e)?2:ue(e)?3:0}function _e(e,t){return 2===ce(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function et(e,t,n){const r=ce(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function xt(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function ae(e){return e instanceof Map}function ue(e){return e instanceof Set}function I(e){return e.copy_||e.base_}function ve(e,t){if(ae(e))return new Map(e);if(ue(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Ze(e))return W(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[C];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],i=n[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(W(e),n)}function je(e,t=!1){return fe(e)||T(e)||!N(e)||(ce(e)>1&&(e.set=e.add=e.clear=e.delete=zt),Object.freeze(e),t&&K(e,((e,t)=>je(t,!0)))),e}function zt(){k(2)}function fe(e){return Object.isFrozen(e)}var V,Ft={};function L(e){const t=Ft[e];return t||k(0,e),t}function tt(){return V}function Lt(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function We(e,t){t&&(L("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ge(e){we(e),e.drafts_.forEach(Ut),e.drafts_=null}function we(e){e===V&&(V=e.parent_)}function $e(e){return V=Lt(V,e)}function Ut(e){const t=e[C];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Be(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[C].modified_&&(ge(t),k(4)),N(e)&&(e=ee(t,e),t.parent_||te(t,e)),t.patches_&&L("Patches").generateReplacementPatches_(n[C].base_,e,t.patches_,t.inversePatches_)):e=ee(t,n,[]),ge(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ye?e:void 0}function ee(e,t,n){if(fe(t))return t;const r=t[C];if(!r)return K(t,((o,i)=>qe(e,r,t,o,i,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return te(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,i=!1;3===r.type_&&(o=new Set(t),t.clear(),i=!0),K(o,((o,s)=>qe(e,r,t,o,s,n,i))),te(e,t,!1),n&&e.patches_&&L("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function qe(e,t,n,r,o,i,s){if(T(o)){const s=ee(e,o,i&&t&&3!==t.type_&&!_e(t.assigned_,r)?i.concat(r):void 0);if(et(n,r,s),!T(s))return;e.canAutoFreeze_=!1}else s&&n.add(o);if(N(o)&&!fe(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ee(e,o),(!t||!t.scope_.parent_)&&te(e,o)}}function te(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&je(t,n)}function Wt(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:tt(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=Te;n&&(o=[r],i=H);const{revoke:s,proxy:c}=Proxy.revocable(o,i);return r.draft_=c,r.revoke_=s,c}var Te={get(e,t){if(t===C)return e;const n=I(e);if(!_e(n,t))return $t(e,n,t);const r=n[t];return e.finalized_||!N(r)?r:r===he(e.base_,t)?(me(e),e.copy_[t]=Me(r,e)):r},has:(e,t)=>t in I(e),ownKeys:e=>Reflect.ownKeys(I(e)),set(e,t,n){const r=rt(I(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=he(I(e),t),o=null==r?void 0:r[C];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(xt(n,r)&&(void 0!==n||_e(e.base_,t)))return!0;me(e),Ee(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==he(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,me(e),Ee(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=I(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){k(11)},getPrototypeOf:e=>W(e.base_),setPrototypeOf(){k(12)}},H={};function he(e,t){const n=e[C];return(n?I(n):e)[t]}function $t(e,t,n){var r;const o=rt(t,n);return o?"value"in o?o.value:null==(r=o.get)?void 0:r.call(e.draft_):void 0}function rt(e,t){if(!(t in e))return;let n=W(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=W(n)}}function Ee(e){e.modified_||(e.modified_=!0,e.parent_&&Ee(e.parent_))}function me(e){e.copy_||(e.copy_=ve(e.base_,e.scope_.immer_.useStrictShallowCopy_))}K(Te,((e,t)=>{H[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),H.deleteProperty=function(e,t){return H.set.call(this,e,t,void 0)},H.set=function(e,t,n){return Te.set.call(this,e[0],t,n,e[0])};var Bt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&k(6),void 0!==n&&"function"!=typeof n&&k(7),N(e)){const o=$e(this),i=Me(e,void 0);let s=!0;try{r=t(i),s=!1}finally{s?ge(o):we(o)}return We(o,n),Be(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Ye&&(r=void 0),this.autoFreeze_&&je(r,!0),n){const t=[],o=[];L("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}k(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){N(e)||k(8),T(e)&&(e=nt(e));const t=$e(this),n=Me(e,void 0);return n[C].isManual_=!0,we(t),n}finishDraft(e,t){const n=e&&e[C];(!n||!n.isManual_)&&k(9);const{scope_:r}=n;return We(r,t),Be(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=L("Patches").applyPatches_;return T(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function Me(e,t){const n=ae(e)?L("MapSet").proxyMap_(e,t):ue(e)?L("MapSet").proxySet_(e,t):Wt(e,t);return(t?t.scope_:tt()).drafts_.push(n),n}function nt(e){return T(e)||k(10,e),it(e)}function it(e){if(!N(e)||fe(e))return e;const t=e[C];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ve(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ve(e,!0);return K(n,((e,t)=>{et(n,e,it(t))})),t&&(t.finalized_=!1),n}var P=new Bt,Ne=P.produce;P.produceWithPatches.bind(P),P.setAutoFreeze.bind(P),P.setUseStrictShallowCopy.bind(P),P.applyPatches.bind(P),P.createDraft.bind(P),P.finishDraft.bind(P);var re="NOT_FOUND";function qt(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function Kt(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function Vt(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}var Ke=e=>Array.isArray(e)?e:[e];function Ht(e){const t=Array.isArray(e[0])?e[0]:e;return Vt(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Gt(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function Xt(e){let t;return{get:n=>t&&e(t.key,n)?t.value:re,put(e,n){t={key:e,value:n}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}function Jt(e,t){let n=[];function r(e){const r=n.findIndex((n=>t(e,n.key)));if(r>-1){const e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return re}return{get:r,put:function(t,o){r(t)===re&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}var Qt=(e,t)=>e===t;function Yt(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;const{length:r}=t;for(let o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}function _n(e,t){const n="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=Qt,maxSize:o=1,resultEqualityCheck:i}=n,s=Yt(r);let c=0;const a=1===o?Xt(s):Jt(o,s);function u(){let t=a.get(arguments);if(t===re){if(t=e.apply(null,arguments),c++,i){const e=a.getEntries().find((e=>i(e.value,t)));e&&(t=e.value,0!==c&&c--)}a.put(arguments,t)}return t}return u.clearCache=()=>{a.clear(),u.resetResultsCount()},u.resultsCount=()=>c,u.resetResultsCount=()=>{c=0},u}var Zt=class{constructor(e){this.value=e}deref(){return this.value}},er=typeof WeakRef<"u"?WeakRef:Zt,tr=0,Ve=1;function Q(){return{s:tr,v:void 0,o:null,p:null}}function De(e,t={}){let n=Q();const{resultEqualityCheck:r}=t;let o,i=0;function s(){var t;let s=n;const{length:c}=arguments;for(let e=0,t=c;e<t;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=s.o;null===e&&(s.o=e=new WeakMap);const n=e.get(t);void 0===n?(s=Q(),e.set(t,s)):s=n}else{let e=s.p;null===e&&(s.p=e=new Map);const n=e.get(t);void 0===n?(s=Q(),e.set(t,s)):s=n}}const a=s;let u;if(s.s===Ve?u=s.v:(u=e.apply(null,arguments),i++),a.s=Ve,r){const e=(null==(t=null==o?void 0:o.deref)?void 0:t.call(o))??o;null!=e&&r(e,u)&&(u=e,0!==i&&i--),o="object"==typeof u&&null!==u||"function"==typeof u?new er(u):u}return a.v=u,u}return s.clearCache=()=>{n=Q(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function ot(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,i={},s=e.pop();"object"==typeof s&&(i=s,s=e.pop()),qt(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const c={...n,...i},{memoize:a,memoizeOptions:u=[],argsMemoize:l=De,argsMemoizeOptions:f=[],devModeChecks:d={}}=c,p=Ke(u),y=Ke(f),h=Ht(e),m=a((function(){return r++,s.apply(null,arguments)}),...p),b=l((function(){o++;const e=Gt(h,arguments);return t=m.apply(null,e),t}),...y);return Object.assign(b,{resultFunc:s,memoizedResultFunc:m,dependencies:h,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:a,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var rr=ot(De),nr=Object.assign(((e,t=rr)=>{Kt(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[n[r]]=t,e)),{})))}),{withTypes:()=>nr});function st(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var ir=st(),or=st,sr={TERM_PROGRAM:"WarpTerminal",NODE:"/Users/krasevych/.nvm/versions/node/v22.12.0/bin/node",INIT_CWD:"/Users/krasevych/Projects/Animatron/web-apps",NVM_CD_FLAGS:"-q",WARP_HONOR_PS1:"0",TERM:"xterm-256color",SHELL:"/bin/zsh",TMPDIR:"/var/folders/1y/vz19w_xj5xzb49lxmbmzk7dc0000gn/T/",npm_config_global_prefix:"/Users/krasevych/.nvm/versions/node/v22.12.0",TERM_PROGRAM_VERSION:"v0.2025.03.26.08.10.stable_02",NODE_OPTIONS:"--max-old-space-size=8192",COLOR:"1",npm_config_noproxy:"",npm_config_local_prefix:"/Users/krasevych/Projects/Animatron/web-apps",NVM_DIR:"/Users/krasevych/.nvm",USER:"krasevych",COMMAND_MODE:"unix2003",npm_config_globalconfig:"/Users/krasevych/.nvm/versions/node/v22.12.0/etc/npmrc",SSH_AUTH_SOCK:"/private/tmp/com.apple.launchd.Z637x9A5qh/Listeners",__CF_USER_TEXT_ENCODING:"0x1F5:0x0:0x2",WARP_IS_LOCAL_SHELL_SESSION:"1",npm_execpath:"/Users/krasevych/.nvm/versions/node/v22.12.0/lib/node_modules/npm/bin/npm-cli.js",WARP_USE_SSH_WRAPPER:"1",PATH:"/Users/krasevych/Projects/Animatron/web-apps/packages/vendor/node_modules/.bin:/Users/krasevych/Projects/Animatron/web-apps/packages/node_modules/.bin:/Users/krasevych/Projects/Animatron/web-apps/node_modules/.bin:/Users/krasevych/Projects/Animatron/node_modules/.bin:/Users/krasevych/Projects/node_modules/.bin:/Users/krasevych/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Users/krasevych/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/usr/local/opt/postgresql@16/bin:/Users/krasevych/.yarn/bin:/Users/krasevych/.config/yarn/global/node_modules/.bin:/Users/krasevych/.nvm/versions/node/v22.12.0/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin",npm_package_json:"/Users/krasevych/Projects/Animatron/web-apps/packages/vendor/package.json",npm_config_userconfig:"/Users/krasevych/.npmrc",npm_config_init_module:"/Users/krasevych/.npm-init.js",__CFBundleIdentifier:"dev.warp.Warp-Stable",npm_command:"run-script",PWD:"/Users/krasevych/Projects/Animatron/web-apps/packages/vendor",npm_lifecycle_event:"build",EDITOR:"vi",npm_package_name:"@wellesley/vendor",npm_config_npm_version:"10.9.0",XPC_FLAGS:"0x0",npm_config_node_gyp:"/Users/krasevych/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",npm_package_version:"1.0.6",XPC_SERVICE_NAME:"0",SHLVL:"2",HOME:"/Users/krasevych",npm_config_cache:"/Users/krasevych/.npm",LOGNAME:"krasevych",npm_lifecycle_script:"tsc && vite build",LC_CTYPE:"UTF-8",SSH_SOCKET_DIR:"~/.ssh",NVM_BIN:"/Users/krasevych/.nvm/versions/node/v22.12.0/bin",npm_config_user_agent:"npm/10.9.0 node/v22.12.0 darwin x64 workspaces/true",CONDA_CHANGEPS1:"false",npm_node_execpath:"/Users/krasevych/.nvm/versions/node/v22.12.0/bin/node",npm_config_prefix:"/Users/krasevych/.nvm/versions/node/v22.12.0",COLORTERM:"truecolor",_:"/Users/krasevych/Projects/Animatron/web-apps/node_modules/.bin/vite",NODE_ENV:"production",APP_NAME:"@wellesley/vendor"},cr=(...e)=>{const t=ot(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(T(e)?nt(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n},ar=cr(De),ur=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?q:q.apply(null,arguments)},ct=e=>e&&"function"==typeof e.match;function j(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(S(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>Re(t)&&t.type===e,n}function vn(e){return"function"==typeof e&&"type"in e&&ct(e)}function fr(e){return Re(e)&&Object.keys(e).every(lr)}function lr(e){return["type","payload","error","meta"].indexOf(e)>-1}function gn(e={}){return()=>e=>t=>e(t)}function Oe(e,t){for(const n of e)if(t(n))return n}var at=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function He(e){return N(e)?Ne(e,(()=>{})):e}function ne(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error(S(10));const r=n.insert(t,e);return e.set(t,r),r}function wn(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function En(e={}){return()=>e=>t=>e(t)}function dr(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||se(e)}function yr(e,t="",n=dr,r,o=[],i){let s;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e||null!=i&&i.has(e))return!1;const c=null!=r?r(e):Object.entries(e),a=o.length>0;for(const[e,u]of c){const c=t?t+"."+e:e;if(!a||!o.some((e=>e instanceof RegExp?e.test(c):c===e))){if(!n(u))return{keyPath:c,value:u};if("object"==typeof u&&(s=yr(u,c,n,r,o,i),s))return s}}return i&&ut(e)&&i.add(e),!1}function ut(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!ut(t))return!1;return!0}function Mn(e={}){return()=>e=>t=>e(t)}function pr(e){return"boolean"==typeof e}var hr=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let i=new at;return t&&(pr(t)?i.push(ir):i.push(or(t.extraArgument))),i},ft="RTK_autoBatch",On=()=>e=>({payload:e,meta:{[ft]:!0}}),lt=e=>t=>{setTimeout(t,e)},mr=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:lt(10),br=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,s=!1;const c=new Set,a="tick"===e.type?queueMicrotask:"raf"===e.type?mr:"callback"===e.type?e.queueNotification:lt(e.timeout),u=()=>{s=!1,i&&(i=!1,c.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>o&&e()));return c.add(e),()=>{t(),c.delete(e)}},dispatch(e){var t;try{return o=!(null!=(t=null==e?void 0:e.meta)&&t[ft]),i=!o,i&&(s||(s=!0,a(u))),r.dispatch(e)}finally{o=!0}}})},_r=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new at(e);return n&&r.push(br("object"==typeof n?n:void 0)),r},vr="production"===sr.NODE_ENV;function An(e){const t=hr(),{reducer:n,middleware:r,devTools:o=!0,preloadedState:i,enhancers:s}=e||{};let c,a;if("function"==typeof n)c=n;else{if(!se(n))throw new Error(S(1));c=Qe(n)}a="function"==typeof r?r(t):t();let u=q;o&&(u=ur({trace:!vr,..."object"==typeof o&&o}));const l=Dt(...a),f=_r(l);return ke(c,i,u(..."function"==typeof s?s(f):f()))}function dt(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(S(28));if(r in t)throw new Error(S(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function gr(e){return"function"==typeof e}function wr(e,t){let n,[r,o,i]=dt(t);if(gr(e))n=()=>He(e());else{const t=He(e);n=()=>t}function s(e=n(),t){let s=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===s.filter((e=>!!e)).length&&(s=[i]),s.reduce(((e,n)=>{if(n){if(T(e)){const r=n(e,t);return void 0===r?e:r}if(N(e))return Ne(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error(S(9))}return r}}return e}),e)}return s.getInitialState=n,s}var Er="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",G=(e=21)=>{let t="",n=e;for(;n--;)t+=Er[64*Math.random()|0];return t},yt=(e,t)=>ct(e)?e.match(t):e(t);function X(...e){return t=>e.some((e=>yt(e,t)))}function Ae(...e){return t=>e.every((e=>yt(e,t)))}function le(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function J(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Mr(...e){return 0===e.length?e=>le(e,["pending"]):J(e)?t=>X(...e.map((e=>e.pending)))(t):Mr()(e[0])}function Se(...e){return 0===e.length?e=>le(e,["rejected"]):J(e)?t=>X(...e.map((e=>e.rejected)))(t):Se()(e[0])}function Or(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||J(e)?n=>Ae(Se(...e),t)(n):Or()(e[0])}function Ar(...e){return 0===e.length?e=>le(e,["fulfilled"]):J(e)?t=>X(...e.map((e=>e.fulfilled)))(t):Ar()(e[0])}function Sr(...e){return 0===e.length?e=>le(e,["pending","fulfilled","rejected"]):J(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return X(...n)(t)}:Sr()(e[0])}var Cr=["name","message","stack","code"],be=class{constructor(e,t){$(this,"_type"),this.payload=e,this.meta=t}},Ge=class{constructor(e,t){$(this,"_type"),this.payload=e,this.meta=t}},Pr=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of Cr)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},kr=(()=>{function e(e,t,n){const r=j(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),o=j(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),i=j(e+"/rejected",((e,t,r,o,i)=>({payload:o,error:(n&&n.serializeError||Pr)(e||"Rejected"),meta:{...i||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}})));return Object.assign((function(e){return(s,c,a)=>{const u=null!=n&&n.idGenerator?n.idGenerator(e):G(),l=new AbortController;let f,d;function p(e){d=e,l.abort()}const y=async function(){var y,h;let m;try{let i=null==(y=null==n?void 0:n.condition)?void 0:y.call(n,e,{getState:c,extra:a});if(jr(i)&&(i=await i),!1===i||l.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const b=new Promise(((e,t)=>{f=()=>{t({name:"AbortError",message:d||"Aborted"})},l.signal.addEventListener("abort",f)}));s(o(u,e,null==(h=null==n?void 0:n.getPendingMeta)?void 0:h.call(n,{requestId:u,arg:e},{getState:c,extra:a}))),m=await Promise.race([b,Promise.resolve(t(e,{dispatch:s,getState:c,extra:a,requestId:u,signal:l.signal,abort:p,rejectWithValue:(e,t)=>new be(e,t),fulfillWithValue:(e,t)=>new Ge(e,t)})).then((t=>{if(t instanceof be)throw t;return t instanceof Ge?r(t.payload,u,e,t.meta):r(t,u,e)}))])}catch(t){m=t instanceof be?i(null,u,e,t.payload,t.meta):i(t,u,e)}finally{f&&l.signal.removeEventListener("abort",f)}return n&&!n.dispatchConditionRejection&&i.match(m)&&m.meta.condition||s(m),m}();return Object.assign(y,{abort:p,requestId:u,arg:e,unwrap:()=>y.then(Rr)})}}),{pending:o,rejected:i,fulfilled:r,settled:X(i,r),typePrefix:e})}return e.withTypes=()=>e,e})();function Rr(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function jr(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var pt=Symbol.for("rtk-slice-createasyncthunk"),Sn={[pt]:kr},Tr=(e=>(e.reducer="reducer",e.reducerWithPrepare="reducerWithPrepare",e.asyncThunk="asyncThunk",e))(Tr||{});function Nr(e,t){return`${e}/${t}`}function Dr({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[pt];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(S(11));const o=("function"==typeof e.reducers?e.reducers(xr()):e.reducers)||{},i=Object.keys(o),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(S(12));if(n in s.sliceCaseReducersByType)throw new Error(S(13));return s.sliceCaseReducersByType[n]=t,c},addMatcher:(e,t)=>(s.sliceMatchers.push({matcher:e,reducer:t}),c),exposeAction:(e,t)=>(s.actionCreators[e]=t,c),exposeCaseReducer:(e,t)=>(s.sliceCaseReducersByName[e]=t,c)};function a(){const[t={},n=[],r]="function"==typeof e.extraReducers?dt(e.extraReducers):[e.extraReducers],o={...t,...s.sliceCaseReducersByType};return wr(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of s.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}i.forEach((r=>{const i=o[r],s={reducerName:r,type:Nr(t,r),createNotation:"function"==typeof e.reducers};Fr(i)?Ur(s,i,c,n):zr(s,i,c)}));const u=e=>e,l=new Map;let f;function d(e,t){return f||(f=a()),f(e,t)}function p(){return f||(f=a()),f.getInitialState()}function y(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=p()),r}function o(t=u){const r=ne(l,n,{insert:()=>new WeakMap});return ne(r,t,{insert:()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=Ir(i,t,p,n);return r}})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const h={name:t,reducer:d,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:p,...y(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:d},n),{...h,...y(o,!0)}}};return h}}function Ir(e,t,n,r){function o(o,...i){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...i)}return o.unwrapped=e,o}var Cn=Dr();function xr(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}function zr({type:e,reducerName:t,createNotation:n},r,o){let i,s;if("reducer"in r){if(n&&!Lr(r))throw new Error(S(17));i=r.reducer,s=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?j(e,s):j(e))}function Fr(e){return"asyncThunk"===e._reducerDefinitionType}function Lr(e){return"reducerWithPrepare"===e._reducerDefinitionType}function Ur({type:e,reducerName:t},n,r,o){if(!o)throw new Error(S(18));const{payloadCreator:i,fulfilled:s,pending:c,rejected:a,settled:u,options:l}=n,f=o(e,i,l);r.exposeAction(t,f),s&&r.addCase(f.fulfilled,s),c&&r.addCase(f.pending,c),a&&r.addCase(f.rejected,a),u&&r.addMatcher(f.settled,u),r.exposeCaseReducer(t,{fulfilled:s||Y,pending:c||Y,rejected:a||Y,settled:u||Y})}function Y(){}function Wr(){return{ids:[],entities:{}}}function $r(e){return{getInitialState:function(t={},n){const r=Object.assign(Wr(),t);return n?e.setAll(r,n):r}}}function Br(){return{getSelectors:function(e,t={}){const{createSelector:n=ar}=t,r=e=>e.ids,o=e=>e.entities,i=n(r,o,((e,t)=>e.map((e=>t[e])))),s=(e,t)=>t,c=(e,t)=>e[t],a=n(r,(e=>e.length));if(!e)return{selectIds:r,selectEntities:o,selectAll:i,selectTotal:a,selectById:n(o,s,c)};const u=n(e,o);return{selectIds:n(e,r),selectEntities:u,selectAll:n(e,i),selectTotal:n(e,a),selectById:n(u,s,c)}}}}var qr=T;function Kr(e){const t=O(((t,n)=>e(n)));return function(e){return t(e,void 0)}}function O(e){return function(t,n){const r=t=>{!function(e){return fr(e)}(n)?e(n,t):e(n.payload,t)};return qr(t)?(r(t),t):Ne(t,r)}}function U(e,t){return t(e)}function x(e){return Array.isArray(e)||(e=Object.values(e)),e}function ht(e,t,n){e=x(e);const r=[],o=[];for(const i of e){const e=U(i,t);e in n.entities?o.push({id:e,changes:i}):r.push(i)}return[r,o]}function mt(e){function t(t,n){const r=U(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t)}function n(e,n){e=x(e);for(const r of e)t(r,n)}function r(t,n){const r=U(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t}function o(e,t){let n=!1;e.forEach((e=>{e in t.entities&&(delete t.entities[e],n=!0)})),n&&(t.ids=t.ids.filter((e=>e in t.entities)))}function i(t,n){const r={},o={};t.forEach((e=>{e.id in n.entities&&(o[e.id]={id:e.id,changes:{...o[e.id]?o[e.id].changes:null,...e.changes}})})),(t=Object.values(o)).length>0&&t.filter((t=>function(t,n,r){const o=r.entities[n.id];if(void 0===o)return!1;const i=Object.assign({},o,n.changes),s=U(i,e),c=s!==n.id;return c&&(t[n.id]=s,delete r.entities[n.id]),r.entities[s]=i,c}(r,t,n))).length>0&&(n.ids=Object.values(n.entities).map((t=>U(t,e))))}function s(t,r){const[o,s]=ht(t,e,r);i(s,r),n(o,r)}return{removeAll:Kr((function(e){Object.assign(e,{ids:[],entities:{}})})),addOne:O(t),addMany:O(n),setOne:O(r),setMany:O((function(e,t){e=x(e);for(const n of e)r(n,t)})),setAll:O((function(e,t){e=x(e),t.ids=[],t.entities={},n(e,t)})),updateOne:O((function(e,t){return i([e],t)})),updateMany:O(i),upsertOne:O((function(e,t){return s([e],t)})),upsertMany:O(s),removeOne:O((function(e,t){return o([e],t)})),removeMany:O(o)}}function Vr(e,t){const{removeOne:n,removeMany:r,removeAll:o}=mt(e);function i(t,n){const r=(t=x(t)).filter((t=>!(U(t,e)in n.entities)));0!==r.length&&u(r,n)}function s(e,t){0!==(e=x(e)).length&&u(e,t)}function c(t,n){let r=!1;for(let o of t){const t=n.entities[o.id];if(!t)continue;r=!0,Object.assign(t,o.changes);const i=e(t);o.id!==i&&(delete n.entities[o.id],n.entities[i]=t)}r&&l(n)}function a(t,n){const[r,o]=ht(t,e,n);c(o,n),i(r,n)}function u(t,n){t.forEach((t=>{n.entities[e(t)]=t})),l(n)}function l(n){const r=Object.values(n.entities);r.sort(t);const o=r.map(e),{ids:i}=n;(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(i,o)||(n.ids=o)}return{removeOne:n,removeMany:r,removeAll:o,addOne:O((function(e,t){return i([e],t)})),updateOne:O((function(e,t){return c([e],t)})),upsertOne:O((function(e,t){return a([e],t)})),setOne:O((function(e,t){return s([e],t)})),setMany:O(s),setAll:O((function(e,t){e=x(e),t.entities={},t.ids=[],i(e,t)})),addMany:O(i),updateMany:O(c),upsertMany:O(a)}}function Pn(e={}){const{selectId:t,sortComparer:n}={sortComparer:!1,selectId:e=>e.id,...e},r=n?Vr(t,n):mt(t);return{selectId:t,sortComparer:n,...$r(r),...Br(),...r}}var Hr="task",bt="listener",_t="completed",Ie="cancelled",Gr=`task-${Ie}`,Xr=`task-${_t}`,Ce=`${bt}-${Ie}`,Jr=`${bt}-${_t}`,de=class{constructor(e){$(this,"name","TaskAbortError"),$(this,"message"),this.code=e,this.message=`${Hr} ${Ie} (reason: ${e})`}},xe=(e,t)=>{if("function"!=typeof e)throw new Error(S(32))},ie=()=>{},vt=(e,t=ie)=>(e.catch(t),e),gt=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),z=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},F=e=>{if(e.aborted){const{reason:t}=e;throw new de(t)}};function wt(e,t){let n=ie;return new Promise(((r,o)=>{const i=()=>o(new de(e.reason));e.aborted?i():(n=gt(e,i),t.finally((()=>n())).then(r,o))})).finally((()=>{n=ie}))}var Qr=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(e){return{status:e instanceof de?"cancelled":"rejected",error:e}}finally{null==t||t()}},oe=e=>t=>vt(wt(e,t).then((t=>(F(e),t)))),Et=e=>{const t=oe(e);return e=>t(new Promise((t=>setTimeout(t,e))))},{assign:Yr}=Object,Xe={},ye="listenerMiddleware",Zr=(e,t)=>(n,r)=>{xe(n);const o=new AbortController;(t=>{gt(e,(()=>z(t,e.reason)))})(o);const i=Qr((async()=>{F(e),F(o.signal);const t=await n({pause:oe(o.signal),delay:Et(o.signal),signal:o.signal});return F(o.signal),t}),(()=>z(o,Xr)));return null!=r&&r.autoJoin&&t.push(i.catch(ie)),{result:oe(e)(i),cancel(){z(o,Gr)}}},en=(e,t)=>(n,r)=>vt((async(n,r)=>{F(t);let o=()=>{};const i=[new Promise(((t,r)=>{let i=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});o=()=>{i(),r()}}))];null!=r&&i.push(new Promise((e=>setTimeout(e,r,null))));try{const e=await wt(t,Promise.race(i));return F(t),e}finally{o()}})(n,r)),Mt=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=j(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(S(21));return xe(i),{predicate:o,type:t,effect:i}},Ot=Object.assign((e=>{const{type:t,predicate:n,effect:r}=Mt(e);return{id:G(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(S(22))}}}),{withTypes:()=>Ot}),Pe=e=>{e.pending.forEach((e=>{z(e,Ce)}))},tn=e=>()=>{e.forEach(Pe),e.clear()},Je=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout((()=>{throw e}),0)}},At=Object.assign(j(`${ye}/add`),{withTypes:()=>At}),rn=j(`${ye}/removeAll`),St=Object.assign(j(`${ye}/remove`),{withTypes:()=>St}),nn=(...e)=>{console.error(`${ye}/error`,...e)},kn=(e={})=>{const t=new Map,{extra:n,onError:r=nn}=e;xe(r);const o=e=>{let n=Oe(Array.from(t.values()),(t=>t.effect===e.effect));return n||(n=Ot(e)),(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),null!=t&&t.cancelActive&&Pe(e)}))(n)};Object.assign(o,{withTypes:()=>o});const i=e=>{const{type:n,effect:r,predicate:o}=Mt(e),i=Oe(Array.from(t.values()),(e=>("string"==typeof n?e.type===n:e.predicate===o)&&e.effect===r));return i&&(i.unsubscribe(),e.cancelActive&&Pe(i)),!!i};Object.assign(i,{withTypes:()=>i});const s=async(e,i,s,c)=>{const a=new AbortController,u=en(o,a.signal),l=[];try{e.pending.add(a),await Promise.resolve(e.effect(i,Yr({},s,{getOriginalState:c,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:Et(a.signal),pause:oe(a.signal),extra:n,signal:a.signal,fork:Zr(a.signal,l),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach(((e,t,n)=>{e!==a&&(z(e,Ce),n.delete(e))}))},cancel:()=>{z(a,Ce),e.pending.delete(a)},throwIfCancelled:()=>{F(a.signal)}})))}catch(e){e instanceof de||Je(r,e,{raisedBy:"effect"})}finally{await Promise.all(l),z(a,Jr),e.pending.delete(a)}},c=tn(t);return{middleware:e=>n=>a=>{if(!Re(a))return n(a);if(At.match(a))return o(a.payload);if(rn.match(a))return void c();if(St.match(a))return i(a.payload);let u=e.getState();const l=()=>{if(u===Xe)throw new Error(S(23));return u};let f;try{if(f=n(a),t.size>0){const n=e.getState(),o=Array.from(t.values());for(const t of o){let o=!1;try{o=t.predicate(a,n,u)}catch(e){o=!1,Je(r,e,{raisedBy:"predicate"})}o&&s(t,a,e,l)}}}finally{u=Xe}return f},startListening:o,stopListening:i,clearListeners:c}},on=e=>({id:G(),middleware:e,applied:new Map}),sn=e=>t=>{var n;return(null==(n=null==t?void 0:t.meta)?void 0:n.instanceId)===e},Rn=()=>{const e=G(),t=new Map,n=Object.assign(j("dynamicMiddleware/add",((...t)=>({payload:t,meta:{instanceId:e}}))),{withTypes:()=>n}),r=Object.assign((function(...e){e.forEach((e=>{let n=Oe(Array.from(t.values()),(t=>t.middleware===e));n||(n=on(e)),t.set(n.id,n)}))}),{withTypes:()=>r}),o=Ae(n,sn(e));return{middleware:e=>n=>i=>o(i)?(r(...i.payload),e.dispatch):(e=>q(...Array.from(t.values()).map((t=>ne(t.applied,e,{insert:()=>t.middleware(e)})))))(e)(n)(i),addMiddleware:r,withMiddleware:n,instanceId:e}},cn=e=>"reducerPath"in e&&"string"==typeof e.reducerPath,an=e=>e.flatMap((e=>cn(e)?[[e.reducerPath,e.reducer]]:Object.entries(e))),ze=Symbol.for("rtk-state-proxy-original"),un=e=>!!e&&!!e[ze],fn=new WeakMap,ln=(e,t)=>ne(fn,e,{insert:()=>new Proxy(e,{get:(e,n,r)=>{if(n===ze)return e;const o=Reflect.get(e,n,r);if(typeof o>"u"){const e=t[n.toString()];if(e){const t=e(void 0,{type:G()});if(typeof t>"u")throw new Error(S(24));return t}}return o}})}),dn=e=>{if(!un(e))throw new Error(S(25));return e[ze]},yn=(e={})=>e;function jn(...e){const t=Object.fromEntries(an(e)),n=()=>Object.keys(t).length?Qe(t):yn;let r=n();function o(e,t){return r(e,t)}o.withLazyLoadedSlices=()=>o;const i=Object.assign((function(e,n){return function(r,...o){return e(ln(n?n(r,...o):r,t),...o)}}),{original:dn});return Object.assign(o,{inject:(e,i={})=>{const{reducerPath:s,reducer:c}=e,a=t[s];return!i.overrideExisting&&a&&a!==c||(t[s]=c,r=n()),o},selector:i})}function S(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}export{Tr as ReducerType,ft as SHOULD_AUTOBATCH,de as TaskAbortError,at as Tuple,Z as __DO_NOT_USE__ActionTypes,At as addListener,Dt as applyMiddleware,Sn as asyncThunkCreator,br as autoBatchEnhancer,mn as bindActionCreators,Dr as buildCreateSlice,rn as clearAllListeners,Qe as combineReducers,jn as combineSlices,q as compose,An as configureStore,j as createAction,gn as createActionCreatorInvariantMiddleware,kr as createAsyncThunk,ar as createDraftSafeSelector,cr as createDraftSafeSelectorCreator,Rn as createDynamicMiddleware,Pn as createEntityAdapter,En as createImmutableStateInvariantMiddleware,kn as createListenerMiddleware,Ne as createNextState,wr as createReducer,rr as createSelector,ot as createSelectorCreator,Mn as createSerializableStateInvariantMiddleware,Cn as createSlice,ke as createStore,nt as current,yr as findNonSerializableValue,S as formatProdErrorMessage,je as freeze,Re as isAction,vn as isActionCreator,Ae as isAllOf,X as isAnyOf,Sr as isAsyncThunkAction,T as isDraft,fr as isFluxStandardAction,Ar as isFulfilled,wn as isImmutableDefault,Mr as isPending,dr as isPlain,se as isPlainObject,Se as isRejected,Or as isRejectedWithValue,hn as legacy_createStore,_n as lruMemoize,Pr as miniSerializeError,G as nanoid,bn as original,On as prepareAutoBatched,St as removeListener,Rr as unwrapResult,De as weakMapMemoize};
1
+ var kt=Object.defineProperty,Rt=(e,t,n)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$=(e,t,n)=>Rt(e,"symbol"!=typeof t?t+"":t,n);function A(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 jt="function"==typeof Symbol&&Symbol.observable||"@@observable",Fe=jt,pe=()=>Math.random().toString(36).substring(7).split("").join("."),Tt={INIT:`@@redux/INIT${pe()}`,REPLACE:`@@redux/REPLACE${pe()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pe()}`},Z=Tt;function se(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function ke(e,t,n){if("function"!=typeof e)throw new Error(A(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(A(0));if("function"==typeof t&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if("function"!=typeof n)throw new Error(A(1));return n(ke)(e,t)}let r=e,o=t,i=new Map,s=i,c=0,a=!1;function u(){s===i&&(s=new Map,i.forEach(((e,t)=>{s.set(t,e)})))}function l(){if(a)throw new Error(A(3));return o}function f(e){if("function"!=typeof e)throw new Error(A(4));if(a)throw new Error(A(5));let t=!0;u();const n=c++;return s.set(n,e),function(){if(t){if(a)throw new Error(A(6));t=!1,u(),s.delete(n),i=null}}}function d(e){if(!se(e))throw new Error(A(7));if(typeof e.type>"u")throw new Error(A(8));if("string"!=typeof e.type)throw new Error(A(17));if(a)throw new Error(A(9));try{a=!0,o=r(o,e)}finally{a=!1}return(i=s).forEach((e=>{e()})),e}return d({type:Z.INIT}),{dispatch:d,subscribe:f,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(A(10));r=e,d({type:Z.REPLACE})},[Fe]:function(){const e=f;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(A(11));function n(){const e=t;e.next&&e.next(l())}return n(),{unsubscribe:e(n)}},[Fe](){return this}}}}}function hn(e,t,n){return ke(e,t,n)}function Nt(e){Object.keys(e).forEach((t=>{const n=e[t];if(typeof n(void 0,{type:Z.INIT})>"u")throw new Error(A(12));if(typeof n(void 0,{type:Z.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(A(13))}))}function Qe(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o;try{Nt(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let i=!1;const s={};for(let o=0;o<r.length;o++){const c=r[o],a=n[c],u=e[c],l=a(u,t);if(typeof l>"u")throw t&&t.type,new Error(A(14));s[c]=l,i=i||l!==u}return i=i||r.length!==Object.keys(e).length,i?s:e}}function Le(e,t){return function(...n){return t(e.apply(this,n))}}function mn(e,t){if("function"==typeof e)return Le(e,t);if("object"!=typeof e||null===e)throw new Error(A(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=Le(o,t))}return n}function q(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function Dt(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(A(15))};const s={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},c=e.map((e=>e(s)));return i=q(...c)(o.dispatch),{...o,dispatch:i}}}function Re(e){return se(e)&&"type"in e&&"string"==typeof e.type}var Ye=Symbol.for("immer-nothing"),Ue=Symbol.for("immer-draftable"),C=Symbol.for("immer-state");function k(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var W=Object.getPrototypeOf;function T(e){return!!e&&!!e[C]}function N(e){var t;return!!e&&(Ze(e)||Array.isArray(e)||!!e[Ue]||!(null==(t=e.constructor)||!t[Ue])||ae(e)||ue(e))}var It=Object.prototype.constructor.toString();function Ze(e){if(!e||"object"!=typeof e)return!1;const t=W(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===It}function bn(e){return T(e)||k(15,e),e[C].base_}function K(e,t){0===ce(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function ce(e){const t=e[C];return t?t.type_:Array.isArray(e)?1:ae(e)?2:ue(e)?3:0}function _e(e,t){return 2===ce(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function et(e,t,n){const r=ce(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function xt(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function ae(e){return e instanceof Map}function ue(e){return e instanceof Set}function I(e){return e.copy_||e.base_}function ve(e,t){if(ae(e))return new Map(e);if(ue(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Ze(e))return W(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[C];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],i=n[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(W(e),n)}function je(e,t=!1){return fe(e)||T(e)||!N(e)||(ce(e)>1&&(e.set=e.add=e.clear=e.delete=zt),Object.freeze(e),t&&K(e,((e,t)=>je(t,!0)))),e}function zt(){k(2)}function fe(e){return Object.isFrozen(e)}var V,Ft={};function L(e){const t=Ft[e];return t||k(0,e),t}function tt(){return V}function Lt(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function We(e,t){t&&(L("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ge(e){we(e),e.drafts_.forEach(Ut),e.drafts_=null}function we(e){e===V&&(V=e.parent_)}function $e(e){return V=Lt(V,e)}function Ut(e){const t=e[C];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Be(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[C].modified_&&(ge(t),k(4)),N(e)&&(e=ee(t,e),t.parent_||te(t,e)),t.patches_&&L("Patches").generateReplacementPatches_(n[C].base_,e,t.patches_,t.inversePatches_)):e=ee(t,n,[]),ge(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ye?e:void 0}function ee(e,t,n){if(fe(t))return t;const r=t[C];if(!r)return K(t,((o,i)=>qe(e,r,t,o,i,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return te(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,i=!1;3===r.type_&&(o=new Set(t),t.clear(),i=!0),K(o,((o,s)=>qe(e,r,t,o,s,n,i))),te(e,t,!1),n&&e.patches_&&L("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function qe(e,t,n,r,o,i,s){if(T(o)){const s=ee(e,o,i&&t&&3!==t.type_&&!_e(t.assigned_,r)?i.concat(r):void 0);if(et(n,r,s),!T(s))return;e.canAutoFreeze_=!1}else s&&n.add(o);if(N(o)&&!fe(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ee(e,o),(!t||!t.scope_.parent_)&&te(e,o)}}function te(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&je(t,n)}function Wt(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:tt(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=Te;n&&(o=[r],i=H);const{revoke:s,proxy:c}=Proxy.revocable(o,i);return r.draft_=c,r.revoke_=s,c}var Te={get(e,t){if(t===C)return e;const n=I(e);if(!_e(n,t))return $t(e,n,t);const r=n[t];return e.finalized_||!N(r)?r:r===he(e.base_,t)?(me(e),e.copy_[t]=Me(r,e)):r},has:(e,t)=>t in I(e),ownKeys:e=>Reflect.ownKeys(I(e)),set(e,t,n){const r=rt(I(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=he(I(e),t),o=null==r?void 0:r[C];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(xt(n,r)&&(void 0!==n||_e(e.base_,t)))return!0;me(e),Ee(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==he(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,me(e),Ee(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=I(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){k(11)},getPrototypeOf:e=>W(e.base_),setPrototypeOf(){k(12)}},H={};function he(e,t){const n=e[C];return(n?I(n):e)[t]}function $t(e,t,n){var r;const o=rt(t,n);return o?"value"in o?o.value:null==(r=o.get)?void 0:r.call(e.draft_):void 0}function rt(e,t){if(!(t in e))return;let n=W(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=W(n)}}function Ee(e){e.modified_||(e.modified_=!0,e.parent_&&Ee(e.parent_))}function me(e){e.copy_||(e.copy_=ve(e.base_,e.scope_.immer_.useStrictShallowCopy_))}K(Te,((e,t)=>{H[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),H.deleteProperty=function(e,t){return H.set.call(this,e,t,void 0)},H.set=function(e,t,n){return Te.set.call(this,e[0],t,n,e[0])};var Bt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&k(6),void 0!==n&&"function"!=typeof n&&k(7),N(e)){const o=$e(this),i=Me(e,void 0);let s=!0;try{r=t(i),s=!1}finally{s?ge(o):we(o)}return We(o,n),Be(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Ye&&(r=void 0),this.autoFreeze_&&je(r,!0),n){const t=[],o=[];L("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}k(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){N(e)||k(8),T(e)&&(e=nt(e));const t=$e(this),n=Me(e,void 0);return n[C].isManual_=!0,we(t),n}finishDraft(e,t){const n=e&&e[C];(!n||!n.isManual_)&&k(9);const{scope_:r}=n;return We(r,t),Be(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=L("Patches").applyPatches_;return T(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function Me(e,t){const n=ae(e)?L("MapSet").proxyMap_(e,t):ue(e)?L("MapSet").proxySet_(e,t):Wt(e,t);return(t?t.scope_:tt()).drafts_.push(n),n}function nt(e){return T(e)||k(10,e),it(e)}function it(e){if(!N(e)||fe(e))return e;const t=e[C];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ve(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ve(e,!0);return K(n,((e,t)=>{et(n,e,it(t))})),t&&(t.finalized_=!1),n}var P=new Bt,Ne=P.produce;P.produceWithPatches.bind(P),P.setAutoFreeze.bind(P),P.setUseStrictShallowCopy.bind(P),P.applyPatches.bind(P),P.createDraft.bind(P),P.finishDraft.bind(P);var re="NOT_FOUND";function qt(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function Kt(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function Vt(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}var Ke=e=>Array.isArray(e)?e:[e];function Ht(e){const t=Array.isArray(e[0])?e[0]:e;return Vt(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Gt(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function Xt(e){let t;return{get:n=>t&&e(t.key,n)?t.value:re,put(e,n){t={key:e,value:n}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}function Jt(e,t){let n=[];function r(e){const r=n.findIndex((n=>t(e,n.key)));if(r>-1){const e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return re}return{get:r,put:function(t,o){r(t)===re&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}var Qt=(e,t)=>e===t;function Yt(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;const{length:r}=t;for(let o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}function _n(e,t){const n="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=Qt,maxSize:o=1,resultEqualityCheck:i}=n,s=Yt(r);let c=0;const a=1===o?Xt(s):Jt(o,s);function u(){let t=a.get(arguments);if(t===re){if(t=e.apply(null,arguments),c++,i){const e=a.getEntries().find((e=>i(e.value,t)));e&&(t=e.value,0!==c&&c--)}a.put(arguments,t)}return t}return u.clearCache=()=>{a.clear(),u.resetResultsCount()},u.resultsCount=()=>c,u.resetResultsCount=()=>{c=0},u}var Zt=class{constructor(e){this.value=e}deref(){return this.value}},er=typeof WeakRef<"u"?WeakRef:Zt,tr=0,Ve=1;function Q(){return{s:tr,v:void 0,o:null,p:null}}function De(e,t={}){let n=Q();const{resultEqualityCheck:r}=t;let o,i=0;function s(){var t;let s=n;const{length:c}=arguments;for(let e=0,t=c;e<t;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=s.o;null===e&&(s.o=e=new WeakMap);const n=e.get(t);void 0===n?(s=Q(),e.set(t,s)):s=n}else{let e=s.p;null===e&&(s.p=e=new Map);const n=e.get(t);void 0===n?(s=Q(),e.set(t,s)):s=n}}const a=s;let u;if(s.s===Ve?u=s.v:(u=e.apply(null,arguments),i++),a.s=Ve,r){const e=(null==(t=null==o?void 0:o.deref)?void 0:t.call(o))??o;null!=e&&r(e,u)&&(u=e,0!==i&&i--),o="object"==typeof u&&null!==u||"function"==typeof u?new er(u):u}return a.v=u,u}return s.clearCache=()=>{n=Q(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function ot(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,i={},s=e.pop();"object"==typeof s&&(i=s,s=e.pop()),qt(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const c={...n,...i},{memoize:a,memoizeOptions:u=[],argsMemoize:l=De,argsMemoizeOptions:f=[],devModeChecks:d={}}=c,p=Ke(u),y=Ke(f),h=Ht(e),m=a((function(){return r++,s.apply(null,arguments)}),...p),b=l((function(){o++;const e=Gt(h,arguments);return t=m.apply(null,e),t}),...y);return Object.assign(b,{resultFunc:s,memoizedResultFunc:m,dependencies:h,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:a,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var rr=ot(De),nr=Object.assign(((e,t=rr)=>{Kt(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[n[r]]=t,e)),{})))}),{withTypes:()=>nr});function st(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var ir=st(),or=st,sr={TERM_PROGRAM:"WarpTerminal",NODE:"/Users/krasevych/.nvm/versions/node/v22.12.0/bin/node",INIT_CWD:"/Users/krasevych/Projects/Animatron/web-apps",NVM_CD_FLAGS:"-q",WARP_HONOR_PS1:"0",TERM:"xterm-256color",SHELL:"/bin/zsh",TMPDIR:"/var/folders/1y/vz19w_xj5xzb49lxmbmzk7dc0000gn/T/",npm_config_global_prefix:"/Users/krasevych/.nvm/versions/node/v22.12.0",TERM_PROGRAM_VERSION:"v0.2025.03.26.08.10.stable_02",NODE_OPTIONS:"--max-old-space-size=8192",COLOR:"1",npm_config_noproxy:"",npm_config_local_prefix:"/Users/krasevych/Projects/Animatron/web-apps",NVM_DIR:"/Users/krasevych/.nvm",USER:"krasevych",COMMAND_MODE:"unix2003",npm_config_globalconfig:"/Users/krasevych/.nvm/versions/node/v22.12.0/etc/npmrc",SSH_AUTH_SOCK:"/private/tmp/com.apple.launchd.Z637x9A5qh/Listeners",__CF_USER_TEXT_ENCODING:"0x1F5:0x0:0x2",WARP_IS_LOCAL_SHELL_SESSION:"1",npm_execpath:"/Users/krasevych/.nvm/versions/node/v22.12.0/lib/node_modules/npm/bin/npm-cli.js",WARP_USE_SSH_WRAPPER:"1",PATH:"/Users/krasevych/Projects/Animatron/web-apps/packages/vendor/node_modules/.bin:/Users/krasevych/Projects/Animatron/web-apps/packages/node_modules/.bin:/Users/krasevych/Projects/Animatron/web-apps/node_modules/.bin:/Users/krasevych/Projects/Animatron/node_modules/.bin:/Users/krasevych/Projects/node_modules/.bin:/Users/krasevych/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Users/krasevych/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/usr/local/opt/postgresql@16/bin:/Users/krasevych/.yarn/bin:/Users/krasevych/.config/yarn/global/node_modules/.bin:/Users/krasevych/.nvm/versions/node/v22.12.0/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin",npm_package_json:"/Users/krasevych/Projects/Animatron/web-apps/packages/vendor/package.json",npm_config_userconfig:"/Users/krasevych/.npmrc",npm_config_init_module:"/Users/krasevych/.npm-init.js",__CFBundleIdentifier:"dev.warp.Warp-Stable",npm_command:"run-script",PWD:"/Users/krasevych/Projects/Animatron/web-apps/packages/vendor",npm_lifecycle_event:"build",EDITOR:"vi",npm_package_name:"@wellesley/vendor",npm_config_npm_version:"10.9.0",XPC_FLAGS:"0x0",npm_config_node_gyp:"/Users/krasevych/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",npm_package_version:"1.0.7",XPC_SERVICE_NAME:"0",SHLVL:"2",HOME:"/Users/krasevych",npm_config_cache:"/Users/krasevych/.npm",LOGNAME:"krasevych",npm_lifecycle_script:"tsc && vite build",LC_CTYPE:"UTF-8",SSH_SOCKET_DIR:"~/.ssh",NVM_BIN:"/Users/krasevych/.nvm/versions/node/v22.12.0/bin",npm_config_user_agent:"npm/10.9.0 node/v22.12.0 darwin x64 workspaces/true",CONDA_CHANGEPS1:"false",npm_node_execpath:"/Users/krasevych/.nvm/versions/node/v22.12.0/bin/node",npm_config_prefix:"/Users/krasevych/.nvm/versions/node/v22.12.0",COLORTERM:"truecolor",_:"/Users/krasevych/Projects/Animatron/web-apps/node_modules/.bin/vite",NODE_ENV:"production",APP_NAME:"@wellesley/vendor"},cr=(...e)=>{const t=ot(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(T(e)?nt(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n},ar=cr(De),ur=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?q:q.apply(null,arguments)},ct=e=>e&&"function"==typeof e.match;function j(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(S(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>Re(t)&&t.type===e,n}function vn(e){return"function"==typeof e&&"type"in e&&ct(e)}function fr(e){return Re(e)&&Object.keys(e).every(lr)}function lr(e){return["type","payload","error","meta"].indexOf(e)>-1}function gn(e={}){return()=>e=>t=>e(t)}function Oe(e,t){for(const n of e)if(t(n))return n}var at=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function He(e){return N(e)?Ne(e,(()=>{})):e}function ne(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error(S(10));const r=n.insert(t,e);return e.set(t,r),r}function wn(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function En(e={}){return()=>e=>t=>e(t)}function dr(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||se(e)}function yr(e,t="",n=dr,r,o=[],i){let s;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e||null!=i&&i.has(e))return!1;const c=null!=r?r(e):Object.entries(e),a=o.length>0;for(const[e,u]of c){const c=t?t+"."+e:e;if(!a||!o.some((e=>e instanceof RegExp?e.test(c):c===e))){if(!n(u))return{keyPath:c,value:u};if("object"==typeof u&&(s=yr(u,c,n,r,o,i),s))return s}}return i&&ut(e)&&i.add(e),!1}function ut(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!ut(t))return!1;return!0}function Mn(e={}){return()=>e=>t=>e(t)}function pr(e){return"boolean"==typeof e}var hr=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let i=new at;return t&&(pr(t)?i.push(ir):i.push(or(t.extraArgument))),i},ft="RTK_autoBatch",On=()=>e=>({payload:e,meta:{[ft]:!0}}),lt=e=>t=>{setTimeout(t,e)},mr=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:lt(10),br=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,s=!1;const c=new Set,a="tick"===e.type?queueMicrotask:"raf"===e.type?mr:"callback"===e.type?e.queueNotification:lt(e.timeout),u=()=>{s=!1,i&&(i=!1,c.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>o&&e()));return c.add(e),()=>{t(),c.delete(e)}},dispatch(e){var t;try{return o=!(null!=(t=null==e?void 0:e.meta)&&t[ft]),i=!o,i&&(s||(s=!0,a(u))),r.dispatch(e)}finally{o=!0}}})},_r=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new at(e);return n&&r.push(br("object"==typeof n?n:void 0)),r},vr="production"===sr.NODE_ENV;function An(e){const t=hr(),{reducer:n,middleware:r,devTools:o=!0,preloadedState:i,enhancers:s}=e||{};let c,a;if("function"==typeof n)c=n;else{if(!se(n))throw new Error(S(1));c=Qe(n)}a="function"==typeof r?r(t):t();let u=q;o&&(u=ur({trace:!vr,..."object"==typeof o&&o}));const l=Dt(...a),f=_r(l);return ke(c,i,u(..."function"==typeof s?s(f):f()))}function dt(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(S(28));if(r in t)throw new Error(S(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function gr(e){return"function"==typeof e}function wr(e,t){let n,[r,o,i]=dt(t);if(gr(e))n=()=>He(e());else{const t=He(e);n=()=>t}function s(e=n(),t){let s=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===s.filter((e=>!!e)).length&&(s=[i]),s.reduce(((e,n)=>{if(n){if(T(e)){const r=n(e,t);return void 0===r?e:r}if(N(e))return Ne(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error(S(9))}return r}}return e}),e)}return s.getInitialState=n,s}var Er="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",G=(e=21)=>{let t="",n=e;for(;n--;)t+=Er[64*Math.random()|0];return t},yt=(e,t)=>ct(e)?e.match(t):e(t);function X(...e){return t=>e.some((e=>yt(e,t)))}function Ae(...e){return t=>e.every((e=>yt(e,t)))}function le(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function J(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Mr(...e){return 0===e.length?e=>le(e,["pending"]):J(e)?t=>X(...e.map((e=>e.pending)))(t):Mr()(e[0])}function Se(...e){return 0===e.length?e=>le(e,["rejected"]):J(e)?t=>X(...e.map((e=>e.rejected)))(t):Se()(e[0])}function Or(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||J(e)?n=>Ae(Se(...e),t)(n):Or()(e[0])}function Ar(...e){return 0===e.length?e=>le(e,["fulfilled"]):J(e)?t=>X(...e.map((e=>e.fulfilled)))(t):Ar()(e[0])}function Sr(...e){return 0===e.length?e=>le(e,["pending","fulfilled","rejected"]):J(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return X(...n)(t)}:Sr()(e[0])}var Cr=["name","message","stack","code"],be=class{constructor(e,t){$(this,"_type"),this.payload=e,this.meta=t}},Ge=class{constructor(e,t){$(this,"_type"),this.payload=e,this.meta=t}},Pr=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of Cr)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},kr=(()=>{function e(e,t,n){const r=j(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),o=j(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),i=j(e+"/rejected",((e,t,r,o,i)=>({payload:o,error:(n&&n.serializeError||Pr)(e||"Rejected"),meta:{...i||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}})));return Object.assign((function(e){return(s,c,a)=>{const u=null!=n&&n.idGenerator?n.idGenerator(e):G(),l=new AbortController;let f,d;function p(e){d=e,l.abort()}const y=async function(){var y,h;let m;try{let i=null==(y=null==n?void 0:n.condition)?void 0:y.call(n,e,{getState:c,extra:a});if(jr(i)&&(i=await i),!1===i||l.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const b=new Promise(((e,t)=>{f=()=>{t({name:"AbortError",message:d||"Aborted"})},l.signal.addEventListener("abort",f)}));s(o(u,e,null==(h=null==n?void 0:n.getPendingMeta)?void 0:h.call(n,{requestId:u,arg:e},{getState:c,extra:a}))),m=await Promise.race([b,Promise.resolve(t(e,{dispatch:s,getState:c,extra:a,requestId:u,signal:l.signal,abort:p,rejectWithValue:(e,t)=>new be(e,t),fulfillWithValue:(e,t)=>new Ge(e,t)})).then((t=>{if(t instanceof be)throw t;return t instanceof Ge?r(t.payload,u,e,t.meta):r(t,u,e)}))])}catch(t){m=t instanceof be?i(null,u,e,t.payload,t.meta):i(t,u,e)}finally{f&&l.signal.removeEventListener("abort",f)}return n&&!n.dispatchConditionRejection&&i.match(m)&&m.meta.condition||s(m),m}();return Object.assign(y,{abort:p,requestId:u,arg:e,unwrap:()=>y.then(Rr)})}}),{pending:o,rejected:i,fulfilled:r,settled:X(i,r),typePrefix:e})}return e.withTypes=()=>e,e})();function Rr(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function jr(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var pt=Symbol.for("rtk-slice-createasyncthunk"),Sn={[pt]:kr},Tr=(e=>(e.reducer="reducer",e.reducerWithPrepare="reducerWithPrepare",e.asyncThunk="asyncThunk",e))(Tr||{});function Nr(e,t){return`${e}/${t}`}function Dr({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[pt];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(S(11));const o=("function"==typeof e.reducers?e.reducers(xr()):e.reducers)||{},i=Object.keys(o),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(S(12));if(n in s.sliceCaseReducersByType)throw new Error(S(13));return s.sliceCaseReducersByType[n]=t,c},addMatcher:(e,t)=>(s.sliceMatchers.push({matcher:e,reducer:t}),c),exposeAction:(e,t)=>(s.actionCreators[e]=t,c),exposeCaseReducer:(e,t)=>(s.sliceCaseReducersByName[e]=t,c)};function a(){const[t={},n=[],r]="function"==typeof e.extraReducers?dt(e.extraReducers):[e.extraReducers],o={...t,...s.sliceCaseReducersByType};return wr(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of s.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}i.forEach((r=>{const i=o[r],s={reducerName:r,type:Nr(t,r),createNotation:"function"==typeof e.reducers};Fr(i)?Ur(s,i,c,n):zr(s,i,c)}));const u=e=>e,l=new Map;let f;function d(e,t){return f||(f=a()),f(e,t)}function p(){return f||(f=a()),f.getInitialState()}function y(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=p()),r}function o(t=u){const r=ne(l,n,{insert:()=>new WeakMap});return ne(r,t,{insert:()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=Ir(i,t,p,n);return r}})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const h={name:t,reducer:d,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:p,...y(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:d},n),{...h,...y(o,!0)}}};return h}}function Ir(e,t,n,r){function o(o,...i){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...i)}return o.unwrapped=e,o}var Cn=Dr();function xr(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}function zr({type:e,reducerName:t,createNotation:n},r,o){let i,s;if("reducer"in r){if(n&&!Lr(r))throw new Error(S(17));i=r.reducer,s=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?j(e,s):j(e))}function Fr(e){return"asyncThunk"===e._reducerDefinitionType}function Lr(e){return"reducerWithPrepare"===e._reducerDefinitionType}function Ur({type:e,reducerName:t},n,r,o){if(!o)throw new Error(S(18));const{payloadCreator:i,fulfilled:s,pending:c,rejected:a,settled:u,options:l}=n,f=o(e,i,l);r.exposeAction(t,f),s&&r.addCase(f.fulfilled,s),c&&r.addCase(f.pending,c),a&&r.addCase(f.rejected,a),u&&r.addMatcher(f.settled,u),r.exposeCaseReducer(t,{fulfilled:s||Y,pending:c||Y,rejected:a||Y,settled:u||Y})}function Y(){}function Wr(){return{ids:[],entities:{}}}function $r(e){return{getInitialState:function(t={},n){const r=Object.assign(Wr(),t);return n?e.setAll(r,n):r}}}function Br(){return{getSelectors:function(e,t={}){const{createSelector:n=ar}=t,r=e=>e.ids,o=e=>e.entities,i=n(r,o,((e,t)=>e.map((e=>t[e])))),s=(e,t)=>t,c=(e,t)=>e[t],a=n(r,(e=>e.length));if(!e)return{selectIds:r,selectEntities:o,selectAll:i,selectTotal:a,selectById:n(o,s,c)};const u=n(e,o);return{selectIds:n(e,r),selectEntities:u,selectAll:n(e,i),selectTotal:n(e,a),selectById:n(u,s,c)}}}}var qr=T;function Kr(e){const t=O(((t,n)=>e(n)));return function(e){return t(e,void 0)}}function O(e){return function(t,n){const r=t=>{!function(e){return fr(e)}(n)?e(n,t):e(n.payload,t)};return qr(t)?(r(t),t):Ne(t,r)}}function U(e,t){return t(e)}function x(e){return Array.isArray(e)||(e=Object.values(e)),e}function ht(e,t,n){e=x(e);const r=[],o=[];for(const i of e){const e=U(i,t);e in n.entities?o.push({id:e,changes:i}):r.push(i)}return[r,o]}function mt(e){function t(t,n){const r=U(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t)}function n(e,n){e=x(e);for(const r of e)t(r,n)}function r(t,n){const r=U(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t}function o(e,t){let n=!1;e.forEach((e=>{e in t.entities&&(delete t.entities[e],n=!0)})),n&&(t.ids=t.ids.filter((e=>e in t.entities)))}function i(t,n){const r={},o={};t.forEach((e=>{e.id in n.entities&&(o[e.id]={id:e.id,changes:{...o[e.id]?o[e.id].changes:null,...e.changes}})})),(t=Object.values(o)).length>0&&t.filter((t=>function(t,n,r){const o=r.entities[n.id];if(void 0===o)return!1;const i=Object.assign({},o,n.changes),s=U(i,e),c=s!==n.id;return c&&(t[n.id]=s,delete r.entities[n.id]),r.entities[s]=i,c}(r,t,n))).length>0&&(n.ids=Object.values(n.entities).map((t=>U(t,e))))}function s(t,r){const[o,s]=ht(t,e,r);i(s,r),n(o,r)}return{removeAll:Kr((function(e){Object.assign(e,{ids:[],entities:{}})})),addOne:O(t),addMany:O(n),setOne:O(r),setMany:O((function(e,t){e=x(e);for(const n of e)r(n,t)})),setAll:O((function(e,t){e=x(e),t.ids=[],t.entities={},n(e,t)})),updateOne:O((function(e,t){return i([e],t)})),updateMany:O(i),upsertOne:O((function(e,t){return s([e],t)})),upsertMany:O(s),removeOne:O((function(e,t){return o([e],t)})),removeMany:O(o)}}function Vr(e,t){const{removeOne:n,removeMany:r,removeAll:o}=mt(e);function i(t,n){const r=(t=x(t)).filter((t=>!(U(t,e)in n.entities)));0!==r.length&&u(r,n)}function s(e,t){0!==(e=x(e)).length&&u(e,t)}function c(t,n){let r=!1;for(let o of t){const t=n.entities[o.id];if(!t)continue;r=!0,Object.assign(t,o.changes);const i=e(t);o.id!==i&&(delete n.entities[o.id],n.entities[i]=t)}r&&l(n)}function a(t,n){const[r,o]=ht(t,e,n);c(o,n),i(r,n)}function u(t,n){t.forEach((t=>{n.entities[e(t)]=t})),l(n)}function l(n){const r=Object.values(n.entities);r.sort(t);const o=r.map(e),{ids:i}=n;(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(i,o)||(n.ids=o)}return{removeOne:n,removeMany:r,removeAll:o,addOne:O((function(e,t){return i([e],t)})),updateOne:O((function(e,t){return c([e],t)})),upsertOne:O((function(e,t){return a([e],t)})),setOne:O((function(e,t){return s([e],t)})),setMany:O(s),setAll:O((function(e,t){e=x(e),t.entities={},t.ids=[],i(e,t)})),addMany:O(i),updateMany:O(c),upsertMany:O(a)}}function Pn(e={}){const{selectId:t,sortComparer:n}={sortComparer:!1,selectId:e=>e.id,...e},r=n?Vr(t,n):mt(t);return{selectId:t,sortComparer:n,...$r(r),...Br(),...r}}var Hr="task",bt="listener",_t="completed",Ie="cancelled",Gr=`task-${Ie}`,Xr=`task-${_t}`,Ce=`${bt}-${Ie}`,Jr=`${bt}-${_t}`,de=class{constructor(e){$(this,"name","TaskAbortError"),$(this,"message"),this.code=e,this.message=`${Hr} ${Ie} (reason: ${e})`}},xe=(e,t)=>{if("function"!=typeof e)throw new Error(S(32))},ie=()=>{},vt=(e,t=ie)=>(e.catch(t),e),gt=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),z=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},F=e=>{if(e.aborted){const{reason:t}=e;throw new de(t)}};function wt(e,t){let n=ie;return new Promise(((r,o)=>{const i=()=>o(new de(e.reason));e.aborted?i():(n=gt(e,i),t.finally((()=>n())).then(r,o))})).finally((()=>{n=ie}))}var Qr=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(e){return{status:e instanceof de?"cancelled":"rejected",error:e}}finally{null==t||t()}},oe=e=>t=>vt(wt(e,t).then((t=>(F(e),t)))),Et=e=>{const t=oe(e);return e=>t(new Promise((t=>setTimeout(t,e))))},{assign:Yr}=Object,Xe={},ye="listenerMiddleware",Zr=(e,t)=>(n,r)=>{xe(n);const o=new AbortController;(t=>{gt(e,(()=>z(t,e.reason)))})(o);const i=Qr((async()=>{F(e),F(o.signal);const t=await n({pause:oe(o.signal),delay:Et(o.signal),signal:o.signal});return F(o.signal),t}),(()=>z(o,Xr)));return null!=r&&r.autoJoin&&t.push(i.catch(ie)),{result:oe(e)(i),cancel(){z(o,Gr)}}},en=(e,t)=>(n,r)=>vt((async(n,r)=>{F(t);let o=()=>{};const i=[new Promise(((t,r)=>{let i=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});o=()=>{i(),r()}}))];null!=r&&i.push(new Promise((e=>setTimeout(e,r,null))));try{const e=await wt(t,Promise.race(i));return F(t),e}finally{o()}})(n,r)),Mt=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=j(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(S(21));return xe(i),{predicate:o,type:t,effect:i}},Ot=Object.assign((e=>{const{type:t,predicate:n,effect:r}=Mt(e);return{id:G(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(S(22))}}}),{withTypes:()=>Ot}),Pe=e=>{e.pending.forEach((e=>{z(e,Ce)}))},tn=e=>()=>{e.forEach(Pe),e.clear()},Je=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout((()=>{throw e}),0)}},At=Object.assign(j(`${ye}/add`),{withTypes:()=>At}),rn=j(`${ye}/removeAll`),St=Object.assign(j(`${ye}/remove`),{withTypes:()=>St}),nn=(...e)=>{console.error(`${ye}/error`,...e)},kn=(e={})=>{const t=new Map,{extra:n,onError:r=nn}=e;xe(r);const o=e=>{let n=Oe(Array.from(t.values()),(t=>t.effect===e.effect));return n||(n=Ot(e)),(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),null!=t&&t.cancelActive&&Pe(e)}))(n)};Object.assign(o,{withTypes:()=>o});const i=e=>{const{type:n,effect:r,predicate:o}=Mt(e),i=Oe(Array.from(t.values()),(e=>("string"==typeof n?e.type===n:e.predicate===o)&&e.effect===r));return i&&(i.unsubscribe(),e.cancelActive&&Pe(i)),!!i};Object.assign(i,{withTypes:()=>i});const s=async(e,i,s,c)=>{const a=new AbortController,u=en(o,a.signal),l=[];try{e.pending.add(a),await Promise.resolve(e.effect(i,Yr({},s,{getOriginalState:c,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:Et(a.signal),pause:oe(a.signal),extra:n,signal:a.signal,fork:Zr(a.signal,l),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach(((e,t,n)=>{e!==a&&(z(e,Ce),n.delete(e))}))},cancel:()=>{z(a,Ce),e.pending.delete(a)},throwIfCancelled:()=>{F(a.signal)}})))}catch(e){e instanceof de||Je(r,e,{raisedBy:"effect"})}finally{await Promise.all(l),z(a,Jr),e.pending.delete(a)}},c=tn(t);return{middleware:e=>n=>a=>{if(!Re(a))return n(a);if(At.match(a))return o(a.payload);if(rn.match(a))return void c();if(St.match(a))return i(a.payload);let u=e.getState();const l=()=>{if(u===Xe)throw new Error(S(23));return u};let f;try{if(f=n(a),t.size>0){const n=e.getState(),o=Array.from(t.values());for(const t of o){let o=!1;try{o=t.predicate(a,n,u)}catch(e){o=!1,Je(r,e,{raisedBy:"predicate"})}o&&s(t,a,e,l)}}}finally{u=Xe}return f},startListening:o,stopListening:i,clearListeners:c}},on=e=>({id:G(),middleware:e,applied:new Map}),sn=e=>t=>{var n;return(null==(n=null==t?void 0:t.meta)?void 0:n.instanceId)===e},Rn=()=>{const e=G(),t=new Map,n=Object.assign(j("dynamicMiddleware/add",((...t)=>({payload:t,meta:{instanceId:e}}))),{withTypes:()=>n}),r=Object.assign((function(...e){e.forEach((e=>{let n=Oe(Array.from(t.values()),(t=>t.middleware===e));n||(n=on(e)),t.set(n.id,n)}))}),{withTypes:()=>r}),o=Ae(n,sn(e));return{middleware:e=>n=>i=>o(i)?(r(...i.payload),e.dispatch):(e=>q(...Array.from(t.values()).map((t=>ne(t.applied,e,{insert:()=>t.middleware(e)})))))(e)(n)(i),addMiddleware:r,withMiddleware:n,instanceId:e}},cn=e=>"reducerPath"in e&&"string"==typeof e.reducerPath,an=e=>e.flatMap((e=>cn(e)?[[e.reducerPath,e.reducer]]:Object.entries(e))),ze=Symbol.for("rtk-state-proxy-original"),un=e=>!!e&&!!e[ze],fn=new WeakMap,ln=(e,t)=>ne(fn,e,{insert:()=>new Proxy(e,{get:(e,n,r)=>{if(n===ze)return e;const o=Reflect.get(e,n,r);if(typeof o>"u"){const e=t[n.toString()];if(e){const t=e(void 0,{type:G()});if(typeof t>"u")throw new Error(S(24));return t}}return o}})}),dn=e=>{if(!un(e))throw new Error(S(25));return e[ze]},yn=(e={})=>e;function jn(...e){const t=Object.fromEntries(an(e)),n=()=>Object.keys(t).length?Qe(t):yn;let r=n();function o(e,t){return r(e,t)}o.withLazyLoadedSlices=()=>o;const i=Object.assign((function(e,n){return function(r,...o){return e(ln(n?n(r,...o):r,t),...o)}}),{original:dn});return Object.assign(o,{inject:(e,i={})=>{const{reducerPath:s,reducer:c}=e,a=t[s];return!i.overrideExisting&&a&&a!==c||(t[s]=c,r=n()),o},selector:i})}function S(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}export{Tr as ReducerType,ft as SHOULD_AUTOBATCH,de as TaskAbortError,at as Tuple,Z as __DO_NOT_USE__ActionTypes,At as addListener,Dt as applyMiddleware,Sn as asyncThunkCreator,br as autoBatchEnhancer,mn as bindActionCreators,Dr as buildCreateSlice,rn as clearAllListeners,Qe as combineReducers,jn as combineSlices,q as compose,An as configureStore,j as createAction,gn as createActionCreatorInvariantMiddleware,kr as createAsyncThunk,ar as createDraftSafeSelector,cr as createDraftSafeSelectorCreator,Rn as createDynamicMiddleware,Pn as createEntityAdapter,En as createImmutableStateInvariantMiddleware,kn as createListenerMiddleware,Ne as createNextState,wr as createReducer,rr as createSelector,ot as createSelectorCreator,Mn as createSerializableStateInvariantMiddleware,Cn as createSlice,ke as createStore,nt as current,yr as findNonSerializableValue,S as formatProdErrorMessage,je as freeze,Re as isAction,vn as isActionCreator,Ae as isAllOf,X as isAnyOf,Sr as isAsyncThunkAction,T as isDraft,fr as isFluxStandardAction,Ar as isFulfilled,wn as isImmutableDefault,Mr as isPending,dr as isPlain,se as isPlainObject,Se as isRejected,Or as isRejectedWithValue,hn as legacy_createStore,_n as lruMemoize,Pr as miniSerializeError,G as nanoid,bn as original,On as prepareAutoBatched,St as removeListener,Rr as unwrapResult,De as weakMapMemoize};