@nocobase/app 1.6.0-beta.9 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/.umirc.ts +2 -2
- package/client/src/.umi-production/core/helmet.ts +1 -1
- package/client/src/.umi-production/core/history.ts +1 -1
- package/client/src/.umi-production/core/historyIntelli.ts +1 -1
- package/client/src/.umi-production/core/polyfill.ts +233 -233
- package/client/src/.umi-production/exports.ts +3 -3
- package/client/src/.umi-production/testBrowser.tsx +1 -1
- package/client/src/.umi-production/tsconfig.json +1 -1
- package/client/src/.umi-production/umi.ts +2 -2
- package/dist/client/4750.667c5051.async.js +69 -0
- package/dist/client/index.html +3 -3
- package/dist/client/index.html.tpl +3 -3
- package/dist/client/npm._at_ant-design.5ba41bf5.async.js +139 -0
- package/dist/client/{npm._at_formily.16deb97f.async.js → npm._at_formily.07fa921d.async.js} +2 -2
- package/dist/client/npm._at_umijs.7f6c4722.async.js +7 -0
- package/dist/client/{npm.antd.aedb4432.async.js → npm.antd.483a9a61.async.js} +96 -96
- package/dist/client/{npm.highlight.js.8a8320c8.async.js → npm.highlight.js.83fe0142.async.js} +1 -1
- package/dist/client/{npm.lodash-es.c06b3dd5.async.js → npm.lodash-es.99877438.async.js} +1 -1
- package/dist/client/{npm.rc-picker.ef8a3e8b.async.js → npm.rc-picker.9e629062.async.js} +1 -1
- package/dist/client/npm.react-router-dom.2109af81.async.js +1 -0
- package/dist/client/p__index.b415ed71.chunk.css +1 -0
- package/dist/client/p__index.f703f8c5.async.js +1583 -0
- package/dist/client/{umi.326f1dd5.js → umi.1571e5d3.js} +11 -11
- package/package.json +6 -6
- package/dist/client/5415.623fa605.async.js +0 -73
- package/dist/client/npm._at_ant-design.736bcf26.async.js +0 -109
- package/dist/client/npm._at_remix-run.9a0418a9.async.js +0 -2
- package/dist/client/npm.react-router-dom.832efba3.async.js +0 -1
- package/dist/client/p__index.3d0ab914.async.js +0 -1589
- package/dist/client/p__index.9a8aaa6c.chunk.css +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[9021],{12599:function(dn,qt,Qt){Qt.d(qt,{J0:function(){return _},LX:function(){return yt},OF:function(){return qe},RQ:function(){return Se},Zn:function(){return je},lX:function(){return Zt},ov:function(){return St},p7:function(){return _r},q_:function(){return er}});function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C.apply(this,arguments)}var W;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(W||(W={}));const ct="popstate";function un(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((y,R)=>h(y,typeof y=="string"?null:y.state,R===0?"default":void 0));let s=c(r??a.length-1),o=W.Pop,f=null;function c(y){return Math.min(Math.max(y,0),a.length-1)}function m(){return a[s]}function h(y,R,w){R===void 0&&(R=null);let v=ne(a?m().pathname:"/",y,R,w);return Z(v.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(y)),v}function D(y){return typeof y=="string"?y:ae(y)}return{get index(){return s},get action(){return o},get location(){return m()},createHref:D,createURL(y){return new URL(D(y),"http://localhost")},encodeLocation(y){let R=typeof y=="string"?ee(y):y;return{pathname:R.pathname||"",search:R.search||"",hash:R.hash||""}},push(y,R){o=W.Push;let w=h(y,R);s+=1,a.splice(s,a.length,w),n&&f&&f({action:o,location:w,delta:1})},replace(y,R){o=W.Replace;let w=h(y,R);a[s]=w,n&&f&&f({action:o,location:w,delta:0})},go(y){o=W.Pop;let R=c(s+y),w=a[R];s=R,f&&f({action:o,location:w,delta:y})},listen(y){return f=y,()=>{f=null}}}}function Zt(e){e===void 0&&(e={});function t(n,a){let{pathname:s,search:o,hash:f}=n.location;return ne("",{pathname:s,search:o,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:ae(a)}return ht(t,r,null,e)}function er(e){e===void 0&&(e={});function t(a,s){let{pathname:o="/",search:f="",hash:c=""}=ee(a.location.hash.substr(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),ne("",{pathname:o,search:f,hash:c},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(a,s){let o=a.document.querySelector("base"),f="";if(o&&o.getAttribute("href")){let c=a.location.href,m=c.indexOf("#");f=m===-1?c:c.slice(0,m)}return f+"#"+(typeof s=="string"?s:ae(s))}function n(a,s){Z(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(s)+")")}return ht(t,r,n,e)}function _(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Z(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tr(){return Math.random().toString(36).substr(2,8)}function ft(e,t){return{usr:e.state,key:e.key,idx:t}}function ne(e,t,r,n){return r===void 0&&(r=null),C({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ee(t):t,{state:r,key:t&&t.key||n||tr()})}function ae(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function ee(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function ht(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,o=a.history,f=W.Pop,c=null,m=h();m==null&&(m=0,o.replaceState(C({},o.state,{idx:m}),""));function h(){return(o.state||{idx:null}).idx}function D(){f=W.Pop;let v=h(),p=v==null?null:v-m;m=v,c&&c({action:f,location:w.location,delta:p})}function g(v,p){f=W.Push;let L=ne(w.location,v,p);r&&r(L,v),m=h()+1;let F=ft(L,m),U=w.createHref(L);try{o.pushState(F,"",U)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;a.location.assign(U)}s&&c&&c({action:f,location:w.location,delta:1})}function y(v,p){f=W.Replace;let L=ne(w.location,v,p);r&&r(L,v),m=h();let F=ft(L,m),U=w.createHref(L);o.replaceState(F,"",U),s&&c&&c({action:f,location:w.location,delta:0})}function R(v){let p=a.location.origin!=="null"?a.location.origin:a.location.href,L=typeof v=="string"?v:ae(v);return _(p,"No window.location.(origin|href) available to create URL for href: "+L),new URL(L,p)}let w={get action(){return f},get location(){return e(a,o)},listen(v){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(ct,D),c=v,()=>{a.removeEventListener(ct,D),c=null}},createHref(v){return t(a,v)},createURL:R,encodeLocation(v){let p=R(v);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:g,replace:y,go(v){return o.go(v)}};return w}var H;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(H||(H={}));const rr=new Set(["lazy","caseSensitive","path","id","index","children"]);function nr(e){return e.index===!0}function Be(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,s)=>{let o=[...r,s],f=typeof a.id=="string"?a.id:o.join("-");if(_(a.index!==!0||!a.children,"Cannot specify children on an index route"),_(!n[f],'Found a route id collision on id "'+f+`". Route id's must be globally unique within Data Router usages`),nr(a)){let c=C({},a,t(a),{id:f});return n[f]=c,c}else{let c=C({},a,t(a),{id:f,children:void 0});return n[f]=c,a.children&&(c.children=Be(a.children,t,o,n)),c}})}function he(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?ee(t):t,a=je(n.pathname||"/",r);if(a==null)return null;let s=pt(e);ir(s);let o=null;for(let f=0;o==null&&f<s.length;++f)o=pr(s[f],gr(a));return o}function ar(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function pt(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(s,o,f)=>{let c={relativePath:f===void 0?s.path||"":f,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};c.relativePath.startsWith("/")&&(_(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let m=Se([n,c.relativePath]),h=r.concat(c);s.children&&s.children.length>0&&(_(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),pt(s.children,t,h,m)),!(s.path==null&&!s.index)&&t.push({path:m,score:fr(m,s.index),routesMeta:h})};return e.forEach((s,o)=>{var f;if(s.path===""||!((f=s.path)!=null&&f.includes("?")))a(s,o);else for(let c of mt(s.path))a(s,o,c)}),t}function mt(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return a?[s,""]:[s];let o=mt(n.join("/")),f=[];return f.push(...o.map(c=>c===""?s:[s,c].join("/"))),a&&f.push(...o),f.map(c=>e.startsWith("/")&&c===""?"/":c)}function ir(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:hr(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const or=/^:\w+$/,lr=3,sr=2,dr=1,ur=10,cr=-2,gt=e=>e==="*";function fr(e,t){let r=e.split("/"),n=r.length;return r.some(gt)&&(n+=cr),t&&(n+=sr),r.filter(a=>!gt(a)).reduce((a,s)=>a+(or.test(s)?lr:s===""?dr:ur),n)}function hr(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 pr(e,t){let{routesMeta:r}=e,n={},a="/",s=[];for(let o=0;o<r.length;++o){let f=r[o],c=o===r.length-1,m=a==="/"?t:t.slice(a.length)||"/",h=yt({path:f.relativePath,caseSensitive:f.caseSensitive,end:c},m);if(!h)return null;Object.assign(n,h.params);let D=f.route;s.push({params:n,pathname:Se([a,h.pathname]),pathnameBase:Sr(Se([a,h.pathnameBase])),route:D}),h.pathnameBase!=="/"&&(a=Se([a,h.pathnameBase]))}return s}function cn(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(Z(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=o=>o==null?"":typeof o=="string"?o:String(o),s=r.split(/\/+/).map((o,f,c)=>{if(f===c.length-1&&o==="*")return a(t["*"]);const h=o.match(/^:(\w+)(\??)$/);if(h){const[,D,g]=h;let y=t[D];return _(g==="?"||y!=null,'Missing ":'+D+'" param'),a(y)}return o.replace(/\?$/g,"")}).filter(o=>!!o);return n+s.join("/")}function yt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=mr(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),f=a.slice(1);return{params:n.reduce((m,h,D)=>{let{paramName:g,isOptional:y}=h;if(g==="*"){let w=f[D]||"";o=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const R=f[D];return y&&!R?m[g]=void 0:m[g]=yr(R||"",g),m},{}),pathname:s,pathnameBase:o,pattern:e}}function mr(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Z(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,(o,f,c)=>(n.push({paramName:f,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function gr(e){try{return decodeURI(e)}catch(t){return Z(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function yr(e,t){try{return decodeURIComponent(e)}catch(r){return Z(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function je(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 vr(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?ee(e):e;return{pathname:r?r.startsWith("/")?r:br(r,t):t,search:Dr(n),hash:xr(a)}}function br(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Ge(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 vt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function wr(e,t){let r=vt(e);return t?r.map((n,a)=>a===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Rr(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=ee(e):(a=C({},e),_(!a.pathname||!a.pathname.includes("?"),Ge("?","pathname","search",a)),_(!a.pathname||!a.pathname.includes("#"),Ge("#","pathname","hash",a)),_(!a.search||!a.search.includes("#"),Ge("#","search","hash",a)));let s=e===""||a.pathname==="",o=s?"/":a.pathname,f;if(o==null)f=r;else if(n){let D=t.length===0?[]:t[t.length-1].replace(/^\//,"").split("/");if(o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),D.pop();a.pathname=g.join("/")}f="/"+D.join("/")}else{let D=t.length-1;if(o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),D-=1;a.pathname=g.join("/")}f=D>=0?t[D]:"/"}let c=vr(a,f),m=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(m||h)&&(c.pathname+="/"),c}function fn(e){return e===""||e.pathname===""?"/":typeof e=="string"?ee(e).pathname:e.pathname}const Se=e=>e.join("/").replace(/\/\/+/g,"/"),Sr=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Dr=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,hn=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r,a=new Headers(n.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),C({},n,{headers:a}))};class bt extends null{}class Er{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],_(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((s,o)=>n=o),this.controller=new AbortController;let a=()=>n(new bt("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((s,o)=>{let[f,c]=o;return Object.assign(s,{[f]:this.trackPromise(f,c)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof bt)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let s=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>s}),this.emit(!1,r),Promise.reject(s)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(s=>{t.removeEventListener("abort",n),(s||this.done)&&a(s)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return _(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[n,a]=r;return Object.assign(t,{[n]:Lr(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Pr(e){return e instanceof Promise&&e._tracked===!0}function Lr(e){if(!Pr(e))return e;if(e._error)throw e._error;return e._data}const pn=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new Er(t,n)},Mr=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,C({},n,{headers:a}))},mn=(e,t)=>{let r=Mr(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class qe{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function wt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Rt=["post","put","patch","delete"],Ar=new Set(Rt),Tr=["get",...Rt],jr=new Set(Tr),Cr=new Set([301,302,303,307,308]),Ur=new Set([307,308]),Qe={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},St={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ce={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Et="remix-router-transitions";function _r(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;_(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let i=e.detectErrorBoundary;a=l=>({hasErrorBoundary:i(l)})}else a=xt;let s={},o=Be(e.routes,a,void 0,s),f,c=e.basename||"/",m=C({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),h=null,D=new Set,g=null,y=null,R=null,w=e.hydrationData!=null,v=he(o,e.history.location,c),p=null;if(v==null){let i=k(404,{pathname:e.history.location.pathname}),{matches:l,route:u}=Ke(o);v=l,p={[u.id]:i}}let L,F=v.some(i=>i.route.lazy),U=v.some(i=>i.route.loader);if(F)L=!1;else if(!U)L=!0;else if(m.v7_partialHydration){let i=e.hydrationData?e.hydrationData.loaderData:null,l=e.hydrationData?e.hydrationData.errors:null;L=v.every(u=>u.route.loader&&u.route.loader.hydrate!==!0&&(i&&i[u.route.id]!==void 0||l&&l[u.route.id]!==void 0))}else L=e.hydrationData!=null;let I,d={historyAction:e.history.action,location:e.history.location,matches:v,initialized:L,navigation:Qe,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||p,fetchers:new Map,blockers:new Map},O=W.Pop,T=!1,B,te=!1,Q=new Map,ie=null,Ee=!1,ye=!1,We=[],ke=[],$=new Map,$e=0,Oe=-1,Pe=new Map,oe=new Set,Le=new Map,Ie=new Map,le=new Set,ve=new Map,be=new Map,at=!1;function Jr(){if(h=e.history.listen(i=>{let{action:l,location:u,delta:b}=i;if(at){at=!1;return}Z(be.size===0||b!=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=Yt({currentLocation:d.location,nextLocation:u,historyAction:l});if(S&&b!=null){at=!0,e.history.go(b*-1),Je(S,{state:"blocked",location:u,proceed(){Je(S,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),e.history.go(b)},reset(){let M=new Map(d.blockers);M.set(S,Ce),X({blockers:M})}});return}return we(l,u)}),r){$r(t,Q);let i=()=>Vr(t,Q);t.addEventListener("pagehide",i),ie=()=>t.removeEventListener("pagehide",i)}return d.initialized||we(W.Pop,d.location,{initialHydration:!0}),I}function Yr(){h&&h(),ie&&ie(),D.clear(),B&&B.abort(),d.fetchers.forEach((i,l)=>Ve(l)),d.blockers.forEach((i,l)=>Jt(l))}function Xr(i){return D.add(i),()=>D.delete(i)}function X(i,l){l===void 0&&(l={}),d=C({},d,i);let u=[],b=[];m.v7_fetcherPersist&&d.fetchers.forEach((S,M)=>{S.state==="idle"&&(le.has(M)?b.push(M):u.push(M))}),[...D].forEach(S=>S(d,{deletedFetchers:b,unstable_viewTransitionOpts:l.viewTransitionOpts,unstable_flushSync:l.flushSync===!0})),m.v7_fetcherPersist&&(u.forEach(S=>d.fetchers.delete(S)),b.forEach(S=>Ve(S)))}function He(i,l,u){var b,S;let{flushSync:M}=u===void 0?{}:u,P=d.actionData!=null&&d.navigation.formMethod!=null&&G(d.navigation.formMethod)&&d.navigation.state==="loading"&&((b=i.state)==null?void 0:b._isRedirect)!==!0,E;l.actionData?Object.keys(l.actionData).length>0?E=l.actionData:E=null:P?E=d.actionData:E=null;let x=l.loaderData?Ft(d.loaderData,l.loaderData,l.matches||[],l.errors):d.loaderData,j=d.blockers;j.size>0&&(j=new Map(j),j.forEach((N,Y)=>j.set(Y,Ce)));let V=T===!0||d.navigation.formMethod!=null&&G(d.navigation.formMethod)&&((S=i.state)==null?void 0:S._isRedirect)!==!0;f&&(o=f,f=void 0),Ee||O===W.Pop||(O===W.Push?e.history.push(i,i.state):O===W.Replace&&e.history.replace(i,i.state));let A;if(O===W.Pop){let N=Q.get(d.location.pathname);N&&N.has(i.pathname)?A={currentLocation:d.location,nextLocation:i}:Q.has(i.pathname)&&(A={currentLocation:i,nextLocation:d.location})}else if(te){let N=Q.get(d.location.pathname);N?N.add(i.pathname):(N=new Set([i.pathname]),Q.set(d.location.pathname,N)),A={currentLocation:d.location,nextLocation:i}}X(C({},l,{actionData:E,loaderData:x,historyAction:O,location:i,initialized:!0,navigation:Qe,revalidation:"idle",restoreScrollPosition:Gt(i,l.matches||d.matches),preventScrollReset:V,blockers:j}),{viewTransitionOpts:A,flushSync:M===!0}),O=W.Pop,T=!1,te=!1,Ee=!1,ye=!1,We=[],ke=[]}async function Bt(i,l){if(typeof i=="number"){e.history.go(i);return}let u=Ze(d.location,d.matches,c,m.v7_prependBasename,i,m.v7_relativeSplatPath,l==null?void 0:l.fromRouteId,l==null?void 0:l.relative),{path:b,submission:S,error:M}=Pt(m.v7_normalizeFormMethod,!1,u,l),P=d.location,E=ne(d.location,b,l&&l.state);E=C({},E,e.history.encodeLocation(E));let x=l&&l.replace!=null?l.replace:void 0,j=W.Push;x===!0?j=W.Replace:x===!1||S!=null&&G(S.formMethod)&&S.formAction===d.location.pathname+d.location.search&&(j=W.Replace);let V=l&&"preventScrollReset"in l?l.preventScrollReset===!0:void 0,A=(l&&l.unstable_flushSync)===!0,N=Yt({currentLocation:P,nextLocation:E,historyAction:j});if(N){Je(N,{state:"blocked",location:E,proceed(){Je(N,{state:"proceeding",proceed:void 0,reset:void 0,location:E}),Bt(i,l)},reset(){let Y=new Map(d.blockers);Y.set(N,Ce),X({blockers:Y})}});return}return await we(j,E,{submission:S,pendingError:M,preventScrollReset:V,replace:l&&l.replace,enableViewTransition:l&&l.unstable_viewTransition,flushSync:A})}function Gr(){if(it(),X({revalidation:"loading"}),d.navigation.state!=="submitting"){if(d.navigation.state==="idle"){we(d.historyAction,d.location,{startUninterruptedRevalidation:!0});return}we(O||d.historyAction,d.navigation.location,{overrideNavigation:d.navigation})}}async function we(i,l,u){B&&B.abort(),B=null,O=i,Ee=(u&&u.startUninterruptedRevalidation)===!0,on(d.location,d.matches),T=(u&&u.preventScrollReset)===!0,te=(u&&u.enableViewTransition)===!0;let b=f||o,S=u&&u.overrideNavigation,M=he(b,l,c),P=(u&&u.flushSync)===!0;if(!M){let Y=k(404,{pathname:l.pathname}),{matches:q,route:J}=Ke(b);ot(),He(l,{matches:q,loaderData:{},errors:{[J.id]:Y}},{flushSync:P});return}if(d.initialized&&!ye&&zr(d.location,l)&&!(u&&u.submission&&G(u.submission.formMethod))){He(l,{matches:M},{flushSync:P});return}B=new AbortController;let E=Ue(e.history,l,B.signal,u&&u.submission),x,j;if(u&&u.pendingError)j={[De(M).route.id]:u.pendingError};else if(u&&u.submission&&G(u.submission.formMethod)){let Y=await qr(E,l,u.submission,M,{replace:u.replace,flushSync:P});if(Y.shortCircuited)return;x=Y.pendingActionData,j=Y.pendingActionError,S=nt(l,u.submission),P=!1,E=new Request(E.url,{signal:E.signal})}let{shortCircuited:V,loaderData:A,errors:N}=await Qr(E,l,M,S,u&&u.submission,u&&u.fetcherSubmission,u&&u.replace,u&&u.initialHydration===!0,P,x,j);V||(B=null,He(l,C({matches:M},x?{actionData:x}:{},{loaderData:A,errors:N})))}async function qr(i,l,u,b,S){S===void 0&&(S={}),it();let M=Wr(l,u);X({navigation:M},{flushSync:S.flushSync===!0});let P,E=_e(b,l);if(!E.route.action&&!E.route.lazy)P={type:H.error,error:k(405,{method:i.method,pathname:l.pathname,routeId:E.route.id})};else if(P=await pe("action",i,E,b,s,a,c,m.v7_relativeSplatPath),i.signal.aborted)return{shortCircuited:!0};if(ge(P)){let x;return S&&S.replace!=null?x=S.replace:x=P.location===d.location.pathname+d.location.search,await ze(d,P,{submission:u,replace:x}),{shortCircuited:!0}}if(me(P)){let x=De(b,E.route.id);return(S&&S.replace)!==!0&&(O=W.Push),{pendingActionData:{},pendingActionError:{[x.route.id]:P.error}}}if(se(P))throw k(400,{type:"defer-action"});return{pendingActionData:{[E.route.id]:P.data}}}async function Qr(i,l,u,b,S,M,P,E,x,j,V){let A=b||nt(l,S),N=S||M||Nt(A),Y=f||o,[q,J]=Mt(e.history,d,u,N,l,m.v7_partialHydration&&E===!0,ye,We,ke,le,Le,oe,Y,c,j,V);if(ot(z=>!(u&&u.some(K=>K.route.id===z))||q&&q.some(K=>K.route.id===z)),Oe=++$e,q.length===0&&J.length===0){let z=$t();return He(l,C({matches:u,loaderData:{},errors:V||null},j?{actionData:j}:{},z?{fetchers:new Map(d.fetchers)}:{}),{flushSync:x}),{shortCircuited:!0}}if(!Ee&&(!m.v7_partialHydration||!E)){J.forEach(K=>{let re=d.fetchers.get(K.key),Xe=Fe(void 0,re?re.data:void 0);d.fetchers.set(K.key,Xe)});let z=j||d.actionData;X(C({navigation:A},z?Object.keys(z).length===0?{actionData:null}:{actionData:z}:{},J.length>0?{fetchers:new Map(d.fetchers)}:{}),{flushSync:x})}J.forEach(z=>{$.has(z.key)&&ce(z.key),z.controller&&$.set(z.key,z.controller)});let Me=()=>J.forEach(z=>ce(z.key));B&&B.signal.addEventListener("abort",Me);let{results:lt,loaderResults:Ae,fetcherResults:fe}=await Kt(d.matches,u,q,J,i);if(i.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",Me),J.forEach(z=>$.delete(z.key));let Re=Ot(lt);if(Re){if(Re.idx>=q.length){let z=J[Re.idx-q.length].key;oe.add(z)}return await ze(d,Re.result,{replace:P}),{shortCircuited:!0}}let{loaderData:st,errors:dt}=_t(d,u,q,Ae,V,J,fe,ve);ve.forEach((z,K)=>{z.subscribe(re=>{(re||z.done)&&ve.delete(K)})});let ut=$t(),Te=Vt(Oe),Ye=ut||Te||J.length>0;return C({loaderData:st,errors:dt},Ye?{fetchers:new Map(d.fetchers)}:{})}function Zr(i,l,u,b){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");$.has(i)&&ce(i);let S=(b&&b.unstable_flushSync)===!0,M=f||o,P=Ze(d.location,d.matches,c,m.v7_prependBasename,u,m.v7_relativeSplatPath,l,b==null?void 0:b.relative),E=he(M,P,c);if(!E){Ne(i,l,k(404,{pathname:P}),{flushSync:S});return}let{path:x,submission:j,error:V}=Pt(m.v7_normalizeFormMethod,!0,P,b);if(V){Ne(i,l,V,{flushSync:S});return}let A=_e(E,x);if(T=(b&&b.preventScrollReset)===!0,j&&G(j.formMethod)){en(i,l,x,A,E,S,j);return}Le.set(i,{routeId:l,path:x}),tn(i,l,x,A,E,S,j)}async function en(i,l,u,b,S,M,P){if(it(),Le.delete(i),!b.route.action&&!b.route.lazy){let K=k(405,{method:P.formMethod,pathname:u,routeId:l});Ne(i,l,K,{flushSync:M});return}let E=d.fetchers.get(i);ue(i,kr(P,E),{flushSync:M});let x=new AbortController,j=Ue(e.history,u,x.signal,P);$.set(i,x);let V=$e,A=await pe("action",j,b,S,s,a,c,m.v7_relativeSplatPath);if(j.signal.aborted){$.get(i)===x&&$.delete(i);return}if(le.has(i)){ue(i,de(void 0));return}if(ge(A))if($.delete(i),Oe>V){ue(i,de(void 0));return}else return oe.add(i),ue(i,Fe(P)),ze(d,A,{fetcherSubmission:P});if(me(A)){Ne(i,l,A.error);return}if(se(A))throw k(400,{type:"defer-action"});let N=d.navigation.location||d.location,Y=Ue(e.history,N,x.signal),q=f||o,J=d.navigation.state!=="idle"?he(q,d.navigation.location,c):d.matches;_(J,"Didn't find any matches after fetcher action");let Me=++$e;Pe.set(i,Me);let lt=Fe(P,A.data);d.fetchers.set(i,lt);let[Ae,fe]=Mt(e.history,d,J,P,N,!1,ye,We,ke,le,Le,oe,q,c,{[b.route.id]:A.data},void 0);fe.filter(K=>K.key!==i).forEach(K=>{let re=K.key,Xe=d.fetchers.get(re),sn=Fe(void 0,Xe?Xe.data:void 0);d.fetchers.set(re,sn),$.has(re)&&ce(re),K.controller&&$.set(re,K.controller)}),X({fetchers:new Map(d.fetchers)});let Re=()=>fe.forEach(K=>ce(K.key));x.signal.addEventListener("abort",Re);let{results:st,loaderResults:dt,fetcherResults:ut}=await Kt(d.matches,J,Ae,fe,Y);if(x.signal.aborted)return;x.signal.removeEventListener("abort",Re),Pe.delete(i),$.delete(i),fe.forEach(K=>$.delete(K.key));let Te=Ot(st);if(Te){if(Te.idx>=Ae.length){let K=fe[Te.idx-Ae.length].key;oe.add(K)}return ze(d,Te.result)}let{loaderData:Ye,errors:z}=_t(d,d.matches,Ae,dt,void 0,fe,ut,ve);if(d.fetchers.has(i)){let K=de(A.data);d.fetchers.set(i,K)}Vt(Me),d.navigation.state==="loading"&&Me>Oe?(_(O,"Expected pending action"),B&&B.abort(),He(d.navigation.location,{matches:J,loaderData:Ye,errors:z,fetchers:new Map(d.fetchers)})):(X({errors:z,loaderData:Ft(d.loaderData,Ye,J,z),fetchers:new Map(d.fetchers)}),ye=!1)}async function tn(i,l,u,b,S,M,P){let E=d.fetchers.get(i);ue(i,Fe(P,E?E.data:void 0),{flushSync:M});let x=new AbortController,j=Ue(e.history,u,x.signal);$.set(i,x);let V=$e,A=await pe("loader",j,b,S,s,a,c,m.v7_relativeSplatPath);if(se(A)&&(A=await zt(A,j.signal,!0)||A),$.get(i)===x&&$.delete(i),!j.signal.aborted){if(le.has(i)){ue(i,de(void 0));return}if(ge(A))if(Oe>V){ue(i,de(void 0));return}else{oe.add(i),await ze(d,A);return}if(me(A)){Ne(i,l,A.error);return}_(!se(A),"Unhandled fetcher deferred data"),ue(i,de(A.data))}}async function ze(i,l,u){let{submission:b,fetcherSubmission:S,replace:M}=u===void 0?{}:u;l.revalidate&&(ye=!0);let P=ne(i.location,l.location,{_isRedirect:!0});if(_(P,"Expected a location on the redirect navigation"),r){let N=!1;if(l.reloadDocument)N=!0;else if(Dt.test(l.location)){const Y=e.history.createURL(l.location);N=Y.origin!==t.location.origin||je(Y.pathname,c)==null}if(N){M?t.location.replace(l.location):t.location.assign(l.location);return}}B=null;let E=M===!0?W.Replace:W.Push,{formMethod:x,formAction:j,formEncType:V}=i.navigation;!b&&!S&&x&&j&&V&&(b=Nt(i.navigation));let A=b||S;if(Ur.has(l.status)&&A&&G(A.formMethod))await we(E,P,{submission:C({},A,{formAction:l.location}),preventScrollReset:T});else{let N=nt(P,b);await we(E,P,{overrideNavigation:N,fetcherSubmission:S,preventScrollReset:T})}}async function Kt(i,l,u,b,S){let M=await Promise.all([...u.map(x=>pe("loader",S,x,l,s,a,c,m.v7_relativeSplatPath)),...b.map(x=>x.matches&&x.match&&x.controller?pe("loader",Ue(e.history,x.path,x.controller.signal),x.match,x.matches,s,a,c,m.v7_relativeSplatPath):{type:H.error,error:k(404,{pathname:x.path})})]),P=M.slice(0,u.length),E=M.slice(u.length);return await Promise.all([Ht(i,u,P,P.map(()=>S.signal),!1,d.loaderData),Ht(i,b.map(x=>x.match),E,b.map(x=>x.controller?x.controller.signal:null),!0)]),{results:M,loaderResults:P,fetcherResults:E}}function it(){ye=!0,We.push(...ot()),Le.forEach((i,l)=>{$.has(l)&&(ke.push(l),ce(l))})}function ue(i,l,u){u===void 0&&(u={}),d.fetchers.set(i,l),X({fetchers:new Map(d.fetchers)},{flushSync:(u&&u.flushSync)===!0})}function Ne(i,l,u,b){b===void 0&&(b={});let S=De(d.matches,l);Ve(i),X({errors:{[S.route.id]:u},fetchers:new Map(d.fetchers)},{flushSync:(b&&b.flushSync)===!0})}function Wt(i){return m.v7_fetcherPersist&&(Ie.set(i,(Ie.get(i)||0)+1),le.has(i)&&le.delete(i)),d.fetchers.get(i)||St}function Ve(i){let l=d.fetchers.get(i);$.has(i)&&!(l&&l.state==="loading"&&Pe.has(i))&&ce(i),Le.delete(i),Pe.delete(i),oe.delete(i),le.delete(i),d.fetchers.delete(i)}function rn(i){if(m.v7_fetcherPersist){let l=(Ie.get(i)||0)-1;l<=0?(Ie.delete(i),le.add(i)):Ie.set(i,l)}else Ve(i);X({fetchers:new Map(d.fetchers)})}function ce(i){let l=$.get(i);_(l,"Expected fetch controller: "+i),l.abort(),$.delete(i)}function kt(i){for(let l of i){let u=Wt(l),b=de(u.data);d.fetchers.set(l,b)}}function $t(){let i=[],l=!1;for(let u of oe){let b=d.fetchers.get(u);_(b,"Expected fetcher: "+u),b.state==="loading"&&(oe.delete(u),i.push(u),l=!0)}return kt(i),l}function Vt(i){let l=[];for(let[u,b]of Pe)if(b<i){let S=d.fetchers.get(u);_(S,"Expected fetcher: "+u),S.state==="loading"&&(ce(u),Pe.delete(u),l.push(u))}return kt(l),l.length>0}function nn(i,l){let u=d.blockers.get(i)||Ce;return be.get(i)!==l&&be.set(i,l),u}function Jt(i){d.blockers.delete(i),be.delete(i)}function Je(i,l){let u=d.blockers.get(i)||Ce;_(u.state==="unblocked"&&l.state==="blocked"||u.state==="blocked"&&l.state==="blocked"||u.state==="blocked"&&l.state==="proceeding"||u.state==="blocked"&&l.state==="unblocked"||u.state==="proceeding"&&l.state==="unblocked","Invalid blocker state transition: "+u.state+" -> "+l.state);let b=new Map(d.blockers);b.set(i,l),X({blockers:b})}function Yt(i){let{currentLocation:l,nextLocation:u,historyAction:b}=i;if(be.size===0)return;be.size>1&&Z(!1,"A router only supports one blocker at a time");let S=Array.from(be.entries()),[M,P]=S[S.length-1],E=d.blockers.get(M);if(!(E&&E.state==="proceeding")&&P({currentLocation:l,nextLocation:u,historyAction:b}))return M}function ot(i){let l=[];return ve.forEach((u,b)=>{(!i||i(b))&&(u.cancel(),l.push(b),ve.delete(b))}),l}function an(i,l,u){if(g=i,R=l,y=u||null,!w&&d.navigation===Qe){w=!0;let b=Gt(d.location,d.matches);b!=null&&X({restoreScrollPosition:b})}return()=>{g=null,R=null,y=null}}function Xt(i,l){return y&&y(i,l.map(b=>ar(b,d.loaderData)))||i.key}function on(i,l){if(g&&R){let u=Xt(i,l);g[u]=R()}}function Gt(i,l){if(g){let u=Xt(i,l),b=g[u];if(typeof b=="number")return b}return null}function ln(i){s={},f=Be(i,a,void 0,s)}return I={get basename(){return c},get future(){return m},get state(){return d},get routes(){return o},get window(){return t},initialize:Jr,subscribe:Xr,enableScrollRestoration:an,navigate:Bt,fetch:Zr,revalidate:Gr,createHref:i=>e.history.createHref(i),encodeLocation:i=>e.history.encodeLocation(i),getFetcher:Wt,deleteFetcher:rn,dispose:Yr,getBlocker:nn,deleteBlocker:Jt,_internalFetchControllers:$,_internalActiveDeferreds:ve,_internalSetRoutes:ln},I}const Fr=Symbol("deferred");function gn(e,t){_(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},n=(t?t.basename:null)||"/",a;if(t!=null&&t.mapRouteProperties)a=t.mapRouteProperties;else if(t!=null&&t.detectErrorBoundary){let g=t.detectErrorBoundary;a=y=>({hasErrorBoundary:g(y)})}else a=xt;let s=C({v7_relativeSplatPath:!1},t?t.future:null),o=Be(e,a,void 0,r);async function f(g,y){let{requestContext:R}=y===void 0?{}:y,w=new URL(g.url),v=g.method,p=ne("",ae(w),null,"default"),L=he(o,p,n);if(!tt(v)&&v!=="HEAD"){let U=k(405,{method:v}),{matches:I,route:d}=Ke(o);return{basename:n,location:p,matches:I,loaderData:{},actionData:null,errors:{[d.id]:U},statusCode:U.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!L){let U=k(404,{pathname:p.pathname}),{matches:I,route:d}=Ke(o);return{basename:n,location:p,matches:I,loaderData:{},actionData:null,errors:{[d.id]:U},statusCode:U.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let F=await m(g,p,L,R);return xe(F)?F:C({location:p,basename:n},F)}async function c(g,y){let{routeId:R,requestContext:w}=y===void 0?{}:y,v=new URL(g.url),p=g.method,L=ne("",ae(v),null,"default"),F=he(o,L,n);if(!tt(p)&&p!=="HEAD"&&p!=="OPTIONS")throw k(405,{method:p});if(!F)throw k(404,{pathname:L.pathname});let U=R?F.find(T=>T.route.id===R):_e(F,L);if(R&&!U)throw k(403,{pathname:L.pathname,routeId:R});if(!U)throw k(404,{pathname:L.pathname});let I=await m(g,L,F,w,U);if(xe(I))return I;let d=I.errors?Object.values(I.errors)[0]:void 0;if(d!==void 0)throw d;if(I.actionData)return Object.values(I.actionData)[0];if(I.loaderData){var O;let T=Object.values(I.loaderData)[0];return(O=I.activeDeferreds)!=null&&O[U.route.id]&&(T[Fr]=I.activeDeferreds[U.route.id]),T}}async function m(g,y,R,w,v){_(g.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(G(g.method.toLowerCase()))return await h(g,R,v||_e(R,y),w,v!=null);let p=await D(g,R,w,v);return xe(p)?p:C({},p,{actionData:null,actionHeaders:{}})}catch(p){if(Kr(p)){if(p.type===H.error)throw p.response;return p.response}if(Br(p))return p;throw p}}async function h(g,y,R,w,v){let p;if(!R.route.action&&!R.route.lazy){let U=k(405,{method:g.method,pathname:new URL(g.url).pathname,routeId:R.route.id});if(v)throw U;p={type:H.error,error:U}}else if(p=await pe("action",g,R,y,r,a,n,s.v7_relativeSplatPath,{isStaticRequest:!0,isRouteRequest:v,requestContext:w}),g.signal.aborted){let U=v?"queryRoute":"query";throw new Error(U+"() call aborted: "+g.method+" "+g.url)}if(ge(p))throw new Response(null,{status:p.status,headers:{Location:p.location}});if(se(p)){let U=k(400,{type:"defer-action"});if(v)throw U;p={type:H.error,error:U}}if(v){if(me(p))throw p.error;return{matches:[R],loaderData:{},actionData:{[R.route.id]:p.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(me(p)){let U=De(y,R.route.id),I=await D(g,y,w,void 0,{[U.route.id]:p.error});return C({},I,{statusCode:wt(p.error)?p.error.status:500,actionData:null,actionHeaders:C({},p.headers?{[R.route.id]:p.headers}:{})})}let L=new Request(g.url,{headers:g.headers,redirect:g.redirect,signal:g.signal}),F=await D(L,y,w);return C({},F,p.statusCode?{statusCode:p.statusCode}:{},{actionData:{[R.route.id]:p.data},actionHeaders:C({},p.headers?{[R.route.id]:p.headers}:{})})}async function D(g,y,R,w,v){let p=w!=null;if(p&&!(w!=null&&w.route.loader)&&!(w!=null&&w.route.lazy))throw k(400,{method:g.method,pathname:new URL(g.url).pathname,routeId:w==null?void 0:w.route.id});let F=(w?[w]:Lt(y,Object.keys(v||{})[0])).filter(T=>T.route.loader||T.route.lazy);if(F.length===0)return{matches:y,loaderData:y.reduce((T,B)=>Object.assign(T,{[B.route.id]:null}),{}),errors:v||null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let U=await Promise.all([...F.map(T=>pe("loader",g,T,y,r,a,n,s.v7_relativeSplatPath,{isStaticRequest:!0,isRouteRequest:p,requestContext:R}))]);if(g.signal.aborted){let T=p?"queryRoute":"query";throw new Error(T+"() call aborted: "+g.method+" "+g.url)}let I=new Map,d=Ut(y,F,U,v,I),O=new Set(F.map(T=>T.route.id));return y.forEach(T=>{O.has(T.route.id)||(d.loaderData[T.route.id]=null)}),C({},d,{matches:y,activeDeferreds:I.size>0?Object.fromEntries(I.entries()):null})}return{dataRoutes:o,query:f,queryRoute:c}}function yn(e,t,r){return C({},t,{statusCode:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function Or(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ze(e,t,r,n,a,s,o,f){let c,m;if(o){c=[];for(let D of t)if(c.push(D),D.route.id===o){m=D;break}}else c=t,m=t[t.length-1];let h=Rr(a||".",wr(c,s),je(e.pathname,r)||e.pathname,f==="path");return a==null&&(h.search=e.search,h.hash=e.hash),(a==null||a===""||a===".")&&m&&m.route.index&&!rt(h.search)&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(h.pathname=h.pathname==="/"?r:Se([r,h.pathname])),ae(h)}function Pt(e,t,r,n){if(!n||!Or(n))return{path:r};if(n.formMethod&&!tt(n.formMethod))return{path:r,error:k(405,{method:n.formMethod})};let a=()=>({path:r,error:k(400,{type:"invalid-body"})}),s=n.formMethod||"get",o=e?s.toUpperCase():s.toLowerCase(),f=It(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!G(o))return a();let g=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((y,R)=>{let[w,v]=R;return""+y+w+"="+v+`
|
|
2
|
-
`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:f,formEncType:n.formEncType,formData:void 0,json:void 0,text:g}}}else if(n.formEncType==="application/json"){if(!G(o))return a();try{let g=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:f,formEncType:n.formEncType,formData:void 0,json:g,text:void 0}}}catch{return a()}}}_(typeof FormData=="function","FormData is not available in this environment");let c,m;if(n.formData)c=et(n.formData),m=n.formData;else if(n.body instanceof FormData)c=et(n.body),m=n.body;else if(n.body instanceof URLSearchParams)c=n.body,m=Ct(c);else if(n.body==null)c=new URLSearchParams,m=new FormData;else try{c=new URLSearchParams(n.body),m=Ct(c)}catch{return a()}let h={formMethod:o,formAction:f,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(G(h.formMethod))return{path:r,submission:h};let D=ee(r);return t&&D.search&&rt(D.search)&&c.append("index",""),D.search="?"+c,{path:ae(D),submission:h}}function Lt(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function Mt(e,t,r,n,a,s,o,f,c,m,h,D,g,y,R,w){let v=w?Object.values(w)[0]:R?Object.values(R)[0]:void 0,p=e.createURL(t.location),L=e.createURL(a),F=w?Object.keys(w)[0]:void 0,I=Lt(r,F).filter((O,T)=>{if(s)return Ir(t,O.route);if(O.route.lazy)return!0;if(O.route.loader==null)return!1;if(Hr(t.loaderData,t.matches[T],O)||f.some(Q=>Q===O.route.id))return!0;let B=t.matches[T],te=O;return Tt(O,C({currentUrl:p,currentParams:B.params,nextUrl:L,nextParams:te.params},n,{actionResult:v,defaultShouldRevalidate:o||p.pathname+p.search===L.pathname+L.search||p.search!==L.search||At(B,te)}))}),d=[];return h.forEach((O,T)=>{if(s||!r.some(Ee=>Ee.route.id===O.routeId)||m.has(T))return;let B=he(g,O.path,y);if(!B){d.push({key:T,routeId:O.routeId,path:O.path,matches:null,match:null,controller:null});return}let te=t.fetchers.get(T),Q=_e(B,O.path),ie=!1;D.has(T)?ie=!1:c.includes(T)?ie=!0:te&&te.state!=="idle"&&te.data===void 0?ie=o:ie=Tt(Q,C({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:L,nextParams:r[r.length-1].params},n,{actionResult:v,defaultShouldRevalidate:o})),ie&&d.push({key:T,routeId:O.routeId,path:O.path,matches:B,match:Q,controller:new AbortController})}),[I,d]}function Ir(e,t){return t.loader?t.loader.hydrate?!0:e.loaderData[t.id]===void 0&&(!e.errors||e.errors[t.id]===void 0):!1}function Hr(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function At(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Tt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function jt(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];_(a,"No route found in manifest");let s={};for(let o in n){let c=a[o]!==void 0&&o!=="hasErrorBoundary";Z(!c,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!c&&!rr.has(o)&&(s[o]=n[o])}Object.assign(a,s),Object.assign(a,C({},t(a),{lazy:void 0}))}async function pe(e,t,r,n,a,s,o,f,c){c===void 0&&(c={});let m,h,D,g=w=>{let v,p=new Promise((L,F)=>v=F);return D=()=>v(),t.signal.addEventListener("abort",D),Promise.race([w({request:t,params:r.params,context:c.requestContext}),p])};try{let w=r.route[e];if(r.route.lazy)if(w){let v,p=await Promise.all([g(w).catch(L=>{v=L}),jt(r.route,s,a)]);if(v)throw v;h=p[0]}else if(await jt(r.route,s,a),w=r.route[e],w)h=await g(w);else if(e==="action"){let v=new URL(t.url),p=v.pathname+v.search;throw k(405,{method:t.method,pathname:p,routeId:r.route.id})}else return{type:H.data,data:void 0};else if(w)h=await g(w);else{let v=new URL(t.url),p=v.pathname+v.search;throw k(404,{pathname:p})}_(h!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(w){m=H.error,h=w}finally{D&&t.signal.removeEventListener("abort",D)}if(xe(h)){let w=h.status;if(Cr.has(w)){let p=h.headers.get("Location");if(_(p,"Redirects returned/thrown from loaders/actions must have a Location header"),!Dt.test(p))p=Ze(new URL(t.url),n.slice(0,n.indexOf(r)+1),o,!0,p,f);else if(!c.isStaticRequest){let L=new URL(t.url),F=p.startsWith("//")?new URL(L.protocol+p):new URL(p),U=je(F.pathname,o)!=null;F.origin===L.origin&&U&&(p=F.pathname+F.search+F.hash)}if(c.isStaticRequest)throw h.headers.set("Location",p),h;return{type:H.redirect,status:w,location:p,revalidate:h.headers.get("X-Remix-Revalidate")!==null,reloadDocument:h.headers.get("X-Remix-Reload-Document")!==null}}if(c.isRouteRequest)throw{type:m===H.error?H.error:H.data,response:h};let v;try{let p=h.headers.get("Content-Type");p&&/\bapplication\/json\b/.test(p)?v=await h.json():v=await h.text()}catch(p){return{type:H.error,error:p}}return m===H.error?{type:m,error:new qe(w,h.statusText,v),headers:h.headers}:{type:H.data,data:v,statusCode:h.status,headers:h.headers}}if(m===H.error)return{type:m,error:h};if(Nr(h)){var y,R;return{type:H.deferred,deferredData:h,statusCode:(y=h.init)==null?void 0:y.status,headers:((R=h.init)==null?void 0:R.headers)&&new Headers(h.init.headers)}}return{type:H.data,data:h}}function Ue(e,t,r,n){let a=e.createURL(It(t)).toString(),s={signal:r};if(n&&G(n.formMethod)){let{formMethod:o,formEncType:f}=n;s.method=o.toUpperCase(),f==="application/json"?(s.headers=new Headers({"Content-Type":f}),s.body=JSON.stringify(n.json)):f==="text/plain"?s.body=n.text:f==="application/x-www-form-urlencoded"&&n.formData?s.body=et(n.formData):s.body=n.formData}return new Request(a,s)}function et(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Ct(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Ut(e,t,r,n,a){let s={},o=null,f,c=!1,m={};return r.forEach((h,D)=>{let g=t[D].route.id;if(_(!ge(h),"Cannot handle redirect results in processLoaderData"),me(h)){let y=De(e,g),R=h.error;n&&(R=Object.values(n)[0],n=void 0),o=o||{},o[y.route.id]==null&&(o[y.route.id]=R),s[g]=void 0,c||(c=!0,f=wt(h.error)?h.error.status:500),h.headers&&(m[g]=h.headers)}else se(h)?(a.set(g,h.deferredData),s[g]=h.deferredData.data):s[g]=h.data,h.statusCode!=null&&h.statusCode!==200&&!c&&(f=h.statusCode),h.headers&&(m[g]=h.headers)}),n&&(o=n,s[Object.keys(n)[0]]=void 0),{loaderData:s,errors:o,statusCode:f||200,loaderHeaders:m}}function _t(e,t,r,n,a,s,o,f){let{loaderData:c,errors:m}=Ut(t,r,n,a,f);for(let h=0;h<s.length;h++){let{key:D,match:g,controller:y}=s[h];_(o!==void 0&&o[h]!==void 0,"Did not find corresponding fetcher result");let R=o[h];if(!(y&&y.signal.aborted))if(me(R)){let w=De(e.matches,g==null?void 0:g.route.id);m&&m[w.route.id]||(m=C({},m,{[w.route.id]:R.error})),e.fetchers.delete(D)}else if(ge(R))_(!1,"Unhandled fetcher revalidation redirect");else if(se(R))_(!1,"Unhandled fetcher deferred data");else{let w=de(R.data);e.fetchers.set(D,w)}}return{loaderData:c,errors:m}}function Ft(e,t,r,n){let a=C({},t);for(let s of r){let o=s.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(a[o]=t[o]):e[o]!==void 0&&s.route.loader&&(a[o]=e[o]),n&&n.hasOwnProperty(o))break}return a}function De(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 Ke(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 k(e,t){let{pathname:r,routeId:n,method:a,type:s}=t===void 0?{}:t,o="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(o="Bad Request",a&&r&&n?f="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":s==="defer-action"?f="defer() is not supported in actions":s==="invalid-body"&&(f="Unable to encode submission body")):e===403?(o="Forbidden",f='Route "'+n+'" does not match URL "'+r+'"'):e===404?(o="Not Found",f='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",a&&r&&n?f="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(f='Invalid request method "'+a.toUpperCase()+'"')),new qe(e||500,o,new Error(f),!0)}function Ot(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ge(r))return{result:r,idx:t}}}function It(e){let t=typeof e=="string"?ee(e):e;return ae(C({},t,{hash:""}))}function zr(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function se(e){return e.type===H.deferred}function me(e){return e.type===H.error}function ge(e){return(e&&e.type)===H.redirect}function Nr(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function xe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Br(e){if(!xe(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function Kr(e){return e&&xe(e.response)&&(e.type===H.data||e.type===H.error)}function tt(e){return jr.has(e.toLowerCase())}function G(e){return Ar.has(e.toLowerCase())}async function Ht(e,t,r,n,a,s){for(let o=0;o<r.length;o++){let f=r[o],c=t[o];if(!c)continue;let m=e.find(D=>D.route.id===c.route.id),h=m!=null&&!At(m,c)&&(s&&s[c.route.id])!==void 0;if(se(f)&&(a||h)){let D=n[o];_(D,"Expected an AbortSignal for revalidating fetcher deferred result"),await zt(f,D,a).then(g=>{g&&(r[o]=g||r[o])})}}}async function zt(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:H.data,data:e.deferredData.unwrappedData}}catch(a){return{type:H.error,error:a}}return{type:H.data,data:e.deferredData.data}}}function rt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function _e(e,t){let r=typeof t=="string"?ee(t).search:t.search;if(e[e.length-1].route.index&&rt(r||""))return e[e.length-1];let n=vt(e);return n[n.length-1]}function Nt(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:s,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function nt(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Wr(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Fe(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 kr(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 de(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 $r(e,t){try{let r=e.sessionStorage.getItem(Et);if(r){let n=JSON.parse(r);for(let[a,s]of Object.entries(n||{}))s&&Array.isArray(s)&&t.set(a,new Set(s||[]))}}catch{}}function Vr(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Et,JSON.stringify(r))}catch(n){Z(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1216],{79655:function(Ge,$,F){var q,ee;F.r($),F.d($,{AbortedDeferredError:function(){return E.X3},Await:function(){return i.Await},BrowserRouter:function(){return Ue},Form:function(){return oe},HashRouter:function(){return De},Link:function(){return re},MemoryRouter:function(){return i.MemoryRouter},NavLink:function(){return Ie},Navigate:function(){return i.Navigate},NavigationType:function(){return E.aU},Outlet:function(){return i.Outlet},Route:function(){return i.Route},Router:function(){return i.Router},RouterProvider:function(){return Ae},Routes:function(){return i.Routes},ScrollRestoration:function(){return Ke},UNSAFE_DataRouterContext:function(){return i.UNSAFE_DataRouterContext},UNSAFE_DataRouterStateContext:function(){return i.UNSAFE_DataRouterStateContext},UNSAFE_FetchersContext:function(){return Y},UNSAFE_LocationContext:function(){return i.UNSAFE_LocationContext},UNSAFE_NavigationContext:function(){return i.UNSAFE_NavigationContext},UNSAFE_RouteContext:function(){return i.UNSAFE_RouteContext},UNSAFE_ViewTransitionContext:function(){return Z},UNSAFE_useRouteId:function(){return i.UNSAFE_useRouteId},UNSAFE_useScrollRestoration:function(){return le},createBrowserRouter:function(){return be},createHashRouter:function(){return Ce},createMemoryRouter:function(){return i.createMemoryRouter},createPath:function(){return E.Ep},createRoutesFromChildren:function(){return i.createRoutesFromChildren},createRoutesFromElements:function(){return i.createRoutesFromElements},createSearchParams:function(){return K},defer:function(){return E.PQ},generatePath:function(){return E.Gn},isRouteErrorResponse:function(){return E.WK},json:function(){return E.AV},matchPath:function(){return E.LX},matchRoutes:function(){return E.fp},parsePath:function(){return E.cP},redirect:function(){return E.uX},redirectDocument:function(){return E.fZ},renderMatches:function(){return i.renderMatches},resolvePath:function(){return E.i3},unstable_HistoryRouter:function(){return Oe},unstable_usePrompt:function(){return ze},unstable_useViewTransitionState:function(){return ce},useActionData:function(){return i.useActionData},useAsyncError:function(){return i.useAsyncError},useAsyncValue:function(){return i.useAsyncValue},useBeforeUnload:function(){return Xe},useBlocker:function(){return i.useBlocker},useFetcher:function(){return Ve},useFetchers:function(){return Je},useFormAction:function(){return ue},useHref:function(){return i.useHref},useInRouterContext:function(){return i.useInRouterContext},useLinkClickHandler:function(){return ae},useLoaderData:function(){return i.useLoaderData},useLocation:function(){return i.useLocation},useMatch:function(){return i.useMatch},useMatches:function(){return i.useMatches},useNavigate:function(){return i.useNavigate},useNavigation:function(){return i.useNavigation},useNavigationType:function(){return i.useNavigationType},useOutlet:function(){return i.useOutlet},useOutletContext:function(){return i.useOutletContext},useParams:function(){return i.useParams},useResolvedPath:function(){return i.useResolvedPath},useRevalidator:function(){return i.useRevalidator},useRouteError:function(){return i.useRouteError},useRouteLoaderData:function(){return i.useRouteLoaderData},useRoutes:function(){return i.useRoutes},useSearchParams:function(){return Be},useSubmit:function(){return Q}});var a=F(67294),fe=F(73935),i=F(89250),E=F(44536),v=F(12599);function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_.apply(this,arguments)}function X(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,s;for(s=0;s<o.length;s++)r=o[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}const k="get",j="application/x-www-form-urlencoded";function I(e){return e!=null&&typeof e.tagName=="string"}function de(e){return I(e)&&e.tagName.toLowerCase()==="button"}function me(e){return I(e)&&e.tagName.toLowerCase()==="form"}function he(e){return I(e)&&e.tagName.toLowerCase()==="input"}function ve(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pe(e,t){return e.button===0&&(!t||t==="_self")&&!ve(e)}function K(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let o=e[n];return t.concat(Array.isArray(o)?o.map(r=>[n,r]):[[n,o]])},[]))}function Se(e,t){let n=K(e);return t&&t.forEach((o,r)=>{n.has(r)||t.getAll(r).forEach(s=>{n.append(r,s)})}),n}let B=null;function Re(){if(B===null)try{new FormData(document.createElement("form"),0),B=!1}catch{B=!0}return B}const we=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function z(e){return e!=null&&!we.has(e)?null:e}function ye(e,t){let n,o,r,s,u;if(me(e)){let c=e.getAttribute("action");o=c?(0,v.Zn)(c,t):null,n=e.getAttribute("method")||k,r=z(e.getAttribute("enctype"))||j,s=new FormData(e)}else if(de(e)||he(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||c.getAttribute("action");if(o=l?(0,v.Zn)(l,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||k,r=z(e.getAttribute("formenctype"))||z(c.getAttribute("enctype"))||j,s=new FormData(c,e),!Re()){let{name:f,type:d,value:m}=e;if(d==="image"){let h=f?f+".":"";s.append(h+"x","0"),s.append(h+"y","0")}else f&&s.append(f,m)}}else{if(I(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=k,o=null,r=j,u=e}return s&&r==="text/plain"&&(u=s,s=void 0),{action:o,method:n.toLowerCase(),encType:r,formData:s,body:u}}const Ee=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],ge=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],_e=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"];function be(e,t){return(0,v.p7)({basename:t==null?void 0:t.basename,future:_({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:(0,v.lX)({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||te(),routes:e,mapRouteProperties:i.UNSAFE_mapRouteProperties,window:t==null?void 0:t.window}).initialize()}function Ce(e,t){return(0,v.p7)({basename:t==null?void 0:t.basename,future:_({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:(0,v.q_)({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||te(),routes:e,mapRouteProperties:i.UNSAFE_mapRouteProperties,window:t==null?void 0:t.window}).initialize()}function te(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=_({},t,{errors:Le(t.errors)})),t}function Le(e){if(!e)return null;let t=Object.entries(e),n={};for(let[o,r]of t)if(r&&r.__type==="RouteErrorResponse")n[o]=new v.OF(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type==="Error"){if(r.__subType){let s=window[r.__subType];if(typeof s=="function")try{let u=new s(r.message);u.stack="",n[o]=u}catch{}}if(n[o]==null){let s=new Error(r.message);s.stack="",n[o]=s}}else n[o]=r;return n}const Z=a.createContext({isTransitioning:!1}),Y=a.createContext(new Map),Te="startTransition",A=(q||(q=F.t(a,2)))[Te],xe="flushSync",ne=(ee||(ee=F.t(fe,2)))[xe];function Fe(e){A?A(e):e()}function O(e){ne?ne(e):e()}class Pe{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=o=>{this.status==="pending"&&(this.status="resolved",t(o))},this.reject=o=>{this.status==="pending"&&(this.status="rejected",n(o))}})}}function Ae(e){let{fallbackElement:t,router:n,future:o}=e,[r,s]=a.useState(n.state),[u,c]=a.useState(),[l,f]=a.useState({isTransitioning:!1}),[d,m]=a.useState(),[h,g]=a.useState(),[y,C]=a.useState(),L=a.useRef(new Map),{v7_startTransition:R}=o||{},p=a.useCallback(w=>{R?Fe(w):w()},[R]),S=a.useCallback((w,P)=>{let{deletedFetchers:b,unstable_flushSync:J,unstable_viewTransitionOpts:N}=P;b.forEach(U=>L.current.delete(U)),w.fetchers.forEach((U,Ye)=>{U.data!==void 0&&L.current.set(Ye,U.data)});let Ze=n.window==null||typeof n.window.document.startViewTransition!="function";if(!N||Ze){J?O(()=>s(w)):p(()=>s(w));return}if(J){O(()=>{h&&(d&&d.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let U=n.window.document.startViewTransition(()=>{O(()=>s(w))});U.finished.finally(()=>{O(()=>{m(void 0),g(void 0),c(void 0),f({isTransitioning:!1})})}),O(()=>g(U));return}h?(d&&d.resolve(),h.skipTransition(),C({state:w,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(c(w),f({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,h,d,L,p]);a.useLayoutEffect(()=>n.subscribe(S),[n,S]),a.useEffect(()=>{l.isTransitioning&&!l.flushSync&&m(new Pe)},[l]),a.useEffect(()=>{if(d&&u&&n.window){let w=u,P=d.promise,b=n.window.document.startViewTransition(async()=>{p(()=>s(w)),await P});b.finished.finally(()=>{m(void 0),g(void 0),c(void 0),f({isTransitioning:!1})}),g(b)}},[p,u,d,n.window]),a.useEffect(()=>{d&&u&&r.location.key===u.location.key&&d.resolve()},[d,h,r.location,u]),a.useEffect(()=>{!l.isTransitioning&&y&&(c(y.state),f({isTransitioning:!0,flushSync:!1,currentLocation:y.currentLocation,nextLocation:y.nextLocation}),C(void 0))},[l.isTransitioning,y]),a.useEffect(()=>{},[]);let T=a.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:w=>n.navigate(w),push:(w,P,b)=>n.navigate(w,{state:P,preventScrollReset:b==null?void 0:b.preventScrollReset}),replace:(w,P,b)=>n.navigate(w,{replace:!0,state:P,preventScrollReset:b==null?void 0:b.preventScrollReset})}),[n]),x=n.basename||"/",V=a.useMemo(()=>({router:n,navigator:T,static:!1,basename:x}),[n,T,x]);return a.createElement(a.Fragment,null,a.createElement(i.UNSAFE_DataRouterContext.Provider,{value:V},a.createElement(i.UNSAFE_DataRouterStateContext.Provider,{value:r},a.createElement(Y.Provider,{value:L.current},a.createElement(Z.Provider,{value:l},a.createElement(i.Router,{basename:x,location:r.location,navigationType:r.historyAction,navigator:T,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},r.initialized||n.future.v7_partialHydration?a.createElement(Ne,{routes:n.routes,future:n.future,state:r}):t))))),null)}function Ne(e){let{routes:t,future:n,state:o}=e;return(0,i.UNSAFE_useRoutesImpl)(t,void 0,o,n)}function Ue(e){let{basename:t,children:n,future:o,window:r}=e,s=a.useRef();s.current==null&&(s.current=(0,v.lX)({window:r,v5Compat:!0}));let u=s.current,[c,l]=a.useState({action:u.action,location:u.location}),{v7_startTransition:f}=o||{},d=a.useCallback(m=>{f&&A?A(()=>l(m)):l(m)},[l,f]);return a.useLayoutEffect(()=>u.listen(d),[u,d]),a.createElement(i.Router,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:u,future:o})}function De(e){let{basename:t,children:n,future:o,window:r}=e,s=a.useRef();s.current==null&&(s.current=(0,v.q_)({window:r,v5Compat:!0}));let u=s.current,[c,l]=a.useState({action:u.action,location:u.location}),{v7_startTransition:f}=o||{},d=a.useCallback(m=>{f&&A?A(()=>l(m)):l(m)},[l,f]);return a.useLayoutEffect(()=>u.listen(d),[u,d]),a.createElement(i.Router,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:u,future:o})}function Oe(e){let{basename:t,children:n,future:o,history:r}=e,[s,u]=a.useState({action:r.action,location:r.location}),{v7_startTransition:c}=o||{},l=a.useCallback(f=>{c&&A?A(()=>u(f)):u(f)},[u,c]);return a.useLayoutEffect(()=>r.listen(l),[r,l]),a.createElement(i.Router,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:r,future:o})}const Me=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ke=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,re=a.forwardRef(function(t,n){let{onClick:o,relative:r,reloadDocument:s,replace:u,state:c,target:l,to:f,preventScrollReset:d,unstable_viewTransition:m}=t,h=X(t,Ee),{basename:g}=a.useContext(i.UNSAFE_NavigationContext),y,C=!1;if(typeof f=="string"&&ke.test(f)&&(y=f,Me))try{let S=new URL(window.location.href),T=f.startsWith("//")?new URL(S.protocol+f):new URL(f),x=(0,v.Zn)(T.pathname,g);T.origin===S.origin&&x!=null?f=x+T.search+T.hash:C=!0}catch{}let L=(0,i.useHref)(f,{relative:r}),R=ae(f,{replace:u,state:c,target:l,preventScrollReset:d,relative:r,unstable_viewTransition:m});function p(S){o&&o(S),S.defaultPrevented||R(S)}return a.createElement("a",_({},h,{href:y||L,onClick:C||s?o:p,ref:n,target:l}))}),Ie=a.forwardRef(function(t,n){let{"aria-current":o="page",caseSensitive:r=!1,className:s="",end:u=!1,style:c,to:l,unstable_viewTransition:f,children:d}=t,m=X(t,ge),h=(0,i.useResolvedPath)(l,{relative:m.relative}),g=(0,i.useLocation)(),y=a.useContext(i.UNSAFE_DataRouterStateContext),{navigator:C}=a.useContext(i.UNSAFE_NavigationContext),L=y!=null&&ce(h)&&f===!0,R=C.encodeLocation?C.encodeLocation(h).pathname:h.pathname,p=g.pathname,S=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;r||(p=p.toLowerCase(),S=S?S.toLowerCase():null,R=R.toLowerCase());const T=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let x=p===R||!u&&p.startsWith(R)&&p.charAt(T)==="/",V=S!=null&&(S===R||!u&&S.startsWith(R)&&S.charAt(R.length)==="/"),w={isActive:x,isPending:V,isTransitioning:L},P=x?o:void 0,b;typeof s=="function"?b=s(w):b=[s,x?"active":null,V?"pending":null,L?"transitioning":null].filter(Boolean).join(" ");let J=typeof c=="function"?c(w):c;return a.createElement(re,_({},m,{"aria-current":P,className:b,ref:n,style:J,to:l,unstable_viewTransition:f}),typeof d=="function"?d(w):d)}),oe=a.forwardRef((e,t)=>{let{fetcherKey:n,navigate:o,reloadDocument:r,replace:s,state:u,method:c=k,action:l,onSubmit:f,relative:d,preventScrollReset:m,unstable_viewTransition:h}=e,g=X(e,_e),y=Q(),C=ue(l,{relative:d}),L=c.toLowerCase()==="get"?"get":"post",R=p=>{if(f&&f(p),p.defaultPrevented)return;p.preventDefault();let S=p.nativeEvent.submitter,T=(S==null?void 0:S.getAttribute("formmethod"))||c;y(S||p.currentTarget,{fetcherKey:n,method:T,navigate:o,replace:s,state:u,relative:d,preventScrollReset:m,unstable_viewTransition:h})};return a.createElement("form",_({ref:t,method:L,action:C,onSubmit:r?f:R},g))});function Ke(e){let{getKey:t,storageKey:n}=e;return le({getKey:t,storageKey:n}),null}var D;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(D||(D={}));var M;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(M||(M={}));function Qe(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function W(e){let t=a.useContext(i.UNSAFE_DataRouterContext);return t||(0,v.J0)(!1),t}function G(e){let t=a.useContext(i.UNSAFE_DataRouterStateContext);return t||(0,v.J0)(!1),t}function ae(e,t){let{target:n,replace:o,state:r,preventScrollReset:s,relative:u,unstable_viewTransition:c}=t===void 0?{}:t,l=(0,i.useNavigate)(),f=(0,i.useLocation)(),d=(0,i.useResolvedPath)(e,{relative:u});return a.useCallback(m=>{if(pe(m,n)){m.preventDefault();let h=o!==void 0?o:(0,E.Ep)(f)===(0,E.Ep)(d);l(e,{replace:h,state:r,preventScrollReset:s,relative:u,unstable_viewTransition:c})}},[f,l,d,o,r,n,e,s,u,c])}function Be(e){let t=a.useRef(K(e)),n=a.useRef(!1),o=(0,i.useLocation)(),r=a.useMemo(()=>Se(o.search,n.current?null:t.current),[o.search]),s=(0,i.useNavigate)(),u=a.useCallback((c,l)=>{const f=K(typeof c=="function"?c(r):c);n.current=!0,s("?"+f,l)},[s,r]);return[r,u]}function We(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let He=0,ie=()=>"__"+String(++He)+"__";function Q(){let{router:e}=W(D.UseSubmit),{basename:t}=a.useContext(i.UNSAFE_NavigationContext),n=(0,i.UNSAFE_useRouteId)();return a.useCallback(function(o,r){r===void 0&&(r={}),We();let{action:s,method:u,encType:c,formData:l,body:f}=ye(o,t);if(r.navigate===!1){let d=r.fetcherKey||ie();e.fetch(d,n,r.action||s,{preventScrollReset:r.preventScrollReset,formData:l,body:f,formMethod:r.method||u,formEncType:r.encType||c,unstable_flushSync:r.unstable_flushSync})}else e.navigate(r.action||s,{preventScrollReset:r.preventScrollReset,formData:l,body:f,formMethod:r.method||u,formEncType:r.encType||c,replace:r.replace,state:r.state,fromRouteId:n,unstable_flushSync:r.unstable_flushSync,unstable_viewTransition:r.unstable_viewTransition})},[e,t,n])}function ue(e,t){let{relative:n}=t===void 0?{}:t,{basename:o}=a.useContext(i.UNSAFE_NavigationContext),r=a.useContext(i.UNSAFE_RouteContext);r||(0,v.J0)(!1);let[s]=r.matches.slice(-1),u=_({},(0,i.useResolvedPath)(e||".",{relative:n})),c=(0,i.useLocation)();if(e==null){u.search=c.search;let l=new URLSearchParams(u.search);l.has("index")&&l.get("index")===""&&(l.delete("index"),u.search=l.toString()?"?"+l.toString():"")}return(!e||e===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(u.pathname=u.pathname==="/"?o:(0,v.RQ)([o,u.pathname])),(0,E.Ep)(u)}function Ve(e){var t;let{key:n}=e===void 0?{}:e,{router:o}=W(D.UseFetcher),r=G(M.UseFetcher),s=a.useContext(Y),u=a.useContext(i.UNSAFE_RouteContext),c=(t=u.matches[u.matches.length-1])==null?void 0:t.route.id;s||(0,v.J0)(!1),u||(0,v.J0)(!1),c==null&&(0,v.J0)(!1);let[l,f]=a.useState(n||"");n&&n!==l?f(n):l||f(ie()),a.useEffect(()=>(o.getFetcher(l),()=>{o.deleteFetcher(l)}),[o,l]);let d=a.useCallback((R,p)=>{c||(0,v.J0)(!1),o.fetch(l,c,R,p)},[l,c,o]),m=Q(),h=a.useCallback((R,p)=>{m(R,_({},p,{navigate:!1,fetcherKey:l}))},[l,m]),g=a.useMemo(()=>a.forwardRef((p,S)=>a.createElement(oe,_({},p,{navigate:!1,fetcherKey:l,ref:S}))),[l]),y=r.fetchers.get(l)||v.ov,C=s.get(l);return a.useMemo(()=>_({Form:g,submit:h,load:d},y,{data:C}),[g,h,d,y,C])}function Je(){let e=G(M.UseFetchers);return Array.from(e.fetchers.entries()).map(t=>{let[n,o]=t;return _({},o,{key:n})})}const se="react-router-scroll-positions";let H={};function le(e){let{getKey:t,storageKey:n}=e===void 0?{}:e,{router:o}=W(D.UseScrollRestoration),{restoreScrollPosition:r,preventScrollReset:s}=G(M.UseScrollRestoration),{basename:u}=a.useContext(i.UNSAFE_NavigationContext),c=(0,i.useLocation)(),l=(0,i.useMatches)(),f=(0,i.useNavigation)();a.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),je(a.useCallback(()=>{if(f.state==="idle"){let d=(t?t(c,l):null)||c.key;H[d]=window.scrollY}try{sessionStorage.setItem(n||se,JSON.stringify(H))}catch{}window.history.scrollRestoration="auto"},[n,t,f.state,c,l])),typeof document<"u"&&(a.useLayoutEffect(()=>{try{let d=sessionStorage.getItem(n||se);d&&(H=JSON.parse(d))}catch{}},[n]),a.useLayoutEffect(()=>{let d=t&&u!=="/"?(h,g)=>t(_({},h,{pathname:(0,v.Zn)(h.pathname,u)||h.pathname}),g):t,m=o==null?void 0:o.enableScrollRestoration(H,()=>window.scrollY,d);return()=>m&&m()},[o,u,t]),a.useLayoutEffect(()=>{if(r!==!1){if(typeof r=="number"){window.scrollTo(0,r);return}if(c.hash){let d=document.getElementById(decodeURIComponent(c.hash.slice(1)));if(d){d.scrollIntoView();return}}s!==!0&&window.scrollTo(0,0)}},[c,r,s]))}function Xe(e,t){let{capture:n}=t||{};a.useEffect(()=>{let o=n!=null?{capture:n}:void 0;return window.addEventListener("beforeunload",e,o),()=>{window.removeEventListener("beforeunload",e,o)}},[e,n])}function je(e,t){let{capture:n}=t||{};a.useEffect(()=>{let o=n!=null?{capture:n}:void 0;return window.addEventListener("pagehide",e,o),()=>{window.removeEventListener("pagehide",e,o)}},[e,n])}function ze(e){let{when:t,message:n}=e,o=(0,i.useBlocker)(t);a.useEffect(()=>{o.state==="blocked"&&(window.confirm(n)?setTimeout(o.proceed,0):o.reset())},[o,n]),a.useEffect(()=>{o.state==="blocked"&&!t&&o.reset()},[o,t])}function ce(e,t){t===void 0&&(t={});let n=a.useContext(Z);n==null&&(0,v.J0)(!1);let{basename:o}=W(D.useViewTransitionState),r=(0,i.useResolvedPath)(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=(0,v.Zn)(n.currentLocation.pathname,o)||n.currentLocation.pathname,u=(0,v.Zn)(n.nextLocation.pathname,o)||n.nextLocation.pathname;return(0,v.LX)(r.pathname,u)!=null||(0,v.LX)(r.pathname,s)!=null}}}]);
|