diff --git a/exam/dist/assets/index-B-6Z6srI.js b/exam/dist/assets/index-B-6Z6srI.js deleted file mode 100644 index 85fd002..0000000 --- a/exam/dist/assets/index-B-6Z6srI.js +++ /dev/null @@ -1,164 +0,0 @@ -var gf=e=>{throw TypeError(e)};var oa=(e,t,n)=>t.has(e)||gf("Cannot "+n);var E=(e,t,n)=>(oa(e,t,"read from private field"),n?n.call(e):t.get(e)),q=(e,t,n)=>t.has(e)?gf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(oa(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),be=(e,t,n)=>(oa(e,t,"access private method"),n);var Ri=(e,t,n,r)=>({set _(o){D(e,t,o,n)},get _(){return E(e,t,r)}});function wy(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function zp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function An(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Np={exports:{}},qs={},jp={exports:{}},U={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var yi=Symbol.for("react.element"),xy=Symbol.for("react.portal"),ky=Symbol.for("react.fragment"),_y=Symbol.for("react.strict_mode"),Cy=Symbol.for("react.profiler"),Ey=Symbol.for("react.provider"),Py=Symbol.for("react.context"),Ry=Symbol.for("react.forward_ref"),Ty=Symbol.for("react.suspense"),Oy=Symbol.for("react.memo"),My=Symbol.for("react.lazy"),Sf=Symbol.iterator;function $y(e){return e===null||typeof e!="object"?null:(e=Sf&&e[Sf]||e["@@iterator"],typeof e=="function"?e:null)}var Ap={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dp=Object.assign,Bp={};function ao(e,t,n){this.props=e,this.context=t,this.refs=Bp,this.updater=n||Ap}ao.prototype.isReactComponent={};ao.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ao.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Up(){}Up.prototype=ao.prototype;function Gu(e,t,n){this.props=e,this.context=t,this.refs=Bp,this.updater=n||Ap}var qu=Gu.prototype=new Up;qu.constructor=Gu;Dp(qu,ao.prototype);qu.isPureReactComponent=!0;var wf=Array.isArray,Vp=Object.prototype.hasOwnProperty,Xu={current:null},Wp={key:!0,ref:!0,__self:!0,__source:!0};function Hp(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Vp.call(t,r)&&!Wp.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ys=typeof window>"u"||"Deno"in globalThis;function $t(){}function Uy(e,t){return typeof e=="function"?e(t):e}function Vy(e){return typeof e=="number"&&e>=0&&e!==1/0}function Wy(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _f(e,t){return typeof e=="function"?e(t):e}function Hy(e,t){return typeof e=="function"?e(t):e}function Cf(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:l}=e;if(s){if(r){if(t.queryHash!==Ju(s,t.options))return!1}else if(!Ho(t.queryKey,s))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||i&&!i(t))}function Ef(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Wo(t.options.mutationKey)!==Wo(i))return!1}else if(!Ho(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ju(e,t){return((t==null?void 0:t.queryKeyHashFn)||Wo)(e)}function Wo(e){return JSON.stringify(e,(t,n)=>Wa(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Ho(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ho(e[n],t[n])):!1}function Gp(e,t){if(e===t)return e;const n=Pf(e)&&Pf(t);if(n||Wa(e)&&Wa(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),s=i.length,l=n?[]:{};let a=0;for(let u=0;u{setTimeout(t,e)})}function Qy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Gp(e,t):t}function Gy(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function qy(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var qp=Symbol();function Xp(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===qp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Zn,xn,Br,Tp,Xy=(Tp=class extends Xs{constructor(){super();q(this,Zn);q(this,xn);q(this,Br);D(this,Br,t=>{if(!Ys&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){E(this,xn)||this.setEventListener(E(this,Br))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,xn))==null||t.call(this),D(this,xn,void 0))}setEventListener(t){var n;D(this,Br,t),(n=E(this,xn))==null||n.call(this),D(this,xn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){E(this,Zn)!==t&&(D(this,Zn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof E(this,Zn)=="boolean"?E(this,Zn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Zn=new WeakMap,xn=new WeakMap,Br=new WeakMap,Tp),Yp=new Xy,Ur,kn,Vr,Op,Yy=(Op=class extends Xs{constructor(){super();q(this,Ur,!0);q(this,kn);q(this,Vr);D(this,Vr,t=>{if(!Ys&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){E(this,kn)||this.setEventListener(E(this,Vr))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,kn))==null||t.call(this),D(this,kn,void 0))}setEventListener(t){var n;D(this,Vr,t),(n=E(this,kn))==null||n.call(this),D(this,kn,t(this.setOnline.bind(this)))}setOnline(t){E(this,Ur)!==t&&(D(this,Ur,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return E(this,Ur)}},Ur=new WeakMap,kn=new WeakMap,Vr=new WeakMap,Op),vs=new Yy;function Jy(e){return Math.min(1e3*2**e,3e4)}function Jp(e){return(e??"online")==="online"?vs.isOnline():!0}var Zp=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function sa(e){return e instanceof Zp}function eh(e){let t=!1,n=0,r=!1,o,i,s;const l=new Promise((p,h)=>{i=p,s=h}),a=p=>{var h;r||(g(new Zp(p)),(h=e.abort)==null||h.call(e))},u=()=>{t=!0},c=()=>{t=!1},d=()=>Yp.isFocused()&&(e.networkMode==="always"||vs.isOnline())&&e.canRun(),f=()=>Jp(e.networkMode)&&e.canRun(),v=p=>{var h;r||(r=!0,(h=e.onSuccess)==null||h.call(e,p),o==null||o(),i(p))},g=p=>{var h;r||(r=!0,(h=e.onError)==null||h.call(e,p),o==null||o(),s(p))},y=()=>new Promise(p=>{var h;o=m=>{(r||d())&&p(m)},(h=e.onPause)==null||h.call(e)}).then(()=>{var p;o=void 0,r||(p=e.onContinue)==null||p.call(e)}),k=()=>{if(r)return;let p;const h=n===0?e.initialPromise:void 0;try{p=h??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(v).catch(m=>{var _;if(r)return;const S=e.retry??(Ys?0:3),w=e.retryDelay??Jy,C=typeof w=="function"?w(n,m):w,x=S===!0||typeof S=="number"&&nd()?void 0:y()).then(()=>{t?g(m):k()})})};return{promise:l,cancel:a,continue:()=>(o==null||o(),l),cancelRetry:u,continueRetry:c,canStart:f,start:()=>(f()?k():y().then(k),l)}}function Zy(){let e=[],t=0,n=f=>{f()},r=f=>{f()},o=f=>setTimeout(f,0);const i=f=>{o=f},s=f=>{let v;t++;try{v=f()}finally{t--,t||u()}return v},l=f=>{t?e.push(f):o(()=>{n(f)})},a=f=>(...v)=>{l(()=>{f(...v)})},u=()=>{const f=e;e=[],f.length&&o(()=>{r(()=>{f.forEach(v=>{n(v)})})})};return{batch:s,batchCalls:a,schedule:l,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f},setScheduler:i}}var Ve=Zy(),er,Mp,th=(Mp=class{constructor(){q(this,er)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vy(this.gcTime)&&D(this,er,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ys?1/0:5*60*1e3))}clearGcTimeout(){E(this,er)&&(clearTimeout(E(this,er)),D(this,er,void 0))}},er=new WeakMap,Mp),Wr,Hr,mt,Ne,hi,tr,bt,tn,$p,ev=($p=class extends th{constructor(t){super();q(this,bt);q(this,Wr);q(this,Hr);q(this,mt);q(this,Ne);q(this,hi);q(this,tr);D(this,tr,!1),D(this,hi,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,mt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Wr,t.state||nv(this.options)),this.state=E(this,Wr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,Ne))==null?void 0:t.promise}setOptions(t){this.options={...E(this,hi),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,mt).remove(this)}setData(t,n){const r=Qy(this.state.data,t,this.options);return be(this,bt,tn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){be(this,bt,tn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=E(this,Ne))==null?void 0:r.promise;return(o=E(this,Ne))==null||o.cancel(t),n?n.then($t).catch($t):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,Wr))}isActive(){return this.observers.some(t=>Hy(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Wy(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Ne))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Ne))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,mt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(E(this,Ne)&&(E(this,tr)?E(this,Ne).cancel({revert:!0}):E(this,Ne).cancelRetry()),this.scheduleGc()),E(this,mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,bt,tn).call(this,{type:"invalidate"})}fetch(t,n){var a,u,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(E(this,Ne))return E(this,Ne).continueRetry(),E(this,Ne).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(D(this,tr,!0),r.signal)})},i=()=>{const d=Xp(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return o(f),D(this,tr,!1),this.options.persister?this.options.persister(d,f,this):d(f)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};o(s),(a=this.options.behavior)==null||a.onFetch(s,this),D(this,Hr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&be(this,bt,tn).call(this,{type:"fetch",meta:(c=s.fetchOptions)==null?void 0:c.meta});const l=d=>{var f,v,g,y;sa(d)&&d.silent||be(this,bt,tn).call(this,{type:"error",error:d}),sa(d)||((v=(f=E(this,mt).config).onError)==null||v.call(f,d,this),(y=(g=E(this,mt).config).onSettled)==null||y.call(g,this.state.data,d,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return D(this,Ne,eh({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,v,g,y;if(d===void 0){l(new Error(`${this.queryHash} data is undefined`));return}this.setData(d),(v=(f=E(this,mt).config).onSuccess)==null||v.call(f,d,this),(y=(g=E(this,mt).config).onSettled)==null||y.call(g,d,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(d,f)=>{be(this,bt,tn).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{be(this,bt,tn).call(this,{type:"pause"})},onContinue:()=>{be(this,bt,tn).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),E(this,Ne).start()}},Wr=new WeakMap,Hr=new WeakMap,mt=new WeakMap,Ne=new WeakMap,hi=new WeakMap,tr=new WeakMap,bt=new WeakSet,tn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...tv(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return sa(o)&&o.revert&&E(this,Hr)?{...E(this,Hr),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ve.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,mt).notify({query:this,type:"updated",action:t})})},$p);function tv(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Jp(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Wt,Lp,rv=(Lp=class extends Xs{constructor(t={}){super();q(this,Wt);this.config=t,D(this,Wt,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??Ju(o,n);let s=this.get(i);return s||(s=new ev({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){E(this,Wt).has(t.queryHash)||(E(this,Wt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=E(this,Wt).get(t.queryHash);n&&(t.destroy(),n===t&&E(this,Wt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ve.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,Wt).get(t)}getAll(){return[...E(this,Wt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Cf(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Cf(t,r)):n}notify(t){Ve.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ve.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ve.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Wt=new WeakMap,Lp),Ht,Be,nr,Kt,mn,bp,ov=(bp=class extends th{constructor(t){super();q(this,Kt);q(this,Ht);q(this,Be);q(this,nr);this.mutationId=t.mutationId,D(this,Be,t.mutationCache),D(this,Ht,[]),this.state=t.state||iv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,Ht).includes(t)||(E(this,Ht).push(t),this.clearGcTimeout(),E(this,Be).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,Ht,E(this,Ht).filter(n=>n!==t)),this.scheduleGc(),E(this,Be).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,Ht).length||(this.state.status==="pending"?this.scheduleGc():E(this,Be).remove(this))}continue(){var t;return((t=E(this,nr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,s,l,a,u,c,d,f,v,g,y,k,p,h,m,S,w,C,x;D(this,nr,eh({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(_,b)=>{be(this,Kt,mn).call(this,{type:"failed",failureCount:_,error:b})},onPause:()=>{be(this,Kt,mn).call(this,{type:"pause"})},onContinue:()=>{be(this,Kt,mn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Be).canRun(this)}));const n=this.state.status==="pending",r=!E(this,nr).canStart();try{if(!n){be(this,Kt,mn).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=E(this,Be).config).onMutate)==null?void 0:i.call(o,t,this));const b=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t));b!==this.state.context&&be(this,Kt,mn).call(this,{type:"pending",context:b,variables:t,isPaused:r})}const _=await E(this,nr).start();return await((u=(a=E(this,Be).config).onSuccess)==null?void 0:u.call(a,_,t,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,_,t,this.state.context)),await((v=(f=E(this,Be).config).onSettled)==null?void 0:v.call(f,_,null,this.state.variables,this.state.context,this)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,_,null,t,this.state.context)),be(this,Kt,mn).call(this,{type:"success",data:_}),_}catch(_){try{throw await((p=(k=E(this,Be).config).onError)==null?void 0:p.call(k,_,t,this.state.context,this)),await((m=(h=this.options).onError)==null?void 0:m.call(h,_,t,this.state.context)),await((w=(S=E(this,Be).config).onSettled)==null?void 0:w.call(S,void 0,_,this.state.variables,this.state.context,this)),await((x=(C=this.options).onSettled)==null?void 0:x.call(C,void 0,_,t,this.state.context)),_}finally{be(this,Kt,mn).call(this,{type:"error",error:_})}}finally{E(this,Be).runNext(this)}}},Ht=new WeakMap,Be=new WeakMap,nr=new WeakMap,Kt=new WeakSet,mn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ve.batch(()=>{E(this,Ht).forEach(r=>{r.onMutationUpdate(t)}),E(this,Be).notify({mutation:this,type:"updated",action:t})})},bp);function iv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ot,mi,Ip,sv=(Ip=class extends Xs{constructor(t={}){super();q(this,ot);q(this,mi);this.config=t,D(this,ot,new Map),D(this,mi,Date.now())}build(t,n,r){const o=new ov({mutationCache:this,mutationId:++Ri(this,mi)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){const n=Oi(t),r=E(this,ot).get(n)??[];r.push(t),E(this,ot).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Oi(t);if(E(this,ot).has(n)){const o=(r=E(this,ot).get(n))==null?void 0:r.filter(i=>i!==t);o&&(o.length===0?E(this,ot).delete(n):E(this,ot).set(n,o))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=E(this,ot).get(Oi(t)))==null?void 0:r.find(o=>o.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=E(this,ot).get(Oi(t)))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Ve.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...E(this,ot).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ef(n,r))}findAll(t={}){return this.getAll().filter(n=>Ef(t,n))}notify(t){Ve.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ve.batch(()=>Promise.all(t.map(n=>n.continue().catch($t))))}},ot=new WeakMap,mi=new WeakMap,Ip);function Oi(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function lv(e){return{onFetch:(t,n)=>{const r=async()=>{var g,y,k,p,h;const o=t.options,i=(k=(y=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:y.fetchMore)==null?void 0:k.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],l=((h=t.state.data)==null?void 0:h.pageParams)||[],a={pages:[],pageParams:[]};let u=!1;const c=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},d=Xp(t.options,t.fetchOptions),f=async(m,S,w)=>{if(u)return Promise.reject();if(S==null&&m.pages.length)return Promise.resolve(m);const C={queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};c(C);const x=await d(C),{maxPages:_}=t.options,b=w?qy:Gy;return{pages:b(m.pages,x,_),pageParams:b(m.pageParams,S,_)}};let v;if(i&&s.length){const m=i==="backward",S=m?av:Tf,w={pages:s,pageParams:l},C=S(o,w);v=await f(w,C,m)}else{v=await f(a,l[0]??o.initialPageParam);const m=e??s.length;for(let S=1;S{var o,i;return(i=(o=t.options).persister)==null?void 0:i.call(o,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function Tf(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function av(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var me,_n,Cn,Kr,Qr,En,Gr,qr,Fp,uv=(Fp=class{constructor(e={}){q(this,me);q(this,_n);q(this,Cn);q(this,Kr);q(this,Qr);q(this,En);q(this,Gr);q(this,qr);D(this,me,e.queryCache||new rv),D(this,_n,e.mutationCache||new sv),D(this,Cn,e.defaultOptions||{}),D(this,Kr,new Map),D(this,Qr,new Map),D(this,En,0)}mount(){Ri(this,En)._++,E(this,En)===1&&(D(this,Gr,Yp.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,me).onFocus())})),D(this,qr,vs.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,me).onOnline())})))}unmount(){var e,t;Ri(this,En)._--,E(this,En)===0&&((e=E(this,Gr))==null||e.call(this),D(this,Gr,void 0),(t=E(this,qr))==null||t.call(this),D(this,qr,void 0))}isFetching(e){return E(this,me).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,_n).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,me).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=E(this,me).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(_f(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return E(this,me).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=E(this,me).get(r.queryHash),i=o==null?void 0:o.state.data,s=Uy(t,i);if(s!==void 0)return E(this,me).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Ve.batch(()=>E(this,me).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,me).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=E(this,me);Ve.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=E(this,me),r={type:"active",...e};return Ve.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Ve.batch(()=>E(this,me).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then($t).catch($t)}invalidateQueries(e={},t={}){return Ve.batch(()=>{if(E(this,me).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Ve.batch(()=>E(this,me).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch($t)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then($t)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=E(this,me).build(this,t);return n.isStaleByTime(_f(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($t).catch($t)}fetchInfiniteQuery(e){return e.behavior=lv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($t).catch($t)}resumePausedMutations(){return vs.isOnline()?E(this,_n).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,me)}getMutationCache(){return E(this,_n)}getDefaultOptions(){return E(this,Cn)}setDefaultOptions(e){D(this,Cn,e)}setQueryDefaults(e,t){E(this,Kr).set(Wo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,Kr).values()];let n={};return t.forEach(r=>{Ho(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){E(this,Qr).set(Wo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,Qr).values()];let n={};return t.forEach(r=>{Ho(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,Cn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ju(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===qp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,Cn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,me).clear(),E(this,_n).clear()}},me=new WeakMap,_n=new WeakMap,Cn=new WeakMap,Kr=new WeakMap,Qr=new WeakMap,En=new WeakMap,Gr=new WeakMap,qr=new WeakMap,Fp),cv=R.createContext(void 0),fv=({client:e,children:t})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),M.jsx(cv.Provider,{value:e,children:t}));const Of="pushstate",Mf="popstate",nh="beforeunload",rh=e=>(e.preventDefault(),e.returnValue=""),dv=()=>{removeEventListener(nh,rh,{capture:!0})};function oh(e){let t=e.getLocation();const n=new Set;let r=[];const o=()=>{t=e.getLocation(),n.forEach(s=>s())},i=async(s,l)=>{var a;if(!((l==null?void 0:l.ignoreBlocker)??!1)&&typeof document<"u"&&r.length){for(const c of r)if(!await c()){(a=e.onBlocked)==null||a.call(e,o);return}}s()};return{get location(){return t},subscribers:n,subscribe:s=>(n.add(s),()=>{n.delete(s)}),push:(s,l,a)=>{l=Lo(l),i(()=>{e.pushState(s,l),o()},a)},replace:(s,l,a)=>{l=Lo(l),i(()=>{e.replaceState(s,l),o()},a)},go:(s,l)=>{i(()=>{e.go(s),o()},l)},back:s=>{i(()=>{e.back(),o()},s)},forward:s=>{i(()=>{e.forward(),o()},s)},createHref:s=>e.createHref(s),block:s=>(r.push(s),r.length===1&&addEventListener(nh,rh,{capture:!0}),()=>{r=r.filter(l=>l!==s),r.length||dv()}),flush:()=>{var s;return(s=e.flush)==null?void 0:s.call(e)},destroy:()=>{var s;return(s=e.destroy)==null?void 0:s.call(e)},notify:o}}function Lo(e){return e||(e={}),{...e,key:ih()}}function pv(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState,o=y=>y,i=()=>Ha(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);let s=i(),l;const a=()=>s;let u,c;const d=()=>{if(!u)return;(u.isPush?n:r).call(t.history,u.state,"",u.href),u=void 0,c=void 0,l=void 0},f=(y,k,p)=>{const h=o(k);c||(l=s),s=Ha(k,p),u={href:h,state:p,isPush:(u==null?void 0:u.isPush)||y==="push"},c||(c=Promise.resolve().then(()=>d()))},v=()=>{s=i(),g.notify()},g=oh({getLocation:a,pushState:(y,k)=>f("push",y,k),replaceState:(y,k)=>f("replace",y,k),back:()=>t.history.back(),forward:()=>t.history.forward(),go:y=>t.history.go(y),createHref:y=>o(y),flush:d,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Of,v),t.removeEventListener(Mf,v)},onBlocked:y=>{l&&s!==l&&(s=l,y())}});return t.addEventListener(Of,v),t.addEventListener(Mf,v),t.history.pushState=function(...y){const k=n.apply(t.history,y);return v(),k},t.history.replaceState=function(...y){const k=r.apply(t.history,y);return v(),k},g}function hv(e={initialEntries:["/"]}){const t=e.initialEntries;let n=e.initialIndex??t.length-1,r={key:ih()};return oh({getLocation:()=>Ha(t[n],r),pushState:(i,s)=>{r=s,t.splice,n{r=s,t[n]=i},back:()=>{r=Lo(r),n=Math.max(n-1,0)},forward:()=>{r=Lo(r),n=Math.min(n+1,t.length-1)},go:i=>{r=Lo(r),n=Math.min(Math.max(n+i,0),t.length-1)},createHref:i=>i})}function Ha(e,t){const n=e.indexOf("#"),r=e.indexOf("?");return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{}}}function ih(){return(Math.random()+1).toString(36).substring(7)}var mv="Invariant failed";function qe(e,t){if(!e)throw new Error(mv)}const la=R.createContext(null);function sh(){return typeof document>"u"?la:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=la,la)}function Dn(e){const t=R.useContext(sh());return e==null||e.warn,t}var lh={exports:{}},ah={},uh={exports:{}},ch={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Xr=R;function yv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vv=typeof Object.is=="function"?Object.is:yv,gv=Xr.useState,Sv=Xr.useEffect,wv=Xr.useLayoutEffect,xv=Xr.useDebugValue;function kv(e,t){var n=t(),r=gv({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return wv(function(){o.value=n,o.getSnapshot=t,aa(o)&&i({inst:o})},[e,n,t]),Sv(function(){return aa(o)&&i({inst:o}),e(function(){aa(o)&&i({inst:o})})},[e]),xv(n),n}function aa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vv(e,n)}catch{return!0}}function _v(e,t){return t()}var Cv=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?_v:kv;ch.useSyncExternalStore=Xr.useSyncExternalStore!==void 0?Xr.useSyncExternalStore:Cv;uh.exports=ch;var Ev=uh.exports;/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Js=R,Pv=Ev;function Rv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tv=typeof Object.is=="function"?Object.is:Rv,Ov=Pv.useSyncExternalStore,Mv=Js.useRef,$v=Js.useEffect,Lv=Js.useMemo,bv=Js.useDebugValue;ah.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Mv(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Lv(function(){function a(v){if(!u){if(u=!0,c=v,v=r(v),o!==void 0&&s.hasValue){var g=s.value;if(o(g,v))return d=g}return d=v}if(g=d,Tv(c,v))return g;var y=r(v);return o!==void 0&&o(g,y)?g:(c=v,d=y)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return a(t())},f===null?void 0:function(){return a(f())}]},[t,n,r,o]);var l=Ov(e,i[0],i[1]);return $v(function(){s.hasValue=!0,s.value=l},[l]),bv(l),l};lh.exports=ah;var Iv=lh.exports;class Fv{constructor(t,n){this.listeners=new Set,this._batching=!1,this._flushing=0,this.subscribe=r=>{var o,i;this.listeners.add(r);const s=(i=(o=this.options)==null?void 0:o.onSubscribe)==null?void 0:i.call(o,r,this);return()=>{this.listeners.delete(r),s==null||s()}},this.setState=r=>{var o,i,s;const l=this.state;this.state=(o=this.options)!=null&&o.updateFn?this.options.updateFn(l)(r):r(l),(s=(i=this.options)==null?void 0:i.onUpdate)==null||s.call(i),this._flush()},this._flush=()=>{if(this._batching)return;const r=++this._flushing;this.listeners.forEach(o=>{this._flushing===r&&o()})},this.batch=r=>{if(this._batching)return r();this._batching=!0,r(),this._batching=!1,this._flush()},this.state=t,this.options=n}}function zv(e,t=n=>n){return Iv.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,Nv)}function Nv(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r{t.substring(0,1)==="?"&&(t=t.substring(1));const n=Av(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function Vv(e,t){function n(r){if(typeof r=="object"&&r!==null)try{return e(r)}catch{}else if(typeof r=="string"&&typeof t=="function")try{return t(r),e(r)}catch{}return r}return r=>{r={...r},Object.keys(r).forEach(i=>{const s=r[i];typeof s>"u"||s===void 0?delete r[i]:r[i]=n(s)});const o=jv(r).toString();return o?`?${o}`:""}}function gs(e){return e[e.length-1]}function Wv(e){return typeof e=="function"}function Sr(e,t){return Wv(e)?e(t):e}function bo(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function Bt(e,t){if(e===t)return e;const n=t,r=bf(e)&&bf(n);if(r||Ss(e)&&Ss(n)){const o=r?e:Object.keys(e),i=o.length,s=r?n:Object.keys(n),l=s.length,a=r?[]:{};let u=0;for(let c=0;c"u")return!0;const n=t.prototype;return!(!Lf(n)||!n.hasOwnProperty("isPrototypeOf"))}function Lf(e){return Object.prototype.toString.call(e)==="[object Object]"}function bf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Lr(e,t,n=!1){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Ss(e)&&Ss(t)){const r=Object.keys(e).filter(i=>e[i]!==void 0),o=Object.keys(t).filter(i=>t[i]!==void 0);return!n&&r.length!==o.length?!1:!o.some(i=>!(i in e)||!Lr(e[i],t[i],n))}return Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:!e.some((r,o)=>!Lr(r,t[o],n)):!1}const ua=typeof window<"u"?R.useLayoutEffect:R.useEffect;function gr(e){let t,n;const r=new Promise((o,i)=>{t=o,n=i});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o),e==null||e(o)},r.reject=o=>{r.status="rejected",n(o)},r}function If(e){const t=R.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Tn(e){return Zs(e.filter(Boolean).join("/"))}function Zs(e){return e.replace(/\/{2,}/g,"/")}function Zu(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Gn(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Hv(e){return Gn(Zu(e))}function ws(e,t){return e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Kv(e,t,n){return ws(e,n)===ws(t,n)}function Qv({basepath:e,base:t,to:n,trailingSlash:r="never"}){var o,i;t=t.replace(new RegExp(`^${e}`),"/"),n=n.replace(new RegExp(`^${e}`),"/");let s=Yr(t);const l=Yr(n);s.length>1&&((o=gs(s))==null?void 0:o.value)==="/"&&s.pop(),l.forEach((u,c)=>{u.value==="/"?c?c===l.length-1&&s.push(u):s=[u]:u.value===".."?s.pop():u.value==="."||s.push(u)}),s.length>1&&(((i=gs(s))==null?void 0:i.value)==="/"?r==="never"&&s.pop():r==="always"&&s.push({type:"pathname",value:"/"}));const a=Tn([e,...s.map(u=>u.value)]);return Zs(a)}function Yr(e){if(!e)return[];e=Zs(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(r=>r==="$"||r==="*"?{type:"wildcard",value:r}:r.charAt(0)==="$"?{type:"param",value:r}:{type:"pathname",value:decodeURIComponent(r)})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function ca({path:e,params:t,leaveWildcards:n,leaveParams:r}){const o=Yr(e),i={};for(const[s,l]of Object.entries(t)){const a=typeof l=="string";["*","_splat"].includes(s)?i[s]=a?encodeURI(l):l:i[s]=a?encodeURIComponent(l):l}return Tn(o.map(s=>{if(s.type==="wildcard"){const l=i._splat;return n?`${s.value}${l??""}`:l}if(s.type==="param"){if(r){const l=i[s.value];return`${s.value}${l??""}`}return i[s.value.substring(1)]??"undefined"}return s.value}))}function Mi(e,t,n){const r=Gv(e,t,n);if(!(n.to&&!r))return r??{}}function Ff(e,t){switch(!0){case e==="/":return t;case t===e:return"";case t.length{for(let a=0;a=o.length-1,f=a>=i.length-1;if(c){if(c.type==="wildcard"){if(u!=null&&u.value){const v=decodeURI(Tn(o.slice(a).map(g=>g.value)));return s["*"]=v,s._splat=v,!0}return!1}if(c.type==="pathname"){if(c.value==="/"&&!(u!=null&&u.value))return!0;if(u){if(n.caseSensitive){if(c.value!==u.value)return!1}else if(c.value.toLowerCase()!==u.value.toLowerCase())return!1}}if(!u)return!1;if(c.type==="param"){if(u.value==="/")return!1;u.value.charAt(0)!=="$"&&(s[c.value.substring(1)]=decodeURIComponent(u.value))}}if(!d&&f)return s["**"]=Tn(o.slice(a+1).map(v=>v.value)),!!n.fuzzy&&(c==null?void 0:c.value)!=="/"}return!0})()?s:void 0}function Wn(e){return!!(e!=null&&e.isRedirect)}function zf(e){return!!(e!=null&&e.isRedirect)&&e.href}function ec(e){const t=e.errorComponent??el;return M.jsx(qv,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?R.createElement(t,{error:n,reset:r}):e.children})}class qv extends R.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function el({error:e}){const[t,n]=R.useState(!1);return M.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[M.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[M.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),M.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),M.jsx("div",{style:{height:".25rem"}}),t?M.jsx("div",{children:M.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?M.jsx("code",{children:e.message}):null})}):null]})}function We(e){const t=Dn({warn:(e==null?void 0:e.router)===void 0});return zv(((e==null?void 0:e.router)||t).__store,e==null?void 0:e.select)}function Vt(e){return!!(e!=null&&e.isNotFound)}function Xv(e){const t=We({select:n=>`not-found-${n.location.pathname}-${n.status}`});return M.jsx(ec,{getResetKey:()=>t,onCatch:(n,r)=>{var o;if(Vt(n))(o=e.onCatch)==null||o.call(e,n,r);else throw n},errorComponent:({error:n})=>{var r;return(r=e.fallback)==null?void 0:r.call(e,n)},children:e.children})}function Yv(){return M.jsx("p",{children:"Not Found"})}const Jv=["component","errorComponent","pendingComponent","notFoundComponent"];function Zv(e){return new eg(e)}class eg{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.subscribers=new Set,this.startReactTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options;this.options={...this.options,...n},this.isServer=this.options.isServer??typeof document>"u",(!this.basepath||n.basepath&&n.basepath!==r.basepath)&&(n.basepath===void 0||n.basepath===""||n.basepath==="/"?this.basepath="/":this.basepath=`/${Hv(n.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?hv({initialEntries:[this.basepath||"/"]}):pv()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new Fv(rg(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(o=>!["redirected"].includes(o.status))}}}))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n);const r=s=>{s.forEach((l,a)=>{l.init({originalIndex:a});const u=this.routesById[l.id];if(qe(!u,`Duplicate routes found with id: ${String(l.id)}`),this.routesById[l.id]=l,!l.isRoot&&l.path){const d=Gn(l.fullPath);(!this.routesByPath[d]||l.fullPath.endsWith("/"))&&(this.routesByPath[d]=l)}const c=l.children;c!=null&&c.length&&r(c)})};r([this.routeTree]);const o=[];Object.values(this.routesById).forEach((s,l)=>{var a;if(s.isRoot||!s.path)return;const u=Zu(s.fullPath),c=Yr(u);for(;c.length>1&&((a=c[0])==null?void 0:a.value)==="/";)c.shift();const d=c.map(f=>f.value==="/"?.75:f.type==="param"?.5:f.type==="wildcard"?.25:1);o.push({child:s,trimmed:u,parsed:c,index:l,scores:d})}),this.flatRoutes=o.sort((s,l)=>{const a=Math.min(s.scores.length,l.scores.length);for(let u=0;ul.parsed[u].value?1:-1;return s.index-l.index}).map((s,l)=>(s.child.rank=l,s.child))},this.subscribe=(n,r)=>{const o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=n=>{const r=({pathname:l,search:a,hash:u,state:c})=>{const d=this.options.parseSearch(a),f=this.options.stringifySearch(d);return{pathname:l,searchStr:f,search:Bt(n==null?void 0:n.search,d),hash:u.split("#").reverse()[0]??"",href:`${l}${f}${u}`,state:Bt(n==null?void 0:n.state,c)}},o=r(this.history.location),{__tempLocation:i,__tempKey:s}=o.state;if(i&&(!s||s===this.tempLocationKey)){const l=r(i);return l.state.key=o.state.key,delete l.state.__tempLocation,{...l,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>Qv({basepath:this.basepath,base:n,to:Zs(r),trailingSlash:this.options.trailingSlash}),this.matchRoutes=(n,r,o)=>{let i={};const s=this.flatRoutes.find(v=>{const g=Mi(this.basepath,Gn(n),{to:v.fullPath,caseSensitive:v.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});return g?(i=g,!0):!1});let l=s||this.routesById[st];const a=[l];let u=!1;for((s?s.path!=="/"&&i["**"]:Gn(n))&&(this.options.notFoundRoute?a.push(this.options.notFoundRoute):u=!0);l.parentRoute;)l=l.parentRoute,a.unshift(l);const c=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let v=a.length-1;v>=0;v--){const g=a[v];if(g.children)return g.id}return st}})(),d=a.map(v=>{var g;let y;const k=((g=v.options.params)==null?void 0:g.parse)??v.options.parseParams;if(k)try{const p=k(i);Object.assign(i,p)}catch(p){if(y=new ng(p.message,{cause:p}),o!=null&&o.throwOnError)throw y;return y}}),f=[];return a.forEach((v,g)=>{var y,k,p,h,m,S,w,C,x,_;const b=f[g-1],[O,F]=(()=>{const L=(b==null?void 0:b.search)??r;try{const I=typeof v.options.validateSearch=="object"?v.options.validateSearch.parse:v.options.validateSearch,B=(I==null?void 0:I(L))??{};return[{...L,...B},void 0]}catch(I){const B=new tg(I.message,{cause:I});if(o!=null&&o.throwOnError)throw B;return[L,B]}})(),z=((k=(y=v.options).loaderDeps)==null?void 0:k.call(y,{search:O}))??"",N=z?JSON.stringify(z):"",V=ca({path:v.fullPath,params:i}),X=ca({path:v.id,params:i,leaveWildcards:!0})+N,K=this.getMatch(X),we=this.state.matches.find(L=>L.id===X)?"stay":"enter";let P;if(K)P={...K,cause:we,params:i};else{const L=v.options.loader||v.options.beforeLoad||v.lazyFn?"pending":"success";P={id:X,index:g,routeId:v.id,params:i,pathname:Tn([this.basepath,V]),updatedAt:Date.now(),search:{},searchError:void 0,status:L,isFetching:!1,error:void 0,paramsError:d[g],routeContext:void 0,context:void 0,abortController:new AbortController,fetchCount:0,cause:we,loaderDeps:z,invalid:!1,preload:!1,links:(h=(p=v.options).links)==null?void 0:h.call(p),scripts:(S=(m=v.options).scripts)==null?void 0:S.call(m),staticData:v.options.staticData||{},loadPromise:gr()}}P.status==="success"&&(P.meta=(C=(w=v.options).meta)==null?void 0:C.call(w,{matches:f,match:P,params:P.params,loaderData:P.loaderData}),P.headers=(_=(x=v.options).headers)==null?void 0:_.call(x,{loaderData:P.loaderData})),o!=null&&o.preload||(P.globalNotFound=c===v.id),P.search=Bt(P.search,O),P.searchError=F,f.push(P)}),f},this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r.pendingTimeout))},this.cancelMatches=()=>{var n;(n=this.state.pendingMatches)==null||n.forEach(r=>{this.cancelMatch(r.id)})},this.buildLocation=n=>{const r=(i={},s)=>{var l,a,u;const c=i._fromLocation!=null?this.matchRoutes(i._fromLocation.pathname,i.fromSearch||i._fromLocation.search):this.state.matches,d=i.from!=null?c.find(N=>Mi(this.basepath,Gn(N.pathname),{to:i.from,caseSensitive:!1,fuzzy:!1})):void 0,f=(d==null?void 0:d.pathname)||this.latestLocation.pathname;qe(i.from==null||d!=null,"Could not find match for from: "+i.from);const v=((l=gs(c))==null?void 0:l.search)||this.latestLocation.search,g=s==null?void 0:s.filter(N=>c.find(V=>V.routeId===N.routeId)),y=this.routesById[(a=g==null?void 0:g.find(N=>N.pathname===f))==null?void 0:a.routeId];let k=i.to?this.resolvePathWithBase(f,`${i.to}`):this.resolvePathWithBase(f,(y==null?void 0:y.to)??f);const p={...(u=gs(c))==null?void 0:u.params};let h=(i.params??!0)===!0?p:{...p,...Sr(i.params,p)};Object.keys(h).length>0&&(s==null||s.map(N=>{var V;const X=this.looseRoutesById[N.routeId];return((V=X==null?void 0:X.options.params)==null?void 0:V.stringify)??X.options.stringifyParams}).filter(Boolean).forEach(N=>{h={...h,...N(h)}})),k=ca({path:k,params:h??{},leaveWildcards:!1,leaveParams:n.leaveParams});const m=(g==null?void 0:g.map(N=>this.looseRoutesById[N.routeId].options.preSearchFilters??[]).flat().filter(Boolean))??[],S=(g==null?void 0:g.map(N=>this.looseRoutesById[N.routeId].options.postSearchFilters??[]).flat().filter(Boolean))??[],w=m.length?m.reduce((N,V)=>V(N),v):v,C=i.search===!0?w:i.search?Sr(i.search,w):m.length?w:{},x=S.length?S.reduce((N,V)=>V(N),C):C,_=Bt(v,x),b=this.options.stringifySearch(_),O=i.hash===!0?this.latestLocation.hash:i.hash?Sr(i.hash,this.latestLocation.hash):void 0,F=O?`#${O}`:"";let z=i.state===!0?this.latestLocation.state:i.state?Sr(i.state,this.latestLocation.state):{};return z=Bt(this.latestLocation.state,z),{pathname:k,search:_,searchStr:b,state:z,hash:O??"",href:`${k}${b}${F}`,unmaskOnReload:i.unmaskOnReload}},o=(i={},s)=>{var l;const a=r(i);let u=s?r(s):void 0;if(!u){let g={};const y=(l=this.options.routeMasks)==null?void 0:l.find(k=>{const p=Mi(this.basepath,a.pathname,{to:k.from,caseSensitive:!1,fuzzy:!1});return p?(g=p,!0):!1});if(y){const{from:k,...p}=y;s={...bo(n,["from"]),...p,params:g},u=r(s)}}const c=this.matchRoutes(a.pathname,a.search),d=u?this.matchRoutes(u.pathname,u.search):void 0,f=u?r(s,d):void 0,v=r(i,c);return f&&(v.maskedLocation=f),v};return n.mask?o(n,{...bo(n,["from"]),...n.mask}):o(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...o})=>{const i=()=>{o.state.key=this.latestLocation.state.key;const a=Lr(o.state,this.latestLocation.state);return delete o.state.key,a},s=this.latestLocation.href===o.href,l=this.commitLocationPromise;if(this.commitLocationPromise=gr(()=>{l==null||l.resolve()}),s&&i())this.load();else{let{maskedLocation:a,...u}=o;a&&(u={...a,state:{...a.state,__tempKey:void 0,__tempLocation:{...u,search:u.searchStr,state:{...u.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(u.unmaskOnReload??this.options.unmaskOnReload??!1)&&(u.state.__tempKey=this.tempLocationKey)),this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](u.href,u.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,viewTransition:o,ignoreBlocker:i,...s}={})=>{const l=this.buildLocation(s);return this.commitLocation({...l,viewTransition:o,replace:n,resetScroll:r,ignoreBlocker:i})},this.navigate=({from:n,to:r,__isRedirect:o,...i})=>{const s=String(r);let l;try{new URL(`${s}`),l=!0}catch{}return qe(!l),this.buildAndCommitLocation({...i,from:n,to:r})},this.load=async()=>{this.latestLocation=this.parseLocation(this.latestLocation),this.__store.setState(i=>({...i,loadedAt:Date.now()}));let n,r;const o=new Promise(i=>{this.startReactTransition(async()=>{var s;try{const l=this.latestLocation,a=this.state.resolvedLocation,u=a.href!==l.href;this.cancelMatches();let c;this.__store.batch(()=>{c=this.matchRoutes(l.pathname,l.search),this.__store.setState(d=>({...d,status:"pending",isLoading:!0,location:l,pendingMatches:c,cachedMatches:d.cachedMatches.filter(f=>!c.find(v=>v.id===f.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",fromLocation:a,toLocation:l,pathChanged:u}),this.emit({type:"onBeforeLoad",fromLocation:a,toLocation:l,pathChanged:u}),await this.loadMatches({matches:c,location:l,onReady:async()=>{this.startViewTransition(async()=>{let d,f,v;this.__store.batch(()=>{this.__store.setState(g=>{const y=g.matches,k=g.pendingMatches||g.matches;return d=y.filter(p=>!k.find(h=>h.id===p.id)),f=k.filter(p=>!y.find(h=>h.id===p.id)),v=y.filter(p=>k.find(h=>h.id===p.id)),{...g,isLoading:!1,matches:k,pendingMatches:void 0,cachedMatches:[...g.cachedMatches,...d.filter(p=>p.status!=="error")]}}),this.cleanCache()}),[[d,"onLeave"],[f,"onEnter"],[v,"onStay"]].forEach(([g,y])=>{g.forEach(k=>{var p,h;(h=(p=this.looseRoutesById[k.routeId].options)[y])==null||h.call(p,k)})})})}})}catch(l){zf(l)?(n=l,this.isServer||this.navigate({...l,replace:!0,__isRedirect:!0})):Vt(l)&&(r=l),this.__store.setState(a=>({...a,statusCode:n?n.statusCode:r?404:a.matches.some(u=>u.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===o&&((s=this.commitLocationPromise)==null||s.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})});for(this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise},this.startViewTransition=n=>{var r,o;const i=this.shouldViewTransition??this.options.defaultViewTransition;delete this.shouldViewTransition,(o=(r=i&&typeof document<"u"?document:void 0)==null?void 0:r.startViewTransition)!=null&&o.call(r,n)||n()},this.updateMatch=(n,r)=>{var o;let i;const s=(o=this.state.pendingMatches)==null?void 0:o.find(u=>u.id===n),l=this.state.matches.find(u=>u.id===n),a=s?"pendingMatches":l?"matches":"cachedMatches";return this.__store.setState(u=>{var c;return{...u,[a]:(c=u[a])==null?void 0:c.map(d=>d.id===n?i=r(d):d)}}),i},this.getMatch=n=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(r=>r.id===n),this.loadMatches=async({location:n,matches:r,preload:o,onReady:i,updateMatch:s=this.updateMatch})=>{let l,a=!1;const u=async()=>{a||(a=!0,await(i==null?void 0:i()))};!this.isServer&&!this.state.matches.length&&u();const c=(d,f)=>{var v,g,y;if(zf(f))throw f;if(Wn(f)||Vt(f)){if(s(d.id,k=>({...k,status:Wn(f)?"redirected":Vt(f)?"notFound":"error",isFetching:!1,error:f,beforeLoadPromise:void 0,loaderPromise:void 0})),f.routeId||(f.routeId=d.routeId),(v=d.beforeLoadPromise)==null||v.resolve(),(g=d.loaderPromise)==null||g.resolve(),(y=d.loadPromise)==null||y.resolve(),Wn(f))throw a=!0,f=this.resolveRedirect({...f,_fromLocation:n}),f;if(Vt(f))throw this._handleNotFound(r,f,{updateMatch:s}),f}};try{await new Promise((d,f)=>{(async()=>{var v,g,y;try{const k=(m,S,w)=>{var C,x;const{id:_,routeId:b}=r[m],O=this.looseRoutesById[b];if(S instanceof Promise)throw S;S.routerCode=w,l=l??m,c(this.getMatch(_),S);try{(x=(C=O.options).onError)==null||x.call(C,S)}catch(F){S=F,c(this.getMatch(_),S)}s(_,F=>{var z;return(z=F.beforeLoadPromise)==null||z.resolve(),{...F,error:S,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[m,{id:S,routeId:w}]of r.entries()){const C=this.getMatch(S);if(C.beforeLoadPromise||C.loaderPromise)await C.beforeLoadPromise;else{try{s(S,ee=>({...ee,loadPromise:gr(()=>{var te;(te=ee.loadPromise)==null||te.resolve()}),beforeLoadPromise:gr()}));const x=this.looseRoutesById[w],_=new AbortController,b=(v=r[m-1])==null?void 0:v.id,O=()=>b?this.getMatch(b).context??this.options.context??{}:this.options.context??{},F=x.options.pendingMs??this.options.defaultPendingMs,z=!!(i&&!this.isServer&&!o&&(x.options.loader||x.options.beforeLoad)&&typeof F=="number"&&F!==1/0&&(x.options.pendingComponent??this.options.defaultPendingComponent));let N;z&&(N=setTimeout(()=>{try{u()}catch{}},F));const{paramsError:V,searchError:X}=this.getMatch(S);V&&k(m,V,"PARSE_PARAMS"),X&&k(m,X,"VALIDATE_SEARCH");const K=O();s(S,ee=>({...ee,isFetching:"beforeLoad",fetchCount:ee.fetchCount+1,routeContext:Bt(ee.routeContext,K),context:Bt(ee.context,K),abortController:_,pendingTimeout:N}));const{search:we,params:P,routeContext:L,cause:I}=this.getMatch(S),B={search:we,abortController:_,params:P,preload:!!o,context:L,location:n,navigate:ee=>this.navigate({...ee,_fromLocation:n}),buildLocation:this.buildLocation,cause:o?"preload":I},W=await((y=(g=x.options).beforeLoad)==null?void 0:y.call(g,B))??{};(Wn(W)||Vt(W))&&k(m,W,"BEFORE_LOAD"),s(S,ee=>{const te={...ee.routeContext,...W};return{...ee,routeContext:Bt(ee.routeContext,te),context:Bt(ee.context,te),abortController:_}})}catch(x){k(m,x,"BEFORE_LOAD")}s(S,x=>{var _;return(_=x.beforeLoadPromise)==null||_.resolve(),{...x,beforeLoadPromise:void 0,isFetching:!1}})}}const p=r.slice(0,l),h=[];p.forEach(({id:m,routeId:S},w)=>{h.push((async()=>{const{loaderPromise:C}=this.getMatch(m);if(C)await C;else{const x=h[w-1],_=this.looseRoutesById[S],b=()=>{const{params:L,loaderDeps:I,abortController:B,context:W,cause:ee}=this.getMatch(m);return{params:L,deps:I,preload:!!o,parentMatchPromise:x,abortController:B,context:W,location:n,navigate:te=>this.navigate({...te,_fromLocation:n}),cause:o?"preload":ee,route:_}},O=Date.now()-this.getMatch(m).updatedAt,F=o?_.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:_.options.staleTime??this.options.defaultStaleTime??0,z=_.options.shouldReload,N=typeof z=="function"?z(b()):z;s(m,L=>({...L,loaderPromise:gr(),preload:!!o&&!this.state.matches.find(I=>I.id===m)}));const V=async()=>{var L,I,B,W,ee,te,rt,xe;try{const De=async()=>{const Ge=this.getMatch(m);Ge.minPendingPromise&&await Ge.minPendingPromise};try{_._lazyPromise=_._lazyPromise||(_.lazyFn?_.lazyFn().then(ne=>{Object.assign(_.options,ne.options)}):Promise.resolve());const Ge=this.getMatch(m).componentsPromise||_._lazyPromise.then(()=>Promise.all(Jv.map(async ne=>{const en=_.options[ne];en!=null&&en.preload&&await en.preload()})));s(m,ne=>({...ne,isFetching:"loader",componentsPromise:Ge})),await _._lazyPromise;let fe=await((I=(L=_.options).loader)==null?void 0:I.call(L,b()));this.serializeLoaderData&&(fe=this.serializeLoaderData(fe,{router:this,match:this.getMatch(m)})),c(this.getMatch(m),fe),await De();const Ot=(W=(B=_.options).meta)==null?void 0:W.call(B,{matches:r,match:this.getMatch(m),params:this.getMatch(m).params,loaderData:fe}),de=(te=(ee=_.options).headers)==null?void 0:te.call(ee,{loaderData:fe});s(m,ne=>({...ne,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:fe,meta:Ot,headers:de}))}catch(Ge){let fe=Ge;await De(),c(this.getMatch(m),Ge);try{(xe=(rt=_.options).onError)==null||xe.call(rt,Ge)}catch(Ot){fe=Ot,c(this.getMatch(m),Ot)}s(m,Ot=>({...Ot,error:fe,status:"error",isFetching:!1}))}await this.getMatch(m).componentsPromise}catch(De){c(this.getMatch(m),De)}},{status:X,invalid:K}=this.getMatch(m);X==="success"&&(K||(N??O>F))?(async()=>{try{await V()}catch{}})():X!=="success"&&await V();const{loaderPromise:we,loadPromise:P}=this.getMatch(m);we==null||we.resolve(),P==null||P.resolve()}s(m,x=>({...x,isFetching:!1,loaderPromise:void 0}))})())}),await Promise.all(h),d()}catch(k){f(k)}})()}),await u()}catch(d){if(Wn(d)||Vt(d))throw Vt(d)&&!o&&await u(),d}return r},this.invalidate=()=>{const n=r=>({...r,invalid:!0,...r.status==="error"?{status:"pending",error:void 0}:{}});return this.__store.setState(r=>{var o;return{...r,matches:r.matches.map(n),cachedMatches:r.cachedMatches.map(n),pendingMatches:(o=r.pendingMatches)==null?void 0:o.map(n)}}),this.load()},this.resolveRedirect=n=>{const r=n;return r.href||(r.href=this.buildLocation(r).href),r},this.cleanCache=()=>{this.__store.setState(n=>({...n,cachedMatches:n.cachedMatches.filter(r=>{const o=this.looseRoutesById[r.routeId];if(!o.options.loader)return!1;const i=(r.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return r.status!=="error"&&Date.now()-r.updatedAt{const r=this.buildLocation(n);let o=this.matchRoutes(r.pathname,r.search,{throwOnError:!0,preload:!0});const i=Object.fromEntries([...this.state.matches,...this.state.pendingMatches??[],...this.state.cachedMatches].map(l=>[l.id,!0]));this.__store.batch(()=>{o.forEach(l=>{i[l.id]||this.__store.setState(a=>({...a,cachedMatches:[...a.cachedMatches,l]}))})});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(l=>l.id));try{return o=await this.loadMatches({matches:o,location:r,preload:!0,updateMatch:(l,a)=>{s.has(l)?o=o.map(u=>u.id===l?a(u):u):this.updateMatch(l,a)}}),o}catch(l){if(Wn(l))return await this.preloadRoute({...l,_fromLocation:r});console.error(l);return}},this.matchRoute=(n,r)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(o);if(r!=null&&r.pending&&this.state.status!=="pending")return!1;const l=((r==null?void 0:r.pending)===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation,a=Mi(this.basepath,l.pathname,{...r,to:i.pathname});return!a||n.params&&!Lr(a,n.params,!0)?!1:a&&((r==null?void 0:r.includeSearch)??!0)?Lr(l.search,i.search,!0)?a:!1:a},this.dehydrate=()=>{var n;const r=((n=this.options.errorSerializer)==null?void 0:n.serialize)??og;return{state:{dehydratedMatches:this.state.matches.map(o=>({...bo(o,["id","status","updatedAt"]),error:o.error?{data:r(o.error),__isServerError:!0}:void 0}))},manifest:this.manifest}},this.hydrate=()=>{var n,r,o;let i;typeof document<"u"&&(i=this.options.transformer.parse((n=window.__TSR__)==null?void 0:n.dehydrated)),qe(i),this.dehydratedData=i.payload,(o=(r=this.options).hydrate)==null||o.call(r,i.payload);const s=i.router.state,l=this.matchRoutes(this.state.location.pathname,this.state.location.search).map(a=>{const u=s.dehydratedMatches.find(c=>c.id===a.id);return qe(u,`Could not find a client-side match for dehydrated match with id: ${a.id}!`),{...a,...u}});this.__store.setState(a=>({...a,matches:l})),this.manifest=i.router.manifest},this.injectedHtml=[],this.injectHtml=n=>{const r=()=>(this.injectedHtml=this.injectedHtml.filter(o=>o!==r),n);this.injectedHtml.push(r)},this.streamedKeys=new Set,this.getStreamedValue=n=>{var r;if(this.isServer)return;const o=(r=window.__TSR__)==null?void 0:r.streamedValues[n];if(o)return o.parsed||(o.parsed=this.options.transformer.parse(o.value)),o.parsed},this.streamValue=(n,r)=>{var o;this.streamedKeys.has(n),this.streamedKeys.add(n);const i=`__TSR__.streamedValues['${n}'] = { value: ${(o=this.serializer)==null?void 0:o.call(this,this.options.transformer.stringify(r))}}`;this.injectHtml(` +
diff --git a/exam/dist/locales/de/translation.json b/exam/dist/locales/de/translation.json new file mode 100644 index 0000000..294a6f7 --- /dev/null +++ b/exam/dist/locales/de/translation.json @@ -0,0 +1,11 @@ +{ + "NotFound_user:login": "Benutzer existiert nicht", + "Unauthorized:login": "Ungültige E-mail oder Passwort", + + "GuestBook": "Gästebuch", + "E-Mail": "E-Mail", + "Password": "Passwort", + "Log in": "Anmelden", + "Log out": "Abmelden", + "Profile": "Profil" +} diff --git a/exam/dist/locales/en/translation.json b/exam/dist/locales/en/translation.json new file mode 100644 index 0000000..21f9060 --- /dev/null +++ b/exam/dist/locales/en/translation.json @@ -0,0 +1,11 @@ +{ + "NotFound_user:login": "User does not exist", + "Unauthorized:login": "Invalid e-mail or password", + + "GuestBook": "GuestBook", + "E-Mail": "E-Mail", + "Password": "Password", + "Log in": "Log in", + "Log out": "Log out", + "Profile": "Profile" +} diff --git a/exam/react/package.json b/exam/react/package.json index e5e16e7..9de1f25 100644 --- a/exam/react/package.json +++ b/exam/react/package.json @@ -12,19 +12,25 @@ "dependencies": { "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", + "@mui/icons-material": "^5.16.4", "@mui/material": "^5.16.4", + "@tanstack/react-form": "^0.26.4", "@tanstack/react-query": "^5.51.11", "@tanstack/react-router": "^1.45.8", "@types/node": "^20.14.12", + "i18next": "^23.12.2", + "i18next-browser-languagedetector": "^8.0.0", + "i18next-http-backend": "^2.5.2", "react": "^18.3.1", "react-dom": "^18.3.1", + "react-i18next": "^15.0.0", "zustand": "^4.5.4" }, "devDependencies": { "@redux-devtools/extension": "^3.3.0", "@tanstack/eslint-plugin-query": "^5.51.12", - "@tanstack/router-devtools": "^1.45.8", "@tanstack/react-query-devtools": "^5.51.11", + "@tanstack/router-devtools": "^1.45.8", "@tanstack/router-plugin": "^1.45.8", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", diff --git a/exam/react/pnpm-lock.yaml b/exam/react/pnpm-lock.yaml index 0a43c54..55db4e4 100644 --- a/exam/react/pnpm-lock.yaml +++ b/exam/react/pnpm-lock.yaml @@ -14,27 +14,42 @@ importers: '@emotion/styled': specifier: ^11.13.0 version: 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@mui/icons-material': + specifier: ^5.16.4 + version: 5.16.4(@mui/material@5.16.4(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/material': specifier: ^5.16.4 version: 5.16.4(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@tanstack/react-form': + specifier: ^0.26.4 + version: 0.26.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) '@tanstack/react-query': specifier: ^5.51.11 version: 5.51.11(react@18.3.1) - '@tanstack/react-query-devtools': - specifier: ^5.51.11 - version: 5.51.11(@tanstack/react-query@5.51.11(react@18.3.1))(react@18.3.1) '@tanstack/react-router': specifier: ^1.45.8 version: 1.45.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/node': specifier: ^20.14.12 version: 20.14.12 + i18next: + specifier: ^23.12.2 + version: 23.12.2 + i18next-browser-languagedetector: + specifier: ^8.0.0 + version: 8.0.0 + i18next-http-backend: + specifier: ^2.5.2 + version: 2.5.2 react: specifier: ^18.3.1 version: 18.3.1 react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) + react-i18next: + specifier: ^15.0.0 + version: 15.0.0(i18next@23.12.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) zustand: specifier: ^4.5.4 version: 4.5.4(@types/react@18.3.3)(react@18.3.1) @@ -45,6 +60,9 @@ importers: '@tanstack/eslint-plugin-query': specifier: ^5.51.12 version: 5.51.12(eslint@8.57.0)(typescript@5.5.3) + '@tanstack/react-query-devtools': + specifier: ^5.51.11 + version: 5.51.11(@tanstack/react-query@5.51.11(react@18.3.1))(react@18.3.1) '@tanstack/router-devtools': specifier: ^1.45.8 version: 1.45.8(@tanstack/react-router@1.45.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(csstype@3.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -457,6 +475,17 @@ packages: '@mui/core-downloads-tracker@5.16.4': resolution: {integrity: sha512-rNdHXhclwjEZnK+//3SR43YRx0VtjdHnUFhMSGYmAMJve+KiwEja/41EYh8V3pZKqF2geKyfcFUenTfDTYUR4w==} + '@mui/icons-material@5.16.4': + resolution: {integrity: sha512-j9/CWctv6TH6Dou2uR2EH7UOgu79CW/YcozxCYVLJ7l03pCsiOlJ5sBArnWJxJ+nGkFwyL/1d1k8JEPMDR125A==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@mui/material': ^5.0.0 + '@types/react': ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@mui/material@5.16.4': resolution: {integrity: sha512-dBnh3/zRYgEVIS3OE4oTbujse3gifA0qLMmuUk13ywsDCbngJsdgwW5LuYeiT5pfA8PGPGSqM7mxNytYXgiMCw==} engines: {node: '>=12.0.0'} @@ -551,6 +580,44 @@ packages: peerDependencies: redux: ^3.1.0 || ^4.0.0 || ^5.0.0 + '@remix-run/node@2.10.3': + resolution: {integrity: sha512-LBqsgADJKW7tYdJZZi2wu20gfMm6UcOXbvb5U70P2jCNxjJvuIw1gXVvNXRJKAdxPKLonjm8cSpfoI6HeQKEDg==} + engines: {node: '>=18.0.0'} + peerDependencies: + typescript: ^5.1.0 + peerDependenciesMeta: + typescript: + optional: true + + '@remix-run/router@1.18.0': + resolution: {integrity: sha512-L3jkqmqoSVBVKHfpGZmLrex0lxR5SucGA0sUfFzGctehw+S/ggL9L/0NnC5mw6P8HUWpFZ3nQw3cRApjjWx9Sw==} + engines: {node: '>=14.0.0'} + + '@remix-run/server-runtime@2.10.3': + resolution: {integrity: sha512-vUl5jONUI6Lj0ICg9FSRFhoPzQdZ/7dpT1m7ID13DF5BEeF3t/9uCJS61XXWgQ/JEu7YRiwvZiwSRTrgM7zeWw==} + engines: {node: '>=18.0.0'} + peerDependencies: + typescript: ^5.1.0 + peerDependenciesMeta: + typescript: + optional: true + + '@remix-run/web-blob@3.1.0': + resolution: {integrity: sha512-owGzFLbqPH9PlKb8KvpNJ0NO74HWE2euAn61eEiyCXX/oteoVzTVSN8mpLgDjaxBf2btj5/nUllSUgpyd6IH6g==} + + '@remix-run/web-fetch@4.4.2': + resolution: {integrity: sha512-jgKfzA713/4kAW/oZ4bC3MoLWyjModOVDjFPNseVqcJKSafgIscrYL9G50SurEYLswPuoU3HzSbO0jQCMYWHhA==} + engines: {node: ^10.17 || >=12.3} + + '@remix-run/web-file@3.1.0': + resolution: {integrity: sha512-dW2MNGwoiEYhlspOAXFBasmLeYshyAyhIdrlXBi06Duex5tDr3ut2LFKVj7tyHLmn8nnNwFf1BjNbkQpygC2aQ==} + + '@remix-run/web-form-data@3.1.0': + resolution: {integrity: sha512-NdeohLMdrb+pHxMQ/Geuzdp0eqPbea+Ieo8M8Jx2lGC6TBHsgHzYcBvr0LyPdPVycNRDEpWpiDdCOdCryo3f9A==} + + '@remix-run/web-stream@1.1.0': + resolution: {integrity: sha512-KRJtwrjRV5Bb+pM7zxcTJkhIqWWSy+MYsIxHK+0m5atcznsf15YwUBWHWulZerV2+vvHH1Lp1DD7pw6qKW8SgA==} + '@rollup/rollup-android-arm-eabi@4.18.1': resolution: {integrity: sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==} cpu: [arm] @@ -636,6 +703,9 @@ packages: peerDependencies: eslint: ^8 || ^9 + '@tanstack/form-core@0.26.4': + resolution: {integrity: sha512-rQpwyjb82tWoC4eQHUq3R8ojFQ4M/6WxitTexiFEOQ0k8pfN1kLy9ktlyFH6QeAerl855orShpB1pkYzyZqw0w==} + '@tanstack/history@1.45.3': resolution: {integrity: sha512-n4XXInV9irIq0obRvINIkESkGk280Q+xkIIbswmM0z9nAu2wsIRZNvlmPrtYh6bgNWtItOWWoihFUjLTW8g6Jg==} engines: {node: '>=12'} @@ -646,6 +716,15 @@ packages: '@tanstack/query-devtools@5.51.9': resolution: {integrity: sha512-FQqJynaEDuwQxoFLP3/i10HQwNYh4wxgs0NeSoL24BLWvpUdstgHqUm2zgwRov8Tmh5kjndPIWaXenwl0D47EA==} + '@tanstack/react-form@0.26.4': + resolution: {integrity: sha512-kKZ6IwP4CQs4i8yNqnoK99mo+XColct6eoPOwGTqkhVvcKqjNb/rDzFYWMgNOXSxfO0JGeayOoDj0HwqlKjhJg==} + peerDependencies: + '@tanstack/start': ^1.43.13 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@tanstack/start': + optional: true + '@tanstack/react-query-devtools@5.51.11': resolution: {integrity: sha512-8nQRbhdtvl/J9bO+bk/kPQesCOtDgk+oI4AmZJDnkf5OfKTJL3J4tTe+fhuXph7KP4DUOS+ge9o9TGt0OgWFHw==} peerDependencies: @@ -712,6 +791,9 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/cookie@0.6.0': + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} + '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -827,6 +909,16 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 + '@web3-storage/multipart-parser@1.0.0': + resolution: {integrity: sha512-BEO6al7BYqcnfX15W2cnGR+Q566ACXAT9UQykORCWW80lmkpWsnEob6zJS1ZVBKsSJC8+7vJkHwlp+lXG1UCdw==} + + '@zxing/text-encoding@0.9.0': + resolution: {integrity: sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==} + + abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -863,6 +955,10 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + babel-dead-code-elimination@1.0.6: resolution: {integrity: sha512-JxFi9qyRJpN0LjEbbjbN8g0ux71Qppn9R8Qe3k6QzHg2CaKsbUQtbn307LQGiDLGjV6JCtEFqfxzVig9MyDCHQ==} @@ -892,6 +988,13 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -937,10 +1040,21 @@ packages: convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + cookie-signature@1.2.1: + resolution: {integrity: sha512-78KWk9T26NhzXtuL26cIJ8/qNHANyJ/ZYrmEXFzUmhZdjpBv+DlWlOANRTGBt48YcyslsLrj0bMLFTmXvLRCOw==} + engines: {node: '>=6.6.0'} + + cookie@0.6.0: + resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} + engines: {node: '>= 0.6'} + cosmiconfig@7.1.0: resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} engines: {node: '>=10'} + cross-fetch@4.0.0: + resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} + cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -948,6 +1062,10 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + data-uri-to-buffer@3.0.1: + resolution: {integrity: sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==} + engines: {node: '>= 6'} + debug@4.3.5: resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} engines: {node: '>=6.0'} @@ -957,9 +1075,16 @@ packages: supports-color: optional: true + decode-formdata@0.7.5: + resolution: {integrity: sha512-zwz+xh+Z2R1s2hk14pGiwgVnYiw1UnlsoxHZ5neSXnslgET1weO0dw0d9dLpf1rxAtcvNXo59IMKq5avdaOcvA==} + deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -977,6 +1102,14 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} @@ -1038,6 +1171,10 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -1076,6 +1213,9 @@ packages: flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -1091,6 +1231,10 @@ packages: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -1120,6 +1264,9 @@ packages: peerDependencies: csstype: ^3.0.10 + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} @@ -1131,6 +1278,21 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -1138,6 +1300,18 @@ packages: hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} + html-parse-stringify@3.0.1: + resolution: {integrity: sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==} + + i18next-browser-languagedetector@8.0.0: + resolution: {integrity: sha512-zhXdJXTTCoG39QsrOCiOabnWj2jecouOqbchu3EfhtSHxIB5Uugnm9JaizenOy39h7ne3+fLikIjeW88+rgszw==} + + i18next-http-backend@2.5.2: + resolution: {integrity: sha512-+K8HbDfrvc1/2X8jpb7RLhI9ZxBDpx3xogYkQwGKlWAUXLSEGXzgdt3EcUjLlBCdMwdQY+K+EUF6oh8oB6rwHw==} + + i18next@23.12.2: + resolution: {integrity: sha512-XIeh5V+bi8SJSWGL3jqbTEBW5oD6rbP5L+E7dVQh1MNTxxYef0x15rhJVcRb7oiuq4jLtgy2SD8eFlf6P2cmqg==} + ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} @@ -1160,6 +1334,10 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -1167,6 +1345,10 @@ packages: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + is-core-module@2.15.0: resolution: {integrity: sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==} engines: {node: '>= 0.4'} @@ -1175,6 +1357,10 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -1187,6 +1373,10 @@ packages: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} + is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -1258,6 +1448,10 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} + mrmime@1.0.1: + resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} + engines: {node: '>=10'} + ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -1269,6 +1463,15 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + node-releases@2.0.17: resolution: {integrity: sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA==} @@ -1329,6 +1532,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + postcss@8.4.39: resolution: {integrity: sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==} engines: {node: ^10 || ^12 || >=14} @@ -1370,6 +1577,19 @@ packages: peerDependencies: react: ^18.3.1 + react-i18next@15.0.0: + resolution: {integrity: sha512-2O3IgF4zivg57Q6p6i+ChDgJ371IDcEWbuWC6gvoh5NbkDMs0Q+O7RPr4v61+Se32E0V+LmtwePAeqWZW0bi6g==} + peerDependencies: + i18next: '>= 23.2.3' + react: '>= 16.8.0' + react-dom: '*' + react-native: '*' + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -1437,6 +1657,13 @@ packages: engines: {node: '>=10'} hasBin: true + set-cookie-parser@2.6.0: + resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} + + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -1453,10 +1680,24 @@ packages: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + source-map@0.5.7: resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} engines: {node: '>=0.10.0'} + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + source-map@0.7.4: + resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} + engines: {node: '>= 8'} + + stream-slice@0.1.2: + resolution: {integrity: sha512-QzQxpoacatkreL6jsxnVb7X5R/pGw9OUv2qWTYWnmLpg4NdN31snPy/f3TdQE1ZUXaThRvj1Zw4/OGg0ZkaLMA==} + strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -1497,12 +1738,18 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + ts-api-utils@1.3.0: resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' + turbo-stream@2.2.0: + resolution: {integrity: sha512-FKFg7A0To1VU4CH9YmSMON5QphK0BXjSoiC7D9yMh+mEEbXLUP9qJ4hEt1qcjKtzncs1OpcnjZO8NgrlVbZH+g==} + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -1519,6 +1766,10 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici@6.19.4: + resolution: {integrity: sha512-i3uaEUwNdkRq2qtTRRJb13moW5HWqviu7Vl7oYRYz++uPtGHJj+x7TGjcEuwS5Mt2P4nA0U9dhIX3DdB6JGY0g==} + engines: {node: '>=18.17'} + unplugin@1.11.0: resolution: {integrity: sha512-3r7VWZ/webh0SGgJScpWl2/MRCZK5d3ZYFcNaeci/GQ7Teop7zf0Nl2pUuz7G21BwPd9pcUPOC5KmJ2L3WgC5g==} engines: {node: '>=14.0.0'} @@ -1542,6 +1793,9 @@ packages: peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 + util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + vite@5.3.4: resolution: {integrity: sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -1570,6 +1824,20 @@ packages: terser: optional: true + void-elements@3.1.0: + resolution: {integrity: sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==} + engines: {node: '>=0.10.0'} + + web-encoding@1.1.5: + resolution: {integrity: sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA==} + + web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + webpack-sources@3.2.3: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} @@ -1577,6 +1845,13 @@ packages: webpack-virtual-modules@0.6.2: resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + which-typed-array@1.1.15: + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + engines: {node: '>= 0.4'} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -1990,6 +2265,14 @@ snapshots: '@mui/core-downloads-tracker@5.16.4': {} + '@mui/icons-material@5.16.4(@mui/material@5.16.4(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)': + dependencies: + '@babel/runtime': 7.24.8 + '@mui/material': 5.16.4(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + '@mui/material@5.16.4(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.24.8 @@ -2082,6 +2365,60 @@ snapshots: immutable: 4.3.7 redux: 5.0.1 + '@remix-run/node@2.10.3(typescript@5.5.3)': + dependencies: + '@remix-run/server-runtime': 2.10.3(typescript@5.5.3) + '@remix-run/web-fetch': 4.4.2 + '@web3-storage/multipart-parser': 1.0.0 + cookie-signature: 1.2.1 + source-map-support: 0.5.21 + stream-slice: 0.1.2 + undici: 6.19.4 + optionalDependencies: + typescript: 5.5.3 + + '@remix-run/router@1.18.0': {} + + '@remix-run/server-runtime@2.10.3(typescript@5.5.3)': + dependencies: + '@remix-run/router': 1.18.0 + '@types/cookie': 0.6.0 + '@web3-storage/multipart-parser': 1.0.0 + cookie: 0.6.0 + set-cookie-parser: 2.6.0 + source-map: 0.7.4 + turbo-stream: 2.2.0 + optionalDependencies: + typescript: 5.5.3 + + '@remix-run/web-blob@3.1.0': + dependencies: + '@remix-run/web-stream': 1.1.0 + web-encoding: 1.1.5 + + '@remix-run/web-fetch@4.4.2': + dependencies: + '@remix-run/web-blob': 3.1.0 + '@remix-run/web-file': 3.1.0 + '@remix-run/web-form-data': 3.1.0 + '@remix-run/web-stream': 1.1.0 + '@web3-storage/multipart-parser': 1.0.0 + abort-controller: 3.0.0 + data-uri-to-buffer: 3.0.1 + mrmime: 1.0.1 + + '@remix-run/web-file@3.1.0': + dependencies: + '@remix-run/web-blob': 3.1.0 + + '@remix-run/web-form-data@3.1.0': + dependencies: + web-encoding: 1.1.5 + + '@remix-run/web-stream@1.1.0': + dependencies: + web-streams-polyfill: 3.3.3 + '@rollup/rollup-android-arm-eabi@4.18.1': optional: true @@ -2138,12 +2475,27 @@ snapshots: - supports-color - typescript + '@tanstack/form-core@0.26.4': + dependencies: + '@tanstack/store': 0.5.5 + '@tanstack/history@1.45.3': {} '@tanstack/query-core@5.51.9': {} '@tanstack/query-devtools@5.51.9': {} + '@tanstack/react-form@0.26.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': + dependencies: + '@remix-run/node': 2.10.3(typescript@5.5.3) + '@tanstack/form-core': 0.26.4 + '@tanstack/react-store': 0.5.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + decode-formdata: 0.7.5 + react: 18.3.1 + transitivePeerDependencies: + - react-dom + - typescript + '@tanstack/react-query-devtools@5.51.11(@tanstack/react-query@5.51.11(react@18.3.1))(react@18.3.1)': dependencies: '@tanstack/query-devtools': 5.51.9 @@ -2233,6 +2585,8 @@ snapshots: dependencies: '@babel/types': 7.24.9 + '@types/cookie@0.6.0': {} + '@types/estree@1.0.5': {} '@types/node@20.14.12': @@ -2388,6 +2742,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@web3-storage/multipart-parser@1.0.0': {} + + '@zxing/text-encoding@0.9.0': + optional: true + + abort-controller@3.0.0: + dependencies: + event-target-shim: 5.0.1 + acorn-jsx@5.3.2(acorn@8.12.1): dependencies: acorn: 8.12.1 @@ -2420,6 +2783,10 @@ snapshots: array-union@2.1.0: {} + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.0.0 + babel-dead-code-elimination@1.0.6: dependencies: '@babel/core': 7.24.9 @@ -2459,6 +2826,16 @@ snapshots: node-releases: 2.0.17 update-browserslist-db: 1.1.0(browserslist@4.23.2) + buffer-from@1.1.2: {} + + call-bind@1.0.7: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + callsites@3.1.0: {} caniuse-lite@1.0.30001642: {} @@ -2506,6 +2883,10 @@ snapshots: convert-source-map@2.0.0: {} + cookie-signature@1.2.1: {} + + cookie@0.6.0: {} + cosmiconfig@7.1.0: dependencies: '@types/parse-json': 4.0.2 @@ -2514,6 +2895,12 @@ snapshots: path-type: 4.0.0 yaml: 1.10.2 + cross-fetch@4.0.0: + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + cross-spawn@7.0.3: dependencies: path-key: 3.1.1 @@ -2522,12 +2909,22 @@ snapshots: csstype@3.1.3: {} + data-uri-to-buffer@3.0.1: {} + debug@4.3.5: dependencies: ms: 2.1.2 + decode-formdata@0.7.5: {} + deep-is@0.1.4: {} + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -2547,6 +2944,12 @@ snapshots: dependencies: is-arrayish: 0.2.1 + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + esbuild@0.21.5: optionalDependencies: '@esbuild/aix-ppc64': 0.21.5 @@ -2655,6 +3058,8 @@ snapshots: esutils@2.0.3: {} + event-target-shim@5.0.1: {} + fast-deep-equal@3.1.3: {} fast-glob@3.3.2: @@ -2696,6 +3101,10 @@ snapshots: flatted@3.3.1: {} + for-each@0.3.3: + dependencies: + is-callable: 1.2.7 + fs.realpath@1.0.0: {} fsevents@2.3.3: @@ -2705,6 +3114,14 @@ snapshots: gensync@1.0.0-beta.2: {} + get-intrinsic@1.2.4: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -2741,12 +3158,28 @@ snapshots: dependencies: csstype: 3.1.3 + gopd@1.0.1: + dependencies: + get-intrinsic: 1.2.4 + graphemer@1.4.0: {} has-flag@3.0.0: {} has-flag@4.0.0: {} + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.0 + + has-proto@1.0.3: {} + + has-symbols@1.0.3: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.0.3 + hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -2755,6 +3188,24 @@ snapshots: dependencies: react-is: 16.13.1 + html-parse-stringify@3.0.1: + dependencies: + void-elements: 3.1.0 + + i18next-browser-languagedetector@8.0.0: + dependencies: + '@babel/runtime': 7.24.8 + + i18next-http-backend@2.5.2: + dependencies: + cross-fetch: 4.0.0 + transitivePeerDependencies: + - encoding + + i18next@23.12.2: + dependencies: + '@babel/runtime': 7.24.8 + ignore@5.3.1: {} immutable@4.3.7: {} @@ -2773,18 +3224,29 @@ snapshots: inherits@2.0.4: {} + is-arguments@1.1.1: + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + is-arrayish@0.2.1: {} is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 + is-callable@1.2.7: {} + is-core-module@2.15.0: dependencies: hasown: 2.0.2 is-extglob@2.1.1: {} + is-generator-function@1.0.10: + dependencies: + has-tostringtag: 1.0.2 + is-glob@4.0.3: dependencies: is-extglob: 2.1.1 @@ -2793,6 +3255,10 @@ snapshots: is-path-inside@3.0.3: {} + is-typed-array@1.1.13: + dependencies: + which-typed-array: 1.1.15 + isexe@2.0.0: {} js-tokens@4.0.0: {} @@ -2853,12 +3319,18 @@ snapshots: dependencies: brace-expansion: 2.0.1 + mrmime@1.0.1: {} + ms@2.1.2: {} nanoid@3.3.7: {} natural-compare@1.4.0: {} + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + node-releases@2.0.17: {} normalize-path@3.0.0: {} @@ -2911,6 +3383,8 @@ snapshots: picomatch@2.3.1: {} + possible-typed-array-names@1.0.0: {} + postcss@8.4.39: dependencies: nanoid: 3.3.7 @@ -2942,6 +3416,15 @@ snapshots: react: 18.3.1 scheduler: 0.23.2 + react-i18next@15.0.0(i18next@23.12.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + '@babel/runtime': 7.24.8 + html-parse-stringify: 3.0.1 + i18next: 23.12.2 + react: 18.3.1 + optionalDependencies: + react-dom: 18.3.1(react@18.3.1) + react-is@16.13.1: {} react-is@18.3.1: {} @@ -3017,6 +3500,17 @@ snapshots: semver@7.6.3: {} + set-cookie-parser@2.6.0: {} + + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 @@ -3027,8 +3521,19 @@ snapshots: source-map-js@1.2.0: {} + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + source-map@0.5.7: {} + source-map@0.6.1: {} + + source-map@0.7.4: {} + + stream-slice@0.1.2: {} + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -3059,10 +3564,14 @@ snapshots: dependencies: is-number: 7.0.0 + tr46@0.0.3: {} + ts-api-utils@1.3.0(typescript@5.5.3): dependencies: typescript: 5.5.3 + turbo-stream@2.2.0: {} + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -3073,6 +3582,8 @@ snapshots: undici-types@5.26.5: {} + undici@6.19.4: {} + unplugin@1.11.0: dependencies: acorn: 8.12.1 @@ -3098,6 +3609,14 @@ snapshots: dependencies: react: 18.3.1 + util@0.12.5: + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.13 + which-typed-array: 1.1.15 + vite@5.3.4(@types/node@20.14.12): dependencies: esbuild: 0.21.5 @@ -3107,10 +3626,35 @@ snapshots: '@types/node': 20.14.12 fsevents: 2.3.3 + void-elements@3.1.0: {} + + web-encoding@1.1.5: + dependencies: + util: 0.12.5 + optionalDependencies: + '@zxing/text-encoding': 0.9.0 + + web-streams-polyfill@3.3.3: {} + + webidl-conversions@3.0.1: {} + webpack-sources@3.2.3: {} webpack-virtual-modules@0.6.2: {} + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + + which-typed-array@1.1.15: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.2 + which@2.0.2: dependencies: isexe: 2.0.0 diff --git a/exam/react/public/locales/de/translation.json b/exam/react/public/locales/de/translation.json new file mode 100644 index 0000000..294a6f7 --- /dev/null +++ b/exam/react/public/locales/de/translation.json @@ -0,0 +1,11 @@ +{ + "NotFound_user:login": "Benutzer existiert nicht", + "Unauthorized:login": "Ungültige E-mail oder Passwort", + + "GuestBook": "Gästebuch", + "E-Mail": "E-Mail", + "Password": "Passwort", + "Log in": "Anmelden", + "Log out": "Abmelden", + "Profile": "Profil" +} diff --git a/exam/react/public/locales/en/translation.json b/exam/react/public/locales/en/translation.json new file mode 100644 index 0000000..21f9060 --- /dev/null +++ b/exam/react/public/locales/en/translation.json @@ -0,0 +1,11 @@ +{ + "NotFound_user:login": "User does not exist", + "Unauthorized:login": "Invalid e-mail or password", + + "GuestBook": "GuestBook", + "E-Mail": "E-Mail", + "Password": "Password", + "Log in": "Log in", + "Log out": "Log out", + "Profile": "Profile" +} diff --git a/exam/react/src/api/Api.ts b/exam/react/src/api/Api.ts index 5005cf3..3c4e6d8 100644 --- a/exam/react/src/api/Api.ts +++ b/exam/react/src/api/Api.ts @@ -12,6 +12,7 @@ class ApiImpl { throw new Error('New instance cannot be created!!'); } + // eslint-disable-next-line @typescript-eslint/no-this-alias instance = this; } diff --git a/exam/react/src/components/Forms/Login/Login.tsx b/exam/react/src/components/Forms/Login/Login.tsx new file mode 100644 index 0000000..a8ffc01 --- /dev/null +++ b/exam/react/src/components/Forms/Login/Login.tsx @@ -0,0 +1,115 @@ +import { Box, Button, TextField, Typography } from '@mui/material'; +import { useForm } from '@tanstack/react-form'; +import { FC, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import Api from '../../../api/Api'; +import useGuestBookStore from '../../../store/store'; +import handleError from '../../../utils/errors'; + +const Login: FC = () => { + const [error, setError] = useState(); + + const setUser = useGuestBookStore((state) => state.setUser); + + const { t } = useTranslation(); + + const form = useForm({ + defaultValues: { + email: '', + password: '', + }, + onSubmit: async ({ value }) => { + try { + setUser(await Api.logIn(value.email, value.password)); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (error: any) { + setError(error); + } + }, + }); + + return ( +
{ + e.preventDefault(); + e.stopPropagation(); + form.handleSubmit(); + }} + noValidate + > + + (!value ? 'Email required' : undefined), + onChangeAsyncDebounceMs: 500, + onChangeAsync: async ({ value }) => { + await new Promise((resolve) => setTimeout(resolve, 1000)); + return value.includes('error') && 'No "error" allowed in email'; + }, + }} + children={(field) => { + return ( + <> + field.handleChange(e.target.value)} + size="small" + label={t('E-Mail')} + required + error={field.state.meta.isTouched && field.state.meta.errors.length > 0} + helperText={field.state.meta.isTouched ? field.state.meta.errors.join(',') : ''} + /> + + ); + }} + /> + (!value ? 'Password required' : undefined), + onChangeAsyncDebounceMs: 500, + onChangeAsync: async ({ value }) => { + await new Promise((resolve) => setTimeout(resolve, 1000)); + return value.includes('error') && 'No "error" allowed in password'; + }, + }} + children={(field) => { + return ( + <> + field.handleChange(e.target.value)} + size="small" + label={t('Password')} + required + error={field.state.meta.isTouched && field.state.meta.errors.length > 0} + helperText={field.state.meta.isTouched ? field.state.meta.errors.join(',') : ''} + /> + + ); + }} + /> + [state.canSubmit, state.isSubmitting]} + children={([canSubmit]) => ( + <> + + + )} + /> + {t(...handleError(error, 'login'))} + +
+ ); +}; + +export default Login; diff --git a/exam/react/src/components/Header/Header.tsx b/exam/react/src/components/Header/Header.tsx new file mode 100644 index 0000000..20d679f --- /dev/null +++ b/exam/react/src/components/Header/Header.tsx @@ -0,0 +1,92 @@ +import { AccountCircle } from '@mui/icons-material'; +import { AppBar, Avatar, IconButton, Menu, MenuItem, Toolbar, Typography, useScrollTrigger } from '@mui/material'; +import { cloneElement, FC, ReactElement, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import Api from '../../api/Api'; +import useGuestBookStore from '../../store/store'; +import Login from '../Forms/Login/Login'; + +const ElevationScroll = ({ children }: { children: ReactElement }) => { + const trigger = useScrollTrigger({ + disableHysteresis: true, + threshold: 0, + }); + + return cloneElement(children, { + elevation: trigger ? 4 : 0, + }); +}; + +const Header: FC = () => { + const [anchorEl, setAnchorEl] = useState(null); + + const user = useGuestBookStore((state) => state.user); + const setUser = useGuestBookStore((state) => state.setUser); + + const { t } = useTranslation(); + + const handleMenu = (event: React.MouseEvent) => { + setAnchorEl(event.currentTarget); + }; + + const handleClose = () => { + setAnchorEl(null); + }; + + return ( + + + + + {t('GuestBook')} + + {user ? ( + + + + ) : ( + + + + )} + + {user ? ( + [ + + {t('Profile')} + , + { + Api.logOut(); + setUser(undefined); + }} + > + {t('Log out')} + , + ] + ) : ( + + )} + + + + + ); +}; + +export default Header; diff --git a/exam/react/src/i18n.ts b/exam/react/src/i18n.ts new file mode 100644 index 0000000..813f051 --- /dev/null +++ b/exam/react/src/i18n.ts @@ -0,0 +1,35 @@ +import i18n from 'i18next'; +import { initReactI18next } from 'react-i18next'; + +import LanguageDetector from 'i18next-browser-languagedetector'; +import Backend from 'i18next-http-backend'; +// don't want to use this? +// have a look at the Quick start guide +// for passing in lng and translations on init + +i18n + // load translation using http -> see /public/locales (i.e. https://github.com/i18next/react-i18next/tree/master/example/react/public/locales) + // learn more: https://github.com/i18next/i18next-http-backend + // want your translations to be loaded from a professional CDN? => https://github.com/locize/react-tutorial#step-2---use-the-locize-cdn + .use(Backend) + // detect user language + // learn more: https://github.com/i18next/i18next-browser-languageDetector + .use(LanguageDetector) + // pass the i18n instance to react-i18next. + .use(initReactI18next) + // init i18next + // for all options read: https://www.i18next.com/overview/configuration-options + .init({ + fallbackLng: 'en', + debug: true, + + interpolation: { + escapeValue: false, // not needed for react as it escapes by default + }, + + backend: { + loadPath: '/phpCourse/exam/dist/locales/{{lng}}/{{ns}}.json', + }, + }); + +export default i18n; diff --git a/exam/react/src/main.tsx b/exam/react/src/main.tsx index 1055140..bc83666 100644 --- a/exam/react/src/main.tsx +++ b/exam/react/src/main.tsx @@ -7,6 +7,9 @@ import ReactDOM from 'react-dom/client'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { routeTree } from './routeTree.gen'; +// Import i18n +import './i18n'; + // Query Client const queryClient = new QueryClient(); diff --git a/exam/react/src/routes/__root.tsx b/exam/react/src/routes/__root.tsx index aac2632..3b3e78a 100644 --- a/exam/react/src/routes/__root.tsx +++ b/exam/react/src/routes/__root.tsx @@ -1,19 +1,14 @@ +import { Toolbar } from '@mui/material'; import { QueryClient } from '@tanstack/react-query'; -import { createRootRouteWithContext, Link, Outlet } from '@tanstack/react-router'; +import { createRootRouteWithContext, Outlet } from '@tanstack/react-router'; import { TanStackRouterDevtools } from '@tanstack/router-devtools'; +import Header from '../components/Header/Header'; export const Route = createRootRouteWithContext<{ queryClient: QueryClient }>()({ component: () => ( <> - - Home - +
+ {process.env.NODE_ENV === 'development' && } diff --git a/exam/react/src/routes/index.tsx b/exam/react/src/routes/index.tsx index 880d72e..c1c775d 100644 --- a/exam/react/src/routes/index.tsx +++ b/exam/react/src/routes/index.tsx @@ -1,40 +1,9 @@ -import { Button } from '@mui/material'; import { createFileRoute } from '@tanstack/react-router'; -import Api from '../api/Api'; -import useGuestBookStore from '../store/store'; export const Route = createFileRoute('/')({ component: Home, }); function Home() { - const setUser = useGuestBookStore((state) => state.setUser); - - return ( - <> - - - - ); + return <>; } diff --git a/exam/react/src/utils/errors.ts b/exam/react/src/utils/errors.ts new file mode 100644 index 0000000..693b3fe --- /dev/null +++ b/exam/react/src/utils/errors.ts @@ -0,0 +1,25 @@ +/** + * Transform error into i18next spreadable input + * @param error Error object + * @param context Optional context for translation + * @returns Array to be spread into i18next `t` function + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const handleError = (error: any, context?: string): [string, { context?: string }] => { + if (!error) return ['', {}]; + + if (error.code) { + switch (error.code) { + case 'NotFound': + return [error.code, { context: `${error.entity}:${context}` }]; + case 'Unauthorized': + return [error.code, { context }]; + default: + return ['Unknown', { context }]; + } + } + + return [error?.message ?? 'Unknown', { context }]; +}; + +export default handleError;