@mocklane/core 0.1.0

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.
@@ -0,0 +1,51 @@
1
+ function ro(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function no(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sr={exports:{}},W={};/**
2
+ * @license React
3
+ * react.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var an;function ao(){if(an)return W;an=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),y=Symbol.iterator;function g(m){return m===null||typeof m!="object"?null:(m=y&&m[y]||m["@@iterator"],typeof m=="function"?m:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function M(m,x,A){this.props=m,this.context=x,this.refs=w,this.updater=A||R}M.prototype.isReactComponent={},M.prototype.setState=function(m,x){if(typeof m!="object"&&typeof m!="function"&&m!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,m,x,"setState")},M.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function C(){}C.prototype=M.prototype;function k(m,x,A){this.props=m,this.context=x,this.refs=w,this.updater=A||R}var O=k.prototype=new C;O.constructor=k,b(O,M.prototype),O.isPureReactComponent=!0;var P=Array.isArray;function D(){}var T={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function Y(m,x,A){var I=A.ref;return{$$typeof:e,type:m,key:x,ref:I!==void 0?I:null,props:A}}function U(m,x){return Y(m.type,x,m.props)}function ae(m){return typeof m=="object"&&m!==null&&m.$$typeof===e}function K(m){var x={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(A){return x[A]})}var ie=/\/+/g;function Q(m,x){return typeof m=="object"&&m!==null&&m.key!=null?K(""+m.key):x.toString(36)}function te(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(D,D):(m.status="pending",m.then(function(x){m.status==="pending"&&(m.status="fulfilled",m.value=x)},function(x){m.status==="pending"&&(m.status="rejected",m.reason=x)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function fe(m,x,A,I,V){var z=typeof m;(z==="undefined"||z==="boolean")&&(m=null);var q=!1;if(m===null)q=!0;else switch(z){case"bigint":case"string":case"number":q=!0;break;case"object":switch(m.$$typeof){case e:case t:q=!0;break;case f:return q=m._init,fe(q(m._payload),x,A,I,V)}}if(q)return V=V(m),q=I===""?"."+Q(m,0):I,P(V)?(A="",q!=null&&(A=q.replace(ie,"$&/")+"/"),fe(V,x,A,"",function(rr){return rr})):V!=null&&(ae(V)&&(V=U(V,A+(V.key==null||m&&m.key===V.key?"":(""+V.key).replace(ie,"$&/")+"/")+q)),x.push(V)),1;q=0;var ve=I===""?".":I+":";if(P(m))for(var ce=0;ce<m.length;ce++)I=m[ce],z=ve+Q(I,ce),q+=fe(I,x,A,z,V);else if(ce=g(m),typeof ce=="function")for(m=ce.call(m),ce=0;!(I=m.next()).done;)I=I.value,z=ve+Q(I,ce++),q+=fe(I,x,A,z,V);else if(z==="object"){if(typeof m.then=="function")return fe(te(m),x,A,I,V);throw x=String(m),Error("Objects are not valid as a React child (found: "+(x==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":x)+"). If you meant to render a collection of children, use an array instead.")}return q}function J(m,x,A){if(m==null)return m;var I=[],V=0;return fe(m,I,"","",function(z){return x.call(A,z,V++)}),I}function ue(m){if(m._status===-1){var x=m._result;x=x(),x.then(function(A){(m._status===0||m._status===-1)&&(m._status=1,m._result=A)},function(A){(m._status===0||m._status===-1)&&(m._status=2,m._result=A)}),m._status===-1&&(m._status=0,m._result=x)}if(m._status===1)return m._result.default;throw m._result}var re=typeof reportError=="function"?reportError:function(m){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var x=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof m=="object"&&m!==null&&typeof m.message=="string"?String(m.message):String(m),error:m});if(!window.dispatchEvent(x))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",m);return}console.error(m)},me={map:J,forEach:function(m,x,A){J(m,function(){x.apply(this,arguments)},A)},count:function(m){var x=0;return J(m,function(){x++}),x},toArray:function(m){return J(m,function(x){return x})||[]},only:function(m){if(!ae(m))throw Error("React.Children.only expected to receive a single React element child.");return m}};return W.Activity=c,W.Children=me,W.Component=M,W.Fragment=r,W.Profiler=a,W.PureComponent=k,W.StrictMode=n,W.Suspense=s,W.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,W.__COMPILER_RUNTIME={__proto__:null,c:function(m){return T.H.useMemoCache(m)}},W.cache=function(m){return function(){return m.apply(null,arguments)}},W.cacheSignal=function(){return null},W.cloneElement=function(m,x,A){if(m==null)throw Error("The argument must be a React element, but you passed "+m+".");var I=b({},m.props),V=m.key;if(x!=null)for(z in x.key!==void 0&&(V=""+x.key),x)!v.call(x,z)||z==="key"||z==="__self"||z==="__source"||z==="ref"&&x.ref===void 0||(I[z]=x[z]);var z=arguments.length-2;if(z===1)I.children=A;else if(1<z){for(var q=Array(z),ve=0;ve<z;ve++)q[ve]=arguments[ve+2];I.children=q}return Y(m.type,V,I)},W.createContext=function(m){return m={$$typeof:i,_currentValue:m,_currentValue2:m,_threadCount:0,Provider:null,Consumer:null},m.Provider=m,m.Consumer={$$typeof:o,_context:m},m},W.createElement=function(m,x,A){var I,V={},z=null;if(x!=null)for(I in x.key!==void 0&&(z=""+x.key),x)v.call(x,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(V[I]=x[I]);var q=arguments.length-2;if(q===1)V.children=A;else if(1<q){for(var ve=Array(q),ce=0;ce<q;ce++)ve[ce]=arguments[ce+2];V.children=ve}if(m&&m.defaultProps)for(I in q=m.defaultProps,q)V[I]===void 0&&(V[I]=q[I]);return Y(m,z,V)},W.createRef=function(){return{current:null}},W.forwardRef=function(m){return{$$typeof:l,render:m}},W.isValidElement=ae,W.lazy=function(m){return{$$typeof:f,_payload:{_status:-1,_result:m},_init:ue}},W.memo=function(m,x){return{$$typeof:u,type:m,compare:x===void 0?null:x}},W.startTransition=function(m){var x=T.T,A={};T.T=A;try{var I=m(),V=T.S;V!==null&&V(A,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(D,re)}catch(z){re(z)}finally{x!==null&&A.types!==null&&(x.types=A.types),T.T=x}},W.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},W.use=function(m){return T.H.use(m)},W.useActionState=function(m,x,A){return T.H.useActionState(m,x,A)},W.useCallback=function(m,x){return T.H.useCallback(m,x)},W.useContext=function(m){return T.H.useContext(m)},W.useDebugValue=function(){},W.useDeferredValue=function(m,x){return T.H.useDeferredValue(m,x)},W.useEffect=function(m,x){return T.H.useEffect(m,x)},W.useEffectEvent=function(m){return T.H.useEffectEvent(m)},W.useId=function(){return T.H.useId()},W.useImperativeHandle=function(m,x,A){return T.H.useImperativeHandle(m,x,A)},W.useInsertionEffect=function(m,x){return T.H.useInsertionEffect(m,x)},W.useLayoutEffect=function(m,x){return T.H.useLayoutEffect(m,x)},W.useMemo=function(m,x){return T.H.useMemo(m,x)},W.useOptimistic=function(m,x){return T.H.useOptimistic(m,x)},W.useReducer=function(m,x,A){return T.H.useReducer(m,x,A)},W.useRef=function(m){return T.H.useRef(m)},W.useState=function(m){return T.H.useState(m)},W.useSyncExternalStore=function(m,x,A){return T.H.useSyncExternalStore(m,x,A)},W.useTransition=function(){return T.H.useTransition()},W.version="19.2.7",W}var on;function oo(){return on||(on=1,sr.exports=ao()),sr.exports}var h=oo();const io=no(h),lo=ro({__proto__:null,default:io},[h]);/**
10
+ * react-router v7.17.0
11
+ *
12
+ * Copyright (c) Remix Software Inc.
13
+ *
14
+ * This source code is licensed under the MIT license found in the
15
+ * LICENSE.md file in the root directory of this source tree.
16
+ *
17
+ * @license MIT
18
+ */var Hn=e=>{throw TypeError(e)},zn=(e,t,r)=>t.has(e)||Hn("Cannot "+r),Ce=(e,t,r)=>(zn(e,t,"read from private field"),r?r.call(e):t.get(e)),yt=(e,t,r)=>t.has(e)?Hn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ae=(e,t,r,n)=>(zn(e,t,"write to private field"),t.set(e,r),r),ln="popstate";function sn(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Ls(e={}){function t(n,a){var u;let o=(u=a.state)==null?void 0:u.masked,{pathname:i,search:l,hash:s}=o||n.location;return wt("",{pathname:i,search:l,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,a){return typeof a=="string"?a:_e(a)}return uo(t,r,null,e)}function X(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function de(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function so(){return Math.random().toString(36).substring(2,10)}function un(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function wt(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Fe(t):t,state:r,key:t&&t.key||n||so(),mask:a}}function _e({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Fe(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function uo(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l="POP",s=null,u=f();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function f(){return(i.state||{idx:null}).idx}function c(){l="POP";let w=f(),M=w==null?null:w-u;u=w,s&&s({action:l,location:b.location,delta:M})}function y(w,M){l="PUSH";let C=sn(w)?w:wt(b.location,w,M);u=f()+1;let k=un(C,u),O=b.createHref(C.mask||C);try{i.pushState(k,"",O)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;a.location.assign(O)}o&&s&&s({action:l,location:b.location,delta:1})}function g(w,M){l="REPLACE";let C=sn(w)?w:wt(b.location,w,M);u=f();let k=un(C,u),O=b.createHref(C.mask||C);i.replaceState(k,"",O),o&&s&&s({action:l,location:b.location,delta:0})}function R(w){return Bn(a,w)}let b={get action(){return l},get location(){return e(a,i)},listen(w){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(ln,c),s=w,()=>{a.removeEventListener(ln,c),s=null}},createHref(w){return t(a,w)},createURL:R,encodeLocation(w){let M=R(w);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:y,replace:g,go(w){return i.go(w)}};return b}function Bn(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),X(n,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:_e(t);return a=a.replace(/ $/,"%20"),!r&&a.startsWith("//")&&(a=n+a),new URL(a,n)}var vt,cn=class{constructor(e){if(yt(this,vt,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Ce(this,vt).has(e))return Ce(this,vt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Ce(this,vt).set(e,t)}};vt=new WeakMap;var co=new Set(["lazy","caseSensitive","path","id","index","children"]);function fo(e){return co.has(e)}var ho=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function mo(e){return ho.has(e)}function po(e){return e.index===!0}function Et(e,t,r=[],n={},a=!1){return e.map((o,i)=>{let l=[...r,String(i)],s=typeof o.id=="string"?o.id:l.join("-");if(X(o.index!==!0||!o.children,"Cannot specify children on an index route"),X(a||!n[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),po(o)){let u={...o,id:s};return n[s]=dn(u,t(u)),u}else{let u={...o,id:s,children:void 0};return n[s]=dn(u,t(u)),o.children&&(u.children=Et(o.children,t,l,n,a)),u}})}function dn(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Wn(e,t,r="/"){return Pe(e,t,r,!1)}function Pe(e,t,r,n,a){let o=typeof t=="string"?Fe(t):t,i=Le(o.pathname||"/",r);if(i==null)return null;let l=a??Ut(e),s=null,u=Co(i);for(let f=0;s==null&&f<l.length;++f)s=Lo(l[f],u,n);return s}function Yn(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Ut(e){let t=Vn(e);return yo(t),t}function Vn(e,t=[],r=[],n="",a=!1){let o=(i,l,s=a,u)=>{let f={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&s)return;X(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let c=xe([n,f.relativePath]),y=r.concat(f);i.children&&i.children.length>0&&(X(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Vn(i.children,t,y,c,s)),!(i.path==null&&!i.index)&&t.push({path:c,score:So(c,i.index),routesMeta:y})};return e.forEach((i,l)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,l);else for(let u of Jn(i.path))o(i,l,!0,u)}),t}function Jn(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=Jn(n.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),a&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function yo(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:xo(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var vo=/^:[\w-]+$/,go=3,wo=2,Eo=1,Ro=10,bo=-2,fn=e=>e==="*";function So(e,t){let r=e.split("/"),n=r.length;return r.some(fn)&&(n+=bo),t&&(n+=wo),r.filter(a=>!fn(a)).reduce((a,o)=>a+(vo.test(o)?go:o===""?Eo:Ro),n)}function xo(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function Lo(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let l=0;l<n.length;++l){let s=n[l],u=l===n.length-1,f=o==="/"?t:t.slice(o.length)||"/",c=Yt({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},f),y=s.route;if(!c&&u&&r&&!n[n.length-1].route.index&&(c=Yt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},f)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:xe([o,c.pathname]),pathnameBase:Mo(xe([o,c.pathnameBase])),route:y}),c.pathnameBase!=="/"&&(o=xe([o,c.pathnameBase]))}return i}function Yt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Gn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((u,{paramName:f,isOptional:c},y)=>{if(f==="*"){let R=l[y]||"";i=o.slice(0,o.length-R.length).replace(/(.)\/+$/,"$1")}const g=l[y];return c&&!g?u[f]=void 0:u[f]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Gn(e,t=!1,r=!0){de(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,(i,l,s,u,f)=>{if(n.push({paramName:l,isOptional:s!=null}),s){let c=f.charAt(u+i.length);return c&&c!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Co(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return de(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Le(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 Po({basename:e,pathname:t}){return t==="/"?e:xe([e,t])}var Xn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tr=e=>Xn.test(e);function To(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Fe(e):e,o;return r?(r=_r(r),r.startsWith("/")?o=hn(r.substring(1),"/"):o=hn(r,t)):o=t,{pathname:o,search:_o(n),hash:Do(a)}}function hn(e,t){let r=Vt(t).split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function ur(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 Kn(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Mr(e){let t=Kn(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function Xt(e,t,r,n=!1){let a;typeof e=="string"?a=Fe(e):(a={...e},X(!a.pathname||!a.pathname.includes("?"),ur("?","pathname","search",a)),X(!a.pathname||!a.pathname.includes("#"),ur("#","pathname","hash",a)),X(!a.search||!a.search.includes("#"),ur("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,l;if(i==null)l=r;else{let c=t.length-1;if(!n&&i.startsWith("..")){let y=i.split("/");for(;y[0]==="..";)y.shift(),c-=1;a.pathname=y.join("/")}l=c>=0?t[c]:"/"}let s=To(a,l),u=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||f)&&(s.pathname+="/"),s}var _r=e=>e.replace(/\/\/+/g,"/"),xe=e=>_r(e.join("/")),Vt=e=>e.replace(/\/+$/,""),Mo=e=>Vt(e).replace(/^\/*/,"/"),_o=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Do=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Oo=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function ko(e,t){return new Oo(e,typeof t=="number"?{status:t}:t)}var Ao=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},Je=class{constructor(e,t,r,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 Ze(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bt(e){let t=e.map(r=>r.route.path).filter(Boolean);return xe(t)||"/"}var qn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qn(e,t){let r=e;if(typeof r!="string"||!Xn.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(qn)try{let o=new URL(window.location.href),i=r.startsWith("//")?new URL(o.protocol+r):new URL(r),l=Le(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:a=!0}catch{de(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var Ve=Symbol("Uninstrumented");function Io(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(a=>a({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let l of i)o[l]&&r[l].push(o[l])}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let a=lt(r.lazy,t.lazy,()=>{});a&&(n.lazy=a)}if(typeof t.lazy=="object"){let a=t.lazy;["middleware","loader","action"].forEach(o=>{let i=a[o],l=r[`lazy.${o}`];if(typeof i=="function"&&l.length>0){let s=lt(l,i,()=>{});s&&(n.lazy=Object.assign(n.lazy||{},{[o]:s}))}})}return["loader","action"].forEach(a=>{let o=t[a];if(typeof o=="function"&&r[a].length>0){let i=o[Ve]??o,l=lt(r[a],i,(...s)=>mn(s[0]));l&&(a==="loader"&&i.hydrate===!0&&(l.hydrate=!0),l[Ve]=i,n[a]=l)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(a=>{let o=a[Ve]??a,i=lt(r.middleware,o,(...l)=>mn(l[0]));return i?(i[Ve]=o,i):a})),n}function Fo(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(a){let o=Object.keys(a);for(let i of o)a[i]&&r[i].push(a[i])}})),r.navigate.length>0){let n=e.navigate[Ve]??e.navigate,a=lt(r.navigate,n,(...o)=>{let[i,l]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?_e(i):".",...pn(e,l??{})}});a&&(a[Ve]=n,e.navigate=a)}if(r.fetch.length>0){let n=e.fetch[Ve]??e.fetch,a=lt(r.fetch,n,(...o)=>{let[i,,l,s]=o;return{href:l??".",fetcherKey:i,...pn(e,s??{})}});a&&(a[Ve]=n,e.fetch=a)}return e}function lt(e,t,r){return e.length===0?null:async(...n)=>{let a=await Zn(e,r(...n),()=>t(...n),e.length-1);if(a.type==="error")throw a.value;return a.value}}async function Zn(e,t,r,n){let a=e[n],o;if(a){let i,l=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=Zn(e,t,r,n-1),o=await i,X(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await a(l,t)}catch(s){console.error("An instrumentation function threw an error:",s)}i||await l(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function mn(e){let{request:t,context:r,params:n,pattern:a}=e;return{request:No(t),params:{...n},pattern:a,context:$o(r)}}function pn(e,t){return{currentUrl:_e(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function No(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function $o(e){if(Uo(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var jo=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Uo(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===jo}var ea=["POST","PUT","PATCH","DELETE"],Ho=new Set(ea),zo=["GET",...ea],Bo=new Set(zo),ta=new Set([301,302,303,307,308]),Wo=new Set([307,308]),cr={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Yo={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ft={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Vo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ra="remix-router-transitions",na=Symbol("ResetLoaderData"),qe,at,We,ot,Jo=class{constructor(e){yt(this,qe),yt(this,at),yt(this,We),yt(this,ot),Ae(this,qe,e),Ae(this,at,Ut(e))}get stableRoutes(){return Ce(this,qe)}get activeRoutes(){return Ce(this,We)??Ce(this,qe)}get branches(){return Ce(this,ot)??Ce(this,at)}get hasHMRRoutes(){return Ce(this,We)!=null}setRoutes(e){Ae(this,qe,e),Ae(this,at,Ut(e))}setHmrRoutes(e){Ae(this,We,e),Ae(this,ot,Ut(e))}commitHmrRoutes(){Ce(this,We)&&(Ae(this,qe,Ce(this,We)),Ae(this,at,Ce(this,ot)),Ae(this,We,void 0),Ae(this,ot,void 0))}};qe=new WeakMap;at=new WeakMap;We=new WeakMap;ot=new WeakMap;function Cs(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";X(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||Vo,o=a;if(e.instrumentations){let d=e.instrumentations;o=p=>({...a(p),...Io(d.map(E=>E.route).filter(Boolean),p)})}let i={},l=new Jo(Et(e.routes,o,void 0,i)),s=e.basename||"/";s.startsWith("/")||(s=`/${s}`);let u=e.dataStrategy||Qo,f={...e.future},c=null,y=new Set,g=null,R=null,b=null,w=null,M=e.hydrationData!=null,C=Pe(l.activeRoutes,e.history.location,s,!1,l.branches),k=!1,O=null,P,D;if(C==null&&!e.patchRoutesOnNavigation){let d=Te(404,{pathname:e.history.location.pathname}),{matches:p,route:E}=kt(l.activeRoutes);P=!0,D=!P,C=p,O={[E.id]:d}}else if(C&&!e.hydrationData&&Tt(C,l.activeRoutes,e.history.location.pathname).active&&(C=null),C)if(C.some(d=>d.route.lazy))P=!1,D=!P;else if(!C.some(d=>Dr(d.route)))P=!0,D=!P;else{let d=e.hydrationData?e.hydrationData.loaderData:null,p=e.hydrationData?e.hydrationData.errors:null,E=C;if(p){let S=C.findIndex(L=>p[L.route.id]!==void 0);E=E.slice(0,S+1)}D=!1,P=!0,E.forEach(S=>{let L=aa(S.route,d,p);D=D||L.renderFallback,P=P&&!L.shouldLoad})}else{P=!1,D=!P,C=[];let d=Tt(null,l.activeRoutes,e.history.location.pathname);d.active&&d.matches&&(k=!0,C=d.matches)}let T,v={historyAction:e.history.action,location:e.history.location,matches:C,initialized:P,renderFallback:D,navigation:cr,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||O,fetchers:new Map,blockers:new Map},Y="POP",U=null,ae=!1,K,ie=!1,Q=new Map,te=null,fe=!1,J=!1,ue=new Set,re=new Map,me=0,m=-1,x=new Map,A=new Set,I=new Map,V=new Map,z=new Set,q=new Map,ve,ce=null;function rr(){if(c=e.history.listen(({action:d,location:p,delta:E})=>{if(ve){ve(),ve=void 0;return}de(q.size===0||E!=null,"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 S=Qr({currentLocation:v.location,nextLocation:p,historyAction:d});if(S&&E!=null){let L=new Promise(F=>{ve=F});e.history.go(E*-1),Pt(S,{state:"blocked",location:p,proceed(){Pt(S,{state:"proceeding",proceed:void 0,reset:void 0,location:p}),L.then(()=>e.history.go(E))},reset(){let F=new Map(v.blockers);F.set(S,ft),pe({blockers:F})}}),U==null||U.resolve(),U=null;return}return Ge(d,p)}),r){yi(t,Q);let d=()=>vi(t,Q);t.addEventListener("pagehide",d),te=()=>t.removeEventListener("pagehide",d)}return v.initialized||Ge("POP",v.location,{initialHydration:!0}),T}function $a(){c&&c(),te&&te(),y.clear(),K&&K.abort(),v.fetchers.forEach((d,p)=>ar(v.fetchers,p)),v.blockers.forEach((d,p)=>qr(p))}function ja(d){if(y.add(d),g){let{newErrors:p}=g;g=null,d(v,{deletedFetchers:[],newErrors:p,viewTransitionOpts:void 0,flushSync:!1})}return()=>y.delete(d)}function pe(d,p={}){d.matches&&(d.matches=d.matches.map(L=>{let F=i[L.route.id],N=L.route;return N.element!==F.element||N.errorElement!==F.errorElement||N.hydrateFallbackElement!==F.hydrateFallbackElement?{...L,route:F}:L})),v={...v,...d};let E=[],S=[];v.fetchers.forEach((L,F)=>{L.state==="idle"&&(z.has(F)?E.push(F):S.push(F))}),z.forEach(L=>{!v.fetchers.has(L)&&!re.has(L)&&E.push(L)}),y.size===0&&(g={newErrors:d.errors??null}),[...y].forEach(L=>L(v,{deletedFetchers:E,newErrors:d.errors??null,viewTransitionOpts:p.viewTransitionOpts,flushSync:p.flushSync===!0})),E.forEach(L=>ar(v.fetchers,L)),S.forEach(L=>v.fetchers.delete(L))}function rt(d,p,{flushSync:E}={}){var H,G;let S=v.actionData!=null&&v.navigation.formMethod!=null&&ye(v.navigation.formMethod)&&v.navigation.state==="loading"&&((H=d.state)==null?void 0:H._isRedirect)!==!0,L;p.actionData?Object.keys(p.actionData).length>0?L=p.actionData:L=null:S?L=v.actionData:L=null;let F=p.loaderData?Cn(v.loaderData,p.loaderData,p.matches||[],p.errors):v.loaderData,N=v.blockers;N.size>0&&(N=new Map(N),N.forEach((j,Z)=>N.set(Z,ft)));let B=fe?!1:en(d,p.matches||v.matches),_=ae===!0||v.navigation.formMethod!=null&&ye(v.navigation.formMethod)&&((G=d.state)==null?void 0:G._isRedirect)!==!0;l.commitHmrRoutes(),fe||Y==="POP"||(Y==="PUSH"?e.history.push(d,d.state):Y==="REPLACE"&&e.history.replace(d,d.state));let $;if(Y==="POP"){let j=Q.get(v.location.pathname);j&&j.has(d.pathname)?$={currentLocation:v.location,nextLocation:d}:Q.has(d.pathname)&&($={currentLocation:d,nextLocation:v.location})}else if(ie){let j=Q.get(v.location.pathname);j?j.add(d.pathname):(j=new Set([d.pathname]),Q.set(v.location.pathname,j)),$={currentLocation:v.location,nextLocation:d}}pe({...p,actionData:L,loaderData:F,historyAction:Y,location:d,initialized:!0,renderFallback:!1,navigation:cr,revalidation:"idle",restoreScrollPosition:B,preventScrollReset:_,blockers:N},{viewTransitionOpts:$,flushSync:E===!0}),Y="POP",ae=!1,ie=!1,fe=!1,J=!1,U==null||U.resolve(),U=null,ce==null||ce.resolve(),ce=null}async function Yr(d,p){if(U==null||U.resolve(),U=null,typeof d=="number"){U||(U=Mn());let ne=U.promise;return e.history.go(d),ne}let E=vr(v.location,v.matches,s,d,p==null?void 0:p.fromRouteId,p==null?void 0:p.relative),{path:S,submission:L,error:F}=yn(!1,E,p),N;p!=null&&p.mask&&(N={pathname:"",search:"",hash:"",...typeof p.mask=="string"?Fe(p.mask):{...v.location.mask,...p.mask}});let B=v.location,_=wt(B,S,p&&p.state,void 0,N);_={..._,...e.history.encodeLocation(_)};let $=p&&p.replace!=null?p.replace:void 0,H="PUSH";$===!0?H="REPLACE":$===!1||L!=null&&ye(L.formMethod)&&L.formAction===v.location.pathname+v.location.search&&(H="REPLACE");let G=p&&"preventScrollReset"in p?p.preventScrollReset===!0:void 0,j=(p&&p.flushSync)===!0,Z=Qr({currentLocation:B,nextLocation:_,historyAction:H});if(Z){Pt(Z,{state:"blocked",location:_,proceed(){Pt(Z,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),Yr(d,p)},reset(){let ne=new Map(v.blockers);ne.set(Z,ft),pe({blockers:ne})}});return}await Ge(H,_,{submission:L,pendingError:F,preventScrollReset:G,replace:p&&p.replace,enableViewTransition:p&&p.viewTransition,flushSync:j,callSiteDefaultShouldRevalidate:p&&p.defaultShouldRevalidate})}function Ua(){ce||(ce=Mn()),nr(),pe({revalidation:"loading"});let d=ce.promise;return v.navigation.state==="submitting"?d:v.navigation.state==="idle"?(Ge(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),d):(Ge(Y||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:ie===!0}),d)}async function Ge(d,p,E){K&&K.abort(),K=null,Y=d,fe=(E&&E.startUninterruptedRevalidation)===!0,Qa(v.location,v.matches),ae=(E&&E.preventScrollReset)===!0,ie=(E&&E.enableViewTransition)===!0;let S=l.activeRoutes,L=E!=null&&E.initialHydration&&v.matches&&v.matches.length>0&&!k?v.matches:Pe(S,p,s,!1,l.branches),F=(E&&E.flushSync)===!0;if(L&&v.initialized&&!J&&ii(v.location,p)&&!(E&&E.submission&&ye(E.submission.formMethod))){rt(p,{matches:L},{flushSync:F});return}let N=Tt(L,S,p.pathname);if(N.active&&N.matches&&(L=N.matches),!L){let{error:se,notFoundMatches:oe,route:we}=or(p.pathname);rt(p,{matches:oe,loaderData:{},errors:{[we.id]:se}},{flushSync:F});return}let B=E&&E.overrideNavigation?{...E.overrideNavigation,matches:L,historyAction:d}:void 0;K=new AbortController;let _=it(e.history,p,K.signal,E&&E.submission),$=e.getContext?await e.getContext():new cn,H;if(E&&E.pendingError)H=[Ye(L).route.id,{type:"error",error:E.pendingError}];else if(E&&E.submission&&ye(E.submission.formMethod)){let se=await Ha(_,p,E.submission,L,d,$,N.active,E&&E.initialHydration===!0,{replace:E.replace,flushSync:F});if(se.shortCircuited)return;if(se.pendingActionResult){let[oe,we]=se.pendingActionResult;if(Se(we)&&Ze(we.error)&&we.error.status===404){K=null,rt(p,{matches:se.matches,loaderData:{},errors:{[oe]:we.error}});return}}L=se.matches||L,H=se.pendingActionResult,B=dr(p,L,d,E.submission),F=!1,N.active=!1,_=it(e.history,_.url,_.signal)}let{shortCircuited:G,matches:j,loaderData:Z,errors:ne,workingFetchers:he}=await za(_,p,L,d,$,N.active,B,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,E&&E.initialHydration===!0,F,H,E&&E.callSiteDefaultShouldRevalidate);G||(K=null,rt(p,{matches:j||L,...Pn(H),loaderData:Z,errors:ne,...he?{fetchers:he}:{}}))}async function Ha(d,p,E,S,L,F,N,B,_={}){nr();let $=mi(p,S,L,E);if(pe({navigation:$},{flushSync:_.flushSync===!0}),N){let j=await Mt(S,p.pathname,d.signal);if(j.type==="aborted")return{shortCircuited:!0};if(j.type==="error"){if(j.partialMatches.length===0){let{matches:ne,route:he}=kt(l.activeRoutes);return{matches:ne,pendingActionResult:[he.id,{type:"error",error:j.error}]}}let Z=Ye(j.partialMatches).route.id;return{matches:j.partialMatches,pendingActionResult:[Z,{type:"error",error:j.error}]}}else if(j.matches)S=j.matches;else{let{notFoundMatches:Z,error:ne,route:he}=or(p.pathname);return{matches:Z,pendingActionResult:[he.id,{type:"error",error:ne}]}}}let H,G=Ht(S,p);if(!G.route.action&&!G.route.lazy)H={type:"error",error:Te(405,{method:d.method,pathname:p.pathname,routeId:G.route.id})};else{let j=st(o,i,d,p,S,G,B?[]:n,F),Z=await ct(d,p,j,F,null);if(H=Z[G.route.id],!H){for(let ne of S)if(Z[ne.route.id]){H=Z[ne.route.id];break}}if(d.signal.aborted)return{shortCircuited:!0}}if(Qe(H)){let j;return _&&_.replace!=null?j=_.replace:j=Sn(H.response.headers.get("Location"),new URL(d.url),s,e.history)===v.location.pathname+v.location.search,await Xe(d,H,!0,{submission:E,replace:j}),{shortCircuited:!0}}if(Se(H)){let j=Ye(S,G.route.id);return(_&&_.replace)!==!0&&(Y="PUSH"),{matches:S,pendingActionResult:[j.route.id,H,G.route.id]}}return{matches:S,pendingActionResult:[G.route.id,H]}}async function za(d,p,E,S,L,F,N,B,_,$,H,G,j,Z){let ne=N||dr(p,E,S,B),he=B||_||Tn(ne),se=!fe&&!H;if(F){if(se){let Re=Vr(j);pe({navigation:ne,...Re!==void 0?{actionData:Re}:{}},{flushSync:G})}let ee=await Mt(E,p.pathname,d.signal);if(ee.type==="aborted")return{shortCircuited:!0};if(ee.type==="error"){if(ee.partialMatches.length===0){let{matches:ke,route:Ue}=kt(l.activeRoutes);return{matches:ke,loaderData:{},errors:{[Ue.id]:ee.error}}}let Re=Ye(ee.partialMatches).route.id;return{matches:ee.partialMatches,loaderData:{},errors:{[Re]:ee.error}}}else if(ee.matches)E=ee.matches;else{let{error:Re,notFoundMatches:ke,route:Ue}=or(p.pathname);return{matches:ke,loaderData:{},errors:{[Ue.id]:Re}}}}let oe=l.activeRoutes,{dsMatches:we,revalidatingFetchers:Ee}=vn(d,L,o,i,e.history,v,E,he,p,H?[]:n,H===!0,J,ue,z,I,A,oe,s,e.patchRoutesOnNavigation!=null,l.branches,j,Z);if(m=++me,!e.dataStrategy&&!we.some(ee=>ee.shouldLoad)&&!we.some(ee=>ee.route.middleware&&ee.route.middleware.length>0)&&Ee.length===0){let ee=new Map(v.fetchers),Re=Xr(ee);return rt(p,{matches:E,loaderData:{},errors:j&&Se(j[1])?{[j[0]]:j[1].error}:null,...Pn(j),...Re?{fetchers:ee}:{}},{flushSync:G}),{shortCircuited:!0}}if(se){let ee={};if(!F){ee.navigation=ne;let Re=Vr(j);Re!==void 0&&(ee.actionData=Re)}Ee.length>0&&(ee.fetchers=Ba(Ee)),pe(ee,{flushSync:G})}Ee.forEach(ee=>{je(ee.key),ee.controller&&re.set(ee.key,ee.controller)});let dt=()=>Ee.forEach(ee=>je(ee.key));K&&K.signal.addEventListener("abort",dt);let{loaderResults:He,fetcherResults:nt}=await Jr(we,Ee,d,p,L);if(d.signal.aborted)return{shortCircuited:!0};K&&K.signal.removeEventListener("abort",dt),Ee.forEach(ee=>re.delete(ee.key));let ze=At(He);if(ze)return await Xe(d,ze.result,!0,{replace:$}),{shortCircuited:!0};if(ze=At(nt),ze)return A.add(ze.key),await Xe(d,ze.result,!0,{replace:$}),{shortCircuited:!0};let Oe=new Map(v.fetchers),{loaderData:ir,errors:Be}=Ln(v,E,He,j,Ee,nt,Oe);H&&v.errors&&(Be={...v.errors,...Be});let _t=Xr(Oe),Dt=Kr(m,Oe),Ot=_t||Dt||Ee.length>0;return{matches:E,loaderData:ir,errors:Be,...Ot?{workingFetchers:Oe}:{}}}function Vr(d){if(d&&!Se(d[1]))return{[d[0]]:d[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function Ba(d){let p=new Map(v.fetchers);return d.forEach(E=>{let S=p.get(E.key),L=ht(void 0,S?S.data:void 0);p.set(E.key,L)}),p}async function Wa(d,p,E,S){je(d);let L=(S&&S.flushSync)===!0,F=l.activeRoutes,N=vr(v.location,v.matches,s,E,p,S==null?void 0:S.relative),B=Pe(F,N,s,!1,l.branches),_=Tt(B,F,N);if(_.active&&_.matches&&(B=_.matches),!B){$e(d,p,Te(404,{pathname:N}),{flushSync:L});return}let{path:$,submission:H,error:G}=yn(!0,N,S);if(G){$e(d,p,G,{flushSync:L});return}let j=e.getContext?await e.getContext():new cn,Z=(S&&S.preventScrollReset)===!0;if(H&&ye(H.formMethod)){await Ya(d,p,$,B,j,_.active,L,Z,H,S&&S.defaultShouldRevalidate);return}I.set(d,{routeId:p,path:$}),await Va(d,p,$,B,j,_.active,L,Z,H)}async function Ya(d,p,E,S,L,F,N,B,_,$){nr(),I.delete(d);let H=v.fetchers.get(d);Ne(d,pi(_,H),{flushSync:N});let G=new AbortController,j=it(e.history,E,G.signal,_);if(F){let le=await Mt(S,new URL(j.url).pathname,j.signal,d);if(le.type==="aborted")return;if(le.type==="error"){$e(d,p,le.error,{flushSync:N});return}else if(le.matches)S=le.matches;else{$e(d,p,Te(404,{pathname:E}),{flushSync:N});return}}let Z=Ht(S,E);if(!Z.route.action&&!Z.route.lazy){let le=Te(405,{method:_.formMethod,pathname:E,routeId:p});$e(d,p,le,{flushSync:N});return}re.set(d,G);let ne=me,he=st(o,i,j,E,S,Z,n,L),se=await ct(j,E,he,L,d),oe=se[Z.route.id];if(!oe){for(let le of he)if(se[le.route.id]){oe=se[le.route.id];break}}if(j.signal.aborted){re.get(d)===G&&re.delete(d);return}if(z.has(d)){if(Qe(oe)||Se(oe)){Ne(d,Ie(void 0));return}}else{if(Qe(oe))if(re.delete(d),m>ne){Ne(d,Ie(void 0));return}else return A.add(d),Ne(d,ht(_)),Xe(j,oe,!1,{fetcherSubmission:_,preventScrollReset:B});if(Se(oe)){$e(d,p,oe.error);return}}let we=v.navigation.location||v.location,Ee=it(e.history,we,G.signal),dt=l.activeRoutes,He=v.navigation.state!=="idle"?Pe(dt,v.navigation.location,s,!1,l.branches):v.matches;X(He,"Didn't find any matches after fetcher action");let nt=++me;x.set(d,nt);let{dsMatches:ze,revalidatingFetchers:Oe}=vn(Ee,L,o,i,e.history,v,He,_,we,n,!1,J,ue,z,I,A,dt,s,e.patchRoutesOnNavigation!=null,l.branches,[Z.route.id,oe],$),ir=ht(_,oe.data),Be=new Map(v.fetchers);Be.set(d,ir),Oe.filter(le=>le.key!==d).forEach(le=>{let Ke=le.key,nn=Be.get(Ke),to=ht(void 0,nn?nn.data:void 0);Be.set(Ke,to),je(Ke),le.controller&&re.set(Ke,le.controller)}),pe({fetchers:Be});let _t=()=>Oe.forEach(le=>je(le.key));G.signal.addEventListener("abort",_t);let{loaderResults:Dt,fetcherResults:Ot}=await Jr(ze,Oe,Ee,we,L);if(G.signal.aborted)return;G.signal.removeEventListener("abort",_t),x.delete(d),re.delete(d),Oe.forEach(le=>re.delete(le.key));let ee=v.fetchers.has(d),Re=le=>{if(!ee)return le;let Ke=new Map(le.fetchers);return Ke.set(d,Ie(oe.data)),{...le,fetchers:Ke}},ke=At(Dt);if(ke)return v=Re(v),Xe(Ee,ke.result,!1,{preventScrollReset:B});if(ke=At(Ot),ke)return A.add(ke.key),v=Re(v),Xe(Ee,ke.result,!1,{preventScrollReset:B});let Ue=new Map(v.fetchers);ee&&Ue.set(d,Ie(oe.data));let{loaderData:rn,errors:lr}=Ln(v,He,Dt,void 0,Oe,Ot,Ue);Kr(nt,Ue),v.navigation.state==="loading"&&nt>m?(X(Y,"Expected pending action"),K&&K.abort(),rt(v.navigation.location,{matches:He,loaderData:rn,errors:lr,fetchers:Ue})):(pe({errors:lr,loaderData:Cn(v.loaderData,rn,He,lr),fetchers:Ue}),J=!1)}async function Va(d,p,E,S,L,F,N,B,_){let $=v.fetchers.get(d);Ne(d,ht(_,$?$.data:void 0),{flushSync:N});let H=new AbortController,G=it(e.history,E,H.signal);if(F){let oe=await Mt(S,new URL(G.url).pathname,G.signal,d);if(oe.type==="aborted")return;if(oe.type==="error"){$e(d,p,oe.error,{flushSync:N});return}else if(oe.matches)S=oe.matches;else{$e(d,p,Te(404,{pathname:E}),{flushSync:N});return}}let j=Ht(S,E);re.set(d,H);let Z=me,ne=st(o,i,G,E,S,j,n,L),he=await ct(G,E,ne,L,d),se=he[j.route.id];if(!se){for(let oe of S)if(he[oe.route.id]){se=he[oe.route.id];break}}if(re.get(d)===H&&re.delete(d),!G.signal.aborted){if(z.has(d)){Ne(d,Ie(void 0));return}if(Qe(se))if(m>Z){Ne(d,Ie(void 0));return}else{A.add(d),await Xe(G,se,!1,{preventScrollReset:B});return}if(Se(se)){$e(d,p,se.error);return}Ne(d,Ie(se.data))}}async function Xe(d,p,E,{submission:S,fetcherSubmission:L,preventScrollReset:F,replace:N}={}){E||(U==null||U.resolve(),U=null),p.response.headers.has("X-Remix-Revalidate")&&(J=!0);let B=p.response.headers.get("Location");X(B,"Expected a Location header on the redirect Response"),B=Sn(B,new URL(d.url),s,e.history);let _=wt(v.location,B,{_isRedirect:!0});if(r){let ne=!1;if(p.response.headers.has("X-Remix-Reload-Document"))ne=!0;else if(Tr(B)){const he=Bn(t,B,!0);ne=he.origin!==t.location.origin||Le(he.pathname,s)==null}if(ne){N?t.location.replace(B):t.location.assign(B);return}}K=null;let $=N===!0||p.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:H,formAction:G,formEncType:j}=v.navigation;!S&&!L&&H&&G&&j&&(S=Tn(v.navigation));let Z=S||L;if(Wo.has(p.response.status)&&Z&&ye(Z.formMethod))await Ge($,_,{submission:{...Z,formAction:B},preventScrollReset:F||ae,enableViewTransition:E?ie:void 0});else{let ne=dr(_,[],$,S);await Ge($,_,{overrideNavigation:ne,fetcherSubmission:L,preventScrollReset:F||ae,enableViewTransition:E?ie:void 0})}}async function ct(d,p,E,S,L){var B;let F,N={};try{F=await ei(u,d,p,E,L,S,!1)}catch(_){return E.filter($=>$.shouldLoad).forEach($=>{N[$.route.id]={type:"error",error:_}}),N}if(d.signal.aborted)return N;if(!ye(d.method))for(let _ of E){if(((B=F[_.route.id])==null?void 0:B.type)==="error")break;!F.hasOwnProperty(_.route.id)&&!v.loaderData.hasOwnProperty(_.route.id)&&(!v.errors||!v.errors.hasOwnProperty(_.route.id))&&_.shouldCallHandler()&&(F[_.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${_.route.id}`)})}for(let[_,$]of Object.entries(F))if(ci($)){let H=$.result;N[_]={type:"redirect",response:ai(H,d,_,E,s)}}else N[_]=await ni($);return N}async function Jr(d,p,E,S,L){let F=ct(E,S,d,L,null),N=Promise.all(p.map(async $=>{if($.matches&&$.match&&$.request&&$.controller){let G=(await ct($.request,$.path,$.matches,L,$.key))[$.match.route.id];return{[$.key]:G}}else return Promise.resolve({[$.key]:{type:"error",error:Te(404,{pathname:$.path})}})})),B=await F,_=(await N).reduce(($,H)=>Object.assign($,H),{});return{loaderResults:B,fetcherResults:_}}function nr(){J=!0,I.forEach((d,p)=>{re.has(p)&&ue.add(p),je(p)})}function Ne(d,p,E={}){let S=new Map(v.fetchers);S.set(d,p),pe({fetchers:S},{flushSync:(E&&E.flushSync)===!0})}function $e(d,p,E,S={}){let L=Ye(v.matches,p),F=new Map(v.fetchers);ar(F,d),pe({errors:{[L.route.id]:E},fetchers:F},{flushSync:(S&&S.flushSync)===!0})}function Ja(d){return V.set(d,(V.get(d)||0)+1),z.has(d)&&z.delete(d),v.fetchers.get(d)||Yo}function Ga(d,p){je(d,p==null?void 0:p.reason),Ne(d,Ie(null))}function ar(d,p){let E=v.fetchers.get(p);re.has(p)&&!(E&&E.state==="loading"&&x.has(p))&&je(p),I.delete(p),x.delete(p),A.delete(p),z.delete(p),ue.delete(p),d.delete(p)}function Xa(d){let p=(V.get(d)||0)-1;p<=0?(V.delete(d),z.add(d)):V.set(d,p),pe({fetchers:new Map(v.fetchers)})}function je(d,p){let E=re.get(d);E&&(E.abort(p),re.delete(d))}function Gr(d,p){for(let E of d){let S=p.get(E);X(S,`Expected fetcher: ${E}`);let L=Ie(S.data);p.set(E,L)}}function Xr(d){let p=[],E=!1;for(let S of A){let L=d.get(S);X(L,`Expected fetcher: ${S}`),L.state==="loading"&&(A.delete(S),p.push(S),E=!0)}return Gr(p,d),E}function Kr(d,p){let E=[];for(let[S,L]of x)if(L<d){let F=p.get(S);X(F,`Expected fetcher: ${S}`),F.state==="loading"&&(je(S),x.delete(S),E.push(S))}return Gr(E,p),E.length>0}function Ka(d,p){let E=v.blockers.get(d)||ft;return q.get(d)!==p&&q.set(d,p),E}function qr(d){v.blockers.delete(d),q.delete(d)}function Pt(d,p){let E=v.blockers.get(d)||ft;X(E.state==="unblocked"&&p.state==="blocked"||E.state==="blocked"&&p.state==="blocked"||E.state==="blocked"&&p.state==="proceeding"||E.state==="blocked"&&p.state==="unblocked"||E.state==="proceeding"&&p.state==="unblocked",`Invalid blocker state transition: ${E.state} -> ${p.state}`);let S=new Map(v.blockers);S.set(d,p),pe({blockers:S})}function Qr({currentLocation:d,nextLocation:p,historyAction:E}){if(q.size===0)return;q.size>1&&de(!1,"A router only supports one blocker at a time");let S=Array.from(q.entries()),[L,F]=S[S.length-1],N=v.blockers.get(L);if(!(N&&N.state==="proceeding")&&F({currentLocation:d,nextLocation:p,historyAction:E}))return L}function or(d){let p=Te(404,{pathname:d}),E=l.activeRoutes,{matches:S,route:L}=kt(E);return{notFoundMatches:S,route:L,error:p}}function qa(d,p,E){if(R=d,w=p,b=E||null,!M&&v.navigation===cr){M=!0;let S=en(v.location,v.matches);S!=null&&pe({restoreScrollPosition:S})}return()=>{R=null,w=null,b=null}}function Zr(d,p){return b&&b(d,p.map(S=>Yn(S,v.loaderData)))||d.key}function Qa(d,p){if(R&&w){let E=Zr(d,p);R[E]=w()}}function en(d,p){if(R){let E=Zr(d,p),S=R[E];if(typeof S=="number")return S}return null}function Tt(d,p,E){if(e.patchRoutesOnNavigation){let S=l.branches;if(d){if(Object.keys(d[0].params).length>0)return{active:!0,matches:Pe(p,E,s,!0,S)}}else return{active:!0,matches:Pe(p,E,s,!0,S)||[]}}return{active:!1,matches:null}}async function Mt(d,p,E,S){if(!e.patchRoutesOnNavigation)return{type:"success",matches:d};let L=d;for(;;){let F=i;try{await e.patchRoutesOnNavigation({signal:E,path:p,matches:L,fetcherKey:S,patch:($,H)=>{E.aborted||gn($,H,l,F,o,!1)}})}catch($){return{type:"error",error:$,partialMatches:L}}if(E.aborted)return{type:"aborted"};let N=l.branches,B=Pe(l.activeRoutes,p,s,!1,N),_=null;if(B){if(Object.keys(B[0].params).length===0)return{type:"success",matches:B};if(_=Pe(l.activeRoutes,p,s,!0,N),!(_&&L.length<_.length&&tn(L,_.slice(0,L.length))))return{type:"success",matches:B}}if(_||(_=Pe(l.activeRoutes,p,s,!0,N)),!_||tn(L,_))return{type:"success",matches:null};L=_}}function tn(d,p){return d.length===p.length&&d.every((E,S)=>E.route.id===p[S].route.id)}function Za(d){i={},l.setHmrRoutes(Et(d,o,void 0,i))}function eo(d,p,E=!1){gn(d,p,l,i,o,E),l.hasHMRRoutes||pe({})}return T={get basename(){return s},get future(){return f},get state(){return v},get routes(){return l.stableRoutes},get branches(){return l.branches},get manifest(){return i},get window(){return t},initialize:rr,subscribe:ja,enableScrollRestoration:qa,navigate:Yr,fetch:Wa,revalidate:Ua,createHref:d=>e.history.createHref(d),encodeLocation:d=>e.history.encodeLocation(d),getFetcher:Ja,resetFetcher:Ga,deleteFetcher:Xa,dispose:$a,getBlocker:Ka,deleteBlocker:qr,patchRoutes:eo,_internalFetchControllers:re,_internalSetRoutes:Za,_internalSetStateDoNotUseOrYouWillBreakYourApp(d){pe(d)}},e.instrumentations&&(T=Fo(T,e.instrumentations.map(d=>d.router).filter(Boolean))),T}function Go(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function vr(e,t,r,n,a,o){let i,l;if(a){i=[];for(let u of t)if(i.push(u),u.route.id===a){l=u;break}}else i=t,l=t[t.length-1];let s=Xt(n||".",Mr(i),Le(e.pathname,r)||e.pathname,o==="path");if(n==null&&(s.search=e.search,s.hash=e.hash),(n==null||n===""||n===".")&&l){let u=Or(s.search);if(l.route.index&&!u)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&u){let f=new URLSearchParams(s.search),c=f.getAll("index");f.delete("index"),c.filter(g=>g).forEach(g=>f.append("index",g));let y=f.toString();s.search=y?`?${y}`:""}}return r!=="/"&&(s.pathname=Po({basename:r,pathname:s.pathname})),_e(s)}function yn(e,t,r){if(!r||!Go(r))return{path:t};if(r.formMethod&&!hi(r.formMethod))return{path:t,error:Te(405,{method:r.formMethod})};let n=()=>({path:t,error:Te(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=da(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ye(o))return n();let c=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,[g,R])=>`${y}${g}=${R}
19
+ `,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:c}}}else if(r.formEncType==="application/json"){if(!ye(o))return n();try{let c=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:c,text:void 0}}}catch{return n()}}}X(typeof FormData=="function","FormData is not available in this environment");let l,s;if(r.formData)l=wr(r.formData),s=r.formData;else if(r.body instanceof FormData)l=wr(r.body),s=r.body;else if(r.body instanceof URLSearchParams)l=r.body,s=xn(l);else if(r.body==null)l=new URLSearchParams,s=new FormData;else try{l=new URLSearchParams(r.body),s=xn(l)}catch{return n()}let u={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(ye(u.formMethod))return{path:t,submission:u};let f=Fe(t);return e&&f.search&&Or(f.search)&&l.append("index",""),f.search=`?${l}`,{path:_e(f),submission:u}}function vn(e,t,r,n,a,o,i,l,s,u,f,c,y,g,R,b,w,M,C,k,O,P){var fe;let D=O?Se(O[1])?O[1].error:O[1].data:void 0,T=a.createURL(o.location),v=a.createURL(s),Y;if(f&&o.errors){let J=Object.keys(o.errors)[0];Y=i.findIndex(ue=>ue.route.id===J)}else if(O&&Se(O[1])){let J=O[0];Y=i.findIndex(ue=>ue.route.id===J)-1}let U=O?O[1].statusCode:void 0,ae=U&&U>=400,K={currentUrl:T,currentParams:((fe=o.matches[0])==null?void 0:fe.params)||{},nextUrl:v,nextParams:i[0].params,...l,actionResult:D,actionStatus:U},ie=bt(i),Q=i.map((J,ue)=>{let{route:re}=J,me=null;if(Y!=null&&ue>Y)me=!1;else if(re.lazy)me=!0;else if(!Dr(re))me=!1;else if(f){let{shouldLoad:I}=aa(re,o.loaderData,o.errors);me=I}else Xo(o.loaderData,o.matches[ue],J)&&(me=!0);if(me!==null)return gr(r,n,e,s,ie,J,u,t,me);let m=!1;typeof P=="boolean"?m=P:ae?m=!1:(c||T.pathname+T.search===v.pathname+v.search||T.search!==v.search||Ko(o.matches[ue],J))&&(m=!0);let x={...K,defaultShouldRevalidate:m},A=gt(J,x);return gr(r,n,e,s,ie,J,u,t,A,x,P)}),te=[];return R.forEach((J,ue)=>{if(f||!i.some(z=>z.route.id===J.routeId)||g.has(ue))return;let re=o.fetchers.get(ue),me=re&&re.state!=="idle"&&re.data===void 0,m=Pe(w,J.path,M??"/",!1,k);if(!m){if(C&&me)return;te.push({key:ue,routeId:J.routeId,path:J.path,matches:null,match:null,request:null,controller:null});return}if(b.has(ue))return;let x=Ht(m,J.path),A=new AbortController,I=it(a,J.path,A.signal),V=null;if(y.has(ue))y.delete(ue),V=st(r,n,I,J.path,m,x,u,t);else if(me)c&&(V=st(r,n,I,J.path,m,x,u,t));else{let z;typeof P=="boolean"?z=P:ae?z=!1:z=c;let q={...K,defaultShouldRevalidate:z};gt(x,q)&&(V=st(r,n,I,J.path,m,x,u,t,q))}V&&te.push({key:ue,routeId:J.routeId,path:J.path,matches:V,match:x,request:I,controller:A})}),{dsMatches:Q,revalidatingFetchers:te}}function Dr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function aa(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Dr(e))return{shouldLoad:!1,renderFallback:!1};let n=t!=null&&e.id in t,a=r!=null&&r[e.id]!==void 0;if(!n&&a)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!n};let o=!n&&!a;return{shouldLoad:o,renderFallback:o}}function Xo(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}function Ko(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function gt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function gn(e,t,r,n,a,o){let i;if(e){let u=n[e];X(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),i=u.children}else i=r.activeRoutes;let l=[],s=[];if(t.forEach(u=>{let f=i.find(c=>oa(u,c));f?s.push({existingRoute:f,newRoute:u}):l.push(u)}),l.length>0){let u=Et(l,a,[e||"_","patch",String((i==null?void 0:i.length)||"0")],n);i.push(...u)}if(o&&s.length>0)for(let u=0;u<s.length;u++){let{existingRoute:f,newRoute:c}=s[u],y=f,[g]=Et([c],a,[],{},!0);Object.assign(y,{element:g.element?g.element:y.element,errorElement:g.errorElement?g.errorElement:y.errorElement,hydrateFallbackElement:g.hydrateFallbackElement?g.hydrateFallbackElement:y.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function oa(e,t){var r;return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:((r=e.children)==null?void 0:r.every((n,a)=>{var o;return(o=t.children)==null?void 0:o.some(i=>oa(n,i))}))??!1:!1}var wn=new WeakMap,ia=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(X(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let o=a.lazy[e];if(!o)return;let i=wn.get(a);i||(i={},wn.set(a,i));let l=i[e];if(l)return l;let s=(async()=>{let u=fo(e),c=a[e]!==void 0&&e!=="hasErrorBoundary";if(u)de(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(c)de(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let y=await o();y!=null&&(Object.assign(a,{[e]:y}),Object.assign(a,n(a)))}typeof a.lazy=="object"&&(a.lazy[e]=void 0,Object.values(a.lazy).every(y=>y===void 0)&&(a.lazy=void 0))})();return i[e]=s,s},En=new WeakMap;function qo(e,t,r,n,a){let o=r[e.id];if(X(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let f=En.get(o);if(f)return{lazyRoutePromise:f,lazyHandlerPromise:f};let c=(async()=>{X(typeof e.lazy=="function","No lazy route function found");let y=await e.lazy(),g={};for(let R in y){let b=y[R];if(b===void 0)continue;let w=mo(R),C=o[R]!==void 0&&R!=="hasErrorBoundary";w?de(!w,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):C?de(!C,`Route "${o.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):g[R]=b}Object.assign(o,g),Object.assign(o,{...n(o),lazy:void 0})})();return En.set(o,c),c.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:c}}let i=Object.keys(e.lazy),l=[],s;for(let f of i){if(a&&a.includes(f))continue;let c=ia({key:f,route:e,manifest:r,mapRouteProperties:n});c&&(l.push(c),f===t&&(s=c))}let u=l.length>0?Promise.all(l).then(()=>{}):void 0;return u==null||u.catch(()=>{}),s==null||s.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:s}}async function Rn(e){let t=e.matches.filter(a=>a.shouldLoad),r={};return(await Promise.all(t.map(a=>a.resolve()))).forEach((a,o)=>{r[t[o].route.id]=a}),r}async function Qo(e){return e.matches.some(t=>t.route.middleware)?la(e,()=>Rn(e)):Rn(e)}function la(e,t){return Zo(e,t,n=>{if(fi(n))throw n;return n},si,r);function r(n,a,o){if(o)return Promise.resolve(Object.assign(o.value,{[a]:{type:"error",result:n}}));{let{matches:i}=e,l=Math.min(Math.max(i.findIndex(u=>u.route.id===a),0),Math.max(i.findIndex(u=>u.shouldCallHandler()),0)),s=Ye(i,i[l].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:n}})}}}async function Zo(e,t,r,n,a){let{matches:o,...i}=e,l=o.flatMap(u=>u.route.middleware?u.route.middleware.map(f=>[u.route.id,f]):[]);return await sa(i,l,t,r,n,a)}async function sa(e,t,r,n,a,o,i=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let s=t[i];if(!s)return await r();let[u,f]=s,c,y=async()=>{if(c)throw new Error("You may only call `next()` once per middleware");try{return c={value:await sa(e,t,r,n,a,o,i+1)},c.value}catch(g){return c={value:await o(g,u,c)},c.value}};try{let g=await f(e,y),R=g!=null?n(g):void 0;return a(R)?R:c?R??c.value:(c={value:await y()},c.value)}catch(g){return await o(g,u,c)}}function ua(e,t,r,n,a){let o=ia({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=qo(n.route,ye(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function gr(e,t,r,n,a,o,i,l,s,u=null,f){let c=!1,y=ua(e,t,r,o,i);return{...o,_lazyPromises:y,shouldLoad:s,shouldRevalidateArgs:u,shouldCallHandler(g){return c=!0,u?typeof f=="boolean"?gt(o,{...u,defaultShouldRevalidate:f}):typeof g=="boolean"?gt(o,{...u,defaultShouldRevalidate:g}):gt(o,u):s},resolve(g){let{lazy:R,loader:b,middleware:w}=o.route,M=c||s||g&&!ye(r.method)&&(R||b),C=w&&w.length>0&&!b&&!R;return M&&(ye(r.method)||!C)?ti({request:r,path:n,pattern:a,match:o,lazyHandlerPromise:y==null?void 0:y.handler,lazyRoutePromise:y==null?void 0:y.route,handlerOverride:g,scopedContext:l}):Promise.resolve({type:"data",result:void 0})}}}function st(e,t,r,n,a,o,i,l,s=null){return a.map(u=>u.route.id!==o.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:ua(e,t,r,u,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:gr(e,t,r,n,bt(a),u,i,l,!0,s))}async function ei(e,t,r,n,a,o,i){n.some(f=>{var c;return(c=f._lazyPromises)==null?void 0:c.middleware})&&await Promise.all(n.map(f=>{var c;return(c=f._lazyPromises)==null?void 0:c.middleware}));let l={request:t,url:ca(t,r),pattern:bt(n),params:n[0].params,context:o,matches:n},u=await e({...l,fetcherKey:a,runClientMiddleware:f=>{let c=l;return la(c,()=>f({...c,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(f=>{var c,y;return[(c=f._lazyPromises)==null?void 0:c.handler,(y=f._lazyPromises)==null?void 0:y.route]}))}catch{}return u}async function ti({request:e,path:t,pattern:r,match:n,lazyHandlerPromise:a,lazyRoutePromise:o,handlerOverride:i,scopedContext:l}){let s,u,f=ye(e.method),c=f?"action":"loader",y=g=>{let R,b=new Promise((C,k)=>R=k);u=()=>R(),e.signal.addEventListener("abort",u);let w=C=>typeof g!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${c}" [routeId: ${n.route.id}]`)):g({request:e,url:ca(e,t),pattern:r,params:n.params,context:l},...C!==void 0?[C]:[]),M=(async()=>{try{return{type:"data",result:await(i?i(k=>w(k)):w())}}catch(C){return{type:"error",result:C}}})();return Promise.race([M,b])};try{let g=f?n.route.action:n.route.loader;if(a||o)if(g){let R,[b]=await Promise.all([y(g).catch(w=>{R=w}),a,o]);if(R!==void 0)throw R;s=b}else{await a;let R=f?n.route.action:n.route.loader;if(R)[s]=await Promise.all([y(R),o]);else if(c==="action"){let b=new URL(e.url),w=b.pathname+b.search;throw Te(405,{method:e.method,pathname:w,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(g)s=await y(g);else{let R=new URL(e.url),b=R.pathname+R.search;throw Te(404,{pathname:b})}}catch(g){return{type:"error",result:g}}finally{u&&e.signal.removeEventListener("abort",u)}return s}async function ri(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function ni(e){var n,a,o,i,l;let{result:t,type:r}=e;if(Kt(t)){let s;try{s=await ri(t)}catch(u){return{type:"error",error:u}}return r==="error"?{type:"error",error:new Je(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:"data",data:s,statusCode:t.status,headers:t.headers}}return r==="error"?Er(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:(n=t.init)==null?void 0:n.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}:{type:"error",error:li(t),statusCode:Ze(t)?t.status:void 0,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Ze(t)?t.status:void 0}:Er(t)?{type:"data",data:t.data,statusCode:(i=t.init)==null?void 0:i.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function ai(e,t,r,n,a){let o=e.headers.get("Location");if(X(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Tr(o)){let i=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=vr(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}var bn=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Sn(e,t,r,n){if(Tr(e)){let a=e,o=a.startsWith("//")?new URL(t.protocol+a):new URL(a);if(bn.includes(o.protocol))throw new Error("Invalid redirect location");let i=Le(o.pathname,r)!=null;if(o.origin===t.origin&&i)return _r(o.pathname)+o.search+o.hash}try{let a=n.createURL(e);if(bn.includes(a.protocol))throw new Error("Invalid redirect location")}catch{}return e}function it(e,t,r,n){let a=e.createURL(da(t)).toString(),o={signal:r};if(n&&ye(n.formMethod)){let{formMethod:i,formEncType:l}=n;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(n.json)):l==="text/plain"?o.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?o.body=wr(n.formData):o.body=n.formData}return new Request(a,o)}function ca(e,t){let r=new URL(e.url),n=typeof t=="string"?Fe(t):t;if(r.pathname=n.pathname||"/",n.search){let a=new URLSearchParams(n.search),o=a.getAll("index");a.delete("index");for(let i of o.filter(Boolean))a.append("index",i);r.search=a.size?`?${a.toString()}`:""}else r.search="";return r.hash=n.hash||"",r}function wr(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function xn(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function oi(e,t,r,n=!1,a=!1){let o={},i=null,l,s=!1,u={},f=r&&Se(r[1])?r[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let y=c.route.id,g=t[y];if(X(!Qe(g),"Cannot handle redirect results in processLoaderData"),Se(g)){let R=g.error;if(f!==void 0&&(R=f,f=void 0),i=i||{},a)i[y]=R;else{let b=Ye(e,y);i[b.route.id]==null&&(i[b.route.id]=R)}n||(o[y]=na),s||(s=!0,l=Ze(g.error)?g.error.status:500),g.headers&&(u[y]=g.headers)}else o[y]=g.data,g.statusCode&&g.statusCode!==200&&!s&&(l=g.statusCode),g.headers&&(u[y]=g.headers)}),f!==void 0&&r&&(i={[r[0]]:f},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:l||200,loaderHeaders:u}}function Ln(e,t,r,n,a,o,i){let{loaderData:l,errors:s}=oi(t,r,n);return a.filter(u=>!u.matches||u.matches.some(f=>f.shouldLoad)).forEach(u=>{let{key:f,match:c,controller:y}=u;if(y&&y.signal.aborted)return;let g=o[f];if(X(g,"Did not find corresponding fetcher result"),Se(g)){let R=Ye(e.matches,c==null?void 0:c.route.id);s&&s[R.route.id]||(s={...s,[R.route.id]:g.error}),i.delete(f)}else if(Qe(g))X(!1,"Unhandled fetcher revalidation redirect");else{let R=Ie(g.data);i.set(f,R)}}),{loaderData:l,errors:s}}function Cn(e,t,r,n){let a=Object.entries(t).filter(([,o])=>o!==na).reduce((o,[i,l])=>(o[i]=l,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function Pn(e){return e?Se(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ye(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function kt(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Te(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",n&&t&&r?l=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:a==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",l=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",n&&t&&r?l=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(l=`Invalid request method "${n.toUpperCase()}"`)),new Je(e||500,i,new Error(l),!0)}function At(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Qe(a))return{key:n,result:a}}}function da(e){let t=typeof e=="string"?Fe(e):e;return _e({...t,hash:""})}function ii(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function li(e){var t,r;return new Je(((t=e.init)==null?void 0:t.status)??500,((r=e.init)==null?void 0:r.statusText)??"Internal Server Error",e.data)}function si(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&ui(r))}function ui(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function ci(e){return Kt(e.result)&&ta.has(e.result.status)}function Se(e){return e.type==="error"}function Qe(e){return(e&&e.type)==="redirect"}function Er(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Kt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function di(e){return ta.has(e)}function fi(e){return Kt(e)&&di(e.status)&&e.headers.has("Location")}function hi(e){return Bo.has(e.toUpperCase())}function ye(e){return Ho.has(e.toUpperCase())}function Or(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ht(e,t){let r=typeof t=="string"?Fe(t).search:t.search;if(e[e.length-1].route.index&&Or(r||""))return e[e.length-1];let n=Kn(e);return n[n.length-1]}function Tn(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function dr(e,t,r,n){return n?{state:"loading",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,matches:t,historyAction:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function mi(e,t,r,n){return{state:"submitting",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function ht(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 pi(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 Ie(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 yi(e,t){try{let r=e.sessionStorage.getItem(ra);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function vi(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(ra,JSON.stringify(r))}catch(n){de(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function Mn(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var et=h.createContext(null);et.displayName="DataRouter";var ut=h.createContext(null);ut.displayName="DataRouterState";var fa=h.createContext(!1);function kr(){return h.useContext(fa)}var Ar=h.createContext({isTransitioning:!1});Ar.displayName="ViewTransition";var ha=h.createContext(new Map);ha.displayName="Fetchers";var gi=h.createContext(null);gi.displayName="Await";var be=h.createContext(null);be.displayName="Navigation";var qt=h.createContext(null);qt.displayName="Location";var De=h.createContext({outlet:null,matches:[],isDataRoute:!1});De.displayName="Route";var Ir=h.createContext(null);Ir.displayName="RouteError";var ma="REACT_ROUTER_ERROR",wi="REDIRECT",Ei="ROUTE_ERROR_RESPONSE";function Ri(e){if(e.startsWith(`${ma}:${wi}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function bi(e){if(e.startsWith(`${ma}:${Ei}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Je(t.status,t.statusText,t.data)}catch{}}function Si(e,{relative:t}={}){X(St(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=h.useContext(be),{hash:a,pathname:o,search:i}=xt(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:xe([r,o])),n.createHref({pathname:l,search:i,hash:a})}function St(){return h.useContext(qt)!=null}function Me(){return X(St(),"useLocation() may be used only in the context of a <Router> component."),h.useContext(qt).location}var pa="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ya(e){h.useContext(be).static||h.useLayoutEffect(e)}function xi(){let{isDataRoute:e}=h.useContext(De);return e?Hi():Li()}function Li(){X(St(),"useNavigate() may be used only in the context of a <Router> component.");let e=h.useContext(et),{basename:t,navigator:r}=h.useContext(be),{matches:n}=h.useContext(De),{pathname:a}=Me(),o=JSON.stringify(Mr(n)),i=h.useRef(!1);return ya(()=>{i.current=!0}),h.useCallback((s,u={})=>{if(de(i.current,pa),!i.current)return;if(typeof s=="number"){r.go(s);return}let f=Xt(s,JSON.parse(o),a,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:xe([t,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[t,r,o,a,e])}var Ci=h.createContext(null);function Pi(e){let t=h.useContext(De).outlet;return h.useMemo(()=>t&&h.createElement(Ci.Provider,{value:e},t),[t,e])}function Ti(){let{matches:e}=h.useContext(De),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function xt(e,{relative:t}={}){let{matches:r}=h.useContext(De),{pathname:n}=Me(),a=JSON.stringify(Mr(r));return h.useMemo(()=>Xt(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function Mi(e,t,r){X(St(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=h.useContext(be),{matches:a}=h.useContext(De),o=a[a.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;{let w=u&&u.path||"";wa(l,!u||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
20
+
21
+ Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let f=Me(),c;c=f;let y=c.pathname||"/",g=y;if(s!=="/"){let w=s.replace(/^\//,"").split("/");g="/"+y.replace(/^\//,"").split("/").slice(w.length).join("/")}let R=r&&r.state.matches.length?r.state.matches.map(w=>Object.assign(w,{route:r.manifest[w.route.id]||w.route})):Wn(e,{pathname:g});return de(u||R!=null,`No routes matched location "${c.pathname}${c.search}${c.hash}" `),de(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${c.pathname}${c.search}${c.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Ai(R&&R.map(w=>Object.assign({},w,{params:Object.assign({},i,w.params),pathname:xe([s,n.encodeLocation?n.encodeLocation(w.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?s:xe([s,n.encodeLocation?n.encodeLocation(w.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),a,r)}function _i(){let e=ga(),t=Ze(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=h.createElement(h.Fragment,null,h.createElement("p",null,"💿 Hey developer 👋"),h.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",h.createElement("code",{style:o},"ErrorBoundary")," or"," ",h.createElement("code",{style:o},"errorElement")," prop on your route.")),h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),r?h.createElement("pre",{style:a},r):null,i)}var Di=h.createElement(_i,null),va=class extends h.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||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=bi(e.digest);r&&(e=r)}let t=e!==void 0?h.createElement(De.Provider,{value:this.props.routeContext},h.createElement(Ir.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?h.createElement(Oi,{error:e},t):t}};va.contextType=fa;var fr=new WeakMap;function Oi({children:e,error:t}){let{basename:r}=h.useContext(be);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=Ri(t.digest);if(n){let a=fr.get(t);if(a)throw a;let o=Qn(n.location,r);if(qn&&!fr.get(t))if(o.isExternal||n.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw fr.set(t,i),i}return h.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function ki({routeContext:e,match:t,children:r}){let n=h.useContext(et);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),h.createElement(De.Provider,{value:e},r)}function Ai(e,t=[],r){let n=r==null?void 0:r.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n==null?void 0:n.errors;if(o!=null){let f=a.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id])!==void 0);X(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let i=!1,l=-1;if(r&&n){i=n.renderFallback;for(let f=0;f<a.length;f++){let c=a[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(l=f),c.route.id){let{loaderData:y,errors:g}=n,R=c.route.loader&&!y.hasOwnProperty(c.route.id)&&(!g||g[c.route.id]===void 0);if(c.route.lazy||R){r.isStatic&&(i=!0),l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}}let s=r==null?void 0:r.onError,u=n&&s?(f,c)=>{var y,g;s(f,{location:n.location,params:((g=(y=n.matches)==null?void 0:y[0])==null?void 0:g.params)??{},pattern:bt(n.matches),errorInfo:c})}:void 0;return a.reduceRight((f,c,y)=>{let g,R=!1,b=null,w=null;n&&(g=o&&c.route.id?o[c.route.id]:void 0,b=c.route.errorElement||Di,i&&(l<0&&y===0?(wa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,w=null):l===y&&(R=!0,w=c.route.hydrateFallbackElement||null)));let M=t.concat(a.slice(0,y+1)),C=()=>{let k;return g?k=b:R?k=w:c.route.Component?k=h.createElement(c.route.Component,null):c.route.element?k=c.route.element:k=f,h.createElement(ki,{match:c,routeContext:{outlet:f,matches:M,isDataRoute:n!=null},children:k})};return n&&(c.route.ErrorBoundary||c.route.errorElement||y===0)?h.createElement(va,{location:n.location,revalidation:n.revalidation,component:b,error:g,children:C(),routeContext:{outlet:null,matches:M,isDataRoute:!0},onError:u}):C()},null)}function Fr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ii(e){let t=h.useContext(et);return X(t,Fr(e)),t}function Lt(e){let t=h.useContext(ut);return X(t,Fr(e)),t}function Fi(e){let t=h.useContext(De);return X(t,Fr(e)),t}function Ct(e){let t=Fi(e),r=t.matches[t.matches.length-1];return X(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ni(){return Ct("useRouteId")}function $i(){let e=Lt("useNavigation");return h.useMemo(()=>{let{matches:t,historyAction:r,...n}=e.navigation;return n},[e.navigation])}function Nr(){let{matches:e,loaderData:t}=Lt("useMatches");return h.useMemo(()=>e.map(r=>Yn(r,t)),[e,t])}function ji(){let e=Lt("useLoaderData"),t=Ct("useLoaderData");return e.loaderData[t]}function Ui(){let e=Lt("useActionData"),t=Ct("useLoaderData");return e.actionData?e.actionData[t]:void 0}function ga(){var n;let e=h.useContext(Ir),t=Lt("useRouteError"),r=Ct("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Hi(){let{router:e}=Ii("useNavigate"),t=Ct("useNavigate"),r=h.useRef(!1);return ya(()=>{r.current=!0}),h.useCallback(async(a,o={})=>{de(r.current,pa),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var _n={};function wa(e,t,r){!t&&!_n[e]&&(_n[e]=!0,de(!1,r))}var Dn={};function Rr(e,t){!e&&!Dn[t]&&(Dn[t]=!0,console.warn(t))}var zi="useOptimistic",On=lo[zi],Bi=()=>{};function Wi(e){return On?On(e):[e,Bi]}function Ps(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&de(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:h.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&de(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:h.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&de(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:h.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Ts=["HydrateFallback","hydrateFallbackElement"],Yi=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function Ms({router:e,flushSync:t,onError:r,useTransitions:n}){n=kr()||n;let[o,i]=h.useState(e.state),[l,s]=Wi(o),[u,f]=h.useState(),[c,y]=h.useState({isTransitioning:!1}),[g,R]=h.useState(),[b,w]=h.useState(),[M,C]=h.useState(),k=h.useRef(new Map),O=h.useCallback((v,{deletedFetchers:Y,newErrors:U,flushSync:ae,viewTransitionOpts:K})=>{U&&r&&Object.values(U).forEach(Q=>{var te;return r(Q,{location:v.location,params:((te=v.matches[0])==null?void 0:te.params)??{},pattern:bt(v.matches)})}),v.fetchers.forEach((Q,te)=>{Q.data!==void 0&&k.current.set(te,Q.data)}),Y.forEach(Q=>k.current.delete(Q)),Rr(ae===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let ie=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Rr(K==null||ie,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!K||!ie){t&&ae?t(()=>i(v)):n===!1?i(v):h.startTransition(()=>{n===!0&&s(Q=>kn(Q,v)),i(v)});return}if(t&&ae){t(()=>{b&&(g==null||g.resolve(),b.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:K.currentLocation,nextLocation:K.nextLocation})});let Q=e.window.document.startViewTransition(()=>{t(()=>i(v))});Q.finished.finally(()=>{t(()=>{R(void 0),w(void 0),f(void 0),y({isTransitioning:!1})})}),t(()=>w(Q));return}b?(g==null||g.resolve(),b.skipTransition(),C({state:v,currentLocation:K.currentLocation,nextLocation:K.nextLocation})):(f(v),y({isTransitioning:!0,flushSync:!1,currentLocation:K.currentLocation,nextLocation:K.nextLocation}))},[e.window,t,b,g,n,s,r]);h.useLayoutEffect(()=>e.subscribe(O),[e,O]),h.useEffect(()=>{c.isTransitioning&&!c.flushSync&&R(new Yi)},[c]),h.useEffect(()=>{if(g&&u&&e.window){let v=u,Y=g.promise,U=e.window.document.startViewTransition(async()=>{n===!1?i(v):h.startTransition(()=>{n===!0&&s(ae=>kn(ae,v)),i(v)}),await Y});U.finished.finally(()=>{R(void 0),w(void 0),f(void 0),y({isTransitioning:!1})}),w(U)}},[u,g,e.window,n,s]),h.useEffect(()=>{g&&u&&l.location.key===u.location.key&&g.resolve()},[g,b,l.location,u]),h.useEffect(()=>{!c.isTransitioning&&M&&(f(M.state),y({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}),C(void 0))},[c.isTransitioning,M]);let P=h.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:v=>e.navigate(v),push:(v,Y,U)=>e.navigate(v,{state:Y,preventScrollReset:U==null?void 0:U.preventScrollReset}),replace:(v,Y,U)=>e.navigate(v,{replace:!0,state:Y,preventScrollReset:U==null?void 0:U.preventScrollReset})}),[e]),D=e.basename||"/",T=h.useMemo(()=>({router:e,navigator:P,static:!1,basename:D,onError:r}),[e,P,D,r]);return h.createElement(h.Fragment,null,h.createElement(et.Provider,{value:T},h.createElement(ut.Provider,{value:l},h.createElement(ha.Provider,{value:k.current},h.createElement(Ar.Provider,{value:c},h.createElement(Gi,{basename:D,location:l.location,navigationType:l.historyAction,navigator:P,useTransitions:n},h.createElement(Vi,{routes:e.routes,manifest:e.manifest,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function kn(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var Vi=h.memo(Ji);function Ji({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:o}){return Mi(e,void 0,{manifest:t,state:n,isStatic:a,onError:o})}function _s(e){return Pi(e.context)}function Gi({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,useTransitions:i}){X(!St(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=h.useMemo(()=>({basename:l,navigator:a,static:o,useTransitions:i,future:{}}),[l,a,o,i]);typeof r=="string"&&(r=Fe(r));let{pathname:u="/",search:f="",hash:c="",state:y=null,key:g="default",mask:R}=r,b=h.useMemo(()=>{let w=Le(u,l);return w==null?null:{location:{pathname:w,search:f,hash:c,state:y,key:g,mask:R},navigationType:n}},[l,u,f,c,y,g,n,R]);return de(b!=null,`<Router basename="${l}"> is not able to match the URL "${u}${f}${c}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:h.createElement(be.Provider,{value:s},h.createElement(qt.Provider,{children:t,value:b}))}function Xi(){return{params:Ti(),loaderData:ji(),actionData:Ui(),matches:Nr()}}function Ds(e){return function(){const r=Xi();return h.createElement(e,r)}}var zt="get",Bt="application/x-www-form-urlencoded";function Qt(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Ki(e){return Qt(e)&&e.tagName.toLowerCase()==="button"}function qi(e){return Qt(e)&&e.tagName.toLowerCase()==="form"}function Qi(e){return Qt(e)&&e.tagName.toLowerCase()==="input"}function Zi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function el(e,t){return e.button===0&&(!t||t==="_self")&&!Zi(e)}var It=null;function tl(){if(It===null)try{new FormData(document.createElement("form"),0),It=!1}catch{It=!0}return It}var rl=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hr(e){return e!=null&&!rl.has(e)?(de(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Bt}"`),null):e}function nl(e,t){let r,n,a,o,i;if(qi(e)){let l=e.getAttribute("action");n=l?Le(l,t):null,r=e.getAttribute("method")||zt,a=hr(e.getAttribute("enctype"))||Bt,o=new FormData(e)}else if(Ki(e)||Qi(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(n=s?Le(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||zt,a=hr(e.getAttribute("formenctype"))||hr(l.getAttribute("enctype"))||Bt,o=new FormData(l,e),!tl()){let{name:u,type:f,value:c}=e;if(f==="image"){let y=u?`${u}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else u&&o.append(u,c)}}else{if(Qt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=zt,n=null,a=Bt,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}var al=-1,ol=-2,il=-3,ll=-4,sl=-5,ul=-6,cl=-7,dl="B",fl="D",Ea="E",hl="M",ml="N",Ra="P",pl="R",yl="S",vl="Y",gl="U",wl="Z",ba=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Sa=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function El(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,n){const a=e.decode(r,{stream:!0}),o=(t+a).split(`
22
+ `);t=o.pop()||"";for(const i of o)n.enqueue(i)},flush(r){t&&r.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ft=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function br(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return An.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const n=r.length;for(const a of e)r.push(a);return t.length=r.length,An.call(this,n)}function An(e){const{hydrated:t,values:r,deferred:n,plugins:a}=this;let o;const i=[[e,s=>{o=s}]];let l=[];for(;i.length>0;){const[s,u]=i.pop();switch(s){case cl:u(void 0);continue;case sl:u(null);continue;case ol:u(NaN);continue;case ul:u(1/0);continue;case il:u(-1/0);continue;case ll:u(-0);continue}if(t[s]){u(t[s]);continue}const f=r[s];if(!f||typeof f!="object"){t[s]=f,u(f);continue}if(Array.isArray(f))if(typeof f[0]=="string"){const[c,y,g]=f;switch(c){case fl:u(t[s]=new Date(y));continue;case gl:u(t[s]=new URL(y));continue;case dl:u(t[s]=BigInt(y));continue;case pl:u(t[s]=new RegExp(y,g));continue;case vl:u(t[s]=Symbol.for(y));continue;case yl:const R=new Set;t[s]=R;for(let O=f.length-1;O>0;O--)i.push([f[O],P=>{R.add(P)}]);u(R);continue;case hl:const b=new Map;t[s]=b;for(let O=f.length-2;O>0;O-=2){const P=[];i.push([f[O+1],D=>{P[1]=D}]),i.push([f[O],D=>{P[0]=D}]),l.push(()=>{b.set(P[0],P[1])})}u(b);continue;case ml:const w=Object.create(null);t[s]=w;for(const O of Object.keys(y).reverse()){const P=[];i.push([y[O],D=>{P[1]=D}]),i.push([Number(O.slice(1)),D=>{P[0]=D}]),l.push(()=>{w[P[0]]=P[1]})}u(w);continue;case Ra:if(t[y])u(t[s]=t[y]);else{const O=new Sa;n[y]=O,u(t[s]=O.promise)}continue;case Ea:const[,M,C]=f;let k=C&&Ft&&ba.includes(C)&&C in Ft&&typeof Ft[C]=="function"?new Ft[C](M):new Error(M);t[s]=k,u(k);continue;case wl:u(t[s]=t[y]);continue;default:if(Array.isArray(a)){const O=[],P=f.slice(1);for(let D=0;D<P.length;D++){const T=P[D];i.push([T,v=>{O[D]=v}])}l.push(()=>{for(const D of a){const T=D(f[0],...O);if(T){u(t[s]=T.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{const c=[];t[s]=c;for(let y=0;y<f.length;y++){const g=f[y];g!==al&&i.push([g,R=>{c[y]=R}])}u(c);continue}else{const c={};t[s]=c;for(const y of Object.keys(f).reverse()){const g=[];i.push([f[y],R=>{g[1]=R}]),i.push([Number(y.slice(1)),R=>{g[0]=R}]),l.push(()=>{c[g[0]]=g[1]})}u(c);continue}}for(;l.length>0;)l.pop()();return o}async function Rl(e,t){const{plugins:r}=t??{},n=new Sa,a=e.pipeThrough(El()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await bl.call(o,a);let l=n.promise;return i.done?n.resolve():l=Sl.call(o,a).then(n.resolve).catch(s=>{for(const u of Object.values(o.deferred))u.reject(s);n.reject(s)}),{done:l.then(()=>a.closed),value:i.value}}async function bl(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:br.call(this,r)}}async function Sl(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case Ra:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const i=r.slice(n+1);let l;try{l=JSON.parse(i)}catch{throw new SyntaxError}const s=br.call(this,l);o.resolve(s);break}case Ea:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const i=r.slice(n+1);let l;try{l=JSON.parse(i)}catch{throw new SyntaxError}const s=br.call(this,l);o.reject(s);break}default:throw new SyntaxError}t=await e.read()}}async function xl(e){let t={signal:e.signal};if(e.method!=="GET"){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var Ll={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Cl=/[&><\u2028\u2029]/g;function Sr(e){return e.replace(Cl,t=>Ll[t])}function ge(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var xr=Symbol("SingleFetchRedirect"),xa=class extends Error{},Pl=202,Tl=new Set([100,101,204,205]);function Os(e,t,r,n,a,o){let i=Ml(e,l=>{let s=t.routes[l.route.id];return ge(s,"Route not found in manifest"),{hasLoader:s.hasLoader,hasClientLoader:s.hasClientLoader}},Fl,n,a,o);return async l=>l.runClientMiddleware(i)}function Ml(e,t,r,n,a,o,i=()=>!0){return async l=>{let{request:s,matches:u,fetcherKey:f}=l,c=e();if(s.method!=="GET")return _l(l,r,a,o);let y=u.some(g=>{let{hasLoader:R,hasClientLoader:b}=t(g);return g.shouldCallHandler()&&R&&!b});return!n&&!y?Dl(l,t,r,a,o):f?Al(l,r,a,o):Ol(l,c,t,r,n,a,o,i)}}async function _l(e,t,r,n){let a=e.matches.find(l=>l.shouldCallHandler());ge(a,"No action match found");let o,i=await a.resolve(async l=>await l(async()=>{let{data:u,status:f}=await t(e,r,n,[a.route.id]);return o=f,Rt(u,a.route.id)}));return Kt(i.result)||Ze(i.result)||Er(i.result)?{[a.route.id]:i}:{[a.route.id]:{type:i.type,result:ko(i.result,o)}}}async function Dl(e,t,r,n,a){let o=e.matches.filter(l=>l.shouldCallHandler()),i={};return await Promise.all(o.map(l=>l.resolve(async s=>{try{let{hasClientLoader:u}=t(l),f=l.route.id,c=u?await s(async()=>{let{data:y}=await r(e,n,a,[f]);return Rt(y,f)}):await s();i[l.route.id]={type:"data",result:c}}catch(u){i[l.route.id]={type:"error",result:u}}}))),i}async function Ol(e,t,r,n,a,o,i,l=()=>!0){let s=new Set,u=!1,f=e.matches.map(()=>In()),c=In(),y={},g=Promise.all(e.matches.map(async(b,w)=>b.resolve(async M=>{f[w].resolve();let C=b.route.id,{hasLoader:k,hasClientLoader:O}=r(b),P=!b.shouldRevalidateArgs||b.shouldRevalidateArgs.actionStatus==null||b.shouldRevalidateArgs.actionStatus<400;if(!b.shouldCallHandler(P)){u||(u=b.shouldRevalidateArgs!=null&&k);return}if(l(b)&&O){k&&(u=!0);try{let T=await M(async()=>{let{data:v}=await n(e,o,i,[C]);return Rt(v,C)});y[C]={type:"data",result:T}}catch(T){y[C]={type:"error",result:T}}return}k&&s.add(C);try{let T=await M(async()=>{let v=await c.promise;return Rt(v,C)});y[C]={type:"data",result:T}}catch(T){y[C]={type:"error",result:T}}})));if(await Promise.all(f.map(b=>b.promise)),(!t.state.initialized&&t.state.navigation.state==="idle"||s.size===0)&&!window.__reactRouterHdrActive)c.resolve({routes:{}});else{let b=a&&u&&s.size>0?[...s.keys()]:void 0;try{let w=await n(e,o,i,b);c.resolve(w.data)}catch(w){c.reject(w)}}return await g,await kl(c.promise,e.matches,s,y),y}async function kl(e,t,r,n){var a;try{let o,i=await e;if("routes"in i){for(let l of t)if(l.route.id in i.routes){let s=i.routes[l.route.id];if("error"in s){o=s.error,((a=n[l.route.id])==null?void 0:a.result)==null&&(n[l.route.id]={type:"error",result:o});break}}}o!==void 0&&Array.from(r.values()).forEach(l=>{n[l].result instanceof xa&&(n[l].result=o)})}catch{}}async function Al(e,t,r,n){let a=e.matches.find(l=>l.shouldCallHandler());ge(a,"No fetcher match found");let o=a.route.id,i=await a.resolve(async l=>l(async()=>{let{data:s}=await t(e,r,n,[o]);return Rt(s,o)}));return{[a.route.id]:i}}function Il(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let n of t)n&&r.push(n);for(let n of r)e.searchParams.append("index",n);return e}function $r(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&Le(a.pathname,t)==="/"?a.pathname=`${Vt(t)}/_root.${n}`:a.pathname=`${Vt(a.pathname)}.${n}`,a}async function Fl(e,t,r,n){let{request:a}=e,o=$r(a.url,t,r,"data");a.method==="GET"&&(o=Il(o),n&&o.searchParams.set("_routes",n.join(",")));let i=await fetch(o,await xl(a));if(i.status>=400&&!i.headers.has("X-Remix-Response"))throw new Je(i.status,i.statusText,await i.text());if(i.status===204&&i.headers.has("X-Remix-Redirect"))return{status:Pl,data:{redirect:{redirect:i.headers.get("X-Remix-Redirect"),status:Number(i.headers.get("X-Remix-Status")||"302"),revalidate:i.headers.get("X-Remix-Revalidate")==="true",reload:i.headers.get("X-Remix-Reload-Document")==="true",replace:i.headers.get("X-Remix-Replace")==="true"}}};if(Tl.has(i.status)){let l={};return n&&a.method!=="GET"&&(l[n[0]]={data:void 0}),{status:i.status,data:{routes:l}}}ge(i.body,"No response body to decode");try{let l=await Nl(i.body,window),s;if(a.method==="GET"){let u=l.value;xr in u?s={redirect:u[xr]}:s={routes:u}}else{let u=l.value,f=n==null?void 0:n[0];ge(f,"No routeId found for single fetch call decoding"),"redirect"in u?s={redirect:u}:s={routes:{[f]:u}}}return{status:i.status,data:s}}catch{throw new Error("Unable to decode turbo-stream response")}}function Nl(e,t){return Rl(e,{plugins:[(r,...n)=>{if(r==="SanitizedError"){let[a,o,i]=n,l=Error;a&&ba.includes(a)&&a in t&&typeof t[a]=="function"&&(l=t[a]);let s=new l(o);return s.stack=i,{value:s}}if(r==="ErrorResponse"){let[a,o,i]=n;return{value:new Je(o,i,a)}}if(r==="SingleFetchRedirect")return{value:{[xr]:n[0]}};if(r==="SingleFetchClassInstance")return{value:n[0]};if(r==="SingleFetchFallback")return{value:void 0}}]})}function Rt(e,t){if("redirect"in e){let{redirect:n,revalidate:a,reload:o,replace:i,status:l}=e.redirect;throw Ao(n,{status:l,headers:{...a?{"X-Remix-Revalidate":"yes"}:null,...o?{"X-Remix-Reload-Document":"yes"}:null,...i?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(r==null)throw new xa(`No result found for routeId "${t}"`);if("error"in r)throw r.error;if("data"in r)return r.data;throw new Error(`Invalid response found for routeId "${t}"`)}function In(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}async function La(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $l(e,t,r){let n=e.map(o=>{var s;let i=t[o.route.id],l=r.routes[o.route.id];return[l&&l.css?l.css.map(u=>({rel:"stylesheet",href:u})):[],((s=i==null?void 0:i.links)==null?void 0:s.call(i))||[]]}).flat(2),a=Ur(e,r);return Ma(n,a)}function Ca(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function jl(e){if(!e.css)return;let t=Ca(e);await Promise.all(t.map(Ta))}async function Pa(e,t){if(!e.css&&!t.links||!Wl())return;let r=[];if(e.css&&r.push(...Ca(e)),t.links&&r.push(...t.links()),r.length===0)return;let n=[];for(let a of r)!jr(a)&&a.rel==="stylesheet"&&n.push({...a,rel:"preload",as:"style"});await Promise.all(n.map(Ta))}async function Ta(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let r=document.createElement("link");Object.assign(r,e);function n(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function jr(e){return e!=null&&typeof e.page=="string"}function Ul(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Hl(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let i=await La(o,r);return i.links?i.links():[]}return[]}));return Ma(n.flat(1).filter(Ul).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Fn(e,t,r,n,a,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>{var f;return r[u].pathname!==s.pathname||((f=r[u].route.path)==null?void 0:f.endsWith("*"))&&r[u].params["*"]!==s.params["*"]};return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{var c;let f=n.routes[s.route.id];if(!f||!f.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let y=s.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((c=r[0])==null?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function Ur(e,t,{includeHydrateFallback:r}={}){return zl(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function zl(e){return[...new Set(e)]}function Bl(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Ma(e,t){let r=new Set,n=new Set(t);return e.reduce((a,o)=>{if(t&&!jr(o)&&o.as==="script"&&o.href&&n.has(o.href))return a;let l=JSON.stringify(Bl(o));return r.has(l)||(r.add(l),a.push({key:l,link:o})),a},[])}var Nt;function Wl(){if(Nt!==void 0)return Nt;let e=document.createElement("link");return Nt=e.relList.supports("preload"),e=null,Nt}function Yl(){return h.createElement(Lr,{title:"Loading...",renderScripts:!0},h.createElement("script",{dangerouslySetInnerHTML:{__html:`
23
+ console.log(
24
+ "💿 Hey developer 👋. You can provide a way better UX than this " +
25
+ "when your app is loading JS modules and/or running \`clientLoader\` " +
26
+ "functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " +
27
+ "for more information."
28
+ );
29
+ `}}))}function _a(e){let t={};return Object.values(e).forEach(r=>{if(r){let n=r.parentId||"";t[n]||(t[n]=[]),t[n].push(r)}}),t}function Vl(e,t,r){let n=Da(t),a=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?Yl:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>h.createElement(Aa,{error:ga()}):void 0;return e.id==="root"&&t.Layout?{...n?{element:h.createElement(t.Layout,null,h.createElement(n,null))}:{Component:n},...o?{errorElement:h.createElement(t.Layout,null,h.createElement(o,null))}:{ErrorBoundary:o},...a?{hydrateFallbackElement:h.createElement(t.Layout,null,h.createElement(a,null))}:{HydrateFallback:a}}:{Component:n,ErrorBoundary:o,HydrateFallback:a}}function ks(e,t,r,n,a,o){return Hr(t,r,n,a,o,"",_a(t),e)}function $t(e,t){if(e==="loader"&&!t.hasLoader||e==="action"&&!t.hasAction){let n=`You are trying to call ${e==="action"?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(n),new Je(400,"Bad Request",new Error(n),!0)}}function mr(e,t){let r=e==="clientAction"?"a":"an",n=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(n),new Je(405,"Method Not Allowed",new Error(n),!0)}function Hr(e,t,r,n,a,o="",i=_a(e),l){return(i[o]||[]).map(s=>{var C,k,O;let u=t[s.id];function f(P){return ge(typeof P=="function","No single fetch function available for route handler"),P()}function c(P){return s.hasLoader?f(P):Promise.resolve(null)}function y(P){if(!s.hasAction)throw mr("action",s.id);return f(P)}function g(P){import(P)}function R(P){P.clientActionModule&&g(P.clientActionModule),P.clientLoaderModule&&g(P.clientLoaderModule)}async function b(P){let D=t[s.id],T=D?Pa(s,D):Promise.resolve();try{return P()}finally{await T}}let w={id:s.id,index:s.index,path:s.path};if(u){Object.assign(w,{...w,...Vl(s,u,a),middleware:u.clientMiddleware,handle:u.handle,shouldRevalidate:Nn(w.path,u,s,n,l)});let P=r&&r.loaderData&&s.id in r.loaderData,D=P?(C=r==null?void 0:r.loaderData)==null?void 0:C[s.id]:void 0,T=r&&r.errors&&s.id in r.errors,v=T?(k=r==null?void 0:r.errors)==null?void 0:k[s.id]:void 0,Y=l==null&&(((O=u.clientLoader)==null?void 0:O.hydrate)===!0||!s.hasLoader);w.loader=async({request:U,params:ae,context:K,pattern:ie,url:Q},te)=>{let fe=Y;return Y=!1,await b(async()=>(ge(u,"No `routeModule` available for critical-route loader"),u.clientLoader?u.clientLoader({request:U,params:ae,context:K,pattern:ie,url:Q,async serverLoader(){if($t("loader",s),fe){if(P)return D;if(T)throw v}return c(te)}}):c(te)))},w.loader.hydrate=Xl(s.id,u.clientLoader,s.hasLoader,a),w.action=({request:U,params:ae,context:K,pattern:ie,url:Q},te)=>b(async()=>{if(ge(u,"No `routeModule` available for critical-route action"),!u.clientAction){if(a)throw mr("clientAction",s.id);return y(te)}return u.clientAction({request:U,params:ae,context:K,pattern:ie,url:Q,async serverAction(){return $t("action",s),y(te)}})})}else{s.hasClientLoader||(w.loader=(T,v)=>b(()=>c(v))),s.hasClientAction||(w.action=(T,v)=>b(()=>{if(a)throw mr("clientAction",s.id);return y(v)}));let P;async function D(){return P?await P:(P=(async()=>{(s.clientLoaderModule||s.clientActionModule)&&await new Promise(v=>setTimeout(v,0));let T=Gl(s,t);return R(s),await T})(),await P)}w.lazy={loader:s.hasClientLoader?async()=>{let{clientLoader:T}=s.clientLoaderModule?await import(s.clientLoaderModule):await D();return ge(T,"No `clientLoader` export found"),(v,Y)=>T({...v,async serverLoader(){return $t("loader",s),c(Y)}})}:void 0,action:s.hasClientAction?async()=>{let T=s.clientActionModule?import(s.clientActionModule):D();R(s);let{clientAction:v}=await T;return ge(v,"No `clientAction` export found"),(Y,U)=>v({...Y,async serverAction(){return $t("action",s),y(U)}})}:void 0,middleware:s.hasClientMiddleware?async()=>{let{clientMiddleware:T}=s.clientMiddlewareModule?await import(s.clientMiddlewareModule):await D();return ge(T,"No `clientMiddleware` export found"),T}:void 0,shouldRevalidate:async()=>{let T=await D();return Nn(w.path,T,s,n,l)},handle:async()=>(await D()).handle,Component:async()=>(await D()).Component,ErrorBoundary:s.hasErrorBoundary?async()=>(await D()).ErrorBoundary:void 0}}let M=Hr(e,t,r,n,a,s.id,i,l);return M.length>0&&(w.children=M),w})}function Nn(e,t,r,n,a){if(a)return Jl(r.id,t.shouldRevalidate,a);if(!n&&r.hasLoader&&!r.hasClientLoader){let o=e?Gn(e)[1].map(l=>l.paramName):[];const i=l=>o.some(s=>l.currentParams[s]!==l.nextParams[s]);if(t.shouldRevalidate){let l=t.shouldRevalidate;return s=>l({...s,defaultShouldRevalidate:i(s)})}else return l=>i(l)}return t.shouldRevalidate}function Jl(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}async function Gl(e,t){let r=La(e,t),n=jl(e),a=await r;return await Promise.all([n,Pa(e,a)]),{Component:Da(a),ErrorBoundary:a.ErrorBoundary,clientMiddleware:a.clientMiddleware,clientAction:a.clientAction,clientLoader:a.clientLoader,handle:a.handle,links:a.links,meta:a.meta,shouldRevalidate:a.shouldRevalidate}}function Da(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function Xl(e,t,r,n){return n&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}var Wt=new Set,Kl=1e3,Jt=new Set,ql=7680;function zr(e,t){return e.mode==="lazy"&&t===!0}function Ql({sri:e,...t},r){let n=new Set(r.state.matches.map(l=>l.route.id)),a=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(a.pop();a.length>0;)o.push(`/${a.join("/")}`),a.pop();o.forEach(l=>{let s=Pe(r.routes,l,r.basename||"/",!1,r.branches);s&&s.forEach(u=>n.add(u.route.id))});let i=[...n].reduce((l,s)=>Object.assign(l,{[s]:t.routes[s]}),{});return{...t,routes:i,sri:e?!0:void 0}}function As(e,t,r,n,a,o,i){if(zr(a,n))return async({path:l,patch:s,signal:u,fetcherKey:f})=>{if(Jt.has(l))return;let{state:c}=e();await Oa([l],f?window.location.href:_e(c.navigation.location||c.location),t,r,n,o,i,a.manifestPath,s,u)}}function Is(e,t,r,n,a,o){h.useEffect(()=>{var f,c;if(!zr(a,n)||((c=(f=window.navigator)==null?void 0:f.connection)==null?void 0:c.saveData)===!0)return;function i(y){let g=y.tagName==="FORM"?y.getAttribute("action"):y.getAttribute("href");if(!g)return;let R=y.tagName==="A"?y.pathname:new URL(g,window.location.origin).pathname;Jt.has(R)||Wt.add(R)}async function l(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(i);let y=Array.from(Wt.keys()).filter(g=>Jt.has(g)?(Wt.delete(g),!1):!0);if(y.length!==0)try{await Oa(y,null,t,r,n,o,e.basename,a.manifestPath,e.patchRoutes)}catch(g){console.error("Failed to fetch manifest patches",g)}}let s=ts(l,100);l();let u=new MutationObserver(()=>s());return u.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>u.disconnect()},[n,o,t,r,e,a])}function Zl(e,t){let r=e||"/__manifest";return t==null?r:xe([t,r])}var pr="react-router-manifest-version";async function Oa(e,t,r,n,a,o,i,l,s,u){const f=new URLSearchParams;f.set("paths",e.sort().join(",")),f.set("version",r.version);let c=new URL(Zl(l,i),window.location.origin);if(c.search=f.toString(),c.toString().length>ql){Wt.clear();return}let y;try{let w=await fetch(c,{signal:u});if(w.ok){if(w.status===204&&w.headers.has("X-Remix-Reload-Document")){if(!t){console.warn("Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.");return}try{if(sessionStorage.getItem(pr)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}sessionStorage.setItem(pr,r.version)}catch{}window.location.href=t,console.warn("Detected manifest version mismatch, reloading..."),await new Promise(()=>{})}else if(w.status>=400)throw new Error(await w.text())}else throw new Error(`${w.status} ${w.statusText}`);try{sessionStorage.removeItem(pr)}catch{}y=await w.json()}catch(w){if(u!=null&&u.aborted)return;throw w}let g=new Set(Object.keys(r.routes)),R=Object.values(y).reduce((w,M)=>(M&&!g.has(M.id)&&(w[M.id]=M),w),{});Object.assign(r.routes,R),e.forEach(w=>es(w,Jt));let b=new Set;Object.values(R).forEach(w=>{w&&(!w.parentId||!R[w.parentId])&&b.add(w.parentId)}),b.forEach(w=>s(w||null,Hr(R,n,null,a,o,w)))}function es(e,t){if(t.size>=Kl){let r=t.values().next().value;t.delete(r)}t.add(e)}function ts(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function Zt(){let e=h.useContext(et);return ge(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function er(){let e=h.useContext(ut);return ge(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var tr=h.createContext(void 0);tr.displayName="FrameworkContext";function tt(){let e=h.useContext(tr);return ge(e,"You must render this element inside a <HydratedRouter> element"),e}function rs(e,t){let r=h.useContext(tr),[n,a]=h.useState(!1),[o,i]=h.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:f,onTouchStart:c}=t,y=h.useRef(null);h.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let b=M=>{M.forEach(C=>{i(C.isIntersecting)})},w=new IntersectionObserver(b,{threshold:.5});return y.current&&w.observe(y.current),()=>{w.disconnect()}}},[e]),h.useEffect(()=>{if(n){let b=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(b)}}},[n]);let g=()=>{a(!0)},R=()=>{a(!1),i(!1)};return r?e!=="intent"?[o,y,{}]:[o,y,{onFocus:mt(l,g),onBlur:mt(s,R),onMouseEnter:mt(u,g),onMouseLeave:mt(f,R),onTouchStart:mt(c,g)}]:[!1,y,{}]}function mt(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Br(e,t,r){if(r&&!Gt)return[e[0]];if(t){let n=e.findIndex(a=>t[a.route.id]!==void 0);return e.slice(0,n+1)}return e}var $n="data-react-router-critical-css";function Fs({nonce:e,crossOrigin:t}){let{isSpaMode:r,manifest:n,routeModules:a,criticalCss:o}=tt(),{errors:i,matches:l}=er(),s=Br(l,i,r),u=h.useMemo(()=>$l(s,a,n),[s,a,n]);return h.createElement(h.Fragment,null,typeof o=="string"?h.createElement("style",{[$n]:"",nonce:e,dangerouslySetInnerHTML:{__html:o}}):null,typeof o=="object"?h.createElement("link",{[$n]:"",rel:"stylesheet",href:o.href,nonce:e,crossOrigin:t}):null,u.map(({key:f,link:c})=>jr(c)?h.createElement(ka,{key:f,nonce:e,...c,crossOrigin:c.crossOrigin??t}):h.createElement("link",{key:f,nonce:e,...c,crossOrigin:c.crossOrigin??t})))}function ka({page:e,...t}){let r=kr(),{router:n}=Zt(),a=h.useMemo(()=>Wn(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?r?h.createElement(as,{page:e,matches:a,...t}):h.createElement(os,{page:e,matches:a,...t}):null}function ns(e){let{manifest:t,routeModules:r}=tt(),[n,a]=h.useState([]);return h.useEffect(()=>{let o=!1;return Hl(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function as({page:e,matches:t,...r}){let n=Me(),{future:a}=tt(),{basename:o}=Zt(),i=h.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let l=$r(e,o,a.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?s=!0:u.push(f.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[o,a.v8_trailingSlashAwareDataRequests,e,n,t]);return h.createElement(h.Fragment,null,i.map(l=>h.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function os({page:e,matches:t,...r}){let n=Me(),{future:a,manifest:o,routeModules:i}=tt(),{basename:l}=Zt(),{loaderData:s,matches:u}=er(),f=h.useMemo(()=>Fn(e,t,u,o,n,"data"),[e,t,u,o,n]),c=h.useMemo(()=>Fn(e,t,u,o,n,"assets"),[e,t,u,o,n]),y=h.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let b=new Set,w=!1;if(t.forEach(C=>{var O;let k=o.routes[C.route.id];!k||!k.hasLoader||(!f.some(P=>P.route.id===C.route.id)&&C.route.id in s&&((O=i[C.route.id])!=null&&O.shouldRevalidate)||k.hasClientLoader?w=!0:b.add(C.route.id))}),b.size===0)return[];let M=$r(e,l,a.v8_trailingSlashAwareDataRequests,"data");return w&&b.size>0&&M.searchParams.set("_routes",t.filter(C=>b.has(C.route.id)).map(C=>C.route.id).join(",")),[M.pathname+M.search]},[l,a.v8_trailingSlashAwareDataRequests,s,n,o,f,t,e,i]),g=h.useMemo(()=>Ur(c,o),[c,o]),R=ns(c);return h.createElement(h.Fragment,null,y.map(b=>h.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),g.map(b=>h.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),R.map(({key:b,link:w})=>h.createElement("link",{key:b,nonce:r.nonce,...w,crossOrigin:w.crossOrigin??r.crossOrigin})))}function Ns(){let{isSpaMode:e,routeModules:t}=tt(),{errors:r,matches:n,loaderData:a}=er(),o=Me(),i=Br(n,r,e),l=null;r&&(l=r[i[i.length-1].route.id]);let s=[],u=null,f=[];for(let c=0;c<i.length;c++){let y=i[c],g=y.route.id,R=a[g],b=y.params,w=t[g],M=[],C={id:g,data:R,loaderData:R,meta:[],params:y.params,pathname:y.pathname,handle:y.route.handle,error:l};if(f[c]=C,w!=null&&w.meta?M=typeof w.meta=="function"?w.meta({data:R,loaderData:R,params:b,location:o,matches:f,error:l}):Array.isArray(w.meta)?[...w.meta]:w.meta:u&&(M=[...u]),M=M||[],!Array.isArray(M))throw new Error("The route at "+y.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
30
+
31
+ To reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta`);C.meta=M,f[c]=C,s=[...M],u=s}return h.createElement(h.Fragment,null,s.flat().map(c=>{if(!c)return null;if("tagName"in c){let{tagName:y,...g}=c;if(!is(y))return console.warn(`A meta object uses an invalid tagName: ${y}. Expected either 'link' or 'meta'`),null;let R=y;return h.createElement(R,{key:JSON.stringify(g),...g})}if("title"in c)return h.createElement("title",{key:"title"},String(c.title));if("charset"in c&&(c.charSet??(c.charSet=c.charset),delete c.charset),"charSet"in c&&c.charSet!=null)return typeof c.charSet=="string"?h.createElement("meta",{key:"charSet",charSet:c.charSet}):null;if("script:ld+json"in c)try{let y=JSON.stringify(c["script:ld+json"]);return h.createElement("script",{key:`script:ld+json:${y}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:Sr(y)}})}catch{return null}return h.createElement("meta",{key:JSON.stringify(c),...c})}))}function is(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var Gt=!1;function ls(){Gt=!0}function ss(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:a,routeDiscovery:o,ssr:i}=tt(),{router:l,static:s,staticContext:u}=Zt(),{matches:f}=er(),c=kr(),y=zr(o,i);a&&(a.didRenderScripts=!0);let g=Br(f,null,n);h.useEffect(()=>{ls()},[]);let R=h.useMemo(()=>{var O;if(c)return null;let C=u?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",k=s?`${(O=t.hmr)!=null&&O.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${y?"":`import ${JSON.stringify(t.url)}`};
32
+ ${g.map((P,D)=>{let T=`route${D}`,v=t.routes[P.route.id];ge(v,`Route ${P.route.id} not found in manifest`);let{clientActionModule:Y,clientLoaderModule:U,clientMiddlewareModule:ae,hydrateFallbackModule:K,module:ie}=v,Q=[...Y?[{module:Y,varName:`${T}_clientAction`}]:[],...U?[{module:U,varName:`${T}_clientLoader`}]:[],...ae?[{module:ae,varName:`${T}_clientMiddleware`}]:[],...K?[{module:K,varName:`${T}_HydrateFallback`}]:[],{module:ie,varName:`${T}_main`}];if(Q.length===1)return`import * as ${T} from ${JSON.stringify(ie)};`;let te=Q.map(J=>`import * as ${J.varName} from "${J.module}";`).join(`
33
+ `),fe=`const ${T} = {${Q.map(J=>`...${J.varName}`).join(",")}};`;return[te,fe].join(`
34
+ `)}).join(`
35
+ `)}
36
+ ${y?`window.__reactRouterManifest = ${JSON.stringify(Ql(t,l),null,2)};`:""}
37
+ window.__reactRouterRouteModules = {${g.map((P,D)=>`${JSON.stringify(P.route.id)}:route${D}`).join(",")}};
38
+
39
+ import(${JSON.stringify(t.entry.module)});`:" ";return h.createElement(h.Fragment,null,h.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:C},type:void 0}),h.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:k},type:"module",async:!0}))},[]),b=Gt||c?[]:[...new Set(t.entry.imports.concat(Ur(g,t,{includeHydrateFallback:!0})))],w=typeof t.sri=="object"?t.sri:{};return Rr(!c,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),Gt||c?null:h.createElement(h.Fragment,null,typeof t.sri=="object"?h.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:w})}}):null,y?null:h.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:w[t.url],nonce:e.nonce,suppressHydrationWarning:!0}),h.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:w[t.entry.module],nonce:e.nonce,suppressHydrationWarning:!0}),b.map(M=>h.createElement("link",{key:M,rel:"modulepreload",href:M,crossOrigin:e.crossOrigin,integrity:w[M],nonce:e.nonce,suppressHydrationWarning:!0})),R)}function us(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var $s=class extends h.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?h.createElement(Aa,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function Aa({error:e,isOutsideRemixApp:t}){console.error(e);let r=h.createElement("script",{dangerouslySetInnerHTML:{__html:`
40
+ console.log(
41
+ "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
42
+ );
43
+ `}});if(Ze(e))return h.createElement(Lr,{title:"Unhandled Thrown Response!"},h.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let n;if(e instanceof Error)n=e;else{let a=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);n=new Error(a)}return h.createElement(Lr,{title:"Application Error!",isOutsideRemixApp:t},h.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),h.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),r)}function Lr({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){var o;let{routeModules:a}=tt();return(o=a.root)!=null&&o.Layout&&!r?n:h.createElement("html",{lang:"en"},h.createElement("head",null,h.createElement("meta",{charSet:"utf-8"}),h.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),h.createElement("title",null,e)),h.createElement("body",null,h.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?h.createElement(ss,null):null)))}var cs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{cs&&(window.__reactRouterVersion="7.17.0")}catch{}var Ia=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fa=h.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:i,mask:l,state:s,target:u,to:f,preventScrollReset:c,viewTransition:y,defaultShouldRevalidate:g,...R},b){let{basename:w,navigator:M,useTransitions:C}=h.useContext(be),k=typeof f=="string"&&Ia.test(f),O=Qn(f,w);f=O.to;let P=Si(f,{relative:a}),D=Me(),T=null;if(l){let te=Xt(l,[],D.mask?D.mask.pathname:"/",!0);w!=="/"&&(te.pathname=te.pathname==="/"?w:xe([w,te.pathname])),T=M.createHref(te)}let[v,Y,U]=rs(n,R),ae=ps(f,{replace:i,mask:l,state:s,target:u,preventScrollReset:c,relative:a,viewTransition:y,defaultShouldRevalidate:g,useTransitions:C});function K(te){t&&t(te),te.defaultPrevented||ae(te)}let ie=!(O.isExternal||o),Q=h.createElement("a",{...R,...U,href:(ie?T:void 0)||O.absoluteURL||P,onClick:ie?K:t,ref:us(b,Y),target:u,"data-discover":!k&&r==="render"?"true":void 0});return v&&!k?h.createElement(h.Fragment,null,Q,h.createElement(ka,{page:P})):Q});Fa.displayName="Link";var ds=h.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:i,viewTransition:l,children:s,...u},f){let c=xt(i,{relative:u.relative}),y=Me(),g=h.useContext(ut),{navigator:R,basename:b}=h.useContext(be),w=g!=null&&bs(c)&&l===!0,M=R.encodeLocation?R.encodeLocation(c).pathname:c.pathname,C=y.pathname,k=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(C=C.toLowerCase(),k=k?k.toLowerCase():null,M=M.toLowerCase()),k&&b&&(k=Le(k,b)||k);const O=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let P=C===M||!a&&C.startsWith(M)&&C.charAt(O)==="/",D=k!=null&&(k===M||!a&&k.startsWith(M)&&k.charAt(M.length)==="/"),T={isActive:P,isPending:D,isTransitioning:w},v=P?t:void 0,Y;typeof n=="function"?Y=n(T):Y=[n,P?"active":null,D?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let U=typeof o=="function"?o(T):o;return h.createElement(Fa,{...u,"aria-current":v,className:Y,ref:f,style:U,to:i,viewTransition:l},typeof s=="function"?s(T):s)});ds.displayName="NavLink";var fs=h.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:i=zt,action:l,onSubmit:s,relative:u,preventScrollReset:f,viewTransition:c,defaultShouldRevalidate:y,...g},R)=>{let{useTransitions:b}=h.useContext(be),w=gs(),M=ws(l,{relative:u}),C=i.toLowerCase()==="get"?"get":"post",k=typeof l=="string"&&Ia.test(l),O=P=>{if(s&&s(P),P.defaultPrevented)return;P.preventDefault();let D=P.nativeEvent.submitter,T=(D==null?void 0:D.getAttribute("formmethod"))||i,v=()=>w(D||P.currentTarget,{fetcherKey:t,method:T,navigate:r,replace:a,state:o,relative:u,preventScrollReset:f,viewTransition:c,defaultShouldRevalidate:y});b&&r!==!1?h.startTransition(()=>v()):v()};return h.createElement("form",{ref:R,method:C,action:M,onSubmit:n?s:O,...g,"data-discover":!k&&e==="render"?"true":void 0})});fs.displayName="Form";function hs({getKey:e,storageKey:t,...r}){let n=h.useContext(tr),{basename:a}=h.useContext(be),o=Me(),i=Nr();Es({getKey:e,storageKey:t});let l=h.useMemo(()=>{if(!n||!e)return null;let u=Pr(o,i,a,e);return u!==o.key?u:null},[]);if(!n||n.isSpaMode)return null;let s=((u,f)=>{if(!window.history.state||!window.history.state.key){let c=Math.random().toString(32).slice(2);window.history.replaceState({key:c},"")}try{let y=JSON.parse(sessionStorage.getItem(u)||"{}")[f||window.history.state.key];typeof y=="number"&&window.scrollTo(0,y)}catch(c){console.error(c),sessionStorage.removeItem(u)}}).toString();return h.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${Sr(JSON.stringify(t||Cr))}, ${Sr(JSON.stringify(l))})`}})}hs.displayName="ScrollRestoration";function Na(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wr(e){let t=h.useContext(et);return X(t,Na(e)),t}function ms(e){let t=h.useContext(ut);return X(t,Na(e)),t}function ps(e,{target:t,replace:r,mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let f=xi(),c=Me(),y=xt(e,{relative:i});return h.useCallback(g=>{if(el(g,t)){g.preventDefault();let R=r!==void 0?r:_e(c)===_e(y),b=()=>f(e,{replace:R,mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});u?h.startTransition(()=>b()):b()}},[c,f,y,r,n,a,t,e,o,i,l,s,u])}var ys=0,vs=()=>`__${String(++ys)}__`;function gs(){let{router:e}=Wr("useSubmit"),{basename:t}=h.useContext(be),r=Ni(),n=e.fetch,a=e.navigate;return h.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:f,body:c}=nl(o,t);if(i.navigate===!1){let y=i.fetcherKey||vs();await n(y,r,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:f,body:c,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await a(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:f,body:c,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[n,a,t,r])}function ws(e,{relative:t}={}){let{basename:r}=h.useContext(be),n=h.useContext(De);X(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...xt(e||".",{relative:t})},i=Me();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(f=>f==="")){l.delete("index"),s.filter(c=>c).forEach(c=>l.append("index",c));let f=l.toString();o.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:xe([r,o.pathname])),_e(o)}var Cr="react-router-scroll-positions",jt={};function Pr(e,t,r,n){let a=null;return n&&(r!=="/"?a=n({...e,pathname:Le(e.pathname,r)||e.pathname},t):a=n(e,t)),a==null&&(a=e.key),a}function Es({getKey:e,storageKey:t}={}){let{router:r}=Wr("useScrollRestoration"),{restoreScrollPosition:n,preventScrollReset:a}=ms("useScrollRestoration"),{basename:o}=h.useContext(be),i=Me(),l=Nr(),s=$i();h.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Rs(h.useCallback(()=>{if(s.state==="idle"){let u=Pr(i,l,o,e);jt[u]=window.scrollY}try{sessionStorage.setItem(t||Cr,JSON.stringify(jt))}catch(u){de(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(h.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||Cr);u&&(jt=JSON.parse(u))}catch{}},[t]),h.useLayoutEffect(()=>{let u=r==null?void 0:r.enableScrollRestoration(jt,()=>window.scrollY,e?(f,c)=>Pr(f,c,o,e):void 0);return()=>u&&u()},[r,o,e]),h.useLayoutEffect(()=>{if(n!==!1){if(typeof n=="number"){window.scrollTo(0,n);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{de(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[i,n,a]))}function Rs(e,t){let{capture:r}={};h.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function bs(e,{relative:t}={}){let r=h.useContext(Ar);X(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Wr("useViewTransitionState"),a=xt(e,{relative:t});if(!r.isTransitioning)return!1;let o=Le(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Le(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Yt(a.pathname,i)!=null||Yt(a.pathname,o)!=null}var yr={exports:{}},pt={};/**
44
+ * @license React
45
+ * react-jsx-runtime.production.js
46
+ *
47
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
48
+ *
49
+ * This source code is licensed under the MIT license found in the
50
+ * LICENSE file in the root directory of this source tree.
51
+ */var jn;function Ss(){if(jn)return pt;jn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,o){var i=null;if(o!==void 0&&(i=""+o),a.key!==void 0&&(i=""+a.key),"key"in a){o={};for(var l in a)l!=="key"&&(o[l]=a[l])}else o=a;return a=o.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:o}}return pt.Fragment=t,pt.jsx=r,pt.jsxs=r,pt}var Un;function xs(){return Un||(Un=1,yr.exports=Ss()),yr.exports}var js=xs();export{Je as E,tr as F,Fs as L,Ns as M,Tl as N,_s as O,io as R,hs as S,ss as a,oo as b,X as c,$s as d,Ms as e,Nl as f,Hr as g,Cs as h,Ze as i,js as j,As as k,Os as l,Wn as m,Ls as n,ks as o,Ps as p,Ts as q,h as r,Xl as s,Is as u,Ds as w};
@@ -0,0 +1 @@
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-Cw45cONA.js","imports":["/assets/jsx-runtime-BZbza59V.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/root-CCK9sNPJ.js","imports":["/assets/jsx-runtime-BZbza59V.js"],"css":["/assets/root--WDECO_x.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-CHNZ1EXV.js","imports":["/assets/jsx-runtime-BZbza59V.js"],"css":[]}},"url":"/assets/manifest-f8a16862.js","version":"f8a16862"};
@@ -0,0 +1 @@
1
+ :root{color-scheme:light;--bg: #f6f7f9;--panel: #ffffff;--panel-soft: #fbfcfe;--ink: #15181f;--muted: #657080;--line: #d9dee7;--line-strong: #bcc5d2;--primary: #1663d9;--primary-dark: #0f4ca7;--code: #111827;--code-ink: #d6e2ff;--brand-ink: #152b3f;--brand-blue: #1597df;--hover-soft: #eef2f7;--ok: #16825d;--warn: #ad5b00;--ready-line: #a7dbc8;--warn-line: #f3cf9c;--focus-ring: rgba(22, 99, 217, .12);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}[data-theme=dark]{color-scheme:dark;--bg: #0c1118;--panel: #111821;--panel-soft: #0f151e;--ink: #edf3fb;--muted: #92a0b2;--line: #263241;--line-strong: #3a485a;--primary: #2f9ff0;--primary-dark: #1b84d2;--code: #070b12;--code-ink: #d8e7ff;--brand-ink: #f2f7fd;--brand-blue: #39aaf4;--hover-soft: #1a2431;--ok: #68d6ae;--warn: #ffb75d;--ready-line: #2f735d;--warn-line: #7a5427;--focus-ring: rgba(47, 159, 240, .22)}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:var(--bg);color:var(--ink)}button,textarea{font:inherit}.app-shell{height:100vh;overflow:hidden;padding:0 24px 24px}.workspace{display:flex;height:calc(100vh - 92px);min-height:0;flex-direction:column;max-width:1440px;margin:0 auto}.workspace-summary{display:block;margin-bottom:18px}.product-description{max-width:760px;margin:0;color:var(--muted);font-size:14px;line-height:1.5}.topbar{width:calc(100% + 48px);display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 -24px 18px;border-top:1px solid #55bca9;padding:12px 24px;background:#2d3e50;color:#f6f8fb}.topbar-inner{display:flex;width:100%;max-width:1440px;margin:0 auto;align-items:center;justify-content:space-between;gap:16px}.title-line{display:flex;min-width:0;align-items:baseline;gap:16px}.topbar-actions{display:flex;align-items:center;gap:10px}.eyebrow{margin:0 0 5px;color:var(--primary-dark);font-size:12px;font-weight:700;letter-spacing:0;text-transform:uppercase}.brand-logo{display:inline-flex;align-items:baseline;flex:0 0 auto;margin-bottom:0;font-size:clamp(18px,1.8vw,24px);font-weight:900;line-height:1;letter-spacing:0}.brand-logo span:first-child{color:#f6f8fb}.brand-logo span:last-child{color:#42d0b6}h1,h2{margin:0;letter-spacing:0}h1{font-size:15px;font-weight:400;line-height:1.25;color:#c8d4df}h2{font-size:20px}.status-pill{display:inline-flex;flex:0 0 auto;align-items:center;gap:7px;border:1px solid var(--line);border-radius:999px;padding:8px 12px;background:#ffffff0a;color:#d8e2eb;font-size:13px;font-weight:650}.status-pill.ready{border-color:var(--ready-line);color:var(--ok)}.status-pill.fallback{border-color:var(--warn-line);color:var(--warn)}.panels{display:grid;min-height:0;flex:1;grid-template-columns:minmax(360px,.8fr) minmax(420px,1.2fr);gap:18px;align-items:stretch}.input-panel,.output-panel{min-width:0;min-height:0;border:1px solid var(--line);border-radius:8px;background:var(--panel)}.input-panel{display:flex;flex-direction:column;gap:16px;overflow:hidden;padding:18px}.field-group{display:flex;min-height:0;flex:1;flex-direction:column;gap:8px}.prompt-group{min-height:140px;flex:0 0 210px}.field-heading,.output-head{display:flex;align-items:center;justify-content:space-between;gap:12px}label{font-weight:760}.field-heading span{color:var(--muted);font-size:12px;font-weight:650;text-align:right}textarea{width:100%;min-height:0;flex:1;resize:none;border:1px solid var(--line-strong);border-radius:8px;padding:13px;color:var(--ink);background:var(--panel-soft);line-height:1.45;outline:none}textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--focus-ring)}.actions{display:flex;gap:10px;flex-wrap:wrap}button{display:inline-flex;min-height:38px;align-items:center;justify-content:center;gap:7px;border:1px solid transparent;border-radius:8px;padding:0 14px;background:var(--primary);color:#fff;cursor:pointer;font-weight:760}button:hover{background:var(--primary-dark)}button:disabled{cursor:wait;opacity:.68}button.secondary{border-color:var(--line-strong);background:var(--panel);color:var(--ink)}button.secondary:hover{border-color:var(--primary);color:var(--primary-dark)}button.mock-active{border-color:var(--ready-line);background:var(--ok);color:#fff}button.mock-active:hover{border-color:var(--ready-line);background:var(--ok)}button.ghost{background:transparent;color:var(--muted)}button.ghost:hover{background:var(--hover-soft);color:var(--ink)}button.load-provider-action{border-color:var(--line-strong);background:var(--panel);color:var(--ink)}button.load-provider-action:hover{border-color:var(--primary);background:var(--hover-soft);color:var(--primary-dark)}button.load-provider-action:disabled{background:transparent;color:var(--muted);cursor:not-allowed;opacity:.72}.provider-progress-text{min-height:18px;margin:-6px 0 0;color:var(--muted);font-size:12px;font-weight:650;line-height:1.4}.spin-icon{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}button.icon-button{width:38px;padding:0;border-color:#ffffff2e;background:#ffffff0a;color:#d8e2eb}button.icon-button:hover{border-color:#42d0b6;background:#42d0b61f;color:#42d0b6}.output-panel{display:flex;min-height:0;overflow:visible;flex-direction:column;padding:18px}.output-head{margin-bottom:14px}.model-picker{position:relative;flex:0 0 auto}.model-select{min-width:260px;justify-content:space-between;border-color:var(--line-strong);background:var(--panel);color:var(--ink)}.model-select:hover{border-color:var(--primary);background:var(--panel);color:var(--primary-dark)}.model-select>span,.model-menu-item>span:first-child{display:grid;min-width:0;text-align:left}.model-select-label,.model-option-label{overflow:hidden;font-size:13px;font-weight:800;line-height:1.15;text-overflow:ellipsis;white-space:nowrap}.model-select-detail,.model-option-detail{overflow:hidden;color:var(--muted);font-size:11px;font-weight:650;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.model-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:5;width:min(360px,calc(100vw - 48px));overflow:hidden;border:1px solid var(--line);border-radius:8px;background:var(--panel);box-shadow:0 18px 48px #1118272e}.model-menu-item{width:100%;min-height:52px;justify-content:space-between;gap:16px;border:0;border-radius:0;padding:9px 12px;background:var(--panel);color:var(--ink)}.model-menu-item:hover{background:var(--hover-soft);color:var(--ink)}.model-menu-item[aria-selected=true]{background:#1663d914}.model-menu-item:disabled{cursor:not-allowed;opacity:1}.model-menu-item:disabled .model-option-label,.model-menu-item:disabled .model-option-detail{color:var(--muted);opacity:.62}.model-unavailable{flex:0 0 auto;color:var(--muted);font-size:10px;font-weight:750;line-height:1;opacity:.7}.code-wrap{position:relative;display:grid;min-height:0;flex:1;overflow:visible;border-radius:8px;background:var(--code)}.code-actions{position:absolute;top:12px;right:26px;z-index:1000;display:flex;gap:8px}.code-icon-button{position:relative;width:36px;min-height:36px;padding:0;border-color:#d8e2eb33;background:#2d3e50db;color:#d8e2eb;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.code-icon-button:hover{border-color:#42d0b6;background:#2d3e50;color:#42d0b6}.code-icon-button.copied{border-color:var(--ready-line);background:var(--ok);color:#fff}.json-editor-shell{display:flex;min-width:0;min-height:0;flex:1;flex-direction:column}.json-editor{width:100%;min-height:0;flex:1;resize:none;border:0;border-radius:8px;outline:none;padding:18px 112px 18px 18px;background:transparent;color:var(--code-ink);font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,ui-monospace,monospace;font-size:13px;line-height:1.55;white-space:pre}.json-editor:focus{box-shadow:inset 0 0 0 1px #42d0b6a6}.json-editor-error{margin:0;border-top:1px solid var(--warn-line);padding:9px 14px;background:#ad5b0021;color:var(--warn);font-size:12px;font-weight:700;line-height:1.4}.tooltip-bubble{position:absolute;z-index:1001;right:50%;bottom:calc(100% + 10px);transform:translate(50%);visibility:hidden;opacity:0;pointer-events:none;white-space:nowrap;border-radius:6px;padding:7px 9px;background:#2d3e50;color:#f6f8fb;font-size:12px;font-weight:700;transition:opacity .16s ease,visibility .16s ease}.tooltip-bubble:after{position:absolute;top:100%;left:50%;width:0;height:0;border:6px solid transparent;border-top-color:#2d3e50;content:"";transform:translate(-50%)}.copy-control:hover .tooltip-bubble,.copy-control:focus-visible .tooltip-bubble,.copy-control.copied .tooltip-bubble,.generate-control.needs-model:hover .tooltip-bubble,.generate-control.needs-model:focus-visible .tooltip-bubble,.generate-control.needs-model:focus-within .tooltip-bubble{visibility:visible;opacity:1}.copy-control.copied .tooltip-bubble{background:var(--ok)}.copy-control.copied .tooltip-bubble:after{border-top-color:var(--ok)}.generate-control{position:relative;display:inline-flex;border-radius:8px;outline:none}.generate-control:focus-visible{box-shadow:0 0 0 3px var(--focus-ring)}pre{min-height:0;overflow:auto;margin:0;border-radius:0;padding:18px 112px 18px 18px;background:transparent;color:var(--code-ink);font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,ui-monospace,monospace;font-size:13px;line-height:1.55;white-space:pre}.mock-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px}.mock-endpoint{display:flex;width:min(600px,100%);min-width:0;height:38px;align-items:center;overflow:hidden;border:1px solid var(--line-strong);border-radius:8px;background:var(--panel);color:var(--muted);font-size:13px;font-weight:700}.mock-endpoint>span{padding-left:12px;white-space:nowrap}.mock-endpoint input{width:100%;min-width:100px;height:100%;border:0;outline:none;padding:0 12px 0 0;background:transparent;color:var(--ink);font:inherit}.mock-endpoint:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px var(--focus-ring)}.mock-endpoint input:disabled{color:var(--muted);cursor:not-allowed}.mock-endpoint input::placeholder{color:var(--muted);opacity:.72}.test-shell{min-height:100vh;padding:24px;background:var(--bg)}.test-header{display:flex;max-width:1280px;margin:0 auto 18px;align-items:center;justify-content:space-between;gap:16px}.test-header h1{color:var(--ink);font-size:28px;font-weight:850}.test-grid{display:grid;max-width:1280px;margin:0 auto;grid-template-columns:repeat(2,minmax(420px,1fr));gap:18px}.test-grid-single{grid-template-columns:minmax(420px,1fr)}.test-panel{display:flex;min-width:0;min-height:0;flex-direction:column;gap:16px;border:1px solid var(--line);border-radius:8px;padding:18px;background:var(--panel)}.test-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.model-stat-grid,.test-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.model-stat-grid{grid-template-columns:repeat(3,minmax(120px,1fr));gap:8px}.model-stat-grid>div,.test-stat-grid>div{display:grid;min-width:0;gap:5px;border:1px solid var(--line);border-radius:8px;padding:10px;background:var(--panel-soft)}.test-model-stat{position:relative}.test-model-trigger{min-height:22px;justify-content:space-between;border:0;border-radius:4px;padding:0;background:transparent;color:var(--ink)}.test-model-trigger:hover{background:transparent;color:var(--primary-dark)}.test-model-trigger:disabled{cursor:wait}.test-model-trigger strong{max-width:calc(100% - 24px)}.test-model-menu{top:calc(100% + 8px);right:0;left:0;z-index:20;width:auto}.model-stat-grid>div{gap:4px;min-height:52px;padding:7px 10px}.model-stat-dropdown{position:relative}.model-stat-trigger{width:100%;min-height:22px;justify-content:space-between;border:0;border-radius:4px;padding:0;background:transparent;color:var(--ink)}.model-stat-trigger:hover{background:transparent;color:var(--primary-dark)}.model-stat-trigger:disabled{background:transparent;color:var(--muted);cursor:wait}.model-stat-trigger strong{max-width:calc(100% - 24px)}.transformer-model-menu{top:calc(100% + 8px);right:0;left:0;width:auto}.provider-stat{display:flex;position:relative;padding:0}.provider-stat:hover{background:var(--hover-soft)}.provider-stat-card{display:grid;align-items:center;grid-template-columns:minmax(0,1fr) auto auto;column-gap:10px;height:100%;width:100%;min-height:42px;background:transparent;color:var(--ink)}.provider-dropdown-trigger{width:100%;min-height:42px;justify-content:flex-start;border:0;border-radius:0;padding:0 0 0 12px;background:transparent;color:var(--ink)}.provider-chevron-button{width:30px;min-height:42px;border:0;border-radius:0;padding:0 10px 0 0;background:transparent;color:var(--muted)}.provider-chevron-button:hover,.provider-dropdown-trigger:hover{background:transparent;color:var(--muted)}.provider-stat:hover .provider-copy span,.provider-stat:hover .provider-copy strong,.provider-stat:hover .provider-status,.provider-dropdown-trigger:hover .provider-copy span,.provider-dropdown-trigger:hover .provider-copy strong,.provider-dropdown-trigger:hover .provider-status{color:var(--muted)}.provider-copy{display:grid;min-width:0;gap:4px;text-align:left}.provider-copy span{color:var(--muted);font-size:11px;font-weight:750}.provider-copy strong{overflow:hidden;font-size:12px;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.provider-status{display:inline-flex;flex:0 0 auto;align-items:center;gap:6px;color:var(--muted);font-size:11px;font-weight:800;white-space:nowrap}.provider-status-wrap{display:grid;justify-items:end}.provider-status-dot{width:9px;height:9px;border:0;border-radius:999px;background:var(--muted)}.provider-status-dot.ready{background:var(--ok)}.provider-status-dot.available{background:var(--primary)}.provider-status-dot.loading{background:var(--warn)}.provider-status-dot.running{background:var(--ok)}.provider-status-dot.missing{background:var(--muted)}.provider-menu{left:0;right:auto;width:min(360px,calc(100vw - 48px))}.model-stat-grid span,.test-stat-grid span{color:var(--muted);font-size:12px;font-weight:750}.model-stat-grid span{font-size:11px}.model-stat-grid strong,.test-stat-grid strong{overflow:hidden;font-size:13px;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.model-stat-grid strong{font-size:12px}.model-stat-grid .provider-copy span,.model-stat-grid .provider-status{font-size:11px}.model-stat-grid .provider-status span{color:inherit;font-size:inherit;font-weight:inherit}.test-label{margin-bottom:-8px}.test-textarea{min-height:160px;flex:0 0 auto}.test-status{margin:0;color:var(--muted);font-size:14px;line-height:1.5}.test-output{min-height:260px}.test-output pre{padding-right:18px;white-space:pre-wrap}.test-log{display:grid;gap:10px}.test-log article,.test-log>p{margin:0;border:1px solid var(--line);border-radius:8px;padding:10px;background:var(--panel-soft)}.test-log span{display:block;margin-bottom:5px;color:var(--primary-dark);font-size:12px;font-weight:850;text-transform:uppercase}.test-log p{display:-webkit-box;overflow:hidden;margin:0;color:var(--muted);font-size:13px;line-height:1.45;-webkit-box-orient:vertical;-webkit-line-clamp:5}@media(max-width:980px){.app-shell{height:auto;overflow:visible;padding:0 16px 16px}.workspace{height:auto}.workspace-summary{grid-template-columns:1fr}.topbar{width:calc(100% + 32px);margin:0 -16px 18px;padding:12px 16px}.topbar-inner{align-items:flex-start;flex-direction:column}.title-line{flex-direction:column;gap:4px}.panels{grid-template-columns:1fr}.input-panel{overflow:visible}.field-group{min-height:250px}.prompt-group{min-height:160px;flex:.65}.output-panel{min-height:520px}.test-shell{padding:16px}.test-header{align-items:flex-start;flex-direction:column}.test-grid{grid-template-columns:1fr}.model-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:560px){.app-shell{padding:0 10px 10px}.topbar{width:calc(100% + 20px);margin:0 -10px 14px;padding:12px 10px}.input-panel,.output-panel{padding:12px}.workspace-summary{gap:12px;margin-bottom:14px}.field-heading,.output-head{align-items:flex-start;flex-direction:column}.model-picker,.model-select,.actions,.mock-footer{width:100%}.mock-footer{align-items:stretch;flex-direction:column}.mock-endpoint,.mock-endpoint input{width:100%}button{flex:1 1 120px}.test-shell{padding:10px}.test-panel{padding:12px}.test-header h1{font-size:24px}.model-stat-grid,.test-stat-grid{grid-template-columns:1fr}}
@@ -0,0 +1 @@
1
+ import{w as e,j as t,M as a,L as n,S as o,a as i,O as r}from"./jsx-runtime-BZbza59V.js";function c({children:s}){return t.jsxs("html",{lang:"en",children:[t.jsxs("head",{children:[t.jsx("meta",{charSet:"utf-8"}),t.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),t.jsx(a,{}),t.jsx(n,{})]}),t.jsxs("body",{children:[s,t.jsx(o,{}),t.jsx(i,{})]})]})}const j=e(function(){return t.jsx(r,{})});export{c as Layout,j as default};