@equinor/fusion-framework-cli 9.6.3 → 9.6.4
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 9.6.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @equinor/fusion-framework-react-components-people-provider@1.1.15
|
|
9
|
+
- @equinor/fusion-framework-app@8.1.1
|
|
10
|
+
- @equinor/fusion-framework-module-feature-flag@1.0.2
|
|
11
|
+
|
|
3
12
|
## 9.6.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -412,7 +412,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
412
412
|
*
|
|
413
413
|
* @license MIT
|
|
414
414
|
*/function Qt(){return Qt=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Qt.apply(this,arguments)}var At;(function(r){r.Pop="POP",r.Push="PUSH",r.Replace="REPLACE"})(At||(At={}));const Aw="popstate";function Eq(r){r===void 0&&(r={});let{initialEntries:e=["/"],initialIndex:t,v5Compat:n=!1}=r,i;i=e.map((f,p)=>d(f,typeof f=="string"?null:f.state,p===0?"default":void 0));let o=c(t??i.length-1),a=At.Pop,s=null;function c(f){return Math.min(Math.max(f,0),i.length-1)}function l(){return i[o]}function d(f,p,m){p===void 0&&(p=null);let w=Nc(i?l().pathname:"/",f,p,m);return ga(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(f)),w}function u(f){return typeof f=="string"?f:Yc(f)}return{get index(){return o},get action(){return a},get location(){return l()},createHref:u,createURL(f){return new URL(u(f),"http://localhost")},encodeLocation(f){let p=typeof f=="string"?no(f):f;return{pathname:p.pathname||"",search:p.search||"",hash:p.hash||""}},push(f,p){a=At.Push;let m=d(f,p);o+=1,i.splice(o,i.length,m),n&&s&&s({action:a,location:m,delta:1})},replace(f,p){a=At.Replace;let m=d(f,p);i[o]=m,n&&s&&s({action:a,location:m,delta:0})},go(f){a=At.Pop;let p=c(o+f),m=i[p];o=p,s&&s({action:a,location:m,delta:f})},listen(f){return s=f,()=>{s=null}}}}function kq(r){r===void 0&&(r={});function e(n,i){let{pathname:o,search:a,hash:s}=n.location;return Nc("",{pathname:o,search:a,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function t(n,i){return typeof i=="string"?i:Yc(i)}return BI(e,t,null,r)}function Sq(r){r===void 0&&(r={});function e(i,o){let{pathname:a="/",search:s="",hash:c=""}=no(i.location.hash.substr(1));return!a.startsWith("/")&&!a.startsWith(".")&&(a="/"+a),Nc("",{pathname:a,search:s,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function t(i,o){let a=i.document.querySelector("base"),s="";if(a&&a.getAttribute("href")){let c=i.location.href,l=c.indexOf("#");s=l===-1?c:c.slice(0,l)}return s+"#"+(typeof o=="string"?o:Yc(o))}function n(i,o){ga(i.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return BI(e,t,n,r)}function Qe(r,e){if(r===!1||r===null||typeof r>"u")throw new Error(e)}function ga(r,e){if(!r){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Iq(){return Math.random().toString(36).substr(2,8)}function Tw(r,e){return{usr:r.state,key:r.key,idx:e}}function Nc(r,e,t,n){return t===void 0&&(t=null),Qt({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof e=="string"?no(e):e,{state:t,key:e&&e.key||n||Iq()})}function Yc(r){let{pathname:e="/",search:t="",hash:n=""}=r;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function no(r){let e={};if(r){let t=r.indexOf("#");t>=0&&(e.hash=r.substr(t),r=r.substr(0,t));let n=r.indexOf("?");n>=0&&(e.search=r.substr(n),r=r.substr(0,n)),r&&(e.pathname=r)}return e}function BI(r,e,t,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s=At.Pop,c=null,l=d();l==null&&(l=0,a.replaceState(Qt({},a.state,{idx:l}),""));function d(){return(a.state||{idx:null}).idx}function u(){s=At.Pop;let w=d(),g=w==null?null:w-l;l=w,c&&c({action:s,location:m.location,delta:g})}function h(w,g){s=At.Push;let v=Nc(m.location,w,g);t&&t(v,w),l=d()+1;let _=Tw(v,l),E=m.createHref(v);try{a.pushState(_,"",E)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(E)}o&&c&&c({action:s,location:m.location,delta:1})}function f(w,g){s=At.Replace;let v=Nc(m.location,w,g);t&&t(v,w),l=d();let _=Tw(v,l),E=m.createHref(v);a.replaceState(_,"",E),o&&c&&c({action:s,location:m.location,delta:0})}function p(w){let g=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof w=="string"?w:Yc(w);return Qe(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let m={get action(){return s},get location(){return r(i,a)},listen(w){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(Aw,u),c=w,()=>{i.removeEventListener(Aw,u),c=null}},createHref(w){return e(i,w)},createURL:p,encodeLocation(w){let g=p(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:f,go(w){return a.go(w)}};return m}var Kt;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(Kt||(Kt={}));const Aq=new Set(["lazy","caseSensitive","path","id","index","children"]);function Tq(r){return r.index===!0}function T5(r,e,t,n){return t===void 0&&(t=[]),n===void 0&&(n={}),r.map((i,o)=>{let a=[...t,o],s=typeof i.id=="string"?i.id:a.join("-");if(Qe(i.index!==!0||!i.children,"Cannot specify children on an index route"),Qe(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),Tq(i)){let c=Qt({},i,e(i),{id:s});return n[s]=c,c}else{let c=Qt({},i,e(i),{id:s,children:void 0});return n[s]=c,i.children&&(c.children=T5(i.children,e,a,n)),c}})}function Jl(r,e,t){t===void 0&&(t="/");let n=typeof e=="string"?no(e):e,i=q1(n.pathname||"/",t);if(i==null)return null;let o=qI(r);Pq(o);let a=null;for(let s=0;a==null&&s<o.length;++s)a=Vq(o[s],jq(i));return a}function Rq(r,e){let{route:t,pathname:n,params:i}=r;return{id:t.id,pathname:n,params:i,data:e[t.id],handle:t.handle}}function qI(r,e,t,n){e===void 0&&(e=[]),t===void 0&&(t=[]),n===void 0&&(n="");let i=(o,a,s)=>{let c={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};c.relativePath.startsWith("/")&&(Qe(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 l=Ic([n,c.relativePath]),d=t.concat(c);o.children&&o.children.length>0&&(Qe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),qI(o.children,e,d,l)),!(o.path==null&&!o.index)&&e.push({path:l,score:Dq(l,o.index),routesMeta:d})};return r.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let c of WI(o.path))i(o,a,c)}),e}function WI(r){let e=r.split("/");if(e.length===0)return[];let[t,...n]=e,i=t.endsWith("?"),o=t.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=WI(n.join("/")),s=[];return s.push(...a.map(c=>c===""?o:[o,c].join("/"))),i&&s.push(...a),s.map(c=>r.startsWith("/")&&c===""?"/":c)}function Pq(r){r.sort((e,t)=>e.score!==t.score?t.score-e.score:Nq(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}const Mq=/^:[\w-]+$/,$q=3,Hq=2,Zq=1,Oq=10,Lq=-2,Rw=r=>r==="*";function Dq(r,e){let t=r.split("/"),n=t.length;return t.some(Rw)&&(n+=Lq),e&&(n+=Hq),t.filter(i=>!Rw(i)).reduce((i,o)=>i+(Mq.test(o)?$q:o===""?Zq:Oq),n)}function Nq(r,e){return r.length===e.length&&r.slice(0,-1).every((n,i)=>n===e[i])?r[r.length-1]-e[e.length-1]:0}function Vq(r,e){let{routesMeta:t}=r,n={},i="/",o=[];for(let a=0;a<t.length;++a){let s=t[a],c=a===t.length-1,l=i==="/"?e:e.slice(i.length)||"/",d=Fq({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l);if(!d)return null;Object.assign(n,d.params);let u=s.route;o.push({params:n,pathname:Ic([i,d.pathname]),pathnameBase:Kq(Ic([i,d.pathnameBase])),route:u}),d.pathnameBase!=="/"&&(i=Ic([i,d.pathnameBase]))}return o}function Fq(r,e){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[t,n]=zq(r.path,r.caseSensitive,r.end),i=e.match(t);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((l,d,u)=>{let{paramName:h,isOptional:f}=d;if(h==="*"){let m=s[u]||"";a=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const p=s[u];return f&&!p?l[h]=void 0:l[h]=Uq(p||"",h),l},{}),pathname:o,pathnameBase:a,pattern:r}}function zq(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),ga(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'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(/\*$/,"/*")+'".'));let n=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,c)=>(n.push({paramName:s,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(n.push({paramName:"*"}),i+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?i+="\\/*$":r!==""&&r!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function jq(r){try{return decodeURI(r)}catch(e){return ga(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),r}}function Uq(r,e){try{return decodeURIComponent(r)}catch(t){return ga(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+r+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+t+").")),r}}function q1(r,e){if(e==="/")return r;if(!r.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=r.charAt(t);return n&&n!=="/"?null:r.slice(t)||"/"}function Bq(r,e){e===void 0&&(e="/");let{pathname:t,search:n="",hash:i=""}=typeof r=="string"?no(r):r;return{pathname:t?t.startsWith("/")?t:qq(t,e):e,search:Yq(n),hash:Qq(i)}}function qq(r,e){let t=e.replace(/\/+$/,"").split("/");return r.split("/").forEach(i=>{i===".."?t.length>1&&t.pop():i!=="."&&t.push(i)}),t.length>1?t.join("/"):"/"}function cg(r,e,t,n){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function GI(r){return r.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Wq(r,e){let t=GI(r);return e?t.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):t.map(n=>n.pathnameBase)}function Gq(r,e,t,n){n===void 0&&(n=!1);let i;typeof r=="string"?i=no(r):(i=Qt({},r),Qe(!i.pathname||!i.pathname.includes("?"),cg("?","pathname","search",i)),Qe(!i.pathname||!i.pathname.includes("#"),cg("#","pathname","hash",i)),Qe(!i.search||!i.search.includes("#"),cg("#","search","hash",i)));let o=r===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=t;else{let u=e.length-1;if(!n&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),u-=1;i.pathname=h.join("/")}s=u>=0?e[u]:"/"}let c=Bq(i,s),l=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&t.endsWith("/");return!c.pathname.endsWith("/")&&(l||d)&&(c.pathname+="/"),c}const Ic=r=>r.join("/").replace(/\/\/+/g,"/"),Kq=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),Yq=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,Qq=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;class KI{constructor(e,t,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function YI(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const QI=["post","put","patch","delete"],Xq=new Set(QI),Jq=["get",...QI],eW=new Set(Jq),tW=new Set([301,302,303,307,308]),rW=new Set([307,308]),lg={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},nW={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Tu={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},XI=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,iW=r=>({hasErrorBoundary:!!r.hasErrorBoundary}),JI="remix-router-transitions";function oW(r){const e=r.window?r.window:typeof window<"u"?window:void 0,t=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!t;Qe(r.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(r.mapRouteProperties)i=r.mapRouteProperties;else if(r.detectErrorBoundary){let M=r.detectErrorBoundary;i=D=>({hasErrorBoundary:M(D)})}else i=iW;let o={},a=T5(r.routes,i,void 0,o),s,c=r.basename||"/",l=Qt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},r.future),d=null,u=new Set,h=null,f=null,p=null,m=r.hydrationData!=null,w=Jl(a,r.history.location,c),g=null;if(w==null){let M=gi(404,{pathname:r.history.location.pathname}),{matches:D,route:U}=Dw(a);w=D,g={[U.id]:M}}let v,_=w.some(M=>M.route.lazy),E=w.some(M=>M.route.loader);if(_)v=!1;else if(!E)v=!0;else if(l.v7_partialHydration){let M=r.hydrationData?r.hydrationData.loaderData:null,D=r.hydrationData?r.hydrationData.errors:null;v=w.every(U=>U.route.loader&&U.route.loader.hydrate!==!0&&(M&&M[U.route.id]!==void 0||D&&D[U.route.id]!==void 0))}else v=r.hydrationData!=null;let k,C={historyAction:r.history.action,location:r.history.location,matches:w,initialized:v,navigation:lg,restoreScrollPosition:r.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:r.hydrationData&&r.hydrationData.loaderData||{},actionData:r.hydrationData&&r.hydrationData.actionData||null,errors:r.hydrationData&&r.hydrationData.errors||g,fetchers:new Map,blockers:new Map},S=At.Pop,Z=!1,q,ie=!1,re=new Map,ae=null,F=!1,$=!1,L=[],B=[],O=new Map,A=0,z=-1,oe=new Map,ne=new Set,he=new Map,at=new Map,ye=new Set,rt=new Map,ft=new Map,An=!1;function Os(){if(d=r.history.listen(M=>{let{action:D,location:U,delta:ce}=M;if(An){An=!1;return}ga(ft.size===0||ce!=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 ge=ob({currentLocation:C.location,nextLocation:U,historyAction:D});if(ge&&ce!=null){An=!0,r.history.go(ce*-1),ff(ge,{state:"blocked",location:U,proceed(){ff(ge,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),r.history.go(ce)},reset(){let De=new Map(C.blockers);De.set(ge,Tu),xr({blockers:De})}});return}return Ls(D,U)}),t){vW(e,re);let M=()=>gW(e,re);e.addEventListener("pagehide",M),ae=()=>e.removeEventListener("pagehide",M)}return C.initialized||Ls(At.Pop,C.location,{initialHydration:!0}),k}function Vo(){d&&d(),ae&&ae(),u.clear(),q&&q.abort(),C.fetchers.forEach((M,D)=>hf(D)),C.blockers.forEach((M,D)=>ib(D))}function du(M){return u.add(M),()=>u.delete(M)}function xr(M,D){D===void 0&&(D={}),C=Qt({},C,M);let U=[],ce=[];l.v7_fetcherPersist&&C.fetchers.forEach((ge,De)=>{ge.state==="idle"&&(ye.has(De)?ce.push(De):U.push(De))}),[...u].forEach(ge=>ge(C,{deletedFetchers:ce,unstable_viewTransitionOpts:D.viewTransitionOpts,unstable_flushSync:D.flushSync===!0})),l.v7_fetcherPersist&&(U.forEach(ge=>C.fetchers.delete(ge)),ce.forEach(ge=>hf(ge)))}function Tn(M,D,U){var ce,ge;let{flushSync:De}=U===void 0?{}:U,Ie=C.actionData!=null&&C.navigation.formMethod!=null&&Bi(C.navigation.formMethod)&&C.navigation.state==="loading"&&((ce=M.state)==null?void 0:ce._isRedirect)!==!0,Ee;D.actionData?Object.keys(D.actionData).length>0?Ee=D.actionData:Ee=null:Ie?Ee=C.actionData:Ee=null;let we=D.loaderData?Lw(C.loaderData,D.loaderData,D.matches||[],D.errors):C.loaderData,qe=C.blockers;qe.size>0&&(qe=new Map(qe),qe.forEach((wt,Or)=>qe.set(Or,Tu)));let Cr=Z===!0||C.navigation.formMethod!=null&&Bi(C.navigation.formMethod)&&((ge=M.state)==null?void 0:ge._isRedirect)!==!0;s&&(a=s,s=void 0),F||S===At.Pop||(S===At.Push?r.history.push(M,M.state):S===At.Replace&&r.history.replace(M,M.state));let Oe;if(S===At.Pop){let wt=re.get(C.location.pathname);wt&&wt.has(M.pathname)?Oe={currentLocation:C.location,nextLocation:M}:re.has(M.pathname)&&(Oe={currentLocation:M,nextLocation:C.location})}else if(ie){let wt=re.get(C.location.pathname);wt?wt.add(M.pathname):(wt=new Set([M.pathname]),re.set(C.location.pathname,wt)),Oe={currentLocation:C.location,nextLocation:M}}xr(Qt({},D,{actionData:Ee,loaderData:we,historyAction:S,location:M,initialized:!0,navigation:lg,revalidation:"idle",restoreScrollPosition:sb(M,D.matches||C.matches),preventScrollReset:Cr,blockers:qe}),{viewTransitionOpts:Oe,flushSync:De===!0}),S=At.Pop,Z=!1,ie=!1,F=!1,$=!1,L=[],B=[]}async function X_(M,D){if(typeof M=="number"){r.history.go(M);return}let U=R5(C.location,C.matches,c,l.v7_prependBasename,M,l.v7_relativeSplatPath,D==null?void 0:D.fromRouteId,D==null?void 0:D.relative),{path:ce,submission:ge,error:De}=Pw(l.v7_normalizeFormMethod,!1,U,D),Ie=C.location,Ee=Nc(C.location,ce,D&&D.state);Ee=Qt({},Ee,r.history.encodeLocation(Ee));let we=D&&D.replace!=null?D.replace:void 0,qe=At.Push;we===!0?qe=At.Replace:we===!1||ge!=null&&Bi(ge.formMethod)&&ge.formAction===C.location.pathname+C.location.search&&(qe=At.Replace);let Cr=D&&"preventScrollReset"in D?D.preventScrollReset===!0:void 0,Oe=(D&&D.unstable_flushSync)===!0,wt=ob({currentLocation:Ie,nextLocation:Ee,historyAction:qe});if(wt){ff(wt,{state:"blocked",location:Ee,proceed(){ff(wt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ee}),X_(M,D)},reset(){let Or=new Map(C.blockers);Or.set(wt,Tu),xr({blockers:Or})}});return}return await Ls(qe,Ee,{submission:ge,pendingError:De,preventScrollReset:Cr,replace:D&&D.replace,enableViewTransition:D&&D.unstable_viewTransition,flushSync:Oe})}function GR(){if(Um(),xr({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){Ls(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}Ls(S||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation})}}async function Ls(M,D,U){q&&q.abort(),q=null,S=M,F=(U&&U.startUninterruptedRevalidation)===!0,nP(C.location,C.matches),Z=(U&&U.preventScrollReset)===!0,ie=(U&&U.enableViewTransition)===!0;let ce=s||a,ge=U&&U.overrideNavigation,De=Jl(ce,D,c),Ie=(U&&U.flushSync)===!0;if(!De){let Or=gi(404,{pathname:D.pathname}),{matches:ui,route:Er}=Dw(ce);Bm(),Tn(D,{matches:ui,loaderData:{},errors:{[Er.id]:Or}},{flushSync:Ie});return}if(C.initialized&&!$&&dW(C.location,D)&&!(U&&U.submission&&Bi(U.submission.formMethod))){Tn(D,{matches:De},{flushSync:Ie});return}q=new AbortController;let Ee=Pu(r.history,D,q.signal,U&&U.submission),we,qe;if(U&&U.pendingError)qe={[Vh(De).route.id]:U.pendingError};else if(U&&U.submission&&Bi(U.submission.formMethod)){let Or=await KR(Ee,D,U.submission,De,{replace:U.replace,flushSync:Ie});if(Or.shortCircuited)return;we=Or.pendingActionData,qe=Or.pendingActionError,ge=dg(D,U.submission),Ie=!1,Ee=new Request(Ee.url,{signal:Ee.signal})}let{shortCircuited:Cr,loaderData:Oe,errors:wt}=await YR(Ee,D,De,ge,U&&U.submission,U&&U.fetcherSubmission,U&&U.replace,U&&U.initialHydration===!0,Ie,we,qe);Cr||(q=null,Tn(D,Qt({matches:De},we?{actionData:we}:{},{loaderData:Oe,errors:wt})))}async function KR(M,D,U,ce,ge){ge===void 0&&(ge={}),Um();let De=pW(D,U);xr({navigation:De},{flushSync:ge.flushSync===!0});let Ie,Ee=M5(ce,D);if(!Ee.route.action&&!Ee.route.lazy)Ie={type:Kt.error,error:gi(405,{method:M.method,pathname:D.pathname,routeId:Ee.route.id})};else if(Ie=await Ru("action",M,Ee,ce,o,i,c,l.v7_relativeSplatPath),M.signal.aborted)return{shortCircuited:!0};if(mc(Ie)){let we;return ge&&ge.replace!=null?we=ge.replace:we=Ie.location===C.location.pathname+C.location.search,await uu(C,Ie,{submission:U,replace:we}),{shortCircuited:!0}}if(ed(Ie)){let we=Vh(ce,Ee.route.id);return(ge&&ge.replace)!==!0&&(S=At.Push),{pendingActionData:{},pendingActionError:{[we.route.id]:Ie.error}}}if(pc(Ie))throw gi(400,{type:"defer-action"});return{pendingActionData:{[Ee.route.id]:Ie.data}}}async function YR(M,D,U,ce,ge,De,Ie,Ee,we,qe,Cr){let Oe=ce||dg(D,ge),wt=ge||De||Fw(Oe),Or=s||a,[ui,Er]=Mw(r.history,C,U,wt,D,l.v7_partialHydration&&Ee===!0,$,L,B,ye,he,ne,Or,c,qe,Cr);if(Bm(pt=>!(U&&U.some($t=>$t.route.id===pt))||ui&&ui.some($t=>$t.route.id===pt)),z=++A,ui.length===0&&Er.length===0){let pt=rb();return Tn(D,Qt({matches:U,loaderData:{},errors:Cr||null},qe?{actionData:qe}:{},pt?{fetchers:new Map(C.fetchers)}:{}),{flushSync:we}),{shortCircuited:!0}}if(!F&&(!l.v7_partialHydration||!Ee)){Er.forEach($t=>{let so=C.fetchers.get($t.key),mf=Mu(void 0,so?so.data:void 0);C.fetchers.set($t.key,mf)});let pt=qe||C.actionData;xr(Qt({navigation:Oe},pt?Object.keys(pt).length===0?{actionData:null}:{actionData:pt}:{},Er.length>0?{fetchers:new Map(C.fetchers)}:{}),{flushSync:we})}Er.forEach(pt=>{O.has(pt.key)&&Ra(pt.key),pt.controller&&O.set(pt.key,pt.controller)});let rl=()=>Er.forEach(pt=>Ra(pt.key));q&&q.signal.addEventListener("abort",rl);let{results:qm,loaderResults:nl,fetcherResults:Pa}=await J_(C.matches,U,ui,Er,M);if(M.signal.aborted)return{shortCircuited:!0};q&&q.signal.removeEventListener("abort",rl),Er.forEach(pt=>O.delete(pt.key));let Ds=Nw(qm);if(Ds){if(Ds.idx>=ui.length){let pt=Er[Ds.idx-ui.length].key;ne.add(pt)}return await uu(C,Ds.result,{replace:Ie}),{shortCircuited:!0}}let{loaderData:Wm,errors:Gm}=Ow(C,U,ui,nl,Cr,Er,Pa,rt);rt.forEach((pt,$t)=>{pt.subscribe(so=>{(so||pt.done)&&rt.delete($t)})});let Km=rb(),il=nb(z),pf=Km||il||Er.length>0;return Qt({loaderData:Wm,errors:Gm},pf?{fetchers:new Map(C.fetchers)}:{})}function QR(M,D,U,ce){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.");O.has(M)&&Ra(M);let ge=(ce&&ce.unstable_flushSync)===!0,De=s||a,Ie=R5(C.location,C.matches,c,l.v7_prependBasename,U,l.v7_relativeSplatPath,D,ce==null?void 0:ce.relative),Ee=Jl(De,Ie,c);if(!Ee){hu(M,D,gi(404,{pathname:Ie}),{flushSync:ge});return}let{path:we,submission:qe,error:Cr}=Pw(l.v7_normalizeFormMethod,!0,Ie,ce);if(Cr){hu(M,D,Cr,{flushSync:ge});return}let Oe=M5(Ee,we);if(Z=(ce&&ce.preventScrollReset)===!0,qe&&Bi(qe.formMethod)){XR(M,D,we,Oe,Ee,ge,qe);return}he.set(M,{routeId:D,path:we}),JR(M,D,we,Oe,Ee,ge,qe)}async function XR(M,D,U,ce,ge,De,Ie){if(Um(),he.delete(M),!ce.route.action&&!ce.route.lazy){let $t=gi(405,{method:Ie.formMethod,pathname:U,routeId:D});hu(M,D,$t,{flushSync:De});return}let Ee=C.fetchers.get(M);Ta(M,mW(Ie,Ee),{flushSync:De});let we=new AbortController,qe=Pu(r.history,U,we.signal,Ie);O.set(M,we);let Cr=A,Oe=await Ru("action",qe,ce,ge,o,i,c,l.v7_relativeSplatPath);if(qe.signal.aborted){O.get(M)===we&&O.delete(M);return}if(l.v7_fetcherPersist&&ye.has(M)){if(mc(Oe)||ed(Oe)){Ta(M,za(void 0));return}}else{if(mc(Oe))if(O.delete(M),z>Cr){Ta(M,za(void 0));return}else return ne.add(M),Ta(M,Mu(Ie)),uu(C,Oe,{fetcherSubmission:Ie});if(ed(Oe)){hu(M,D,Oe.error);return}}if(pc(Oe))throw gi(400,{type:"defer-action"});let wt=C.navigation.location||C.location,Or=Pu(r.history,wt,we.signal),ui=s||a,Er=C.navigation.state!=="idle"?Jl(ui,C.navigation.location,c):C.matches;Qe(Er,"Didn't find any matches after fetcher action");let rl=++A;oe.set(M,rl);let qm=Mu(Ie,Oe.data);C.fetchers.set(M,qm);let[nl,Pa]=Mw(r.history,C,Er,Ie,wt,!1,$,L,B,ye,he,ne,ui,c,{[ce.route.id]:Oe.data},void 0);Pa.filter($t=>$t.key!==M).forEach($t=>{let so=$t.key,mf=C.fetchers.get(so),oP=Mu(void 0,mf?mf.data:void 0);C.fetchers.set(so,oP),O.has(so)&&Ra(so),$t.controller&&O.set(so,$t.controller)}),xr({fetchers:new Map(C.fetchers)});let Ds=()=>Pa.forEach($t=>Ra($t.key));we.signal.addEventListener("abort",Ds);let{results:Wm,loaderResults:Gm,fetcherResults:Km}=await J_(C.matches,Er,nl,Pa,Or);if(we.signal.aborted)return;we.signal.removeEventListener("abort",Ds),oe.delete(M),O.delete(M),Pa.forEach($t=>O.delete($t.key));let il=Nw(Wm);if(il){if(il.idx>=nl.length){let $t=Pa[il.idx-nl.length].key;ne.add($t)}return uu(C,il.result)}let{loaderData:pf,errors:pt}=Ow(C,C.matches,nl,Gm,void 0,Pa,Km,rt);if(C.fetchers.has(M)){let $t=za(Oe.data);C.fetchers.set(M,$t)}nb(rl),C.navigation.state==="loading"&&rl>z?(Qe(S,"Expected pending action"),q&&q.abort(),Tn(C.navigation.location,{matches:Er,loaderData:pf,errors:pt,fetchers:new Map(C.fetchers)})):(xr({errors:pt,loaderData:Lw(C.loaderData,pf,Er,pt),fetchers:new Map(C.fetchers)}),$=!1)}async function JR(M,D,U,ce,ge,De,Ie){let Ee=C.fetchers.get(M);Ta(M,Mu(Ie,Ee?Ee.data:void 0),{flushSync:De});let we=new AbortController,qe=Pu(r.history,U,we.signal);O.set(M,we);let Cr=A,Oe=await Ru("loader",qe,ce,ge,o,i,c,l.v7_relativeSplatPath);if(pc(Oe)&&(Oe=await rA(Oe,qe.signal,!0)||Oe),O.get(M)===we&&O.delete(M),!qe.signal.aborted){if(ye.has(M)){Ta(M,za(void 0));return}if(mc(Oe))if(z>Cr){Ta(M,za(void 0));return}else{ne.add(M),await uu(C,Oe);return}if(ed(Oe)){hu(M,D,Oe.error);return}Qe(!pc(Oe),"Unhandled fetcher deferred data"),Ta(M,za(Oe.data))}}async function uu(M,D,U){let{submission:ce,fetcherSubmission:ge,replace:De}=U===void 0?{}:U;D.revalidate&&($=!0);let Ie=Nc(M.location,D.location,{_isRedirect:!0});if(Qe(Ie,"Expected a location on the redirect navigation"),t){let wt=!1;if(D.reloadDocument)wt=!0;else if(XI.test(D.location)){const Or=r.history.createURL(D.location);wt=Or.origin!==e.location.origin||q1(Or.pathname,c)==null}if(wt){De?e.location.replace(D.location):e.location.assign(D.location);return}}q=null;let Ee=De===!0?At.Replace:At.Push,{formMethod:we,formAction:qe,formEncType:Cr}=M.navigation;!ce&&!ge&&we&&qe&&Cr&&(ce=Fw(M.navigation));let Oe=ce||ge;if(rW.has(D.status)&&Oe&&Bi(Oe.formMethod))await Ls(Ee,Ie,{submission:Qt({},Oe,{formAction:D.location}),preventScrollReset:Z});else{let wt=dg(Ie,ce);await Ls(Ee,Ie,{overrideNavigation:wt,fetcherSubmission:ge,preventScrollReset:Z})}}async function J_(M,D,U,ce,ge){let De=await Promise.all([...U.map(we=>Ru("loader",ge,we,D,o,i,c,l.v7_relativeSplatPath)),...ce.map(we=>we.matches&&we.match&&we.controller?Ru("loader",Pu(r.history,we.path,we.controller.signal),we.match,we.matches,o,i,c,l.v7_relativeSplatPath):{type:Kt.error,error:gi(404,{pathname:we.path})})]),Ie=De.slice(0,U.length),Ee=De.slice(U.length);return await Promise.all([Vw(M,U,Ie,Ie.map(()=>ge.signal),!1,C.loaderData),Vw(M,ce.map(we=>we.match),Ee,ce.map(we=>we.controller?we.controller.signal:null),!0)]),{results:De,loaderResults:Ie,fetcherResults:Ee}}function Um(){$=!0,L.push(...Bm()),he.forEach((M,D)=>{O.has(D)&&(B.push(D),Ra(D))})}function Ta(M,D,U){U===void 0&&(U={}),C.fetchers.set(M,D),xr({fetchers:new Map(C.fetchers)},{flushSync:(U&&U.flushSync)===!0})}function hu(M,D,U,ce){ce===void 0&&(ce={});let ge=Vh(C.matches,D);hf(M),xr({errors:{[ge.route.id]:U},fetchers:new Map(C.fetchers)},{flushSync:(ce&&ce.flushSync)===!0})}function eb(M){return l.v7_fetcherPersist&&(at.set(M,(at.get(M)||0)+1),ye.has(M)&&ye.delete(M)),C.fetchers.get(M)||nW}function hf(M){let D=C.fetchers.get(M);O.has(M)&&!(D&&D.state==="loading"&&oe.has(M))&&Ra(M),he.delete(M),oe.delete(M),ne.delete(M),ye.delete(M),C.fetchers.delete(M)}function eP(M){if(l.v7_fetcherPersist){let D=(at.get(M)||0)-1;D<=0?(at.delete(M),ye.add(M)):at.set(M,D)}else hf(M);xr({fetchers:new Map(C.fetchers)})}function Ra(M){let D=O.get(M);Qe(D,"Expected fetch controller: "+M),D.abort(),O.delete(M)}function tb(M){for(let D of M){let U=eb(D),ce=za(U.data);C.fetchers.set(D,ce)}}function rb(){let M=[],D=!1;for(let U of ne){let ce=C.fetchers.get(U);Qe(ce,"Expected fetcher: "+U),ce.state==="loading"&&(ne.delete(U),M.push(U),D=!0)}return tb(M),D}function nb(M){let D=[];for(let[U,ce]of oe)if(ce<M){let ge=C.fetchers.get(U);Qe(ge,"Expected fetcher: "+U),ge.state==="loading"&&(Ra(U),oe.delete(U),D.push(U))}return tb(D),D.length>0}function tP(M,D){let U=C.blockers.get(M)||Tu;return ft.get(M)!==D&&ft.set(M,D),U}function ib(M){C.blockers.delete(M),ft.delete(M)}function ff(M,D){let U=C.blockers.get(M)||Tu;Qe(U.state==="unblocked"&&D.state==="blocked"||U.state==="blocked"&&D.state==="blocked"||U.state==="blocked"&&D.state==="proceeding"||U.state==="blocked"&&D.state==="unblocked"||U.state==="proceeding"&&D.state==="unblocked","Invalid blocker state transition: "+U.state+" -> "+D.state);let ce=new Map(C.blockers);ce.set(M,D),xr({blockers:ce})}function ob(M){let{currentLocation:D,nextLocation:U,historyAction:ce}=M;if(ft.size===0)return;ft.size>1&&ga(!1,"A router only supports one blocker at a time");let ge=Array.from(ft.entries()),[De,Ie]=ge[ge.length-1],Ee=C.blockers.get(De);if(!(Ee&&Ee.state==="proceeding")&&Ie({currentLocation:D,nextLocation:U,historyAction:ce}))return De}function Bm(M){let D=[];return rt.forEach((U,ce)=>{(!M||M(ce))&&(U.cancel(),D.push(ce),rt.delete(ce))}),D}function rP(M,D,U){if(h=M,p=D,f=U||null,!m&&C.navigation===lg){m=!0;let ce=sb(C.location,C.matches);ce!=null&&xr({restoreScrollPosition:ce})}return()=>{h=null,p=null,f=null}}function ab(M,D){return f&&f(M,D.map(ce=>Rq(ce,C.loaderData)))||M.key}function nP(M,D){if(h&&p){let U=ab(M,D);h[U]=p()}}function sb(M,D){if(h){let U=ab(M,D),ce=h[U];if(typeof ce=="number")return ce}return null}function iP(M){o={},s=T5(M,i,void 0,o)}return k={get basename(){return c},get future(){return l},get state(){return C},get routes(){return a},get window(){return e},initialize:Os,subscribe:du,enableScrollRestoration:rP,navigate:X_,fetch:QR,revalidate:GR,createHref:M=>r.history.createHref(M),encodeLocation:M=>r.history.encodeLocation(M),getFetcher:eb,deleteFetcher:eP,dispose:Vo,getBlocker:tP,deleteBlocker:ib,_internalFetchControllers:O,_internalActiveDeferreds:rt,_internalSetRoutes:iP},k}function aW(r){return r!=null&&("formData"in r&&r.formData!=null||"body"in r&&r.body!==void 0)}function R5(r,e,t,n,i,o,a,s){let c,l;if(a){c=[];for(let u of e)if(c.push(u),u.route.id===a){l=u;break}}else c=e,l=e[e.length-1];let d=Gq(i||".",Wq(c,o),q1(r.pathname,t)||r.pathname,s==="path");return i==null&&(d.search=r.search,d.hash=r.hash),(i==null||i===""||i===".")&&l&&l.route.index&&!o_(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),n&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ic([t,d.pathname])),Yc(d)}function Pw(r,e,t,n){if(!n||!aW(n))return{path:t};if(n.formMethod&&!fW(n.formMethod))return{path:t,error:gi(405,{method:n.formMethod})};let i=()=>({path:t,error:gi(400,{type:"invalid-body"})}),o=n.formMethod||"get",a=r?o.toUpperCase():o.toLowerCase(),s=tA(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Bi(a))return i();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((f,p)=>{let[m,w]=p;return""+f+m+"="+w+`
|
|
415
|
-
`},""):String(n.body);return{path:t,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!Bi(a))return i();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let c,l;if(n.formData)c=P5(n.formData),l=n.formData;else if(n.body instanceof FormData)c=P5(n.body),l=n.body;else if(n.body instanceof URLSearchParams)c=n.body,l=Zw(c);else if(n.body==null)c=new URLSearchParams,l=new FormData;else try{c=new URLSearchParams(n.body),l=Zw(c)}catch{return i()}let d={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Bi(d.formMethod))return{path:t,submission:d};let u=no(t);return e&&u.search&&o_(u.search)&&c.append("index",""),u.search="?"+c,{path:Yc(u),submission:d}}function sW(r,e){let t=r;if(e){let n=r.findIndex(i=>i.route.id===e);n>=0&&(t=r.slice(0,n))}return t}function Mw(r,e,t,n,i,o,a,s,c,l,d,u,h,f,p,m){let w=m?Object.values(m)[0]:p?Object.values(p)[0]:void 0,g=r.createURL(e.location),v=r.createURL(i),_=m?Object.keys(m)[0]:void 0,k=sW(t,_).filter((S,Z)=>{let{route:q}=S;if(q.lazy)return!0;if(q.loader==null)return!1;if(o)return q.loader.hydrate?!0:e.loaderData[q.id]===void 0&&(!e.errors||e.errors[q.id]===void 0);if(cW(e.loaderData,e.matches[Z],S)||s.some(ae=>ae===S.route.id))return!0;let ie=e.matches[Z],re=S;return $w(S,Qt({currentUrl:g,currentParams:ie.params,nextUrl:v,nextParams:re.params},n,{actionResult:w,defaultShouldRevalidate:a||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||eA(ie,re)}))}),C=[];return d.forEach((S,Z)=>{if(o||!t.some(F=>F.route.id===S.routeId)||l.has(Z))return;let q=Jl(h,S.path,f);if(!q){C.push({key:Z,routeId:S.routeId,path:S.path,matches:null,match:null,controller:null});return}let ie=e.fetchers.get(Z),re=M5(q,S.path),ae=!1;u.has(Z)?ae=!1:c.includes(Z)?ae=!0:ie&&ie.state!=="idle"&&ie.data===void 0?ae=a:ae=$w(re,Qt({currentUrl:g,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:t[t.length-1].params},n,{actionResult:w,defaultShouldRevalidate:a})),ae&&C.push({key:Z,routeId:S.routeId,path:S.path,matches:q,match:re,controller:new AbortController})}),[k,C]}function cW(r,e,t){let n=!e||t.route.id!==e.route.id,i=r[t.route.id]===void 0;return n||i}function eA(r,e){let t=r.route.path;return r.pathname!==e.pathname||t!=null&&t.endsWith("*")&&r.params["*"]!==e.params["*"]}function $w(r,e){if(r.route.shouldRevalidate){let t=r.route.shouldRevalidate(e);if(typeof t=="boolean")return t}return e.defaultShouldRevalidate}async function Hw(r,e,t){if(!r.lazy)return;let n=await r.lazy();if(!r.lazy)return;let i=t[r.id];Qe(i,"No route found in manifest");let o={};for(let a in n){let c=i[a]!==void 0&&a!=="hasErrorBoundary";ga(!c,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!c&&!Aq.has(a)&&(o[a]=n[a])}Object.assign(i,o),Object.assign(i,Qt({},e(i),{lazy:void 0}))}async function Ru(r,e,t,n,i,o,a,s,c){c===void 0&&(c={});let l,d,u,h=m=>{let w,g=new Promise((v,_)=>w=_);return u=()=>w(),e.signal.addEventListener("abort",u),Promise.race([m({request:e,params:t.params,context:c.requestContext}),g])};try{let m=t.route[r];if(t.route.lazy)if(m){let w,g=await Promise.all([h(m).catch(v=>{w=v}),Hw(t.route,o,i)]);if(w)throw w;d=g[0]}else if(await Hw(t.route,o,i),m=t.route[r],m)d=await h(m);else if(r==="action"){let w=new URL(e.url),g=w.pathname+w.search;throw gi(405,{method:e.method,pathname:g,routeId:t.route.id})}else return{type:Kt.data,data:void 0};else if(m)d=await h(m);else{let w=new URL(e.url),g=w.pathname+w.search;throw gi(404,{pathname:g})}Qe(d!==void 0,"You defined "+(r==="action"?"an action":"a loader")+" for route "+('"'+t.route.id+"\" but didn't return anything from your `"+r+"` ")+"function. Please return a value or `null`.")}catch(m){l=Kt.error,d=m}finally{u&&e.signal.removeEventListener("abort",u)}if(hW(d)){let m=d.status;if(tW.has(m)){let g=d.headers.get("Location");if(Qe(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!XI.test(g))g=R5(new URL(e.url),n.slice(0,n.indexOf(t)+1),a,!0,g,s);else if(!c.isStaticRequest){let v=new URL(e.url),_=g.startsWith("//")?new URL(v.protocol+g):new URL(g),E=q1(_.pathname,a)!=null;_.origin===v.origin&&E&&(g=_.pathname+_.search+_.hash)}if(c.isStaticRequest)throw d.headers.set("Location",g),d;return{type:Kt.redirect,status:m,location:g,revalidate:d.headers.get("X-Remix-Revalidate")!==null,reloadDocument:d.headers.get("X-Remix-Reload-Document")!==null}}if(c.isRouteRequest)throw{type:l===Kt.error?Kt.error:Kt.data,response:d};let w;try{let g=d.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?d.body==null?w=null:w=await d.json():w=await d.text()}catch(g){return{type:Kt.error,error:g}}return l===Kt.error?{type:l,error:new KI(m,d.statusText,w),headers:d.headers}:{type:Kt.data,data:w,statusCode:d.status,headers:d.headers}}if(l===Kt.error)return{type:l,error:d};if(uW(d)){var f,p;return{type:Kt.deferred,deferredData:d,statusCode:(f=d.init)==null?void 0:f.status,headers:((p=d.init)==null?void 0:p.headers)&&new Headers(d.init.headers)}}return{type:Kt.data,data:d}}function Pu(r,e,t,n){let i=r.createURL(tA(e)).toString(),o={signal:t};if(n&&Bi(n.formMethod)){let{formMethod:a,formEncType:s}=n;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=P5(n.formData):o.body=n.formData}return new Request(i,o)}function P5(r){let e=new URLSearchParams;for(let[t,n]of r.entries())e.append(t,typeof n=="string"?n:n.name);return e}function Zw(r){let e=new FormData;for(let[t,n]of r.entries())e.append(t,n);return e}function lW(r,e,t,n,i){let o={},a=null,s,c=!1,l={};return t.forEach((d,u)=>{let h=e[u].route.id;if(Qe(!mc(d),"Cannot handle redirect results in processLoaderData"),ed(d)){let f=Vh(r,h),p=d.error;n&&(p=Object.values(n)[0],n=void 0),a=a||{},a[f.route.id]==null&&(a[f.route.id]=p),o[h]=void 0,c||(c=!0,s=YI(d.error)?d.error.status:500),d.headers&&(l[h]=d.headers)}else pc(d)?(i.set(h,d.deferredData),o[h]=d.deferredData.data):o[h]=d.data,d.statusCode!=null&&d.statusCode!==200&&!c&&(s=d.statusCode),d.headers&&(l[h]=d.headers)}),n&&(a=n,o[Object.keys(n)[0]]=void 0),{loaderData:o,errors:a,statusCode:s||200,loaderHeaders:l}}function Ow(r,e,t,n,i,o,a,s){let{loaderData:c,errors:l}=lW(e,t,n,i,s);for(let d=0;d<o.length;d++){let{key:u,match:h,controller:f}=o[d];Qe(a!==void 0&&a[d]!==void 0,"Did not find corresponding fetcher result");let p=a[d];if(!(f&&f.signal.aborted))if(ed(p)){let m=Vh(r.matches,h==null?void 0:h.route.id);l&&l[m.route.id]||(l=Qt({},l,{[m.route.id]:p.error})),r.fetchers.delete(u)}else if(mc(p))Qe(!1,"Unhandled fetcher revalidation redirect");else if(pc(p))Qe(!1,"Unhandled fetcher deferred data");else{let m=za(p.data);r.fetchers.set(u,m)}}return{loaderData:c,errors:l}}function Lw(r,e,t,n){let i=Qt({},e);for(let o of t){let a=o.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(i[a]=e[a]):r[a]!==void 0&&o.route.loader&&(i[a]=r[a]),n&&n.hasOwnProperty(a))break}return i}function Vh(r,e){return(e?r.slice(0,r.findIndex(n=>n.route.id===e)+1):[...r]).reverse().find(n=>n.route.hasErrorBoundary===!0)||r[0]}function Dw(r){let e=r.length===1?r[0]:r.find(t=>t.index||!t.path||t.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function gi(r,e){let{pathname:t,routeId:n,method:i,type:o}=e===void 0?{}:e,a="Unknown Server Error",s="Unknown @remix-run/router error";return r===400?(a="Bad Request",i&&t&&n?s="You made a "+i+' request to "'+t+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):r===403?(a="Forbidden",s='Route "'+n+'" does not match URL "'+t+'"'):r===404?(a="Not Found",s='No route matches URL "'+t+'"'):r===405&&(a="Method Not Allowed",i&&t&&n?s="You made a "+i.toUpperCase()+' request to "'+t+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new KI(r||500,a,new Error(s),!0)}function Nw(r){for(let e=r.length-1;e>=0;e--){let t=r[e];if(mc(t))return{result:t,idx:e}}}function tA(r){let e=typeof r=="string"?no(r):r;return Yc(Qt({},e,{hash:""}))}function dW(r,e){return r.pathname!==e.pathname||r.search!==e.search?!1:r.hash===""?e.hash!=="":r.hash===e.hash?!0:e.hash!==""}function pc(r){return r.type===Kt.deferred}function ed(r){return r.type===Kt.error}function mc(r){return(r&&r.type)===Kt.redirect}function uW(r){let e=r;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function hW(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.headers=="object"&&typeof r.body<"u"}function fW(r){return eW.has(r.toLowerCase())}function Bi(r){return Xq.has(r.toLowerCase())}async function Vw(r,e,t,n,i,o){for(let a=0;a<t.length;a++){let s=t[a],c=e[a];if(!c)continue;let l=r.find(u=>u.route.id===c.route.id),d=l!=null&&!eA(l,c)&&(o&&o[c.route.id])!==void 0;if(pc(s)&&(i||d)){let u=n[a];Qe(u,"Expected an AbortSignal for revalidating fetcher deferred result"),await rA(s,u,i).then(h=>{h&&(t[a]=h||t[a])})}}}async function rA(r,e,t){if(t===void 0&&(t=!1),!await r.deferredData.resolveData(e)){if(t)try{return{type:Kt.data,data:r.deferredData.unwrappedData}}catch(i){return{type:Kt.error,error:i}}return{type:Kt.data,data:r.deferredData.data}}}function o_(r){return new URLSearchParams(r).getAll("index").some(e=>e==="")}function M5(r,e){let t=typeof e=="string"?no(e).search:e.search;if(r[r.length-1].route.index&&o_(t||""))return r[r.length-1];let n=GI(r);return n[n.length-1]}function Fw(r){let{formMethod:e,formAction:t,formEncType:n,text:i,formData:o,json:a}=r;if(!(!e||!t||!n)){if(i!=null)return{formMethod:e,formAction:t,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:t,formEncType:n,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:e,formAction:t,formEncType:n,formData:void 0,json:a,text:void 0}}}function dg(r,e){return e?{state:"loading",location:r,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function pW(r,e){return{state:"submitting",location:r,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Mu(r,e){return r?{state:"loading",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function mW(r,e){return{state:"submitting",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:e?e.data:void 0}}function za(r){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function vW(r,e){try{let t=r.sessionStorage.getItem(JI);if(t){let n=JSON.parse(t);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function gW(r,e){if(e.size>0){let t={};for(let[n,i]of e)t[n]=[...i];try{r.sessionStorage.setItem(JI,JSON.stringify(t))}catch(n){ga(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}const yW=r=>{switch(r){case"hash":return Sq({v5Compat:!0});case"memory":return Eq({v5Compat:!0});case"browser":default:return kq({v5Compat:!0})}};var Wt=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Kf=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},mi,Xp,$5,Jp,po,ah;const zw=r=>typeof r=="object"&&"key"in r;class _W extends Fe{get basename(){return Wt(this,Xp,"f")}get origin(){return Wt(this,$5,"f")}get state(){return Wt(this,po,"f").asObservable()}get value(){return Wt(this,po,"f").value}get location(){return this.value.location}get action(){return this.value.action}constructor(e){super(i=>Wt(this,po,"f").subscribe(i)),mi.set(this,void 0),Xp.set(this,void 0),$5.set(this,window.location.origin),Jp.set(this,new Mr),po.set(this,void 0),ah.set(this,void 0);const{basename:t,history:n}=e;Kf(this,ah,e.logger||console,"f"),Kf(this,Xp,t,"f"),Kf(this,mi,n,"f"),Kf(this,po,new Fd({action:Wt(this,mi,"f").action,location:Wt(this,mi,"f").location,delta:null}),"f"),Wt(this,Jp,"f").add(Wt(this,mi,"f").listen(i=>{i.location.key!==Wt(this,po,"f").value.location.key&&Wt(this,po,"f").next(i)}))}encodeLocation(e){return Wt(this,mi,"f").encodeLocation(e)}listen(e){const t=Wt(this,po,"f").subscribe(e);return Wt(this,ah,"f").debug("Navigator::listen",e),()=>(Wt(this,ah,"f").debug("Navigator::listen[unsubscribe]",e),t.unsubscribe())}createHref(e){return Wt(this,mi,"f").createHref(e)}go(e){Wt(this,mi,"f").go(e)}push(e,t){if(!(zw(e)&&this._isDuplicateLocation(e)))return Wt(this,mi,"f").push(e,t)}replace(e,t){if(!(zw(e)&&this._isDuplicateLocation(e)))return Wt(this,mi,"f").replace(e,t)}createURL(e){return Wt(this,mi,"f").createURL(e)}_isDuplicateLocation(e){return e.key===Wt(this,po,"f").value.location.key}dispose(){Wt(this,Jp,"f").unsubscribe()}}mi=new WeakMap,Xp=new WeakMap,$5=new WeakMap,Jp=new WeakMap,po=new WeakMap,ah=new WeakMap;var hi=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},jw=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},Fi,tc;const Uw=r=>r.replace(/\/+/g,"/");class bW extends uS{get state$(){return hi(this,Fi,"f").pipe(Ge(e=>hi(this,tc,"f")?e.location.pathname.startsWith(hi(this,tc,"f")):!0),Te(({action:e,location:t})=>({action:e,location:this._localizePath(t)})))}get navigator(){return hi(this,Fi,"f")}get path(){return this._localizePath(this.navigator.location)}constructor(e){super(e),Fi.set(this,void 0),tc.set(this,void 0);const{basename:t,history:n}=e.config;if(jw(this,tc,t,"f"),!n)throw Error("no history provided!");jw(this,Fi,new _W({basename:t,history:n}),"f"),this._addTeardown(()=>hi(this,Fi,"f").dispose())}createRouter(e){const t=hi(this,Fi,"f");console.debug("NavigationProvider::createRouter",e);const n=oW({basename:t.basename,history:t,routes:e,future:{v7_prependBasename:!0}});return n.initialize(),n}createHref(e){return hi(this,Fi,"f").createHref(this._createToPath(e??this.path))}createURL(e){return hi(this,Fi,"f").createURL(this._createToPath(e??this.path))}push(e,t){return hi(this,Fi,"f").push(this._createToPath(e),t)}replace(e,t){return hi(this,Fi,"f").replace(this._createToPath(e),t)}_localizePath(e){var t;const{pathname:n,search:i,hash:o}=e;return{pathname:Uw(n.replace((t=hi(this,tc,"f"))!==null&&t!==void 0?t:"","")),search:i,hash:o}}_createToPath(e){const{pathname:t,search:n,hash:i}=typeof e=="string"?{pathname:e,search:void 0,hash:void 0}:e;return{pathname:Uw([hi(this,tc,"f"),t==="/"?void 0:t].filter(o=>!!o).join("/")),search:n,hash:i}}}Fi=new WeakMap,tc=new WeakMap;const Bw="3.1.3",wW="navigation",xW={version:new Sh(Bw),name:wW,configure:r=>{const e=new Cq;return r&&(e.history=r.navigation.navigator),e},initialize:({config:r})=>{var e;return(e=r.history)!==null&&e!==void 0||(r.history=yW()),new bW({version:Bw,config:r})},dispose({instance:r}){r.dispose()}},CW=(r,e)=>{const t=typeof e=="string"?{configure:n=>{n.basename=e}}:e;r.addConfig(Object.assign({module:xW},t))};var EW=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},$u=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Ha;const nA="::",kW=r=>{const[e,t]=r.split(nA);return{namespace:e,id:t}};class iA{constructor(e,t){this.namespace=e,Ha.set(this,void 0),EW(this,Ha,t,"f")}*[(Ha=new WeakMap,Symbol.iterator)](){for(const e of Object.values(this.getItems()))yield e}generateId(e){return[this.namespace,e].join(nA)}setItem(e,t){$u(this,Ha,"f").setItem(this.generateId(e),JSON.stringify(t))}removeItem(e){$u(this,Ha,"f").removeItem(this.generateId(e))}getItem(e){const t=$u(this,Ha,"f").getItem(this.generateId(e));return t?JSON.parse(t):void 0}getItems(){return this._getItems().reduce((e,{id:t,value:n})=>Object.assign(e,{[t]:n}),{})}clear(){this._getItems().forEach(e=>{$u(this,Ha,"f").removeItem(e.key)})}_getItems(){const{namespace:e}=this;return Object.entries($u(this,Ha,"f")).map(([t,n])=>Object.assign(Object.assign({},kW(t)),{key:t,value:n})).filter(t=>t.namespace===e).map(t=>Object.assign(t,{value:JSON.parse(t.value)}))}}class SW extends iA{constructor(e){super(e,window.localStorage)}}class IW extends iA{constructor(e){super(e,window.sessionStorage)}}const AW=(r,e)=>{switch(e){case"local":return new SW(r);case"session":return new IW(r)}throw Error("invalid type provided")};var qw=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const oA=(r,e)=>()=>qw(void 0,void 0,void 0,function*(){const{name:t,type:n="local"}=e??{},i=["FEATURES",t].filter(a=>!!a).join("_"),o=AW(i,n);return{connect:({provider:a})=>a.onFeatureToggle(({features:s})=>{s.map(c=>o.setItem(c.key,c))}),initial:()=>qw(void 0,void 0,void 0,function*(){const a=yield o.getItems();return r.map(s=>{const c=a[s.key];return Object.assign(Object.assign({},s),{enabled:c?c.enabled:s.enabled})})})}}),TW=r=>!(r.value==="0"||r.value==="false");var Ww=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const aA=(r,e)=>{if(!r.length)return()=>Promise.resolve({});const t=r.map(n=>typeof n=="string"?n:n.key);return n=>Ww(void 0,void 0,void 0,function*(){if(!n.hasModule("navigation"))throw Error("missing navigation module");const i=yield n.requireInstance("navigation"),{isFeatureEnabled:o=TW}=e??{};return{order:-1,initial:()=>Ww(void 0,void 0,void 0,function*(){return r.filter(a=>typeof a!="string")}),connect(a){const{provider:s}=a,c=new Mr,l=new cn,d=new cn,u=s.features$.pipe(Te(f=>Object.values(f)),Te(f=>f.filter(p=>t.includes(p.key)))),h=d.pipe(Ry(u),Te(([f,p])=>{const m=new URLSearchParams(f.search);return p.reduce((w,g)=>{const{key:v}=g;if(m.has(v)){const _=m.get(v),E=o({feature:g,value:_,path:f});w.push({key:v,enabled:E})}return w},[])}),ud(l));return c.add(h.subscribe(f=>s.toggleFeatures(f))),c.add(()=>d.complete()),c.add(i.navigator.listen(f=>{d.next(f.location)})),d.next(i.path),c}}})};var Gw=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},e2,sA;class RW extends ZL{constructor(){super(...arguments),e2.set(this,[]),sA.set(this,[])}addPlugin(e){return Gw(this,e2,"f").push(e),this}enableLocalFeatures(...e){return this.addPlugin(oA(...e))}enableUrlToggle(...e){return this.addPlugin(aA(...e))}_processConfig(e,t){const n=zt(Gw(this,e2,"f")).pipe(Fn(a=>a(t)),Ge(a=>Object.keys(a).length>0),j2((a,s)=>(a.push(s),a),[]),L1(),rm()),i=n.pipe(B4(a=>zt(a.sort((s,c)=>{var l,d;return((l=s.order)!==null&&l!==void 0?l:0)-((d=c.order)!==null&&d!==void 0?d:0)})).pipe(Ge(s=>!!s.initial),B4(s=>s.initial()),j2((s,c)=>{for(const l in c)l in s&&console.warn("FeatureFlagConfigurator",`duplicate entry of ${l}`);return s.push(...c),s},[]))));return bL({initial:i,plugins:n}).pipe(Te(a=>Object.assign(Object.assign({},e),a)))}}e2=new WeakMap,sA=new WeakMap;const f0={setFeatures:_r("set_features_enabled",r=>({payload:r})),toggleFeatures:_r("toggle_features_enabled",r=>({payload:r}))},PW=r=>Bd(r,e=>{e.addCase(f0.setFeatures,(t,n)=>{n.payload.forEach(i=>{t.features[i.key]=i})}),e.addCase(f0.toggleFeatures,(t,n)=>{n.payload.filter(i=>i.key in t.features).forEach(i=>{const{key:o}=i;t.features[o].enabled=!!i.enabled})})}),MW={features:{}},$W=r=>new N1(PW(r??MW)),HW=r=>r.reduce((e,t)=>Object.assign(e,{[t.key]:t}),{});var ug=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},fi=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Kw=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},ja,Ua,t2;class ZW{get features(){return fi(this,Ua,"f").value.features}get features$(){return fi(this,Ua,"f").pipe(Te(e=>e.features))}constructor(e){ja.set(this,new Mr),Ua.set(this,void 0),t2.set(this,void 0);const{config:t,event:n}=e;Kw(this,t2,n,"f"),Kw(this,Ua,$W({features:HW(t.initial)}),"f"),Object.values(t.plugins).forEach(i=>{i.connect&&fi(this,ja,"f").add(i.connect({provider:this}))}),n&&this.onFeatureToggle(({features:i})=>n.dispatchEvent("onFeatureFlagsToggled",{detail:{features:i}}))}hasFeature(e){return e in this.features}setFeatures(e){fi(this,Ua,"f").next(f0.setFeatures(e))}onFeatureToggle(e){const t=this.features$.pipe(B2(),Te(([n,i])=>Object.values(i).filter(o=>{var a;return o.enabled!==((a=n[o.key])===null||a===void 0?void 0:a.enabled)})),Te(n=>({features:n}))).subscribe(e);return fi(this,ja,"f").add(t),()=>fi(this,ja,"f").remove(t)}toggleFeature(e){return ug(this,void 0,void 0,function*(){return this.toggleFeatures([e])})}toggleFeatures(e){return ug(this,void 0,void 0,function*(){const{features:t}=fi(this,Ua,"f").value,n=zt(e).pipe(yt(i=>ug(this,void 0,void 0,function*(){var o;const a=t[i.key];if(a){if(a.readonly){console.warn(`skipped toggling flag [${a.key}], since readonly!`);return}}else{console.warn(`toggling flag [${i.key}] which is not registered`);return}const s=yield(o=fi(this,t2,"f"))===null||o===void 0?void 0:o.dispatchEvent("onFeatureFlagToggle",{source:this,detail:{feature:a,enable:i.enabled},cancelable:!0});if(s!=null&&s.canceled)console.debug(`skipped toggling flag [${a.key}], since aborted!`);else return i})),Ge(i=>!!i),j2((i,o)=>i.concat([o]),[]),U2(()=>{fi(this,ja,"f").remove(n)})).subscribe(i=>{fi(this,Ua,"f").next(f0.toggleFeatures(i))});fi(this,ja,"f").add(n)})}getFeature(e){return this.features[e]}getFeatures(e){return Object.values(this.features).filter(e)}dispose(){fi(this,ja,"f").unsubscribe()}}ja=new WeakMap,Ua=new WeakMap,t2=new WeakMap;var cA=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const OW="featureFlag",LW={name:OW,configure:()=>new RW,initialize:r=>cA(void 0,void 0,void 0,function*(){const e=yield r.config.createConfigAsync(r),t=r.hasModule("event")?yield r.requireInstance("event"):void 0;return new ZW({config:e,event:t})})},DW=(r,e)=>{r.addConfig({module:LW,configure:t=>cA(void 0,void 0,void 0,function*(){if(e)return Promise.resolve(e(t))})})},NW=async r=>{r.logger.level=0,r.configureServiceDiscovery({client:{baseUri:import.meta.url,defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}}),r.configureMsal({tenantId:"3aa4a235-b6e2-48d5-9195-7fcf05b459b0",clientId:"9b707e3a-3e90-41ed-a47e-652a1e3b53d0",redirectUri:"/authentication/login-callback"},{requiresAuth:!0}),iq(r),CW(r),yz(r),xq(r,e=>{e.setSourceSystem({subSystem:"CLI",identifier:"fusion-cli",name:"Fusion CLI"})}),DW(r,e=>{e.addPlugin(oA([{key:"fusionDebug",title:"Fusion debug log",description:"Show Fusion debug log in console"},{key:"pinkBg",title:"Use pink bg?",description:"When enabled the background should be pink"}])),e.addPlugin(aA(["fusionDebug"]))}),r.onConfigured(()=>{console.log("framework config done")}),r.onInitialized(async e=>{e.auth.defaultClient.setLogger(new AS(0)),console.debug("📒 subscribing to all events")})},VW="bookmarkId",FW=r=>{const{event:e,context:t,navigation:{navigator:n}}=hn().modules;y.useLayoutEffect(()=>e.addEventListener("onBookmarkChanged",o=>{var a;const{appKey:s,context:c}=o.detail,l=r.resolveAppPath(s);if(n.location.pathname!==l){const{hash:d,search:u}=n.location,h={pathname:l,search:zW(u),hash:d};n.push(h)}c&&((a=t.currentContext)===null||a===void 0?void 0:a.id)!==c.id&&t.setCurrentContextByIdAsync(c.id)}),[r,t,e,n])};function zW(r){const e=new URLSearchParams(r);return e.delete(VW),`?${e.toString()}`}const jW=()=>{const r=hn().modules.event,[e,t]=y.useState(!1);return y.useEffect(()=>{const n=r.addEventListener("onBookmarkChanged",()=>{t(!1)}),i=r.addEventListener("onAddCreator",()=>{t(!0)});return()=>{n(),i()}},[r]),e};/**
|
|
415
|
+
`},""):String(n.body);return{path:t,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!Bi(a))return i();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let c,l;if(n.formData)c=P5(n.formData),l=n.formData;else if(n.body instanceof FormData)c=P5(n.body),l=n.body;else if(n.body instanceof URLSearchParams)c=n.body,l=Zw(c);else if(n.body==null)c=new URLSearchParams,l=new FormData;else try{c=new URLSearchParams(n.body),l=Zw(c)}catch{return i()}let d={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Bi(d.formMethod))return{path:t,submission:d};let u=no(t);return e&&u.search&&o_(u.search)&&c.append("index",""),u.search="?"+c,{path:Yc(u),submission:d}}function sW(r,e){let t=r;if(e){let n=r.findIndex(i=>i.route.id===e);n>=0&&(t=r.slice(0,n))}return t}function Mw(r,e,t,n,i,o,a,s,c,l,d,u,h,f,p,m){let w=m?Object.values(m)[0]:p?Object.values(p)[0]:void 0,g=r.createURL(e.location),v=r.createURL(i),_=m?Object.keys(m)[0]:void 0,k=sW(t,_).filter((S,Z)=>{let{route:q}=S;if(q.lazy)return!0;if(q.loader==null)return!1;if(o)return q.loader.hydrate?!0:e.loaderData[q.id]===void 0&&(!e.errors||e.errors[q.id]===void 0);if(cW(e.loaderData,e.matches[Z],S)||s.some(ae=>ae===S.route.id))return!0;let ie=e.matches[Z],re=S;return $w(S,Qt({currentUrl:g,currentParams:ie.params,nextUrl:v,nextParams:re.params},n,{actionResult:w,defaultShouldRevalidate:a||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||eA(ie,re)}))}),C=[];return d.forEach((S,Z)=>{if(o||!t.some(F=>F.route.id===S.routeId)||l.has(Z))return;let q=Jl(h,S.path,f);if(!q){C.push({key:Z,routeId:S.routeId,path:S.path,matches:null,match:null,controller:null});return}let ie=e.fetchers.get(Z),re=M5(q,S.path),ae=!1;u.has(Z)?ae=!1:c.includes(Z)?ae=!0:ie&&ie.state!=="idle"&&ie.data===void 0?ae=a:ae=$w(re,Qt({currentUrl:g,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:t[t.length-1].params},n,{actionResult:w,defaultShouldRevalidate:a})),ae&&C.push({key:Z,routeId:S.routeId,path:S.path,matches:q,match:re,controller:new AbortController})}),[k,C]}function cW(r,e,t){let n=!e||t.route.id!==e.route.id,i=r[t.route.id]===void 0;return n||i}function eA(r,e){let t=r.route.path;return r.pathname!==e.pathname||t!=null&&t.endsWith("*")&&r.params["*"]!==e.params["*"]}function $w(r,e){if(r.route.shouldRevalidate){let t=r.route.shouldRevalidate(e);if(typeof t=="boolean")return t}return e.defaultShouldRevalidate}async function Hw(r,e,t){if(!r.lazy)return;let n=await r.lazy();if(!r.lazy)return;let i=t[r.id];Qe(i,"No route found in manifest");let o={};for(let a in n){let c=i[a]!==void 0&&a!=="hasErrorBoundary";ga(!c,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!c&&!Aq.has(a)&&(o[a]=n[a])}Object.assign(i,o),Object.assign(i,Qt({},e(i),{lazy:void 0}))}async function Ru(r,e,t,n,i,o,a,s,c){c===void 0&&(c={});let l,d,u,h=m=>{let w,g=new Promise((v,_)=>w=_);return u=()=>w(),e.signal.addEventListener("abort",u),Promise.race([m({request:e,params:t.params,context:c.requestContext}),g])};try{let m=t.route[r];if(t.route.lazy)if(m){let w,g=await Promise.all([h(m).catch(v=>{w=v}),Hw(t.route,o,i)]);if(w)throw w;d=g[0]}else if(await Hw(t.route,o,i),m=t.route[r],m)d=await h(m);else if(r==="action"){let w=new URL(e.url),g=w.pathname+w.search;throw gi(405,{method:e.method,pathname:g,routeId:t.route.id})}else return{type:Kt.data,data:void 0};else if(m)d=await h(m);else{let w=new URL(e.url),g=w.pathname+w.search;throw gi(404,{pathname:g})}Qe(d!==void 0,"You defined "+(r==="action"?"an action":"a loader")+" for route "+('"'+t.route.id+"\" but didn't return anything from your `"+r+"` ")+"function. Please return a value or `null`.")}catch(m){l=Kt.error,d=m}finally{u&&e.signal.removeEventListener("abort",u)}if(hW(d)){let m=d.status;if(tW.has(m)){let g=d.headers.get("Location");if(Qe(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!XI.test(g))g=R5(new URL(e.url),n.slice(0,n.indexOf(t)+1),a,!0,g,s);else if(!c.isStaticRequest){let v=new URL(e.url),_=g.startsWith("//")?new URL(v.protocol+g):new URL(g),E=q1(_.pathname,a)!=null;_.origin===v.origin&&E&&(g=_.pathname+_.search+_.hash)}if(c.isStaticRequest)throw d.headers.set("Location",g),d;return{type:Kt.redirect,status:m,location:g,revalidate:d.headers.get("X-Remix-Revalidate")!==null,reloadDocument:d.headers.get("X-Remix-Reload-Document")!==null}}if(c.isRouteRequest)throw{type:l===Kt.error?Kt.error:Kt.data,response:d};let w;try{let g=d.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?d.body==null?w=null:w=await d.json():w=await d.text()}catch(g){return{type:Kt.error,error:g}}return l===Kt.error?{type:l,error:new KI(m,d.statusText,w),headers:d.headers}:{type:Kt.data,data:w,statusCode:d.status,headers:d.headers}}if(l===Kt.error)return{type:l,error:d};if(uW(d)){var f,p;return{type:Kt.deferred,deferredData:d,statusCode:(f=d.init)==null?void 0:f.status,headers:((p=d.init)==null?void 0:p.headers)&&new Headers(d.init.headers)}}return{type:Kt.data,data:d}}function Pu(r,e,t,n){let i=r.createURL(tA(e)).toString(),o={signal:t};if(n&&Bi(n.formMethod)){let{formMethod:a,formEncType:s}=n;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=P5(n.formData):o.body=n.formData}return new Request(i,o)}function P5(r){let e=new URLSearchParams;for(let[t,n]of r.entries())e.append(t,typeof n=="string"?n:n.name);return e}function Zw(r){let e=new FormData;for(let[t,n]of r.entries())e.append(t,n);return e}function lW(r,e,t,n,i){let o={},a=null,s,c=!1,l={};return t.forEach((d,u)=>{let h=e[u].route.id;if(Qe(!mc(d),"Cannot handle redirect results in processLoaderData"),ed(d)){let f=Vh(r,h),p=d.error;n&&(p=Object.values(n)[0],n=void 0),a=a||{},a[f.route.id]==null&&(a[f.route.id]=p),o[h]=void 0,c||(c=!0,s=YI(d.error)?d.error.status:500),d.headers&&(l[h]=d.headers)}else pc(d)?(i.set(h,d.deferredData),o[h]=d.deferredData.data):o[h]=d.data,d.statusCode!=null&&d.statusCode!==200&&!c&&(s=d.statusCode),d.headers&&(l[h]=d.headers)}),n&&(a=n,o[Object.keys(n)[0]]=void 0),{loaderData:o,errors:a,statusCode:s||200,loaderHeaders:l}}function Ow(r,e,t,n,i,o,a,s){let{loaderData:c,errors:l}=lW(e,t,n,i,s);for(let d=0;d<o.length;d++){let{key:u,match:h,controller:f}=o[d];Qe(a!==void 0&&a[d]!==void 0,"Did not find corresponding fetcher result");let p=a[d];if(!(f&&f.signal.aborted))if(ed(p)){let m=Vh(r.matches,h==null?void 0:h.route.id);l&&l[m.route.id]||(l=Qt({},l,{[m.route.id]:p.error})),r.fetchers.delete(u)}else if(mc(p))Qe(!1,"Unhandled fetcher revalidation redirect");else if(pc(p))Qe(!1,"Unhandled fetcher deferred data");else{let m=za(p.data);r.fetchers.set(u,m)}}return{loaderData:c,errors:l}}function Lw(r,e,t,n){let i=Qt({},e);for(let o of t){let a=o.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(i[a]=e[a]):r[a]!==void 0&&o.route.loader&&(i[a]=r[a]),n&&n.hasOwnProperty(a))break}return i}function Vh(r,e){return(e?r.slice(0,r.findIndex(n=>n.route.id===e)+1):[...r]).reverse().find(n=>n.route.hasErrorBoundary===!0)||r[0]}function Dw(r){let e=r.length===1?r[0]:r.find(t=>t.index||!t.path||t.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function gi(r,e){let{pathname:t,routeId:n,method:i,type:o}=e===void 0?{}:e,a="Unknown Server Error",s="Unknown @remix-run/router error";return r===400?(a="Bad Request",i&&t&&n?s="You made a "+i+' request to "'+t+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):r===403?(a="Forbidden",s='Route "'+n+'" does not match URL "'+t+'"'):r===404?(a="Not Found",s='No route matches URL "'+t+'"'):r===405&&(a="Method Not Allowed",i&&t&&n?s="You made a "+i.toUpperCase()+' request to "'+t+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new KI(r||500,a,new Error(s),!0)}function Nw(r){for(let e=r.length-1;e>=0;e--){let t=r[e];if(mc(t))return{result:t,idx:e}}}function tA(r){let e=typeof r=="string"?no(r):r;return Yc(Qt({},e,{hash:""}))}function dW(r,e){return r.pathname!==e.pathname||r.search!==e.search?!1:r.hash===""?e.hash!=="":r.hash===e.hash?!0:e.hash!==""}function pc(r){return r.type===Kt.deferred}function ed(r){return r.type===Kt.error}function mc(r){return(r&&r.type)===Kt.redirect}function uW(r){let e=r;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function hW(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.headers=="object"&&typeof r.body<"u"}function fW(r){return eW.has(r.toLowerCase())}function Bi(r){return Xq.has(r.toLowerCase())}async function Vw(r,e,t,n,i,o){for(let a=0;a<t.length;a++){let s=t[a],c=e[a];if(!c)continue;let l=r.find(u=>u.route.id===c.route.id),d=l!=null&&!eA(l,c)&&(o&&o[c.route.id])!==void 0;if(pc(s)&&(i||d)){let u=n[a];Qe(u,"Expected an AbortSignal for revalidating fetcher deferred result"),await rA(s,u,i).then(h=>{h&&(t[a]=h||t[a])})}}}async function rA(r,e,t){if(t===void 0&&(t=!1),!await r.deferredData.resolveData(e)){if(t)try{return{type:Kt.data,data:r.deferredData.unwrappedData}}catch(i){return{type:Kt.error,error:i}}return{type:Kt.data,data:r.deferredData.data}}}function o_(r){return new URLSearchParams(r).getAll("index").some(e=>e==="")}function M5(r,e){let t=typeof e=="string"?no(e).search:e.search;if(r[r.length-1].route.index&&o_(t||""))return r[r.length-1];let n=GI(r);return n[n.length-1]}function Fw(r){let{formMethod:e,formAction:t,formEncType:n,text:i,formData:o,json:a}=r;if(!(!e||!t||!n)){if(i!=null)return{formMethod:e,formAction:t,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:t,formEncType:n,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:e,formAction:t,formEncType:n,formData:void 0,json:a,text:void 0}}}function dg(r,e){return e?{state:"loading",location:r,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function pW(r,e){return{state:"submitting",location:r,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Mu(r,e){return r?{state:"loading",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function mW(r,e){return{state:"submitting",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:e?e.data:void 0}}function za(r){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function vW(r,e){try{let t=r.sessionStorage.getItem(JI);if(t){let n=JSON.parse(t);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function gW(r,e){if(e.size>0){let t={};for(let[n,i]of e)t[n]=[...i];try{r.sessionStorage.setItem(JI,JSON.stringify(t))}catch(n){ga(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}const yW=r=>{switch(r){case"hash":return Sq({v5Compat:!0});case"memory":return Eq({v5Compat:!0});case"browser":default:return kq({v5Compat:!0})}};var Wt=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Kf=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},mi,Xp,$5,Jp,po,ah;const zw=r=>typeof r=="object"&&"key"in r;class _W extends Fe{get basename(){return Wt(this,Xp,"f")}get origin(){return Wt(this,$5,"f")}get state(){return Wt(this,po,"f").asObservable()}get value(){return Wt(this,po,"f").value}get location(){return this.value.location}get action(){return this.value.action}constructor(e){super(i=>Wt(this,po,"f").subscribe(i)),mi.set(this,void 0),Xp.set(this,void 0),$5.set(this,window.location.origin),Jp.set(this,new Mr),po.set(this,void 0),ah.set(this,void 0);const{basename:t,history:n}=e;Kf(this,ah,e.logger||console,"f"),Kf(this,Xp,t,"f"),Kf(this,mi,n,"f"),Kf(this,po,new Fd({action:Wt(this,mi,"f").action,location:Wt(this,mi,"f").location,delta:null}),"f"),Wt(this,Jp,"f").add(Wt(this,mi,"f").listen(i=>{i.location.key!==Wt(this,po,"f").value.location.key&&Wt(this,po,"f").next(i)}))}encodeLocation(e){return Wt(this,mi,"f").encodeLocation(e)}listen(e){const t=Wt(this,po,"f").subscribe(e);return Wt(this,ah,"f").debug("Navigator::listen",e),()=>(Wt(this,ah,"f").debug("Navigator::listen[unsubscribe]",e),t.unsubscribe())}createHref(e){return Wt(this,mi,"f").createHref(e)}go(e){Wt(this,mi,"f").go(e)}push(e,t){if(!(zw(e)&&this._isDuplicateLocation(e)))return Wt(this,mi,"f").push(e,t)}replace(e,t){if(!(zw(e)&&this._isDuplicateLocation(e)))return Wt(this,mi,"f").replace(e,t)}createURL(e){return Wt(this,mi,"f").createURL(e)}_isDuplicateLocation(e){return e.key===Wt(this,po,"f").value.location.key}dispose(){Wt(this,Jp,"f").unsubscribe()}}mi=new WeakMap,Xp=new WeakMap,$5=new WeakMap,Jp=new WeakMap,po=new WeakMap,ah=new WeakMap;var hi=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},jw=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},Fi,tc;const Uw=r=>r.replace(/\/+/g,"/");class bW extends uS{get state$(){return hi(this,Fi,"f").pipe(Ge(e=>hi(this,tc,"f")?e.location.pathname.startsWith(hi(this,tc,"f")):!0),Te(({action:e,location:t})=>({action:e,location:this._localizePath(t)})))}get navigator(){return hi(this,Fi,"f")}get path(){return this._localizePath(this.navigator.location)}constructor(e){super(e),Fi.set(this,void 0),tc.set(this,void 0);const{basename:t,history:n}=e.config;if(jw(this,tc,t,"f"),!n)throw Error("no history provided!");jw(this,Fi,new _W({basename:t,history:n}),"f"),this._addTeardown(()=>hi(this,Fi,"f").dispose())}createRouter(e){const t=hi(this,Fi,"f");console.debug("NavigationProvider::createRouter",e);const n=oW({basename:t.basename,history:t,routes:e,future:{v7_prependBasename:!0}});return n.initialize(),n}createHref(e){return hi(this,Fi,"f").createHref(this._createToPath(e??this.path))}createURL(e){return hi(this,Fi,"f").createURL(this._createToPath(e??this.path))}push(e,t){return hi(this,Fi,"f").push(this._createToPath(e),t)}replace(e,t){return hi(this,Fi,"f").replace(this._createToPath(e),t)}_localizePath(e){var t;const{pathname:n,search:i,hash:o}=e;return{pathname:Uw(n.replace((t=hi(this,tc,"f"))!==null&&t!==void 0?t:"","")),search:i,hash:o}}_createToPath(e){const{pathname:t,search:n,hash:i}=typeof e=="string"?{pathname:e,search:void 0,hash:void 0}:e;return{pathname:Uw([hi(this,tc,"f"),t==="/"?void 0:t].filter(o=>!!o).join("/")),search:n,hash:i}}}Fi=new WeakMap,tc=new WeakMap;const Bw="3.1.4",wW="navigation",xW={version:new Sh(Bw),name:wW,configure:r=>{const e=new Cq;return r&&(e.history=r.navigation.navigator),e},initialize:({config:r})=>{var e;return(e=r.history)!==null&&e!==void 0||(r.history=yW()),new bW({version:Bw,config:r})},dispose({instance:r}){r.dispose()}},CW=(r,e)=>{const t=typeof e=="string"?{configure:n=>{n.basename=e}}:e;r.addConfig(Object.assign({module:xW},t))};var EW=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},$u=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Ha;const nA="::",kW=r=>{const[e,t]=r.split(nA);return{namespace:e,id:t}};class iA{constructor(e,t){this.namespace=e,Ha.set(this,void 0),EW(this,Ha,t,"f")}*[(Ha=new WeakMap,Symbol.iterator)](){for(const e of Object.values(this.getItems()))yield e}generateId(e){return[this.namespace,e].join(nA)}setItem(e,t){$u(this,Ha,"f").setItem(this.generateId(e),JSON.stringify(t))}removeItem(e){$u(this,Ha,"f").removeItem(this.generateId(e))}getItem(e){const t=$u(this,Ha,"f").getItem(this.generateId(e));return t?JSON.parse(t):void 0}getItems(){return this._getItems().reduce((e,{id:t,value:n})=>Object.assign(e,{[t]:n}),{})}clear(){this._getItems().forEach(e=>{$u(this,Ha,"f").removeItem(e.key)})}_getItems(){const{namespace:e}=this;return Object.entries($u(this,Ha,"f")).map(([t,n])=>Object.assign(Object.assign({},kW(t)),{key:t,value:n})).filter(t=>t.namespace===e).map(t=>Object.assign(t,{value:JSON.parse(t.value)}))}}class SW extends iA{constructor(e){super(e,window.localStorage)}}class IW extends iA{constructor(e){super(e,window.sessionStorage)}}const AW=(r,e)=>{switch(e){case"local":return new SW(r);case"session":return new IW(r)}throw Error("invalid type provided")};var qw=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const oA=(r,e)=>()=>qw(void 0,void 0,void 0,function*(){const{name:t,type:n="local"}=e??{},i=["FEATURES",t].filter(a=>!!a).join("_"),o=AW(i,n);return{connect:({provider:a})=>a.onFeatureToggle(({features:s})=>{s.map(c=>o.setItem(c.key,c))}),initial:()=>qw(void 0,void 0,void 0,function*(){const a=yield o.getItems();return r.map(s=>{const c=a[s.key];return Object.assign(Object.assign({},s),{enabled:c?c.enabled:s.enabled})})})}}),TW=r=>!(r.value==="0"||r.value==="false");var Ww=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const aA=(r,e)=>{if(!r.length)return()=>Promise.resolve({});const t=r.map(n=>typeof n=="string"?n:n.key);return n=>Ww(void 0,void 0,void 0,function*(){if(!n.hasModule("navigation"))throw Error("missing navigation module");const i=yield n.requireInstance("navigation"),{isFeatureEnabled:o=TW}=e??{};return{order:-1,initial:()=>Ww(void 0,void 0,void 0,function*(){return r.filter(a=>typeof a!="string")}),connect(a){const{provider:s}=a,c=new Mr,l=new cn,d=new cn,u=s.features$.pipe(Te(f=>Object.values(f)),Te(f=>f.filter(p=>t.includes(p.key)))),h=d.pipe(Ry(u),Te(([f,p])=>{const m=new URLSearchParams(f.search);return p.reduce((w,g)=>{const{key:v}=g;if(m.has(v)){const _=m.get(v),E=o({feature:g,value:_,path:f});w.push({key:v,enabled:E})}return w},[])}),ud(l));return c.add(h.subscribe(f=>s.toggleFeatures(f))),c.add(()=>d.complete()),c.add(i.navigator.listen(f=>{d.next(f.location)})),d.next(i.path),c}}})};var Gw=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},e2,sA;class RW extends ZL{constructor(){super(...arguments),e2.set(this,[]),sA.set(this,[])}addPlugin(e){return Gw(this,e2,"f").push(e),this}enableLocalFeatures(...e){return this.addPlugin(oA(...e))}enableUrlToggle(...e){return this.addPlugin(aA(...e))}_processConfig(e,t){const n=zt(Gw(this,e2,"f")).pipe(Fn(a=>a(t)),Ge(a=>Object.keys(a).length>0),j2((a,s)=>(a.push(s),a),[]),L1(),rm()),i=n.pipe(B4(a=>zt(a.sort((s,c)=>{var l,d;return((l=s.order)!==null&&l!==void 0?l:0)-((d=c.order)!==null&&d!==void 0?d:0)})).pipe(Ge(s=>!!s.initial),B4(s=>s.initial()),j2((s,c)=>{for(const l in c)l in s&&console.warn("FeatureFlagConfigurator",`duplicate entry of ${l}`);return s.push(...c),s},[]))));return bL({initial:i,plugins:n}).pipe(Te(a=>Object.assign(Object.assign({},e),a)))}}e2=new WeakMap,sA=new WeakMap;const f0={setFeatures:_r("set_features_enabled",r=>({payload:r})),toggleFeatures:_r("toggle_features_enabled",r=>({payload:r}))},PW=r=>Bd(r,e=>{e.addCase(f0.setFeatures,(t,n)=>{n.payload.forEach(i=>{t.features[i.key]=i})}),e.addCase(f0.toggleFeatures,(t,n)=>{n.payload.filter(i=>i.key in t.features).forEach(i=>{const{key:o}=i;t.features[o].enabled=!!i.enabled})})}),MW={features:{}},$W=r=>new N1(PW(r??MW)),HW=r=>r.reduce((e,t)=>Object.assign(e,{[t.key]:t}),{});var ug=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},fi=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Kw=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},ja,Ua,t2;class ZW{get features(){return fi(this,Ua,"f").value.features}get features$(){return fi(this,Ua,"f").pipe(Te(e=>e.features))}constructor(e){ja.set(this,new Mr),Ua.set(this,void 0),t2.set(this,void 0);const{config:t,event:n}=e;Kw(this,t2,n,"f"),Kw(this,Ua,$W({features:HW(t.initial)}),"f"),Object.values(t.plugins).forEach(i=>{i.connect&&fi(this,ja,"f").add(i.connect({provider:this}))}),n&&this.onFeatureToggle(({features:i})=>n.dispatchEvent("onFeatureFlagsToggled",{detail:{features:i}}))}hasFeature(e){return e in this.features}setFeatures(e){fi(this,Ua,"f").next(f0.setFeatures(e))}onFeatureToggle(e){const t=this.features$.pipe(B2(),Te(([n,i])=>Object.values(i).filter(o=>{var a;return o.enabled!==((a=n[o.key])===null||a===void 0?void 0:a.enabled)})),Te(n=>({features:n}))).subscribe(e);return fi(this,ja,"f").add(t),()=>fi(this,ja,"f").remove(t)}toggleFeature(e){return ug(this,void 0,void 0,function*(){return this.toggleFeatures([e])})}toggleFeatures(e){return ug(this,void 0,void 0,function*(){const{features:t}=fi(this,Ua,"f").value,n=zt(e).pipe(yt(i=>ug(this,void 0,void 0,function*(){var o;const a=t[i.key];if(a){if(a.readonly){console.warn(`skipped toggling flag [${a.key}], since readonly!`);return}}else{console.warn(`toggling flag [${i.key}] which is not registered`);return}const s=yield(o=fi(this,t2,"f"))===null||o===void 0?void 0:o.dispatchEvent("onFeatureFlagToggle",{source:this,detail:{feature:a,enable:i.enabled},cancelable:!0});if(s!=null&&s.canceled)console.debug(`skipped toggling flag [${a.key}], since aborted!`);else return i})),Ge(i=>!!i),j2((i,o)=>i.concat([o]),[]),U2(()=>{fi(this,ja,"f").remove(n)})).subscribe(i=>{fi(this,Ua,"f").next(f0.toggleFeatures(i))});fi(this,ja,"f").add(n)})}getFeature(e){return this.features[e]}getFeatures(e){return Object.values(this.features).filter(e)}dispose(){fi(this,ja,"f").unsubscribe()}}ja=new WeakMap,Ua=new WeakMap,t2=new WeakMap;var cA=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const OW="featureFlag",LW={name:OW,configure:()=>new RW,initialize:r=>cA(void 0,void 0,void 0,function*(){const e=yield r.config.createConfigAsync(r),t=r.hasModule("event")?yield r.requireInstance("event"):void 0;return new ZW({config:e,event:t})})},DW=(r,e)=>{r.addConfig({module:LW,configure:t=>cA(void 0,void 0,void 0,function*(){if(e)return Promise.resolve(e(t))})})},NW=async r=>{r.logger.level=0,r.configureServiceDiscovery({client:{baseUri:import.meta.url,defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}}),r.configureMsal({tenantId:"3aa4a235-b6e2-48d5-9195-7fcf05b459b0",clientId:"9b707e3a-3e90-41ed-a47e-652a1e3b53d0",redirectUri:"/authentication/login-callback"},{requiresAuth:!0}),iq(r),CW(r),yz(r),xq(r,e=>{e.setSourceSystem({subSystem:"CLI",identifier:"fusion-cli",name:"Fusion CLI"})}),DW(r,e=>{e.addPlugin(oA([{key:"fusionDebug",title:"Fusion debug log",description:"Show Fusion debug log in console"},{key:"pinkBg",title:"Use pink bg?",description:"When enabled the background should be pink"}])),e.addPlugin(aA(["fusionDebug"]))}),r.onConfigured(()=>{console.log("framework config done")}),r.onInitialized(async e=>{e.auth.defaultClient.setLogger(new AS(0)),console.debug("📒 subscribing to all events")})},VW="bookmarkId",FW=r=>{const{event:e,context:t,navigation:{navigator:n}}=hn().modules;y.useLayoutEffect(()=>e.addEventListener("onBookmarkChanged",o=>{var a;const{appKey:s,context:c}=o.detail,l=r.resolveAppPath(s);if(n.location.pathname!==l){const{hash:d,search:u}=n.location,h={pathname:l,search:zW(u),hash:d};n.push(h)}c&&((a=t.currentContext)===null||a===void 0?void 0:a.id)!==c.id&&t.setCurrentContextByIdAsync(c.id)}),[r,t,e,n])};function zW(r){const e=new URLSearchParams(r);return e.delete(VW),`?${e.toString()}`}const jW=()=>{const r=hn().modules.event,[e,t]=y.useState(!1);return y.useEffect(()=>{const n=r.addEventListener("onBookmarkChanged",()=>{t(!1)}),i=r.addEventListener("onAddCreator",()=>{t(!0)});return()=>{n(),i()}},[r]),e};/**
|
|
416
416
|
* React Router v6.21.3
|
|
417
417
|
*
|
|
418
418
|
* Copyright (c) Remix Software Inc.
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "9.6.
|
|
1
|
+
export declare const version = "9.6.4";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '9.6.
|
|
1
|
+
export const version = '9.6.4';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.4",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Fusion",
|
|
6
6
|
"Fusion Framework",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"vite-plugin-environment": "^1.1.3",
|
|
50
50
|
"vite-plugin-restart": "^0.4.0",
|
|
51
51
|
"vite-tsconfig-paths": "^4.2.0",
|
|
52
|
-
"@equinor/fusion-framework-app": "^8.1.
|
|
53
|
-
"@equinor/fusion-framework-module-feature-flag": "^1.0.
|
|
54
|
-
"@equinor/fusion-framework-react-components-people-provider": "^1.1.
|
|
52
|
+
"@equinor/fusion-framework-app": "^8.1.1",
|
|
53
|
+
"@equinor/fusion-framework-module-feature-flag": "^1.0.2",
|
|
54
|
+
"@equinor/fusion-framework-react-components-people-provider": "^1.1.15",
|
|
55
55
|
"@equinor/fusion-observable": "^8.1.5"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
@@ -76,18 +76,18 @@
|
|
|
76
76
|
"styled-components": "^6.0.7",
|
|
77
77
|
"types": "link:./types",
|
|
78
78
|
"typescript": "^5.1.3",
|
|
79
|
-
"@equinor/fusion-framework": "^7.0.
|
|
80
|
-
"@equinor/fusion-framework-app": "^8.1.
|
|
79
|
+
"@equinor/fusion-framework": "^7.0.30",
|
|
80
|
+
"@equinor/fusion-framework-app": "^8.1.1",
|
|
81
81
|
"@equinor/fusion-framework-module-app": "^5.2.13",
|
|
82
|
-
"@equinor/fusion-framework-module-bookmark": "^1.1.
|
|
83
|
-
"@equinor/fusion-framework-module-context": "^4.0.
|
|
84
|
-
"@equinor/fusion-framework-module-http": "^5.1.
|
|
85
|
-
"@equinor/fusion-framework-module-msal": "^3.0.
|
|
86
|
-
"@equinor/fusion-framework-module-navigation": "^3.1.
|
|
87
|
-
"@equinor/fusion-framework-module-services": "^3.2.
|
|
88
|
-
"@equinor/fusion-framework-react": "^6.0.
|
|
89
|
-
"@equinor/fusion-framework-react-components-bookmark": "^0.3.
|
|
90
|
-
"@equinor/fusion-framework-react-module-bookmark": "^2.0.
|
|
82
|
+
"@equinor/fusion-framework-module-bookmark": "^1.1.2",
|
|
83
|
+
"@equinor/fusion-framework-module-context": "^4.0.21",
|
|
84
|
+
"@equinor/fusion-framework-module-http": "^5.1.6",
|
|
85
|
+
"@equinor/fusion-framework-module-msal": "^3.0.10",
|
|
86
|
+
"@equinor/fusion-framework-module-navigation": "^3.1.4",
|
|
87
|
+
"@equinor/fusion-framework-module-services": "^3.2.4",
|
|
88
|
+
"@equinor/fusion-framework-react": "^6.0.2",
|
|
89
|
+
"@equinor/fusion-framework-react-components-bookmark": "^0.3.7",
|
|
90
|
+
"@equinor/fusion-framework-react-module-bookmark": "^2.0.32",
|
|
91
91
|
"@equinor/fusion-query": "^4.0.6"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|