@hogsend/cli 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,290 @@
1
+ var W1=Object.defineProperty;var _g=n=>{throw TypeError(n)};var eS=(n,a,i)=>a in n?W1(n,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[a]=i;var ta=(n,a,i)=>eS(n,typeof a!="symbol"?a+"":a,i),cf=(n,a,i)=>a.has(n)||_g("Cannot "+i);var _=(n,a,i)=>(cf(n,a,"read from private field"),i?i.call(n):a.get(n)),he=(n,a,i)=>a.has(n)?_g("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,i),le=(n,a,i,r)=>(cf(n,a,"write to private field"),r?r.call(n,i):a.set(n,i),i),Ne=(n,a,i)=>(cf(n,a,"access private method"),i);var mc=(n,a,i,r)=>({set _(u){le(n,a,u,i)},get _(){return _(n,a,r)}});(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function i(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(u){if(u.ep)return;u.ep=!0;const f=i(u);fetch(u.href,f)}})();function tS(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var uf={exports:{}},jr={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Tg;function nS(){if(Tg)return jr;Tg=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(r,u,f){var h=null;if(f!==void 0&&(h=""+f),u.key!==void 0&&(h=""+u.key),"key"in u){f={};for(var y in u)y!=="key"&&(f[y]=u[y])}else f=u;return u=f.ref,{$$typeof:n,type:r,key:h,ref:u!==void 0?u:null,props:f}}return jr.Fragment=a,jr.jsx=i,jr.jsxs=i,jr}var Eg;function sS(){return Eg||(Eg=1,uf.exports=nS()),uf.exports}var o=sS(),_l=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Wa,oa,ol,Kv,aS=(Kv=class extends _l{constructor(){super();he(this,Wa);he(this,oa);he(this,ol);le(this,ol,a=>{if(typeof window<"u"&&window.addEventListener){const i=()=>a();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){_(this,oa)||this.setEventListener(_(this,ol))}onUnsubscribe(){var a;this.hasListeners()||((a=_(this,oa))==null||a.call(this),le(this,oa,void 0))}setEventListener(a){var i;le(this,ol,a),(i=_(this,oa))==null||i.call(this),le(this,oa,a(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(a){_(this,Wa)!==a&&(le(this,Wa,a),this.onFocus())}onFocus(){const a=this.isFocused();this.listeners.forEach(i=>{i(a)})}isFocused(){var a;return typeof _(this,Wa)=="boolean"?_(this,Wa):((a=globalThis.document)==null?void 0:a.visibilityState)!=="hidden"}},Wa=new WeakMap,oa=new WeakMap,ol=new WeakMap,Kv),fh=new aS,iS={setTimeout:(n,a)=>setTimeout(n,a),clearTimeout:n=>clearTimeout(n),setInterval:(n,a)=>setInterval(n,a),clearInterval:n=>clearInterval(n)},ca,dh,Xv,lS=(Xv=class{constructor(){he(this,ca,iS);he(this,dh,!1)}setTimeoutProvider(n){le(this,ca,n)}setTimeout(n,a){return _(this,ca).setTimeout(n,a)}clearTimeout(n){_(this,ca).clearTimeout(n)}setInterval(n,a){return _(this,ca).setInterval(n,a)}clearInterval(n){_(this,ca).clearInterval(n)}},ca=new WeakMap,dh=new WeakMap,Xv),Ia=new lS;function rS(n){setTimeout(n,0)}var oS=typeof window>"u"||"Deno"in globalThis;function Ut(){}function cS(n,a){return typeof n=="function"?n(a):n}function Lf(n){return typeof n=="number"&&n>=0&&n!==1/0}function s0(n,a){return Math.max(n+(a||0)-Date.now(),0)}function ba(n,a){return typeof n=="function"?n(a):n}function hn(n,a){return typeof n=="function"?n(a):n}function Mg(n,a){const{type:i="all",exact:r,fetchStatus:u,predicate:f,queryKey:h,stale:y}=n;if(h){if(r){if(a.queryHash!==hh(h,a.options))return!1}else if(!Or(a.queryKey,h))return!1}if(i!=="all"){const p=a.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof y=="boolean"&&a.isStale()!==y||u&&u!==a.state.fetchStatus||f&&!f(a))}function Ag(n,a){const{exact:i,status:r,predicate:u,mutationKey:f}=n;if(f){if(!a.options.mutationKey)return!1;if(i){if(di(a.options.mutationKey)!==di(f))return!1}else if(!Or(a.options.mutationKey,f))return!1}return!(r&&a.state.status!==r||u&&!u(a))}function hh(n,a){return((a==null?void 0:a.queryKeyHashFn)||di)(n)}function di(n){return JSON.stringify(n,(a,i)=>Bf(i)?Object.keys(i).sort().reduce((r,u)=>(r[u]=i[u],r),{}):i)}function Or(n,a){return n===a?!0:typeof n!=typeof a?!1:n&&a&&typeof n=="object"&&typeof a=="object"?Object.keys(a).every(i=>Or(n[i],a[i])):!1}var uS=Object.prototype.hasOwnProperty;function a0(n,a,i=0){if(n===a)return n;if(i>500)return a;const r=kg(n)&&kg(a);if(!r&&!(Bf(n)&&Bf(a)))return a;const f=(r?n:Object.keys(n)).length,h=r?a:Object.keys(a),y=h.length,p=r?new Array(y):{};let m=0;for(let x=0;x<y;x++){const v=r?x:h[x],b=n[v],w=a[v];if(b===w){p[v]=b,(r?x<f:uS.call(n,v))&&m++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[v]=w;continue}const N=a0(b,w,i+1);p[v]=N,N===b&&m++}return f===y&&m===f?n:p}function Dc(n,a){if(!a||Object.keys(n).length!==Object.keys(a).length)return!1;for(const i in n)if(n[i]!==a[i])return!1;return!0}function kg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Bf(n){if(!Og(n))return!1;const a=n.constructor;if(a===void 0)return!0;const i=a.prototype;return!(!Og(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Og(n){return Object.prototype.toString.call(n)==="[object Object]"}function dS(n){return new Promise(a=>{Ia.setTimeout(a,n)})}function qf(n,a,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,a):i.structuralSharing!==!1?a0(n,a):a}function Vc(n){return n}function fS(n,a,i=0){const r=[...n,a];return i&&r.length>i?r.slice(1):r}function hS(n,a,i=0){const r=[a,...n];return i&&r.length>i?r.slice(0,-1):r}var mh=Symbol();function i0(n,a){return!n.queryFn&&(a!=null&&a.initialPromise)?()=>a.initialPromise:!n.queryFn||n.queryFn===mh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function ph(n,a){return typeof n=="function"?n(...a):!!n}function mS(n,a,i){let r=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=a()),r||(r=!0,u.aborted?i():u.addEventListener("abort",i,{once:!0})),u)}),n}var zr=(()=>{let n=()=>oS;return{isServer(){return n()},setIsServer(a){n=a}}})();function Hf(){let n,a;const i=new Promise((u,f)=>{n=u,a=f});i.status="pending",i.catch(()=>{});function r(u){Object.assign(i,u),delete i.resolve,delete i.reject}return i.resolve=u=>{r({status:"fulfilled",value:u}),n(u)},i.reject=u=>{r({status:"rejected",reason:u}),a(u)},i}var pS=rS;function yS(){let n=[],a=0,i=y=>{y()},r=y=>{y()},u=pS;const f=y=>{a?n.push(y):u(()=>{i(y)})},h=()=>{const y=n;n=[],y.length&&u(()=>{r(()=>{y.forEach(p=>{i(p)})})})};return{batch:y=>{let p;a++;try{p=y()}finally{a--,a||h()}return p},batchCalls:y=>(...p)=>{f(()=>{y(...p)})},schedule:f,setNotifyFunction:y=>{i=y},setBatchNotifyFunction:y=>{r=y},setScheduler:y=>{u=y}}}var yt=yS(),cl,ua,ul,Zv,gS=(Zv=class extends _l{constructor(){super();he(this,cl,!0);he(this,ua);he(this,ul);le(this,ul,a=>{if(typeof window<"u"&&window.addEventListener){const i=()=>a(!0),r=()=>a(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){_(this,ua)||this.setEventListener(_(this,ul))}onUnsubscribe(){var a;this.hasListeners()||((a=_(this,ua))==null||a.call(this),le(this,ua,void 0))}setEventListener(a){var i;le(this,ul,a),(i=_(this,ua))==null||i.call(this),le(this,ua,a(this.setOnline.bind(this)))}setOnline(a){_(this,cl)!==a&&(le(this,cl,a),this.listeners.forEach(r=>{r(a)}))}isOnline(){return _(this,cl)}},cl=new WeakMap,ua=new WeakMap,ul=new WeakMap,Zv),Uc=new gS;function vS(n){return Math.min(1e3*2**n,3e4)}function l0(n){return(n??"online")==="online"?Uc.isOnline():!0}var Qf=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function r0(n){let a=!1,i=0,r;const u=Hf(),f=()=>u.status!=="pending",h=R=>{var j;if(!f()){const O=new Qf(R);b(O),(j=n.onCancel)==null||j.call(n,O)}},y=()=>{a=!0},p=()=>{a=!1},m=()=>fh.isFocused()&&(n.networkMode==="always"||Uc.isOnline())&&n.canRun(),x=()=>l0(n.networkMode)&&n.canRun(),v=R=>{f()||(r==null||r(),u.resolve(R))},b=R=>{f()||(r==null||r(),u.reject(R))},w=()=>new Promise(R=>{var j;r=O=>{(f()||m())&&R(O)},(j=n.onPause)==null||j.call(n)}).then(()=>{var R;r=void 0,f()||(R=n.onContinue)==null||R.call(n)}),N=()=>{if(f())return;let R;const j=i===0?n.initialPromise:void 0;try{R=j??n.fn()}catch(O){R=Promise.reject(O)}Promise.resolve(R).then(v).catch(O=>{var D;if(f())return;const A=n.retry??(zr.isServer()?0:3),B=n.retryDelay??vS,T=typeof B=="function"?B(i,O):B,q=A===!0||typeof A=="number"&&i<A||typeof A=="function"&&A(i,O);if(a||!q){b(O);return}i++,(D=n.onFail)==null||D.call(n,i,O),dS(T).then(()=>m()?void 0:w()).then(()=>{a?b(O):N()})})};return{promise:u,status:()=>u.status,cancel:h,continue:()=>(r==null||r(),u),cancelRetry:y,continueRetry:p,canStart:x,start:()=>(x()?N():w().then(N),u)}}var ei,Fv,o0=(Fv=class{constructor(){he(this,ei)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Lf(this.gcTime)&&le(this,ei,Ia.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(zr.isServer()?1/0:300*1e3))}clearGcTimeout(){_(this,ei)!==void 0&&(Ia.clearTimeout(_(this,ei)),le(this,ei,void 0))}},ei=new WeakMap,Fv);function xS(n){return{onFetch:(a,i)=>{var x,v,b,w,N;const r=a.options,u=(b=(v=(x=a.fetchOptions)==null?void 0:x.meta)==null?void 0:v.fetchMore)==null?void 0:b.direction,f=((w=a.state.data)==null?void 0:w.pages)||[],h=((N=a.state.data)==null?void 0:N.pageParams)||[];let y={pages:[],pageParams:[]},p=0;const m=async()=>{let R=!1;const j=B=>{mS(B,()=>a.signal,()=>R=!0)},O=i0(a.options,a.fetchOptions),A=async(B,T,q)=>{if(R)return Promise.reject(a.signal.reason);if(T==null&&B.pages.length)return Promise.resolve(B);const z=(()=>{const ee={client:a.client,queryKey:a.queryKey,pageParam:T,direction:q?"backward":"forward",meta:a.options.meta};return j(ee),ee})(),k=await O(z),{maxPages:Y}=a.options,W=q?hS:fS;return{pages:W(B.pages,k,Y),pageParams:W(B.pageParams,T,Y)}};if(u&&f.length){const B=u==="backward",T=B?bS:zg,q={pages:f,pageParams:h},D=T(r,q);y=await A(q,D,B)}else{const B=n??f.length;do{const T=p===0?h[0]??r.initialPageParam:zg(r,y);if(p>0&&T==null)break;y=await A(y,T),p++}while(p<B)}return y};a.options.persister?a.fetchFn=()=>{var R,j;return(j=(R=a.options).persister)==null?void 0:j.call(R,m,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},i)}:a.fetchFn=m}}}function zg(n,{pages:a,pageParams:i}){const r=a.length-1;return a.length>0?n.getNextPageParam(a[r],a,i[r],i):void 0}function bS(n,{pages:a,pageParams:i}){var r;return a.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,a[0],a,i[0],i):void 0}var dl,ti,fl,En,ni,xt,Qr,si,fn,c0,xs,Iv,SS=(Iv=class extends o0{constructor(a){super();he(this,fn);he(this,dl);he(this,ti);he(this,fl);he(this,En);he(this,ni);he(this,xt);he(this,Qr);he(this,si);le(this,si,!1),le(this,Qr,a.defaultOptions),this.setOptions(a.options),this.observers=[],le(this,ni,a.client),le(this,En,_(this,ni).getQueryCache()),this.queryKey=a.queryKey,this.queryHash=a.queryHash,le(this,ti,Ug(this.options)),this.state=a.state??_(this,ti),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return _(this,dl)}get promise(){var a;return(a=_(this,xt))==null?void 0:a.promise}setOptions(a){if(this.options={..._(this,Qr),...a},a!=null&&a._type&&le(this,dl,a._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Ug(this.options);i.data!==void 0&&(this.setState(Dg(i.data,i.dataUpdatedAt)),le(this,ti,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,En).remove(this)}setData(a,i){const r=qf(this.state.data,a,this.options);return Ne(this,fn,xs).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(a){Ne(this,fn,xs).call(this,{type:"setState",state:a})}cancel(a){var r,u;const i=(r=_(this,xt))==null?void 0:r.promise;return(u=_(this,xt))==null||u.cancel(a),i?i.then(Ut).catch(Ut):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return _(this,ti)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(a=>hn(a.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(a=>ba(a.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(a=>a.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(a=0){return this.state.data===void 0?!0:a==="static"?!1:this.state.isInvalidated?!0:!s0(this.state.dataUpdatedAt,a)}onFocus(){var i;const a=this.observers.find(r=>r.shouldFetchOnWindowFocus());a==null||a.refetch({cancelRefetch:!1}),(i=_(this,xt))==null||i.continue()}onOnline(){var i;const a=this.observers.find(r=>r.shouldFetchOnReconnect());a==null||a.refetch({cancelRefetch:!1}),(i=_(this,xt))==null||i.continue()}addObserver(a){this.observers.includes(a)||(this.observers.push(a),this.clearGcTimeout(),_(this,En).notify({type:"observerAdded",query:this,observer:a}))}removeObserver(a){this.observers.includes(a)&&(this.observers=this.observers.filter(i=>i!==a),this.observers.length||(_(this,xt)&&(_(this,si)||Ne(this,fn,c0).call(this)?_(this,xt).cancel({revert:!0}):_(this,xt).cancelRetry()),this.scheduleGc()),_(this,En).notify({type:"observerRemoved",query:this,observer:a}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ne(this,fn,xs).call(this,{type:"invalidate"})}async fetch(a,i){var m,x,v,b,w,N,R,j,O,A,B;if(this.state.fetchStatus!=="idle"&&((m=_(this,xt))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(_(this,xt))return _(this,xt).continueRetry(),_(this,xt).promise}if(a&&this.setOptions(a),!this.options.queryFn){const T=this.observers.find(q=>q.options.queryFn);T&&this.setOptions(T.options)}const r=new AbortController,u=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(le(this,si,!0),r.signal)})},f=()=>{const T=i0(this.options,i),D=(()=>{const z={client:_(this,ni),queryKey:this.queryKey,meta:this.meta};return u(z),z})();return le(this,si,!1),this.options.persister?this.options.persister(T,D,this):T(D)},y=(()=>{const T={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:_(this,ni),state:this.state,fetchFn:f};return u(T),T})(),p=_(this,dl)==="infinite"?xS(this.options.pages):this.options.behavior;p==null||p.onFetch(y,this),le(this,fl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=y.fetchOptions)==null?void 0:x.meta))&&Ne(this,fn,xs).call(this,{type:"fetch",meta:(v=y.fetchOptions)==null?void 0:v.meta}),le(this,xt,r0({initialPromise:i==null?void 0:i.initialPromise,fn:y.fetchFn,onCancel:T=>{T instanceof Qf&&T.revert&&this.setState({..._(this,fl),fetchStatus:"idle"}),r.abort()},onFail:(T,q)=>{Ne(this,fn,xs).call(this,{type:"failed",failureCount:T,error:q})},onPause:()=>{Ne(this,fn,xs).call(this,{type:"pause"})},onContinue:()=>{Ne(this,fn,xs).call(this,{type:"continue"})},retry:y.options.retry,retryDelay:y.options.retryDelay,networkMode:y.options.networkMode,canRun:()=>!0}));try{const T=await _(this,xt).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(w=(b=_(this,En).config).onSuccess)==null||w.call(b,T,this),(R=(N=_(this,En).config).onSettled)==null||R.call(N,T,this.state.error,this),T}catch(T){if(T instanceof Qf){if(T.silent)return _(this,xt).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw Ne(this,fn,xs).call(this,{type:"error",error:T}),(O=(j=_(this,En).config).onError)==null||O.call(j,T,this),(B=(A=_(this,En).config).onSettled)==null||B.call(A,this.state.data,T,this),T}finally{this.scheduleGc()}}},dl=new WeakMap,ti=new WeakMap,fl=new WeakMap,En=new WeakMap,ni=new WeakMap,xt=new WeakMap,Qr=new WeakMap,si=new WeakMap,fn=new WeakSet,c0=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},xs=function(a){const i=r=>{switch(a.type){case"failed":return{...r,fetchFailureCount:a.failureCount,fetchFailureReason:a.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...u0(r.data,this.options),fetchMeta:a.meta??null};case"success":const u={...r,...Dg(a.data,a.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!a.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return le(this,fl,a.manual?u:void 0),u;case"error":const f=a.error;return{...r,error:f,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...a.state}}};this.state=i(this.state),yt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),_(this,En).notify({query:this,type:"updated",action:a})})},Iv);function u0(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:l0(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Dg(n,a){return{data:n,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ug(n){const a=typeof n.initialData=="function"?n.initialData():n.initialData,i=a!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var It,Ue,Gr,Dt,ai,hl,bs,da,Pr,ml,pl,ii,li,fa,yl,Qe,Ar,Gf,Pf,Vf,Yf,Kf,Xf,Zf,d0,Jv,jS=(Jv=class extends _l{constructor(a,i){super();he(this,Qe);he(this,It);he(this,Ue);he(this,Gr);he(this,Dt);he(this,ai);he(this,hl);he(this,bs);he(this,da);he(this,Pr);he(this,ml);he(this,pl);he(this,ii);he(this,li);he(this,fa);he(this,yl,new Set);this.options=i,le(this,It,a),le(this,da,null),le(this,bs,Hf()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,Ue).addObserver(this),Lg(_(this,Ue),this.options)?Ne(this,Qe,Ar).call(this):this.updateResult(),Ne(this,Qe,Yf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ff(_(this,Ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ff(_(this,Ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ne(this,Qe,Kf).call(this),Ne(this,Qe,Xf).call(this),_(this,Ue).removeObserver(this)}setOptions(a){const i=this.options,r=_(this,Ue);if(this.options=_(this,It).defaultQueryOptions(a),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hn(this.options.enabled,_(this,Ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ne(this,Qe,Zf).call(this),_(this,Ue).setOptions(this.options),i._defaulted&&!Dc(this.options,i)&&_(this,It).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,Ue),observer:this});const u=this.hasListeners();u&&Bg(_(this,Ue),r,this.options,i)&&Ne(this,Qe,Ar).call(this),this.updateResult(),u&&(_(this,Ue)!==r||hn(this.options.enabled,_(this,Ue))!==hn(i.enabled,_(this,Ue))||ba(this.options.staleTime,_(this,Ue))!==ba(i.staleTime,_(this,Ue)))&&Ne(this,Qe,Gf).call(this);const f=Ne(this,Qe,Pf).call(this);u&&(_(this,Ue)!==r||hn(this.options.enabled,_(this,Ue))!==hn(i.enabled,_(this,Ue))||f!==_(this,fa))&&Ne(this,Qe,Vf).call(this,f)}getOptimisticResult(a){const i=_(this,It).getQueryCache().build(_(this,It),a),r=this.createResult(i,a);return NS(this,r)&&(le(this,Dt,r),le(this,hl,this.options),le(this,ai,_(this,Ue).state)),r}getCurrentResult(){return _(this,Dt)}trackResult(a,i){return new Proxy(a,{get:(r,u)=>(this.trackProp(u),i==null||i(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&_(this,bs).status==="pending"&&_(this,bs).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,u))})}trackProp(a){_(this,yl).add(a)}getCurrentQuery(){return _(this,Ue)}refetch({...a}={}){return this.fetch({...a})}fetchOptimistic(a){const i=_(this,It).defaultQueryOptions(a),r=_(this,It).getQueryCache().build(_(this,It),i);return r.fetch().then(()=>this.createResult(r,i))}fetch(a){return Ne(this,Qe,Ar).call(this,{...a,cancelRefetch:a.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,Dt)))}createResult(a,i){var Y;const r=_(this,Ue),u=this.options,f=_(this,Dt),h=_(this,ai),y=_(this,hl),m=a!==r?a.state:_(this,Gr),{state:x}=a;let v={...x},b=!1,w;if(i._optimisticResults){const W=this.hasListeners(),ee=!W&&Lg(a,i),F=W&&Bg(a,r,i,u);(ee||F)&&(v={...v,...u0(x.data,a.options)}),i._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:N,errorUpdatedAt:R,status:j}=v;w=v.data;let O=!1;if(i.placeholderData!==void 0&&w===void 0&&j==="pending"){let W;f!=null&&f.isPlaceholderData&&i.placeholderData===(y==null?void 0:y.placeholderData)?(W=f.data,O=!0):W=typeof i.placeholderData=="function"?i.placeholderData((Y=_(this,pl))==null?void 0:Y.state.data,_(this,pl)):i.placeholderData,W!==void 0&&(j="success",w=qf(f==null?void 0:f.data,W,i),b=!0)}if(i.select&&w!==void 0&&!O)if(f&&w===(h==null?void 0:h.data)&&i.select===_(this,Pr))w=_(this,ml);else try{le(this,Pr,i.select),w=i.select(w),w=qf(f==null?void 0:f.data,w,i),le(this,ml,w),le(this,da,null)}catch(W){le(this,da,W)}_(this,da)&&(N=_(this,da),w=_(this,ml),R=Date.now(),j="error");const A=v.fetchStatus==="fetching",B=j==="pending",T=j==="error",q=B&&A,D=w!==void 0,k={status:j,fetchStatus:v.fetchStatus,isPending:B,isSuccess:j==="success",isError:T,isInitialLoading:q,isLoading:q,data:w,dataUpdatedAt:v.dataUpdatedAt,error:N,errorUpdatedAt:R,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:a.isFetched(),isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:A,isRefetching:A&&!B,isLoadingError:T&&!D,isPaused:v.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:T&&D,isStale:yh(a,i),refetch:this.refetch,promise:_(this,bs),isEnabled:hn(i.enabled,a)!==!1};if(this.options.experimental_prefetchInRender){const W=k.data!==void 0,ee=k.status==="error"&&!W,F=fe=>{ee?fe.reject(k.error):W&&fe.resolve(k.data)},X=()=>{const fe=le(this,bs,k.promise=Hf());F(fe)},te=_(this,bs);switch(te.status){case"pending":a.queryHash===r.queryHash&&F(te);break;case"fulfilled":(ee||k.data!==te.value)&&X();break;case"rejected":(!ee||k.error!==te.reason)&&X();break}}return k}updateResult(){const a=_(this,Dt),i=this.createResult(_(this,Ue),this.options);if(le(this,ai,_(this,Ue).state),le(this,hl,this.options),_(this,ai).data!==void 0&&le(this,pl,_(this,Ue)),Dc(i,a))return;le(this,Dt,i);const r=()=>{if(!a)return!0;const{notifyOnChangeProps:u}=this.options,f=typeof u=="function"?u():u;if(f==="all"||!f&&!_(this,yl).size)return!0;const h=new Set(f??_(this,yl));return this.options.throwOnError&&h.add("error"),Object.keys(_(this,Dt)).some(y=>{const p=y;return _(this,Dt)[p]!==a[p]&&h.has(p)})};Ne(this,Qe,d0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ne(this,Qe,Yf).call(this)}},It=new WeakMap,Ue=new WeakMap,Gr=new WeakMap,Dt=new WeakMap,ai=new WeakMap,hl=new WeakMap,bs=new WeakMap,da=new WeakMap,Pr=new WeakMap,ml=new WeakMap,pl=new WeakMap,ii=new WeakMap,li=new WeakMap,fa=new WeakMap,yl=new WeakMap,Qe=new WeakSet,Ar=function(a){Ne(this,Qe,Zf).call(this);let i=_(this,Ue).fetch(this.options,a);return a!=null&&a.throwOnError||(i=i.catch(Ut)),i},Gf=function(){Ne(this,Qe,Kf).call(this);const a=ba(this.options.staleTime,_(this,Ue));if(zr.isServer()||_(this,Dt).isStale||!Lf(a))return;const r=s0(_(this,Dt).dataUpdatedAt,a)+1;le(this,ii,Ia.setTimeout(()=>{_(this,Dt).isStale||this.updateResult()},r))},Pf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,Ue)):this.options.refetchInterval)??!1},Vf=function(a){Ne(this,Qe,Xf).call(this),le(this,fa,a),!(zr.isServer()||hn(this.options.enabled,_(this,Ue))===!1||!Lf(_(this,fa))||_(this,fa)===0)&&le(this,li,Ia.setInterval(()=>{(this.options.refetchIntervalInBackground||fh.isFocused())&&Ne(this,Qe,Ar).call(this)},_(this,fa)))},Yf=function(){Ne(this,Qe,Gf).call(this),Ne(this,Qe,Vf).call(this,Ne(this,Qe,Pf).call(this))},Kf=function(){_(this,ii)!==void 0&&(Ia.clearTimeout(_(this,ii)),le(this,ii,void 0))},Xf=function(){_(this,li)!==void 0&&(Ia.clearInterval(_(this,li)),le(this,li,void 0))},Zf=function(){const a=_(this,It).getQueryCache().build(_(this,It),this.options);if(a===_(this,Ue))return;const i=_(this,Ue);le(this,Ue,a),le(this,Gr,a.state),this.hasListeners()&&(i==null||i.removeObserver(this),a.addObserver(this))},d0=function(a){yt.batch(()=>{a.listeners&&this.listeners.forEach(i=>{i(_(this,Dt))}),_(this,It).getQueryCache().notify({query:_(this,Ue),type:"observerResultsUpdated"})})},Jv);function wS(n,a){return hn(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&hn(a.retryOnMount,n)===!1)}function Lg(n,a){return wS(n,a)||n.state.data!==void 0&&Ff(n,a,a.refetchOnMount)}function Ff(n,a,i){if(hn(a.enabled,n)!==!1&&ba(a.staleTime,n)!=="static"){const r=typeof i=="function"?i(n):i;return r==="always"||r!==!1&&yh(n,a)}return!1}function Bg(n,a,i,r){return(n!==a||hn(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&yh(n,i)}function yh(n,a){return hn(a.enabled,n)!==!1&&n.isStaleByTime(ba(a.staleTime,n))}function NS(n,a){return!Dc(n.getCurrentResult(),a)}var Vr,Fn,At,ri,In,ia,$v,RS=($v=class extends o0{constructor(a){super();he(this,In);he(this,Vr);he(this,Fn);he(this,At);he(this,ri);le(this,Vr,a.client),this.mutationId=a.mutationId,le(this,At,a.mutationCache),le(this,Fn,[]),this.state=a.state||f0(),this.setOptions(a.options),this.scheduleGc()}setOptions(a){this.options=a,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(a){_(this,Fn).includes(a)||(_(this,Fn).push(a),this.clearGcTimeout(),_(this,At).notify({type:"observerAdded",mutation:this,observer:a}))}removeObserver(a){le(this,Fn,_(this,Fn).filter(i=>i!==a)),this.scheduleGc(),_(this,At).notify({type:"observerRemoved",mutation:this,observer:a})}optionalRemove(){_(this,Fn).length||(this.state.status==="pending"?this.scheduleGc():_(this,At).remove(this))}continue(){var a;return((a=_(this,ri))==null?void 0:a.continue())??this.execute(this.state.variables)}async execute(a){var h,y,p,m,x,v,b,w,N,R,j,O,A,B,T,q,D,z;const i=()=>{Ne(this,In,ia).call(this,{type:"continue"})},r={client:_(this,Vr),meta:this.options.meta,mutationKey:this.options.mutationKey};le(this,ri,r0({fn:()=>this.options.mutationFn?this.options.mutationFn(a,r):Promise.reject(new Error("No mutationFn found")),onFail:(k,Y)=>{Ne(this,In,ia).call(this,{type:"failed",failureCount:k,error:Y})},onPause:()=>{Ne(this,In,ia).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,At).canRun(this)}));const u=this.state.status==="pending",f=!_(this,ri).canStart();try{if(u)i();else{Ne(this,In,ia).call(this,{type:"pending",variables:a,isPaused:f}),_(this,At).config.onMutate&&await _(this,At).config.onMutate(a,this,r);const Y=await((y=(h=this.options).onMutate)==null?void 0:y.call(h,a,r));Y!==this.state.context&&Ne(this,In,ia).call(this,{type:"pending",context:Y,variables:a,isPaused:f})}const k=await _(this,ri).start();return await((m=(p=_(this,At).config).onSuccess)==null?void 0:m.call(p,k,a,this.state.context,this,r)),await((v=(x=this.options).onSuccess)==null?void 0:v.call(x,k,a,this.state.context,r)),await((w=(b=_(this,At).config).onSettled)==null?void 0:w.call(b,k,null,this.state.variables,this.state.context,this,r)),await((R=(N=this.options).onSettled)==null?void 0:R.call(N,k,null,a,this.state.context,r)),Ne(this,In,ia).call(this,{type:"success",data:k}),k}catch(k){try{await((O=(j=_(this,At).config).onError)==null?void 0:O.call(j,k,a,this.state.context,this,r))}catch(Y){Promise.reject(Y)}try{await((B=(A=this.options).onError)==null?void 0:B.call(A,k,a,this.state.context,r))}catch(Y){Promise.reject(Y)}try{await((q=(T=_(this,At).config).onSettled)==null?void 0:q.call(T,void 0,k,this.state.variables,this.state.context,this,r))}catch(Y){Promise.reject(Y)}try{await((z=(D=this.options).onSettled)==null?void 0:z.call(D,void 0,k,a,this.state.context,r))}catch(Y){Promise.reject(Y)}throw Ne(this,In,ia).call(this,{type:"error",error:k}),k}finally{_(this,At).runNext(this)}}},Vr=new WeakMap,Fn=new WeakMap,At=new WeakMap,ri=new WeakMap,In=new WeakSet,ia=function(a){const i=r=>{switch(a.type){case"failed":return{...r,failureCount:a.failureCount,failureReason:a.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:a.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:a.isPaused,status:"pending",variables:a.variables,submittedAt:Date.now()};case"success":return{...r,data:a.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:a.error,failureCount:r.failureCount+1,failureReason:a.error,isPaused:!1,status:"error"}}};this.state=i(this.state),yt.batch(()=>{_(this,Fn).forEach(r=>{r.onMutationUpdate(a)}),_(this,At).notify({mutation:this,type:"updated",action:a})})},$v);function f0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ss,Ln,Yr,Wv,CS=(Wv=class extends _l{constructor(a={}){super();he(this,Ss);he(this,Ln);he(this,Yr);this.config=a,le(this,Ss,new Set),le(this,Ln,new Map),le(this,Yr,0)}build(a,i,r){const u=new RS({client:a,mutationCache:this,mutationId:++mc(this,Yr)._,options:a.defaultMutationOptions(i),state:r});return this.add(u),u}add(a){_(this,Ss).add(a);const i=pc(a);if(typeof i=="string"){const r=_(this,Ln).get(i);r?r.push(a):_(this,Ln).set(i,[a])}this.notify({type:"added",mutation:a})}remove(a){if(_(this,Ss).delete(a)){const i=pc(a);if(typeof i=="string"){const r=_(this,Ln).get(i);if(r)if(r.length>1){const u=r.indexOf(a);u!==-1&&r.splice(u,1)}else r[0]===a&&_(this,Ln).delete(i)}}this.notify({type:"removed",mutation:a})}canRun(a){const i=pc(a);if(typeof i=="string"){const r=_(this,Ln).get(i),u=r==null?void 0:r.find(f=>f.state.status==="pending");return!u||u===a}else return!0}runNext(a){var r;const i=pc(a);if(typeof i=="string"){const u=(r=_(this,Ln).get(i))==null?void 0:r.find(f=>f!==a&&f.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){yt.batch(()=>{_(this,Ss).forEach(a=>{this.notify({type:"removed",mutation:a})}),_(this,Ss).clear(),_(this,Ln).clear()})}getAll(){return Array.from(_(this,Ss))}find(a){const i={exact:!0,...a};return this.getAll().find(r=>Ag(i,r))}findAll(a={}){return this.getAll().filter(i=>Ag(a,i))}notify(a){yt.batch(()=>{this.listeners.forEach(i=>{i(a)})})}resumePausedMutations(){const a=this.getAll().filter(i=>i.state.isPaused);return yt.batch(()=>Promise.all(a.map(i=>i.continue().catch(Ut))))}},Ss=new WeakMap,Ln=new WeakMap,Yr=new WeakMap,Wv);function pc(n){var a;return(a=n.options.scope)==null?void 0:a.id}var js,ha,Jt,ws,Cs,Cc,If,e0,_S=(e0=class extends _l{constructor(i,r){super();he(this,Cs);he(this,js);he(this,ha);he(this,Jt);he(this,ws);le(this,js,i),this.setOptions(r),this.bindMethods(),Ne(this,Cs,Cc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var u;const r=this.options;this.options=_(this,js).defaultMutationOptions(i),Dc(this.options,r)||_(this,js).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,Jt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&di(r.mutationKey)!==di(this.options.mutationKey)?this.reset():((u=_(this,Jt))==null?void 0:u.state.status)==="pending"&&_(this,Jt).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=_(this,Jt))==null||i.removeObserver(this)}onMutationUpdate(i){Ne(this,Cs,Cc).call(this),Ne(this,Cs,If).call(this,i)}getCurrentResult(){return _(this,ha)}reset(){var i;(i=_(this,Jt))==null||i.removeObserver(this),le(this,Jt,void 0),Ne(this,Cs,Cc).call(this),Ne(this,Cs,If).call(this)}mutate(i,r){var u;return le(this,ws,r),(u=_(this,Jt))==null||u.removeObserver(this),le(this,Jt,_(this,js).getMutationCache().build(_(this,js),this.options)),_(this,Jt).addObserver(this),_(this,Jt).execute(i)}},js=new WeakMap,ha=new WeakMap,Jt=new WeakMap,ws=new WeakMap,Cs=new WeakSet,Cc=function(){var r;const i=((r=_(this,Jt))==null?void 0:r.state)??f0();le(this,ha,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},If=function(i){yt.batch(()=>{var r,u,f,h,y,p,m,x;if(_(this,ws)&&this.hasListeners()){const v=_(this,ha).variables,b=_(this,ha).context,w={client:_(this,js),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(u=(r=_(this,ws)).onSuccess)==null||u.call(r,i.data,v,b,w)}catch(N){Promise.reject(N)}try{(h=(f=_(this,ws)).onSettled)==null||h.call(f,i.data,null,v,b,w)}catch(N){Promise.reject(N)}}else if((i==null?void 0:i.type)==="error"){try{(p=(y=_(this,ws)).onError)==null||p.call(y,i.error,v,b,w)}catch(N){Promise.reject(N)}try{(x=(m=_(this,ws)).onSettled)==null||x.call(m,void 0,i.error,v,b,w)}catch(N){Promise.reject(N)}}}this.listeners.forEach(v=>{v(_(this,ha))})})},e0),Jn,t0,TS=(t0=class extends _l{constructor(a={}){super();he(this,Jn);this.config=a,le(this,Jn,new Map)}build(a,i,r){const u=i.queryKey,f=i.queryHash??hh(u,i);let h=this.get(f);return h||(h=new SS({client:a,queryKey:u,queryHash:f,options:a.defaultQueryOptions(i),state:r,defaultOptions:a.getQueryDefaults(u)}),this.add(h)),h}add(a){_(this,Jn).has(a.queryHash)||(_(this,Jn).set(a.queryHash,a),this.notify({type:"added",query:a}))}remove(a){const i=_(this,Jn).get(a.queryHash);i&&(a.destroy(),i===a&&_(this,Jn).delete(a.queryHash),this.notify({type:"removed",query:a}))}clear(){yt.batch(()=>{this.getAll().forEach(a=>{this.remove(a)})})}get(a){return _(this,Jn).get(a)}getAll(){return[..._(this,Jn).values()]}find(a){const i={exact:!0,...a};return this.getAll().find(r=>Mg(i,r))}findAll(a={}){const i=this.getAll();return Object.keys(a).length>0?i.filter(r=>Mg(a,r)):i}notify(a){yt.batch(()=>{this.listeners.forEach(i=>{i(a)})})}onFocus(){yt.batch(()=>{this.getAll().forEach(a=>{a.onFocus()})})}onOnline(){yt.batch(()=>{this.getAll().forEach(a=>{a.onOnline()})})}},Jn=new WeakMap,t0),it,ma,pa,gl,vl,ya,xl,bl,n0,ES=(n0=class{constructor(n={}){he(this,it);he(this,ma);he(this,pa);he(this,gl);he(this,vl);he(this,ya);he(this,xl);he(this,bl);le(this,it,n.queryCache||new TS),le(this,ma,n.mutationCache||new CS),le(this,pa,n.defaultOptions||{}),le(this,gl,new Map),le(this,vl,new Map),le(this,ya,0)}mount(){mc(this,ya)._++,_(this,ya)===1&&(le(this,xl,fh.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,it).onFocus())})),le(this,bl,Uc.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,it).onOnline())})))}unmount(){var n,a;mc(this,ya)._--,_(this,ya)===0&&((n=_(this,xl))==null||n.call(this),le(this,xl,void 0),(a=_(this,bl))==null||a.call(this),le(this,bl,void 0))}isFetching(n){return _(this,it).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return _(this,ma).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const a=this.defaultQueryOptions({queryKey:n});return(i=_(this,it).get(a.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const a=this.defaultQueryOptions(n),i=_(this,it).build(this,a),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ba(a.staleTime,i))&&this.prefetchQuery(a),Promise.resolve(r))}getQueriesData(n){return _(this,it).findAll(n).map(({queryKey:a,state:i})=>{const r=i.data;return[a,r]})}setQueryData(n,a,i){const r=this.defaultQueryOptions({queryKey:n}),u=_(this,it).get(r.queryHash),f=u==null?void 0:u.state.data,h=cS(a,f);if(h!==void 0)return _(this,it).build(this,r).setData(h,{...i,manual:!0})}setQueriesData(n,a,i){return yt.batch(()=>_(this,it).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,a,i)]))}getQueryState(n){var i;const a=this.defaultQueryOptions({queryKey:n});return(i=_(this,it).get(a.queryHash))==null?void 0:i.state}removeQueries(n){const a=_(this,it);yt.batch(()=>{a.findAll(n).forEach(i=>{a.remove(i)})})}resetQueries(n,a){const i=_(this,it);return yt.batch(()=>(i.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},a)))}cancelQueries(n,a={}){const i={revert:!0,...a},r=yt.batch(()=>_(this,it).findAll(n).map(u=>u.cancel(i)));return Promise.all(r).then(Ut).catch(Ut)}invalidateQueries(n,a={}){return yt.batch(()=>(_(this,it).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},a)))}refetchQueries(n,a={}){const i={...a,cancelRefetch:a.cancelRefetch??!0},r=yt.batch(()=>_(this,it).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let f=u.fetch(void 0,i);return i.throwOnError||(f=f.catch(Ut)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(r).then(Ut)}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const i=_(this,it).build(this,a);return i.isStaleByTime(ba(a.staleTime,i))?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ut).catch(Ut)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ut).catch(Ut)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Uc.isOnline()?_(this,ma).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,it)}getMutationCache(){return _(this,ma)}getDefaultOptions(){return _(this,pa)}setDefaultOptions(n){le(this,pa,n)}setQueryDefaults(n,a){_(this,gl).set(di(n),{queryKey:n,defaultOptions:a})}getQueryDefaults(n){const a=[..._(this,gl).values()],i={};return a.forEach(r=>{Or(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,a){_(this,vl).set(di(n),{mutationKey:n,defaultOptions:a})}getMutationDefaults(n){const a=[..._(this,vl).values()],i={};return a.forEach(r=>{Or(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const a={..._(this,pa).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=hh(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===mh&&(a.enabled=!1),a}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{..._(this,pa).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){_(this,it).clear(),_(this,ma).clear()}},it=new WeakMap,ma=new WeakMap,pa=new WeakMap,gl=new WeakMap,vl=new WeakMap,ya=new WeakMap,xl=new WeakMap,bl=new WeakMap,n0),df={exports:{}},Se={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var qg;function MS(){if(qg)return Se;qg=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),b=Symbol.iterator;function w(E){return E===null||typeof E!="object"?null:(E=b&&E[b]||E["@@iterator"],typeof E=="function"?E:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,j={};function O(E,J,se){this.props=E,this.context=J,this.refs=j,this.updater=se||N}O.prototype.isReactComponent={},O.prototype.setState=function(E,J){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,J,"setState")},O.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function A(){}A.prototype=O.prototype;function B(E,J,se){this.props=E,this.context=J,this.refs=j,this.updater=se||N}var T=B.prototype=new A;T.constructor=B,R(T,O.prototype),T.isPureReactComponent=!0;var q=Array.isArray;function D(){}var z={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function Y(E,J,se){var ae=se.ref;return{$$typeof:n,type:E,key:J,ref:ae!==void 0?ae:null,props:se}}function W(E,J){return Y(E.type,J,E.props)}function ee(E){return typeof E=="object"&&E!==null&&E.$$typeof===n}function F(E){var J={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(se){return J[se]})}var X=/\/+/g;function te(E,J){return typeof E=="object"&&E!==null&&E.key!=null?F(""+E.key):J.toString(36)}function fe(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(D,D):(E.status="pending",E.then(function(J){E.status==="pending"&&(E.status="fulfilled",E.value=J)},function(J){E.status==="pending"&&(E.status="rejected",E.reason=J)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function L(E,J,se,ae,ie){var me=typeof E;(me==="undefined"||me==="boolean")&&(E=null);var _e=!1;if(E===null)_e=!0;else switch(me){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(E.$$typeof){case n:case a:_e=!0;break;case x:return _e=E._init,L(_e(E._payload),J,se,ae,ie)}}if(_e)return ie=ie(E),_e=ae===""?"."+te(E,0):ae,q(ie)?(se="",_e!=null&&(se=_e.replace(X,"$&/")+"/"),L(ie,J,se,"",function(vn){return vn})):ie!=null&&(ee(ie)&&(ie=W(ie,se+(ie.key==null||E&&E.key===ie.key?"":(""+ie.key).replace(X,"$&/")+"/")+_e)),J.push(ie)),1;_e=0;var Ve=ae===""?".":ae+":";if(q(E))for(var be=0;be<E.length;be++)ae=E[be],me=Ve+te(ae,be),_e+=L(ae,J,se,me,ie);else if(be=w(E),typeof be=="function")for(E=be.call(E),be=0;!(ae=E.next()).done;)ae=ae.value,me=Ve+te(ae,be++),_e+=L(ae,J,se,me,ie);else if(me==="object"){if(typeof E.then=="function")return L(fe(E),J,se,ae,ie);throw J=String(E),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return _e}function K(E,J,se){if(E==null)return E;var ae=[],ie=0;return L(E,ae,"","",function(me){return J.call(se,me,ie++)}),ae}function ue(E){if(E._status===-1){var J=E._result;J=J(),J.then(function(se){(E._status===0||E._status===-1)&&(E._status=1,E._result=se)},function(se){(E._status===0||E._status===-1)&&(E._status=2,E._result=se)}),E._status===-1&&(E._status=0,E._result=J)}if(E._status===1)return E._result.default;throw E._result}var ze=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof E=="object"&&E!==null&&typeof E.message=="string"?String(E.message):String(E),error:E});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},ne={map:K,forEach:function(E,J,se){K(E,function(){J.apply(this,arguments)},se)},count:function(E){var J=0;return K(E,function(){J++}),J},toArray:function(E){return K(E,function(J){return J})||[]},only:function(E){if(!ee(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return Se.Activity=v,Se.Children=ne,Se.Component=O,Se.Fragment=i,Se.Profiler=u,Se.PureComponent=B,Se.StrictMode=r,Se.Suspense=p,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Se.__COMPILER_RUNTIME={__proto__:null,c:function(E){return z.H.useMemoCache(E)}},Se.cache=function(E){return function(){return E.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(E,J,se){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var ae=R({},E.props),ie=E.key;if(J!=null)for(me in J.key!==void 0&&(ie=""+J.key),J)!k.call(J,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&J.ref===void 0||(ae[me]=J[me]);var me=arguments.length-2;if(me===1)ae.children=se;else if(1<me){for(var _e=Array(me),Ve=0;Ve<me;Ve++)_e[Ve]=arguments[Ve+2];ae.children=_e}return Y(E.type,ie,ae)},Se.createContext=function(E){return E={$$typeof:h,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:f,_context:E},E},Se.createElement=function(E,J,se){var ae,ie={},me=null;if(J!=null)for(ae in J.key!==void 0&&(me=""+J.key),J)k.call(J,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(ie[ae]=J[ae]);var _e=arguments.length-2;if(_e===1)ie.children=se;else if(1<_e){for(var Ve=Array(_e),be=0;be<_e;be++)Ve[be]=arguments[be+2];ie.children=Ve}if(E&&E.defaultProps)for(ae in _e=E.defaultProps,_e)ie[ae]===void 0&&(ie[ae]=_e[ae]);return Y(E,me,ie)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(E){return{$$typeof:y,render:E}},Se.isValidElement=ee,Se.lazy=function(E){return{$$typeof:x,_payload:{_status:-1,_result:E},_init:ue}},Se.memo=function(E,J){return{$$typeof:m,type:E,compare:J===void 0?null:J}},Se.startTransition=function(E){var J=z.T,se={};z.T=se;try{var ae=E(),ie=z.S;ie!==null&&ie(se,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(D,ze)}catch(me){ze(me)}finally{J!==null&&se.types!==null&&(J.types=se.types),z.T=J}},Se.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Se.use=function(E){return z.H.use(E)},Se.useActionState=function(E,J,se){return z.H.useActionState(E,J,se)},Se.useCallback=function(E,J){return z.H.useCallback(E,J)},Se.useContext=function(E){return z.H.useContext(E)},Se.useDebugValue=function(){},Se.useDeferredValue=function(E,J){return z.H.useDeferredValue(E,J)},Se.useEffect=function(E,J){return z.H.useEffect(E,J)},Se.useEffectEvent=function(E){return z.H.useEffectEvent(E)},Se.useId=function(){return z.H.useId()},Se.useImperativeHandle=function(E,J,se){return z.H.useImperativeHandle(E,J,se)},Se.useInsertionEffect=function(E,J){return z.H.useInsertionEffect(E,J)},Se.useLayoutEffect=function(E,J){return z.H.useLayoutEffect(E,J)},Se.useMemo=function(E,J){return z.H.useMemo(E,J)},Se.useOptimistic=function(E,J){return z.H.useOptimistic(E,J)},Se.useReducer=function(E,J,se){return z.H.useReducer(E,J,se)},Se.useRef=function(E){return z.H.useRef(E)},Se.useState=function(E){return z.H.useState(E)},Se.useSyncExternalStore=function(E,J,se){return z.H.useSyncExternalStore(E,J,se)},Se.useTransition=function(){return z.H.useTransition()},Se.version="19.2.6",Se}var Hg;function Kr(){return Hg||(Hg=1,df.exports=MS()),df.exports}var Q=Kr();const Dr=tS(Q);var h0=Q.createContext(void 0),Hn=n=>{const a=Q.useContext(h0);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},AS=({client:n,children:a})=>(Q.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),o.jsx(h0.Provider,{value:n,children:a})),m0=Q.createContext(!1),kS=()=>Q.useContext(m0);m0.Provider;function OS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var zS=Q.createContext(OS()),DS=()=>Q.useContext(zS),US=(n,a,i)=>{const r=i!=null&&i.state.error&&typeof n.throwOnError=="function"?ph(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||r)&&(a.isReset()||(n.retryOnMount=!1))},LS=n=>{Q.useEffect(()=>{n.clearReset()},[n])},BS=({result:n,errorResetBoundary:a,throwOnError:i,query:r,suspense:u})=>n.isError&&!a.isReset()&&!n.isFetching&&r&&(u&&n.data===void 0||ph(i,[n.error,r])),qS=n=>{if(n.suspense){const i=u=>u==="static"?u:Math.max(u??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...u)=>i(r(...u)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},HS=(n,a)=>n.isLoading&&n.isFetching&&!a,QS=(n,a)=>(n==null?void 0:n.suspense)&&a.isPending,Qg=(n,a,i)=>a.fetchOptimistic(n).catch(()=>{i.clearReset()});function GS(n,a,i){var w,N,R,j;const r=kS(),u=DS(),f=Hn(),h=f.defaultQueryOptions(n);(N=(w=f.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||N.call(w,h);const y=f.getQueryCache().get(h.queryHash),p=n.subscribed!==!1;h._optimisticResults=r?"isRestoring":p?"optimistic":void 0,qS(h),US(h,u,y),LS(u);const m=!f.getQueryCache().get(h.queryHash),[x]=Q.useState(()=>new a(f,h)),v=x.getOptimisticResult(h),b=!r&&p;if(Q.useSyncExternalStore(Q.useCallback(O=>{const A=b?x.subscribe(yt.batchCalls(O)):Ut;return x.updateResult(),A},[x,b]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),Q.useEffect(()=>{x.setOptions(h)},[h,x]),QS(h,v))throw Qg(h,x,u);if(BS({result:v,errorResetBoundary:u,throwOnError:h.throwOnError,query:y,suspense:h.suspense}))throw v.error;if((j=(R=f.getDefaultOptions().queries)==null?void 0:R._experimental_afterQuery)==null||j.call(R,h,v),h.experimental_prefetchInRender&&!zr.isServer()&&HS(v,r)){const O=m?Qg(h,x,u):y==null?void 0:y.promise;O==null||O.catch(Ut).finally(()=>{x.updateResult()})}return h.notifyOnChangeProps?v:x.trackResult(v)}function We(n,a){return GS(n,jS)}function Bt(n,a){const i=Hn(),[r]=Q.useState(()=>new _S(i,n));Q.useEffect(()=>{r.setOptions(n)},[r,n]);const u=Q.useSyncExternalStore(Q.useCallback(h=>r.subscribe(yt.batchCalls(h)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=Q.useCallback((h,y)=>{r.mutate(h,y).catch(Ut)},[r]);if(u.error&&ph(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}var kr=typeof window<"u"?Q.useLayoutEffect:Q.useEffect;function ff(n){const a=Q.useRef({value:n,prev:null}),i=a.current.value;return n!==i&&(a.current={value:n,prev:i}),a.current.prev}function PS(n,a,i={},r={}){Q.useEffect(()=>{if(!n.current||r.disabled||typeof IntersectionObserver!="function")return;const u=new IntersectionObserver(([f])=>{a(f)},i);return u.observe(n.current),()=>{u.disconnect()}},[a,i,r.disabled,n])}function VS(n){const a=Q.useRef(null);return Q.useImperativeHandle(n,()=>a.current,[]),a}const p0=!1;function Ur(n){return n[n.length-1]}function YS(n){return typeof n=="function"}function Ja(n,a){return YS(n)?n(a):n}const y0=Object.prototype.hasOwnProperty,Gg=Object.prototype.propertyIsEnumerable;function g0(n){for(const a in n)if(y0.call(n,a))return!0;return!1}const KS=()=>Object.create(null),Ya=(n,a)=>ga(n,a,KS);function ga(n,a,i=()=>({}),r=0){if(n===a)return n;if(r>500)return a;const u=a,f=Yg(n)&&Yg(u);if(!f&&!(Lc(n)&&Lc(u)))return u;const h=f?n:Pg(n);if(!h)return u;const y=f?u:Pg(u);if(!y)return u;const p=h.length,m=y.length,x=f?new Array(m):i();let v=0;for(let b=0;b<m;b++){const w=f?b:y[b],N=n[w],R=u[w];if(N===R){x[w]=N,(f?b<p:y0.call(n,w))&&v++;continue}if(N===null||R===null||typeof N!="object"||typeof R!="object"){x[w]=R;continue}const j=ga(N,R,i,r+1);x[w]=j,j===N&&v++}return p===m&&v===p?n:x}function Pg(n){const a=Object.getOwnPropertyNames(n);for(const u of a)if(!Gg.call(n,u))return!1;const i=Object.getOwnPropertySymbols(n);if(i.length===0)return a;const r=a;for(const u of i){if(!Gg.call(n,u))return!1;r.push(u)}return r}function Lc(n){if(!Vg(n))return!1;const a=n.constructor;if(typeof a>"u")return!0;const i=a.prototype;return!(!Vg(i)||!i.hasOwnProperty("isPrototypeOf"))}function Vg(n){return Object.prototype.toString.call(n)==="[object Object]"}function Yg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function oi(n,a,i){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(Array.isArray(n)&&Array.isArray(a)){if(n.length!==a.length)return!1;for(let r=0,u=n.length;r<u;r++)if(!oi(n[r],a[r],i))return!1;return!0}if(Lc(n)&&Lc(a)){const r=(i==null?void 0:i.ignoreUndefined)??!0;if(i!=null&&i.partial){for(const h in a)if((!r||a[h]!==void 0)&&!oi(n[h],a[h],i))return!1;return!0}let u=0;if(!r)u=Object.keys(n).length;else for(const h in n)n[h]!==void 0&&u++;let f=0;for(const h in a)if((!r||a[h]!==void 0)&&(f++,f>u||!oi(n[h],a[h],i)))return!1;return u===f}return!1}function Sl(n){let a,i;const r=new Promise((u,f)=>{a=u,i=f});return r.status="pending",r.resolve=u=>{r.status="resolved",r.value=u,a(u),n==null||n(u)},r.reject=u=>{r.status="rejected",i(u)},r}function Lr(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function XS(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function Kg(n){let a;try{a=decodeURI(n)}catch{a=n.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return XS(a)}const ZS=["http:","https:","mailto:","tel:"];function Bc(n,a){if(!n)return!1;try{const i=new URL(n);return!a.has(i.protocol)}catch{return!1}}function wr(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const a=/%25|%5C/gi;let i=0,r="",u;for(;(u=a.exec(n))!==null;)r+=Kg(n.slice(i,u.index))+u[0],i=a.lastIndex;r=r+Kg(i?n.slice(i):n);let f=!1;return r.startsWith("//")&&(f=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:f}}function FS(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function IS(n,a){if(n===a)return!0;if(n.length!==a.length)return!1;for(let i=0;i<n.length;i++)if(n[i]!==a[i])return!1;return!0}function Rs(){throw new Error("Invariant failed")}function Br(n){const a=new Map;let i,r;const u=f=>{f.next&&(f.prev?(f.prev.next=f.next,f.next.prev=f.prev,f.next=void 0,r&&(r.next=f,f.prev=r)):(f.next.prev=void 0,i=f.next,f.next=void 0,r&&(f.prev=r,r.next=f)),r=f)};return{get(f){const h=a.get(f);if(h)return u(h),h.value},set(f,h){if(a.size>=n&&i){const p=i;a.delete(p.key),p.next&&(i=p.next,p.next.prev=void 0),p===r&&(r=void 0)}const y=a.get(f);if(y)y.value=h,u(y);else{const p={key:f,value:h,prev:r};r&&(r.next=p),r=p,i||(i=p),a.set(f,p)}},clear(){a.clear(),i=void 0,r=void 0}}}const va=4,v0=5;function JS(n){const a=n.indexOf("{");if(a===-1)return null;const i=n.indexOf("}",a);return i===-1||a+1>=n.length?null:[a,i]}function x0(n,a,i=new Uint16Array(6)){const r=n.indexOf("/",a),u=r===-1?n.length:r,f=n.substring(a,u);if(!f||!f.includes("$"))return i[0]=0,i[1]=a,i[2]=a,i[3]=u,i[4]=u,i[5]=u,i;if(f==="$"){const y=n.length;return i[0]=2,i[1]=a,i[2]=a,i[3]=y,i[4]=y,i[5]=y,i}if(f.charCodeAt(0)===36)return i[0]=1,i[1]=a,i[2]=a+1,i[3]=u,i[4]=u,i[5]=u,i;const h=JS(f);if(h){const[y,p]=h,m=f.charCodeAt(y+1);if(m===45){if(y+2<f.length&&f.charCodeAt(y+2)===36){const x=y+3,v=p;if(x<v)return i[0]=3,i[1]=a+y,i[2]=a+x,i[3]=a+v,i[4]=a+p+1,i[5]=u,i}}else if(m===36){const x=y+1,v=y+2;return v===p?(i[0]=2,i[1]=a+y,i[2]=a+x,i[3]=a+v,i[4]=a+p+1,i[5]=n.length,i):(i[0]=1,i[1]=a+y,i[2]=a+v,i[3]=a+p,i[4]=a+p+1,i[5]=u,i)}}return i[0]=0,i[1]=a,i[2]=a,i[3]=u,i[4]=u,i[5]=u,i}function Yc(n,a,i,r,u,f,h){var p,m,x,v,b,w,N,R,j,O;h==null||h(i);let y=r;{const A=i.fullPath??i.from,B=A.length,T=((p=i.options)==null?void 0:p.caseSensitive)??n,q=((x=(m=i.options)==null?void 0:m.params)==null?void 0:x.parse)??((v=i.options)==null?void 0:v.parseParams);for(;y<B;){const z=x0(A,y,a);let k;const Y=y,W=z[5];switch(y=W+1,f++,z[0]){case 0:{const ee=A.substring(z[2],z[3]);if(T){const F=(b=u.static)==null?void 0:b.get(ee);if(F)k=F;else{u.static??(u.static=new Map);const X=$a(i.fullPath??i.from);X.parent=u,X.depth=f,k=X,u.static.set(ee,X)}}else{const F=ee.toLowerCase(),X=(w=u.staticInsensitive)==null?void 0:w.get(F);if(X)k=X;else{u.staticInsensitive??(u.staticInsensitive=new Map);const te=$a(i.fullPath??i.from);te.parent=u,te.depth=f,k=te,u.staticInsensitive.set(F,te)}}break}case 1:{const ee=A.substring(Y,z[1]),F=A.substring(z[4],W),X=T&&!!(ee||F),te=ee?X?ee:ee.toLowerCase():void 0,fe=F?X?F:F.toLowerCase():void 0,L=!q&&((N=u.dynamic)==null?void 0:N.find(K=>!K.parse&&K.caseSensitive===X&&K.prefix===te&&K.suffix===fe));if(L)k=L;else{const K=mf(1,i.fullPath??i.from,X,te,fe);k=K,K.depth=f,K.parent=u,u.dynamic??(u.dynamic=[]),u.dynamic.push(K)}break}case 3:{const ee=A.substring(Y,z[1]),F=A.substring(z[4],W),X=T&&!!(ee||F),te=ee?X?ee:ee.toLowerCase():void 0,fe=F?X?F:F.toLowerCase():void 0,L=!q&&((R=u.optional)==null?void 0:R.find(K=>!K.parse&&K.caseSensitive===X&&K.prefix===te&&K.suffix===fe));if(L)k=L;else{const K=mf(3,i.fullPath??i.from,X,te,fe);k=K,K.parent=u,K.depth=f,u.optional??(u.optional=[]),u.optional.push(K)}break}case 2:{const ee=A.substring(Y,z[1]),F=A.substring(z[4],W),X=T&&!!(ee||F),te=ee?X?ee:ee.toLowerCase():void 0,fe=F?X?F:F.toLowerCase():void 0,L=mf(2,i.fullPath??i.from,X,te,fe);k=L,L.parent=u,L.depth=f,u.wildcard??(u.wildcard=[]),u.wildcard.push(L)}}u=k}if(q&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const z=$a(i.fullPath??i.from);z.kind=v0,z.parent=u,f++,z.depth=f,u.pathless??(u.pathless=[]),u.pathless.push(z),u=z}const D=(i.path||!i.children)&&!i.isRoot;if(D&&A.endsWith("/")){const z=$a(i.fullPath??i.from);z.kind=va,z.parent=u,f++,z.depth=f,u.index=z,u=z}u.parse=q??null,u.priority=((O=(j=i.options)==null?void 0:j.params)==null?void 0:O.priority)??0,D&&!u.route&&(u.route=i,u.fullPath=i.fullPath??i.from)}if(i.children)for(const A of i.children)Yc(n,a,A,y,u,f,h)}function hf(n,a){if(n.parse&&!a.parse)return-1;if(!n.parse&&a.parse)return 1;if(n.parse&&a.parse&&(n.priority||a.priority))return a.priority-n.priority;if(n.prefix&&a.prefix&&n.prefix!==a.prefix){if(n.prefix.startsWith(a.prefix))return-1;if(a.prefix.startsWith(n.prefix))return 1}if(n.suffix&&a.suffix&&n.suffix!==a.suffix){if(n.suffix.endsWith(a.suffix))return-1;if(a.suffix.endsWith(n.suffix))return 1}return n.prefix&&!a.prefix?-1:!n.prefix&&a.prefix?1:n.suffix&&!a.suffix?-1:!n.suffix&&a.suffix?1:n.caseSensitive&&!a.caseSensitive?-1:!n.caseSensitive&&a.caseSensitive?1:0}function ra(n){var a,i,r;if(n.pathless)for(const u of n.pathless)ra(u);if(n.static)for(const u of n.static.values())ra(u);if(n.staticInsensitive)for(const u of n.staticInsensitive.values())ra(u);if((a=n.dynamic)!=null&&a.length){n.dynamic.sort(hf);for(const u of n.dynamic)ra(u)}if((i=n.optional)!=null&&i.length){n.optional.sort(hf);for(const u of n.optional)ra(u)}if((r=n.wildcard)!=null&&r.length){n.wildcard.sort(hf);for(const u of n.wildcard)ra(u)}}function $a(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0}}function mf(n,a,i,r,u){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:a,parent:null,parse:null,priority:0,caseSensitive:i,prefix:r,suffix:u}}function $S(n,a){const i=$a("/"),r=new Uint16Array(6);for(const u of n)Yc(!1,r,u,1,i,0);ra(i),a.masksTree=i,a.flatCache=Br(1e3)}function WS(n,a){n||(n="/");const i=a.flatCache.get(n);if(i)return i;const r=gh(n,a.masksTree);return a.flatCache.set(n,r),r}function ej(n,a,i,r,u){n||(n="/"),r||(r="/");const f=a?`case\0${n}`:n;let h=u.singleCache.get(f);return h||(h=$a("/"),Yc(a,new Uint16Array(6),{from:n},1,h,0),u.singleCache.set(f,h)),gh(r,h,i)}function tj(n,a,i=!1){const r=i?n:`nofuzz\0${n}`,u=a.matchCache.get(r);if(u!==void 0)return u;n||(n="/");let f;try{f=gh(n,a.segmentTree,i)}catch(h){if(h instanceof URIError)f=null;else throw h}return f&&(f.branch=S0(f.route)),a.matchCache.set(r,f),f}function nj(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function sj(n,a=!1,i){const r=$a(n.fullPath),u=new Uint16Array(6),f={},h={};let y=0;return Yc(a,u,n,1,r,0,p=>{if(i==null||i(p,y),p.id in f&&Rs(),f[p.id]=p,y!==0&&p.path){const m=nj(p.fullPath);(!h[m]||p.fullPath.endsWith("/"))&&(h[m]=p)}y++}),ra(r),{processedTree:{segmentTree:r,singleCache:Br(1e3),matchCache:Br(1e3),flatCache:null,masksTree:null},routesById:f,routesByPath:h}}function gh(n,a,i=!1){const r=n.split("/"),u=ij(n,r,a,i);if(!u)return null;const[f]=b0(n,r,u);return{route:u.node.route,rawParams:f}}function b0(n,a,i){var x,v,b,w,N,R,j,O,A,B;const r=aj(i.node);let u=null;const f=Object.create(null);let h=((x=i.extract)==null?void 0:x.part)??0,y=((v=i.extract)==null?void 0:v.node)??0,p=((b=i.extract)==null?void 0:b.path)??0,m=((w=i.extract)==null?void 0:w.segment)??0;for(;y<r.length;h++,y++,p++,m++){const T=r[y];if(T.kind===va)break;if(T.kind===v0){m--,h--,p--;continue}const q=a[h],D=p;if(q&&(p+=q.length),T.kind===1){u??(u=i.node.fullPath.split("/"));const z=u[m],k=((N=T.prefix)==null?void 0:N.length)??0;if(z.charCodeAt(k)===123){const Y=((R=T.suffix)==null?void 0:R.length)??0,W=z.substring(k+2,z.length-Y-1),ee=q.substring(k,q.length-Y);f[W]=decodeURIComponent(ee)}else{const Y=z.substring(1);f[Y]=decodeURIComponent(q)}}else if(T.kind===3){if(i.skipped&1<<y){h--,p=D-1;continue}u??(u=i.node.fullPath.split("/"));const z=u[m],k=((j=T.prefix)==null?void 0:j.length)??0,Y=((O=T.suffix)==null?void 0:O.length)??0,W=z.substring(k+3,z.length-Y-1),ee=T.suffix||T.prefix?q.substring(k,q.length-Y):q;ee&&(f[W]=decodeURIComponent(ee))}else if(T.kind===2){const z=T,k=n.substring(D+(((A=z.prefix)==null?void 0:A.length)??0),n.length-(((B=z.suffix)==null?void 0:B.length)??0)),Y=decodeURIComponent(k);f["*"]=Y,f._splat=Y;break}}return i.rawParams&&Object.assign(f,i.rawParams),[f,{part:h,node:y,path:p,segment:m}]}function S0(n){const a=[n];for(;n.parentRoute;)n=n.parentRoute,a.push(n);return a.reverse(),a}function aj(n){const a=Array(n.depth+1);do a[n.depth]=n,n=n.parent;while(n);return a}function ij(n,a,i,r){if(n==="/"&&i.index)return{node:i.index,skipped:0};const u=!Ur(a),f=u&&n!=="/",h=a.length-(u?1:0),y=[{node:i,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;y.length;){const x=y.pop(),{node:v,index:b,skipped:w,depth:N,statics:R,dynamics:j,optionals:O}=x;let{extract:A,rawParams:B}=x;if(v.kind===2&&v.route&&!gc(m,x))continue;if(v.parse){if(!Xg(n,a,x))continue;B=x.rawParams,A=x.extract}r&&v.route&&v.kind!==va&&gc(p,x)&&(p=x);const T=b===h;if(T&&(v.route&&(!f||v.kind===va||v.kind===2)&&gc(m,x)&&(m=x),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const q=T?void 0:a[b];let D;if(T&&v.index){const z={node:v.index,index:b,skipped:w,depth:N+1,statics:R,dynamics:j,optionals:O,extract:A,rawParams:B};let k=!0;if(v.index.parse&&(Xg(n,a,z)||(k=!1)),k){if(!j&&!O&&!w&&lj(R,h))return z;gc(m,z)&&(m=z)}}if(v.wildcard)for(let z=v.wildcard.length-1;z>=0;z--){const k=v.wildcard[z],{prefix:Y,suffix:W}=k;if(!(Y&&(T||!(k.caseSensitive?q:D??(D=q.toLowerCase())).startsWith(Y)))){if(W){if(T)continue;const ee=a.slice(b).join("/").slice(-W.length);if((k.caseSensitive?ee:ee.toLowerCase())!==W)continue}y.push({node:k,index:h,skipped:w,depth:N+1,statics:R,dynamics:j,optionals:O,extract:A,rawParams:B})}}if(v.optional){const z=w|1<<N,k=N+1;for(let Y=v.optional.length-1;Y>=0;Y--){const W=v.optional[Y];y.push({node:W,index:b,skipped:z,depth:k,statics:R,dynamics:j,optionals:O,extract:A,rawParams:B})}if(!T)for(let Y=v.optional.length-1;Y>=0;Y--){const W=v.optional[Y],{prefix:ee,suffix:F}=W;if(ee||F){const X=W.caseSensitive?q:D??(D=q.toLowerCase());if(ee&&!X.startsWith(ee)||F&&!X.endsWith(F))continue}y.push({node:W,index:b+1,skipped:w,depth:k,statics:R,dynamics:j,optionals:O+yc(h,b),extract:A,rawParams:B})}}if(!T&&v.dynamic&&q)for(let z=v.dynamic.length-1;z>=0;z--){const k=v.dynamic[z],{prefix:Y,suffix:W}=k;if(Y||W){const ee=k.caseSensitive?q:D??(D=q.toLowerCase());if(Y&&!ee.startsWith(Y)||W&&!ee.endsWith(W))continue}y.push({node:k,index:b+1,skipped:w,depth:N+1,statics:R,dynamics:j+yc(h,b),optionals:O,extract:A,rawParams:B})}if(!T&&v.staticInsensitive){const z=v.staticInsensitive.get(D??(D=q.toLowerCase()));z&&y.push({node:z,index:b+1,skipped:w,depth:N+1,statics:R+yc(h,b),dynamics:j,optionals:O,extract:A,rawParams:B})}if(!T&&v.static){const z=v.static.get(q);z&&y.push({node:z,index:b+1,skipped:w,depth:N+1,statics:R+yc(h,b),dynamics:j,optionals:O,extract:A,rawParams:B})}if(v.pathless){const z=N+1;for(let k=v.pathless.length-1;k>=0;k--){const Y=v.pathless[k];y.push({node:Y,index:b,skipped:w,depth:z,statics:R,dynamics:j,optionals:O,extract:A,rawParams:B})}}}if(m)return m;if(r&&p){let x=p.index;for(let b=0;b<p.index;b++)x+=a[b].length;const v=x===n.length?"/":n.slice(x);return p.rawParams??(p.rawParams=Object.create(null)),p.rawParams["**"]=decodeURIComponent(v),p}return null}function yc(n,a){return 2**(n-a-1)}function lj(n,a){return n===2**(a-1)-1}function Xg(n,a,i){let r,u;try{[r,u]=b0(n,a,i)}catch{return null}if(i.rawParams=r,i.extract=u,!i.node.parse)return!0;try{if(i.node.parse(r)===!1)return null}catch{}return!0}function gc(n,a){return n?a.statics>n.statics||a.statics===n.statics&&(a.dynamics>n.dynamics||a.dynamics===n.dynamics&&(a.optionals>n.optionals||a.optionals===n.optionals&&((a.node.kind===va)>(n.node.kind===va)||a.node.kind===va==(n.node.kind===va)&&a.depth>n.depth))):!0}function _c(n){return vh(n.filter(a=>a!==void 0).join("/"))}function vh(n){return n.replace(/\/{2,}/g,"/")}function j0(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function Ns(n){const a=n.length;return a>1&&n[a-1]==="/"?n.replace(/\/{1,}$/,""):n}function w0(n){return Ns(j0(n))}function qc(n,a){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${a}/`?n.slice(0,-1):n}function rj(n,a,i){return qc(n,i)===qc(a,i)}function oj({base:n,to:a,trailingSlash:i="never",cache:r}){const u=a.startsWith("/"),f=!u&&a===".";let h;if(r){h=u?a:f?n:n+"\0"+a;const m=r.get(h);if(m)return m}let y;if(f)y=n.split("/");else if(u)y=a.split("/");else{for(y=n.split("/");y.length>1&&Ur(y)==="";)y.pop();const m=a.split("/");for(let x=0,v=m.length;x<v;x++){const b=m[x];b===""?x?x===v-1&&y.push(b):y=[b]:b===".."?y.pop():b==="."||y.push(b)}}y.length>1&&(Ur(y)===""?i==="never"&&y.pop():i==="always"&&y.push(""));const p=vh(y.join("/"))||"/";return h&&r&&r.set(h,p),p}function cj(n){const a=new Map(n.map(u=>[encodeURIComponent(u),u])),i=Array.from(a.keys()).map(u=>u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(i,"g");return u=>u.replace(r,f=>a.get(f)??f)}function pf(n,a,i){const r=a[n];return typeof r!="string"?r:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(u=>Fg(u,i)).join("/"):Fg(r,i)}function Zg({path:n,params:a,decoder:i,...r}){let u=!1;const f=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:f,isMissingParams:u};if(!n.includes("$"))return{interpolatedPath:n,usedParams:f,isMissingParams:u};const h=n.length;let y=0,p,m="";for(;y<h;){const x=y;p=x0(n,x,p);const v=p[5];if(y=v+1,x===v)continue;const b=p[0];if(b===0){m+="/"+n.substring(x,v);continue}if(b===2){const w=a._splat;f._splat=w,f["*"]=w;const N=n.substring(x,p[1]),R=n.substring(p[4],v);if(!w){u=!0,(N||R)&&(m+="/"+N+R);continue}const j=pf("_splat",a,i);m+="/"+N+j+R;continue}if(b===1){const w=n.substring(p[2],p[3]);!u&&!(w in a)&&(u=!0),f[w]=a[w];const N=n.substring(x,p[1]),R=n.substring(p[4],v),j=pf(w,a,i)??"undefined";m+="/"+N+j+R;continue}if(b===3){const w=n.substring(p[2],p[3]),N=a[w];if(N==null)continue;f[w]=N;const R=n.substring(x,p[1]),j=n.substring(p[4],v),O=pf(w,a,i)??"";m+="/"+R+O+j;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:f,interpolatedPath:m||"/",isMissingParams:u}}function Fg(n,a){const i=encodeURIComponent(n);return(a==null?void 0:a(i))??i}function kt(n){return(n==null?void 0:n.isNotFound)===!0}function uj(n,a=String){const i=new URLSearchParams;for(const r in n){const u=n[r];u!==void 0&&i.set(r,a(u))}return i.toString()}function yf(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function dj(n){const a=new URLSearchParams(n),i=Object.create(null);for(const[r,u]of a.entries()){const f=i[r];f==null?i[r]=yf(u):Array.isArray(f)?f.push(yf(u)):i[r]=[f,yf(u)]}return i}const fj=mj(JSON.parse),hj=pj(JSON.stringify,JSON.parse);function mj(n){return a=>{a[0]==="?"&&(a=a.substring(1));const i=dj(a);for(const r in i){const u=i[r];if(typeof u=="string")try{i[r]=n(u)}catch{}}return i}}function pj(n,a){const i=typeof a=="function";function r(u){if(typeof u=="object"&&u!==null)try{return n(u)}catch{}else if(i&&typeof u=="string")try{return a(u),n(u)}catch{}return u}return u=>{const f=uj(u,r);return f?`?${f}`:""}}const ci="__root__";function yj(n){if(n.statusCode=n.statusCode||n.code||307,!n._builtLocation&&!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const a=new Headers(n.headers);n.href&&a.get("Location")===null&&a.set("Location",n.href);const i=new Response(null,{status:n.statusCode,headers:a});if(i.options=n,n.throw)throw i;return i}function $t(n){return n instanceof Response&&!!n.options}const Jf=n=>{var a;if(!n.rendered)return n.rendered=!0,(a=n.onReady)==null?void 0:a.call(n)},gj=n=>n.stores.matchesId.get().some(a=>{var i;return(i=n.stores.matchStores.get(a))==null?void 0:i.get()._forcePending}),Kc=(n,a)=>!!(n.preload&&!n.router.stores.matchStores.has(a)),ui=(n,a,i=!0)=>{const r={...n.router.options.context??{}},u=i?a:a-1;for(let f=0;f<=u;f++){const h=n.matches[f];if(!h)continue;const y=n.router.getMatch(h.id);y&&Object.assign(r,y.__routeContext,y.__beforeLoadContext)}return r},Ig=(n,a)=>{if(!n.matches.length)return;const i=a.routeId,r=n.matches.findIndex(h=>h.routeId===n.router.routeTree.id),u=r>=0?r:0;let f=i?n.matches.findIndex(h=>h.routeId===i):n.firstBadMatchIndex??n.matches.length-1;f<0&&(f=u);for(let h=f;h>=0;h--){const y=n.matches[h];if(n.router.looseRoutesById[y.routeId].options.notFoundComponent)return h}return i?f:u},xa=(n,a,i)=>{var r,u,f;if(!(!$t(i)&&!kt(i)))throw $t(i)&&i.redirectHandled&&!i.options.reloadDocument||(a&&((r=a._nonReactive.beforeLoadPromise)==null||r.resolve(),(u=a._nonReactive.loaderPromise)==null||u.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loaderPromise=void 0,a._nonReactive.error=i,n.updateMatch(a.id,h=>({...h,status:$t(i)?"redirected":kt(i)?"notFound":h.status==="pending"?"success":h.status,context:ui(n,a.index),isFetching:!1,error:i})),kt(i)&&!i.routeId&&(i.routeId=a.routeId),(f=a._nonReactive.loadPromise)==null||f.resolve()),$t(i)&&(n.rendered=!0,i.options._fromLocation=n.location,i.redirectHandled=!0,i=n.router.resolveRedirect(i))),i},N0=(n,a)=>{const i=n.router.getMatch(a);return!!(!i||i._nonReactive.dehydrated)},Jg=(n,a,i)=>{const r=ui(n,i);n.updateMatch(a,u=>({...u,context:r}))},Nr=(n,a,i)=>{var h,y;const{id:r,routeId:u}=n.matches[a],f=n.router.looseRoutesById[u];if(i instanceof Promise)throw i;n.firstBadMatchIndex??(n.firstBadMatchIndex=a),xa(n,n.router.getMatch(r),i);try{(y=(h=f.options).onError)==null||y.call(h,i)}catch(p){i=p,xa(n,n.router.getMatch(r),i)}n.updateMatch(r,p=>{var m,x;return(m=p._nonReactive.beforeLoadPromise)==null||m.resolve(),p._nonReactive.beforeLoadPromise=void 0,(x=p._nonReactive.loadPromise)==null||x.resolve(),{...p,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!n.preload&&!$t(i)&&!kt(i)&&(n.serialError??(n.serialError=i))},R0=(n,a,i,r)=>{var f;if(r._nonReactive.pendingTimeout!==void 0)return;const u=i.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!Kc(n,a)&&(i.options.loader||i.options.beforeLoad||_0(i))&&typeof u=="number"&&u!==1/0&&(i.options.pendingComponent??((f=n.router.options)==null?void 0:f.defaultPendingComponent))){const h=setTimeout(()=>{Jf(n)},u);r._nonReactive.pendingTimeout=h}},vj=(n,a,i)=>{const r=n.router.getMatch(a);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;R0(n,a,i,r);const u=()=>{const f=n.router.getMatch(a);f.preload&&(f.status==="redirected"||f.status==="notFound")&&xa(n,f,f.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(u):u()},xj=(n,a,i,r)=>{const u=n.router.getMatch(a);let f=u._nonReactive.loadPromise;u._nonReactive.loadPromise=Sl(()=>{f==null||f.resolve(),f=void 0});const{paramsError:h,searchError:y}=u;h&&Nr(n,i,h),y&&Nr(n,i,y),R0(n,a,r,u);const p=new AbortController;let m=!1;const x=()=>{m||(m=!0,n.updateMatch(a,T=>({...T,isFetching:"beforeLoad",fetchCount:T.fetchCount+1,abortController:p})))},v=()=>{var T;(T=u._nonReactive.beforeLoadPromise)==null||T.resolve(),u._nonReactive.beforeLoadPromise=void 0,n.updateMatch(a,q=>({...q,isFetching:!1}))};if(!r.options.beforeLoad){n.router.batch(()=>{x(),v()});return}u._nonReactive.beforeLoadPromise=Sl();const b={...ui(n,i,!1),...u.__routeContext},{search:w,params:N,cause:R}=u,j=Kc(n,a),O={search:w,abortController:p,params:N,preload:j,context:b,location:n.location,navigate:T=>n.router.navigate({...T,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:j?"preload":R,matches:n.matches,routeId:r.id,...n.router.options.additionalContext},A=T=>{if(T===void 0){n.router.batch(()=>{x(),v()});return}($t(T)||kt(T))&&(x(),Nr(n,i,T)),n.router.batch(()=>{x(),n.updateMatch(a,q=>({...q,__beforeLoadContext:T})),v()})};let B;try{if(B=r.options.beforeLoad(O),Lr(B))return x(),B.catch(T=>{Nr(n,i,T)}).then(A)}catch(T){x(),Nr(n,i,T)}A(B)},bj=(n,a)=>{const{id:i,routeId:r}=n.matches[a],u=n.router.looseRoutesById[r],f=()=>y(),h=()=>xj(n,i,a,u),y=()=>{if(N0(n,i))return;const p=vj(n,i,u);return Lr(p)?p.then(h):h()};return f()},Sj=(n,a,i)=>{var f,h,y,p,m,x;const r=n.router.getMatch(a);if(!r||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const u={ssr:n.router.options.ssr,matches:n.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(h=(f=i.options).head)==null?void 0:h.call(f,u),(p=(y=i.options).scripts)==null?void 0:p.call(y,u),(x=(m=i.options).headers)==null?void 0:x.call(m,u)]).then(([v,b,w])=>({meta:v==null?void 0:v.meta,links:v==null?void 0:v.links,headScripts:v==null?void 0:v.scripts,headers:w,scripts:b,styles:v==null?void 0:v.styles}))},C0=(n,a,i,r,u)=>{const f=a[r-1],{params:h,loaderDeps:y,abortController:p,cause:m}=n.router.getMatch(i),x=ui(n,r),v=Kc(n,i);return{params:h,deps:y,preload:!!v,parentMatchPromise:f,abortController:p,context:x,location:n.location,navigate:b=>n.router.navigate({...b,_fromLocation:n.location}),cause:v?"preload":m,route:u,...n.router.options.additionalContext}},$g=async(n,a,i,r,u)=>{var f,h,y,p,m;try{const x=n.router.getMatch(i);try{(!(p0??n.router.isServer)||x.ssr===!0)&&qr(u);const v=u.options.loader,b=typeof v=="function"?v:v==null?void 0:v.handler,w=b==null?void 0:b(C0(n,a,i,r,u)),N=!!b&&Lr(w);if((N||u._lazyPromise||u._componentsPromise||u.options.head||u.options.scripts||u.options.headers||x._nonReactive.minPendingPromise)&&n.updateMatch(i,j=>({...j,isFetching:"loader"})),b){const j=N?await w:w;xa(n,n.router.getMatch(i),j),j!==void 0&&n.updateMatch(i,O=>({...O,loaderData:j}))}u._lazyPromise&&await u._lazyPromise;const R=x._nonReactive.minPendingPromise;R&&await R,u._componentsPromise&&await u._componentsPromise,n.updateMatch(i,j=>({...j,error:void 0,context:ui(n,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(v){let b=v;if((b==null?void 0:b.name)==="AbortError"){if(x.abortController.signal.aborted){(f=x._nonReactive.loaderPromise)==null||f.resolve(),x._nonReactive.loaderPromise=void 0;return}n.updateMatch(i,N=>({...N,status:N.status==="pending"?"success":N.status,isFetching:!1,context:ui(n,r)}));return}const w=x._nonReactive.minPendingPromise;w&&await w,kt(v)&&await((y=(h=u.options.notFoundComponent)==null?void 0:h.preload)==null?void 0:y.call(h)),xa(n,n.router.getMatch(i),v);try{(m=(p=u.options).onError)==null||m.call(p,v)}catch(N){b=N,xa(n,n.router.getMatch(i),N)}!$t(b)&&!kt(b)&&await qr(u,["errorComponent"]),n.updateMatch(i,N=>({...N,error:b,context:ui(n,r),status:"error",isFetching:!1}))}}catch(x){const v=n.router.getMatch(i);v&&(v._nonReactive.loaderPromise=void 0),xa(n,v,x)}},jj=async(n,a,i)=>{var w,N,R,j;async function r(O,A,B,T,q){const D=Date.now()-A.updatedAt,z=O?q.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:q.options.staleTime??n.router.options.defaultStaleTime??0,k=q.options.shouldReload,Y=typeof k=="function"?k(C0(n,a,u,i,q)):k,{status:W,invalid:ee}=T,F=D>=z&&(!!n.forceStaleReload||T.cause==="enter"||B!==void 0&&B!==T.id);h=W==="success"&&(ee||(Y??F)),O&&q.options.preload===!1||(h&&!n.sync&&x?(y=!0,(async()=>{var X,te;try{await $g(n,a,u,i,q);const fe=n.router.getMatch(u);(X=fe._nonReactive.loaderPromise)==null||X.resolve(),(te=fe._nonReactive.loadPromise)==null||te.resolve(),fe._nonReactive.loaderPromise=void 0,fe._nonReactive.loadPromise=void 0}catch(fe){$t(fe)&&await n.router.navigate(fe.options)}})()):W!=="success"||h?await $g(n,a,u,i,q):Jg(n,u,i))}const{id:u,routeId:f}=n.matches[i];let h=!1,y=!1;const p=n.router.looseRoutesById[f],m=p.options.loader,x=((typeof m=="function"||m==null?void 0:m.staleReloadMode)??n.router.options.defaultStaleReloadMode)!=="blocking";if(N0(n,u)){if(!n.router.getMatch(u))return n.matches[i];Jg(n,u,i)}else{const O=n.router.getMatch(u),A=n.router.stores.matchesId.get()[i],B=((w=A&&n.router.stores.matchStores.get(A)||null)==null?void 0:w.routeId)===f?A:(N=n.router.stores.matches.get().find(q=>q.routeId===f))==null?void 0:N.id,T=Kc(n,u);if(O._nonReactive.loaderPromise){if(O.status==="success"&&!n.sync&&!O.preload&&x)return O;await O._nonReactive.loaderPromise;const q=n.router.getMatch(u),D=q._nonReactive.error||q.error;D&&xa(n,q,D),q.status==="pending"&&await r(T,O,B,q,p)}else{const q=T&&!n.router.stores.matchStores.has(u),D=n.router.getMatch(u);D._nonReactive.loaderPromise=Sl(),q!==D.preload&&n.updateMatch(u,z=>({...z,preload:q})),await r(T,O,B,D,p)}}const v=n.router.getMatch(u);y||((R=v._nonReactive.loaderPromise)==null||R.resolve(),(j=v._nonReactive.loadPromise)==null||j.resolve(),v._nonReactive.loadPromise=void 0),clearTimeout(v._nonReactive.pendingTimeout),v._nonReactive.pendingTimeout=void 0,y||(v._nonReactive.loaderPromise=void 0),v._nonReactive.dehydrated=void 0;const b=y?v.isFetching:!1;return b!==v.isFetching||v.invalid!==!1?(n.updateMatch(u,O=>({...O,isFetching:b,invalid:!1})),n.router.getMatch(u)):v};async function Wg(n){var b,w;const a=n,i=[];gj(a.router)&&Jf(a);let r;for(let N=0;N<a.matches.length;N++){try{const R=bj(a,N);Lr(R)&&await R}catch(R){if($t(R))throw R;if(kt(R))r=R;else if(!a.preload)throw R;break}if(a.serialError||a.firstBadMatchIndex!=null)break}const u=a.firstBadMatchIndex??a.matches.length,f=r&&!a.preload?Ig(a,r):void 0,h=r&&a.preload?0:f!==void 0?Math.min(f+1,u):u;let y,p;for(let N=0;N<h;N++)i.push(jj(a,i,N));try{await Promise.all(i)}catch{const N=await Promise.allSettled(i);for(const R of N){if(R.status!=="rejected")continue;const j=R.reason;if($t(j))throw j;kt(j)?y??(y=j):p??(p=j)}if(p!==void 0)throw p}const m=y??(r&&!a.preload?r:void 0);let x=a.firstBadMatchIndex!==void 0?a.firstBadMatchIndex:a.matches.length-1;if(!m&&r&&a.preload)return a.matches;if(m){const N=Ig(a,m);N===void 0&&Rs();const R=a.matches[N],j=a.router.looseRoutesById[R.routeId],O=(b=a.router.options)==null?void 0:b.defaultNotFoundComponent;!j.options.notFoundComponent&&O&&(j.options.notFoundComponent=O),m.routeId=R.routeId;const A=R.routeId===a.router.routeTree.id;a.updateMatch(R.id,B=>({...B,...A?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),x=N,await qr(j,["notFoundComponent"])}else if(!a.preload){const N=a.matches[0];N.globalNotFound||(w=a.router.getMatch(N.id))!=null&&w.globalNotFound&&a.updateMatch(N.id,R=>({...R,globalNotFound:!1,error:void 0}))}if(a.serialError&&a.firstBadMatchIndex!==void 0){const N=a.router.looseRoutesById[a.matches[a.firstBadMatchIndex].routeId];await qr(N,["errorComponent"])}for(let N=0;N<=x;N++){const{id:R,routeId:j}=a.matches[N],O=a.router.looseRoutesById[j];try{const A=Sj(a,R,O);if(A){const B=await A;a.updateMatch(R,T=>({...T,...B}))}}catch(A){console.error(`Error executing head for route ${j}:`,A)}}const v=Jf(a);if(Lr(v)&&await v,m)throw m;if(a.serialError&&!a.preload&&!a.onReady)throw a.serialError;return a.matches}function ev(n,a){const i=a.map(r=>{var u,f;return(f=(u=n.options[r])==null?void 0:u.preload)==null?void 0:f.call(u)}).filter(Boolean);if(i.length!==0)return Promise.all(i)}function qr(n,a=Tc){!n._lazyLoaded&&n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(r=>{const{id:u,...f}=r.options;Object.assign(n.options,f),n._lazyLoaded=!0,n._lazyPromise=void 0}):n._lazyLoaded=!0);const i=()=>n._componentsLoaded?void 0:a===Tc?(()=>{if(n._componentsPromise===void 0){const r=ev(n,Tc);r?n._componentsPromise=r.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():ev(n,a);return n._lazyPromise?n._lazyPromise.then(i):i()}function _0(n){var a;for(const i of Tc)if((a=n.options[i])!=null&&a.preload)return!0;return!1}const Tc=["component","errorComponent","pendingComponent","notFoundComponent"];function wj(n){return{input:({url:a})=>{for(const i of n)a=$f(i,a);return a},output:({url:a})=>{for(let i=n.length-1;i>=0;i--)a=T0(n[i],a);return a}}}function Nj(n){const a=w0(n.basepath),i=`/${a}`,r=n.caseSensitive?i:i.toLowerCase(),u=`${r}/`;return{input:({url:f})=>{const h=n.caseSensitive?f.pathname:f.pathname.toLowerCase();return h===r?f.pathname="/":h.startsWith(u)&&(f.pathname=f.pathname.slice(i.length)),f},output:({url:f})=>(f.pathname=_c(["/",a,f.pathname]),f)}}function $f(n,a){var r;const i=(r=n==null?void 0:n.input)==null?void 0:r.call(n,{url:a});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return a}function T0(n,a){var r;const i=(r=n==null?void 0:n.output)==null?void 0:r.call(n,{url:a});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return a}function Rj(n,a){const{createMutableStore:i,createReadonlyStore:r,batch:u,init:f}=a,h=new Map,y=new Map,p=new Map,m=i(n.status),x=i(n.loadedAt),v=i(n.isLoading),b=i(n.isTransitioning),w=i(n.location),N=i(n.resolvedLocation),R=i(n.statusCode),j=i(n.redirect),O=i([]),A=i([]),B=i([]),T=r(()=>gf(h,O.get())),q=r(()=>gf(y,A.get())),D=r(()=>gf(p,B.get())),z=r(()=>O.get()[0]),k=r(()=>O.get().some(K=>{var ue;return((ue=h.get(K))==null?void 0:ue.get().status)==="pending"})),Y=r(()=>{var K;return{locationHref:w.get().href,resolvedLocationHref:(K=N.get())==null?void 0:K.href,status:m.get()}}),W=r(()=>({status:m.get(),loadedAt:x.get(),isLoading:v.get(),isTransitioning:b.get(),matches:T.get(),location:w.get(),resolvedLocation:N.get(),statusCode:R.get(),redirect:j.get()})),ee=Br(64);function F(K){let ue=ee.get(K);return ue||(ue=r(()=>{const ze=O.get();for(const ne of ze){const E=h.get(ne);if(E&&E.routeId===K)return E.get()}}),ee.set(K,ue)),ue}const X={status:m,loadedAt:x,isLoading:v,isTransitioning:b,location:w,resolvedLocation:N,statusCode:R,redirect:j,matchesId:O,pendingIds:A,cachedIds:B,matches:T,pendingMatches:q,cachedMatches:D,firstId:z,hasPending:k,matchRouteDeps:Y,matchStores:h,pendingMatchStores:y,cachedMatchStores:p,__store:W,getRouteMatchStore:F,setMatches:te,setPending:fe,setCached:L};te(n.matches),f==null||f(X);function te(K){vf(K,h,O,i,u)}function fe(K){vf(K,y,A,i,u)}function L(K){vf(K,p,B,i,u)}return X}function gf(n,a){const i=[];for(const r of a){const u=n.get(r);u&&i.push(u.get())}return i}function vf(n,a,i,r,u){const f=n.map(y=>y.id),h=new Set(f);u(()=>{for(const y of a.keys())h.has(y)||a.delete(y);for(const y of n){const p=a.get(y.id);if(!p){const m=r(y);m.routeId=y.routeId,a.set(y.id,m);continue}p.routeId=y.routeId,p.get()!==y&&p.set(y)}IS(i.get(),f)||i.set(f)})}var Sa="__TSR_index",tv="popstate",nv="beforeunload";function Cj(n){let a=n.getLocation();const i=new Set,r=h=>{a=n.getLocation(),i.forEach(y=>y({location:a,action:h}))},u=h=>{n.notifyOnIndexChange??!0?r(h):a=n.getLocation()},f=async({task:h,navigateOpts:y,...p})=>{var v,b;if((y==null?void 0:y.ignoreBlocker)??!1){h();return}const m=((v=n.getBlockers)==null?void 0:v.call(n))??[],x=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&x)for(const w of m){const N=Hc(p.path,p.state);if(await w.blockerFn({currentLocation:a,nextLocation:N,action:p.type})){(b=n.onBlocked)==null||b.call(n);return}}h()};return{get location(){return a},get length(){return n.getLength()},subscribers:i,subscribe:h=>(i.add(h),()=>{i.delete(h)}),push:(h,y,p)=>{const m=a.state[Sa];y=sv(m+1,y),f({task:()=>{n.pushState(h,y),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:y})},replace:(h,y,p)=>{const m=a.state[Sa];y=sv(m,y),f({task:()=>{n.replaceState(h,y),r({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:h,state:y})},go:(h,y)=>{f({task:()=>{n.go(h),u({type:"GO",index:h})},navigateOpts:y,type:"GO"})},back:h=>{f({task:()=>{n.back((h==null?void 0:h.ignoreBlocker)??!1),u({type:"BACK"})},navigateOpts:h,type:"BACK"})},forward:h=>{f({task:()=>{n.forward((h==null?void 0:h.ignoreBlocker)??!1),u({type:"FORWARD"})},navigateOpts:h,type:"FORWARD"})},canGoBack:()=>a.state[Sa]!==0,createHref:h=>n.createHref(h),block:h=>{var p;if(!n.setBlockers)return()=>{};const y=((p=n.getBlockers)==null?void 0:p.call(n))??[];return n.setBlockers([...y,h]),()=>{var x,v;const m=((x=n.getBlockers)==null?void 0:x.call(n))??[];(v=n.setBlockers)==null||v.call(n,m.filter(b=>b!==h))}},flush:()=>{var h;return(h=n.flush)==null?void 0:h.call(n)},destroy:()=>{var h;return(h=n.destroy)==null?void 0:h.call(n)},notify:r}}function sv(n,a){a||(a={});const i=xh();return{...a,key:i,__TSR_key:i,[Sa]:n}}function _j(n){var k,Y;const a=typeof document<"u"?window:void 0,i=a.history.pushState,r=a.history.replaceState;let u=[];const f=()=>u,h=W=>u=W,y=(W=>W),p=(()=>Hc(`${a.location.pathname}${a.location.search}${a.location.hash}`,a.history.state));if(!((k=a.history.state)!=null&&k.__TSR_key)&&!((Y=a.history.state)!=null&&Y.key)){const W=xh();a.history.replaceState({[Sa]:0,key:W,__TSR_key:W},"")}let m=p(),x,v=!1,b=!1,w=!1,N=!1;const R=()=>m;let j,O;const A=()=>{j&&(z._ignoreSubscribers=!0,(j.isPush?a.history.pushState:a.history.replaceState)(j.state,"",j.href),z._ignoreSubscribers=!1,j=void 0,O=void 0,x=void 0)},B=(W,ee,F)=>{const X=y(ee);O||(x=m),m=Hc(ee,F),j={href:X,state:F,isPush:(j==null?void 0:j.isPush)||W==="push"},O||(O=Promise.resolve().then(()=>A()))},T=W=>{m=p(),z.notify({type:W})},q=async()=>{if(b){b=!1;return}const W=p(),ee=W.state[Sa]-m.state[Sa],F=ee===1,X=ee===-1,te=!F&&!X||v;v=!1;const fe=te?"GO":X?"BACK":"FORWARD",L=te?{type:"GO",index:ee}:{type:X?"BACK":"FORWARD"};if(w)w=!1;else{const K=f();if(typeof document<"u"&&K.length){for(const ue of K)if(await ue.blockerFn({currentLocation:m,nextLocation:W,action:fe})){b=!0,a.history.go(1),z.notify(L);return}}}m=p(),z.notify(L)},D=W=>{if(N){N=!1;return}let ee=!1;const F=f();if(typeof document<"u"&&F.length)for(const X of F){const te=X.enableBeforeUnload??!0;if(te===!0){ee=!0;break}if(typeof te=="function"&&te()===!0){ee=!0;break}}if(ee)return W.preventDefault(),W.returnValue=""},z=Cj({getLocation:R,getLength:()=>a.history.length,pushState:(W,ee)=>B("push",W,ee),replaceState:(W,ee)=>B("replace",W,ee),back:W=>(W&&(w=!0),N=!0,a.history.back()),forward:W=>{W&&(w=!0),N=!0,a.history.forward()},go:W=>{v=!0,a.history.go(W)},createHref:W=>y(W),flush:A,destroy:()=>{a.history.pushState=i,a.history.replaceState=r,a.removeEventListener(nv,D,{capture:!0}),a.removeEventListener(tv,q)},onBlocked:()=>{x&&m!==x&&(m=x)},getBlockers:f,setBlockers:h,notifyOnIndexChange:!1});return a.addEventListener(nv,D,{capture:!0}),a.addEventListener(tv,q),a.history.pushState=function(...W){const ee=i.apply(a.history,W);return z._ignoreSubscribers||T("PUSH"),ee},a.history.replaceState=function(...W){const ee=r.apply(a.history,W);return z._ignoreSubscribers||T("REPLACE"),ee},z}function Tj(n){let a=n.replace(/[\x00-\x1f\x7f]/g,"");return a.startsWith("//")&&(a="/"+a.replace(/^\/+/,"")),a}function Hc(n,a){const i=Tj(n),r=i.indexOf("#"),u=i.indexOf("?"),f=xh();return{href:i,pathname:i.substring(0,r>0?u>0?Math.min(r,u):r:u>0?u:i.length),hash:r>-1?i.substring(r):"",search:u>-1?i.slice(u,r===-1?void 0:r):"",state:a||{[Sa]:0,key:f,__TSR_key:f}}}function xh(){return(Math.random()+1).toString(36).substring(7)}function ll(n,a){const i=a,r=n;return{fromLocation:i,toLocation:r,pathChanged:(i==null?void 0:i.pathname)!==r.pathname,hrefChanged:(i==null?void 0:i.href)!==r.href,hashChanged:(i==null?void 0:i.hash)!==r.hash}}const Wf=new WeakMap;var Ej=class{constructor(n,a){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=i=>i(),this.update=i=>{var x;const r=this.options,u=this.basepath??(r==null?void 0:r.basepath)??"/",f=this.basepath===void 0,h=r==null?void 0:r.rewrite;if(this.options={...r,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=cj(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=_j()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let v;this.resolvePathCache=Br(1e3),v=this.buildRouteTree(),this.setRoutes(v)}if(!this.stores&&this.latestLocation){const v=this.getStoreConfig(this);this.batch=v.batch,this.stores=Rj(Aj(this.latestLocation),v),Gj(this)}let y=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(f||u!==p||h!==m){this.basepath=p;const v=[],b=w0(p);b&&b!=="/"&&v.push(Nj({basepath:p})),m&&v.push(m),this.rewrite=v.length===0?void 0:v.length===1?v[0]:wj(v),this.history&&this.updateLatestLocation(),y=!0}y&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((x=window.CSS)==null?void 0:x.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=sj(this.routeTree,this.options.caseSensitive,(r,u)=>{r.init({originalIndex:u})});return this.options.routeMasks&&$S(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,r)=>{const u={eventType:i,fn:r};return this.subscribers.add(u),()=>{this.subscribers.delete(u)}},this.emit=i=>{this.subscribers.forEach(r=>{r.eventType===i.type&&r.fn(i)})},this.parseLocation=(i,r)=>{const u=({pathname:p,search:m,hash:x,href:v,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const O=this.options.parseSearch(m),A=this.options.stringifySearch(O);return{href:p+A+x,publicHref:p+A+x,pathname:wr(p).path,external:!1,searchStr:A,search:Ya(r==null?void 0:r.search,O),hash:wr(x.slice(1)).path,state:ga(r==null?void 0:r.state,b)}}const w=new URL(v,this.origin),N=$f(this.rewrite,w),R=this.options.parseSearch(N.search),j=this.options.stringifySearch(R);return N.search=j,{href:N.href.replace(N.origin,""),publicHref:v,pathname:wr(N.pathname).path,external:!!this.rewrite&&N.origin!==this.origin,searchStr:j,search:Ya(r==null?void 0:r.search,R),hash:wr(N.hash.slice(1)).path,state:ga(r==null?void 0:r.state,b)}},f=u(i),{__tempLocation:h,__tempKey:y}=f.state;if(h&&(!y||y===this.tempLocationKey)){const p=u(h);return p.state.key=f.state.key,p.state.__TSR_key=f.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:f}}return f},this.resolvePathWithBase=(i,r)=>oj({base:i,to:r.includes("//")?vh(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,r,u)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},u):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>kj({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const r=this.getMatch(i);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(i=>{this.cancelMatch(i)}),this.stores.matchesId.get().forEach(i=>{var u;if(this.stores.pendingMatchStores.has(i))return;const r=(u=this.stores.matchStores.get(i))==null?void 0:u.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(i)})},this.buildLocation=i=>{const r=(f={})=>{var ee,F;const h=f._fromLocation||this.pendingBuiltLocation||this.latestLocation,y=this.matchRoutesLightweight(h);f.from;const p=f.unsafeRelative==="path"?h.pathname:f.from??y.fullPath,m=f.to?`${f.to}`:void 0,x=y.search,v=Object.assign(Object.create(null),y.params),b=(m==null?void 0:m.charCodeAt(0))===47?"/":this.resolvePathWithBase(p,"."),w=m?this.resolvePathWithBase(b,m):b,N=f.params===!1||f.params===null?Object.create(null):(f.params??!0)===!0?v:Object.assign(v,Ja(f.params,v)),R=this.routesByPath[Ns(w)];let j;if(R)j=this.getRouteBranch(R);else if(w.includes("$"))j=[];else{const X=this.getMatchedRoutes(w);j=X.matchedRoutes,this.options.notFoundRoute&&(!X.foundRoute||X.foundRoute.path!=="/"&&X.routeParams["**"])&&(j=[...j,this.options.notFoundRoute])}if(j.length&&g0(N))for(const X of j){const te=((ee=X.options.params)==null?void 0:ee.stringify)??X.options.stringifyParams;if(te)try{Object.assign(N,te(N))}catch{}}const O=i.leaveParams?w:wr(Zg({path:w,params:N,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=x;if(i._includeValidateSearch&&((F=this.options.search)!=null&&F.strict)){const X={};j.forEach(te=>{if(te.options.validateSearch)try{Object.assign(X,Ec(te.options.validateSearch,{...X,...A}))}catch{}}),A=X}A=Oj({search:A,dest:f,destRoutes:j,_includeValidateSearch:i._includeValidateSearch}),A=Ya(x,A);const B=this.options.stringifySearch(A),T=f.hash===!0?h.hash:f.hash?Ja(f.hash,h.hash):void 0,q=T?`#${T}`:"";let D=f.state===!0?h.state:f.state?Ja(f.state,h.state):{};D=ga(h.state,D);const z=`${O}${B}${q}`;let k,Y,W=!1;if(this.rewrite){const X=new URL(z,this.origin),te=T0(this.rewrite,X);k=X.href.replace(X.origin,""),te.origin!==this.origin?(Y=te.href,W=!0):Y=te.pathname+te.search+te.hash}else k=FS(z),Y=k;return{publicHref:Y,href:k,pathname:O,search:A,searchStr:B,state:D,hash:T??"",external:W,unmaskOnReload:f.unmaskOnReload}},u=(f={},h)=>{const y=r(f);let p=h?r(h):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const x=WS(y.pathname,this.processedTree);if(x){Object.assign(m,x.rawParams);const{from:v,params:b,...w}=x.route,N=b===!1||b===null?Object.create(null):(b??!0)===!0?m:Object.assign(m,Ja(b,m));h={from:i.from,...w,params:N},p=r(h)}}}return p&&(y.maskedLocation=p),y};return i.mask?u(i,{from:i.from,...i.mask}):u(i)},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...u})=>{let f;const h=()=>{const m=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];m.forEach(v=>{u.state[v]=this.latestLocation.state[v]});const x=oi(u.state,this.latestLocation.state);return m.forEach(v=>{delete u.state[v]}),x},y=Ns(this.latestLocation.href)===Ns(u.href);let p=this.commitLocationPromise;if(this.commitLocationPromise=Sl(()=>{p==null||p.resolve(),p=void 0}),y&&h())this.load();else{let{maskedLocation:m,hashScrollIntoView:x,...v}=u;m&&(v={...m,state:{...m.state,__tempKey:void 0,__tempLocation:{...v,search:v.searchStr,state:{...v.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(v.unmaskOnReload??this.options.unmaskOnReload??!1)&&(v.state.__tempKey=this.tempLocationKey)),v.state.__hashScrollIntoViewOptions=x??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,f=u.replace?"REPLACE":"PUSH",this.history[f==="REPLACE"?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:r})}return this.resetNextScroll=u.resetScroll??!0,this.history.subscribers.size||this.load(f?{action:{type:f}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:r,hashScrollIntoView:u,viewTransition:f,ignoreBlocker:h,href:y,...p}={})=>{if(y){const v=this.history.location.state.__TSR_index,b=Hc(y,{__TSR_index:i?v:v+1}),w=new URL(b.pathname,this.origin);p.to=$f(this.rewrite,w).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const x=this.commitLocation({...m,viewTransition:f,replace:i,resetScroll:r,hashScrollIntoView:u,ignoreBlocker:h});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),x},this.navigate=async({to:i,reloadDocument:r,href:u,publicHref:f,...h})=>{var p,m;let y=!1;if(u)try{new URL(`${u}`),y=!0}catch{}if(y&&!r&&(r=!0),r){if(i!==void 0||!u){const v=this.buildLocation({to:i,...h});u=u??v.publicHref,f=f??v.publicHref}const x=!y&&f?f:u;if(Bc(x,this.protocolAllowlist))return Promise.resolve();if(!h.ignoreBlocker){const v=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const b of v)if(b!=null&&b.blockerFn&&await b.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return h.replace?window.location.replace(x):window.location.href=x,Promise.resolve()}return this.buildAndCommitLocation({...h,href:u,to:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(u=>!i.some(f=>f.id===u.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(i),this.stores.setCached(r)})},this.load=async i=>{var m;const r=(m=i==null?void 0:i.action)==null?void 0:m.type;let u,f,h;const y=this.stores.resolvedLocation.get()??this.stores.location.get();for(h=new Promise(x=>{this.startTransition(async()=>{var v;try{this.beforeLoad(),r?Wf.set(this.latestLocation,r):Wf.delete(this.latestLocation);const b=this.latestLocation,w=ll(b,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...w}),this.emit({type:"onBeforeLoad",...w}),await Wg({router:this,sync:i==null?void 0:i.sync,forceStaleReload:y.href===b.href,matches:this.stores.pendingMatches.get(),location:b,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var A,B;let N=null,R=null,j=null,O=null;this.batch(()=>{const T=this.stores.pendingMatches.get(),q=T.length,D=this.stores.matches.get();N=q?D.filter(Y=>!this.stores.pendingMatchStores.has(Y.id)):null;const z=new Set;for(const Y of this.stores.pendingMatchStores.values())Y.routeId&&z.add(Y.routeId);const k=new Set;for(const Y of this.stores.matchStores.values())Y.routeId&&k.add(Y.routeId);R=q?D.filter(Y=>!z.has(Y.routeId)):null,j=q?T.filter(Y=>!k.has(Y.routeId)):null,O=q?T.filter(Y=>k.has(Y.routeId)):D,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),q&&(this.stores.setMatches(T),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...N.filter(Y=>Y.status!=="error"&&Y.status!=="notFound"&&Y.status!=="redirected")]),this.clearExpiredCache())});for(const[T,q]of[[R,"onLeave"],[j,"onEnter"],[O,"onStay"]])if(T)for(const D of T)(B=(A=this.looseRoutesById[D.routeId].options)[q])==null||B.call(A,D)})})}})}catch(b){$t(b)?(u=b,this.navigate({...u.options,replace:!0,ignoreBlocker:!0})):kt(b)&&(f=b);const w=u?u.status:f?404:this.stores.matches.get().some(N=>N.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(w),this.stores.redirect.set(u)})}this.latestLoadPromise===h&&((v=this.commitLocationPromise)==null||v.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),x()})}),this.latestLoadPromise=h,await h;this.latestLoadPromise&&h!==this.latestLoadPromise;)await this.latestLoadPromise;let p;this.hasNotFoundMatch()?p=404:this.stores.matches.get().some(x=>x.status==="error")&&(p=500),p!==void 0&&this.stores.statusCode.set(p)},this.startViewTransition=i=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let u;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const f=this.latestLocation,h=this.stores.resolvedLocation.get(),y=typeof r.types=="function"?r.types(ll(f,h)):r.types;if(y===!1){i();return}u={update:i,types:y}}else u=i;document.startViewTransition(u)}else i()},this.updateMatch=(i,r)=>{this.startTransition(()=>{const u=this.stores.pendingMatchStores.get(i);if(u){u.set(r);return}const f=this.stores.matchStores.get(i);if(f){f.set(r);return}const h=this.stores.cachedMatchStores.get(i);if(h){const y=r(h.get());y.status==="redirected"?this.stores.cachedMatchStores.delete(i)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==i)):h.set(y)}})},this.getMatch=i=>{var r,u,f;return((r=this.stores.cachedMatchStores.get(i))==null?void 0:r.get())??((u=this.stores.pendingMatchStores.get(i))==null?void 0:u.get())??((f=this.stores.matchStores.get(i))==null?void 0:f.get())},this.invalidate=i=>{const r=u=>{var f;return((f=i==null?void 0:i.filter)==null?void 0:f.call(i,u))??!0?{...u,invalid:!0,...i!=null&&i.forcePending||u.status==="error"||u.status==="notFound"?{status:"pending",error:void 0}:void 0}:u};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:i==null?void 0:i.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const r=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const u=i.options._builtLocation??this.buildLocation(i.options),f=this.getParsedLocationHref(u);i.options.href=f,i.headers.set("Location",f)}else if(r)try{const u=new URL(r);if(this.origin&&u.origin===this.origin){const f=u.pathname+u.search+u.hash;i.options.href=f,i.headers.set("Location",f)}}catch{}if(i.options.href&&!i.options._builtLocation&&Bc(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const r=i==null?void 0:i.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(u=>!r(u))):this.stores.setCached([])},this.clearExpiredCache=()=>{const i=Date.now(),r=u=>{const f=this.looseRoutesById[u.routeId];if(!f.options.loader)return!0;const h=(u.preload?f.options.preloadGcTime??this.options.defaultPreloadGcTime:f.options.gcTime??this.options.defaultGcTime)??300*1e3;return u.status==="error"?!0:i-u.updatedAt>=h};this.clearCache({filter:r})},this.loadRouteChunk=qr,this.preloadRoute=async i=>{const r=i._builtLocation??this.buildLocation(i);let u=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:i});const f=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),h=new Set([...f,...this.stores.cachedIds.get()]),y=u.filter(p=>!h.has(p.id));if(y.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...y])}try{return u=await Wg({router:this,matches:u,location:r,preload:!0,updateMatch:(p,m)=>{f.has(p)?u=u.map(x=>x.id===p?m(x):x):this.updateMatch(p,m)}}),u}catch(p){if($t(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:r});kt(p)||console.error(p);return}},this.matchRoute=(i,r)=>{const u={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},f=this.buildLocation(u);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const h=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),y=ej(f.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,h.pathname,this.processedTree);return!y||i.params&&!oi(y.rawParams,i.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?oi(h.search,f.search,{partial:!0})?y.rawParams:!1:y.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(i=>i.status==="notFound"||i.globalNotFound),this.getStoreConfig=a,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??hj,parseSearch:n.parseSearch??fj,protocolAllowlist:n.protocolAllowlist??ZS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:n,routesByPath:a,processedTree:i}){this.routesById=n,this.routesByPath=a,this.processedTree=i;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(n){let a=this.routeBranchCache.get(n);return a||(a=S0(n),this.routeBranchCache.set(n,a)),a}get looseRoutesById(){return this.routesById}getParentContext(n){return n!=null&&n.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,a){var x,v;const i=this.getMatchedRoutes(n.pathname),{foundRoute:r,routeParams:u}=i;let{matchedRoutes:f}=i,h=!1;(r?r.path!=="/"&&u["**"]:Ns(n.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:h=!0);const y=h?Dj(this.options.notFoundMode,f):void 0,p=new Array(f.length),m=new Map;for(const b of this.stores.matchStores.values())b.routeId&&m.set(b.routeId,b.get());for(let b=0;b<f.length;b++){const w=f[b],N=p[b-1];let R,j,O;{const te=(N==null?void 0:N.search)??n.search,fe=(N==null?void 0:N._strictSearch)??void 0;try{const L=Ec(w.options.validateSearch,{...te})??void 0;R={...te,...L},j={...fe,...L},O=void 0}catch(L){let K=L;if(L instanceof Qc||(K=new Qc(L.message,{cause:L})),a!=null&&a.throwOnError)throw K;R=te,j={},O=K}}const A=((v=(x=w.options).loaderDeps)==null?void 0:v.call(x,{search:R}))??"",B=A?JSON.stringify(A):"",{interpolatedPath:T,usedParams:q}=Zg({path:w.fullPath,params:u,decoder:this.pathParamsDecoder,server:this.isServer}),D=w.id+T+B,z=this.getMatch(D),k=m.get(w.id),Y=(z==null?void 0:z._strictParams)??q;let W;if(!z)try{av(w,Y)}catch(te){if(kt(te)||$t(te)?W=te:W=new Mj(te.message,{cause:te}),a!=null&&a.throwOnError)throw W}Object.assign(u,Y);const ee=k?"stay":"enter";let F;if(z)F={...z,cause:ee,params:(k==null?void 0:k.params)??u,_strictParams:Y,search:Ya(k?k.search:z.search,R),_strictSearch:j};else{const te=w.options.loader||w.options.beforeLoad||w.lazyFn||_0(w)?"pending":"success";F={id:D,ssr:w.options.ssr,index:b,routeId:w.id,params:(k==null?void 0:k.params)??u,_strictParams:Y,pathname:T,updatedAt:Date.now(),search:k?Ya(k.search,R):R,_strictSearch:j,searchError:void 0,status:te,isFetching:!1,error:void 0,paramsError:W,__routeContext:void 0,_nonReactive:{loadPromise:Sl()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:ee,loaderDeps:k?ga(k.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:w.options.staticData||{},fullPath:w.fullPath}}a!=null&&a.preload||(F.globalNotFound=y===w.id),F.searchError=O;const X=this.getParentContext(N);F.context={...X,...F.__routeContext,...F.__beforeLoadContext},p[b]=F}for(let b=0;b<p.length;b++){const w=p[b],N=this.looseRoutesById[w.routeId],R=this.getMatch(w.id),j=m.get(w.routeId);if(w.params=j?Ya(j.params,u):u,!R){const O=p[b-1],A=this.getParentContext(O);if(N.options.context){const B={deps:w.loaderDeps,params:w.params,context:A??{},location:n,navigate:T=>this.navigate({...T,_fromLocation:n}),buildLocation:this.buildLocation,cause:w.cause,abortController:w.abortController,preload:!!w.preload,matches:p,routeId:N.id};w.__routeContext=N.options.context(B)??void 0}w.context={...A,...w.__routeContext,...w.__beforeLoadContext}}}return p}matchRoutesLightweight(n){var m;const{matchedRoutes:a,routeParams:i}=this.getMatchedRoutes(n.pathname),r=Ur(a),u={...n.search};for(const x of a)try{Object.assign(u,Ec(x.options.validateSearch,u))}catch{}const f=Ur(this.stores.matchesId.get()),h=f&&((m=this.stores.matchStores.get(f))==null?void 0:m.get()),y=h&&h.routeId===r.id&&h.pathname===n.pathname;let p;if(y)p=h.params;else{const x=Object.assign(Object.create(null),i);for(const v of a)try{av(v,x)}catch{}p=x}return{matchedRoutes:a,fullPath:r.fullPath,search:u,params:p}}},Qc=class extends Error{},Mj=class extends Error{};function Aj(n){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:n,matches:[],statusCode:200}}function Ec(n,a){if(n==null)return{};if("~standard"in n){const i=n["~standard"].validate(a);if(i instanceof Promise)throw new Qc("Async validation not supported");if(i.issues)throw new Qc(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in n?n.parse(a):typeof n=="function"?n(a):{}}function kj({pathname:n,routesById:a,processedTree:i}){const r=Object.create(null),u=Ns(n);let f;const h=tj(u,i,!0);return h&&(f=h.route,Object.assign(r,h.rawParams)),{matchedRoutes:(h==null?void 0:h.branch)||[a.__root__],routeParams:r,foundRoute:f}}function Oj({search:n,dest:a,destRoutes:i,_includeValidateSearch:r}){return zj(i)(n,a,r??!1)}function zj(n){var u;const a={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const f of n){if("search"in f.options)(u=f.options.search)!=null&&u.middlewares&&a.middlewares.push(...f.options.search.middlewares);else if(f.options.preSearchFilters||f.options.postSearchFilters){const h=({search:y,next:p})=>{let m=y;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(m=f.options.preSearchFilters.reduce((v,b)=>b(v),y));const x=p(m);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((v,b)=>b(v),x):x};a.middlewares.push(h)}if(f.options.validateSearch){const h=({search:y,next:p})=>{const m=p(y);if(!a._includeValidateSearch)return m;try{return{...m,...Ec(f.options.validateSearch,m)??void 0}}catch{return m}};a.middlewares.push(h)}}const i=({search:f})=>{const h=a.dest;return h.search?h.search===!0?f:Ja(h.search,f):{}};a.middlewares.push(i);const r=(f,h,y)=>{if(f>=y.length)return h;const p=y[f];return p({search:h,next:x=>r(f+1,x,y)})};return function(h,y,p){return a.dest=y,a._includeValidateSearch=p,r(0,h,a.middlewares)}}function Dj(n,a){if(n!=="root")for(let i=a.length-1;i>=0;i--){const r=a[i];if(r.children)return r.id}return ci}function av(n,a){var r;const i=((r=n.options.params)==null?void 0:r.parse)??n.options.parseParams;if(i){const u=i(a);if(u===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(a,u)}}function Uj(){try{return sessionStorage}catch{return}}const Lj="tsr-scroll-restoration-v1_3",rl=Uj();function Bj(){try{return JSON.parse((rl==null?void 0:rl.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function qj(){try{rl==null||rl.setItem(Lj,JSON.stringify(la))}catch{}}const la=Bj(),iv="data-scroll-restoration-id",Hj=n=>n.state.__TSR_key||n.href;function Qj(n){const a=n.getAttribute(iv);if(a)return`[${iv}="${a}"]`;let i="",r=n,u;for(;u=r.parentNode;){let f=1,h=r;for(;h=h.previousElementSibling;)f++;const y=`${r.localName}:nth-child(${f})`;i=i?`${y} > ${i}`:y,r=u}return i}let vc=!1;const al="window";function eh(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function lv(n){const a=[];for(const i of n){if(i===al)continue;const r=eh(i);r&&a.push(r)}return a}function Gj(n,a){if(n.options.scrollRestoration&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup)return;n.isScrollRestorationSetup=!0,vc=!1;const i=n.options.getScrollRestorationKey||Hj,r=new Map,u=(y,p,m)=>{const x=r.get(y)||{};x.scrollX=p,x.scrollY=m,r.set(y,x)};history.scrollRestoration="manual";const f=y=>{if(!(vc||!n.isScrollRestoring))if(y.target===document)u(al,scrollX,scrollY);else{const p=y.target;u(p,p.scrollLeft,p.scrollTop)}},h=y=>{if(!n.isScrollRestoring)return;const p=la[y]||(la[y]={});for(const[m,x]of r)m===al?p[al]=x:m.isConnected&&(p[Qj(m)]=x)};document.addEventListener("scroll",f,!0),n.subscribe("onBeforeLoad",y=>{y.fromLocation&&h(i(y.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{h(i(n.stores.resolvedLocation.get()??n.stores.location.get())),qj()}),n.subscribe("onRendered",y=>{var N;const p=n.options.scrollRestorationBehavior,m=n.options.scrollToTopSelectors,x=n.resetNextScroll;let v;if(r.clear(),x||(n.resetNextScroll=!0),typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))return;const b=i(y.toLocation),w=y.fromLocation&&i(y.fromLocation);if(n.isScrollRestoring&&w&&w!==b){const R=la[w];if(R){let j=la[b];for(const O in R){if(O===al){if(x)continue}else{const A=eh(O);if(!A||x&&m&&(v??(v=lv(m)),v.includes(A)))continue}j||(j=la[b]={}),j[O]??(j[O]=R[O])}}}vc=!0;try{const R=y.toLocation.hash,j=y.toLocation.state.__hashScrollIntoViewOptions??!0;let O=!1;if(x){const A=Wf.get(y.toLocation),B=R&&j&&(A==="PUSH"||A==="REPLACE"),T=n.isScrollRestoring?la[b]:void 0;if(T)for(const q in T){const{scrollX:D,scrollY:z}=T[q];if(q===al){if(B)continue;scrollTo({top:z,left:D,behavior:p}),O=!0}else{const k=eh(q);k&&(k.scrollLeft=D,k.scrollTop=z)}}if(!O&&!R){const q={top:0,left:0,behavior:p};if(scrollTo(q),m){v??(v=lv(m));for(const D of v)D.scrollTo(q)}}}!O&&R&&j&&((N=document.getElementById(R))==null||N.scrollIntoView(j))}finally{vc=!1}})}const Pj="Error preloading route! ☝️";var E0=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=a=>{var p,m;this.originalIndex=a.originalIndex;const i=this.options,r=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),r?this._path=ci:this.parentRoute||Rs();let u=r?ci:i==null?void 0:i.path;u&&u!=="/"&&(u=j0(u));const f=(i==null?void 0:i.id)||u;let h=r?ci:_c([this.parentRoute.id==="__root__"?"":this.parentRoute.id,f]);u==="__root__"&&(u="/"),h!=="__root__"&&(h=_c(["/",h]));const y=h==="__root__"?"/":_c([this.parentRoute.fullPath,u]);this._path=u,this._id=h,this._fullPath=y,this._to=Ns(y)},this.addChildren=a=>this._addFileChildren(a),this._addFileChildren=a=>(Array.isArray(a)&&(this.children=a),typeof a=="object"&&a!==null&&(this.children=Object.values(a)),this),this._addFileTypes=()=>this,this.updateLoader=a=>(Object.assign(this.options,a),this),this.update=a=>(Object.assign(this.options,a),this),this.lazy=a=>(this.lazyFn=a,this),this.redirect=a=>yj({from:this.fullPath,...a}),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Vj=class extends E0{constructor(n){super(n)}};function bh(n){const a=n.errorComponent??Sh;return o.jsx(Yj,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:i,reset:r})=>i?Q.createElement(a,{error:i,reset:r}):n.children})}var Yj=class extends Q.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n,a){const i=n.getResetKey();return a.error&&a.resetKey!==i?{resetKey:i,error:null}:{resetKey:i}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidCatch(n,a){this.props.onCatch&&this.props.onCatch(n,a)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Sh({error:n}){const[a,i]=Q.useState(!1);return o.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[o.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),o.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(r=>!r),children:a?"Hide Error":"Show Error"})]}),o.jsx("div",{style:{height:".25rem"}}),a?o.jsx("div",{children:o.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?o.jsx("code",{children:n.message}):null})}):null]})}function Kj({children:n,fallback:a=null}){return M0()?o.jsx(Dr.Fragment,{children:n}):o.jsx(Dr.Fragment,{children:a})}function M0(){return Dr.useSyncExternalStore(Xj,()=>!0,()=>!1)}function Xj(){return()=>{}}var A0=Q.createContext(null);function pn(n){return Q.useContext(A0)}var Xc=Q.createContext(void 0),Zj=Q.createContext(void 0),tt=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(tt||{});function Fj({update:n,notify:a,unwatched:i}){return{link:r,unlink:u,propagate:f,checkDirty:h,shallowPropagate:y};function r(m,x,v){const b=x.depsTail;if(b!==void 0&&b.dep===m)return;const w=b!==void 0?b.nextDep:x.deps;if(w!==void 0&&w.dep===m){w.version=v,x.depsTail=w;return}const N=m.subsTail;if(N!==void 0&&N.version===v&&N.sub===x)return;const R=x.depsTail=m.subsTail={version:v,dep:m,sub:x,prevDep:b,nextDep:w,prevSub:N,nextSub:void 0};w!==void 0&&(w.prevDep=R),b!==void 0?b.nextDep=R:x.deps=R,N!==void 0?N.nextSub=R:m.subs=R}function u(m,x=m.sub){const v=m.dep,b=m.prevDep,w=m.nextDep,N=m.nextSub,R=m.prevSub;return w!==void 0?w.prevDep=b:x.depsTail=b,b!==void 0?b.nextDep=w:x.deps=w,N!==void 0?N.prevSub=R:v.subsTail=R,R!==void 0?R.nextSub=N:(v.subs=N)===void 0&&i(v),w}function f(m){let x=m.nextSub,v;e:do{const b=m.sub;let w=b.flags;if(w&60?w&12?w&4?!(w&48)&&p(m,b)?(b.flags=w|40,w&=1):w=0:b.flags=w&-9|32:w=0:b.flags=w|32,w&2&&a(b),w&1){const N=b.subs;if(N!==void 0){const R=(m=N).nextSub;R!==void 0&&(v={value:x,prev:v},x=R);continue}}if((m=x)!==void 0){x=m.nextSub;continue}for(;v!==void 0;)if(m=v.value,v=v.prev,m!==void 0){x=m.nextSub;continue e}break}while(!0)}function h(m,x){let v,b=0,w=!1;e:do{const N=m.dep,R=N.flags;if(x.flags&16)w=!0;else if((R&17)===17){if(n(N)){const j=N.subs;j.nextSub!==void 0&&y(j),w=!0}}else if((R&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(v={value:m,prev:v}),m=N.deps,x=N,++b;continue}if(!w){const j=m.nextDep;if(j!==void 0){m=j;continue}}for(;b--;){const j=x.subs,O=j.nextSub!==void 0;if(O?(m=v.value,v=v.prev):m=j,w){if(n(x)){O&&y(j),x=m.sub;continue}w=!1}else x.flags&=-33;x=m.sub;const A=m.nextDep;if(A!==void 0){m=A;continue e}}return w}while(!0)}function y(m){do{const x=m.sub,v=x.flags;(v&48)===32&&(x.flags=v|16,(v&6)===2&&a(x))}while((m=m.nextSub)!==void 0)}function p(m,x){let v=x.depsTail;for(;v!==void 0;){if(v===m)return!0;v=v.prevDep}return!1}}function Ij(n,a,i){var f,h,y;const r=typeof n=="object",u=r?n:void 0;return{next:(f=r?n.next:n)==null?void 0:f.bind(u),error:(h=r?n.error:a)==null?void 0:h.bind(u),complete:(y=r?n.complete:i)==null?void 0:y.bind(u)}}const th=[];let Mc=0;const{link:rv,unlink:Jj,propagate:$j,checkDirty:k0,shallowPropagate:ov}=Fj({update(n){return n._update()},notify(n){th[nh++]=n,n.flags&=~tt.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=tt.Mutable|tt.Dirty,Gc(n))}});let xc=0,nh=0,Xn,sh=0;function O0(n){try{++sh,n()}finally{--sh||z0()}}function Gc(n){const a=n.depsTail;let i=a!==void 0?a.nextDep:n.deps;for(;i!==void 0;)i=Jj(i,n)}function z0(){if(!(sh>0)){for(;xc<nh;){const n=th[xc];th[xc++]=void 0,n.notify()}xc=0,nh=0}}function cv(n,a){const i=typeof n=="function",r=n,u={_snapshot:i?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?tt.None:tt.Mutable,get(){return Xn!==void 0&&rv(u,Xn,Mc),u._snapshot},subscribe(f){const h=Ij(f),y={current:!1},p=Wj(()=>{var m;u.get(),y.current?(m=h.next)==null||m.call(h,u._snapshot):y.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(f){const h=Xn,y=(a==null?void 0:a.compare)??Object.is;if(i)Xn=u,++Mc,u.depsTail=void 0;else if(f===void 0)return!1;i&&(u.flags=tt.Mutable|tt.RecursedCheck);try{const p=u._snapshot,m=typeof f=="function"?f(p):f===void 0&&i?r(p):f;return p===void 0||!y(p,m)?(u._snapshot=m,!0):!1}finally{Xn=h,i&&(u.flags&=~tt.RecursedCheck),Gc(u)}}};return i?(u.flags=tt.Mutable|tt.Dirty,u.get=function(){const f=u.flags;if(f&tt.Dirty||f&tt.Pending&&k0(u.deps,u)){if(u._update()){const h=u.subs;h!==void 0&&ov(h)}}else f&tt.Pending&&(u.flags=f&~tt.Pending);return Xn!==void 0&&rv(u,Xn,Mc),u._snapshot}):u.set=function(f){if(u._update(f)){const h=u.subs;h!==void 0&&($j(h),ov(h),z0())}},u}function Wj(n){const a=()=>{const r=Xn;Xn=i,++Mc,i.depsTail=void 0,i.flags=tt.Watching|tt.RecursedCheck;try{return n()}finally{Xn=r,i.flags&=~tt.RecursedCheck,Gc(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:tt.Watching|tt.RecursedCheck,notify(){const r=this.flags;r&tt.Dirty||r&tt.Pending&&k0(this.deps,this)?a():this.flags=tt.Watching},stop(){this.flags=tt.None,this.depsTail=void 0,Gc(this)}};return a(),i}var xf={exports:{}},bf={},Sf={exports:{}},jf={};/**
18
+ * @license React
19
+ * use-sync-external-store-shim.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var uv;function ew(){if(uv)return jf;uv=1;var n=Kr();function a(v,b){return v===b&&(v!==0||1/v===1/b)||v!==v&&b!==b}var i=typeof Object.is=="function"?Object.is:a,r=n.useState,u=n.useEffect,f=n.useLayoutEffect,h=n.useDebugValue;function y(v,b){var w=b(),N=r({inst:{value:w,getSnapshot:b}}),R=N[0].inst,j=N[1];return f(function(){R.value=w,R.getSnapshot=b,p(R)&&j({inst:R})},[v,w,b]),u(function(){return p(R)&&j({inst:R}),v(function(){p(R)&&j({inst:R})})},[v]),h(w),w}function p(v){var b=v.getSnapshot;v=v.value;try{var w=b();return!i(v,w)}catch{return!0}}function m(v,b){return b()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:y;return jf.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:x,jf}var dv;function tw(){return dv||(dv=1,Sf.exports=ew()),Sf.exports}/**
26
+ * @license React
27
+ * use-sync-external-store-shim/with-selector.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var fv;function nw(){if(fv)return bf;fv=1;var n=Kr(),a=tw();function i(m,x){return m===x&&(m!==0||1/m===1/x)||m!==m&&x!==x}var r=typeof Object.is=="function"?Object.is:i,u=a.useSyncExternalStore,f=n.useRef,h=n.useEffect,y=n.useMemo,p=n.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(m,x,v,b,w){var N=f(null);if(N.current===null){var R={hasValue:!1,value:null};N.current=R}else R=N.current;N=y(function(){function O(D){if(!A){if(A=!0,B=D,D=b(D),w!==void 0&&R.hasValue){var z=R.value;if(w(z,D))return T=z}return T=D}if(z=T,r(B,D))return z;var k=b(D);return w!==void 0&&w(z,k)?(B=D,z):(B=D,T=k)}var A=!1,B,T,q=v===void 0?null:v;return[function(){return O(x())},q===null?void 0:function(){return O(q())}]},[x,v,b,w]);var j=u(m,N[0],N[1]);return h(function(){R.hasValue=!0,R.value=j},[j]),p(j),j},bf}var hv;function sw(){return hv||(hv=1,xf.exports=nw()),xf.exports}var aw=sw();function iw(n,a){return n===a}function en(n,a,i=iw){const r=Q.useCallback(h=>{if(!n)return()=>{};const{unsubscribe:y}=n.subscribe(h);return y},[n]),u=Q.useCallback(()=>n==null?void 0:n.get(),[n]);return aw.useSyncExternalStoreWithSelector(r,u,u,a,i)}var lw={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function hi(n){const a=pn(),i=Q.useContext(n.from?Zj:Xc),r=n.from??i,u=r?n.from?a.stores.getRouteMatchStore(r):a.stores.matchStores.get(r):void 0,f=Q.useRef(void 0);return en(u??lw,h=>{if((n.shouldThrow??!0)&&!h&&Rs(),h===void 0)return;const y=n.select?n.select(h):h;if(n.structuralSharing??a.options.defaultStructuralSharing){const p=ga(f.current,y);return f.current=p,p}return y})}function D0(n){return hi({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:a=>n.select?n.select(a.loaderData):a.loaderData})}function U0(n){const{select:a,...i}=n;return hi({...i,select:r=>a?a(r.loaderDeps):r.loaderDeps})}function L0(n){return hi({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:a=>{const i=n.strict===!1?a.params:a._strictParams;return n.select?n.select(i):i}})}function B0(n){return hi({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:a=>n.select?n.select(a.search):a.search})}function q0(n){const a=pn();return Q.useCallback(i=>a.navigate({...i,from:i.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,a])}function H0(n){return hi({...n,select:a=>n.select?n.select(a.context):a.context})}var wf={exports:{}},Mt={};/**
34
+ * @license React
35
+ * react-dom.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var mv;function rw(){if(mv)return Mt;mv=1;var n=Kr();function a(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)m+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(p,m,x){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:v==null?null:""+v,children:p,containerInfo:m,implementation:x}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Mt.createPortal=function(p,m){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(a(299));return f(p,m,null,x)},Mt.flushSync=function(p){var m=h.T,x=r.p;try{if(h.T=null,r.p=2,p)return p()}finally{h.T=m,r.p=x,r.d.f()}},Mt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Mt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Mt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var x=m.as,v=y(x,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;x==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:b,fetchPriority:w}):x==="script"&&r.d.X(p,{crossOrigin:v,integrity:b,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Mt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var x=y(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},Mt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var x=m.as,v=y(x,m.crossOrigin);r.d.L(p,x,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Mt.preloadModule=function(p,m){if(typeof p=="string")if(m){var x=y(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},Mt.requestFormReset=function(p){r.d.r(p)},Mt.unstable_batchedUpdates=function(p,m){return p(m)},Mt.useFormState=function(p,m,x){return h.H.useFormState(p,m,x)},Mt.useFormStatus=function(){return h.H.useHostTransitionStatus()},Mt.version="19.2.6",Mt}var pv;function Q0(){if(pv)return wf.exports;pv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),wf.exports=rw(),wf.exports}var ow=Q0();function cw(n,a){const i=pn(),r=VS(a),{activeProps:u,inactiveProps:f,activeOptions:h,to:y,preload:p,preloadDelay:m,preloadIntentProximity:x,hashScrollIntoView:v,replace:b,startTransition:w,resetScroll:N,viewTransition:R,children:j,target:O,disabled:A,style:B,className:T,onClick:q,onBlur:D,onFocus:z,onMouseEnter:k,onMouseLeave:Y,onTouchStart:W,ignoreBlocker:ee,params:F,search:X,hash:te,state:fe,mask:L,reloadDocument:K,unsafeRelative:ue,from:ze,_fromLocation:ne,...E}=n,J=M0(),se=Q.useMemo(()=>n,[i,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),ae=en(i.stores.location,Ye=>Ye,(Ye,jt)=>Ye.href===jt.href),ie=Q.useMemo(()=>{const Ye={_fromLocation:ae,...se};return i.buildLocation(Ye)},[i,ae,se]),me=ie.maskedLocation?ie.maskedLocation.publicHref:ie.publicHref,_e=ie.maskedLocation?ie.maskedLocation.external:ie.external,Ve=Q.useMemo(()=>pw(me,_e,i.history,A),[A,_e,me,i.history]),be=Q.useMemo(()=>{if(Ve!=null&&Ve.external)return Bc(Ve.href,i.protocolAllowlist)?void 0:Ve.href;if(!yw(y)&&!(typeof y!="string"||y.indexOf(":")===-1))try{return new URL(y),Bc(y,i.protocolAllowlist)?void 0:y}catch{}},[y,Ve,i.protocolAllowlist]),vn=Q.useMemo(()=>{if(be)return!1;if(h!=null&&h.exact){if(!rj(ae.pathname,ie.pathname,i.basepath))return!1}else{const Ye=qc(ae.pathname,i.basepath),jt=qc(ie.pathname,i.basepath);if(!(Ye.startsWith(jt)&&(Ye.length===jt.length||Ye[jt.length]==="/")))return!1}return((h==null?void 0:h.includeSearch)??!0)&&!oi(ae.search,ie.search,{partial:!(h!=null&&h.exact),ignoreUndefined:!(h!=null&&h.explicitUndefined)})?!1:h!=null&&h.includeHash?J&&ae.hash===ie.hash:!0},[h==null?void 0:h.exact,h==null?void 0:h.explicitUndefined,h==null?void 0:h.includeHash,h==null?void 0:h.includeSearch,ae,be,J,ie.hash,ie.pathname,ie.search,i.basepath]),Gt=vn?Ja(u,{})??uw:Nf,tn=vn?Nf:Ja(f,{})??Nf,$n=[T,Gt.className,tn.className].filter(Boolean).join(" "),Ot=(B||Gt.style||tn.style)&&{...B,...Gt.style,...tn.style},[Tl,pi]=Q.useState(!1),Fr=Q.useRef(!1),Wn=n.reloadDocument||be?!1:p??i.options.defaultPreload,Ca=m??i.options.defaultPreloadDelay??0,kn=Q.useCallback(()=>{i.preloadRoute({...se,_builtLocation:ie}).catch(Ye=>{console.warn(Ye),console.warn(Pj)})},[i,se,ie]);PS(r,Q.useCallback(Ye=>{Ye!=null&&Ye.isIntersecting&&kn()},[kn]),mw,{disabled:!!A||Wn!=="viewport"}),Q.useEffect(()=>{Fr.current||!A&&Wn==="render"&&(kn(),Fr.current=!0)},[A,kn,Wn]);const El=Ye=>{const jt=Ye.currentTarget.getAttribute("target"),Qn=O!==void 0?O:jt;if(!A&&!gw(Ye)&&!Ye.defaultPrevented&&(!Qn||Qn==="_self")&&Ye.button===0){Ye.preventDefault(),ow.flushSync(()=>{pi(!0)});const yi=i.subscribe("onResolved",()=>{yi(),pi(!1)});i.navigate({...se,replace:b,resetScroll:N,hashScrollIntoView:v,startTransition:w,viewTransition:R,ignoreBlocker:ee})}};if(be)return{...E,ref:r,href:be,...j&&{children:j},...O&&{target:O},...A&&{disabled:A},...B&&{style:B},...T&&{className:T},...q&&{onClick:q},...D&&{onBlur:D},...z&&{onFocus:z},...k&&{onMouseEnter:k},...Y&&{onMouseLeave:Y},...W&&{onTouchStart:W}};const Ir=Ye=>{if(A||Wn!=="intent")return;if(!Ca){kn();return}const jt=Ye.currentTarget;if(Rr.has(jt))return;const Qn=setTimeout(()=>{Rr.delete(jt),kn()},Ca);Rr.set(jt,Qn)},Fc=Ye=>{A||Wn!=="intent"||kn()},Et=Ye=>{if(A||!Wn||!Ca)return;const jt=Ye.currentTarget,Qn=Rr.get(jt);Qn&&(clearTimeout(Qn),Rr.delete(jt))};return{...E,...Gt,...tn,href:Ve==null?void 0:Ve.href,ref:r,onClick:tl([q,El]),onBlur:tl([D,Et]),onFocus:tl([z,Ir]),onMouseEnter:tl([k,Ir]),onMouseLeave:tl([Y,Et]),onTouchStart:tl([W,Fc]),disabled:!!A,target:O,...Ot&&{style:Ot},...$n&&{className:$n},...A&&dw,...vn&&fw,...J&&Tl&&hw}}var Nf={},uw={className:"active"},dw={role:"link","aria-disabled":!0},fw={"data-status":"active","aria-current":"page"},hw={"data-transitioning":"transitioning"},Rr=new WeakMap,mw={rootMargin:"100px"},tl=n=>a=>{for(const i of n)if(i){if(a.defaultPrevented)return;i(a)}};function pw(n,a,i,r){if(!r)return a?{href:n,external:!0}:{href:i.createHref(n)||"/",external:!1}}function yw(n){if(typeof n!="string")return!1;const a=n.charCodeAt(0);return a===47?n.charCodeAt(1)!==47:a===46}var jl=Q.forwardRef((n,a)=>{const{_asChild:i,...r}=n,{type:u,...f}=cw(r,a),h=typeof r.children=="function"?r.children({isActive:f["data-status"]==="active"}):r.children;if(!i){const{disabled:y,...p}=f;return Q.createElement("a",p,h)}return Q.createElement(i,f,h)});function gw(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var vw=class extends E0{constructor(n){super(n),this.useMatch=a=>hi({select:a==null?void 0:a.select,from:this.id,structuralSharing:a==null?void 0:a.structuralSharing}),this.useRouteContext=a=>H0({...a,from:this.id}),this.useSearch=a=>B0({select:a==null?void 0:a.select,structuralSharing:a==null?void 0:a.structuralSharing,from:this.id}),this.useParams=a=>L0({select:a==null?void 0:a.select,structuralSharing:a==null?void 0:a.structuralSharing,from:this.id}),this.useLoaderDeps=a=>U0({...a,from:this.id}),this.useLoaderData=a=>D0({...a,from:this.id}),this.useNavigate=()=>q0({from:this.fullPath}),this.Link=Dr.forwardRef((a,i)=>o.jsx(jl,{ref:i,from:this.fullPath,...a}))}};function Mn(n){return new vw(n)}var xw=class extends Vj{constructor(n){super(n),this.useMatch=a=>hi({select:a==null?void 0:a.select,from:this.id,structuralSharing:a==null?void 0:a.structuralSharing}),this.useRouteContext=a=>H0({...a,from:this.id}),this.useSearch=a=>B0({select:a==null?void 0:a.select,structuralSharing:a==null?void 0:a.structuralSharing,from:this.id}),this.useParams=a=>L0({select:a==null?void 0:a.select,structuralSharing:a==null?void 0:a.structuralSharing,from:this.id}),this.useLoaderDeps=a=>U0({...a,from:this.id}),this.useLoaderData=a=>D0({...a,from:this.id}),this.useNavigate=()=>q0({from:this.fullPath}),this.Link=Dr.forwardRef((a,i)=>o.jsx(jl,{ref:i,from:this.fullPath,...a}))}};function bw(n){return new xw(n)}function Sw(n){const a=pn(),i=`not-found-${en(a.stores.location,r=>r.pathname)}-${en(a.stores.status,r=>r)}`;return o.jsx(bh,{getResetKey:()=>i,onCatch:(r,u)=>{var f;if(kt(r))(f=n.onCatch)==null||f.call(n,r,u);else throw r},errorComponent:({error:r})=>{var u;if(kt(r))return(u=n.fallback)==null?void 0:u.call(n,r);throw r},children:n.children})}function jw(){return o.jsx("p",{children:"Not Found"})}function il(n){return o.jsx(o.Fragment,{children:n.children})}function G0(n,a,i){return a.options.notFoundComponent?o.jsx(a.options.notFoundComponent,{...i}):n.options.defaultNotFoundComponent?o.jsx(n.options.defaultNotFoundComponent,{...i}):o.jsx(jw,{})}function ww(n){return null}function Nw(){return ww(pn()),null}var P0=Q.memo(function({matchId:a}){const i=pn(),r=i.stores.matchStores.get(a);r||Rs();const u=en(i.stores.loadedAt,h=>h),f=en(r,h=>h);return o.jsx(Rw,{router:i,matchId:a,resetKey:u,matchState:Q.useMemo(()=>{var p;const h=f.routeId,y=(p=i.routesById[h].parentRoute)==null?void 0:p.id;return{routeId:h,ssr:f.ssr,_displayPending:f._displayPending,parentRouteId:y}},[f._displayPending,f.routeId,f.ssr,i.routesById])})});function Rw({router:n,matchId:a,resetKey:i,matchState:r}){var N,R;const u=n.routesById[r.routeId],f=u.options.pendingComponent??n.options.defaultPendingComponent,h=f?o.jsx(f,{}):null,y=u.options.errorComponent??n.options.defaultErrorComponent,p=u.options.onCatch??n.options.defaultOnCatch,m=u.isRoot?u.options.notFoundComponent??((N=n.options.notFoundRoute)==null?void 0:N.options.component):u.options.notFoundComponent,x=r.ssr===!1||r.ssr==="data-only",v=(!u.isRoot||u.options.wrapInSuspense||x)&&(u.options.wrapInSuspense??f??(((R=u.options.errorComponent)==null?void 0:R.preload)||x))?Q.Suspense:il,b=y?bh:il,w=m?Sw:il;return o.jsxs(u.isRoot?u.options.shellComponent??il:il,{children:[o.jsx(Xc.Provider,{value:a,children:o.jsx(v,{fallback:h,children:o.jsx(b,{getResetKey:()=>i,errorComponent:y||Sh,onCatch:(j,O)=>{if(kt(j))throw j.routeId??(j.routeId=r.routeId),j;p==null||p(j,O)},children:o.jsx(w,{fallback:j=>{if(j.routeId??(j.routeId=r.routeId),!m||j.routeId&&j.routeId!==r.routeId||!j.routeId&&!u.isRoot)throw j;return Q.createElement(m,j)},children:x||r._displayPending?o.jsx(Kj,{fallback:h,children:o.jsx(yv,{matchId:a})}):o.jsx(yv,{matchId:a})})})})}),r.parentRouteId===ci?o.jsxs(o.Fragment,{children:[o.jsx(Cw,{resetKey:i}),n.options.scrollRestoration&&p0?o.jsx(Nw,{}):null]}):null]})}function Cw({resetKey:n}){const a=pn(),i=Q.useRef(void 0);return kr(()=>{const r=a.latestLocation.href;(i.current===void 0||i.current!==r)&&(a.emit({type:"onRendered",...ll(a.stores.location.get(),a.stores.resolvedLocation.get())}),i.current=r)},[a.latestLocation.state.__TSR_key,n,a]),null}var yv=Q.memo(function({matchId:a}){const i=pn(),r=(x,v)=>{var b;return((b=i.getMatch(x.id))==null?void 0:b._nonReactive[v])??x._nonReactive[v]},u=i.stores.matchStores.get(a);u||Rs();const f=en(u,x=>x),h=f.routeId,y=i.routesById[h],p=Q.useMemo(()=>{var v;const x=(v=i.routesById[h].options.remountDeps??i.options.defaultRemountDeps)==null?void 0:v({routeId:h,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return x?JSON.stringify(x):void 0},[h,f.loaderDeps,f._strictParams,f._strictSearch,i.options.defaultRemountDeps,i.routesById]),m=Q.useMemo(()=>{const x=y.options.component??i.options.defaultComponent;return x?o.jsx(x,{},p):o.jsx(V0,{})},[p,y.options.component,i.options.defaultComponent]);if(f._displayPending)throw r(f,"displayPendingPromise");if(f._forcePending)throw r(f,"minPendingPromise");if(f.status==="pending"){const x=y.options.pendingMinMs??i.options.defaultPendingMinMs;if(x){const v=i.getMatch(f.id);if(v&&!v._nonReactive.minPendingPromise){const b=Sl();v._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),v._nonReactive.minPendingPromise=void 0},x)}}throw r(f,"loadPromise")}if(f.status==="notFound")return kt(f.error)||Rs(),G0(i,y,f.error);if(f.status==="redirected")throw $t(f.error)||Rs(),r(f,"loadPromise");if(f.status==="error")throw f.error;return m}),V0=Q.memo(function(){const a=pn(),i=Q.useContext(Xc);let r,u=!1,f;{const m=i?a.stores.matchStores.get(i):void 0;[r,u]=en(m,x=>[x==null?void 0:x.routeId,(x==null?void 0:x.globalNotFound)??!1]),f=en(a.stores.matchesId,x=>x[x.findIndex(v=>v===i)+1])}const h=r?a.routesById[r]:void 0,y=a.options.defaultPendingComponent?o.jsx(a.options.defaultPendingComponent,{}):null;if(u)return h||Rs(),G0(a,h,void 0);if(!f)return null;const p=o.jsx(P0,{matchId:f});return r===ci?o.jsx(Q.Suspense,{fallback:y,children:p}):p});function _w(){const n=pn(),a=Q.useRef({router:n,mounted:!1}),[i,r]=Q.useState(!1),u=en(n.stores.isLoading,v=>v),f=en(n.stores.hasPending,v=>v),h=ff(u),y=u||i||f,p=ff(y),m=u||f,x=ff(m);return n.startTransition=v=>{r(!0),Q.startTransition(()=>{v(),r(!1)})},Q.useEffect(()=>{const v=n.history.subscribe(n.load),b=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ns(n.latestLocation.publicHref)!==Ns(b.publicHref)&&n.commitLocation({...b,replace:!0}),()=>{v()}},[n,n.history]),kr(()=>{if(typeof window<"u"&&n.ssr||a.current.router===n&&a.current.mounted)return;a.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(b){console.error(b)}})()},[n]),kr(()=>{h&&!u&&n.emit({type:"onLoad",...ll(n.stores.location.get(),n.stores.resolvedLocation.get())})},[h,n,u]),kr(()=>{x&&!m&&n.emit({type:"onBeforeRouteMount",...ll(n.stores.location.get(),n.stores.resolvedLocation.get())})},[m,x,n]),kr(()=>{if(p&&!y){const v=ll(n.stores.location.get(),n.stores.resolvedLocation.get());n.emit({type:"onResolved",...v}),O0(()=>{n.stores.status.set("idle"),n.stores.resolvedLocation.set(n.stores.location.get())})}},[y,p,n]),null}function Tw(){const n=pn(),a=n.routesById[ci].options.pendingComponent??n.options.defaultPendingComponent,i=a?o.jsx(a,{}):null,r=o.jsxs(typeof document<"u"&&n.ssr?il:Q.Suspense,{fallback:i,children:[o.jsx(_w,{}),o.jsx(Ew,{})]});return n.options.InnerWrap?o.jsx(n.options.InnerWrap,{children:r}):r}function Ew(){const n=pn(),a=en(n.stores.firstId,u=>u),i=en(n.stores.loadedAt,u=>u),r=a?o.jsx(P0,{matchId:a}):null;return o.jsx(Xc.Provider,{value:a,children:n.options.disableGlobalCatchBoundary?r:o.jsx(bh,{getResetKey:()=>i,errorComponent:Sh,onCatch:void 0,children:r})})}var Mw=n=>({createMutableStore:cv,createReadonlyStore:cv,batch:O0}),Aw=n=>new kw(n),kw=class extends Ej{constructor(n){super(n,Mw)}};function Ow({router:n,children:a,...i}){g0(i)&&n.update({...n.options,...i,context:{...n.options.context,...i.context}});const r=o.jsx(A0.Provider,{value:n,children:a});return n.options.Wrap?o.jsx(n.options.Wrap,{children:r}):r}function zw({router:n,...a}){return o.jsx(Ow,{router:n,...a,children:o.jsx(Tw,{})})}function Dw(n){const a=pn({warn:(n==null?void 0:n.router)===void 0}),i=(n==null?void 0:n.router)||a,r=Q.useRef(void 0);return en(i.stores.__store,u=>{if(n!=null&&n.select){if(n.structuralSharing??i.options.defaultStructuralSharing){const f=ga(r.current,n.select(u));return r.current=f,f}return n.select(u)}return u})}var Rf={exports:{}},Cr={},Cf={exports:{}},_f={};/**
42
+ * @license React
43
+ * scheduler.production.js
44
+ *
45
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
46
+ *
47
+ * This source code is licensed under the MIT license found in the
48
+ * LICENSE file in the root directory of this source tree.
49
+ */var gv;function Uw(){return gv||(gv=1,(function(n){function a(L,K){var ue=L.length;L.push(K);e:for(;0<ue;){var ze=ue-1>>>1,ne=L[ze];if(0<u(ne,K))L[ze]=K,L[ue]=ne,ue=ze;else break e}}function i(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var K=L[0],ue=L.pop();if(ue!==K){L[0]=ue;e:for(var ze=0,ne=L.length,E=ne>>>1;ze<E;){var J=2*(ze+1)-1,se=L[J],ae=J+1,ie=L[ae];if(0>u(se,ue))ae<ne&&0>u(ie,se)?(L[ze]=ie,L[ae]=ue,ze=ae):(L[ze]=se,L[J]=ue,ze=J);else if(ae<ne&&0>u(ie,ue))L[ze]=ie,L[ae]=ue,ze=ae;else break e}}return K}function u(L,K){var ue=L.sortIndex-K.sortIndex;return ue!==0?ue:L.id-K.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var h=Date,y=h.now();n.unstable_now=function(){return h.now()-y}}var p=[],m=[],x=1,v=null,b=3,w=!1,N=!1,R=!1,j=!1,O=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function T(L){for(var K=i(m);K!==null;){if(K.callback===null)r(m);else if(K.startTime<=L)r(m),K.sortIndex=K.expirationTime,a(p,K);else break;K=i(m)}}function q(L){if(R=!1,T(L),!N)if(i(p)!==null)N=!0,D||(D=!0,F());else{var K=i(m);K!==null&&fe(q,K.startTime-L)}}var D=!1,z=-1,k=5,Y=-1;function W(){return j?!0:!(n.unstable_now()-Y<k)}function ee(){if(j=!1,D){var L=n.unstable_now();Y=L;var K=!0;try{e:{N=!1,R&&(R=!1,A(z),z=-1),w=!0;var ue=b;try{t:{for(T(L),v=i(p);v!==null&&!(v.expirationTime>L&&W());){var ze=v.callback;if(typeof ze=="function"){v.callback=null,b=v.priorityLevel;var ne=ze(v.expirationTime<=L);if(L=n.unstable_now(),typeof ne=="function"){v.callback=ne,T(L),K=!0;break t}v===i(p)&&r(p),T(L)}else r(p);v=i(p)}if(v!==null)K=!0;else{var E=i(m);E!==null&&fe(q,E.startTime-L),K=!1}}break e}finally{v=null,b=ue,w=!1}K=void 0}}finally{K?F():D=!1}}}var F;if(typeof B=="function")F=function(){B(ee)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,te=X.port2;X.port1.onmessage=ee,F=function(){te.postMessage(null)}}else F=function(){O(ee,0)};function fe(L,K){z=O(function(){L(n.unstable_now())},K)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(L){switch(b){case 1:case 2:case 3:var K=3;break;default:K=b}var ue=b;b=K;try{return L()}finally{b=ue}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(L,K){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ue=b;b=L;try{return K()}finally{b=ue}},n.unstable_scheduleCallback=function(L,K,ue){var ze=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?ze+ue:ze):ue=ze,L){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=ue+ne,L={id:x++,callback:K,priorityLevel:L,startTime:ue,expirationTime:ne,sortIndex:-1},ue>ze?(L.sortIndex=ue,a(m,L),i(p)===null&&L===i(m)&&(R?(A(z),z=-1):R=!0,fe(q,ue-ze))):(L.sortIndex=ne,a(p,L),N||w||(N=!0,D||(D=!0,F()))),L},n.unstable_shouldYield=W,n.unstable_wrapCallback=function(L){var K=b;return function(){var ue=b;b=K;try{return L.apply(this,arguments)}finally{b=ue}}}})(_f)),_f}var vv;function Lw(){return vv||(vv=1,Cf.exports=Uw()),Cf.exports}/**
50
+ * @license React
51
+ * react-dom-client.production.js
52
+ *
53
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE file in the root directory of this source tree.
57
+ */var xv;function Bw(){if(xv)return Cr;xv=1;var n=Lw(),a=Kr(),i=Q0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(f(e)!==e)throw Error(r(188))}function m(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var s=e,l=t;;){var c=s.return;if(c===null)break;var d=c.alternate;if(d===null){if(l=c.return,l!==null){s=l;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===s)return p(c),e;if(d===l)return p(c),t;d=d.sibling}throw Error(r(188))}if(s.return!==l.return)s=c,l=d;else{for(var g=!1,S=c.child;S;){if(S===s){g=!0,s=c,l=d;break}if(S===l){g=!0,l=c,s=d;break}S=S.sibling}if(!g){for(S=d.child;S;){if(S===s){g=!0,s=d,l=c;break}if(S===l){g=!0,l=d,s=c;break}S=S.sibling}if(!g)throw Error(r(189))}}if(s.alternate!==l)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),B=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var X=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===X?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case O:return"Profiler";case j:return"StrictMode";case q:return"Suspense";case D:return"SuspenseList";case Y:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case B:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case T:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var fe=Array.isArray,L=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},ze=[],ne=-1;function E(e){return{current:e}}function J(e){0>ne||(e.current=ze[ne],ze[ne]=null,ne--)}function se(e,t){ne++,ze[ne]=e.current,e.current=t}var ae=E(null),ie=E(null),me=E(null),_e=E(null);function Ve(e,t){switch(se(me,t),se(ie,e),se(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Iy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Iy(t),e=Jy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}J(ae),se(ae,e)}function be(){J(ae),J(ie),J(me)}function vn(e){e.memoizedState!==null&&se(_e,e);var t=ae.current,s=Jy(t,e.type);t!==s&&(se(ie,e),se(ae,s))}function Gt(e){ie.current===e&&(J(ae),J(ie)),_e.current===e&&(J(_e),vr._currentValue=ue)}var tn,$n;function Ot(e){if(tn===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);tn=t&&t[1]||"",$n=-1<s.stack.indexOf(`
58
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
59
+ `+tn+e+$n}var Tl=!1;function pi(e,t){if(!e||Tl)return"";Tl=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(V){var P=V}Reflect.construct(e,[],$)}else{try{$.call()}catch(V){P=V}e.call($.prototype)}}else{try{throw Error()}catch(V){P=V}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(V){if(V&&P&&typeof V.stack=="string")return[V.stack,P.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=l.DetermineComponentFrameRoot(),g=d[0],S=d[1];if(g&&S){var C=g.split(`
60
+ `),G=S.split(`
61
+ `);for(c=l=0;l<C.length&&!C[l].includes("DetermineComponentFrameRoot");)l++;for(;c<G.length&&!G[c].includes("DetermineComponentFrameRoot");)c++;if(l===C.length||c===G.length)for(l=C.length-1,c=G.length-1;1<=l&&0<=c&&C[l]!==G[c];)c--;for(;1<=l&&0<=c;l--,c--)if(C[l]!==G[c]){if(l!==1||c!==1)do if(l--,c--,0>c||C[l]!==G[c]){var Z=`
62
+ `+C[l].replace(" at new "," at ");return e.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",e.displayName)),Z}while(1<=l&&0<=c);break}}}finally{Tl=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Ot(s):""}function Fr(e,t){switch(e.tag){case 26:case 27:case 5:return Ot(e.type);case 16:return Ot("Lazy");case 13:return e.child!==t&&t!==null?Ot("Suspense Fallback"):Ot("Suspense");case 19:return Ot("SuspenseList");case 0:case 15:return pi(e.type,!1);case 11:return pi(e.type.render,!1);case 1:return pi(e.type,!0);case 31:return Ot("Activity");default:return""}}function Wn(e){try{var t="",s=null;do t+=Fr(e,s),s=e,e=e.return;while(e);return t}catch(l){return`
63
+ Error generating stack: `+l.message+`
64
+ `+l.stack}}var Ca=Object.prototype.hasOwnProperty,kn=n.unstable_scheduleCallback,El=n.unstable_cancelCallback,Ir=n.unstable_shouldYield,Fc=n.unstable_requestPaint,Et=n.unstable_now,Ye=n.unstable_getCurrentPriorityLevel,jt=n.unstable_ImmediatePriority,Qn=n.unstable_UserBlockingPriority,yi=n.unstable_NormalPriority,zx=n.unstable_LowPriority,Mh=n.unstable_IdlePriority,Dx=n.log,Ux=n.unstable_setDisableYieldValue,Ml=null,nn=null;function Ms(e){if(typeof Dx=="function"&&Ux(e),nn&&typeof nn.setStrictMode=="function")try{nn.setStrictMode(Ml,e)}catch{}}var sn=Math.clz32?Math.clz32:qx,Lx=Math.log,Bx=Math.LN2;function qx(e){return e>>>=0,e===0?32:31-(Lx(e)/Bx|0)|0}var Jr=256,$r=262144,Wr=4194304;function _a(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function eo(e,t,s){var l=e.pendingLanes;if(l===0)return 0;var c=0,d=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=l&134217727;return S!==0?(l=S&~d,l!==0?c=_a(l):(g&=S,g!==0?c=_a(g):s||(s=S&~e,s!==0&&(c=_a(s))))):(S=l&~d,S!==0?c=_a(S):g!==0?c=_a(g):s||(s=l&~e,s!==0&&(c=_a(s)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,s=t&-t,d>=s||d===32&&(s&4194048)!==0)?t:c}function Al(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Hx(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ah(){var e=Wr;return Wr<<=1,(Wr&62914560)===0&&(Wr=4194304),e}function Ic(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function kl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qx(e,t,s,l,c,d){var g=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var S=e.entanglements,C=e.expirationTimes,G=e.hiddenUpdates;for(s=g&~s;0<s;){var Z=31-sn(s),$=1<<Z;S[Z]=0,C[Z]=-1;var P=G[Z];if(P!==null)for(G[Z]=null,Z=0;Z<P.length;Z++){var V=P[Z];V!==null&&(V.lane&=-536870913)}s&=~$}l!==0&&kh(e,l,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(g&~t))}function kh(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-sn(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|s&261930}function Oh(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var l=31-sn(s),c=1<<l;c&t|e[l]&t&&(e[l]|=t),s&=~c}}function zh(e,t){var s=t&-t;return s=(s&42)!==0?1:Jc(s),(s&(e.suspendedLanes|t))!==0?0:s}function Jc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function $c(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Dh(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:bg(e.type))}function Uh(e,t){var s=K.p;try{return K.p=e,t()}finally{K.p=s}}var As=Math.random().toString(36).slice(2),wt="__reactFiber$"+As,Pt="__reactProps$"+As,gi="__reactContainer$"+As,Wc="__reactEvents$"+As,Gx="__reactListeners$"+As,Px="__reactHandles$"+As,Lh="__reactResources$"+As,Ol="__reactMarker$"+As;function eu(e){delete e[wt],delete e[Pt],delete e[Wc],delete e[Gx],delete e[Px]}function vi(e){var t=e[wt];if(t)return t;for(var s=e.parentNode;s;){if(t=s[gi]||s[wt]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=ag(e);e!==null;){if(s=e[wt])return s;e=ag(e)}return t}e=s,s=e.parentNode}return null}function xi(e){if(e=e[wt]||e[gi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function zl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function bi(e){var t=e[Lh];return t||(t=e[Lh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[Ol]=!0}var Bh=new Set,qh={};function Ta(e,t){Si(e,t),Si(e+"Capture",t)}function Si(e,t){for(qh[e]=t,e=0;e<t.length;e++)Bh.add(t[e])}var Vx=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Hh={},Qh={};function Yx(e){return Ca.call(Qh,e)?!0:Ca.call(Hh,e)?!1:Vx.test(e)?Qh[e]=!0:(Hh[e]=!0,!1)}function to(e,t,s){if(Yx(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function no(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function es(e,t,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+l)}}function xn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Gh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kx(e,t,s){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,d=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(g){s=""+g,d.call(this,g)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(g){s=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tu(e){if(!e._valueTracker){var t=Gh(e)?"checked":"value";e._valueTracker=Kx(e,t,""+e[t])}}function Ph(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),l="";return e&&(l=Gh(e)?e.checked?"true":"false":e.value),e=l,e!==s?(t.setValue(e),!0):!1}function so(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Xx=/[\n"\\]/g;function bn(e){return e.replace(Xx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function nu(e,t,s,l,c,d,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xn(t)):e.value!==""+xn(t)&&(e.value=""+xn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?su(e,g,xn(t)):s!=null?su(e,g,xn(s)):l!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+xn(S):e.removeAttribute("name")}function Vh(e,t,s,l,c,d,g,S){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||s!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){tu(e);return}s=s!=null?""+xn(s):"",t=t!=null?""+xn(t):s,S||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=S?e.checked:!!l,e.defaultChecked=!!l,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),tu(e)}function su(e,t,s){t==="number"&&so(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function ji(e,t,s,l){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&l&&(e[s].defaultSelected=!0)}else{for(s=""+xn(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Yh(e,t,s){if(t!=null&&(t=""+xn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+xn(s):""}function Kh(e,t,s,l){if(t==null){if(l!=null){if(s!=null)throw Error(r(92));if(fe(l)){if(1<l.length)throw Error(r(93));l=l[0]}s=l}s==null&&(s=""),t=s}s=xn(t),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l),tu(e)}function wi(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var Zx=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Xh(e,t,s){var l=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,s):typeof s!="number"||s===0||Zx.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function Zh(e,t,s){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&s[c]!==l&&Xh(e,c,l)}else for(var d in t)t.hasOwnProperty(d)&&Xh(e,d,t[d])}function au(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Fx=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ix=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ao(e){return Ix.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ts(){}var iu=null;function lu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ni=null,Ri=null;function Fh(e){var t=xi(e);if(t&&(e=t.stateNode)){var s=e[Pt]||null;e:switch(e=t.stateNode,t.type){case"input":if(nu(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+bn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var l=s[t];if(l!==e&&l.form===e.form){var c=l[Pt]||null;if(!c)throw Error(r(90));nu(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<s.length;t++)l=s[t],l.form===e.form&&Ph(l)}break e;case"textarea":Yh(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&ji(e,!!s.multiple,t,!1)}}}var ru=!1;function Ih(e,t,s){if(ru)return e(t,s);ru=!0;try{var l=e(t);return l}finally{if(ru=!1,(Ni!==null||Ri!==null)&&(Ko(),Ni&&(t=Ni,e=Ri,Ri=Ni=null,Fh(t),e)))for(t=0;t<e.length;t++)Fh(e[t])}}function Dl(e,t){var s=e.stateNode;if(s===null)return null;var l=s[Pt]||null;if(l===null)return null;s=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(r(231,t,typeof s));return s}var ns=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ou=!1;if(ns)try{var Ul={};Object.defineProperty(Ul,"passive",{get:function(){ou=!0}}),window.addEventListener("test",Ul,Ul),window.removeEventListener("test",Ul,Ul)}catch{ou=!1}var ks=null,cu=null,io=null;function Jh(){if(io)return io;var e,t=cu,s=t.length,l,c="value"in ks?ks.value:ks.textContent,d=c.length;for(e=0;e<s&&t[e]===c[e];e++);var g=s-e;for(l=1;l<=g&&t[s-l]===c[d-l];l++);return io=c.slice(e,1<l?1-l:void 0)}function lo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ro(){return!0}function $h(){return!1}function Vt(e){function t(s,l,c,d,g){this._reactName=s,this._targetInst=c,this.type=l,this.nativeEvent=d,this.target=g,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(s=e[S],this[S]=s?s(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?ro:$h,this.isPropagationStopped=$h,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=ro)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=ro)},persist:function(){},isPersistent:ro}),t}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=Vt(Ea),Ll=v({},Ea,{view:0,detail:0}),Jx=Vt(Ll),uu,du,Bl,co=v({},Ll,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Bl&&(Bl&&e.type==="mousemove"?(uu=e.screenX-Bl.screenX,du=e.screenY-Bl.screenY):du=uu=0,Bl=e),uu)},movementY:function(e){return"movementY"in e?e.movementY:du}}),Wh=Vt(co),$x=v({},co,{dataTransfer:0}),Wx=Vt($x),eb=v({},Ll,{relatedTarget:0}),fu=Vt(eb),tb=v({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),nb=Vt(tb),sb=v({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ab=Vt(sb),ib=v({},Ea,{data:0}),em=Vt(ib),lb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ob={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ob[e])?!!t[e]:!1}function hu(){return cb}var ub=v({},Ll,{key:function(e){if(e.key){var t=lb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=lo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hu,charCode:function(e){return e.type==="keypress"?lo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?lo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),db=Vt(ub),fb=v({},co,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tm=Vt(fb),hb=v({},Ll,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hu}),mb=Vt(hb),pb=v({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),yb=Vt(pb),gb=v({},co,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),vb=Vt(gb),xb=v({},Ea,{newState:0,oldState:0}),bb=Vt(xb),Sb=[9,13,27,32],mu=ns&&"CompositionEvent"in window,ql=null;ns&&"documentMode"in document&&(ql=document.documentMode);var jb=ns&&"TextEvent"in window&&!ql,nm=ns&&(!mu||ql&&8<ql&&11>=ql),sm=" ",am=!1;function im(e,t){switch(e){case"keyup":return Sb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ci=!1;function wb(e,t){switch(e){case"compositionend":return lm(t);case"keypress":return t.which!==32?null:(am=!0,sm);case"textInput":return e=t.data,e===sm&&am?null:e;default:return null}}function Nb(e,t){if(Ci)return e==="compositionend"||!mu&&im(e,t)?(e=Jh(),io=cu=ks=null,Ci=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nm&&t.locale!=="ko"?null:t.data;default:return null}}var Rb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function rm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rb[e.type]:t==="textarea"}function om(e,t,s,l){Ni?Ri?Ri.push(l):Ri=[l]:Ni=l,t=Wo(t,"onChange"),0<t.length&&(s=new oo("onChange","change",null,s,l),e.push({event:s,listeners:t}))}var Hl=null,Ql=null;function Cb(e){Vy(e,0)}function uo(e){var t=zl(e);if(Ph(t))return e}function cm(e,t){if(e==="change")return t}var um=!1;if(ns){var pu;if(ns){var yu="oninput"in document;if(!yu){var dm=document.createElement("div");dm.setAttribute("oninput","return;"),yu=typeof dm.oninput=="function"}pu=yu}else pu=!1;um=pu&&(!document.documentMode||9<document.documentMode)}function fm(){Hl&&(Hl.detachEvent("onpropertychange",hm),Ql=Hl=null)}function hm(e){if(e.propertyName==="value"&&uo(Ql)){var t=[];om(t,Ql,e,lu(e)),Ih(Cb,t)}}function _b(e,t,s){e==="focusin"?(fm(),Hl=t,Ql=s,Hl.attachEvent("onpropertychange",hm)):e==="focusout"&&fm()}function Tb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uo(Ql)}function Eb(e,t){if(e==="click")return uo(t)}function Mb(e,t){if(e==="input"||e==="change")return uo(t)}function Ab(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:Ab;function Gl(e,t){if(an(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var c=s[l];if(!Ca.call(t,c)||!an(e[c],t[c]))return!1}return!0}function mm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pm(e,t){var s=mm(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=t&&l>=t)return{node:s,offset:t-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=mm(s)}}function ym(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ym(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=so(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=so(e.document)}return t}function gu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var kb=ns&&"documentMode"in document&&11>=document.documentMode,_i=null,vu=null,Pl=null,xu=!1;function vm(e,t,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;xu||_i==null||_i!==so(l)||(l=_i,"selectionStart"in l&&gu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Pl&&Gl(Pl,l)||(Pl=l,l=Wo(vu,"onSelect"),0<l.length&&(t=new oo("onSelect","select",null,t,s),e.push({event:t,listeners:l}),t.target=_i)))}function Ma(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Ti={animationend:Ma("Animation","AnimationEnd"),animationiteration:Ma("Animation","AnimationIteration"),animationstart:Ma("Animation","AnimationStart"),transitionrun:Ma("Transition","TransitionRun"),transitionstart:Ma("Transition","TransitionStart"),transitioncancel:Ma("Transition","TransitionCancel"),transitionend:Ma("Transition","TransitionEnd")},bu={},xm={};ns&&(xm=document.createElement("div").style,"AnimationEvent"in window||(delete Ti.animationend.animation,delete Ti.animationiteration.animation,delete Ti.animationstart.animation),"TransitionEvent"in window||delete Ti.transitionend.transition);function Aa(e){if(bu[e])return bu[e];if(!Ti[e])return e;var t=Ti[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in xm)return bu[e]=t[s];return e}var bm=Aa("animationend"),Sm=Aa("animationiteration"),jm=Aa("animationstart"),Ob=Aa("transitionrun"),zb=Aa("transitionstart"),Db=Aa("transitioncancel"),wm=Aa("transitionend"),Nm=new Map,Su="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Su.push("scrollEnd");function On(e,t){Nm.set(e,t),Ta(t,[e])}var fo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Sn=[],Ei=0,ju=0;function ho(){for(var e=Ei,t=ju=Ei=0;t<e;){var s=Sn[t];Sn[t++]=null;var l=Sn[t];Sn[t++]=null;var c=Sn[t];Sn[t++]=null;var d=Sn[t];if(Sn[t++]=null,l!==null&&c!==null){var g=l.pending;g===null?c.next=c:(c.next=g.next,g.next=c),l.pending=c}d!==0&&Rm(s,c,d)}}function mo(e,t,s,l){Sn[Ei++]=e,Sn[Ei++]=t,Sn[Ei++]=s,Sn[Ei++]=l,ju|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function wu(e,t,s,l){return mo(e,t,s,l),po(e)}function ka(e,t){return mo(e,null,null,t),po(e)}function Rm(e,t,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var c=!1,d=e.return;d!==null;)d.childLanes|=s,l=d.alternate,l!==null&&(l.childLanes|=s),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-sn(s),e=d.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=s|536870912),d):null}function po(e){if(50<dr)throw dr=0,kd=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Mi={};function Ub(e,t,s,l){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,s,l){return new Ub(e,t,s,l)}function Nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ss(e,t){var s=e.alternate;return s===null?(s=ln(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Cm(e,t){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yo(e,t,s,l,c,d){var g=0;if(l=e,typeof e=="function")Nu(e)&&(g=1);else if(typeof e=="string")g=Q1(e,s,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Y:return e=ln(31,s,t,c),e.elementType=Y,e.lanes=d,e;case R:return Oa(s.children,c,d,t);case j:g=8,c|=24;break;case O:return e=ln(12,s,t,c|2),e.elementType=O,e.lanes=d,e;case q:return e=ln(13,s,t,c),e.elementType=q,e.lanes=d,e;case D:return e=ln(19,s,t,c),e.elementType=D,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:g=10;break e;case A:g=9;break e;case T:g=11;break e;case z:g=14;break e;case k:g=16,l=null;break e}g=29,s=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=ln(g,s,t,c),t.elementType=e,t.type=l,t.lanes=d,t}function Oa(e,t,s,l){return e=ln(7,e,l,t),e.lanes=s,e}function Ru(e,t,s){return e=ln(6,e,null,t),e.lanes=s,e}function _m(e){var t=ln(18,null,null,0);return t.stateNode=e,t}function Cu(e,t,s){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Tm=new WeakMap;function jn(e,t){if(typeof e=="object"&&e!==null){var s=Tm.get(e);return s!==void 0?s:(t={value:e,source:t,stack:Wn(t)},Tm.set(e,t),t)}return{value:e,source:t,stack:Wn(t)}}var Ai=[],ki=0,go=null,Vl=0,wn=[],Nn=0,Os=null,Gn=1,Pn="";function as(e,t){Ai[ki++]=Vl,Ai[ki++]=go,go=e,Vl=t}function Em(e,t,s){wn[Nn++]=Gn,wn[Nn++]=Pn,wn[Nn++]=Os,Os=e;var l=Gn;e=Pn;var c=32-sn(l)-1;l&=~(1<<c),s+=1;var d=32-sn(t)+c;if(30<d){var g=c-c%5;d=(l&(1<<g)-1).toString(32),l>>=g,c-=g,Gn=1<<32-sn(t)+c|s<<c|l,Pn=d+e}else Gn=1<<d|s<<c|l,Pn=e}function _u(e){e.return!==null&&(as(e,1),Em(e,1,0))}function Tu(e){for(;e===go;)go=Ai[--ki],Ai[ki]=null,Vl=Ai[--ki],Ai[ki]=null;for(;e===Os;)Os=wn[--Nn],wn[Nn]=null,Pn=wn[--Nn],wn[Nn]=null,Gn=wn[--Nn],wn[Nn]=null}function Mm(e,t){wn[Nn++]=Gn,wn[Nn++]=Pn,wn[Nn++]=Os,Gn=t.id,Pn=t.overflow,Os=e}var Nt=null,Je=null,De=!1,zs=null,Rn=!1,Eu=Error(r(519));function Ds(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Yl(jn(t,e)),Eu}function Am(e){var t=e.stateNode,s=e.type,l=e.memoizedProps;switch(t[wt]=e,t[Pt]=l,s){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(s=0;s<hr.length;s++)Ee(hr[s],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),Vh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),Kh(t,l.value,l.defaultValue,l.children)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||l.suppressHydrationWarning===!0||Zy(t.textContent,s)?(l.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),l.onScroll!=null&&Ee("scroll",t),l.onScrollEnd!=null&&Ee("scrollend",t),l.onClick!=null&&(t.onclick=ts),t=!0):t=!1,t||Ds(e,!0)}function km(e){for(Nt=e.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Nt=Nt.return}}function Oi(e){if(e!==Nt)return!1;if(!De)return km(e),De=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||Xd(e.type,e.memoizedProps)),s=!s),s&&Je&&Ds(e),km(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Je=sg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Je=sg(e)}else t===27?(t=Je,Fs(e.type)?(e=$d,$d=null,Je=e):Je=t):Je=Nt?_n(e.stateNode.nextSibling):null;return!0}function za(){Je=Nt=null,De=!1}function Mu(){var e=zs;return e!==null&&(Zt===null?Zt=e:Zt.push.apply(Zt,e),zs=null),e}function Yl(e){zs===null?zs=[e]:zs.push(e)}var Au=E(null),Da=null,is=null;function Us(e,t,s){se(Au,t._currentValue),t._currentValue=s}function ls(e){e._currentValue=Au.current,J(Au)}function ku(e,t,s){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===s)break;e=e.return}}function Ou(e,t,s,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var g=c.child;d=d.firstContext;e:for(;d!==null;){var S=d;d=c;for(var C=0;C<t.length;C++)if(S.context===t[C]){d.lanes|=s,S=d.alternate,S!==null&&(S.lanes|=s),ku(d.return,s,e),l||(g=null);break e}d=S.next}}else if(c.tag===18){if(g=c.return,g===null)throw Error(r(341));g.lanes|=s,d=g.alternate,d!==null&&(d.lanes|=s),ku(g,s,e),g=null}else g=c.child;if(g!==null)g.return=c;else for(g=c;g!==null;){if(g===e){g=null;break}if(c=g.sibling,c!==null){c.return=g.return,g=c;break}g=g.return}c=g}}function zi(e,t,s,l){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var g=c.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var S=c.type;an(c.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(c===_e.current){if(g=c.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(vr):e=[vr])}c=c.return}e!==null&&Ou(t,e,s,l),t.flags|=262144}function vo(e){for(e=e.firstContext;e!==null;){if(!an(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ua(e){Da=e,is=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return Om(Da,e)}function xo(e,t){return Da===null&&Ua(e),Om(e,t)}function Om(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},is===null){if(e===null)throw Error(r(308));is=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else is=is.next=t;return s}var Lb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},Bb=n.unstable_scheduleCallback,qb=n.unstable_NormalPriority,ut={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zu(){return{controller:new Lb,data:new Map,refCount:0}}function Kl(e){e.refCount--,e.refCount===0&&Bb(qb,function(){e.controller.abort()})}var Xl=null,Du=0,Di=0,Ui=null;function Hb(e,t){if(Xl===null){var s=Xl=[];Du=0,Di=Bd(),Ui={status:"pending",value:void 0,then:function(l){s.push(l)}}}return Du++,t.then(zm,zm),t}function zm(){if(--Du===0&&Xl!==null){Ui!==null&&(Ui.status="fulfilled");var e=Xl;Xl=null,Di=0,Ui=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Qb(e,t){var s=[],l={status:"pending",value:null,reason:null,then:function(c){s.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<s.length;c++)(0,s[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<s.length;c++)(0,s[c])(void 0)}),l}var Dm=L.S;L.S=function(e,t){vy=Et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Hb(e,t),Dm!==null&&Dm(e,t)};var La=E(null);function Uu(){var e=La.current;return e!==null?e:Ie.pooledCache}function bo(e,t){t===null?se(La,La.current):se(La,t.pool)}function Um(){var e=Uu();return e===null?null:{parent:ut._currentValue,pool:e}}var Li=Error(r(460)),Lu=Error(r(474)),So=Error(r(542)),jo={then:function(){}};function Lm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Bm(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(ts,ts),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hm(e),e;default:if(typeof t.status=="string")t.then(ts,ts);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hm(e),e}throw qa=t,Li}}function Ba(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(qa=s,Li):s}}var qa=null;function qm(){if(qa===null)throw Error(r(459));var e=qa;return qa=null,e}function Hm(e){if(e===Li||e===So)throw Error(r(483))}var Bi=null,Zl=0;function wo(e){var t=Zl;return Zl+=1,Bi===null&&(Bi=[]),Bm(Bi,e,t)}function Fl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function No(e,t){throw t.$$typeof===b?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Qm(e){function t(U,M){if(e){var H=U.deletions;H===null?(U.deletions=[M],U.flags|=16):H.push(M)}}function s(U,M){if(!e)return null;for(;M!==null;)t(U,M),M=M.sibling;return null}function l(U){for(var M=new Map;U!==null;)U.key!==null?M.set(U.key,U):M.set(U.index,U),U=U.sibling;return M}function c(U,M){return U=ss(U,M),U.index=0,U.sibling=null,U}function d(U,M,H){return U.index=H,e?(H=U.alternate,H!==null?(H=H.index,H<M?(U.flags|=67108866,M):H):(U.flags|=67108866,M)):(U.flags|=1048576,M)}function g(U){return e&&U.alternate===null&&(U.flags|=67108866),U}function S(U,M,H,I){return M===null||M.tag!==6?(M=Ru(H,U.mode,I),M.return=U,M):(M=c(M,H),M.return=U,M)}function C(U,M,H,I){var pe=H.type;return pe===R?Z(U,M,H.props.children,I,H.key):M!==null&&(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===k&&Ba(pe)===M.type)?(M=c(M,H.props),Fl(M,H),M.return=U,M):(M=yo(H.type,H.key,H.props,null,U.mode,I),Fl(M,H),M.return=U,M)}function G(U,M,H,I){return M===null||M.tag!==4||M.stateNode.containerInfo!==H.containerInfo||M.stateNode.implementation!==H.implementation?(M=Cu(H,U.mode,I),M.return=U,M):(M=c(M,H.children||[]),M.return=U,M)}function Z(U,M,H,I,pe){return M===null||M.tag!==7?(M=Oa(H,U.mode,I,pe),M.return=U,M):(M=c(M,H),M.return=U,M)}function $(U,M,H){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Ru(""+M,U.mode,H),M.return=U,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case w:return H=yo(M.type,M.key,M.props,null,U.mode,H),Fl(H,M),H.return=U,H;case N:return M=Cu(M,U.mode,H),M.return=U,M;case k:return M=Ba(M),$(U,M,H)}if(fe(M)||F(M))return M=Oa(M,U.mode,H,null),M.return=U,M;if(typeof M.then=="function")return $(U,wo(M),H);if(M.$$typeof===B)return $(U,xo(U,M),H);No(U,M)}return null}function P(U,M,H,I){var pe=M!==null?M.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return pe!==null?null:S(U,M,""+H,I);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case w:return H.key===pe?C(U,M,H,I):null;case N:return H.key===pe?G(U,M,H,I):null;case k:return H=Ba(H),P(U,M,H,I)}if(fe(H)||F(H))return pe!==null?null:Z(U,M,H,I,null);if(typeof H.then=="function")return P(U,M,wo(H),I);if(H.$$typeof===B)return P(U,M,xo(U,H),I);No(U,H)}return null}function V(U,M,H,I,pe){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return U=U.get(H)||null,S(M,U,""+I,pe);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case w:return U=U.get(I.key===null?H:I.key)||null,C(M,U,I,pe);case N:return U=U.get(I.key===null?H:I.key)||null,G(M,U,I,pe);case k:return I=Ba(I),V(U,M,H,I,pe)}if(fe(I)||F(I))return U=U.get(H)||null,Z(M,U,I,pe,null);if(typeof I.then=="function")return V(U,M,H,wo(I),pe);if(I.$$typeof===B)return V(U,M,H,xo(M,I),pe);No(M,I)}return null}function ce(U,M,H,I){for(var pe=null,Be=null,de=M,we=M=0,Oe=null;de!==null&&we<H.length;we++){de.index>we?(Oe=de,de=null):Oe=de.sibling;var qe=P(U,de,H[we],I);if(qe===null){de===null&&(de=Oe);break}e&&de&&qe.alternate===null&&t(U,de),M=d(qe,M,we),Be===null?pe=qe:Be.sibling=qe,Be=qe,de=Oe}if(we===H.length)return s(U,de),De&&as(U,we),pe;if(de===null){for(;we<H.length;we++)de=$(U,H[we],I),de!==null&&(M=d(de,M,we),Be===null?pe=de:Be.sibling=de,Be=de);return De&&as(U,we),pe}for(de=l(de);we<H.length;we++)Oe=V(de,U,we,H[we],I),Oe!==null&&(e&&Oe.alternate!==null&&de.delete(Oe.key===null?we:Oe.key),M=d(Oe,M,we),Be===null?pe=Oe:Be.sibling=Oe,Be=Oe);return e&&de.forEach(function(ea){return t(U,ea)}),De&&as(U,we),pe}function ye(U,M,H,I){if(H==null)throw Error(r(151));for(var pe=null,Be=null,de=M,we=M=0,Oe=null,qe=H.next();de!==null&&!qe.done;we++,qe=H.next()){de.index>we?(Oe=de,de=null):Oe=de.sibling;var ea=P(U,de,qe.value,I);if(ea===null){de===null&&(de=Oe);break}e&&de&&ea.alternate===null&&t(U,de),M=d(ea,M,we),Be===null?pe=ea:Be.sibling=ea,Be=ea,de=Oe}if(qe.done)return s(U,de),De&&as(U,we),pe;if(de===null){for(;!qe.done;we++,qe=H.next())qe=$(U,qe.value,I),qe!==null&&(M=d(qe,M,we),Be===null?pe=qe:Be.sibling=qe,Be=qe);return De&&as(U,we),pe}for(de=l(de);!qe.done;we++,qe=H.next())qe=V(de,U,we,qe.value,I),qe!==null&&(e&&qe.alternate!==null&&de.delete(qe.key===null?we:qe.key),M=d(qe,M,we),Be===null?pe=qe:Be.sibling=qe,Be=qe);return e&&de.forEach(function($1){return t(U,$1)}),De&&as(U,we),pe}function Ze(U,M,H,I){if(typeof H=="object"&&H!==null&&H.type===R&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case w:e:{for(var pe=H.key;M!==null;){if(M.key===pe){if(pe=H.type,pe===R){if(M.tag===7){s(U,M.sibling),I=c(M,H.props.children),I.return=U,U=I;break e}}else if(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===k&&Ba(pe)===M.type){s(U,M.sibling),I=c(M,H.props),Fl(I,H),I.return=U,U=I;break e}s(U,M);break}else t(U,M);M=M.sibling}H.type===R?(I=Oa(H.props.children,U.mode,I,H.key),I.return=U,U=I):(I=yo(H.type,H.key,H.props,null,U.mode,I),Fl(I,H),I.return=U,U=I)}return g(U);case N:e:{for(pe=H.key;M!==null;){if(M.key===pe)if(M.tag===4&&M.stateNode.containerInfo===H.containerInfo&&M.stateNode.implementation===H.implementation){s(U,M.sibling),I=c(M,H.children||[]),I.return=U,U=I;break e}else{s(U,M);break}else t(U,M);M=M.sibling}I=Cu(H,U.mode,I),I.return=U,U=I}return g(U);case k:return H=Ba(H),Ze(U,M,H,I)}if(fe(H))return ce(U,M,H,I);if(F(H)){if(pe=F(H),typeof pe!="function")throw Error(r(150));return H=pe.call(H),ye(U,M,H,I)}if(typeof H.then=="function")return Ze(U,M,wo(H),I);if(H.$$typeof===B)return Ze(U,M,xo(U,H),I);No(U,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,M!==null&&M.tag===6?(s(U,M.sibling),I=c(M,H),I.return=U,U=I):(s(U,M),I=Ru(H,U.mode,I),I.return=U,U=I),g(U)):s(U,M)}return function(U,M,H,I){try{Zl=0;var pe=Ze(U,M,H,I);return Bi=null,pe}catch(de){if(de===Li||de===So)throw de;var Be=ln(29,de,null,U.mode);return Be.lanes=I,Be.return=U,Be}finally{}}}var Ha=Qm(!0),Gm=Qm(!1),Ls=!1;function Bu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Bs(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qs(e,t,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(He&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=po(e),Rm(e,null,s),t}return mo(e,l,t,s),po(e)}function Il(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,Oh(e,s)}}function Hu(e,t){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var c=null,d=null;if(s=s.firstBaseUpdate,s!==null){do{var g={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};d===null?c=d=g:d=d.next=g,s=s.next}while(s!==null);d===null?c=d=t:d=d.next=t}else c=d=t;s={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:l.shared,callbacks:l.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var Qu=!1;function Jl(){if(Qu){var e=Ui;if(e!==null)throw e}}function $l(e,t,s,l){Qu=!1;var c=e.updateQueue;Ls=!1;var d=c.firstBaseUpdate,g=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var C=S,G=C.next;C.next=null,g===null?d=G:g.next=G,g=C;var Z=e.alternate;Z!==null&&(Z=Z.updateQueue,S=Z.lastBaseUpdate,S!==g&&(S===null?Z.firstBaseUpdate=G:S.next=G,Z.lastBaseUpdate=C))}if(d!==null){var $=c.baseState;g=0,Z=G=C=null,S=d;do{var P=S.lane&-536870913,V=P!==S.lane;if(V?(ke&P)===P:(l&P)===P){P!==0&&P===Di&&(Qu=!0),Z!==null&&(Z=Z.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ce=e,ye=S;P=t;var Ze=s;switch(ye.tag){case 1:if(ce=ye.payload,typeof ce=="function"){$=ce.call(Ze,$,P);break e}$=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ye.payload,P=typeof ce=="function"?ce.call(Ze,$,P):ce,P==null)break e;$=v({},$,P);break e;case 2:Ls=!0}}P=S.callback,P!==null&&(e.flags|=64,V&&(e.flags|=8192),V=c.callbacks,V===null?c.callbacks=[P]:V.push(P))}else V={lane:P,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Z===null?(G=Z=V,C=$):Z=Z.next=V,g|=P;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;V=S,S=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);Z===null&&(C=$),c.baseState=C,c.firstBaseUpdate=G,c.lastBaseUpdate=Z,d===null&&(c.shared.lanes=0),Vs|=g,e.lanes=g,e.memoizedState=$}}function Pm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Vm(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Pm(s[e],t)}var qi=E(null),Ro=E(0);function Ym(e,t){e=ps,se(Ro,e),se(qi,t),ps=e|t.baseLanes}function Gu(){se(Ro,ps),se(qi,qi.current)}function Pu(){ps=Ro.current,J(qi),J(Ro)}var rn=E(null),Cn=null;function Hs(e){var t=e.alternate;se(rt,rt.current&1),se(rn,e),Cn===null&&(t===null||qi.current!==null||t.memoizedState!==null)&&(Cn=e)}function Vu(e){se(rt,rt.current),se(rn,e),Cn===null&&(Cn=e)}function Km(e){e.tag===22?(se(rt,rt.current),se(rn,e),Cn===null&&(Cn=e)):Qs()}function Qs(){se(rt,rt.current),se(rn,rn.current)}function on(e){J(rn),Cn===e&&(Cn=null),J(rt)}var rt=E(0);function Co(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Id(s)||Jd(s)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var rs=0,je=null,Ke=null,dt=null,_o=!1,Hi=!1,Qa=!1,To=0,Wl=0,Qi=null,Gb=0;function st(){throw Error(r(321))}function Yu(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!an(e[s],t[s]))return!1;return!0}function Ku(e,t,s,l,c,d){return rs=d,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?Ep:rd,Qa=!1,d=s(l,c),Qa=!1,Hi&&(d=Zm(t,s,l,c)),Xm(e),d}function Xm(e){L.H=nr;var t=Ke!==null&&Ke.next!==null;if(rs=0,dt=Ke=je=null,_o=!1,Wl=0,Qi=null,t)throw Error(r(300));e===null||ft||(e=e.dependencies,e!==null&&vo(e)&&(ft=!0))}function Zm(e,t,s,l){je=e;var c=0;do{if(Hi&&(Qi=null),Wl=0,Hi=!1,25<=c)throw Error(r(301));if(c+=1,dt=Ke=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}L.H=Mp,d=t(s,l)}while(Hi);return d}function Pb(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?er(t):t,e=e.useState()[0],(Ke!==null?Ke.memoizedState:null)!==e&&(je.flags|=1024),t}function Xu(){var e=To!==0;return To=0,e}function Zu(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function Fu(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}rs=0,dt=Ke=je=null,Hi=!1,Wl=To=0,Qi=null}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?je.memoizedState=dt=e:dt=dt.next=e,dt}function ot(){if(Ke===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=dt===null?je.memoizedState:dt.next;if(t!==null)dt=t,Ke=e;else{if(e===null)throw je.alternate===null?Error(r(467)):Error(r(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},dt===null?je.memoizedState=dt=e:dt=dt.next=e}return dt}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function er(e){var t=Wl;return Wl+=1,Qi===null&&(Qi=[]),e=Bm(Qi,e,t),t=je,(dt===null?t.memoizedState:dt.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?Ep:rd),e}function Mo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return er(e);if(e.$$typeof===B)return Rt(e)}throw Error(r(438,String(e)))}function Iu(e){var t=null,s=je.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var l=je.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=Eo(),je.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),l=0;l<e;l++)s[l]=W;return t.index++,s}function os(e,t){return typeof t=="function"?t(e):t}function Ao(e){var t=ot();return Ju(t,Ke,e)}function Ju(e,t,s){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=s;var c=e.baseQueue,d=l.pending;if(d!==null){if(c!==null){var g=c.next;c.next=d.next,d.next=g}t.baseQueue=c=d,l.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var S=g=null,C=null,G=t,Z=!1;do{var $=G.lane&-536870913;if($!==G.lane?(ke&$)===$:(rs&$)===$){var P=G.revertLane;if(P===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),$===Di&&(Z=!0);else if((rs&P)===P){G=G.next,P===Di&&(Z=!0);continue}else $={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},C===null?(S=C=$,g=d):C=C.next=$,je.lanes|=P,Vs|=P;$=G.action,Qa&&s(d,$),d=G.hasEagerState?G.eagerState:s(d,$)}else P={lane:$,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},C===null?(S=C=P,g=d):C=C.next=P,je.lanes|=$,Vs|=$;G=G.next}while(G!==null&&G!==t);if(C===null?g=d:C.next=S,!an(d,e.memoizedState)&&(ft=!0,Z&&(s=Ui,s!==null)))throw s;e.memoizedState=d,e.baseState=g,e.baseQueue=C,l.lastRenderedState=d}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function $u(e){var t=ot(),s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=e;var l=s.dispatch,c=s.pending,d=t.memoizedState;if(c!==null){s.pending=null;var g=c=c.next;do d=e(d,g.action),g=g.next;while(g!==c);an(d,t.memoizedState)||(ft=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),s.lastRenderedState=d}return[d,l]}function Fm(e,t,s){var l=je,c=ot(),d=De;if(d){if(s===void 0)throw Error(r(407));s=s()}else s=t();var g=!an((Ke||c).memoizedState,s);if(g&&(c.memoizedState=s,ft=!0),c=c.queue,td($m.bind(null,l,c,e),[e]),c.getSnapshot!==t||g||dt!==null&&dt.memoizedState.tag&1){if(l.flags|=2048,Gi(9,{destroy:void 0},Jm.bind(null,l,c,s,t),null),Ie===null)throw Error(r(349));d||(rs&127)!==0||Im(l,t,s)}return s}function Im(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=je.updateQueue,t===null?(t=Eo(),je.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Jm(e,t,s,l){t.value=s,t.getSnapshot=l,Wm(t)&&ep(e)}function $m(e,t,s){return s(function(){Wm(t)&&ep(e)})}function Wm(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!an(e,s)}catch{return!0}}function ep(e){var t=ka(e,2);t!==null&&Ft(t,e,2)}function Wu(e){var t=zt();if(typeof e=="function"){var s=e;if(e=s(),Qa){Ms(!0);try{s()}finally{Ms(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:e},t}function tp(e,t,s,l){return e.baseState=s,Ju(e,Ke,typeof l=="function"?l:os)}function Vb(e,t,s,l,c){if(zo(e))throw Error(r(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){d.listeners.push(g)}};L.T!==null?s(!0):d.isTransition=!1,l(d),s=t.pending,s===null?(d.next=t.pending=d,np(t,d)):(d.next=s.next,t.pending=s.next=d)}}function np(e,t){var s=t.action,l=t.payload,c=e.state;if(t.isTransition){var d=L.T,g={};L.T=g;try{var S=s(c,l),C=L.S;C!==null&&C(g,S),sp(e,t,S)}catch(G){ed(e,t,G)}finally{d!==null&&g.types!==null&&(d.types=g.types),L.T=d}}else try{d=s(c,l),sp(e,t,d)}catch(G){ed(e,t,G)}}function sp(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){ap(e,t,l)},function(l){return ed(e,t,l)}):ap(e,t,s)}function ap(e,t,s){t.status="fulfilled",t.value=s,ip(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,np(e,s)))}function ed(e,t,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=s,ip(t),t=t.next;while(t!==l)}e.action=null}function ip(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function lp(e,t){return t}function rp(e,t){if(De){var s=Ie.formState;if(s!==null){e:{var l=je;if(De){if(Je){t:{for(var c=Je,d=Rn;c.nodeType!==8;){if(!d){c=null;break t}if(c=_n(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){Je=_n(c.nextSibling),l=c.data==="F!";break e}}Ds(l)}l=!1}l&&(t=s[0])}}return s=zt(),s.memoizedState=s.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lp,lastRenderedState:t},s.queue=l,s=Cp.bind(null,je,l),l.dispatch=s,l=Wu(!1),d=ld.bind(null,je,!1,l.queue),l=zt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,s=Vb.bind(null,je,c,d,s),c.dispatch=s,l.memoizedState=e,[t,s,!1]}function op(e){var t=ot();return cp(t,Ke,e)}function cp(e,t,s){if(t=Ju(e,t,lp)[0],e=Ao(os)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=er(t)}catch(g){throw g===Li?So:g}else l=t;t=ot();var c=t.queue,d=c.dispatch;return s!==t.memoizedState&&(je.flags|=2048,Gi(9,{destroy:void 0},Yb.bind(null,c,s),null)),[l,d,e]}function Yb(e,t){e.action=t}function up(e){var t=ot(),s=Ke;if(s!==null)return cp(t,s,e);ot(),t=t.memoizedState,s=ot();var l=s.queue.dispatch;return s.memoizedState=e,[t,l,!1]}function Gi(e,t,s,l){return e={tag:e,create:s,deps:l,inst:t,next:null},t=je.updateQueue,t===null&&(t=Eo(),je.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,t.lastEffect=e),e}function dp(){return ot().memoizedState}function ko(e,t,s,l){var c=zt();je.flags|=e,c.memoizedState=Gi(1|t,{destroy:void 0},s,l===void 0?null:l)}function Oo(e,t,s,l){var c=ot();l=l===void 0?null:l;var d=c.memoizedState.inst;Ke!==null&&l!==null&&Yu(l,Ke.memoizedState.deps)?c.memoizedState=Gi(t,d,s,l):(je.flags|=e,c.memoizedState=Gi(1|t,d,s,l))}function fp(e,t){ko(8390656,8,e,t)}function td(e,t){Oo(2048,8,e,t)}function Kb(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=Eo(),je.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function hp(e){var t=ot().memoizedState;return Kb({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function mp(e,t){return Oo(4,2,e,t)}function pp(e,t){return Oo(4,4,e,t)}function yp(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gp(e,t,s){s=s!=null?s.concat([e]):null,Oo(4,4,yp.bind(null,t,e),s)}function nd(){}function vp(e,t){var s=ot();t=t===void 0?null:t;var l=s.memoizedState;return t!==null&&Yu(t,l[1])?l[0]:(s.memoizedState=[e,t],e)}function xp(e,t){var s=ot();t=t===void 0?null:t;var l=s.memoizedState;if(t!==null&&Yu(t,l[1]))return l[0];if(l=e(),Qa){Ms(!0);try{e()}finally{Ms(!1)}}return s.memoizedState=[l,t],l}function sd(e,t,s){return s===void 0||(rs&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=by(),je.lanes|=e,Vs|=e,s)}function bp(e,t,s,l){return an(s,t)?s:qi.current!==null?(e=sd(e,s,l),an(e,t)||(ft=!0),e):(rs&42)===0||(rs&1073741824)!==0&&(ke&261930)===0?(ft=!0,e.memoizedState=s):(e=by(),je.lanes|=e,Vs|=e,t)}function Sp(e,t,s,l,c){var d=K.p;K.p=d!==0&&8>d?d:8;var g=L.T,S={};L.T=S,ld(e,!1,t,s);try{var C=c(),G=L.S;if(G!==null&&G(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var Z=Qb(C,l);tr(e,t,Z,dn(e))}else tr(e,t,l,dn(e))}catch($){tr(e,t,{then:function(){},status:"rejected",reason:$},dn())}finally{K.p=d,g!==null&&S.types!==null&&(g.types=S.types),L.T=g}}function Xb(){}function ad(e,t,s,l){if(e.tag!==5)throw Error(r(476));var c=jp(e).queue;Sp(e,c,t,ue,s===null?Xb:function(){return wp(e),s(l)})}function jp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:ue},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function wp(e){var t=jp(e);t.next===null&&(t=e.alternate.memoizedState),tr(e,t.next.queue,{},dn())}function id(){return Rt(vr)}function Np(){return ot().memoizedState}function Rp(){return ot().memoizedState}function Zb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=dn();e=Bs(s);var l=qs(t,e,s);l!==null&&(Ft(l,t,s),Il(l,t,s)),t={cache:zu()},e.payload=t;return}t=t.return}}function Fb(e,t,s){var l=dn();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},zo(e)?_p(t,s):(s=wu(e,t,s,l),s!==null&&(Ft(s,e,l),Tp(s,t,l)))}function Cp(e,t,s){var l=dn();tr(e,t,s,l)}function tr(e,t,s,l){var c={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(zo(e))_p(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var g=t.lastRenderedState,S=d(g,s);if(c.hasEagerState=!0,c.eagerState=S,an(S,g))return mo(e,t,c,0),Ie===null&&ho(),!1}catch{}finally{}if(s=wu(e,t,c,l),s!==null)return Ft(s,e,l),Tp(s,t,l),!0}return!1}function ld(e,t,s,l){if(l={lane:2,revertLane:Bd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},zo(e)){if(t)throw Error(r(479))}else t=wu(e,s,l,2),t!==null&&Ft(t,e,2)}function zo(e){var t=e.alternate;return e===je||t!==null&&t===je}function _p(e,t){Hi=_o=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Tp(e,t,s){if((s&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,Oh(e,s)}}var nr={readContext:Rt,use:Mo,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};nr.useEffectEvent=st;var Ep={readContext:Rt,use:Mo,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:fp,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,ko(4194308,4,yp.bind(null,t,e),s)},useLayoutEffect:function(e,t){return ko(4194308,4,e,t)},useInsertionEffect:function(e,t){ko(4,2,e,t)},useMemo:function(e,t){var s=zt();t=t===void 0?null:t;var l=e();if(Qa){Ms(!0);try{e()}finally{Ms(!1)}}return s.memoizedState=[l,t],l},useReducer:function(e,t,s){var l=zt();if(s!==void 0){var c=s(t);if(Qa){Ms(!0);try{s(t)}finally{Ms(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=Fb.bind(null,je,e),[l.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:function(e){e=Wu(e);var t=e.queue,s=Cp.bind(null,je,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:nd,useDeferredValue:function(e,t){var s=zt();return sd(s,e,t)},useTransition:function(){var e=Wu(!1);return e=Sp.bind(null,je,e.queue,!0,!1),zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var l=je,c=zt();if(De){if(s===void 0)throw Error(r(407));s=s()}else{if(s=t(),Ie===null)throw Error(r(349));(ke&127)!==0||Im(l,t,s)}c.memoizedState=s;var d={value:s,getSnapshot:t};return c.queue=d,fp($m.bind(null,l,d,e),[e]),l.flags|=2048,Gi(9,{destroy:void 0},Jm.bind(null,l,d,s,t),null),s},useId:function(){var e=zt(),t=Ie.identifierPrefix;if(De){var s=Pn,l=Gn;s=(l&~(1<<32-sn(l)-1)).toString(32)+s,t="_"+t+"R_"+s,s=To++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=Gb++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:id,useFormState:rp,useActionState:rp,useOptimistic:function(e){var t=zt();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=ld.bind(null,je,!0,s),s.dispatch=t,[e,t]},useMemoCache:Iu,useCacheRefresh:function(){return zt().memoizedState=Zb.bind(null,je)},useEffectEvent:function(e){var t=zt(),s={impl:e};return t.memoizedState=s,function(){if((He&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},rd={readContext:Rt,use:Mo,useCallback:vp,useContext:Rt,useEffect:td,useImperativeHandle:gp,useInsertionEffect:mp,useLayoutEffect:pp,useMemo:xp,useReducer:Ao,useRef:dp,useState:function(){return Ao(os)},useDebugValue:nd,useDeferredValue:function(e,t){var s=ot();return bp(s,Ke.memoizedState,e,t)},useTransition:function(){var e=Ao(os)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:er(e),t]},useSyncExternalStore:Fm,useId:Np,useHostTransitionStatus:id,useFormState:op,useActionState:op,useOptimistic:function(e,t){var s=ot();return tp(s,Ke,e,t)},useMemoCache:Iu,useCacheRefresh:Rp};rd.useEffectEvent=hp;var Mp={readContext:Rt,use:Mo,useCallback:vp,useContext:Rt,useEffect:td,useImperativeHandle:gp,useInsertionEffect:mp,useLayoutEffect:pp,useMemo:xp,useReducer:$u,useRef:dp,useState:function(){return $u(os)},useDebugValue:nd,useDeferredValue:function(e,t){var s=ot();return Ke===null?sd(s,e,t):bp(s,Ke.memoizedState,e,t)},useTransition:function(){var e=$u(os)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:er(e),t]},useSyncExternalStore:Fm,useId:Np,useHostTransitionStatus:id,useFormState:up,useActionState:up,useOptimistic:function(e,t){var s=ot();return Ke!==null?tp(s,Ke,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:Iu,useCacheRefresh:Rp};Mp.useEffectEvent=hp;function od(e,t,s,l){t=e.memoizedState,s=s(l,t),s=s==null?t:v({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var cd={enqueueSetState:function(e,t,s){e=e._reactInternals;var l=dn(),c=Bs(l);c.payload=t,s!=null&&(c.callback=s),t=qs(e,c,l),t!==null&&(Ft(t,e,l),Il(t,e,l))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var l=dn(),c=Bs(l);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=qs(e,c,l),t!==null&&(Ft(t,e,l),Il(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=dn(),l=Bs(s);l.tag=2,t!=null&&(l.callback=t),t=qs(e,l,s),t!==null&&(Ft(t,e,s),Il(t,e,s))}};function Ap(e,t,s,l,c,d,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,d,g):t.prototype&&t.prototype.isPureReactComponent?!Gl(s,l)||!Gl(c,d):!0}function kp(e,t,s,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,l),t.state!==e&&cd.enqueueReplaceState(t,t.state,null)}function Ga(e,t){var s=t;if("ref"in t){s={};for(var l in t)l!=="ref"&&(s[l]=t[l])}if(e=e.defaultProps){s===t&&(s=v({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}function Op(e){fo(e)}function zp(e){console.error(e)}function Dp(e){fo(e)}function Do(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Up(e,t,s){try{var l=e.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function ud(e,t,s){return s=Bs(s),s.tag=3,s.payload={element:null},s.callback=function(){Do(e,t)},s}function Lp(e){return e=Bs(e),e.tag=3,e}function Bp(e,t,s,l){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var d=l.value;e.payload=function(){return c(d)},e.callback=function(){Up(t,s,l)}}var g=s.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Up(t,s,l),typeof c!="function"&&(Ys===null?Ys=new Set([this]):Ys.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function Ib(e,t,s,l,c){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=s.alternate,t!==null&&zi(t,s,c,!0),s=rn.current,s!==null){switch(s.tag){case 31:case 13:return Cn===null?Xo():s.alternate===null&&at===0&&(at=3),s.flags&=-257,s.flags|=65536,s.lanes=c,l===jo?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([l]):t.add(l),Dd(e,l,c)),!1;case 22:return s.flags|=65536,l===jo?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([l]):s.add(l)),Dd(e,l,c)),!1}throw Error(r(435,s.tag))}return Dd(e,l,c),Xo(),!1}if(De)return t=rn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Eu&&(e=Error(r(422),{cause:l}),Yl(jn(e,s)))):(l!==Eu&&(t=Error(r(423),{cause:l}),Yl(jn(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=jn(l,s),c=ud(e.stateNode,l,c),Hu(e,c),at!==4&&(at=2)),!1;var d=Error(r(520),{cause:l});if(d=jn(d,s),ur===null?ur=[d]:ur.push(d),at!==4&&(at=2),t===null)return!0;l=jn(l,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=ud(s.stateNode,l,e),Hu(s,e),!1;case 1:if(t=s.type,d=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Ys===null||!Ys.has(d))))return s.flags|=65536,c&=-c,s.lanes|=c,c=Lp(c),Bp(c,e,s,l),Hu(s,c),!1}s=s.return}while(s!==null);return!1}var dd=Error(r(461)),ft=!1;function Ct(e,t,s,l){t.child=e===null?Gm(t,null,s,l):Ha(t,e.child,s,l)}function qp(e,t,s,l,c){s=s.render;var d=t.ref;if("ref"in l){var g={};for(var S in l)S!=="ref"&&(g[S]=l[S])}else g=l;return Ua(t),l=Ku(e,t,s,g,d,c),S=Xu(),e!==null&&!ft?(Zu(e,t,c),cs(e,t,c)):(De&&S&&_u(t),t.flags|=1,Ct(e,t,l,c),t.child)}function Hp(e,t,s,l,c){if(e===null){var d=s.type;return typeof d=="function"&&!Nu(d)&&d.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=d,Qp(e,t,d,l,c)):(e=yo(s.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!xd(e,c)){var g=d.memoizedProps;if(s=s.compare,s=s!==null?s:Gl,s(g,l)&&e.ref===t.ref)return cs(e,t,c)}return t.flags|=1,e=ss(d,l),e.ref=t.ref,e.return=t,t.child=e}function Qp(e,t,s,l,c){if(e!==null){var d=e.memoizedProps;if(Gl(d,l)&&e.ref===t.ref)if(ft=!1,t.pendingProps=l=d,xd(e,c))(e.flags&131072)!==0&&(ft=!0);else return t.lanes=e.lanes,cs(e,t,c)}return fd(e,t,s,l,c)}function Gp(e,t,s,l){var c=l.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|s:s,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~d}else l=0,t.child=null;return Pp(e,t,d,s,l)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bo(t,d!==null?d.cachePool:null),d!==null?Ym(t,d):Gu(),Km(t);else return l=t.lanes=536870912,Pp(e,t,d!==null?d.baseLanes|s:s,s,l)}else d!==null?(bo(t,d.cachePool),Ym(t,d),Qs(),t.memoizedState=null):(e!==null&&bo(t,null),Gu(),Qs());return Ct(e,t,c,s),t.child}function sr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Pp(e,t,s,l,c){var d=Uu();return d=d===null?null:{parent:ut._currentValue,pool:d},t.memoizedState={baseLanes:s,cachePool:d},e!==null&&bo(t,null),Gu(),Km(t),e!==null&&zi(e,t,l,!0),t.childLanes=c,null}function Uo(e,t){return t=Bo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Vp(e,t,s){return Ha(t,e.child,null,s),e=Uo(t,t.pendingProps),e.flags|=2,on(t),t.memoizedState=null,e}function Jb(e,t,s){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(De){if(l.mode==="hidden")return e=Uo(t,l),t.lanes=536870912,sr(null,e);if(Vu(t),(e=Je)?(e=ng(e,Rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Os!==null?{id:Gn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},s=_m(e),s.return=t,t.child=s,Nt=t,Je=null)):e=null,e===null)throw Ds(t);return t.lanes=536870912,null}return Uo(t,l)}var d=e.memoizedState;if(d!==null){var g=d.dehydrated;if(Vu(t),c)if(t.flags&256)t.flags&=-257,t=Vp(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ft||zi(e,t,s,!1),c=(s&e.childLanes)!==0,ft||c){if(l=Ie,l!==null&&(g=zh(l,s),g!==0&&g!==d.retryLane))throw d.retryLane=g,ka(e,g),Ft(l,e,g),dd;Xo(),t=Vp(e,t,s)}else e=d.treeContext,Je=_n(g.nextSibling),Nt=t,De=!0,zs=null,Rn=!1,e!==null&&Mm(t,e),t=Uo(t,l),t.flags|=4096;return t}return e=ss(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lo(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function fd(e,t,s,l,c){return Ua(t),s=Ku(e,t,s,l,void 0,c),l=Xu(),e!==null&&!ft?(Zu(e,t,c),cs(e,t,c)):(De&&l&&_u(t),t.flags|=1,Ct(e,t,s,c),t.child)}function Yp(e,t,s,l,c,d){return Ua(t),t.updateQueue=null,s=Zm(t,l,s,c),Xm(e),l=Xu(),e!==null&&!ft?(Zu(e,t,d),cs(e,t,d)):(De&&l&&_u(t),t.flags|=1,Ct(e,t,s,d),t.child)}function Kp(e,t,s,l,c){if(Ua(t),t.stateNode===null){var d=Mi,g=s.contextType;typeof g=="object"&&g!==null&&(d=Rt(g)),d=new s(l,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=cd,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=l,d.state=t.memoizedState,d.refs={},Bu(t),g=s.contextType,d.context=typeof g=="object"&&g!==null?Rt(g):Mi,d.state=t.memoizedState,g=s.getDerivedStateFromProps,typeof g=="function"&&(od(t,s,g,l),d.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(g=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),g!==d.state&&cd.enqueueReplaceState(d,d.state,null),$l(t,l,d,c),Jl(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){d=t.stateNode;var S=t.memoizedProps,C=Ga(s,S);d.props=C;var G=d.context,Z=s.contextType;g=Mi,typeof Z=="object"&&Z!==null&&(g=Rt(Z));var $=s.getDerivedStateFromProps;Z=typeof $=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Z||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||G!==g)&&kp(t,d,l,g),Ls=!1;var P=t.memoizedState;d.state=P,$l(t,l,d,c),Jl(),G=t.memoizedState,S||P!==G||Ls?(typeof $=="function"&&(od(t,s,$,l),G=t.memoizedState),(C=Ls||Ap(t,s,C,l,P,G,g))?(Z||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=G),d.props=l,d.state=G,d.context=g,l=C):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{d=t.stateNode,qu(e,t),g=t.memoizedProps,Z=Ga(s,g),d.props=Z,$=t.pendingProps,P=d.context,G=s.contextType,C=Mi,typeof G=="object"&&G!==null&&(C=Rt(G)),S=s.getDerivedStateFromProps,(G=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(g!==$||P!==C)&&kp(t,d,l,C),Ls=!1,P=t.memoizedState,d.state=P,$l(t,l,d,c),Jl();var V=t.memoizedState;g!==$||P!==V||Ls||e!==null&&e.dependencies!==null&&vo(e.dependencies)?(typeof S=="function"&&(od(t,s,S,l),V=t.memoizedState),(Z=Ls||Ap(t,s,Z,l,P,V,C)||e!==null&&e.dependencies!==null&&vo(e.dependencies))?(G||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,V,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,V,C)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=V),d.props=l,d.state=V,d.context=C,l=Z):(typeof d.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),l=!1)}return d=l,Lo(e,t),l=(t.flags&128)!==0,d||l?(d=t.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&l?(t.child=Ha(t,e.child,null,c),t.child=Ha(t,null,s,c)):Ct(e,t,s,c),t.memoizedState=d.state,e=t.child):e=cs(e,t,c),e}function Xp(e,t,s,l){return za(),t.flags|=256,Ct(e,t,s,l),t.child}var hd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function md(e){return{baseLanes:e,cachePool:Um()}}function pd(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=un),e}function Zp(e,t,s){var l=t.pendingProps,c=!1,d=(t.flags&128)!==0,g;if((g=d)||(g=e!==null&&e.memoizedState===null?!1:(rt.current&2)!==0),g&&(c=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(De){if(c?Hs(t):Qs(),(e=Je)?(e=ng(e,Rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Os!==null?{id:Gn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},s=_m(e),s.return=t,t.child=s,Nt=t,Je=null)):e=null,e===null)throw Ds(t);return Jd(e)?t.lanes=32:t.lanes=536870912,null}var S=l.children;return l=l.fallback,c?(Qs(),c=t.mode,S=Bo({mode:"hidden",children:S},c),l=Oa(l,c,s,null),S.return=t,l.return=t,S.sibling=l,t.child=S,l=t.child,l.memoizedState=md(s),l.childLanes=pd(e,g,s),t.memoizedState=hd,sr(null,l)):(Hs(t),yd(t,S))}var C=e.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(d)t.flags&256?(Hs(t),t.flags&=-257,t=gd(e,t,s)):t.memoizedState!==null?(Qs(),t.child=e.child,t.flags|=128,t=null):(Qs(),S=l.fallback,c=t.mode,l=Bo({mode:"visible",children:l.children},c),S=Oa(S,c,s,null),S.flags|=2,l.return=t,S.return=t,l.sibling=S,t.child=l,Ha(t,e.child,null,s),l=t.child,l.memoizedState=md(s),l.childLanes=pd(e,g,s),t.memoizedState=hd,t=sr(null,l));else if(Hs(t),Jd(S)){if(g=S.nextSibling&&S.nextSibling.dataset,g)var G=g.dgst;g=G,l=Error(r(419)),l.stack="",l.digest=g,Yl({value:l,source:null,stack:null}),t=gd(e,t,s)}else if(ft||zi(e,t,s,!1),g=(s&e.childLanes)!==0,ft||g){if(g=Ie,g!==null&&(l=zh(g,s),l!==0&&l!==C.retryLane))throw C.retryLane=l,ka(e,l),Ft(g,e,l),dd;Id(S)||Xo(),t=gd(e,t,s)}else Id(S)?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,Je=_n(S.nextSibling),Nt=t,De=!0,zs=null,Rn=!1,e!==null&&Mm(t,e),t=yd(t,l.children),t.flags|=4096);return t}return c?(Qs(),S=l.fallback,c=t.mode,C=e.child,G=C.sibling,l=ss(C,{mode:"hidden",children:l.children}),l.subtreeFlags=C.subtreeFlags&65011712,G!==null?S=ss(G,S):(S=Oa(S,c,s,null),S.flags|=2),S.return=t,l.return=t,l.sibling=S,t.child=l,sr(null,l),l=t.child,S=e.child.memoizedState,S===null?S=md(s):(c=S.cachePool,c!==null?(C=ut._currentValue,c=c.parent!==C?{parent:C,pool:C}:c):c=Um(),S={baseLanes:S.baseLanes|s,cachePool:c}),l.memoizedState=S,l.childLanes=pd(e,g,s),t.memoizedState=hd,sr(e.child,l)):(Hs(t),s=e.child,e=s.sibling,s=ss(s,{mode:"visible",children:l.children}),s.return=t,s.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=s,t.memoizedState=null,s)}function yd(e,t){return t=Bo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bo(e,t){return e=ln(22,e,null,t),e.lanes=0,e}function gd(e,t,s){return Ha(t,e.child,null,s),e=yd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Fp(e,t,s){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),ku(e.return,t,s)}function vd(e,t,s,l,c,d){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:c,treeForkCount:d}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=l,g.tail=s,g.tailMode=c,g.treeForkCount=d)}function Ip(e,t,s){var l=t.pendingProps,c=l.revealOrder,d=l.tail;l=l.children;var g=rt.current,S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,se(rt,g),Ct(e,t,l,s),l=De?Vl:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fp(e,s,t);else if(e.tag===19)Fp(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&Co(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),vd(t,!1,c,s,d,l);break;case"backwards":case"unstable_legacy-backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Co(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}vd(t,!0,s,null,d,l);break;case"together":vd(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function cs(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Vs|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(zi(e,t,s,!1),(s&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,s=ss(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=ss(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function xd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vo(e)))}function $b(e,t,s){switch(t.tag){case 3:Ve(t,t.stateNode.containerInfo),Us(t,ut,e.memoizedState.cache),za();break;case 27:case 5:vn(t);break;case 4:Ve(t,t.stateNode.containerInfo);break;case 10:Us(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Vu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Hs(t),t.flags|=128,null):(s&t.child.childLanes)!==0?Zp(e,t,s):(Hs(t),e=cs(e,t,s),e!==null?e.sibling:null);Hs(t);break;case 19:var c=(e.flags&128)!==0;if(l=(s&t.childLanes)!==0,l||(zi(e,t,s,!1),l=(s&t.childLanes)!==0),c){if(l)return Ip(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),se(rt,rt.current),l)break;return null;case 22:return t.lanes=0,Gp(e,t,s,t.pendingProps);case 24:Us(t,ut,e.memoizedState.cache)}return cs(e,t,s)}function Jp(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!xd(e,s)&&(t.flags&128)===0)return ft=!1,$b(e,t,s);ft=(e.flags&131072)!==0}else ft=!1,De&&(t.flags&1048576)!==0&&Em(t,Vl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Ba(t.elementType),t.type=e,typeof e=="function")Nu(e)?(l=Ga(e,l),t.tag=1,t=Kp(null,t,e,l,s)):(t.tag=0,t=fd(null,t,e,l,s));else{if(e!=null){var c=e.$$typeof;if(c===T){t.tag=11,t=qp(null,t,e,l,s);break e}else if(c===z){t.tag=14,t=Hp(null,t,e,l,s);break e}}throw t=te(e)||e,Error(r(306,t,""))}}return t;case 0:return fd(e,t,t.type,t.pendingProps,s);case 1:return l=t.type,c=Ga(l,t.pendingProps),Kp(e,t,l,c,s);case 3:e:{if(Ve(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var d=t.memoizedState;c=d.element,qu(e,t),$l(t,l,null,s);var g=t.memoizedState;if(l=g.cache,Us(t,ut,l),l!==d.cache&&Ou(t,[ut],s,!0),Jl(),l=g.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Xp(e,t,l,s);break e}else if(l!==c){c=jn(Error(r(424)),t),Yl(c),t=Xp(e,t,l,s);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Je=_n(e.firstChild),Nt=t,De=!0,zs=null,Rn=!0,s=Gm(t,null,l,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(za(),l===c){t=cs(e,t,s);break e}Ct(e,t,l,s)}t=t.child}return t;case 26:return Lo(e,t),e===null?(s=og(t.type,null,t.pendingProps,null))?t.memoizedState=s:De||(s=t.type,e=t.pendingProps,l=ec(me.current).createElement(s),l[wt]=t,l[Pt]=e,_t(l,s,e),gt(l),t.stateNode=l):t.memoizedState=og(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return vn(t),e===null&&De&&(l=t.stateNode=ig(t.type,t.pendingProps,me.current),Nt=t,Rn=!0,c=Je,Fs(t.type)?($d=c,Je=_n(l.firstChild)):Je=c),Ct(e,t,t.pendingProps.children,s),Lo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&De&&((c=l=Je)&&(l=T1(l,t.type,t.pendingProps,Rn),l!==null?(t.stateNode=l,Nt=t,Je=_n(l.firstChild),Rn=!1,c=!0):c=!1),c||Ds(t)),vn(t),c=t.type,d=t.pendingProps,g=e!==null?e.memoizedProps:null,l=d.children,Xd(c,d)?l=null:g!==null&&Xd(c,g)&&(t.flags|=32),t.memoizedState!==null&&(c=Ku(e,t,Pb,null,null,s),vr._currentValue=c),Lo(e,t),Ct(e,t,l,s),t.child;case 6:return e===null&&De&&((e=s=Je)&&(s=E1(s,t.pendingProps,Rn),s!==null?(t.stateNode=s,Nt=t,Je=null,e=!0):e=!1),e||Ds(t)),null;case 13:return Zp(e,t,s);case 4:return Ve(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Ha(t,null,l,s):Ct(e,t,l,s),t.child;case 11:return qp(e,t,t.type,t.pendingProps,s);case 7:return Ct(e,t,t.pendingProps,s),t.child;case 8:return Ct(e,t,t.pendingProps.children,s),t.child;case 12:return Ct(e,t,t.pendingProps.children,s),t.child;case 10:return l=t.pendingProps,Us(t,t.type,l.value),Ct(e,t,l.children,s),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,Ua(t),c=Rt(c),l=l(c),t.flags|=1,Ct(e,t,l,s),t.child;case 14:return Hp(e,t,t.type,t.pendingProps,s);case 15:return Qp(e,t,t.type,t.pendingProps,s);case 19:return Ip(e,t,s);case 31:return Jb(e,t,s);case 22:return Gp(e,t,s,t.pendingProps);case 24:return Ua(t),l=Rt(ut),e===null?(c=Uu(),c===null&&(c=Ie,d=zu(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=s),c=d),t.memoizedState={parent:l,cache:c},Bu(t),Us(t,ut,c)):((e.lanes&s)!==0&&(qu(e,t),$l(t,null,null,s),Jl()),c=e.memoizedState,d=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Us(t,ut,l)):(l=d.cache,Us(t,ut,l),l!==c.cache&&Ou(t,[ut],s,!0))),Ct(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function us(e){e.flags|=4}function bd(e,t,s,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Ny())e.flags|=8192;else throw qa=jo,Lu}else e.flags&=-16777217}function $p(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hg(t))if(Ny())e.flags|=8192;else throw qa=jo,Lu}function qo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ah():536870912,e.lanes|=t,Ki|=t)}function ar(e,t){if(!De)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=s,t}function Wb(e,t,s){var l=t.pendingProps;switch(Tu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return $e(t),null;case 3:return s=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ls(ut),be(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Oi(t)?us(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Mu())),$e(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(us(t),d!==null?($e(t),$p(t,d)):($e(t),bd(t,c,null,l,s))):d?d!==e.memoizedState?(us(t),$e(t),$p(t,d)):($e(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&us(t),$e(t),bd(t,c,e,l,s)),null;case 27:if(Gt(t),s=me.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&us(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return $e(t),null}e=ae.current,Oi(t)?Am(t):(e=ig(c,l,s),t.stateNode=e,us(t))}return $e(t),null;case 5:if(Gt(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&us(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return $e(t),null}if(d=ae.current,Oi(t))Am(t);else{var g=ec(me.current);switch(d){case 1:d=g.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=g.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=g.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=g.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=g.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof l.is=="string"?g.createElement("select",{is:l.is}):g.createElement("select"),l.multiple?d.multiple=!0:l.size&&(d.size=l.size);break;default:d=typeof l.is=="string"?g.createElement(c,{is:l.is}):g.createElement(c)}}d[wt]=t,d[Pt]=l;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)d.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=d;e:switch(_t(d,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&us(t)}}return $e(t),bd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&us(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=me.current,Oi(t)){if(e=t.stateNode,s=t.memoizedProps,l=null,c=Nt,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[wt]=t,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||Zy(e.nodeValue,s)),e||Ds(t,!0)}else e=ec(e).createTextNode(l),e[wt]=t,t.stateNode=e}return $e(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(l=Oi(t),s!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[wt]=t}else za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),e=!1}else s=Mu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(on(t),t):(on(t),null);if((t.flags&128)!==0)throw Error(r(558))}return $e(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Oi(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[wt]=t}else za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),c=!1}else c=Mu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(on(t),t):(on(t),null)}return on(t),(t.flags&128)!==0?(t.lanes=s,t):(s=l!==null,e=e!==null&&e.memoizedState!==null,s&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),d=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==c&&(l.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),qo(t,t.updateQueue),$e(t),null);case 4:return be(),e===null&&Gd(t.stateNode.containerInfo),$e(t),null;case 10:return ls(t.type),$e(t),null;case 19:if(J(rt),l=t.memoizedState,l===null)return $e(t),null;if(c=(t.flags&128)!==0,d=l.rendering,d===null)if(c)ar(l,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Co(e),d!==null){for(t.flags|=128,ar(l,!1),e=d.updateQueue,t.updateQueue=e,qo(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)Cm(s,e),s=s.sibling;return se(rt,rt.current&1|2),De&&as(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Et()>Vo&&(t.flags|=128,c=!0,ar(l,!1),t.lanes=4194304)}else{if(!c)if(e=Co(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,qo(t,e),ar(l,!0),l.tail===null&&l.tailMode==="hidden"&&!d.alternate&&!De)return $e(t),null}else 2*Et()-l.renderingStartTime>Vo&&s!==536870912&&(t.flags|=128,c=!0,ar(l,!1),t.lanes=4194304);l.isBackwards?(d.sibling=t.child,t.child=d):(e=l.last,e!==null?e.sibling=d:t.child=d,l.last=d)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Et(),e.sibling=null,s=rt.current,se(rt,c?s&1|2:s&1),De&&as(t,l.treeForkCount),e):($e(t),null);case 22:case 23:return on(t),Pu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(s&536870912)!==0&&(t.flags&128)===0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),s=t.updateQueue,s!==null&&qo(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==s&&(t.flags|=2048),e!==null&&J(La),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ls(ut),$e(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function e1(e,t){switch(Tu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ls(ut),be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Gt(t),null;case 31:if(t.memoizedState!==null){if(on(t),t.alternate===null)throw Error(r(340));za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(on(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return J(rt),null;case 4:return be(),null;case 10:return ls(t.type),null;case 22:case 23:return on(t),Pu(),e!==null&&J(La),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ls(ut),null;case 25:return null;default:return null}}function Wp(e,t){switch(Tu(t),t.tag){case 3:ls(ut),be();break;case 26:case 27:case 5:Gt(t);break;case 4:be();break;case 31:t.memoizedState!==null&&on(t);break;case 13:on(t);break;case 19:J(rt);break;case 10:ls(t.type);break;case 22:case 23:on(t),Pu(),e!==null&&J(La);break;case 24:ls(ut)}}function ir(e,t){try{var s=t.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var c=l.next;s=c;do{if((s.tag&e)===e){l=void 0;var d=s.create,g=s.inst;l=d(),g.destroy=l}s=s.next}while(s!==c)}}catch(S){Pe(t,t.return,S)}}function Gs(e,t,s){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var d=c.next;l=d;do{if((l.tag&e)===e){var g=l.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,c=t;var C=s,G=S;try{G()}catch(Z){Pe(c,C,Z)}}}l=l.next}while(l!==d)}}catch(Z){Pe(t,t.return,Z)}}function ey(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{Vm(t,s)}catch(l){Pe(e,e.return,l)}}}function ty(e,t,s){s.props=Ga(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){Pe(e,t,l)}}function lr(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof s=="function"?e.refCleanup=s(l):s.current=l}}catch(c){Pe(e,t,c)}}function Vn(e,t){var s=e.ref,l=e.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(c){Pe(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){Pe(e,t,c)}else s.current=null}function ny(e){var t=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(c){Pe(e,e.return,c)}}function Sd(e,t,s){try{var l=e.stateNode;j1(l,e.type,s,t),l[Pt]=t}catch(c){Pe(e,e.return,c)}}function sy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Fs(e.type)||e.tag===4}function jd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Fs(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wd(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=ts));else if(l!==4&&(l===27&&Fs(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(wd(e,t,s),e=e.sibling;e!==null;)wd(e,t,s),e=e.sibling}function Ho(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(l!==4&&(l===27&&Fs(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Ho(e,t,s),e=e.sibling;e!==null;)Ho(e,t,s),e=e.sibling}function ay(e){var t=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);_t(t,l,s),t[wt]=e,t[Pt]=s}catch(d){Pe(e,e.return,d)}}var ds=!1,ht=!1,Nd=!1,iy=typeof WeakSet=="function"?WeakSet:Set,vt=null;function t1(e,t){if(e=e.containerInfo,Yd=rc,e=gm(e),gu(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var c=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{s.nodeType,d.nodeType}catch{s=null;break e}var g=0,S=-1,C=-1,G=0,Z=0,$=e,P=null;t:for(;;){for(var V;$!==s||c!==0&&$.nodeType!==3||(S=g+c),$!==d||l!==0&&$.nodeType!==3||(C=g+l),$.nodeType===3&&(g+=$.nodeValue.length),(V=$.firstChild)!==null;)P=$,$=V;for(;;){if($===e)break t;if(P===s&&++G===c&&(S=g),P===d&&++Z===l&&(C=g),(V=$.nextSibling)!==null)break;$=P,P=$.parentNode}$=V}s=S===-1||C===-1?null:{start:S,end:C}}else s=null}s=s||{start:0,end:0}}else s=null;for(Kd={focusedElem:e,selectionRange:s},rc=!1,vt=t;vt!==null;)if(t=vt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,vt=e;else for(;vt!==null;){switch(t=vt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)c=e[s],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,s=t,c=d.memoizedProps,d=d.memoizedState,l=s.stateNode;try{var ce=Ga(s.type,c);e=l.getSnapshotBeforeUpdate(ce,d),l.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Pe(s,s.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)Fd(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,vt=e;break}vt=t.return}}function ly(e,t,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:hs(e,s),l&4&&ir(5,s);break;case 1:if(hs(e,s),l&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(g){Pe(s,s.return,g)}else{var c=Ga(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Pe(s,s.return,g)}}l&64&&ey(s),l&512&&lr(s,s.return);break;case 3:if(hs(e,s),l&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{Vm(e,t)}catch(g){Pe(s,s.return,g)}}break;case 27:t===null&&l&4&&ay(s);case 26:case 5:hs(e,s),t===null&&l&4&&ny(s),l&512&&lr(s,s.return);break;case 12:hs(e,s);break;case 31:hs(e,s),l&4&&cy(e,s);break;case 13:hs(e,s),l&4&&uy(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=u1.bind(null,s),M1(e,s))));break;case 22:if(l=s.memoizedState!==null||ds,!l){t=t!==null&&t.memoizedState!==null||ht,c=ds;var d=ht;ds=l,(ht=t)&&!d?ms(e,s,(s.subtreeFlags&8772)!==0):hs(e,s),ds=c,ht=d}break;case 30:break;default:hs(e,s)}}function ry(e){var t=e.alternate;t!==null&&(e.alternate=null,ry(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&eu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var et=null,Yt=!1;function fs(e,t,s){for(s=s.child;s!==null;)oy(e,t,s),s=s.sibling}function oy(e,t,s){if(nn&&typeof nn.onCommitFiberUnmount=="function")try{nn.onCommitFiberUnmount(Ml,s)}catch{}switch(s.tag){case 26:ht||Vn(s,t),fs(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:ht||Vn(s,t);var l=et,c=Yt;Fs(s.type)&&(et=s.stateNode,Yt=!1),fs(e,t,s),pr(s.stateNode),et=l,Yt=c;break;case 5:ht||Vn(s,t);case 6:if(l=et,c=Yt,et=null,fs(e,t,s),et=l,Yt=c,et!==null)if(Yt)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(s.stateNode)}catch(d){Pe(s,t,d)}else try{et.removeChild(s.stateNode)}catch(d){Pe(s,t,d)}break;case 18:et!==null&&(Yt?(e=et,eg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),el(e)):eg(et,s.stateNode));break;case 4:l=et,c=Yt,et=s.stateNode.containerInfo,Yt=!0,fs(e,t,s),et=l,Yt=c;break;case 0:case 11:case 14:case 15:Gs(2,s,t),ht||Gs(4,s,t),fs(e,t,s);break;case 1:ht||(Vn(s,t),l=s.stateNode,typeof l.componentWillUnmount=="function"&&ty(s,t,l)),fs(e,t,s);break;case 21:fs(e,t,s);break;case 22:ht=(l=ht)||s.memoizedState!==null,fs(e,t,s),ht=l;break;default:fs(e,t,s)}}function cy(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{el(e)}catch(s){Pe(t,t.return,s)}}}function uy(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{el(e)}catch(s){Pe(t,t.return,s)}}function n1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new iy),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new iy),t;default:throw Error(r(435,e.tag))}}function Qo(e,t){var s=n1(e);t.forEach(function(l){if(!s.has(l)){s.add(l);var c=d1.bind(null,e,l);l.then(c,c)}})}function Kt(e,t){var s=t.deletions;if(s!==null)for(var l=0;l<s.length;l++){var c=s[l],d=e,g=t,S=g;e:for(;S!==null;){switch(S.tag){case 27:if(Fs(S.type)){et=S.stateNode,Yt=!1;break e}break;case 5:et=S.stateNode,Yt=!1;break e;case 3:case 4:et=S.stateNode.containerInfo,Yt=!0;break e}S=S.return}if(et===null)throw Error(r(160));oy(d,g,c),et=null,Yt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)dy(t,e),t=t.sibling}var zn=null;function dy(e,t){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Kt(t,e),Xt(e),l&4&&(Gs(3,e,e.return),ir(3,e),Gs(5,e,e.return));break;case 1:Kt(t,e),Xt(e),l&512&&(ht||s===null||Vn(s,s.return)),l&64&&ds&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var c=zn;if(Kt(t,e),Xt(e),l&512&&(ht||s===null||Vn(s,s.return)),l&4){var d=s!==null?s.memoizedState:null;if(l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null){e:{l=e.type,s=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":d=c.getElementsByTagName("title")[0],(!d||d[Ol]||d[wt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(l),c.head.insertBefore(d,c.querySelector("head > title"))),_t(d,l,s),d[wt]=e,gt(d),l=d;break e;case"link":var g=dg("link","href",c).get(l+(s.href||""));if(g){for(var S=0;S<g.length;S++)if(d=g[S],d.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&d.getAttribute("rel")===(s.rel==null?null:s.rel)&&d.getAttribute("title")===(s.title==null?null:s.title)&&d.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){g.splice(S,1);break t}}d=c.createElement(l),_t(d,l,s),c.head.appendChild(d);break;case"meta":if(g=dg("meta","content",c).get(l+(s.content||""))){for(S=0;S<g.length;S++)if(d=g[S],d.getAttribute("content")===(s.content==null?null:""+s.content)&&d.getAttribute("name")===(s.name==null?null:s.name)&&d.getAttribute("property")===(s.property==null?null:s.property)&&d.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&d.getAttribute("charset")===(s.charSet==null?null:s.charSet)){g.splice(S,1);break t}}d=c.createElement(l),_t(d,l,s),c.head.appendChild(d);break;default:throw Error(r(468,l))}d[wt]=e,gt(d),l=d}e.stateNode=l}else fg(c,e.type,e.stateNode);else e.stateNode=ug(c,l,e.memoizedProps);else d!==l?(d===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):d.count--,l===null?fg(c,e.type,e.stateNode):ug(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Sd(e,e.memoizedProps,s.memoizedProps)}break;case 27:Kt(t,e),Xt(e),l&512&&(ht||s===null||Vn(s,s.return)),s!==null&&l&4&&Sd(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Kt(t,e),Xt(e),l&512&&(ht||s===null||Vn(s,s.return)),e.flags&32){c=e.stateNode;try{wi(c,"")}catch(ce){Pe(e,e.return,ce)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Sd(e,c,s!==null?s.memoizedProps:c)),l&1024&&(Nd=!0);break;case 6:if(Kt(t,e),Xt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(ce){Pe(e,e.return,ce)}}break;case 3:if(sc=null,c=zn,zn=tc(t.containerInfo),Kt(t,e),zn=c,Xt(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{el(t.containerInfo)}catch(ce){Pe(e,e.return,ce)}Nd&&(Nd=!1,fy(e));break;case 4:l=zn,zn=tc(e.stateNode.containerInfo),Kt(t,e),Xt(e),zn=l;break;case 12:Kt(t,e),Xt(e);break;case 31:Kt(t,e),Xt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qo(e,l)));break;case 13:Kt(t,e),Xt(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Po=Et()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qo(e,l)));break;case 22:c=e.memoizedState!==null;var C=s!==null&&s.memoizedState!==null,G=ds,Z=ht;if(ds=G||c,ht=Z||C,Kt(t,e),ht=Z,ds=G,Xt(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||C||ds||ht||Pa(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){C=s=t;try{if(d=C.stateNode,c)g=d.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{S=C.stateNode;var $=C.memoizedProps.style,P=$!=null&&$.hasOwnProperty("display")?$.display:null;S.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(ce){Pe(C,C.return,ce)}}}else if(t.tag===6){if(s===null){C=t;try{C.stateNode.nodeValue=c?"":C.memoizedProps}catch(ce){Pe(C,C.return,ce)}}}else if(t.tag===18){if(s===null){C=t;try{var V=C.stateNode;c?tg(V,!0):tg(C.stateNode,!1)}catch(ce){Pe(C,C.return,ce)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,Qo(e,s))));break;case 19:Kt(t,e),Xt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qo(e,l)));break;case 30:break;case 21:break;default:Kt(t,e),Xt(e)}}function Xt(e){var t=e.flags;if(t&2){try{for(var s,l=e.return;l!==null;){if(sy(l)){s=l;break}l=l.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var c=s.stateNode,d=jd(e);Ho(e,d,c);break;case 5:var g=s.stateNode;s.flags&32&&(wi(g,""),s.flags&=-33);var S=jd(e);Ho(e,S,g);break;case 3:case 4:var C=s.stateNode.containerInfo,G=jd(e);wd(e,G,C);break;default:throw Error(r(161))}}catch(Z){Pe(e,e.return,Z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;fy(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hs(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ly(e,t.alternate,t),t=t.sibling}function Pa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Gs(4,t,t.return),Pa(t);break;case 1:Vn(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&ty(t,t.return,s),Pa(t);break;case 27:pr(t.stateNode);case 26:case 5:Vn(t,t.return),Pa(t);break;case 22:t.memoizedState===null&&Pa(t);break;case 30:Pa(t);break;default:Pa(t)}e=e.sibling}}function ms(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,d=t,g=d.flags;switch(d.tag){case 0:case 11:case 15:ms(c,d,s),ir(4,d);break;case 1:if(ms(c,d,s),l=d,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(G){Pe(l,l.return,G)}if(l=d,c=l.updateQueue,c!==null){var S=l.stateNode;try{var C=c.shared.hiddenCallbacks;if(C!==null)for(c.shared.hiddenCallbacks=null,c=0;c<C.length;c++)Pm(C[c],S)}catch(G){Pe(l,l.return,G)}}s&&g&64&&ey(d),lr(d,d.return);break;case 27:ay(d);case 26:case 5:ms(c,d,s),s&&l===null&&g&4&&ny(d),lr(d,d.return);break;case 12:ms(c,d,s);break;case 31:ms(c,d,s),s&&g&4&&cy(c,d);break;case 13:ms(c,d,s),s&&g&4&&uy(c,d);break;case 22:d.memoizedState===null&&ms(c,d,s),lr(d,d.return);break;case 30:break;default:ms(c,d,s)}t=t.sibling}}function Rd(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&Kl(s))}function Cd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kl(e))}function Dn(e,t,s,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hy(e,t,s,l),t=t.sibling}function hy(e,t,s,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Dn(e,t,s,l),c&2048&&ir(9,t);break;case 1:Dn(e,t,s,l);break;case 3:Dn(e,t,s,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kl(e)));break;case 12:if(c&2048){Dn(e,t,s,l),e=t.stateNode;try{var d=t.memoizedProps,g=d.id,S=d.onPostCommit;typeof S=="function"&&S(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Pe(t,t.return,C)}}else Dn(e,t,s,l);break;case 31:Dn(e,t,s,l);break;case 13:Dn(e,t,s,l);break;case 23:break;case 22:d=t.stateNode,g=t.alternate,t.memoizedState!==null?d._visibility&2?Dn(e,t,s,l):rr(e,t):d._visibility&2?Dn(e,t,s,l):(d._visibility|=2,Pi(e,t,s,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Rd(g,t);break;case 24:Dn(e,t,s,l),c&2048&&Cd(t.alternate,t);break;default:Dn(e,t,s,l)}}function Pi(e,t,s,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,g=t,S=s,C=l,G=g.flags;switch(g.tag){case 0:case 11:case 15:Pi(d,g,S,C,c),ir(8,g);break;case 23:break;case 22:var Z=g.stateNode;g.memoizedState!==null?Z._visibility&2?Pi(d,g,S,C,c):rr(d,g):(Z._visibility|=2,Pi(d,g,S,C,c)),c&&G&2048&&Rd(g.alternate,g);break;case 24:Pi(d,g,S,C,c),c&&G&2048&&Cd(g.alternate,g);break;default:Pi(d,g,S,C,c)}t=t.sibling}}function rr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,l=t,c=l.flags;switch(l.tag){case 22:rr(s,l),c&2048&&Rd(l.alternate,l);break;case 24:rr(s,l),c&2048&&Cd(l.alternate,l);break;default:rr(s,l)}t=t.sibling}}var or=8192;function Vi(e,t,s){if(e.subtreeFlags&or)for(e=e.child;e!==null;)my(e,t,s),e=e.sibling}function my(e,t,s){switch(e.tag){case 26:Vi(e,t,s),e.flags&or&&e.memoizedState!==null&&G1(s,zn,e.memoizedState,e.memoizedProps);break;case 5:Vi(e,t,s);break;case 3:case 4:var l=zn;zn=tc(e.stateNode.containerInfo),Vi(e,t,s),zn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=or,or=16777216,Vi(e,t,s),or=l):Vi(e,t,s));break;default:Vi(e,t,s)}}function py(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function cr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];vt=l,gy(l,e)}py(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)yy(e),e=e.sibling}function yy(e){switch(e.tag){case 0:case 11:case 15:cr(e),e.flags&2048&&Gs(9,e,e.return);break;case 3:cr(e);break;case 12:cr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Go(e)):cr(e);break;default:cr(e)}}function Go(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];vt=l,gy(l,e)}py(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Gs(8,t,t.return),Go(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,Go(t));break;default:Go(t)}e=e.sibling}}function gy(e,t){for(;vt!==null;){var s=vt;switch(s.tag){case 0:case 11:case 15:Gs(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Kl(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,vt=l;else e:for(s=e;vt!==null;){l=vt;var c=l.sibling,d=l.return;if(ry(l),l===s){vt=null;break e}if(c!==null){c.return=d,vt=c;break e}vt=d}}}var s1={getCacheForType:function(e){var t=Rt(ut),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return Rt(ut).controller.signal}},a1=typeof WeakMap=="function"?WeakMap:Map,He=0,Ie=null,Te=null,ke=0,Ge=0,cn=null,Ps=!1,Yi=!1,_d=!1,ps=0,at=0,Vs=0,Va=0,Td=0,un=0,Ki=0,ur=null,Zt=null,Ed=!1,Po=0,vy=0,Vo=1/0,Yo=null,Ys=null,mt=0,Ks=null,Xi=null,ys=0,Md=0,Ad=null,xy=null,dr=0,kd=null;function dn(){return(He&2)!==0&&ke!==0?ke&-ke:L.T!==null?Bd():Dh()}function by(){if(un===0)if((ke&536870912)===0||De){var e=$r;$r<<=1,($r&3932160)===0&&($r=262144),un=e}else un=536870912;return e=rn.current,e!==null&&(e.flags|=32),un}function Ft(e,t,s){(e===Ie&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(Zi(e,0),Xs(e,ke,un,!1)),kl(e,s),((He&2)===0||e!==Ie)&&(e===Ie&&((He&2)===0&&(Va|=s),at===4&&Xs(e,ke,un,!1)),Yn(e))}function Sy(e,t,s){if((He&6)!==0)throw Error(r(327));var l=!s&&(t&127)===0&&(t&e.expiredLanes)===0||Al(e,t),c=l?r1(e,t):zd(e,t,!0),d=l;do{if(c===0){Yi&&!l&&Xs(e,t,0,!1);break}else{if(s=e.current.alternate,d&&!i1(s)){c=zd(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var S=e;c=ur;var C=S.current.memoizedState.isDehydrated;if(C&&(Zi(S,g).flags|=256),g=zd(S,g,!1),g!==2){if(_d&&!C){S.errorRecoveryDisabledLanes|=d,Va|=d,c=4;break e}d=Zt,Zt=c,d!==null&&(Zt===null?Zt=d:Zt.push.apply(Zt,d))}c=g}if(d=!1,c!==2)continue}}if(c===1){Zi(e,0),Xs(e,t,0,!0);break}e:{switch(l=e,d=c,d){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Xs(l,t,un,!Ps);break e;case 2:Zt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(c=Po+300-Et(),10<c)){if(Xs(l,t,un,!Ps),eo(l,0,!0)!==0)break e;ys=t,l.timeoutHandle=$y(jy.bind(null,l,s,Zt,Yo,Ed,t,un,Va,Ki,Ps,d,"Throttled",-0,0),c);break e}jy(l,s,Zt,Yo,Ed,t,un,Va,Ki,Ps,d,null,-0,0)}}break}while(!0);Yn(e)}function jy(e,t,s,l,c,d,g,S,C,G,Z,$,P,V){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ts},my(t,d,$);var ce=(d&62914560)===d?Po-Et():(d&4194048)===d?vy-Et():0;if(ce=P1($,ce),ce!==null){ys=d,e.cancelPendingCommit=ce(My.bind(null,e,t,d,s,l,c,g,S,C,Z,$,null,P,V)),Xs(e,d,g,!G);return}}My(e,t,d,s,l,c,g,S,C)}function i1(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var c=s[l],d=c.getSnapshot;c=c.value;try{if(!an(d(),c))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Xs(e,t,s,l){t&=~Td,t&=~Va,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var d=31-sn(c),g=1<<d;l[d]=-1,c&=~g}s!==0&&kh(e,s,t)}function Ko(){return(He&6)===0?(fr(0),!1):!0}function Od(){if(Te!==null){if(Ge===0)var e=Te.return;else e=Te,is=Da=null,Fu(e),Bi=null,Zl=0,e=Te;for(;e!==null;)Wp(e.alternate,e),e=e.return;Te=null}}function Zi(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,R1(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),ys=0,Od(),Ie=e,Te=s=ss(e.current,null),ke=t,Ge=0,cn=null,Ps=!1,Yi=Al(e,t),_d=!1,Ki=un=Td=Va=Vs=at=0,Zt=ur=null,Ed=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-sn(l),d=1<<c;t|=e[c],l&=~d}return ps=t,ho(),s}function wy(e,t){je=null,L.H=nr,t===Li||t===So?(t=qm(),Ge=3):t===Lu?(t=qm(),Ge=4):Ge=t===dd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,cn=t,Te===null&&(at=1,Do(e,jn(t,e.current)))}function Ny(){var e=rn.current;return e===null?!0:(ke&4194048)===ke?Cn===null:(ke&62914560)===ke||(ke&536870912)!==0?e===Cn:!1}function Ry(){var e=L.H;return L.H=nr,e===null?nr:e}function Cy(){var e=L.A;return L.A=s1,e}function Xo(){at=4,Ps||(ke&4194048)!==ke&&rn.current!==null||(Yi=!0),(Vs&134217727)===0&&(Va&134217727)===0||Ie===null||Xs(Ie,ke,un,!1)}function zd(e,t,s){var l=He;He|=2;var c=Ry(),d=Cy();(Ie!==e||ke!==t)&&(Yo=null,Zi(e,t)),t=!1;var g=at;e:do try{if(Ge!==0&&Te!==null){var S=Te,C=cn;switch(Ge){case 8:Od(),g=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(t=!0);var G=Ge;if(Ge=0,cn=null,Fi(e,S,C,G),s&&Yi){g=0;break e}break;default:G=Ge,Ge=0,cn=null,Fi(e,S,C,G)}}l1(),g=at;break}catch(Z){wy(e,Z)}while(!0);return t&&e.shellSuspendCounter++,is=Da=null,He=l,L.H=c,L.A=d,Te===null&&(Ie=null,ke=0,ho()),g}function l1(){for(;Te!==null;)_y(Te)}function r1(e,t){var s=He;He|=2;var l=Ry(),c=Cy();Ie!==e||ke!==t?(Yo=null,Vo=Et()+500,Zi(e,t)):Yi=Al(e,t);e:do try{if(Ge!==0&&Te!==null){t=Te;var d=cn;t:switch(Ge){case 1:Ge=0,cn=null,Fi(e,t,d,1);break;case 2:case 9:if(Lm(d)){Ge=0,cn=null,Ty(t);break}t=function(){Ge!==2&&Ge!==9||Ie!==e||(Ge=7),Yn(e)},d.then(t,t);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:Lm(d)?(Ge=0,cn=null,Ty(t)):(Ge=0,cn=null,Fi(e,t,d,7));break;case 5:var g=null;switch(Te.tag){case 26:g=Te.memoizedState;case 5:case 27:var S=Te;if(g?hg(g):S.stateNode.complete){Ge=0,cn=null;var C=S.sibling;if(C!==null)Te=C;else{var G=S.return;G!==null?(Te=G,Zo(G)):Te=null}break t}}Ge=0,cn=null,Fi(e,t,d,5);break;case 6:Ge=0,cn=null,Fi(e,t,d,6);break;case 8:Od(),at=6;break e;default:throw Error(r(462))}}o1();break}catch(Z){wy(e,Z)}while(!0);return is=Da=null,L.H=l,L.A=c,He=s,Te!==null?0:(Ie=null,ke=0,ho(),at)}function o1(){for(;Te!==null&&!Ir();)_y(Te)}function _y(e){var t=Jp(e.alternate,e,ps);e.memoizedProps=e.pendingProps,t===null?Zo(e):Te=t}function Ty(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=Yp(s,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=Yp(s,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Fu(t);default:Wp(s,t),t=Te=Cm(t,ps),t=Jp(s,t,ps)}e.memoizedProps=e.pendingProps,t===null?Zo(e):Te=t}function Fi(e,t,s,l){is=Da=null,Fu(t),Bi=null,Zl=0;var c=t.return;try{if(Ib(e,c,t,s,ke)){at=1,Do(e,jn(s,e.current)),Te=null;return}}catch(d){if(c!==null)throw Te=c,d;at=1,Do(e,jn(s,e.current)),Te=null;return}t.flags&32768?(De||l===1?e=!0:Yi||(ke&536870912)!==0?e=!1:(Ps=e=!0,(l===2||l===9||l===3||l===6)&&(l=rn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Ey(t,e)):Zo(t)}function Zo(e){var t=e;do{if((t.flags&32768)!==0){Ey(t,Ps);return}e=t.return;var s=Wb(t.alternate,t,ps);if(s!==null){Te=s;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);at===0&&(at=5)}function Ey(e,t){do{var s=e1(e.alternate,e);if(s!==null){s.flags&=32767,Te=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=s}while(e!==null);at=6,Te=null}function My(e,t,s,l,c,d,g,S,C){e.cancelPendingCommit=null;do Fo();while(mt!==0);if((He&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(d=t.lanes|t.childLanes,d|=ju,Qx(e,s,d,g,S,C),e===Ie&&(Te=Ie=null,ke=0),Xi=t,Ks=e,ys=s,Md=d,Ad=c,xy=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,f1(yi,function(){return Dy(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,c=K.p,K.p=2,g=He,He|=4;try{t1(e,t,s)}finally{He=g,K.p=c,L.T=l}}mt=1,Ay(),ky(),Oy()}}function Ay(){if(mt===1){mt=0;var e=Ks,t=Xi,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=L.T,L.T=null;var l=K.p;K.p=2;var c=He;He|=4;try{dy(t,e);var d=Kd,g=gm(e.containerInfo),S=d.focusedElem,C=d.selectionRange;if(g!==S&&S&&S.ownerDocument&&ym(S.ownerDocument.documentElement,S)){if(C!==null&&gu(S)){var G=C.start,Z=C.end;if(Z===void 0&&(Z=G),"selectionStart"in S)S.selectionStart=G,S.selectionEnd=Math.min(Z,S.value.length);else{var $=S.ownerDocument||document,P=$&&$.defaultView||window;if(P.getSelection){var V=P.getSelection(),ce=S.textContent.length,ye=Math.min(C.start,ce),Ze=C.end===void 0?ye:Math.min(C.end,ce);!V.extend&&ye>Ze&&(g=Ze,Ze=ye,ye=g);var U=pm(S,ye),M=pm(S,Ze);if(U&&M&&(V.rangeCount!==1||V.anchorNode!==U.node||V.anchorOffset!==U.offset||V.focusNode!==M.node||V.focusOffset!==M.offset)){var H=$.createRange();H.setStart(U.node,U.offset),V.removeAllRanges(),ye>Ze?(V.addRange(H),V.extend(M.node,M.offset)):(H.setEnd(M.node,M.offset),V.addRange(H))}}}}for($=[],V=S;V=V.parentNode;)V.nodeType===1&&$.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<$.length;S++){var I=$[S];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}rc=!!Yd,Kd=Yd=null}finally{He=c,K.p=l,L.T=s}}e.current=t,mt=2}}function ky(){if(mt===2){mt=0;var e=Ks,t=Xi,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=L.T,L.T=null;var l=K.p;K.p=2;var c=He;He|=4;try{ly(e,t.alternate,t)}finally{He=c,K.p=l,L.T=s}}mt=3}}function Oy(){if(mt===4||mt===3){mt=0,Fc();var e=Ks,t=Xi,s=ys,l=xy;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?mt=5:(mt=0,Xi=Ks=null,zy(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ys=null),$c(s),t=t.stateNode,nn&&typeof nn.onCommitFiberRoot=="function")try{nn.onCommitFiberRoot(Ml,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=L.T,c=K.p,K.p=2,L.T=null;try{for(var d=e.onRecoverableError,g=0;g<l.length;g++){var S=l[g];d(S.value,{componentStack:S.stack})}}finally{L.T=t,K.p=c}}(ys&3)!==0&&Fo(),Yn(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===kd?dr++:(dr=0,kd=e):dr=0,fr(0)}}function zy(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Kl(t)))}function Fo(){return Ay(),ky(),Oy(),Dy()}function Dy(){if(mt!==5)return!1;var e=Ks,t=Md;Md=0;var s=$c(ys),l=L.T,c=K.p;try{K.p=32>s?32:s,L.T=null,s=Ad,Ad=null;var d=Ks,g=ys;if(mt=0,Xi=Ks=null,ys=0,(He&6)!==0)throw Error(r(331));var S=He;if(He|=4,yy(d.current),hy(d,d.current,g,s),He=S,fr(0,!1),nn&&typeof nn.onPostCommitFiberRoot=="function")try{nn.onPostCommitFiberRoot(Ml,d)}catch{}return!0}finally{K.p=c,L.T=l,zy(e,t)}}function Uy(e,t,s){t=jn(s,t),t=ud(e.stateNode,t,2),e=qs(e,t,2),e!==null&&(kl(e,2),Yn(e))}function Pe(e,t,s){if(e.tag===3)Uy(e,e,s);else for(;t!==null;){if(t.tag===3){Uy(t,e,s);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ys===null||!Ys.has(l))){e=jn(s,e),s=Lp(2),l=qs(t,s,2),l!==null&&(Bp(s,l,t,e),kl(l,2),Yn(l));break}}t=t.return}}function Dd(e,t,s){var l=e.pingCache;if(l===null){l=e.pingCache=new a1;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(s)||(_d=!0,c.add(s),e=c1.bind(null,e,t,s),t.then(e,e))}function c1(e,t,s){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Ie===e&&(ke&s)===s&&(at===4||at===3&&(ke&62914560)===ke&&300>Et()-Po?(He&2)===0&&Zi(e,0):Td|=s,Ki===ke&&(Ki=0)),Yn(e)}function Ly(e,t){t===0&&(t=Ah()),e=ka(e,t),e!==null&&(kl(e,t),Yn(e))}function u1(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Ly(e,s)}function d1(e,t){var s=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),Ly(e,s)}function f1(e,t){return kn(e,t)}var Io=null,Ii=null,Ud=!1,Jo=!1,Ld=!1,Zs=0;function Yn(e){e!==Ii&&e.next===null&&(Ii===null?Io=Ii=e:Ii=Ii.next=e),Jo=!0,Ud||(Ud=!0,m1())}function fr(e,t){if(!Ld&&Jo){Ld=!0;do for(var s=!1,l=Io;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var d=0;else{var g=l.suspendedLanes,S=l.pingedLanes;d=(1<<31-sn(42|e)+1)-1,d&=c&~(g&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(s=!0,Qy(l,d))}else d=ke,d=eo(l,l===Ie?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||Al(l,d)||(s=!0,Qy(l,d));l=l.next}while(s);Ld=!1}}function h1(){By()}function By(){Jo=Ud=!1;var e=0;Zs!==0&&N1()&&(e=Zs);for(var t=Et(),s=null,l=Io;l!==null;){var c=l.next,d=qy(l,t);d===0?(l.next=null,s===null?Io=c:s.next=c,c===null&&(Ii=s)):(s=l,(e!==0||(d&3)!==0)&&(Jo=!0)),l=c}mt!==0&&mt!==5||fr(e),Zs!==0&&(Zs=0)}function qy(e,t){for(var s=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var g=31-sn(d),S=1<<g,C=c[g];C===-1?((S&s)===0||(S&l)!==0)&&(c[g]=Hx(S,t)):C<=t&&(e.expiredLanes|=S),d&=~S}if(t=Ie,s=ke,s=eo(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===t&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&El(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Al(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(l!==null&&El(l),$c(s)){case 2:case 8:s=Qn;break;case 32:s=yi;break;case 268435456:s=Mh;break;default:s=yi}return l=Hy.bind(null,e),s=kn(s,l),e.callbackPriority=t,e.callbackNode=s,t}return l!==null&&l!==null&&El(l),e.callbackPriority=2,e.callbackNode=null,2}function Hy(e,t){if(mt!==0&&mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Fo()&&e.callbackNode!==s)return null;var l=ke;return l=eo(e,e===Ie?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Sy(e,l,t),qy(e,Et()),e.callbackNode!=null&&e.callbackNode===s?Hy.bind(null,e):null)}function Qy(e,t){if(Fo())return null;Sy(e,t,!0)}function m1(){C1(function(){(He&6)!==0?kn(jt,h1):By()})}function Bd(){if(Zs===0){var e=Di;e===0&&(e=Jr,Jr<<=1,(Jr&261888)===0&&(Jr=256)),Zs=e}return Zs}function Gy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ao(""+e)}function Py(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function p1(e,t,s,l,c){if(t==="submit"&&s&&s.stateNode===c){var d=Gy((c[Pt]||null).action),g=l.submitter;g&&(t=(t=g[Pt]||null)?Gy(t.formAction):g.getAttribute("formAction"),t!==null&&(d=t,g=null));var S=new oo("action","action",null,l,c);e.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Zs!==0){var C=g?Py(c,g):new FormData(c);ad(s,{pending:!0,data:C,method:c.method,action:d},null,C)}}else typeof d=="function"&&(S.preventDefault(),C=g?Py(c,g):new FormData(c),ad(s,{pending:!0,data:C,method:c.method,action:d},d,C))},currentTarget:c}]})}}for(var qd=0;qd<Su.length;qd++){var Hd=Su[qd],y1=Hd.toLowerCase(),g1=Hd[0].toUpperCase()+Hd.slice(1);On(y1,"on"+g1)}On(bm,"onAnimationEnd"),On(Sm,"onAnimationIteration"),On(jm,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(Ob,"onTransitionRun"),On(zb,"onTransitionStart"),On(Db,"onTransitionCancel"),On(wm,"onTransitionEnd"),Si("onMouseEnter",["mouseout","mouseover"]),Si("onMouseLeave",["mouseout","mouseover"]),Si("onPointerEnter",["pointerout","pointerover"]),Si("onPointerLeave",["pointerout","pointerover"]),Ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ta("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ta("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),v1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hr));function Vy(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],c=l.event;l=l.listeners;e:{var d=void 0;if(t)for(var g=l.length-1;0<=g;g--){var S=l[g],C=S.instance,G=S.currentTarget;if(S=S.listener,C!==d&&c.isPropagationStopped())break e;d=S,c.currentTarget=G;try{d(c)}catch(Z){fo(Z)}c.currentTarget=null,d=C}else for(g=0;g<l.length;g++){if(S=l[g],C=S.instance,G=S.currentTarget,S=S.listener,C!==d&&c.isPropagationStopped())break e;d=S,c.currentTarget=G;try{d(c)}catch(Z){fo(Z)}c.currentTarget=null,d=C}}}}function Ee(e,t){var s=t[Wc];s===void 0&&(s=t[Wc]=new Set);var l=e+"__bubble";s.has(l)||(Yy(t,e,2,!1),s.add(l))}function Qd(e,t,s){var l=0;t&&(l|=4),Yy(s,e,l,t)}var $o="_reactListening"+Math.random().toString(36).slice(2);function Gd(e){if(!e[$o]){e[$o]=!0,Bh.forEach(function(s){s!=="selectionchange"&&(v1.has(s)||Qd(s,!1,e),Qd(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$o]||(t[$o]=!0,Qd("selectionchange",!1,t))}}function Yy(e,t,s,l){switch(bg(t)){case 2:var c=K1;break;case 8:c=X1;break;default:c=sf}s=c.bind(null,t,s,e),c=void 0,!ou||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function Pd(e,t,s,l,c){var d=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var g=l.tag;if(g===3||g===4){var S=l.stateNode.containerInfo;if(S===c)break;if(g===4)for(g=l.return;g!==null;){var C=g.tag;if((C===3||C===4)&&g.stateNode.containerInfo===c)return;g=g.return}for(;S!==null;){if(g=vi(S),g===null)return;if(C=g.tag,C===5||C===6||C===26||C===27){l=d=g;continue e}S=S.parentNode}}l=l.return}Ih(function(){var G=d,Z=lu(s),$=[];e:{var P=Nm.get(e);if(P!==void 0){var V=oo,ce=e;switch(e){case"keypress":if(lo(s)===0)break e;case"keydown":case"keyup":V=db;break;case"focusin":ce="focus",V=fu;break;case"focusout":ce="blur",V=fu;break;case"beforeblur":case"afterblur":V=fu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Wh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Wx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=mb;break;case bm:case Sm:case jm:V=nb;break;case wm:V=yb;break;case"scroll":case"scrollend":V=Jx;break;case"wheel":V=vb;break;case"copy":case"cut":case"paste":V=ab;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=tm;break;case"toggle":case"beforetoggle":V=bb}var ye=(t&4)!==0,Ze=!ye&&(e==="scroll"||e==="scrollend"),U=ye?P!==null?P+"Capture":null:P;ye=[];for(var M=G,H;M!==null;){var I=M;if(H=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||H===null||U===null||(I=Dl(M,U),I!=null&&ye.push(mr(M,I,H))),Ze)break;M=M.return}0<ye.length&&(P=new V(P,ce,null,s,Z),$.push({event:P,listeners:ye}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",P&&s!==iu&&(ce=s.relatedTarget||s.fromElement)&&(vi(ce)||ce[gi]))break e;if((V||P)&&(P=Z.window===Z?Z:(P=Z.ownerDocument)?P.defaultView||P.parentWindow:window,V?(ce=s.relatedTarget||s.toElement,V=G,ce=ce?vi(ce):null,ce!==null&&(Ze=f(ce),ye=ce.tag,ce!==Ze||ye!==5&&ye!==27&&ye!==6)&&(ce=null)):(V=null,ce=G),V!==ce)){if(ye=Wh,I="onMouseLeave",U="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(ye=tm,I="onPointerLeave",U="onPointerEnter",M="pointer"),Ze=V==null?P:zl(V),H=ce==null?P:zl(ce),P=new ye(I,M+"leave",V,s,Z),P.target=Ze,P.relatedTarget=H,I=null,vi(Z)===G&&(ye=new ye(U,M+"enter",ce,s,Z),ye.target=H,ye.relatedTarget=Ze,I=ye),Ze=I,V&&ce)t:{for(ye=x1,U=V,M=ce,H=0,I=U;I;I=ye(I))H++;I=0;for(var pe=M;pe;pe=ye(pe))I++;for(;0<H-I;)U=ye(U),H--;for(;0<I-H;)M=ye(M),I--;for(;H--;){if(U===M||M!==null&&U===M.alternate){ye=U;break t}U=ye(U),M=ye(M)}ye=null}else ye=null;V!==null&&Ky($,P,V,ye,!1),ce!==null&&Ze!==null&&Ky($,Ze,ce,ye,!0)}}e:{if(P=G?zl(G):window,V=P.nodeName&&P.nodeName.toLowerCase(),V==="select"||V==="input"&&P.type==="file")var Be=cm;else if(rm(P))if(um)Be=Mb;else{Be=Tb;var de=_b}else V=P.nodeName,!V||V.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?G&&au(G.elementType)&&(Be=cm):Be=Eb;if(Be&&(Be=Be(e,G))){om($,Be,s,Z);break e}de&&de(e,P,G),e==="focusout"&&G&&P.type==="number"&&G.memoizedProps.value!=null&&su(P,"number",P.value)}switch(de=G?zl(G):window,e){case"focusin":(rm(de)||de.contentEditable==="true")&&(_i=de,vu=G,Pl=null);break;case"focusout":Pl=vu=_i=null;break;case"mousedown":xu=!0;break;case"contextmenu":case"mouseup":case"dragend":xu=!1,vm($,s,Z);break;case"selectionchange":if(kb)break;case"keydown":case"keyup":vm($,s,Z)}var we;if(mu)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Ci?im(e,s)&&(Oe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Oe="onCompositionStart");Oe&&(nm&&s.locale!=="ko"&&(Ci||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Ci&&(we=Jh()):(ks=Z,cu="value"in ks?ks.value:ks.textContent,Ci=!0)),de=Wo(G,Oe),0<de.length&&(Oe=new em(Oe,e,null,s,Z),$.push({event:Oe,listeners:de}),we?Oe.data=we:(we=lm(s),we!==null&&(Oe.data=we)))),(we=jb?wb(e,s):Nb(e,s))&&(Oe=Wo(G,"onBeforeInput"),0<Oe.length&&(de=new em("onBeforeInput","beforeinput",null,s,Z),$.push({event:de,listeners:Oe}),de.data=we)),p1($,e,G,s,Z)}Vy($,t)})}function mr(e,t,s){return{instance:e,listener:t,currentTarget:s}}function Wo(e,t){for(var s=t+"Capture",l=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Dl(e,s),c!=null&&l.unshift(mr(e,c,d)),c=Dl(e,t),c!=null&&l.push(mr(e,c,d))),e.tag===3)return l;e=e.return}return[]}function x1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ky(e,t,s,l,c){for(var d=t._reactName,g=[];s!==null&&s!==l;){var S=s,C=S.alternate,G=S.stateNode;if(S=S.tag,C!==null&&C===l)break;S!==5&&S!==26&&S!==27||G===null||(C=G,c?(G=Dl(s,d),G!=null&&g.unshift(mr(s,G,C))):c||(G=Dl(s,d),G!=null&&g.push(mr(s,G,C)))),s=s.return}g.length!==0&&e.push({event:t,listeners:g})}var b1=/\r\n?/g,S1=/\u0000|\uFFFD/g;function Xy(e){return(typeof e=="string"?e:""+e).replace(b1,`
65
+ `).replace(S1,"")}function Zy(e,t){return t=Xy(t),Xy(e)===t}function Xe(e,t,s,l,c,d){switch(s){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||wi(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&wi(e,""+l);break;case"className":no(e,"class",l);break;case"tabIndex":no(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":no(e,s,l);break;case"style":Zh(e,l,d);break;case"data":if(t!=="object"){no(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=ao(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(s==="formAction"?(t!=="input"&&Xe(e,t,"name",c.name,c,null),Xe(e,t,"formEncType",c.formEncType,c,null),Xe(e,t,"formMethod",c.formMethod,c,null),Xe(e,t,"formTarget",c.formTarget,c,null)):(Xe(e,t,"encType",c.encType,c,null),Xe(e,t,"method",c.method,c,null),Xe(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=ao(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=ts);break;case"onScroll":l!=null&&Ee("scroll",e);break;case"onScrollEnd":l!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=s}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}s=ao(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""+l):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),to(e,"popover",l);break;case"xlinkActuate":es(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":es(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":es(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":es(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":es(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":es(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":es(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":es(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":es(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":to(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=Fx.get(s)||s,to(e,s,l))}}function Vd(e,t,s,l,c,d){switch(s){case"style":Zh(e,l,d);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=s}}break;case"children":typeof l=="string"?wi(e,l):(typeof l=="number"||typeof l=="bigint")&&wi(e,""+l);break;case"onScroll":l!=null&&Ee("scroll",e);break;case"onScrollEnd":l!=null&&Ee("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ts);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qh.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),t=s.slice(2,c?s.length-7:void 0),d=e[Pt]||null,d=d!=null?d[s]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof l=="function")){typeof d!="function"&&d!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,l,c);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):to(e,s,l)}}}function _t(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var l=!1,c=!1,d;for(d in s)if(s.hasOwnProperty(d)){var g=s[d];if(g!=null)switch(d){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Xe(e,t,d,g,s,null)}}c&&Xe(e,t,"srcSet",s.srcSet,s,null),l&&Xe(e,t,"src",s.src,s,null);return;case"input":Ee("invalid",e);var S=d=g=c=null,C=null,G=null;for(l in s)if(s.hasOwnProperty(l)){var Z=s[l];if(Z!=null)switch(l){case"name":c=Z;break;case"type":g=Z;break;case"checked":C=Z;break;case"defaultChecked":G=Z;break;case"value":d=Z;break;case"defaultValue":S=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,t));break;default:Xe(e,t,l,Z,s,null)}}Vh(e,d,S,C,G,g,c,!1);return;case"select":Ee("invalid",e),l=g=d=null;for(c in s)if(s.hasOwnProperty(c)&&(S=s[c],S!=null))switch(c){case"value":d=S;break;case"defaultValue":g=S;break;case"multiple":l=S;default:Xe(e,t,c,S,s,null)}t=d,s=g,e.multiple=!!l,t!=null?ji(e,!!l,t,!1):s!=null&&ji(e,!!l,s,!0);return;case"textarea":Ee("invalid",e),d=c=l=null;for(g in s)if(s.hasOwnProperty(g)&&(S=s[g],S!=null))switch(g){case"value":l=S;break;case"defaultValue":c=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Xe(e,t,g,S,s,null)}Kh(e,l,c,d);return;case"option":for(C in s)if(s.hasOwnProperty(C)&&(l=s[C],l!=null))switch(C){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Xe(e,t,C,l,s,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(l=0;l<hr.length;l++)Ee(hr[l],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in s)if(s.hasOwnProperty(G)&&(l=s[G],l!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Xe(e,t,G,l,s,null)}return;default:if(au(t)){for(Z in s)s.hasOwnProperty(Z)&&(l=s[Z],l!==void 0&&Vd(e,t,Z,l,s,void 0));return}}for(S in s)s.hasOwnProperty(S)&&(l=s[S],l!=null&&Xe(e,t,S,l,s,null))}function j1(e,t,s,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,g=null,S=null,C=null,G=null,Z=null;for(V in s){var $=s[V];if(s.hasOwnProperty(V)&&$!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":C=$;default:l.hasOwnProperty(V)||Xe(e,t,V,null,l,$)}}for(var P in l){var V=l[P];if($=s[P],l.hasOwnProperty(P)&&(V!=null||$!=null))switch(P){case"type":d=V;break;case"name":c=V;break;case"checked":G=V;break;case"defaultChecked":Z=V;break;case"value":g=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,t));break;default:V!==$&&Xe(e,t,P,V,l,$)}}nu(e,g,S,C,G,Z,d,c);return;case"select":V=g=S=P=null;for(d in s)if(C=s[d],s.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":V=C;default:l.hasOwnProperty(d)||Xe(e,t,d,null,l,C)}for(c in l)if(d=l[c],C=s[c],l.hasOwnProperty(c)&&(d!=null||C!=null))switch(c){case"value":P=d;break;case"defaultValue":S=d;break;case"multiple":g=d;default:d!==C&&Xe(e,t,c,d,l,C)}t=S,s=g,l=V,P!=null?ji(e,!!s,P,!1):!!l!=!!s&&(t!=null?ji(e,!!s,t,!0):ji(e,!!s,s?[]:"",!1));return;case"textarea":V=P=null;for(S in s)if(c=s[S],s.hasOwnProperty(S)&&c!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Xe(e,t,S,null,l,c)}for(g in l)if(c=l[g],d=s[g],l.hasOwnProperty(g)&&(c!=null||d!=null))switch(g){case"value":P=c;break;case"defaultValue":V=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==d&&Xe(e,t,g,c,l,d)}Yh(e,P,V);return;case"option":for(var ce in s)if(P=s[ce],s.hasOwnProperty(ce)&&P!=null&&!l.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:Xe(e,t,ce,null,l,P)}for(C in l)if(P=l[C],V=s[C],l.hasOwnProperty(C)&&P!==V&&(P!=null||V!=null))switch(C){case"selected":e.selected=P&&typeof P!="function"&&typeof P!="symbol";break;default:Xe(e,t,C,P,l,V)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ye in s)P=s[ye],s.hasOwnProperty(ye)&&P!=null&&!l.hasOwnProperty(ye)&&Xe(e,t,ye,null,l,P);for(G in l)if(P=l[G],V=s[G],l.hasOwnProperty(G)&&P!==V&&(P!=null||V!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(137,t));break;default:Xe(e,t,G,P,l,V)}return;default:if(au(t)){for(var Ze in s)P=s[Ze],s.hasOwnProperty(Ze)&&P!==void 0&&!l.hasOwnProperty(Ze)&&Vd(e,t,Ze,void 0,l,P);for(Z in l)P=l[Z],V=s[Z],!l.hasOwnProperty(Z)||P===V||P===void 0&&V===void 0||Vd(e,t,Z,P,l,V);return}}for(var U in s)P=s[U],s.hasOwnProperty(U)&&P!=null&&!l.hasOwnProperty(U)&&Xe(e,t,U,null,l,P);for($ in l)P=l[$],V=s[$],!l.hasOwnProperty($)||P===V||P==null&&V==null||Xe(e,t,$,P,l,V)}function Fy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function w1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),l=0;l<s.length;l++){var c=s[l],d=c.transferSize,g=c.initiatorType,S=c.duration;if(d&&S&&Fy(g)){for(g=0,S=c.responseEnd,l+=1;l<s.length;l++){var C=s[l],G=C.startTime;if(G>S)break;var Z=C.transferSize,$=C.initiatorType;Z&&Fy($)&&(C=C.responseEnd,g+=Z*(C<S?1:(S-G)/(C-G)))}if(--l,t+=8*(d+g)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Yd=null,Kd=null;function ec(e){return e.nodeType===9?e:e.ownerDocument}function Iy(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jy(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Xd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Zd=null;function N1(){var e=window.event;return e&&e.type==="popstate"?e===Zd?!1:(Zd=e,!0):(Zd=null,!1)}var $y=typeof setTimeout=="function"?setTimeout:void 0,R1=typeof clearTimeout=="function"?clearTimeout:void 0,Wy=typeof Promise=="function"?Promise:void 0,C1=typeof queueMicrotask=="function"?queueMicrotask:typeof Wy<"u"?function(e){return Wy.resolve(null).then(e).catch(_1)}:$y;function _1(e){setTimeout(function(){throw e})}function Fs(e){return e==="head"}function eg(e,t){var s=t,l=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"||s==="/&"){if(l===0){e.removeChild(c),el(t);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")pr(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,pr(s);for(var d=s.firstChild;d;){var g=d.nextSibling,S=d.nodeName;d[Ol]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||s.removeChild(d),d=g}}else s==="body"&&pr(e.ownerDocument.body);s=c}while(s);el(t)}function tg(e,t){var s=e;e=0;do{var l=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),l&&l.nodeType===8)if(s=l.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=l}while(s)}function Fd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Fd(s),eu(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function T1(e,t,s,l){for(;e.nodeType===1;){var c=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Ol])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function E1(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=_n(e.nextSibling),e===null))return null;return e}function ng(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function Id(e){return e.data==="$?"||e.data==="$~"}function Jd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function M1(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var l=function(){t(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function _n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var $d=null;function sg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return _n(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function ag(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function ig(e,t,s){switch(t=ec(s),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function pr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);eu(e)}var Tn=new Map,lg=new Set;function tc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var gs=K.d;K.d={f:A1,r:k1,D:O1,C:z1,L:D1,m:U1,X:B1,S:L1,M:q1};function A1(){var e=gs.f(),t=Ko();return e||t}function k1(e){var t=xi(e);t!==null&&t.tag===5&&t.type==="form"?wp(t):gs.r(e)}var Ji=typeof document>"u"?null:document;function rg(e,t,s){var l=Ji;if(l&&typeof t=="string"&&t){var c=bn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),lg.has(c)||(lg.add(c),e={rel:e,crossOrigin:s,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),_t(t,"link",e),gt(t),l.head.appendChild(t)))}}function O1(e){gs.D(e),rg("dns-prefetch",e,null)}function z1(e,t){gs.C(e,t),rg("preconnect",e,t)}function D1(e,t,s){gs.L(e,t,s);var l=Ji;if(l&&e&&t){var c='link[rel="preload"][as="'+bn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+bn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+bn(s.imageSizes)+'"]')):c+='[href="'+bn(e)+'"]';var d=c;switch(t){case"style":d=$i(e);break;case"script":d=Wi(e)}Tn.has(d)||(e=v({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),Tn.set(d,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(yr(d))||t==="script"&&l.querySelector(gr(d))||(t=l.createElement("link"),_t(t,"link",e),gt(t),l.head.appendChild(t)))}}function U1(e,t){gs.m(e,t);var s=Ji;if(s&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+bn(l)+'"][href="'+bn(e)+'"]',d=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Wi(e)}if(!Tn.has(d)&&(e=v({rel:"modulepreload",href:e},t),Tn.set(d,e),s.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(gr(d)))return}l=s.createElement("link"),_t(l,"link",e),gt(l),s.head.appendChild(l)}}}function L1(e,t,s){gs.S(e,t,s);var l=Ji;if(l&&e){var c=bi(l).hoistableStyles,d=$i(e);t=t||"default";var g=c.get(d);if(!g){var S={loading:0,preload:null};if(g=l.querySelector(yr(d)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},s),(s=Tn.get(d))&&Wd(e,s);var C=g=l.createElement("link");gt(C),_t(C,"link",e),C._p=new Promise(function(G,Z){C.onload=G,C.onerror=Z}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,nc(g,t,l)}g={type:"stylesheet",instance:g,count:1,state:S},c.set(d,g)}}}function B1(e,t){gs.X(e,t);var s=Ji;if(s&&e){var l=bi(s).hoistableScripts,c=Wi(e),d=l.get(c);d||(d=s.querySelector(gr(c)),d||(e=v({src:e,async:!0},t),(t=Tn.get(c))&&ef(e,t),d=s.createElement("script"),gt(d),_t(d,"link",e),s.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function q1(e,t){gs.M(e,t);var s=Ji;if(s&&e){var l=bi(s).hoistableScripts,c=Wi(e),d=l.get(c);d||(d=s.querySelector(gr(c)),d||(e=v({src:e,async:!0,type:"module"},t),(t=Tn.get(c))&&ef(e,t),d=s.createElement("script"),gt(d),_t(d,"link",e),s.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function og(e,t,s,l){var c=(c=me.current)?tc(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=$i(s.href),s=bi(c).hoistableStyles,l=s.get(t),l||(l={type:"style",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=$i(s.href);var d=bi(c).hoistableStyles,g=d.get(e);if(g||(c=c.ownerDocument||c,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,g),(d=c.querySelector(yr(e)))&&!d._p&&(g.instance=d,g.state.loading=5),Tn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Tn.set(e,s),d||H1(c,e,s,g.state))),t&&l===null)throw Error(r(528,""));return g}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Wi(s),s=bi(c).hoistableScripts,l=s.get(t),l||(l={type:"script",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function $i(e){return'href="'+bn(e)+'"'}function yr(e){return'link[rel="stylesheet"]['+e+"]"}function cg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function H1(e,t,s,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),_t(t,"link",s),gt(t),e.head.appendChild(t))}function Wi(e){return'[src="'+bn(e)+'"]'}function gr(e){return"script[async]"+e}function ug(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+bn(s.href)+'"]');if(l)return t.instance=l,gt(l),l;var c=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),gt(l),_t(l,"style",c),nc(l,s.precedence,e),t.instance=l;case"stylesheet":c=$i(s.href);var d=e.querySelector(yr(c));if(d)return t.state.loading|=4,t.instance=d,gt(d),d;l=cg(s),(c=Tn.get(c))&&Wd(l,c),d=(e.ownerDocument||e).createElement("link"),gt(d);var g=d;return g._p=new Promise(function(S,C){g.onload=S,g.onerror=C}),_t(d,"link",l),t.state.loading|=4,nc(d,s.precedence,e),t.instance=d;case"script":return d=Wi(s.src),(c=e.querySelector(gr(d)))?(t.instance=c,gt(c),c):(l=s,(c=Tn.get(d))&&(l=v({},s),ef(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),gt(c),_t(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,nc(l,s.precedence,e));return t.instance}function nc(e,t,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,d=c,g=0;g<l.length;g++){var S=l[g];if(S.dataset.precedence===t)d=S;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function Wd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ef(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var sc=null;function dg(e,t,s){if(sc===null){var l=new Map,c=sc=new Map;c.set(s,l)}else c=sc,l=c.get(s),l||(l=new Map,c.set(s,l));if(l.has(e))return l;for(l.set(e,null),s=s.getElementsByTagName(e),c=0;c<s.length;c++){var d=s[c];if(!(d[Ol]||d[wt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var g=d.getAttribute(t)||"";g=e+g;var S=l.get(g);S?S.push(d):l.set(g,[d])}}return l}function fg(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function Q1(e,t,s){if(s===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function hg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function G1(e,t,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var c=$i(l.href),d=t.querySelector(yr(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ac.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=d,gt(d);return}d=t.ownerDocument||t,l=cg(l),(c=Tn.get(c))&&Wd(l,c),d=d.createElement("link"),gt(d);var g=d;g._p=new Promise(function(S,C){g.onload=S,g.onerror=C}),_t(d,"link",l),s.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=ac.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var tf=0;function P1(e,t){return e.stylesheets&&e.count===0&&lc(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var l=setTimeout(function(){if(e.stylesheets&&lc(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&tf===0&&(tf=62500*w1());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lc(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>tf?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function ac(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ic=null;function lc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ic=new Map,t.forEach(V1,e),ic=null,ac.call(e))}function V1(e,t){if(!(t.state.loading&4)){var s=ic.get(e);if(s)var l=s.get(null);else{s=new Map,ic.set(e,s);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var g=c[d];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(s.set(g.dataset.precedence,g),l=g)}l&&s.set(null,l)}c=t.instance,g=c.getAttribute("data-precedence"),d=s.get(g)||l,d===l&&s.set(null,c),s.set(g,c),this.count++,l=ac.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var vr={$$typeof:B,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function Y1(e,t,s,l,c,d,g,S,C){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ic(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ic(0),this.hiddenUpdates=Ic(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function mg(e,t,s,l,c,d,g,S,C,G,Z,$){return e=new Y1(e,t,s,g,C,G,Z,$,S),t=1,d===!0&&(t|=24),d=ln(3,null,null,t),e.current=d,d.stateNode=e,t=zu(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:l,isDehydrated:s,cache:t},Bu(d),e}function pg(e){return e?(e=Mi,e):Mi}function yg(e,t,s,l,c,d){c=pg(c),l.context===null?l.context=c:l.pendingContext=c,l=Bs(t),l.payload={element:s},d=d===void 0?null:d,d!==null&&(l.callback=d),s=qs(e,l,t),s!==null&&(Ft(s,e,t),Il(s,e,t))}function gg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function nf(e,t){gg(e,t),(e=e.alternate)&&gg(e,t)}function vg(e){if(e.tag===13||e.tag===31){var t=ka(e,67108864);t!==null&&Ft(t,e,67108864),nf(e,67108864)}}function xg(e){if(e.tag===13||e.tag===31){var t=dn();t=Jc(t);var s=ka(e,t);s!==null&&Ft(s,e,t),nf(e,t)}}var rc=!0;function K1(e,t,s,l){var c=L.T;L.T=null;var d=K.p;try{K.p=2,sf(e,t,s,l)}finally{K.p=d,L.T=c}}function X1(e,t,s,l){var c=L.T;L.T=null;var d=K.p;try{K.p=8,sf(e,t,s,l)}finally{K.p=d,L.T=c}}function sf(e,t,s,l){if(rc){var c=af(l);if(c===null)Pd(e,t,l,oc,s),Sg(e,l);else if(F1(c,e,t,s,l))l.stopPropagation();else if(Sg(e,l),t&4&&-1<Z1.indexOf(e)){for(;c!==null;){var d=xi(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var g=_a(d.pendingLanes);if(g!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var C=1<<31-sn(g);S.entanglements[1]|=C,g&=~C}Yn(d),(He&6)===0&&(Vo=Et()+500,fr(0))}}break;case 31:case 13:S=ka(d,2),S!==null&&Ft(S,d,2),Ko(),nf(d,2)}if(d=af(l),d===null&&Pd(e,t,l,oc,s),d===c)break;c=d}c!==null&&l.stopPropagation()}else Pd(e,t,l,null,s)}}function af(e){return e=lu(e),lf(e)}var oc=null;function lf(e){if(oc=null,e=vi(e),e!==null){var t=f(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=h(t),e!==null)return e;e=null}else if(s===31){if(e=y(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return oc=e,null}function bg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ye()){case jt:return 2;case Qn:return 8;case yi:case zx:return 32;case Mh:return 268435456;default:return 32}default:return 32}}var rf=!1,Is=null,Js=null,$s=null,xr=new Map,br=new Map,Ws=[],Z1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Sg(e,t){switch(e){case"focusin":case"focusout":Is=null;break;case"dragenter":case"dragleave":Js=null;break;case"mouseover":case"mouseout":$s=null;break;case"pointerover":case"pointerout":xr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":br.delete(t.pointerId)}}function Sr(e,t,s,l,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:s,eventSystemFlags:l,nativeEvent:d,targetContainers:[c]},t!==null&&(t=xi(t),t!==null&&vg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function F1(e,t,s,l,c){switch(t){case"focusin":return Is=Sr(Is,e,t,s,l,c),!0;case"dragenter":return Js=Sr(Js,e,t,s,l,c),!0;case"mouseover":return $s=Sr($s,e,t,s,l,c),!0;case"pointerover":var d=c.pointerId;return xr.set(d,Sr(xr.get(d)||null,e,t,s,l,c)),!0;case"gotpointercapture":return d=c.pointerId,br.set(d,Sr(br.get(d)||null,e,t,s,l,c)),!0}return!1}function jg(e){var t=vi(e.target);if(t!==null){var s=f(t);if(s!==null){if(t=s.tag,t===13){if(t=h(s),t!==null){e.blockedOn=t,Uh(e.priority,function(){xg(s)});return}}else if(t===31){if(t=y(s),t!==null){e.blockedOn=t,Uh(e.priority,function(){xg(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=af(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);iu=l,s.target.dispatchEvent(l),iu=null}else return t=xi(s),t!==null&&vg(t),e.blockedOn=s,!1;t.shift()}return!0}function wg(e,t,s){cc(e)&&s.delete(t)}function I1(){rf=!1,Is!==null&&cc(Is)&&(Is=null),Js!==null&&cc(Js)&&(Js=null),$s!==null&&cc($s)&&($s=null),xr.forEach(wg),br.forEach(wg)}function uc(e,t){e.blockedOn===t&&(e.blockedOn=null,rf||(rf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,I1)))}var dc=null;function Ng(e){dc!==e&&(dc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){dc===e&&(dc=null);for(var t=0;t<e.length;t+=3){var s=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(lf(l||s)===null)continue;break}var d=xi(s);d!==null&&(e.splice(t,3),t-=3,ad(d,{pending:!0,data:c,method:s.method,action:l},l,c))}}))}function el(e){function t(C){return uc(C,e)}Is!==null&&uc(Is,e),Js!==null&&uc(Js,e),$s!==null&&uc($s,e),xr.forEach(t),br.forEach(t);for(var s=0;s<Ws.length;s++){var l=Ws[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ws.length&&(s=Ws[0],s.blockedOn===null);)jg(s),s.blockedOn===null&&Ws.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var c=s[l],d=s[l+1],g=c[Pt]||null;if(typeof d=="function")g||Ng(s);else if(g){var S=null;if(d&&d.hasAttribute("formAction")){if(c=d,g=d[Pt]||null)S=g.formAction;else if(lf(c)!==null)continue}else S=g.action;typeof S=="function"?s[l+1]=S:(s.splice(l,3),l-=3),Ng(s)}}}function Rg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(g){return c=g})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(s,20)}function s(){if(!l&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function of(e){this._internalRoot=e}fc.prototype.render=of.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var s=t.current,l=dn();yg(s,l,e,t,null,null)},fc.prototype.unmount=of.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;yg(e.current,2,null,e,null,null),Ko(),t[gi]=null}};function fc(e){this._internalRoot=e}fc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Dh();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Ws.length&&t!==0&&t<Ws[s].priority;s++);Ws.splice(s,0,e),s===0&&jg(e)}};var Cg=a.version;if(Cg!=="19.2.6")throw Error(r(527,Cg,"19.2.6"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var J1={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hc.isDisabled&&hc.supportsFiber)try{Ml=hc.inject(J1),nn=hc}catch{}}return Cr.createRoot=function(e,t){if(!u(e))throw Error(r(299));var s=!1,l="",c=Op,d=zp,g=Dp;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=mg(e,1,!1,null,null,s,l,null,c,d,g,Rg),e[gi]=t.current,Gd(e),new of(t)},Cr.hydrateRoot=function(e,t,s){if(!u(e))throw Error(r(299));var l=!1,c="",d=Op,g=zp,S=Dp,C=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(d=s.onUncaughtError),s.onCaughtError!==void 0&&(g=s.onCaughtError),s.onRecoverableError!==void 0&&(S=s.onRecoverableError),s.formState!==void 0&&(C=s.formState)),t=mg(e,1,!0,t,s??null,l,c,C,d,g,S,Rg),t.context=pg(null),s=t.current,l=dn(),l=Jc(l),c=Bs(l),c.callback=null,qs(s,c,l),s=l,t.current.lanes=s,kl(t,s),Yn(t),e[gi]=t.current,Gd(e),new fc(t)},Cr.version="19.2.6",Cr}var bv;function qw(){if(bv)return Rf.exports;bv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Rf.exports=Bw(),Rf.exports}var Hw=qw();function Qw(){var n;return typeof window<"u"&&((n=window.__HOGSEND_STUDIO__)!=null&&n.baseUrl)?window.__HOGSEND_STUDIO__.baseUrl.replace(/\/$/,""):typeof window<"u"?window.location.origin:""}const Y0={baseUrl:Qw()};class bt extends Error{constructor(i,r,u){super(r);ta(this,"status");ta(this,"body");this.name="ApiError",this.status=i,this.body=u}}function Gw(n,a){const r=`${Y0.baseUrl}${n.startsWith("/")?n:`/${n}`}`;if(!a)return r;const u=new URLSearchParams;for(const[h,y]of Object.entries(a))y!=null&&u.append(h,String(y));const f=u.toString();return f?`${r}?${f}`:r}async function nl(n,a={}){const{json:i,query:r,headers:u,...f}=a,h={credentials:"include",...f,headers:{Accept:"application/json",...i!==void 0?{"Content-Type":"application/json"}:{},...u}};i!==void 0&&(h.body=JSON.stringify(i));const y=await fetch(Gw(n,r),h),m=(y.headers.get("content-type")??"").includes("application/json"),x=m?await y.json().catch(()=>null):await y.text().catch(()=>null);if(!y.ok){const v=(m&&x&&typeof x=="object"&&"message"in x&&typeof x.message=="string"?x.message:null)??`Request failed with status ${y.status}`;throw new bt(y.status,v,x)}return x}const Ae={request:nl,get:(n,a)=>nl(n,{...a,method:"GET"}),post:(n,a)=>nl(n,{...a,method:"POST"}),put:(n,a)=>nl(n,{...a,method:"PUT"}),patch:(n,a)=>nl(n,{...a,method:"PATCH"}),delete:(n,a)=>nl(n,{...a,method:"DELETE"})};function Pw(){return Ae.get("/v1/auth/status")}var Vw={};const Ac=Object.create(null),_r=n=>{var a;return Vw||((a=globalThis.Deno)==null?void 0:a.env.toObject())||globalThis.__env__||(n?Ac:globalThis)},Ka=new Proxy(Ac,{get(n,a){return _r()[a]??Ac[a]},has(n,a){return a in _r()||a in Ac},set(n,a,i){const r=_r(!0);return r[a]=i,!0},deleteProperty(n,a){if(!a)return!1;const i=_r(!0);return delete i[a],!0},ownKeys(){const n=_r(!0);return Object.keys(n)}});var kc=class extends Error{constructor(n,a){super(n,a),this.name="BetterAuthError",this.message=n,this.stack=""}};function Yw(n){try{return(new URL(n).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new kc(`Invalid base URL: ${n}. Please provide a valid base URL.`)}}function Kw(n){try{const a=new URL(n);if(a.protocol!=="http:"&&a.protocol!=="https:")throw new kc(`Invalid base URL: ${n}. URL must include 'http://' or 'https://'`)}catch(a){throw a instanceof kc?a:new kc(`Invalid base URL: ${n}. Please provide a valid base URL.`,{cause:a})}}function Tf(n,a="/api/auth"){if(Kw(n),Yw(n))return n;const i=n.replace(/\/+$/,"");return!a||a==="/"?i:(a=a.startsWith("/")?a:`/${a}`,`${i}${a}`)}function Xw(n,a,i,r,u){if(n)return Tf(n,a);{const f=Ka.BETTER_AUTH_URL||Ka.NEXT_PUBLIC_BETTER_AUTH_URL||Ka.PUBLIC_BETTER_AUTH_URL||Ka.NUXT_PUBLIC_BETTER_AUTH_URL||Ka.NUXT_PUBLIC_AUTH_URL||(Ka.BASE_URL!=="/"?Ka.BASE_URL:void 0);if(f)return Tf(f,a)}if(typeof window<"u"&&window.location)return Tf(window.location.origin,a)}const Zw={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},Fw=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Sv={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},Iw=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function Jw(n){return n instanceof Date&&!isNaN(n.getTime())}function $w(n){const a=Iw.exec(n);if(!a)return null;const[,i,r,u,f,h,y,p,m,x,v]=a,b=new Date(Date.UTC(parseInt(i,10),parseInt(r,10)-1,parseInt(u,10),parseInt(f,10),parseInt(h,10),parseInt(y,10),p?parseInt(p.padEnd(3,"0"),10):0));if(m){const w=(parseInt(x,10)*60+parseInt(v,10))*(m==="+"?-1:1);b.setUTCMinutes(b.getUTCMinutes()+w)}return Jw(b)?b:null}function Ww(n,a={}){const{strict:i=!1,warnings:r=!1,reviver:u,parseDates:f=!0}=a;if(typeof n!="string")return n;const h=n.trim();if(h.length>0&&h[0]==='"'&&h.endsWith('"')&&!h.slice(1,-1).includes('"'))return h.slice(1,-1);const y=h.toLowerCase();if(y.length<=9&&y in Sv)return Sv[y];if(!Fw.test(h)){if(i)throw new SyntaxError("[better-json] Invalid JSON");return n}if(Object.entries(Zw).some(([p,m])=>{const x=m.test(h);return x&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${p} pattern`),x})&&i)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(h,(m,x)=>{if(m==="__proto__"||m==="constructor"&&x&&typeof x=="object"&&"prototype"in x){r&&console.warn(`[better-json] Dropping "${m}" key to prevent prototype pollution`);return}if(f&&typeof x=="string"){const v=$w(x);if(v)return v}return u?u(m,x):x})}catch(p){if(i)throw p;return n}}function e2(n,a={strict:!0}){return Ww(n,a)}const t2={id:"redirect",name:"Redirect",hooks:{onSuccess(n){var a,i;if((a=n.data)!=null&&a.url&&((i=n.data)!=null&&i.redirect)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=n.data.url}catch{}}}};let Un=[],na=0;const bc=4,n2=globalThis.nanostoresGlobal||(globalThis.nanostoresGlobal={epoch:0}),K0=n=>{let a=[],i={get(){return i.lc||i.listen(()=>{})(),i.value},init:n,lc:0,listen(r){return i.lc=a.push(r),()=>{for(let f=na+bc;f<Un.length;)Un[f]===r?Un.splice(f,bc):f+=bc;let u=a.indexOf(r);~u&&(a.splice(u,1),--i.lc||i.off())}},notify(r,u){n2.epoch++;let f=!Un.length;for(let h of a)Un.push(h,i.value,r,u);if(f){for(na=0;na<Un.length;na+=bc)Un[na](Un[na+1],Un[na+2],Un[na+3]);Un.length=0}},off(){},set(r){let u=i.value;u!==r&&(i.value=r,i.notify(u))},subscribe(r){let u=i.listen(r);return r(i.value),u},value:n};return i},s2=5,Sc=6,jc=10;let a2=(n,a,i,r)=>(n.events=n.events||{},n.events[i+jc]||(n.events[i+jc]=r(u=>{n.events[i].reduceRight((f,h)=>(h(f),f),{shared:{},...u})})),n.events[i]=n.events[i]||[],n.events[i].push(a),()=>{let u=n.events[i],f=u.indexOf(a);u.splice(f,1),u.length||(delete n.events[i],n.events[i+jc](),delete n.events[i+jc])});const i2=1e3;let X0=(n,a)=>a2(n,r=>{let u=a(r);u&&n.events[Sc].push(u)},s2,r=>{let u=n.listen;n.listen=(...h)=>(!n.lc&&!n.active&&(n.active=!0,r()),u(...h));let f=n.off;return n.events[Sc]=[],n.off=()=>{f(),setTimeout(()=>{if(n.active&&!n.lc){n.active=!1;for(let h of n.events[Sc])h();n.events[Sc]=[]}},i2)},()=>{n.listen=u,n.off=f}});function l2(n,a,i){let r=new Set(a).add(void 0);return n.listen((u,f,h)=>{r.has(h)&&i(u,f,h)})}const r2=()=>typeof window>"u",o2=(n,a,i,r)=>{const u=K0({data:null,error:null,isPending:!0,isRefetching:!1,refetch:y=>f(y)}),f=async y=>new Promise(p=>{const m=typeof r=="function"?r({data:u.get().data,error:u.get().error,isPending:u.get().isPending}):r;i(a,{...m,query:{...m==null?void 0:m.query,...y==null?void 0:y.query},async onSuccess(x){var v;u.set({data:x.data,error:null,isPending:!1,isRefetching:!1,refetch:u.value.refetch}),await((v=m==null?void 0:m.onSuccess)==null?void 0:v.call(m,x))},async onError(x){var R,j;const{request:v}=x,b=typeof v.retry=="number"?v.retry:(R=v.retry)==null?void 0:R.attempts,w=v.retryAttempt||0;if(b&&w<b)return;const N=x.error.status===401;u.set({error:x.error,data:N?null:u.get().data,isPending:!1,isRefetching:!1,refetch:u.value.refetch}),await((j=m==null?void 0:m.onError)==null?void 0:j.call(m,x))},async onRequest(x){var b;const v=u.get();u.set({isPending:v.data===null,data:v.data,error:null,isRefetching:!0,refetch:u.value.refetch}),await((b=m==null?void 0:m.onRequest)==null?void 0:b.call(m,x))}}).catch(x=>{u.set({error:x,data:u.get().data,isPending:!1,isRefetching:!1,refetch:u.value.refetch})}).finally(()=>{p(void 0)})});n=Array.isArray(n)?n:[n];let h=!1;for(const y of n)y.subscribe(async()=>{r2()||(h?await f():X0(u,()=>{const p=setTimeout(async()=>{h||(h=!0,await f())},0);return()=>{u.off(),y.off(),clearTimeout(p)}}))});return u},Ef=Symbol.for("better-auth:broadcast-channel"),c2=()=>Math.floor(Date.now()/1e3);var u2=class{constructor(n="better-auth.message"){ta(this,"listeners",new Set);ta(this,"name");this.name=n}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}post(n){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...n,timestamp:c2()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const n=a=>{if(a.key!==this.name)return;const i=JSON.parse(a.newValue??"{}");(i==null?void 0:i.event)!=="session"||!(i!=null&&i.data)||this.listeners.forEach(r=>r(i))};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}};function Mf(n="better-auth.message"){return globalThis[Ef]||(globalThis[Ef]=new u2(n)),globalThis[Ef]}const Af=Symbol.for("better-auth:focus-manager");var d2=class{constructor(){ta(this,"listeners",new Set)}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}setFocused(n){this.listeners.forEach(a=>a(n))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const n=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",n,!1),()=>{document.removeEventListener("visibilitychange",n,!1)}}};function jv(){return globalThis[Af]||(globalThis[Af]=new d2),globalThis[Af]}const kf=Symbol.for("better-auth:online-manager");var f2=class{constructor(){ta(this,"listeners",new Set);ta(this,"isOnline",typeof navigator<"u"?navigator.onLine:!0)}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}setOnline(n){this.isOnline=n,this.listeners.forEach(a=>a(n))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const n=()=>this.setOnline(!0),a=()=>this.setOnline(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n,!1),window.removeEventListener("offline",a,!1)}}};function Of(){return globalThis[kf]||(globalThis[kf]=new f2),globalThis[kf]}const sl=()=>Math.floor(Date.now()/1e3);function wv(n){return typeof n=="object"&&n!==null&&"data"in n&&"error"in n?n:{data:n,error:null}}const h2=5;function m2(n){var A,B,T;const{sessionAtom:a,sessionSignal:i,$fetch:r,options:u={}}=n,f=((A=u.sessionOptions)==null?void 0:A.refetchInterval)??0,h=((B=u.sessionOptions)==null?void 0:B.refetchOnWindowFocus)??!0,y=((T=u.sessionOptions)==null?void 0:T.refetchWhenOffline)??!1,p={lastSync:0,lastSessionRequest:0,cachedSession:void 0},m=()=>y||Of().isOnline,x=q=>{if(!m())return;if((q==null?void 0:q.event)==="storage"){p.lastSync=sl(),i.set(!i.get());return}const D=a.get(),z=()=>{p.lastSessionRequest=sl(),r("/get-session").then(async k=>{let{data:Y,error:W}=wv(k);if(Y!=null&&Y.needsRefresh)try{const F=await r("/get-session",{method:"POST"});({data:Y,error:W}=wv(F))}catch{}const ee=Y!=null&&Y.session&&(Y!=null&&Y.user)?Y:null;a.set({...D,data:ee,error:W}),p.lastSync=sl(),i.set(!i.get())}).catch(()=>{})};if((q==null?void 0:q.event)==="poll"){z();return}if((q==null?void 0:q.event)==="visibilitychange"){if(sl()-p.lastSessionRequest<h2)return;p.lastSessionRequest=sl()}if((q==null?void 0:q.event)==="visibilitychange"){z();return}((D==null?void 0:D.data)===null||(D==null?void 0:D.data)===void 0)&&(p.lastSync=sl(),i.set(!i.get()))},v=q=>{Mf().post({event:"session",data:{trigger:q},clientId:Math.random().toString(36).substring(7)})},b=()=>{f&&f>0&&(p.pollInterval=setInterval(()=>{var q;(q=a.get())!=null&&q.data&&x({event:"poll"})},f*1e3))},w=()=>{p.unsubscribeBroadcast=Mf().subscribe(()=>{x({event:"storage"})})},N=()=>{h&&(p.unsubscribeFocus=jv().subscribe(()=>{x({event:"visibilitychange"})}))},R=()=>{p.unsubscribeOnline=Of().subscribe(q=>{q&&x({event:"visibilitychange"})})};return{init:()=>{b(),w(),N(),R(),Mf().setup(),jv().setup(),Of().setup()},cleanup:()=>{p.pollInterval&&(clearInterval(p.pollInterval),p.pollInterval=void 0),p.unsubscribeBroadcast&&(p.unsubscribeBroadcast(),p.unsubscribeBroadcast=void 0),p.unsubscribeFocus&&(p.unsubscribeFocus(),p.unsubscribeFocus=void 0),p.unsubscribeOnline&&(p.unsubscribeOnline(),p.unsubscribeOnline=void 0),p.lastSync=0,p.lastSessionRequest=0,p.cachedSession=void 0},triggerRefetch:x,broadcastSessionUpdate:v}}function p2(n,a){const i=K0(!1),r=o2(i,"/get-session",n,{method:"GET"});let u=()=>{};return X0(r,()=>{const f=m2({sessionAtom:r,sessionSignal:i,$fetch:n,options:a});return f.init(),u=f.broadcastSessionUpdate,()=>{f.cleanup()}}),{session:r,$sessionSignal:i,broadcastSessionUpdate:f=>u(f)}}function zf(n){if(n===null||typeof n!="object")return!1;const a=Object.getPrototypeOf(n);return a!==null&&a!==Object.prototype&&Object.getPrototypeOf(a)!==null||Symbol.iterator in n?!1:Symbol.toStringTag in n?Object.prototype.toString.call(n)==="[object Module]":!0}function ah(n,a,i=".",r){if(!zf(a))return ah(n,{},i,r);const u={...a};for(const f of Object.keys(n)){if(f==="__proto__"||f==="constructor")continue;const h=n[f];h!=null&&(r&&r(u,f,h,i)||(Array.isArray(h)&&Array.isArray(u[f])?u[f]=[...h,...u[f]]:zf(h)&&zf(u[f])?u[f]=ah(h,u[f],(i?`${i}.`:"")+f.toString(),r):u[f]=h))}return u}function y2(n){return(...a)=>a.reduce((i,r)=>ah(i,r,"",n),{})}const g2=y2();var v2=Object.defineProperty,x2=Object.defineProperties,b2=Object.getOwnPropertyDescriptors,Nv=Object.getOwnPropertySymbols,S2=Object.prototype.hasOwnProperty,j2=Object.prototype.propertyIsEnumerable,Rv=(n,a,i)=>a in n?v2(n,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[a]=i,Bn=(n,a)=>{for(var i in a||(a={}))S2.call(a,i)&&Rv(n,i,a[i]);if(Nv)for(var i of Nv(a))j2.call(a,i)&&Rv(n,i,a[i]);return n},Zn=(n,a)=>x2(n,b2(a)),w2=class extends Error{constructor(n,a,i){super(a||n.toString(),{cause:i}),this.status=n,this.statusText=a,this.error=i,Error.captureStackTrace(this,this.constructor)}},N2=async(n,a)=>{var i,r,u,f,h,y;let p=a||{};const m={onRequest:[a==null?void 0:a.onRequest],onResponse:[a==null?void 0:a.onResponse],onSuccess:[a==null?void 0:a.onSuccess],onError:[a==null?void 0:a.onError],onRetry:[a==null?void 0:a.onRetry]};if(!a||!(a!=null&&a.plugins))return{url:n,options:p,hooks:m};for(const x of(a==null?void 0:a.plugins)||[]){if(x.init){const v=await((i=x.init)==null?void 0:i.call(x,n.toString(),a));p=v.options||p,n=v.url}m.onRequest.push((r=x.hooks)==null?void 0:r.onRequest),m.onResponse.push((u=x.hooks)==null?void 0:u.onResponse),m.onSuccess.push((f=x.hooks)==null?void 0:f.onSuccess),m.onError.push((h=x.hooks)==null?void 0:h.onError),m.onRetry.push((y=x.hooks)==null?void 0:y.onRetry)}return{url:n,options:p,hooks:m}},Cv=class{constructor(n){this.options=n}shouldAttemptRetry(n,a){return this.options.shouldRetry?Promise.resolve(n<this.options.attempts&&this.options.shouldRetry(a)):Promise.resolve(n<this.options.attempts)}getDelay(){return this.options.delay}},R2=class{constructor(n){this.options=n}shouldAttemptRetry(n,a){return this.options.shouldRetry?Promise.resolve(n<this.options.attempts&&this.options.shouldRetry(a)):Promise.resolve(n<this.options.attempts)}getDelay(n){return Math.min(this.options.maxDelay,this.options.baseDelay*2**n)}};function C2(n){if(typeof n=="number")return new Cv({type:"linear",attempts:n,delay:1e3});switch(n.type){case"linear":return new Cv(n);case"exponential":return new R2(n);default:throw new Error("Invalid retry strategy")}}var _2=async n=>{const a={},i=async r=>typeof r=="function"?await r():r;if(n!=null&&n.auth){if(n.auth.type==="Bearer"){const r=await i(n.auth.token);if(!r)return a;a.authorization=`Bearer ${r}`}else if(n.auth.type==="Basic"){const[r,u]=await Promise.all([i(n.auth.username),i(n.auth.password)]);if(!r||!u)return a;a.authorization=`Basic ${btoa(`${r}:${u}`)}`}else if(n.auth.type==="Custom"){const[r,u]=await Promise.all([i(n.auth.prefix),i(n.auth.value)]);if(!u)return a;a.authorization=`${r??""} ${u}`}}return a},T2=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function E2(n){const a=n.headers.get("content-type"),i=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!a)return"json";const r=a.split(";").shift()||"";return T2.test(r)?"json":i.has(r)||r.startsWith("text/")?"text":"blob"}function M2(n){try{return JSON.parse(n),!0}catch{return!1}}function ih(n){if(n===void 0)return!1;const a=typeof n;return a==="string"||a==="number"||a==="boolean"||a===null?!0:a!=="object"?!1:Array.isArray(n)?!0:n.buffer?!1:n.constructor&&n.constructor.name==="Object"||typeof n.toJSON=="function"}function _v(n){try{return JSON.parse(n)}catch{return n}}function Tv(n){return typeof n=="function"}function A2(n){if(n!=null&&n.customFetchImpl)return n.customFetchImpl;if(typeof globalThis<"u"&&Tv(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Tv(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function k2(n){const a=new Headers(n==null?void 0:n.headers),i=await _2(n);for(const[r,u]of Object.entries(i||{}))a.set(r,u);if(!a.has("content-type")){const r=O2(n==null?void 0:n.body);r&&a.set("content-type",r)}return a}function O2(n){return ih(n)?"application/json":null}function z2(n){if(!(n!=null&&n.body))return null;const a=new Headers(n==null?void 0:n.headers);if(ih(n.body)&&!a.has("content-type")){for(const[i,r]of Object.entries(n==null?void 0:n.body))r instanceof Date&&(n.body[i]=r.toISOString());return JSON.stringify(n.body)}return a.has("content-type")&&a.get("content-type")==="application/x-www-form-urlencoded"&&ih(n.body)?new URLSearchParams(n.body).toString():n.body}function D2(n,a){var i;if(a!=null&&a.method)return a.method.toUpperCase();if(n.startsWith("@")){const r=(i=n.split("@")[1])==null?void 0:i.split("/")[0];return F0.includes(r)?r.toUpperCase():a!=null&&a.body?"POST":"GET"}return a!=null&&a.body?"POST":"GET"}function U2(n,a){let i;return!(n!=null&&n.signal)&&(n!=null&&n.timeout)&&(i=setTimeout(()=>a==null?void 0:a.abort(),n==null?void 0:n.timeout)),{abortTimeout:i,clearTimeout:()=>{i&&clearTimeout(i)}}}var L2=class Z0 extends Error{constructor(a,i){super(i||JSON.stringify(a,null,2)),this.issues=a,Object.setPrototypeOf(this,Z0.prototype)}};async function Oc(n,a){const i=await n["~standard"].validate(a);if(i.issues)throw new L2(i.issues);return i.value}var F0=["get","post","put","patch","delete"],B2=n=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(a,i){var r,u,f,h;const y=((u=(r=n.plugins)==null?void 0:r.find(p=>{var m;return(m=p.schema)!=null&&m.config?a.startsWith(p.schema.config.baseURL||"")||a.startsWith(p.schema.config.prefix||""):!1}))==null?void 0:u.schema)||n.schema;if(y){let p=a;(f=y.config)!=null&&f.prefix&&p.startsWith(y.config.prefix)&&(p=p.replace(y.config.prefix,""),y.config.baseURL&&(a=a.replace(y.config.prefix,y.config.baseURL))),(h=y.config)!=null&&h.baseURL&&p.startsWith(y.config.baseURL)&&(p=p.replace(y.config.baseURL,""));const m=y.schema[p];if(m){let x=Zn(Bn({},i),{method:m.method,output:m.output});return i!=null&&i.disableValidation||(x=Zn(Bn({},x),{body:m.input?await Oc(m.input,i==null?void 0:i.body):i==null?void 0:i.body,params:m.params?await Oc(m.params,i==null?void 0:i.params):i==null?void 0:i.params,query:m.query?await Oc(m.query,i==null?void 0:i.query):i==null?void 0:i.query})),{url:a,options:x}}}return{url:a,options:i}}}),q2=n=>{async function a(i,r){const u=Zn(Bn(Bn({},n),r),{plugins:[...(n==null?void 0:n.plugins)||[],B2(n||{}),...(r==null?void 0:r.plugins)||[]]});if(n!=null&&n.catchAllError)try{return await lh(i,u)}catch(f){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:f}}}return await lh(i,u)}return a};function H2(n,a){const{baseURL:i,params:r,query:u}=a||{query:{},params:{},baseURL:""};let f=n.startsWith("http")?n.split("/").slice(0,3).join("/"):i||"";if(n.startsWith("@")){const v=n.toString().split("@")[1].split("/")[0];F0.includes(v)&&(n=n.replace(`@${v}/`,"/"))}f.endsWith("/")||(f+="/");let[h,y]=n.replace(f,"").split("?");const p=new URLSearchParams(y);for(const[v,b]of Object.entries(u||{})){if(b==null)continue;let w;if(typeof b=="string")w=b;else if(Array.isArray(b)){for(const N of b)p.append(v,N);continue}else w=JSON.stringify(b);p.set(v,w)}if(r)if(Array.isArray(r)){const v=h.split("/").filter(b=>b.startsWith(":"));for(const[b,w]of v.entries()){const N=r[b];h=h.replace(w,N)}}else for(const[v,b]of Object.entries(r))h=h.replace(`:${v}`,String(b));h=h.split("/").map(encodeURIComponent).join("/"),h.startsWith("/")&&(h=h.slice(1));let m=p.toString();return m=m.length>0?`?${m}`.replace(/\+/g,"%20"):"",f.startsWith("http")?new URL(`${h}${m}`,f):`${f}${h}${m}`}var lh=async(n,a)=>{var i,r,u,f,h,y,p,m;const{hooks:x,url:v,options:b}=await N2(n,a),w=A2(b),N=new AbortController,R=(i=b.signal)!=null?i:N.signal,j=H2(v,b),O=z2(b),A=await k2(b),B=D2(v,b);let T=Zn(Bn({},b),{url:j,headers:A,body:O,method:B,signal:R});for(const X of x.onRequest)if(X){const te=await X(T);typeof te=="object"&&te!==null&&(T=te)}("pipeTo"in T&&typeof T.pipeTo=="function"||typeof((r=a==null?void 0:a.body)==null?void 0:r.pipe)=="function")&&("duplex"in T||(T.duplex="half"));const{clearTimeout:q}=U2(b,N);let D=await w(T.url,T);q();const z={response:D,request:T};for(const X of x.onResponse)if(X){const te=await X(Zn(Bn({},z),{response:(u=a==null?void 0:a.hookOptions)!=null&&u.cloneResponse?D.clone():D}));te instanceof Response?D=te:typeof te=="object"&&te!==null&&(D=te.response)}if(D.ok){if(!(T.method!=="HEAD"))return{data:"",error:null};const te=E2(D),fe={data:null,response:D,request:T};if(te==="json"||te==="text"){const L=await D.text(),K=(f=T.jsonParser)!=null?f:_v;fe.data=await K(L)}else fe.data=await D[te]();T!=null&&T.output&&T.output&&!T.disableValidation&&(fe.data=await Oc(T.output,fe.data));for(const L of x.onSuccess)L&&await L(Zn(Bn({},fe),{response:(h=a==null?void 0:a.hookOptions)!=null&&h.cloneResponse?D.clone():D}));return a!=null&&a.throw?fe.data:{data:fe.data,error:null}}const k=(y=a==null?void 0:a.jsonParser)!=null?y:_v,Y=await D.text(),W=M2(Y),ee=W?await k(Y):null,F={response:D,responseText:Y,request:T,error:Zn(Bn({},ee),{status:D.status,statusText:D.statusText})};for(const X of x.onError)X&&await X(Zn(Bn({},F),{response:(p=a==null?void 0:a.hookOptions)!=null&&p.cloneResponse?D.clone():D}));if(a!=null&&a.retry){const X=C2(a.retry),te=(m=a.retryAttempt)!=null?m:0;if(await X.shouldAttemptRetry(te,D)){for(const L of x.onRetry)L&&await L(z);const fe=X.getDelay(te);return await new Promise(L=>setTimeout(L,fe)),await lh(n,Zn(Bn({},a),{retryAttempt:te+1}))}}if(a!=null&&a.throw)throw new w2(D.status,D.statusText,W?ee:Y);return{data:null,error:Zn(Bn({},ee),{status:D.status,statusText:D.statusText})}},Xa={};const Q2=n=>{if(typeof process>"u")return;const a=n??"/api/auth";if(Xa.NEXT_PUBLIC_AUTH_URL)return Xa.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(Xa.NEXTAUTH_URL)try{return Xa.NEXTAUTH_URL}catch{}if(Xa.VERCEL_URL)try{const i=Xa.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${i}${Xa.VERCEL_URL}`).origin}${a}`}catch{}}},G2=(n,a)=>{var q,D,z,k,Y,W,ee;const i="credentials"in Request.prototype,r=Xw(n==null?void 0:n.baseURL,n==null?void 0:n.basePath)??Q2(n==null?void 0:n.basePath)??"/api/auth",u=((q=n==null?void 0:n.plugins)==null?void 0:q.flatMap(F=>F.fetchPlugins).filter(F=>F!==void 0))||[],f={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:(D=n==null?void 0:n.fetchOptions)==null?void 0:D.onSuccess,onError:(z=n==null?void 0:n.fetchOptions)==null?void 0:z.onError,onRequest:(k=n==null?void 0:n.fetchOptions)==null?void 0:k.onRequest,onResponse:(Y=n==null?void 0:n.fetchOptions)==null?void 0:Y.onResponse}},{onSuccess:h,onError:y,onRequest:p,onResponse:m,...x}=(n==null?void 0:n.fetchOptions)||{},v=q2({baseURL:r,...i?{credentials:"include"}:{},method:"GET",jsonParser(F){return F?e2(F,{strict:!1}):null},customFetchImpl:fetch,...x,plugins:[f,...x.plugins||[],...n!=null&&n.disableDefaultFetchPlugins?[]:[t2],...u]}),{$sessionSignal:b,session:w,broadcastSessionUpdate:N}=p2(v,n),R=(n==null?void 0:n.plugins)||[];let j={};const O={$sessionSignal:b,session:w},A={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},B=[{signal:"$sessionSignal",matcher(F){return F==="/sign-out"||F==="/update-user"||F==="/update-session"||F==="/sign-up/email"||F==="/sign-in/email"||F==="/delete-user"||F==="/verify-email"||F==="/revoke-sessions"||F==="/revoke-session"||F==="/revoke-other-sessions"||F==="/change-email"||F==="/change-password"},callback(F){F==="/sign-out"?N("signout"):(F==="/update-user"||F==="/update-session")&&N("updateUser")}}];for(const F of R)F.getAtoms&&Object.assign(O,(W=F.getAtoms)==null?void 0:W.call(F,v)),F.pathMethods&&Object.assign(A,F.pathMethods),F.atomListeners&&B.push(...F.atomListeners);const T={notify:F=>{O[F].set(!O[F].get())},listen:(F,X)=>{O[F].subscribe(X)},atoms:O};for(const F of R)F.getActions&&(j=g2(((ee=F.getActions)==null?void 0:ee.call(F,v,T,n))??{},j));return{get baseURL(){return r},pluginsActions:j,pluginsAtoms:O,pluginPathMethods:A,atomListeners:B,$fetch:v,$store:T}};function P2(n){return typeof n=="object"&&n!==null&&"get"in n&&typeof n.get=="function"&&"lc"in n&&typeof n.lc=="number"}function V2(n,a,i){const r=a[n],{fetchOptions:u,query:f,...h}=i||{};return r||(u!=null&&u.method?u.method:h&&Object.keys(h).length>0?"POST":"GET")}function Y2(n,a,i,r,u){function f(h=[]){return new Proxy(function(){},{get(y,p){if(typeof p!="string"||p==="then"||p==="catch"||p==="finally")return;const m=[...h,p];let x=n;for(const v of m)if(x&&typeof x=="object"&&v in x)x=x[v];else{x=void 0;break}return typeof x=="function"||P2(x)?x:f(m)},apply:async(y,p,m)=>{const x="/"+h.map(A=>A.replace(/[A-Z]/g,B=>`-${B.toLowerCase()}`)).join("/"),v=m[0]||{},b=m[1]||{},{query:w,fetchOptions:N,...R}=v,j={...b,...N},O=V2(x,i,v);return await a(x,{...j,body:O==="GET"?void 0:{...R,...(j==null?void 0:j.body)||{}},query:w||(j==null?void 0:j.query),method:O,async onSuccess(A){var q,D;if(await((q=j==null?void 0:j.onSuccess)==null?void 0:q.call(j,A)),!u||j.disableSignal)return;const B=u.filter(z=>z.matcher(x));if(!B.length)return;const T=new Set;for(const z of B){const k=r[z.signal];if(!k)return;if(T.has(z.signal))continue;T.add(z.signal);const Y=k.get();setTimeout(()=>{k.set(!Y)},10),(D=z.callback)==null||D.call(z,x)}}})}})}return f()}function K2(n,a={}){const i=Q.useRef(n.get()),{keys:r,deps:u=[n,r]}=a,f=Q.useCallback(y=>{const p=m=>{i.current!==m&&(i.current=m,y())};return p(n.value),r!=null&&r.length?l2(n,r,p):n.listen(p)},u),h=()=>i.current;return Q.useSyncExternalStore(f,h,h)}function X2(n){return n.charAt(0).toUpperCase()+n.slice(1)}function Z2(n){return`use${X2(n)}`}function F2(n){const{pluginPathMethods:a,pluginsActions:i,pluginsAtoms:r,$fetch:u,$store:f,atomListeners:h}=G2(n),y={};for(const[p,m]of Object.entries(r))y[Z2(p)]=()=>K2(m);return Y2({...i,...y,$fetch:u,$store:f},u,a,r,h)}const I2=F2({baseURL:`${Y0.baseUrl}/api/auth`,fetchOptions:{credentials:"include"}}),{signIn:J2,signOut:$2,useSession:I0,requestPasswordReset:W2,resetPassword:eN}=I2;function J0(n){var a,i,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(a=0;a<u;a++)n[a]&&(i=J0(n[a]))&&(r&&(r+=" "),r+=i)}else for(i in n)n[i]&&(r&&(r+=" "),r+=i);return r}function $0(){for(var n,a,i=0,r="",u=arguments.length;i<u;i++)(n=arguments[i])&&(a=J0(n))&&(r&&(r+=" "),r+=a);return r}const tN=(n,a)=>{const i=new Array(n.length+a.length);for(let r=0;r<n.length;r++)i[r]=n[r];for(let r=0;r<a.length;r++)i[n.length+r]=a[r];return i},nN=(n,a)=>({classGroupId:n,validator:a}),W0=(n=new Map,a=null,i)=>({nextPart:n,validators:a,classGroupId:i}),Pc="-",Ev=[],sN="arbitrary..",aN=n=>{const a=lN(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return iN(h);const y=h.split(Pc),p=y[0]===""&&y.length>1?1:0;return ex(y,p,a)},getConflictingClassGroupIds:(h,y)=>{if(y){const p=r[h],m=i[h];return p?m?tN(m,p):p:m||Ev}return i[h]||Ev}}},ex=(n,a,i)=>{if(n.length-a===0)return i.classGroupId;const u=n[a],f=i.nextPart.get(u);if(f){const m=ex(n,a+1,f);if(m)return m}const h=i.validators;if(h===null)return;const y=a===0?n.join(Pc):n.slice(a).join(Pc),p=h.length;for(let m=0;m<p;m++){const x=h[m];if(x.validator(y))return x.classGroupId}},iN=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=n.slice(1,-1),i=a.indexOf(":"),r=a.slice(0,i);return r?sN+r:void 0})(),lN=n=>{const{theme:a,classGroups:i}=n;return rN(i,a)},rN=(n,a)=>{const i=W0();for(const r in n){const u=n[r];jh(u,i,r,a)}return i},jh=(n,a,i,r)=>{const u=n.length;for(let f=0;f<u;f++){const h=n[f];oN(h,a,i,r)}},oN=(n,a,i,r)=>{if(typeof n=="string"){cN(n,a,i);return}if(typeof n=="function"){uN(n,a,i,r);return}dN(n,a,i,r)},cN=(n,a,i)=>{const r=n===""?a:tx(a,n);r.classGroupId=i},uN=(n,a,i,r)=>{if(fN(n)){jh(n(r),a,i,r);return}a.validators===null&&(a.validators=[]),a.validators.push(nN(i,n))},dN=(n,a,i,r)=>{const u=Object.entries(n),f=u.length;for(let h=0;h<f;h++){const[y,p]=u[h];jh(p,tx(a,y),i,r)}},tx=(n,a)=>{let i=n;const r=a.split(Pc),u=r.length;for(let f=0;f<u;f++){const h=r[f];let y=i.nextPart.get(h);y||(y=W0(),i.nextPart.set(h,y)),i=y}return i},fN=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,hN=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,i=Object.create(null),r=Object.create(null);const u=(f,h)=>{i[f]=h,a++,a>n&&(a=0,r=i,i=Object.create(null))};return{get(f){let h=i[f];if(h!==void 0)return h;if((h=r[f])!==void 0)return u(f,h),h},set(f,h){f in i?i[f]=h:u(f,h)}}},rh="!",Mv=":",mN=[],Av=(n,a,i,r,u)=>({modifiers:n,hasImportantModifier:a,baseClassName:i,maybePostfixModifierPosition:r,isExternal:u}),pN=n=>{const{prefix:a,experimentalParseClassName:i}=n;let r=u=>{const f=[];let h=0,y=0,p=0,m;const x=u.length;for(let R=0;R<x;R++){const j=u[R];if(h===0&&y===0){if(j===Mv){f.push(u.slice(p,R)),p=R+1;continue}if(j==="/"){m=R;continue}}j==="["?h++:j==="]"?h--:j==="("?y++:j===")"&&y--}const v=f.length===0?u:u.slice(p);let b=v,w=!1;v.endsWith(rh)?(b=v.slice(0,-1),w=!0):v.startsWith(rh)&&(b=v.slice(1),w=!0);const N=m&&m>p?m-p:void 0;return Av(f,w,b,N)};if(a){const u=a+Mv,f=r;r=h=>h.startsWith(u)?f(h.slice(u.length)):Av(mN,!1,h,void 0,!0)}if(i){const u=r;r=f=>i({className:f,parseClassName:u})}return r},yN=n=>{const a=new Map;return n.orderSensitiveModifiers.forEach((i,r)=>{a.set(i,1e6+r)}),i=>{const r=[];let u=[];for(let f=0;f<i.length;f++){const h=i[f],y=h[0]==="[",p=a.has(h);y||p?(u.length>0&&(u.sort(),r.push(...u),u=[]),r.push(h)):u.push(h)}return u.length>0&&(u.sort(),r.push(...u)),r}},gN=n=>({cache:hN(n.cacheSize),parseClassName:pN(n),sortModifiers:yN(n),postfixLookupClassGroupIds:vN(n),...aN(n)}),vN=n=>{const a=Object.create(null),i=n.postfixLookupClassGroups;if(i)for(let r=0;r<i.length;r++)a[i[r]]=!0;return a},xN=/\s+/,bN=(n,a)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:u,sortModifiers:f,postfixLookupClassGroupIds:h}=a,y=[],p=n.trim().split(xN);let m="";for(let x=p.length-1;x>=0;x-=1){const v=p[x],{isExternal:b,modifiers:w,hasImportantModifier:N,baseClassName:R,maybePostfixModifierPosition:j}=i(v);if(b){m=v+(m.length>0?" "+m:m);continue}let O=!!j,A;if(O){const z=R.substring(0,j);A=r(z);const k=A&&h[A]?r(R):void 0;k&&k!==A&&(A=k,O=!1)}else A=r(R);if(!A){if(!O){m=v+(m.length>0?" "+m:m);continue}if(A=r(R),!A){m=v+(m.length>0?" "+m:m);continue}O=!1}const B=w.length===0?"":w.length===1?w[0]:f(w).join(":"),T=N?B+rh:B,q=T+A;if(y.indexOf(q)>-1)continue;y.push(q);const D=u(A,O);for(let z=0;z<D.length;++z){const k=D[z];y.push(T+k)}m=v+(m.length>0?" "+m:m)}return m},SN=(...n)=>{let a=0,i,r,u="";for(;a<n.length;)(i=n[a++])&&(r=nx(i))&&(u&&(u+=" "),u+=r);return u},nx=n=>{if(typeof n=="string")return n;let a,i="";for(let r=0;r<n.length;r++)n[r]&&(a=nx(n[r]))&&(i&&(i+=" "),i+=a);return i},jN=(n,...a)=>{let i,r,u,f;const h=p=>{const m=a.reduce((x,v)=>v(x),n());return i=gN(m),r=i.cache.get,u=i.cache.set,f=y,y(p)},y=p=>{const m=r(p);if(m)return m;const x=bN(p,i);return u(p,x),x};return f=h,(...p)=>f(SN(...p))},wN=[],pt=n=>{const a=i=>i[n]||wN;return a.isThemeGetter=!0,a},sx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ax=/^\((?:(\w[\w-]*):)?(.+)\)$/i,NN=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,RN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_N=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,TN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,EN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sa=n=>NN.test(n),Ce=n=>!!n&&!Number.isNaN(Number(n)),Kn=n=>!!n&&Number.isInteger(Number(n)),Df=n=>n.endsWith("%")&&Ce(n.slice(0,-1)),vs=n=>RN.test(n),ix=()=>!0,MN=n=>CN.test(n)&&!_N.test(n),wh=()=>!1,AN=n=>TN.test(n),kN=n=>EN.test(n),ON=n=>!re(n)&&!oe(n),zN=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),DN=n=>wa(n,ox,wh),re=n=>sx.test(n),Za=n=>wa(n,cx,MN),kv=n=>wa(n,PN,Ce),UN=n=>wa(n,dx,ix),LN=n=>wa(n,ux,wh),Ov=n=>wa(n,lx,wh),BN=n=>wa(n,rx,kN),wc=n=>wa(n,fx,AN),oe=n=>ax.test(n),Tr=n=>mi(n,cx),qN=n=>mi(n,ux),zv=n=>mi(n,lx),HN=n=>mi(n,ox),QN=n=>mi(n,rx),Nc=n=>mi(n,fx,!0),GN=n=>mi(n,dx,!0),wa=(n,a,i)=>{const r=sx.exec(n);return r?r[1]?a(r[1]):i(r[2]):!1},mi=(n,a,i=!1)=>{const r=ax.exec(n);return r?r[1]?a(r[1]):i:!1},lx=n=>n==="position"||n==="percentage",rx=n=>n==="image"||n==="url",ox=n=>n==="length"||n==="size"||n==="bg-size",cx=n=>n==="length",PN=n=>n==="number",ux=n=>n==="family-name",dx=n=>n==="number"||n==="weight",fx=n=>n==="shadow",VN=()=>{const n=pt("color"),a=pt("font"),i=pt("text"),r=pt("font-weight"),u=pt("tracking"),f=pt("leading"),h=pt("breakpoint"),y=pt("container"),p=pt("spacing"),m=pt("radius"),x=pt("shadow"),v=pt("inset-shadow"),b=pt("text-shadow"),w=pt("drop-shadow"),N=pt("blur"),R=pt("perspective"),j=pt("aspect"),O=pt("ease"),A=pt("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...T(),oe,re],D=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],k=()=>[oe,re,p],Y=()=>[sa,"full","auto",...k()],W=()=>[Kn,"none","subgrid",oe,re],ee=()=>["auto",{span:["full",Kn,oe,re]},Kn,oe,re],F=()=>[Kn,"auto",oe,re],X=()=>["auto","min","max","fr",oe,re],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...k()],K=()=>[sa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],ue=()=>[sa,"screen","full","dvw","lvw","svw","min","max","fit",...k()],ze=()=>[sa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],ne=()=>[n,oe,re],E=()=>[...T(),zv,Ov,{position:[oe,re]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],se=()=>["auto","cover","contain",HN,DN,{size:[oe,re]}],ae=()=>[Df,Tr,Za],ie=()=>["","none","full",m,oe,re],me=()=>["",Ce,Tr,Za],_e=()=>["solid","dashed","dotted","double"],Ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[Ce,Df,zv,Ov],vn=()=>["","none",N,oe,re],Gt=()=>["none",Ce,oe,re],tn=()=>["none",Ce,oe,re],$n=()=>[Ce,oe,re],Ot=()=>[sa,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[vs],breakpoint:[vs],color:[ix],container:[vs],"drop-shadow":[vs],ease:["in","out","in-out"],font:[ON],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[vs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[vs],shadow:[vs],spacing:["px",Ce],text:[vs],"text-shadow":[vs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sa,re,oe,j]}],container:["container"],"container-type":[{"@container":["","normal","size",oe,re]}],"container-named":[zN],columns:[{columns:[Ce,re,oe,y]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:q()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Kn,"auto",oe,re]}],basis:[{basis:[sa,"full","auto",y,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,sa,"auto","initial","none",re]}],grow:[{grow:["",Ce,oe,re]}],shrink:[{shrink:["",Ce,oe,re]}],order:[{order:[Kn,"first","last","none",oe,re]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],"inline-size":[{inline:["auto",...ue()]}],"min-inline-size":[{"min-inline":["auto",...ue()]}],"max-inline-size":[{"max-inline":["none",...ue()]}],"block-size":[{block:["auto",...ze()]}],"min-block-size":[{"min-block":["auto",...ze()]}],"max-block-size":[{"max-block":["none",...ze()]}],w:[{w:[y,"screen",...K()]}],"min-w":[{"min-w":[y,"screen","none",...K()]}],"max-w":[{"max-w":[y,"screen","none","prose",{screen:[h]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",i,Tr,Za]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,GN,UN]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Df,re]}],"font-family":[{font:[qN,LN,a]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,oe,re]}],"line-clamp":[{"line-clamp":[Ce,"none",oe,kv]}],leading:[{leading:[f,...k()]}],"list-image":[{"list-image":["none",oe,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ne()}],"text-color":[{text:ne()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._e(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ce,"from-font","auto",oe,Za]}],"text-decoration-color":[{decoration:ne()}],"underline-offset":[{"underline-offset":[Ce,"auto",oe,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"tab-size":[{tab:[Kn,oe,re]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oe,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:E()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Kn,oe,re],radial:["",oe,re],conic:[Kn,oe,re]},QN,BN]}],"bg-color":[{bg:ne()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:ne()}],"gradient-via":[{via:ne()}],"gradient-to":[{to:ne()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._e(),"hidden","none"]}],"divide-style":[{divide:[..._e(),"hidden","none"]}],"border-color":[{border:ne()}],"border-color-x":[{"border-x":ne()}],"border-color-y":[{"border-y":ne()}],"border-color-s":[{"border-s":ne()}],"border-color-e":[{"border-e":ne()}],"border-color-bs":[{"border-bs":ne()}],"border-color-be":[{"border-be":ne()}],"border-color-t":[{"border-t":ne()}],"border-color-r":[{"border-r":ne()}],"border-color-b":[{"border-b":ne()}],"border-color-l":[{"border-l":ne()}],"divide-color":[{divide:ne()}],"outline-style":[{outline:[..._e(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ce,oe,re]}],"outline-w":[{outline:["",Ce,Tr,Za]}],"outline-color":[{outline:ne()}],shadow:[{shadow:["","none",x,Nc,wc]}],"shadow-color":[{shadow:ne()}],"inset-shadow":[{"inset-shadow":["none",v,Nc,wc]}],"inset-shadow-color":[{"inset-shadow":ne()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ne()}],"ring-offset-w":[{"ring-offset":[Ce,Za]}],"ring-offset-color":[{"ring-offset":ne()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":ne()}],"text-shadow":[{"text-shadow":["none",b,Nc,wc]}],"text-shadow-color":[{"text-shadow":ne()}],opacity:[{opacity:[Ce,oe,re]}],"mix-blend":[{"mix-blend":[...Ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":ne()}],"mask-image-linear-to-color":[{"mask-linear-to":ne()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":ne()}],"mask-image-t-to-color":[{"mask-t-to":ne()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":ne()}],"mask-image-r-to-color":[{"mask-r-to":ne()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":ne()}],"mask-image-b-to-color":[{"mask-b-to":ne()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":ne()}],"mask-image-l-to-color":[{"mask-l-to":ne()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":ne()}],"mask-image-x-to-color":[{"mask-x-to":ne()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":ne()}],"mask-image-y-to-color":[{"mask-y-to":ne()}],"mask-image-radial":[{"mask-radial":[oe,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":ne()}],"mask-image-radial-to-color":[{"mask-radial-to":ne()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[Ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":ne()}],"mask-image-conic-to-color":[{"mask-conic-to":ne()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:E()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,re]}],filter:[{filter:["","none",oe,re]}],blur:[{blur:vn()}],brightness:[{brightness:[Ce,oe,re]}],contrast:[{contrast:[Ce,oe,re]}],"drop-shadow":[{"drop-shadow":["","none",w,Nc,wc]}],"drop-shadow-color":[{"drop-shadow":ne()}],grayscale:[{grayscale:["",Ce,oe,re]}],"hue-rotate":[{"hue-rotate":[Ce,oe,re]}],invert:[{invert:["",Ce,oe,re]}],saturate:[{saturate:[Ce,oe,re]}],sepia:[{sepia:["",Ce,oe,re]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,re]}],"backdrop-blur":[{"backdrop-blur":vn()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,oe,re]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,oe,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,oe,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,oe,re]}],"backdrop-invert":[{"backdrop-invert":["",Ce,oe,re]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,oe,re]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,oe,re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,oe,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ce,"initial",oe,re]}],ease:[{ease:["linear","initial",O,oe,re]}],delay:[{delay:[Ce,oe,re]}],animate:[{animate:["none",A,oe,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,oe,re]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:Gt()}],"rotate-x":[{"rotate-x":Gt()}],"rotate-y":[{"rotate-y":Gt()}],"rotate-z":[{"rotate-z":Gt()}],scale:[{scale:tn()}],"scale-x":[{"scale-x":tn()}],"scale-y":[{"scale-y":tn()}],"scale-z":[{"scale-z":tn()}],"scale-3d":["scale-3d"],skew:[{skew:$n()}],"skew-x":[{"skew-x":$n()}],"skew-y":[{"skew-y":$n()}],transform:[{transform:[oe,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ot()}],"translate-x":[{"translate-x":Ot()}],"translate-y":[{"translate-y":Ot()}],"translate-z":[{"translate-z":Ot()}],"translate-none":["translate-none"],zoom:[{zoom:[Kn,oe,re]}],accent:[{accent:ne()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ne()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",oe,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":ne()}],"scrollbar-track-color":[{"scrollbar-track":ne()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe,re]}],fill:[{fill:["none",...ne()]}],"stroke-w":[{stroke:[Ce,Tr,Za,kv]}],stroke:[{stroke:["none",...ne()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},YN=jN(VN);function Fe(...n){return YN($0(n))}function hx({className:n}){return o.jsxs("span",{className:Fe("inline-flex items-center gap-2.5",n),children:[o.jsx("span",{"aria-hidden":"true",className:"flex size-7 shrink-0 items-center justify-center rounded-[6px] bg-accent text-white",children:o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",className:"size-4",xmlns:"http://www.w3.org/2000/svg",children:[o.jsx("path",{d:"M3.5 12 20 4.5 14 20l-3.2-6.4L3.5 12Z",fill:"currentColor"}),o.jsx("path",{d:"m10.8 13.2 6.4-7.4",stroke:"#F64838",strokeWidth:"1.4",strokeLinecap:"round"})]})}),o.jsx("span",{className:"font-display font-medium text-lg leading-none tracking-[-0.02em]",children:"Hogsend"})]})}const Dv=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Uv=$0,mx=(n,a)=>i=>{var r;if((a==null?void 0:a.variants)==null)return Uv(n,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:u,defaultVariants:f}=a,h=Object.keys(u).map(m=>{const x=i==null?void 0:i[m],v=f==null?void 0:f[m];if(x===null)return null;const b=Dv(x)||Dv(v);return u[m][b]}),y=i&&Object.entries(i).reduce((m,x)=>{let[v,b]=x;return b===void 0||(m[v]=b),m},{}),p=a==null||(r=a.compoundVariants)===null||r===void 0?void 0:r.reduce((m,x)=>{let{class:v,className:b,...w}=x;return Object.entries(w).every(N=>{let[R,j]=N;return Array.isArray(j)?j.includes({...f,...y}[R]):{...f,...y}[R]===j})?[...m,v,b]:m},[]);return Uv(n,h,p,i==null?void 0:i.class,i==null?void 0:i.className)},Nh=mx("group inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[10px] text-sm font-medium tracking-[-0.02em] transition-colors duration-200 outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-white text-[#0a0a0a] hover:bg-white/90",destructive:"bg-accent text-white hover:bg-accent-deep",outline:"border border-hairline-faint bg-transparent text-white/80 hover:border-white/15 hover:bg-white/5 hover:text-white",secondary:"bg-white/[0.06] text-white/80 hover:bg-white/10 hover:text-white",ghost:"text-white/70 hover:bg-white/5 hover:text-white",link:"text-white underline-offset-4 hover:text-white/80 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-[8px] px-3 text-xs",lg:"h-10 px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ve=Q.forwardRef(({className:n,variant:a,size:i,...r},u)=>o.jsx("button",{type:"button",className:Fe(Nh({variant:a,size:i,className:n})),ref:u,...r}));ve.displayName="Button";const qt=Q.forwardRef(({className:n,...a},i)=>o.jsx("div",{ref:i,className:Fe("rounded-md border border-hairline-faint bg-white/[0.015] text-white transition-colors duration-200 hover:border-white/15",n),...a}));qt.displayName="Card";const Ht=Q.forwardRef(({className:n,...a},i)=>o.jsx("div",{ref:i,className:Fe("flex flex-col space-y-1.5 p-6",n),...a}));Ht.displayName="CardHeader";const Wt=Q.forwardRef(({className:n,...a},i)=>o.jsx("div",{ref:i,className:Fe("font-display text-lg leading-none tracking-[-0.02em] text-white",n),...a}));Wt.displayName="CardTitle";const ja=Q.forwardRef(({className:n,...a},i)=>o.jsx("div",{ref:i,className:Fe("text-sm text-white/60",n),...a}));ja.displayName="CardDescription";const Qt=Q.forwardRef(({className:n,...a},i)=>o.jsx("div",{ref:i,className:Fe("p-6 pt-0",n),...a}));Qt.displayName="CardContent";const KN=Q.forwardRef(({className:n,...a},i)=>o.jsx("div",{ref:i,className:Fe("flex items-center p-6 pt-0",n),...a}));KN.displayName="CardFooter";const lt=Q.forwardRef(({className:n,type:a,...i},r)=>o.jsx("input",{type:a,className:Fe("flex h-9 w-full rounded-md border border-hairline-faint bg-white/[0.04] px-3 py-1 text-sm text-white transition-colors duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-white/40 hover:border-white/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-50",n),ref:r,...i}));lt.displayName="Input";function XN(){return typeof window>"u"?"/studio/":`${window.location.origin}/studio/`}function px({children:n}){return o.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-8 bg-ink p-6",children:[o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsx(hx,{}),o.jsx("span",{className:"eyebrow text-white/50",children:"Studio"})]}),n]})}function ZN({onSuccess:n,onForgot:a}){const[i,r]=Q.useState(""),[u,f]=Q.useState(""),[h,y]=Q.useState(null),[p,m]=Q.useState(!1);async function x(v){v.preventDefault(),y(null),m(!0);try{const b=await J2.email({email:i,password:u});if(b.error){y(b.error.message??"Authentication failed.");return}n()}catch(b){y(b instanceof Error?b.message:"Something went wrong.")}finally{m(!1)}}return o.jsxs(qt,{className:"glass-panel w-full max-w-sm",children:[o.jsxs(Ht,{children:[o.jsx(Wt,{children:"Sign in to Studio"}),o.jsx(ja,{children:"Enter your credentials to access Hogsend Studio."})]}),o.jsx(Qt,{children:o.jsxs("form",{className:"space-y-4",onSubmit:x,children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-sm font-medium text-white/80",htmlFor:"email",children:"Email"}),o.jsx(lt,{id:"email",type:"email",required:!0,value:i,onChange:v=>r(v.target.value),placeholder:"you@example.com",autoComplete:"email"})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("label",{className:"text-sm font-medium text-white/80",htmlFor:"password",children:"Password"}),o.jsx("button",{type:"button",onClick:a,className:"text-white/50 text-xs transition-colors duration-200 hover:text-white",children:"Forgot password?"})]}),o.jsx(lt,{id:"password",type:"password",required:!0,minLength:8,value:u,onChange:v=>f(v.target.value),placeholder:"••••••••",autoComplete:"current-password"})]}),h?o.jsx("p",{className:"text-sm text-accent",children:h}):null,o.jsx(ve,{type:"submit",className:"w-full",disabled:p,children:p?"Please wait…":"Sign in"})]})})]})}function FN({onReload:n}){return o.jsxs(qt,{className:"glass-panel w-full max-w-md",children:[o.jsxs(Ht,{children:[o.jsx(Wt,{children:"No admin exists yet"}),o.jsx(ja,{children:"Create the first admin from your server — there is no sign-up over the web."})]}),o.jsxs(Qt,{className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2 text-sm text-white/60",children:[o.jsx("p",{children:"Run the CLI where your app is deployed:"}),o.jsx("pre",{className:"rounded-md border border-hairline-faint bg-white/[0.04] p-3 font-mono text-white/90 text-xs",children:o.jsx("code",{children:"hogsend studio admin create"})}),o.jsxs("p",{children:["…or set ",o.jsx("code",{children:"STUDIO_ADMIN_EMAIL"})," (and optionally"," ",o.jsx("code",{children:"STUDIO_ADMIN_PASSWORD"}),") in your environment and restart the API. If you didn't set a password, one is printed once to the server log."]}),o.jsx("p",{children:"Then reload this page."})]}),o.jsx(ve,{type:"button",className:"w-full",onClick:n,children:"Reload"})]})]})}function Lv({onBack:n}){const[a,i]=Q.useState(""),[r,u]=Q.useState(!1),[f,h]=Q.useState(!1),[y,p]=Q.useState(null);async function m(x){x.preventDefault(),p(null),u(!0);try{await W2({email:a,redirectTo:XN()}),h(!0)}catch(v){p(v instanceof Error?v.message:"Something went wrong.")}finally{u(!1)}}return o.jsxs(qt,{className:"glass-panel w-full max-w-sm",children:[o.jsxs(Ht,{children:[o.jsx(Wt,{children:"Reset your password"}),o.jsx(ja,{children:"Enter your account email and we'll send you a reset link."})]}),o.jsx(Qt,{children:f?o.jsxs("div",{className:"space-y-4",children:[o.jsx("p",{className:"text-sm text-white/60",children:"If that email matches an account, a reset link is on its way. The link expires in 15 minutes and can be used once."}),o.jsx(ve,{type:"button",variant:"outline",className:"w-full",onClick:n,children:"Back to sign in"})]}):o.jsxs("form",{className:"space-y-4",onSubmit:m,children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-sm font-medium text-white/80",htmlFor:"forgot-email",children:"Email"}),o.jsx(lt,{id:"forgot-email",type:"email",required:!0,value:a,onChange:x=>i(x.target.value),placeholder:"you@example.com",autoComplete:"email"})]}),y?o.jsx("p",{className:"text-sm text-accent",children:y}):null,o.jsx(ve,{type:"submit",className:"w-full",disabled:r,children:r?"Sending…":"Send reset link"}),o.jsx("button",{type:"button",onClick:n,className:"w-full text-center text-white/50 text-xs transition-colors duration-200 hover:text-white",children:"Back to sign in"})]})})]})}function IN({token:n,onBack:a}){const[i,r]=Q.useState(""),[u,f]=Q.useState(""),[h,y]=Q.useState(!1),[p,m]=Q.useState(!1),[x,v]=Q.useState(null);async function b(w){if(w.preventDefault(),v(null),i!==u){v("Passwords don't match.");return}y(!0);try{const N=await eN({newPassword:i,token:n});if(N.error){v(N.error.message??"This reset link is invalid or has expired. Request a new one.");return}m(!0)}catch(N){v(N instanceof Error?N.message:"Something went wrong.")}finally{y(!1)}}return o.jsxs(qt,{className:"glass-panel w-full max-w-sm",children:[o.jsxs(Ht,{children:[o.jsx(Wt,{children:"Choose a new password"}),o.jsx(ja,{children:p?"Your password has been updated.":"Enter a new password for your account."})]}),o.jsx(Qt,{children:p?o.jsx(ve,{type:"button",className:"w-full",onClick:a,children:"Back to sign in"}):o.jsxs("form",{className:"space-y-4",onSubmit:b,children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-sm font-medium text-white/80",htmlFor:"new-password",children:"New password"}),o.jsx(lt,{id:"new-password",type:"password",required:!0,minLength:8,value:i,onChange:w=>r(w.target.value),placeholder:"••••••••",autoComplete:"new-password"})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-sm font-medium text-white/80",htmlFor:"confirm-password",children:"Confirm password"}),o.jsx(lt,{id:"confirm-password",type:"password",required:!0,minLength:8,value:u,onChange:w=>f(w.target.value),placeholder:"••••••••",autoComplete:"new-password"})]}),x?o.jsx("p",{className:"text-sm text-accent",children:x}):null,o.jsx(ve,{type:"submit",className:"w-full",disabled:h,children:h?"Updating…":"Update password"}),o.jsx("button",{type:"button",onClick:a,className:"w-full text-center text-white/50 text-xs transition-colors duration-200 hover:text-white",children:"Back to sign in"})]})})]})}function Bv({mode:n,onSuccess:a,onModeChange:i,resetToken:r}){const u=()=>i==null?void 0:i("login");let f;return n==="forgot"?f=o.jsx(Lv,{onBack:u}):n==="reset"?f=r?o.jsx(IN,{token:r,onBack:u}):o.jsx(Lv,{onBack:u}):f=o.jsx(ZN,{onSuccess:a,onForgot:()=>i==null?void 0:i("forgot")}),o.jsx(px,{children:f})}function Uf({children:n}){return o.jsx("div",{className:"flex h-full items-center justify-center bg-ink text-sm text-white/50",children:n})}function JN(){return typeof window>"u"?"":new URLSearchParams(window.location.search).get("token")??""}function $N(){if(typeof window>"u")return;const n=new URL(window.location.href);n.searchParams.has("token")&&(n.searchParams.delete("token"),window.history.replaceState({},"",n.toString()))}function WN({children:n}){const[a]=Q.useState(()=>{const v=JN();return v&&$N(),v}),[i,r]=Q.useState(()=>a?"reset":null),{data:u,isPending:f,isError:h,refetch:y}=We({queryKey:["auth-status"],queryFn:Pw,retry:1,staleTime:0}),{data:p,isPending:m,refetch:x}=I0();return i==="reset"||i==="forgot"?o.jsx(Bv,{mode:i,resetToken:a,onModeChange:r,onSuccess:()=>{x()}}):f?o.jsx(Uf,{children:"Loading…"}):h?o.jsx(Uf,{children:"Unable to reach the Hogsend API."}):u!=null&&u.needsSetup?o.jsx(px,{children:o.jsx(FN,{onReload:()=>{y(),x()}})}):m?o.jsx(Uf,{children:"Loading…"}):p!=null&&p.user?o.jsx(o.Fragment,{children:n}):o.jsx(Bv,{mode:"login",onModeChange:r,onSuccess:()=>{x()}})}/**
66
+ * @license lucide-react v0.474.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const eR=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yx=(...n)=>n.filter((a,i,r)=>!!a&&a.trim()!==""&&r.indexOf(a)===i).join(" ").trim();/**
71
+ * @license lucide-react v0.474.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */var tR={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
76
+ * @license lucide-react v0.474.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const nR=Q.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:u="",children:f,iconNode:h,...y},p)=>Q.createElement("svg",{ref:p,...tR,width:a,height:a,stroke:n,strokeWidth:r?Number(i)*24/Number(a):i,className:yx("lucide",u),...y},[...h.map(([m,x])=>Q.createElement(m,x)),...Array.isArray(f)?f:[f]]));/**
81
+ * @license lucide-react v0.474.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const Re=(n,a)=>{const i=Q.forwardRef(({className:r,...u},f)=>Q.createElement(nR,{ref:f,iconNode:a,className:yx(`lucide-${eR(n)}`,r),...u}));return i.displayName=`${n}`,i};/**
86
+ * @license lucide-react v0.474.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const sR=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],aR=Re("ArrowDown",sR);/**
91
+ * @license lucide-react v0.474.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const iR=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Rh=Re("ArrowUpRight",iR);/**
96
+ * @license lucide-react v0.474.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const lR=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],rR=Re("ArrowUp",lR);/**
101
+ * @license lucide-react v0.474.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const oR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],gx=Re("Ban",oR);/**
106
+ * @license lucide-react v0.474.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const cR=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],uR=Re("BookOpen",cR);/**
111
+ * @license lucide-react v0.474.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const dR=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],fR=Re("Boxes",dR);/**
116
+ * @license lucide-react v0.474.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const hR=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],mR=Re("Check",hR);/**
121
+ * @license lucide-react v0.474.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const pR=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],yR=Re("ChevronDown",pR);/**
126
+ * @license lucide-react v0.474.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const gR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],vR=Re("CircleAlert",gR);/**
131
+ * @license lucide-react v0.474.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const xR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],vx=Re("CircleCheck",xR);/**
136
+ * @license lucide-react v0.474.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const bR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],xx=Re("CircleX",bR);/**
141
+ * @license lucide-react v0.474.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const SR=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Hr=Re("Copy",SR);/**
146
+ * @license lucide-react v0.474.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const jR=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],wR=Re("ExternalLink",jR);/**
151
+ * @license lucide-react v0.474.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const NR=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],RR=Re("Eye",NR);/**
156
+ * @license lucide-react v0.474.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const CR=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],_R=Re("FlaskConical",CR);/**
161
+ * @license lucide-react v0.474.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const TR=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Ch=Re("GitBranch",TR);/**
166
+ * @license lucide-react v0.474.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const ER=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],oh=Re("Globe",ER);/**
171
+ * @license lucide-react v0.474.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const MR=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],AR=Re("Inbox",MR);/**
176
+ * @license lucide-react v0.474.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const kR=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],OR=Re("KeyRound",kR);/**
181
+ * @license lucide-react v0.474.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const zR=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],DR=Re("LayoutDashboard",zR);/**
186
+ * @license lucide-react v0.474.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const UR=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],bx=Re("Link2",UR);/**
191
+ * @license lucide-react v0.474.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const LR=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],BR=Re("LogOut",LR);/**
196
+ * @license lucide-react v0.474.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const qR=[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]],qv=Re("MailCheck",qR);/**
201
+ * @license lucide-react v0.474.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const HR=[["path",{d:"M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5",key:"e61zoh"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M20 14v4",key:"1hm744"}],["path",{d:"M20 22v.01",key:"12bgn6"}]],Sx=Re("MailWarning",HR);/**
206
+ * @license lucide-react v0.474.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const QR=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],jx=Re("Mail",QR);/**
211
+ * @license lucide-react v0.474.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const GR=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],PR=Re("MousePointerClick",GR);/**
216
+ * @license lucide-react v0.474.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const VR=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]],Zc=Re("Plug",VR);/**
221
+ * @license lucide-react v0.474.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const YR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ch=Re("Plus",YR);/**
226
+ * @license lucide-react v0.474.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const KR=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],wx=Re("RefreshCw",KR);/**
231
+ * @license lucide-react v0.474.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const XR=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],ZR=Re("Search",XR);/**
236
+ * @license lucide-react v0.474.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const FR=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Xr=Re("Send",FR);/**
241
+ * @license lucide-react v0.474.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const IR=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],JR=Re("Settings",IR);/**
246
+ * @license lucide-react v0.474.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const $R=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],WR=Re("ShieldCheck",$R);/**
251
+ * @license lucide-react v0.474.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const eC=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],tC=Re("Shuffle",eC);/**
256
+ * @license lucide-react v0.474.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const nC=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],Nx=Re("Sparkles",nC);/**
261
+ * @license lucide-react v0.474.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const sC=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Hv=Re("TriangleAlert",sC);/**
266
+ * @license lucide-react v0.474.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const aC=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],iC=Re("UserMinus",aC);/**
271
+ * @license lucide-react v0.474.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const lC=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Rx=Re("Users",lC);/**
276
+ * @license lucide-react v0.474.0 - ISC
277
+ *
278
+ * This source code is licensed under the ISC license.
279
+ * See the LICENSE file in the root directory of this source tree.
280
+ */const rC=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],oC=Re("Webhook",rC);/**
281
+ * @license lucide-react v0.474.0 - ISC
282
+ *
283
+ * This source code is licensed under the ISC license.
284
+ * See the LICENSE file in the root directory of this source tree.
285
+ */const cC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_h=Re("X",cC);/**
286
+ * @license lucide-react v0.474.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */const uC=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Th=Re("Zap",uC),Cx=Q.createContext(null);function dC({children:n}){const[a,i]=Q.useState([]),r=Q.useRef(0),u=Q.useCallback(y=>{i(p=>p.filter(m=>m.id!==y))},[]),f=Q.useCallback(y=>{const p=++r.current,m={id:p,title:y.title,description:y.description,variant:y.variant??"success"};i(x=>[...x,m]),window.setTimeout(()=>u(p),5e3)},[u]),h=Q.useMemo(()=>({toast:f}),[f]);return o.jsxs(Cx.Provider,{value:h,children:[n,o.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[60] flex w-full max-w-sm flex-col gap-2",children:a.map(y=>o.jsxs("div",{className:Fe("glass-panel pointer-events-auto flex items-start gap-3 p-4 text-white shadow-black/50 shadow-xl",y.variant==="error"&&"border-accent/40"),children:[y.variant==="success"?o.jsx(vx,{strokeWidth:1.5,className:"mt-0.5 h-5 w-5 shrink-0 text-white/90"}):o.jsx(xx,{strokeWidth:1.5,className:"mt-0.5 h-5 w-5 shrink-0 text-accent"}),o.jsxs("div",{className:"flex-1 space-y-0.5",children:[o.jsx("p",{className:"text-sm font-medium text-white",children:y.title}),y.description?o.jsx("p",{className:"text-sm text-white/60",children:y.description}):null]}),o.jsx("button",{type:"button","aria-label":"Dismiss",className:"text-white/50 transition-colors hover:text-white",onClick:()=>u(y.id),children:o.jsx(_h,{className:"h-4 w-4"})})]},y.id))})]})}function yn(){const n=Q.useContext(Cx);if(!n)throw new Error("useToast must be used within a ToastProvider");return n}const fC=new ES({defaultOptions:{queries:{staleTime:3e4,retry:(n,a)=>a instanceof bt&&[401,403].includes(a.status)?!1:n<2,refetchOnWindowFocus:!1}}}),Er="https://docs.hogsend.com",fi={docs:Er,quickstart:`${Er}/docs/getting-started`,recipes:`${Er}/docs/recipes`,journeys:`${Er}/docs/guides/journeys`,buckets:`${Er}/docs/guides/buckets`},hC=[{label:"Overview",path:"/",icon:DR},{label:"Sends",path:"/sends",icon:Xr},{label:"Templates",path:"/templates",icon:jx},{label:"Links",path:"/links",icon:bx},{label:"Journeys",path:"/journeys",icon:Ch},{label:"Buckets",path:"/buckets",icon:fR},{label:"Contacts",path:"/contacts",icon:Rx},{label:"Suppressions",path:"/suppressions",icon:gx},{label:"Debug",path:"/debug",icon:_R},{label:"Integrations",path:"/integrations",icon:Zc},{label:"Setup",path:"/setup",icon:oh},{label:"Settings",path:"/settings",icon:JR}];function mC(){const n=Dw({select:a=>a.location.pathname});return o.jsxs("aside",{className:"flex h-full w-60 flex-col border-r border-hairline-faint bg-ink",children:[o.jsx("div",{className:"flex h-14 items-center border-b border-hairline-faint px-5",children:o.jsx(hx,{})}),o.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto p-2",children:hC.map(a=>{const i=a.path==="/"?n==="/":n.startsWith(a.path),r=a.icon;return o.jsxs(jl,{to:a.path,className:Fe("flex items-center gap-3 rounded-md px-3 py-2 text-[15px] tracking-[-0.02em] outline-none transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-accent",i?"bg-accent-tint text-accent":"text-white/60 hover:bg-white/5 hover:text-white"),children:[o.jsx(r,{strokeWidth:1.5,className:"h-4 w-4"}),a.label]},a.path)})}),o.jsx("div",{className:"border-t border-hairline-faint p-2",children:o.jsxs("a",{href:fi.docs,target:"_blank",rel:"noreferrer",className:"group flex items-center gap-3 rounded-md px-3 py-2 text-[15px] tracking-[-0.02em] text-white/60 outline-none transition-colors duration-200 hover:bg-white/5 hover:text-white focus-visible:ring-2 focus-visible:ring-accent",children:[o.jsx(uR,{strokeWidth:1.5,className:"h-4 w-4"}),"Docs",o.jsx(Rh,{className:"ml-auto h-3.5 w-3.5 opacity-60 transition-transform duration-200 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})})]})}function pC(){const{data:n}=I0();return o.jsxs("div",{className:"flex h-full bg-ink text-white",children:[o.jsx(mC,{}),o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[o.jsxs("header",{className:"flex h-14 items-center justify-end gap-3 border-b border-hairline-faint bg-ink/30 px-6 backdrop-blur-[7px]",children:[n!=null&&n.user?o.jsx("span",{className:"text-sm text-white/50",children:n.user.email}):null,o.jsxs(ve,{variant:"ghost",size:"sm",onClick:()=>{$2()},children:[o.jsx(BR,{strokeWidth:1.5,className:"h-4 w-4"}),"Sign out"]})]}),o.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:o.jsx(V0,{})})]})]})}function Lt({className:n,...a}){return o.jsx("div",{className:Fe("animate-pulse rounded-md bg-white/5",n),...a})}function Na({rows:n=6}){return o.jsxs("div",{className:"space-y-2",children:[o.jsx(Lt,{className:"h-9 w-full"}),Array.from({length:n}).map((a,i)=>o.jsx(Lt,{className:"h-12 w-full"},i))]})}function _x({count:n=4}){return o.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:Array.from({length:n}).map((a,i)=>o.jsx(Lt,{className:"h-28 w-full"},i))})}function qn({title:n,description:a,icon:i=AR,action:r}){return o.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-white/15 p-12 text-center",children:[o.jsx(i,{strokeWidth:1.5,className:"h-8 w-8 text-white/30"}),o.jsx("p",{className:"text-sm font-medium text-white",children:n}),a?o.jsx("p",{className:"max-w-sm text-sm text-white/60",children:a}):null,r?o.jsx("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-2",children:r}):null]})}function St({error:n,onRetry:a}){const i=n instanceof bt||n instanceof Error?n.message:"Something went wrong.";return o.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-md border border-accent/40 bg-accent/5 p-12 text-center",children:[o.jsx(vR,{strokeWidth:1.5,className:"h-8 w-8 text-accent"}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-sm font-medium text-white",children:"Failed to load"}),o.jsx("p",{className:"max-w-sm text-sm text-white/60",children:i})]}),a?o.jsx(ve,{variant:"outline",size:"sm",onClick:a,children:"Retry"}):null]})}function An({title:n,description:a,action:i}){return o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"font-display text-2xl text-white tracking-[-0.02em]",children:n}),a?o.jsx("p",{className:"mt-1 text-sm text-white/60",children:a}):null]}),i?o.jsx("div",{className:"shrink-0",children:i}):null]})}const yC=mx("inline-flex items-center rounded-[3px] border px-2 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"border-accent bg-accent-tint text-white",secondary:"border-white/[0.08] bg-white/[0.06] text-white/80",destructive:"border-accent/40 bg-accent-tint text-accent",outline:"border-white/[0.08] text-white/70"}},defaultVariants:{variant:"default"}});function Me({className:n,variant:a,...i}){return o.jsx("div",{className:Fe(yC({variant:a}),n),...i})}function wl({open:n,onClose:a,title:i,description:r,children:u,footer:f,className:h}){return Q.useEffect(()=>{if(!n)return;const y=p=>{p.key==="Escape"&&a()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[n,a]),n?o.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[o.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-black/60",onClick:a}),o.jsxs("div",{role:"dialog","aria-modal":"true",className:Fe("glass-panel relative z-10 w-full max-w-lg p-6 text-white shadow-black/50 shadow-xl",h),children:[o.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("h2",{className:"font-display text-lg leading-none tracking-[-0.02em] text-white",children:i}),r?o.jsx("p",{className:"text-sm text-white/60",children:r}):null]}),o.jsx(ve,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8",onClick:a,"aria-label":"Close",children:o.jsx(_h,{className:"h-4 w-4"})})]}),u?o.jsx("div",{className:"space-y-4",children:u}):null,f?o.jsx("div",{className:"mt-6 flex justify-end gap-2",children:f}):null]})]}):null}function Ra({open:n,onClose:a,onConfirm:i,title:r,description:u,confirmLabel:f="Confirm",cancelLabel:h="Cancel",destructive:y,loading:p}){return o.jsx(wl,{open:n,onClose:a,title:r,description:u,footer:o.jsxs(o.Fragment,{children:[o.jsx(ve,{variant:"outline",onClick:a,disabled:p,children:h}),o.jsx(ve,{variant:y?"destructive":"default",onClick:i,disabled:p,children:p?"Working…":f})]})})}function Nl({href:n,children:a,variant:i="outline",className:r}){return o.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",className:Fe(Nh({variant:i,size:"sm"}),r),children:[a,o.jsx(Rh,{strokeWidth:2,className:"h-3.5 w-3.5 shrink-0 opacity-70 transition-transform duration-200 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})}const _s=Q.forwardRef(({className:n,...a},i)=>o.jsx("div",{className:"relative w-full overflow-auto",children:o.jsx("table",{ref:i,className:Fe("w-full caption-bottom text-sm",n),...a})}));_s.displayName="Table";const Ts=Q.forwardRef(({className:n,...a},i)=>o.jsx("thead",{ref:i,className:Fe("[&_tr]:border-b [&_tr]:border-hairline-faint",n),...a}));Ts.displayName="TableHeader";const Es=Q.forwardRef(({className:n,...a},i)=>o.jsx("tbody",{ref:i,className:Fe("[&_tr:last-child]:border-0",n),...a}));Es.displayName="TableBody";const Tt=Q.forwardRef(({className:n,...a},i)=>o.jsx("tr",{ref:i,className:Fe("border-b border-hairline-faint transition-colors hover:bg-white/[0.03] data-[state=selected]:bg-white/[0.06]",n),...a}));Tt.displayName="TableRow";const xe=Q.forwardRef(({className:n,...a},i)=>o.jsx("th",{ref:i,className:Fe("h-10 px-2 text-left align-middle font-normal text-white/50 text-xs uppercase tracking-[0.04em] [&:has([role=checkbox])]:pr-0",n),...a}));xe.displayName="TableHead";const ge=Q.forwardRef(({className:n,...a},i)=>o.jsx("td",{ref:i,className:Fe("p-2 align-middle [&:has([role=checkbox])]:pr-0",n),...a}));ge.displayName="TableCell";const gC=Q.forwardRef(({className:n,...a},i)=>o.jsx("caption",{ref:i,className:Fe("mt-4 text-sm text-white/50",n),...a}));gC.displayName="TableCaption";function vC(){return Ae.get("/v1/admin/metrics/overview")}function xC(n){return Ae.get("/v1/admin/emails",{query:n})}function bC(n){return Ae.get(`/v1/admin/emails/${n}`)}function SC(n){return Ae.post(`/v1/admin/emails/${n}/resend`)}function jC(){return Ae.get("/v1/admin/templates")}function wC(n){return Ae.get(`/v1/admin/templates/${encodeURIComponent(n)}/preview`)}function NC(n,a){return Ae.post(`/v1/admin/templates/${encodeURIComponent(n)}/send-test`,{json:{to:a}})}function RC(n){return Ae.get(`/v1/admin/reporting/templates/${encodeURIComponent(n)}`)}function CC(){return Ae.get("/v1/admin/metrics/journeys")}function _C(n){return Ae.get(`/v1/admin/metrics/journeys/${encodeURIComponent(n)}`)}function Tx(){return Ae.get("/v1/admin/journeys",{query:{limit:100}})}function TC(n,a){return Ae.put(`/v1/admin/journeys/${encodeURIComponent(n)}`,{json:{enabled:a}})}function EC(){return Ae.get("/v1/admin/buckets",{query:{limit:100}})}function MC(n){return Ae.get(`/v1/admin/buckets/${encodeURIComponent(n)}`)}function AC(){return Ae.get("/v1/admin/metrics/buckets")}function kC(n,a){return Ae.get(`/v1/admin/metrics/buckets/${encodeURIComponent(n)}`,{query:{period:a}})}function OC(n,a){return Ae.patch(`/v1/admin/buckets/${encodeURIComponent(n)}`,{json:{enabled:a}})}function zC(n){return Ae.get("/v1/admin/contacts",{query:{search:n,limit:50}})}function DC(n){return Ae.get(`/v1/admin/contacts/${encodeURIComponent(n)}`)}function UC(n){return Ae.get(`/v1/admin/reporting/contacts/${encodeURIComponent(n)}/activity`)}function LC(n){return Ae.get(`/v1/admin/contacts/${encodeURIComponent(n)}/timeline`,{query:{limit:100}})}function Ex(n,a){return Ae.put(`/v1/admin/contacts/${encodeURIComponent(n)}/preferences`,{json:a})}function BC(n){return Ae.get("/v1/admin/suppressions",{query:{type:n,limit:200}})}function qC(){return Ae.get("/v1/admin/api-keys",{query:{limit:100,includeRevoked:"true"}})}function HC(n){return Ae.post("/v1/admin/api-keys",{json:n})}function QC(n){return Ae.delete(`/v1/admin/api-keys/${encodeURIComponent(n)}`)}function GC(n){return Ae.post("/v1/admin/events",{json:{event:n.event,userId:n.userId,userEmail:n.userEmail,properties:n.properties??{}}})}function Qv(n){return Ae.get("/v1/admin/domain",{query:{refresh:n?"true":void 0}})}function PC(n){return Ae.post("/v1/admin/domain",{json:{domain:n}})}function VC(){return Ae.post("/v1/admin/domain/verify")}function YC(){return Ae.get("/v1/admin/connectors")}function KC(){return Ae.get("/v1/admin/connectors/discord/connect-info")}function XC(n){return Ae.delete(`/v1/admin/provider-credentials/${encodeURIComponent(n)}`)}function ZC(n){return Ae.get("/v1/admin/links",{query:{type:n==null?void 0:n.type,includeArchived:n!=null&&n.includeArchived?"true":void 0,limit:200}})}function FC(n){return Ae.post("/v1/admin/links",{json:n})}function IC(n){return Ae.delete(`/v1/admin/links/${encodeURIComponent(n)}`)}const Le={overview:["overview"],emails:n=>["emails",n],email:n=>["email",n],templates:["templates"],templatePreview:n=>["template-preview",n],templateReport:n=>["template-report",n],journeyMetrics:["journey-metrics"],journeys:["journeys"],journeyFunnel:n=>["journey-funnel",n],buckets:["buckets"],bucketMetrics:["bucket-metrics"],bucket:n=>["bucket",n],bucketTrend:n=>["bucket-trend",n],contacts:n=>["contacts",n],contact:n=>["contact",n],contactActivity:n=>["contact-activity",n],contactTimeline:n=>["contact-timeline",n],suppressions:n=>["suppressions",n],apiKeys:["api-keys"],domain:["domain"],integrations:["integrations"],discordConnectInfo:["discord-connect-info"],links:n=>["links",n],link:n=>["link",n]};function mn(n){if(!n)return"—";const a=new Date(n);return Number.isNaN(a.getTime())?"—":a.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function zc(n){if(!n)return"—";const a=new Date(n);return Number.isNaN(a.getTime())?"—":a.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function JC(n){if(!n)return"—";const a=new Date(n);if(Number.isNaN(a.getTime()))return"—";const i=Date.now()-a.getTime(),r=Math.round(i/1e3);if(r<60)return"just now";const u=Math.round(r/60);if(u<60)return`${u}m ago`;const f=Math.round(u/60);if(f<24)return`${f}h ago`;const h=Math.round(f/24);return h<30?`${h}d ago`:zc(n)}function Rl(n){return n==null||Number.isNaN(n)?"—":`${(n*100).toFixed(1)}%`}function ct(n){return n==null||Number.isNaN(n)?"—":n.toLocaleString()}function Eh(n){if(n==null||Number.isNaN(n))return"—";if(n<60)return`${Math.round(n)}s`;const a=Math.floor(n/60);if(a<60)return`${a}m`;const i=Math.floor(a/60),r=a%60;if(i<24)return r?`${i}h ${r}m`:`${i}h`;const u=Math.floor(i/24),f=i%24;return f?`${u}d ${f}h`:`${u}d`}function $C(n){if(!n)return null;const a=(n.hours??0)*3600+(n.minutes??0)*60+(n.seconds??0);return a>0?Eh(a):null}function Mx(n,a=48){return n.length>a?`${n.slice(0,a-1)}…`:n}function uh({data:n,height:a=160,label:i="value"}){var u,f;if(n.length===0)return o.jsx("div",{className:"flex items-center justify-center rounded-md border border-dashed border-white/15 text-sm text-white/50",style:{height:a},children:"No data in range"});const r=Math.max(...n.map(h=>h.value),1);return o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"flex items-end gap-1 rounded-md border border-hairline-faint bg-white/[0.015] p-3",style:{height:a},children:n.map(h=>{const y=h.value/r*100;return o.jsx("div",{className:"group flex flex-1 flex-col items-center justify-end",title:`${zc(h.date)}: ${h.value} ${i}`,children:o.jsx("div",{className:"w-full min-w-[2px] rounded-t bg-white/15 transition-colors duration-200 group-hover:bg-accent",style:{height:`${Math.max(y,h.value>0?4:0)}%`}})},h.date)})}),o.jsxs("div",{className:"flex justify-between text-[11px] text-white/40 uppercase tracking-[0.04em]",children:[o.jsx("span",{children:zc((u=n[0])==null?void 0:u.date)}),o.jsx("span",{children:zc((f=n[n.length-1])==null?void 0:f.date)})]})]})}function WC({bucketId:n}){const a=We({queryKey:Le.bucketTrend(n),queryFn:()=>kC(n)});if(a.isPending)return o.jsx(Lt,{className:"h-48 w-full"});if(a.isError)return o.jsx(St,{error:a.error,onRetry:()=>a.refetch()});const i=a.data,r=i.points.map(y=>({date:y.date,value:y.entered})),u=i.points.map(y=>({date:y.date,value:y.left})),f=i.points.reduce((y,p)=>y+p.entered,0),h=i.points.reduce((y,p)=>y+p.left,0);return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("span",{className:"eyebrow block text-white/50",children:"Current size"}),o.jsx("span",{className:"font-display text-lg text-white",children:ct(i.size)})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("span",{className:"eyebrow block text-white/50",children:"Entered (range)"}),o.jsx("span",{className:"font-display text-lg text-white",children:ct(f)})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("span",{className:"eyebrow block text-white/50",children:"Left (range)"}),o.jsx("span",{className:"font-display text-lg text-white",children:ct(h)})]})]}),o.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("span",{className:"eyebrow block text-white/50",children:"Entered over time"}),o.jsx(uh,{data:r,label:"joined"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("span",{className:"eyebrow block text-white/50",children:"Left over time"}),o.jsx(uh,{data:u,label:"left"})]})]})]})}function e_(){var N,R;const{toast:n}=yn(),a=Hn(),[i,r]=Q.useState(null),[u,f]=Q.useState(null),h=We({queryKey:Le.bucketMetrics,queryFn:AC}),y=We({queryKey:Le.buckets,queryFn:EC}),p=Bt({mutationFn:j=>OC(j.id,j.enabled),onSuccess:(j,O)=>{n({title:O.enabled?"Bucket enabled":"Bucket disabled"}),f(null),a.invalidateQueries({queryKey:Le.buckets}),a.invalidateQueries({queryKey:Le.bucketMetrics})},onError:j=>{n({variant:"error",title:"Update failed",description:j instanceof bt?j.message:"Unexpected error."}),f(null)}}),m=h.isPending||y.isPending,x=h.isError||y.isError,v=new Map((((N=y.data)==null?void 0:N.buckets)??[]).map(j=>[j.id,j])),b=(((R=h.data)==null?void 0:R.buckets)??[]).map(j=>{const O=v.get(j.bucketId);return{...j,enabled:(O==null?void 0:O.enabled)??!1,kind:(O==null?void 0:O.kind)??"dynamic",timeBased:(O==null?void 0:O.timeBased)??!1}}),w=b.find(j=>j.bucketId===i)??null;return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Buckets",description:"Real-time, code-defined membership. Sizes, enter/leave trends, and which journeys each bucket feeds — observe only, authoring stays in code."}),m?o.jsx(Na,{}):x?o.jsx(St,{error:h.error??y.error,onRetry:()=>{h.refetch(),y.refetch()}}):b.length===0?o.jsx(qn,{title:"No buckets registered",description:"Buckets are real-time, code-defined audiences (defineBucket()). Add one to your app and members appear here as events arrive.",action:o.jsxs(o.Fragment,{children:[o.jsx(Nl,{href:fi.buckets,children:"How to create a bucket"}),o.jsx(Nl,{href:fi.recipes,variant:"ghost",children:"Recipes"})]})}):o.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:o.jsxs(_s,{children:[o.jsx(Ts,{children:o.jsxs(Tt,{children:[o.jsx(xe,{children:"Bucket"}),o.jsx(xe,{className:"text-right",children:"Current size"}),o.jsx(xe,{className:"text-right",children:"Entered"}),o.jsx(xe,{className:"text-right",children:"Left"}),o.jsx(xe,{className:"text-right",children:"Avg dwell"}),o.jsx(xe,{children:"Freshness"}),o.jsx(xe,{children:"State"}),o.jsx(xe,{className:"text-right",children:"Action"})]})}),o.jsx(Es,{children:b.map(j=>o.jsxs(Tt,{className:"cursor-pointer","data-state":j.bucketId===i?"selected":void 0,onClick:()=>r(O=>O===j.bucketId?null:j.bucketId),children:[o.jsxs(ge,{children:[o.jsx("span",{className:"font-medium text-white",children:j.name}),o.jsx("span",{className:"block font-mono text-xs text-white/70",children:j.bucketId})]}),o.jsx(ge,{className:"text-right",children:ct(j.size)}),o.jsx(ge,{className:"text-right",children:ct(j.entered)}),o.jsx(ge,{className:"text-right",children:ct(j.left)}),o.jsx(ge,{className:"text-right text-white/60",children:Eh(j.avgDwellSecs)}),o.jsx(ge,{children:o.jsx(t_,{timeBased:j.timeBased})}),o.jsx(ge,{children:o.jsx(Me,{variant:j.enabled?"default":"secondary",children:j.enabled?"Enabled":"Disabled"})}),o.jsx(ge,{className:"text-right",children:o.jsx(ve,{variant:"outline",size:"sm",onClick:O=>{O.stopPropagation(),f(j)},children:j.enabled?"Disable":"Enable"})})]},j.bucketId))})]})}),w?o.jsxs("div",{className:"space-y-6",children:[o.jsxs(qt,{children:[o.jsx(Ht,{children:o.jsxs(Wt,{className:"text-base",children:[w.name," — feeds journeys"]})}),o.jsx(Qt,{children:o.jsx(n_,{bucketId:w.bucketId})})]}),o.jsxs(qt,{children:[o.jsx(Ht,{children:o.jsxs(Wt,{className:"text-base",children:[w.name," — enter / leave over time"]})}),o.jsx(Qt,{children:o.jsx(WC,{bucketId:w.bucketId})})]})]}):null,o.jsx(Ra,{open:u!==null,onClose:()=>f(null),onConfirm:()=>u&&p.mutate({id:u.bucketId,enabled:!u.enabled}),title:u!=null&&u.enabled?"Disable this bucket?":"Enable this bucket?",description:u!=null&&u.enabled?"Membership will stop being recomputed; in-flight members stay until they leave.":"Matching users will start being added to this bucket again.",confirmLabel:u!=null&&u.enabled?"Disable":"Enable",destructive:u==null?void 0:u.enabled,loading:p.isPending})]})}function t_({timeBased:n}){return n?o.jsx(Me,{variant:"outline",className:"border-white/[0.08] bg-white/[0.04] text-white/50",title:"Time-based — leaves lag the reconcile cron",children:"Building"}):o.jsx(Me,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",title:"Event-driven — transitions in real time",children:"Live"})}function n_({bucketId:n}){const a=We({queryKey:Le.bucket(n),queryFn:()=>MC(n)});if(a.isPending)return o.jsx(Lt,{className:"h-10 w-full"});if(a.isError)return o.jsx(St,{error:a.error,onRetry:()=>a.refetch()});const i=a.data.bucket.feedsJourneys,r=$C(a.data.bucket.maxDwell);return o.jsxs("div",{className:"space-y-3",children:[r?o.jsxs(Me,{variant:"outline",title:"Members are force-removed maxDwell after joining, regardless of criteria.",children:["Time-boxed · ",r]}):null,i.length===0?o.jsxs("div",{className:"space-y-1 text-sm text-white/60",children:[o.jsxs("p",{children:["No journeys are bound to this bucket's transitions yet. Bind one to THIS bucket with the typed refs"," ",o.jsx("code",{className:"text-xs",children:"bucket.entered"})," /"," ",o.jsx("code",{className:"text-xs",children:"bucket.left"})," (e.g."," ",o.jsx("code",{className:"text-xs",children:"{ trigger: { event: bucket.entered } }"}),"), or colocate a reaction with"," ",o.jsx("code",{className:"text-xs",children:'bucket.on("enter", ...)'}),"."]}),o.jsxs("p",{children:["To react to ANY bucket, use the generic"," ",o.jsx("code",{className:"text-xs",children:"Events.BUCKET_ENTERED"})," /"," ",o.jsx("code",{className:"text-xs",children:"Events.BUCKET_LEFT"})," constants."]})]}):o.jsx("div",{className:"flex flex-wrap gap-2",children:i.map(u=>o.jsxs(Me,{variant:u.owned?"default":"secondary",title:u.trigger,children:[u.name,u.owned?o.jsx("span",{className:"ml-1.5 text-[10px] uppercase tracking-[0.04em] text-white/50",children:"owned"}):null]},`${u.id}-${u.trigger}`))})]})}const s_={delivered:{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80"},opened:{variant:"outline",className:"border-white/20 bg-white/[0.08] text-white/90"},clicked:{variant:"outline",className:"border-white/30 bg-white/[0.12] text-white"},sent:{variant:"outline",className:"border-white/[0.08] bg-white/[0.04] text-white/50"},rendered:{variant:"outline",className:"border-white/[0.08] bg-white/[0.04] text-white/50"},queued:{variant:"outline",className:"border-white/[0.08] bg-white/[0.04] text-white/50"},bounced:{variant:"destructive"},complained:{variant:"destructive"},failed:{variant:"destructive"}};function Zr({status:n}){const a=s_[n]??{variant:"outline"};return o.jsx(Me,{variant:a.variant,className:Fe("capitalize",a.className),children:n})}function Ax({open:n,onClose:a,title:i,description:r,children:u,className:f}){return Q.useEffect(()=>{if(!n)return;const h=y=>{y.key==="Escape"&&a()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[n,a]),n?o.jsxs("div",{className:"fixed inset-0 z-50",children:[o.jsx("button",{type:"button","aria-label":"Close panel",className:"absolute inset-0 bg-black/60",onClick:a}),o.jsxs("div",{role:"dialog","aria-modal":"true",className:Fe("absolute inset-y-0 right-0 flex w-full max-w-2xl flex-col border-l border-white/10 bg-raised text-white shadow-black/50 shadow-xl",f),children:[o.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-hairline-faint p-6",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("h2",{className:"font-display text-lg leading-none tracking-[-0.02em] text-white",children:i}),r?o.jsx("p",{className:"break-all text-sm text-white/60",children:r}):null]}),o.jsx(ve,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8 shrink-0",onClick:a,"aria-label":"Close",children:o.jsx(_h,{className:"h-4 w-4"})})]}),o.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:u})]})]}):null}const a_={event:Th,journey:Ch,email:jx};function i_({entry:n}){const a=a_[n.type],i=n.data,r=n.type==="event"?String(i.event??"event"):n.type==="journey"?`${String(i.journeyId??"journey")} · ${String(i.status??"")}`:String(i.subject??i.templateKey??"email");return o.jsxs("li",{className:"flex gap-3",children:[o.jsx("span",{className:"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-hairline-faint bg-white/[0.04]",children:o.jsx(a,{className:"h-3.5 w-3.5 text-white/50",strokeWidth:1.5})}),o.jsxs("div",{className:"min-w-0 flex-1 pb-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("p",{className:"truncate text-sm font-medium text-white",children:r}),n.type==="email"&&i.status?o.jsx(Zr,{status:String(i.status)}):null]}),o.jsx("p",{className:"text-xs text-white/50",children:mn(n.timestamp)})]})]})}function l_({contactId:n,onClose:a}){var N,R;const i=n!==null,{toast:r}=yn(),u=Hn(),[f,h]=Q.useState(!1),y=We({queryKey:n?Le.contact(n):["contact","none"],queryFn:()=>DC(n),enabled:i}),p=We({queryKey:n?Le.contactActivity(n):["activity","none"],queryFn:()=>UC(n),enabled:i}),m=We({queryKey:n?Le.contactTimeline(n):["timeline","none"],queryFn:()=>LC(n),enabled:i}),x=Bt({mutationFn:()=>Ex(n,{suppressed:!1,unsubscribedAll:!1}),onSuccess:()=>{r({title:"Contact un-suppressed",description:"They can receive emails again."}),h(!1),n&&u.invalidateQueries({queryKey:Le.contact(n)}),u.invalidateQueries({queryKey:["suppressions"]})},onError:j=>{r({variant:"error",title:"Un-suppress failed",description:j instanceof bt?j.message:"Unexpected error."}),h(!1)}}),v=(N=y.data)==null?void 0:N.contact,b=(R=y.data)==null?void 0:R.preferences,w=(b==null?void 0:b.suppressed)||(b==null?void 0:b.unsubscribedAll);return o.jsxs(o.Fragment,{children:[o.jsx(Ax,{open:i,onClose:a,title:(v==null?void 0:v.email)??(v==null?void 0:v.externalId)??"Contact",description:v?v.externalId:void 0,children:y.isPending?o.jsxs("div",{className:"space-y-4",children:[o.jsx(Lt,{className:"h-24 w-full"}),o.jsx(Lt,{className:"h-40 w-full"})]}):y.isError?o.jsx(St,{error:y.error,onRetry:()=>y.refetch()}):v?o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b!=null&&b.suppressed?o.jsx(Me,{variant:"destructive",children:"Suppressed"}):null,b!=null&&b.unsubscribedAll?o.jsx(Me,{variant:"destructive",children:"Unsubscribed"}):null,b&&b.bounceCount>0?o.jsxs(Me,{variant:"secondary",children:[b.bounceCount," bounce",b.bounceCount===1?"":"s"]}):null,w?null:o.jsx(Me,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Subscribed"}),w?o.jsx(ve,{size:"sm",variant:"outline",className:"ml-auto",onClick:()=>h(!0),children:"Un-suppress"}):null]}),o.jsxs("dl",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx("dt",{className:"text-xs text-white/50",children:"First seen"}),o.jsx("dd",{className:"text-sm text-white",children:mn(v.firstSeenAt)})]}),o.jsxs("div",{children:[o.jsx("dt",{className:"text-xs text-white/50",children:"Last seen"}),o.jsx("dd",{className:"text-sm text-white",children:mn(v.lastSeenAt)})]})]}),o.jsxs("section",{children:[o.jsxs("h3",{className:"eyebrow mb-3 text-white/50",children:["Email activity",p.data?` (${p.data.total})`:""]}),p.isPending?o.jsx(Lt,{className:"h-20 w-full"}):p.isError?o.jsx("p",{className:"text-sm text-white/60",children:"Could not load email activity."}):p.data&&p.data.sends.length>0?o.jsx("ul",{className:"space-y-2",children:p.data.sends.slice(0,10).map(j=>o.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border bg-white/[0.015] p-3",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"truncate text-sm font-medium text-white",children:j.subject}),o.jsx("p",{className:"text-xs text-white/50",children:mn(j.createdAt)})]}),o.jsx(Zr,{status:j.status})]},j.id))}):o.jsx("p",{className:"text-sm text-white/60",children:"No emails sent."})]}),o.jsxs("section",{children:[o.jsx("h3",{className:"eyebrow mb-3 text-white/50",children:"Timeline"}),m.isPending?o.jsx(Lt,{className:"h-20 w-full"}):m.isError?o.jsx("p",{className:"text-sm text-white/60",children:"Could not load timeline."}):m.data&&m.data.timeline.length>0?o.jsx("ul",{children:m.data.timeline.map((j,O)=>o.jsx(i_,{entry:j},`${j.type}-${j.timestamp}-${O}`))}):o.jsx("p",{className:"text-sm text-white/60",children:"No activity yet."})]})]}):null}),o.jsx(Ra,{open:f,onClose:()=>h(!1),onConfirm:()=>x.mutate(),title:"Un-suppress this contact?",description:"They will be eligible to receive emails again.",confirmLabel:"Un-suppress",loading:x.isPending})]})}function r_(){var p;const[n,a]=Q.useState(""),[i,r]=Q.useState(""),[u,f]=Q.useState(null);Q.useEffect(()=>{const m=window.setTimeout(()=>r(n.trim()),300);return()=>window.clearTimeout(m)},[n]);const h=We({queryKey:Le.contacts(i),queryFn:()=>zC(i||void 0),placeholderData:Vc}),y=((p=h.data)==null?void 0:p.contacts)??[];return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Contacts",description:"Search contacts and review their full activity timeline."}),o.jsxs("div",{className:"relative max-w-sm",children:[o.jsx(ZR,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-white/40",strokeWidth:1.5}),o.jsx(lt,{placeholder:"Search by email or external ID…",className:"pl-9",value:n,onChange:m=>a(m.target.value)})]}),h.isPending?o.jsx(Na,{}):h.isError?o.jsx(St,{error:h.error,onRetry:()=>h.refetch()}):y.length===0?o.jsx(qn,{title:"No contacts found",description:i?"No contacts match your search.":"Contacts appear here as events are ingested."}):o.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:o.jsxs(_s,{children:[o.jsx(Ts,{children:o.jsxs(Tt,{children:[o.jsx(xe,{children:"Email"}),o.jsx(xe,{children:"External ID"}),o.jsx(xe,{className:"text-right",children:"Last seen"})]})}),o.jsx(Es,{children:y.map(m=>o.jsxs(Tt,{className:"cursor-pointer",onClick:()=>f(m.id),children:[o.jsx(ge,{className:"font-medium text-white",children:m.email??"—"}),o.jsx(ge,{className:"font-mono text-xs text-white/70",children:m.externalId}),o.jsx(ge,{className:"text-right text-white/60",children:JC(m.lastSeenAt)})]},m.id))})]})}),o.jsx(l_,{contactId:u,onClose:()=>f(null)})]})}function nt({className:n,...a}){return o.jsx("label",{className:Fe("text-sm font-medium leading-none text-white/80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...a})}function Gv(){return`test_${Math.random().toString(36).slice(2,10)}`}function o_(n){const a=n.trim();if(!a)return{ok:!0,value:{}};try{const i=JSON.parse(a);return i===null||typeof i!="object"||Array.isArray(i)?{ok:!1,error:"Properties must be a JSON object."}:{ok:!0,value:i}}catch(i){return{ok:!1,error:i instanceof Error?i.message:"Invalid JSON."}}}function c_(){const{toast:n}=yn(),[a,i]=Q.useState(""),[r,u]=Q.useState(Gv),[f,h]=Q.useState(""),[y,p]=Q.useState("{}"),[m,x]=Q.useState(null),[v,b]=Q.useState(null),w=We({queryKey:Le.journeys,queryFn:Tx}),N=Q.useMemo(()=>{var B;const A=new Map;for(const T of((B=w.data)==null?void 0:B.journeys)??[]){const q=A.get(T.trigger.event)??[];q.push(T.name),A.set(T.trigger.event,q)}return Array.from(A,([T,q])=>({event:T,journeys:q}))},[w.data]),R=Bt({mutationFn:A=>GC(A),onSuccess:A=>{b(A),n({title:"Event ingested",description:`Stored: ${A.stored} · ${A.exits.length} journey exit(s).`})},onError:A=>{n({variant:"error",title:"Ingest failed",description:A instanceof bt?A.message:"Unexpected error."})}}),j=()=>{const A=o_(y);if(!A.ok){x(A.error);return}x(null),R.mutate({event:a.trim(),userId:r.trim(),userEmail:f.trim()||void 0,properties:A.value})},O=!!a.trim()&&!!r.trim()&&!R.isPending;return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Debug",description:"Fire events into the ingest pipeline — exactly what real events do. Trigger journeys locally without a PostHog tunnel."}),o.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[o.jsxs(qt,{className:"lg:col-span-2",children:[o.jsxs(Ht,{children:[o.jsx(Wt,{className:"text-base",children:"Send a test event"}),o.jsxs(ja,{children:["POSTs to ",o.jsx("code",{className:"text-xs",children:"/v1/ingest"}),". Journeys whose trigger matches will enrol this user."]})]}),o.jsxs(Qt,{className:"space-y-4",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"event",children:"Event name"}),o.jsx(lt,{id:"event",list:"event-presets",placeholder:"e.g. user.created",value:a,onChange:A=>i(A.target.value)}),o.jsx("datalist",{id:"event-presets",children:N.map(A=>o.jsx("option",{value:A.event},A.event))})]}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"userId",children:"User ID"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(lt,{id:"userId",placeholder:"test_user",value:r,onChange:A=>u(A.target.value)}),o.jsx(ve,{variant:"outline",size:"icon",title:"Generate a random test user ID",onClick:()=>u(Gv()),children:o.jsx(tC,{className:"h-4 w-4"})})]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"userEmail",children:"User email (optional)"}),o.jsx(lt,{id:"userEmail",type:"email",placeholder:"you@example.com",value:f,onChange:A=>h(A.target.value)})]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"props",children:"Properties (JSON)"}),o.jsx("textarea",{id:"props",spellCheck:!1,className:"flex min-h-[140px] w-full rounded-md border border-hairline-faint bg-white/[0.04] px-3 py-2 font-mono text-sm text-white transition-colors duration-200 placeholder:text-white/40 hover:border-white/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",value:y,onChange:A=>{p(A.target.value),m&&x(null)}}),m?o.jsx("p",{className:"text-xs text-accent",children:m}):null]}),o.jsx("div",{className:"flex justify-end",children:o.jsxs(ve,{onClick:j,disabled:!O,children:[o.jsx(Th,{className:"h-4 w-4"}),R.isPending?"Sending…":"Send event"]})})]})]}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs(qt,{children:[o.jsxs(Ht,{children:[o.jsx(Wt,{className:"text-base",children:"Journey triggers"}),o.jsx(ja,{children:"Events that enrol a registered journey. Click to fill the form."})]}),o.jsx(Qt,{children:N.length===0?o.jsx("p",{className:"text-sm text-white/60",children:"No journeys registered yet. Any event name still works — define a journey to see triggers here."}):o.jsx("div",{className:"flex flex-wrap gap-2",children:N.map(A=>o.jsx(ve,{variant:"outline",size:"sm",title:`Triggers: ${A.journeys.join(", ")}`,onClick:()=>i(A.event),children:A.event},A.event))})})]}),v?o.jsxs(qt,{children:[o.jsx(Ht,{children:o.jsxs(Wt,{className:"flex items-center gap-2 text-base",children:[o.jsx(vx,{className:"h-4 w-4 text-white/90"}),"Result"]})}),o.jsxs(Qt,{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Me,{variant:v.stored?"default":"secondary",children:v.stored?"Stored":"Not stored"}),o.jsxs("span",{className:"text-sm text-white/60",children:[v.exits.length," journey exit(s)"]})]}),o.jsx("pre",{className:"max-h-48 overflow-auto rounded-md border border-hairline-faint bg-white/[0.04] p-3 font-mono text-xs text-white/90",children:JSON.stringify(v,null,2)}),o.jsxs("p",{className:"text-sm text-white/60",children:["See the effect in"," ",o.jsx(jl,{to:"/journeys",className:"text-white transition-colors duration-200 hover:text-white/80",children:"Journeys"})," ","or the"," ",o.jsx(jl,{to:"/contacts",className:"text-white transition-colors duration-200 hover:text-white/80",children:"contact's timeline"}),". Make sure the worker is running."]})]})]}):null]})]})]})}const u_={webhook:"Webhook",gateway:"Gateway",poll:"Poll"};function d_({transport:n}){return o.jsx(Me,{variant:"secondary",className:"font-mono text-[11px]",children:u_[n]})}function f_({credential:n}){return n!=null&&n.connected?o.jsx(Me,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Connected"}):o.jsx(Me,{variant:"outline",className:"text-white/50",children:"Not connected"})}function h_({integration:n}){return o.jsxs("div",{className:"flex flex-wrap gap-1",children:[n.hasConnector?o.jsx(Me,{variant:"outline",className:"text-white/60",children:"Inbound"}):null,n.hasDestination?o.jsx(Me,{variant:"outline",className:"text-white/60",children:"Outbound"}):null]})}function kx({label:n,value:a}){const{toast:i}=yn();return o.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[o.jsx("span",{className:"shrink-0 text-white/50",children:n}),o.jsx("code",{className:"flex-1 truncate rounded border border-hairline-faint bg-white/[0.04] px-2 py-1 font-mono text-white/70",children:a}),o.jsx(ve,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":`Copy ${n}`,onClick:()=>{navigator.clipboard.writeText(a).then(()=>{i({title:"Copied",description:`${n} copied.`})})},children:o.jsx(Hr,{className:"h-3.5 w-3.5",strokeWidth:1.5})})]})}const m_=[{bit:2,label:"Members"},{bit:256,label:"Presence"},{bit:512,label:"Messages"},{bit:1024,label:"Reactions"},{bit:32768,label:"Message content"}];function p_({intents:n}){const a=m_.filter(i=>(n&i.bit)!==0);return a.length===0?null:o.jsx("div",{className:"flex flex-wrap gap-1",children:a.map(i=>o.jsx(Me,{variant:"secondary",className:"text-[11px]",children:i.label},i.label))})}function Pv({label:n,value:a}){return o.jsxs("div",{className:"rounded-md border border-hairline-faint bg-white/[0.015] px-3 py-2",children:[o.jsx("p",{className:"font-display text-lg text-white tabular-nums",children:a}),o.jsx("p",{className:"text-[11px] text-white/50",children:n})]})}function y_({integration:n,connectInfo:a}){var f;const i=n.gateway,r=!!((f=n.credential)!=null&&f.connected),u=(a==null?void 0:a.installUrl)??null;return o.jsxs("div",{className:"space-y-4",children:[r?null:o.jsxs("div",{className:"rounded-md border border-accent/40 bg-accent-tint p-3 text-xs text-white/70",children:[o.jsx("p",{className:"font-medium text-accent",children:"Connect via CLI"}),o.jsxs("p",{className:"mt-1",children:["Discord secrets are pasted through the CLI — Studio never stores tokens. Run"," ",o.jsx("code",{className:"rounded bg-white/[0.06] px-1 py-0.5 font-mono",children:"hogsend connect discord"})," ","to paste the bot token + client secret, then return here to invite the bot."]})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx("span",{className:"text-xs text-white/50",children:"Bot:"}),(i==null?void 0:i.botInstalled)===!0?o.jsx(Me,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Installed"}):(i==null?void 0:i.botInstalled)===!1?o.jsx(Me,{variant:"outline",className:"text-white/50",children:"Not installed"}):o.jsx(Me,{variant:"outline",className:"text-white/40",children:"Unknown"}),o.jsx("span",{className:"text-xs text-white/50",children:"Worker:"}),i!=null&&i.workerHealthy?o.jsx(Me,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Online"}):o.jsx(Me,{variant:"outline",className:"text-white/50",children:"Offline"})]}),r&&i&&!i.workerHealthy?o.jsxs("div",{className:"rounded-md border border-amber-500/30 bg-amber-500/[0.06] p-3 text-xs text-white/70",children:[o.jsx("p",{className:"font-medium text-amber-400",children:"Worker offline"}),o.jsxs("p",{className:"mt-1",children:["Secrets are stored but no worker holds the gateway socket. Set"," ",o.jsx("code",{className:"rounded bg-white/[0.06] px-1 py-0.5 font-mono",children:"DISCORD_BOT_TOKEN"})," ","and the API's"," ",o.jsx("code",{className:"rounded bg-white/[0.06] px-1 py-0.5 font-mono",children:"REDIS_URL"})," ","on the worker service and redeploy. If it stays offline with the token set, enable the 3 privileged gateway intents in the Discord developer portal."]})]}):null,i!=null&&i.guildId?o.jsx(kx,{label:"Guild",value:i.guildId}):null,i!=null&&i.intents?o.jsx(p_,{intents:i.intents}):null,i?o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsx(Pv,{label:"Linked members",value:i.linkedMembers}),o.jsx(Pv,{label:"Unlinked members",value:i.unlinkedMembers})]}):null,u?o.jsx("a",{href:u,target:"_blank",rel:"noreferrer",children:o.jsxs(ve,{variant:"secondary",size:"sm",className:"w-full",children:[o.jsx(Zc,{className:"h-4 w-4",strokeWidth:1.5}),i!=null&&i.botInstalled?"Re-invite bot":"Invite bot",o.jsx(Rh,{className:"ml-auto h-3.5 w-3.5 opacity-60"})]})}):null]})}function g_({integration:n}){const a=n.webhook;return a?o.jsxs("div",{className:"space-y-3",children:[o.jsx(kx,{label:"URL",value:a.url}),o.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[o.jsx("span",{className:"text-white/50",children:"Verify secret:"}),a.secretConfigured?o.jsx(Me,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Configured"}):o.jsx(Me,{variant:"destructive",children:"Open — no secret"})]})]}):null}function v_({integration:n,connectInfo:a,onDisconnect:i}){var f,h;const r=n.transport==="gateway",u=!!((f=n.credential)!=null&&f.connected);return o.jsxs(qt,{className:"flex flex-col",children:[o.jsxs(Ht,{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[n.transport==="webhook"?o.jsx(oC,{className:"h-4 w-4 text-white/40",strokeWidth:1.5}):o.jsx(Zc,{className:"h-4 w-4 text-white/40",strokeWidth:1.5}),o.jsx(Wt,{children:n.name})]}),o.jsx(f_,{credential:n.credential})]}),n.description?o.jsx("p",{className:"text-sm text-white/60",children:n.description}):null,o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx(d_,{transport:n.transport}),o.jsx(h_,{integration:n})]})]}),o.jsxs(Qt,{className:"flex-1 space-y-4",children:[r?o.jsx(y_,{integration:n,connectInfo:a}):n.transport==="webhook"?o.jsx(g_,{integration:n}):null,(h=n.credential)!=null&&h.updatedAt?o.jsxs("p",{className:"text-[11px] text-white/40",children:["Connected ",mn(n.credential.updatedAt)]}):null,u?o.jsx(ve,{variant:"outline",size:"sm",className:"w-full",onClick:()=>i(n),children:"Disconnect"}):null]})]})}function x_(){var p;const{toast:n}=yn(),a=Hn(),[i,r]=Q.useState(null),u=We({queryKey:Le.integrations,queryFn:YC}),f=We({queryKey:Le.discordConnectInfo,queryFn:KC,retry:!1}),h=Bt({mutationFn:m=>XC(m),onSuccess:()=>{n({title:"Integration disconnected"}),r(null),a.invalidateQueries({queryKey:Le.integrations}),a.invalidateQueries({queryKey:Le.discordConnectInfo})},onError:m=>{n({variant:"error",title:"Disconnect failed",description:m instanceof bt?m.message:"Unexpected error."}),r(null)}}),y=((p=u.data)==null?void 0:p.integrations)??[];return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Integrations",description:"Code-registered connectors and destinations. Connect via the CLI, then observe and manage here.",action:o.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>u.refetch(),disabled:u.isFetching,children:[o.jsx(wx,{className:"h-4 w-4"}),u.isFetching?"Refreshing…":"Refresh"]})}),u.isPending?o.jsx(_x,{count:4}):u.isError?o.jsx(St,{error:u.error,onRetry:()=>u.refetch()}):y.length===0?o.jsx(qn,{icon:Zc,title:"No integrations registered",description:"Register a connector or destination in code, then it appears here to connect.",action:o.jsx("a",{href:"https://docs.hogsend.com/docs/guides/events",target:"_blank",rel:"noreferrer",children:o.jsxs(ve,{variant:"outline",size:"sm",children:[o.jsx(wR,{className:"h-4 w-4"}),"Connector docs"]})})}):o.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:y.map(m=>o.jsx(v_,{integration:m,connectInfo:m.id==="discord"?f.data:void 0,onDisconnect:r},m.id))}),o.jsx(Ra,{open:i!==null,onClose:()=>r(null),onConfirm:()=>i&&h.mutate(i.id),title:"Disconnect this integration?",description:i?`Purges all stored credentials for "${i.name}" — the OAuth grant and any derived config. The bot stays in your server until you remove it there. This cannot be undone.`:void 0,confirmLabel:"Disconnect",destructive:!0,loading:h.isPending})]})}function b_({step:n,base:a}){const i=a>0?n.value/a:0,r=i*100;return o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center justify-between text-sm",children:[o.jsx("span",{className:"font-medium text-white/80",children:n.label}),o.jsxs("span",{className:"text-white/60",children:[ct(n.value),a>0?o.jsxs("span",{className:"ml-1 text-xs text-white/50",children:["(",Rl(i),")"]}):null]})]}),o.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-white/[0.06]",children:o.jsx("div",{className:"h-full rounded-full bg-white/40",style:{width:`${Math.min(r,100)}%`}})})]})}function S_({journeyId:n}){const a=We({queryKey:Le.journeyFunnel(n),queryFn:()=>_C(n)});if(a.isPending)return o.jsx(Lt,{className:"h-48 w-full"});if(a.isError)return o.jsx(St,{error:a.error,onRetry:()=>a.refetch()});const i=a.data,r=[{label:"Enrolled",value:i.enrolled},{label:"Email sent",value:i.emailSent},{label:"Opened",value:i.emailOpened},{label:"Clicked",value:i.emailClicked},{label:"Completed",value:i.completed}];return o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"space-y-3",children:r.map(u=>o.jsx(b_,{step:u,base:i.enrolled},u.label))}),o.jsxs("div",{className:"flex gap-4 border-t pt-3 text-sm text-white/60",children:[o.jsxs("span",{children:["Failed: ",ct(i.failed)]}),o.jsxs("span",{children:["Exited: ",ct(i.exited)]})]})]})}function j_(){var N,R;const{toast:n}=yn(),a=Hn(),[i,r]=Q.useState(null),[u,f]=Q.useState(null),h=We({queryKey:Le.journeyMetrics,queryFn:CC}),y=We({queryKey:Le.journeys,queryFn:Tx}),p=Bt({mutationFn:j=>TC(j.id,j.enabled),onSuccess:(j,O)=>{n({title:O.enabled?"Journey enabled":"Journey disabled"}),f(null),a.invalidateQueries({queryKey:Le.journeys}),a.invalidateQueries({queryKey:Le.journeyMetrics})},onError:j=>{n({variant:"error",title:"Update failed",description:j instanceof bt?j.message:"Unexpected error."}),f(null)}}),m=h.isPending||y.isPending,x=h.isError||y.isError,v=new Map((((N=y.data)==null?void 0:N.journeys)??[]).map(j=>[j.id,j.enabled])),b=(((R=h.data)==null?void 0:R.journeys)??[]).map(j=>({...j,enabled:v.get(j.journeyId)??!1})),w=b.find(j=>j.journeyId===i)??null;return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Journeys",description:"Lifecycle journeys, completion rates, and per-journey funnels."}),m?o.jsx(Na,{}):x?o.jsx(St,{error:h.error??y.error,onRetry:()=>{h.refetch(),y.refetch()}}):b.length===0?o.jsx(qn,{title:"No journeys registered",description:"Journeys are defined in code with defineJourney(). Add one to your app, then fire its trigger event from Debug to see it here.",action:o.jsxs(o.Fragment,{children:[o.jsx(Nl,{href:fi.journeys,children:"How to create a journey"}),o.jsx(Nl,{href:fi.recipes,variant:"ghost",children:"Recipes"})]})}):o.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:o.jsxs(_s,{children:[o.jsx(Ts,{children:o.jsxs(Tt,{children:[o.jsx(xe,{children:"Journey"}),o.jsx(xe,{className:"text-right",children:"Enrolled"}),o.jsx(xe,{className:"text-right",children:"Active"}),o.jsx(xe,{className:"text-right",children:"Completed"}),o.jsx(xe,{className:"text-right",children:"Completion"}),o.jsx(xe,{className:"text-right",children:"Avg duration"}),o.jsx(xe,{children:"State"}),o.jsx(xe,{className:"text-right",children:"Action"})]})}),o.jsx(Es,{children:b.map(j=>o.jsxs(Tt,{className:"cursor-pointer","data-state":j.journeyId===i?"selected":void 0,onClick:()=>r(O=>O===j.journeyId?null:j.journeyId),children:[o.jsxs(ge,{children:[o.jsx("span",{className:"font-medium text-white",children:j.name}),o.jsx("span",{className:"block font-mono text-xs text-white/70",children:j.journeyId})]}),o.jsx(ge,{className:"text-right",children:ct(j.enrolled)}),o.jsx(ge,{className:"text-right",children:ct(j.active)}),o.jsx(ge,{className:"text-right",children:ct(j.completed)}),o.jsx(ge,{className:"text-right",children:Rl(j.completionRate)}),o.jsx(ge,{className:"text-right text-white/60",children:Eh(j.avgDurationSecs)}),o.jsx(ge,{children:o.jsx(Me,{variant:j.enabled?"default":"secondary",children:j.enabled?"Enabled":"Disabled"})}),o.jsx(ge,{className:"text-right",children:o.jsx(ve,{variant:"outline",size:"sm",onClick:O=>{O.stopPropagation(),f(j)},children:j.enabled?"Disable":"Enable"})})]},j.journeyId))})]})}),w?o.jsxs(qt,{children:[o.jsx(Ht,{children:o.jsxs(Wt,{children:[w.name," — funnel"]})}),o.jsx(Qt,{children:o.jsx(S_,{journeyId:w.journeyId})})]}):null,o.jsx(Ra,{open:u!==null,onClose:()=>f(null),onConfirm:()=>u&&p.mutate({id:u.journeyId,enabled:!u.enabled}),title:u!=null&&u.enabled?"Disable this journey?":"Enable this journey?",description:u!=null&&u.enabled?"New events will stop enrolling users into this journey.":"New matching events will start enrolling users into this journey.",confirmLabel:u!=null&&u.enabled?"Disable":"Enable",destructive:u==null?void 0:u.enabled,loading:p.isPending})]})}const Cl=Q.forwardRef(({className:n,children:a,...i},r)=>o.jsxs("div",{className:"relative",children:[o.jsx("select",{ref:r,className:Fe("flex h-9 w-full appearance-none rounded-md border border-hairline-faint bg-white/[0.04] px-3 py-1 pr-8 text-sm text-white transition-colors duration-200 hover:border-white/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-50 [&>option]:bg-raised [&>option]:text-white",n),...i,children:a}),o.jsx(yR,{className:"pointer-events-none absolute right-2 top-1/2 h-4 w-4 -translate-y-1/2 text-white/40"})]}));Cl.displayName="Select";const w_=[{value:"",label:"All"},{value:"public",label:"Public"},{value:"personal",label:"Personal"}];function N_(n){try{const a=new URL(n);return a.protocol==="http:"||a.protocol==="https:"}catch{return!1}}function R_({type:n}){return n==="personal"?o.jsx(Me,{variant:"destructive",children:"Personal"}):o.jsx(Me,{variant:"secondary",children:"Public"})}function C_(){var F;const{toast:n}=yn(),a=Hn(),[i,r]=Q.useState(""),[u,f]=Q.useState(!1),[h,y]=Q.useState(null),[p,m]=Q.useState(null),[x,v]=Q.useState(""),[b,w]=Q.useState(""),[N,R]=Q.useState(""),[j,O]=Q.useState("public"),[A,B]=Q.useState(""),T=We({queryKey:Le.links(i),queryFn:()=>ZC(i?{type:i}:void 0),placeholderData:Vc});function q(){v(""),w(""),R(""),O("public"),B("")}const D=N_(x.trim()),z=D&&b.trim().length>0,k=Bt({mutationFn:()=>FC({url:x.trim(),label:b.trim(),type:j,campaign:N.trim()||void 0,distinctId:j==="personal"&&A.trim()?A.trim():void 0}),onSuccess:X=>{f(!1),q(),y(X),a.invalidateQueries({queryKey:["links"]})},onError:X=>{n({variant:"error",title:"Could not create link",description:X instanceof bt?X.message:"Unexpected error."})}}),Y=Bt({mutationFn:X=>IC(X),onSuccess:()=>{n({title:"Link archived"}),m(null),a.invalidateQueries({queryKey:["links"]})},onError:X=>{n({variant:"error",title:"Archive failed",description:X instanceof bt?X.message:"Unexpected error."}),m(null)}});async function W(X){try{await navigator.clipboard.writeText(X),n({title:"Copied to clipboard"})}catch{n({variant:"error",title:"Copy failed"})}}const ee=((F=T.data)==null?void 0:F.links)??[];return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Links",description:"First-party tracked short links — minted outside email, click-tracked the same way.",action:o.jsxs(ve,{onClick:()=>{q(),f(!0)},children:[o.jsx(ch,{className:"h-4 w-4"}),"New link"]})}),o.jsxs("div",{className:"flex max-w-xs flex-col gap-1.5",children:[o.jsx(nt,{htmlFor:"link-type-filter",children:"Type"}),o.jsx(Cl,{id:"link-type-filter",value:i,onChange:X=>r(X.target.value),children:w_.map(X=>o.jsx("option",{value:X.value,children:X.label},X.value))})]}),T.isPending?o.jsx(Na,{}):T.isError?o.jsx(St,{error:T.error,onRetry:()=>T.refetch()}):ee.length===0?o.jsx(qn,{icon:bx,title:"No links yet",description:"Mint a tracked short link to share anywhere — every click is recorded.",action:o.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>{q(),f(!0)},children:[o.jsx(ch,{className:"h-4 w-4"}),"New link"]})}):o.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:o.jsxs(_s,{children:[o.jsx(Ts,{children:o.jsxs(Tt,{children:[o.jsx(xe,{children:"Label"}),o.jsx(xe,{children:"Type"}),o.jsx(xe,{children:"Campaign"}),o.jsx(xe,{children:"Source"}),o.jsx(xe,{className:"text-right",children:"Clicks"}),o.jsx(xe,{children:"Short link"}),o.jsx(xe,{children:"Created"}),o.jsx(xe,{className:"text-right",children:"Action"})]})}),o.jsx(Es,{children:ee.map(X=>{const te=X.url,fe=te.replace(/^https?:\/\/[^/]+/,"");return o.jsxs(Tt,{children:[o.jsx(ge,{className:"font-medium text-white",children:o.jsxs("div",{className:"flex flex-col gap-0.5",children:[o.jsx("span",{children:X.label??"—"}),o.jsx("span",{className:"font-normal text-white/40 text-xs",children:Mx(X.originalUrl,56)})]})}),o.jsx(ge,{children:o.jsx(R_,{type:X.type})}),o.jsx(ge,{className:"text-white/70",children:X.campaign??"—"}),o.jsx(ge,{children:X.source?o.jsx(Me,{variant:"outline",children:X.source}):o.jsx("span",{className:"text-white/40",children:"—"})}),o.jsx(ge,{className:"text-right text-white/80",children:ct(X.clickCount)}),o.jsx(ge,{children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("code",{className:"rounded border border-hairline-faint bg-white/[0.04] px-1.5 py-0.5 font-mono text-white/70 text-xs",children:fe}),o.jsx(ve,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>W(te),"aria-label":"Copy short link",children:o.jsx(Hr,{className:"h-3.5 w-3.5"})})]})}),o.jsx(ge,{className:"text-white/60",children:mn(X.createdAt)}),o.jsx(ge,{className:"text-right",children:o.jsx(ve,{variant:"outline",size:"sm",onClick:()=>m(X),children:"Archive"})})]},X.id)})})]})}),o.jsxs(wl,{open:u,onClose:()=>f(!1),title:"New tracked link",description:"Mint a first-party short link. Clicks are recorded the same way as email links.",footer:o.jsxs(o.Fragment,{children:[o.jsx(ve,{variant:"outline",onClick:()=>f(!1),children:"Cancel"}),o.jsx(ve,{onClick:()=>k.mutate(),disabled:!z||k.isPending,children:k.isPending?"Creating…":"Create link"})]}),children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"link-url",children:"Destination URL"}),o.jsx(lt,{id:"link-url",placeholder:"https://hogsend.com/pricing",value:x,onChange:X=>v(X.target.value)}),x.trim()&&!D?o.jsx("p",{className:"text-accent text-xs",children:"Must be a valid http(s) URL."}):null]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"link-label",children:"Label"}),o.jsx(lt,{id:"link-label",placeholder:"Pricing CTA — June launch",value:b,onChange:X=>w(X.target.value)})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"link-campaign",children:"Campaign (optional)"}),o.jsx(lt,{id:"link-campaign",placeholder:"june-launch",value:N,onChange:X=>R(X.target.value)})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"link-type",children:"Type"}),o.jsxs(Cl,{id:"link-type",value:j,onChange:X=>O(X.target.value),children:[o.jsx("option",{value:"public",children:"Public — safe to share anywhere"}),o.jsx("option",{value:"personal",children:"Personal — single recipient"})]})]}),j==="personal"?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-accent/40 bg-accent-tint p-3 text-accent text-xs",children:[o.jsx(Hv,{className:"mt-0.5 h-4 w-4 shrink-0"}),o.jsx("span",{children:"Single-recipient only — do not share. A personal link carries an identity token, so a forwarded link would attribute the wrong person."})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"link-distinct-id",children:"Recipient distinct ID (optional)"}),o.jsx(lt,{id:"link-distinct-id",placeholder:"user_123 or email",value:A,onChange:X=>B(X.target.value)}),o.jsx("p",{className:"text-white/40 text-xs",children:"Attaches this link's clicks to a known person. Ignored for public links."})]})]}):null]}),o.jsx(wl,{open:h!==null,onClose:()=>y(null),title:"Link created",description:"Share this short URL — every click is tracked first-party.",footer:o.jsx(ve,{onClick:()=>y(null),children:"Done"}),children:h?o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{children:"Short URL"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("code",{className:"flex-1 break-all rounded-md border border-hairline-faint bg-white/[0.04] px-3 py-2 font-mono text-white/90 text-xs",children:h.url}),o.jsx(ve,{variant:"outline",size:"icon",onClick:()=>W(h.url),"aria-label":"Copy short URL",children:o.jsx(Hr,{className:"h-4 w-4"})})]})]}),h.type==="personal"?o.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-accent/40 bg-accent-tint p-3 text-accent text-xs",children:[o.jsx(Hv,{className:"mt-0.5 h-4 w-4 shrink-0"}),o.jsx("span",{children:"This is a personal link — send it to one recipient only. Do not post it publicly."})]}):null]}):null}),o.jsx(Ra,{open:p!==null,onClose:()=>m(null),onConfirm:()=>p&&Y.mutate(p.id),title:"Archive this link?",description:p?`"${p.label??p.originalUrl}" will be hidden from the list. The short URL keeps redirecting and existing clicks are kept.`:void 0,confirmLabel:"Archive",loading:Y.isPending})]})}function Fa({label:n,value:a,hint:i,icon:r}){return o.jsxs(qt,{children:[o.jsxs(Ht,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx("span",{className:"eyebrow text-white/50",children:n}),r?o.jsx(r,{strokeWidth:1.5,className:"h-4 w-4 text-white/30"}):null]}),o.jsxs(Qt,{children:[o.jsx("div",{className:"font-display text-[28px] leading-none text-white tracking-[-0.02em]",children:a}),i?o.jsx("p",{className:"mt-2 text-xs text-white/50",children:i}):null]})]})}function __(n){return n.totalContacts===0&&n.activeJourneys===0&&n.emailsSent30d===0}function T_(){return o.jsxs(qt,{className:"border-accent/40 bg-accent-tint hover:border-accent/40",children:[o.jsxs(Ht,{children:[o.jsx(Wt,{className:"text-base",children:"Welcome to Hogsend Studio"}),o.jsx(ja,{children:"Studio observes your code-first lifecycle engine. Here's the path to your first running journey."})]}),o.jsxs(Qt,{className:"space-y-4",children:[o.jsxs("ol",{className:"space-y-1.5 text-sm text-white/60",children:[o.jsxs("li",{children:[o.jsx("span",{className:"font-medium text-white",children:"1."})," Define a journey in code and start the worker."]}),o.jsxs("li",{children:[o.jsx("span",{className:"font-medium text-white",children:"2."})," Fire its trigger event to enrol a test user."]}),o.jsxs("li",{children:[o.jsx("span",{className:"font-medium text-white",children:"3."})," Watch enrolments, sends, and exits land here."]})]}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs(jl,{to:"/debug",className:Fe(Nh({size:"sm"})),children:[o.jsx(Th,{className:"h-4 w-4"}),"Send a test event"]}),o.jsx(Nl,{href:fi.quickstart,children:"Quickstart"}),o.jsx(Nl,{href:fi.journeys,variant:"ghost",children:"Create a journey"})]})]})]})}function E_(){const n=We({queryKey:Le.overview,queryFn:vC});return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Overview",description:"Key delivery and engagement metrics at a glance."}),n.isPending?o.jsx(_x,{count:6}):n.isError?o.jsx(St,{error:n.error,onRetry:()=>n.refetch()}):o.jsxs(o.Fragment,{children:[__(n.data)?o.jsx(T_,{}):null,o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[o.jsx(Fa,{label:"Total contacts",value:ct(n.data.totalContacts),icon:Rx}),o.jsx(Fa,{label:"Active journeys",value:ct(n.data.activeJourneys),hint:"Instances active or waiting",icon:Ch}),o.jsx(Fa,{label:"Sent (24h)",value:ct(n.data.emailsSent24h),icon:Xr}),o.jsx(Fa,{label:"Sent (7d)",value:ct(n.data.emailsSent7d),icon:qv}),o.jsx(Fa,{label:"Sent (30d)",value:ct(n.data.emailsSent30d),icon:qv}),o.jsx(Fa,{label:"Bounce rate (30d)",value:Rl(n.data.bounceRate30d),hint:"Bounced / sent in last 30 days",icon:Sx})]}),o.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:o.jsx(Fa,{label:"Unsubscribe rate",value:Rl(n.data.unsubscribeRate),hint:"Unsubscribed / total preferences",icon:iC})})]})]})}const M_={queued:Nx,sent:Xr,delivered:mR,opened:RR,clicked:PR,bounced:Sx,complained:gx,failed:xx};function A_({event:n}){const a=M_[n.type]??Nx;return o.jsxs("li",{className:"flex gap-3",children:[o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-full border border-hairline-faint bg-white/[0.04]",children:o.jsx(a,{strokeWidth:1.5,className:"h-3.5 w-3.5 text-white/50"})}),o.jsx("span",{className:"w-px flex-1 bg-white/[0.08]"})]}),o.jsxs("div",{className:"pb-4",children:[o.jsx("p",{className:"text-sm font-medium capitalize text-white",children:n.type}),o.jsx("p",{className:"text-xs text-white/50",children:mn(n.timestamp)}),n.url?o.jsx("p",{className:"mt-0.5 break-all text-xs text-white/50",children:n.url}):null]})]})}function aa({label:n,value:a,mono:i=!1}){return o.jsxs("div",{className:"space-y-0.5",children:[o.jsx("dt",{className:"text-xs text-white/50",children:n}),o.jsx("dd",{className:i?"break-all font-mono text-xs text-white/70":"break-all text-sm text-white",children:a})]})}function k_({emailId:n,onClose:a}){const i=n!==null,{toast:r}=yn(),u=Hn(),[f,h]=Q.useState(!1),y=We({queryKey:n?Le.email(n):["email","none"],queryFn:()=>bC(n),enabled:i}),p=Bt({mutationFn:()=>SC(n),onSuccess:()=>{r({title:"Resend queued",description:"A fresh send was queued from this template."}),h(!1),u.invalidateQueries({queryKey:["emails"]}),n&&u.invalidateQueries({queryKey:Le.email(n)})},onError:v=>{r({variant:"error",title:"Resend failed",description:v instanceof bt?v.message:"Unexpected error."}),h(!1)}}),m=y.data,x=m&&["failed","bounced"].includes(m.email.status);return o.jsxs(o.Fragment,{children:[o.jsx(Ax,{open:i,onClose:a,title:"Email send",description:m==null?void 0:m.email.subject,children:y.isPending?o.jsxs("div",{className:"space-y-4",children:[o.jsx(Lt,{className:"h-24 w-full"}),o.jsx(Lt,{className:"h-40 w-full"})]}):y.isError?o.jsx(St,{error:y.error,onRetry:()=>y.refetch()}):m?o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx(Zr,{status:m.email.status}),x?o.jsxs(ve,{size:"sm",variant:"outline",onClick:()=>h(!0),children:[o.jsx(Xr,{className:"h-4 w-4"}),"Resend"]}):null]}),o.jsxs("dl",{className:"grid grid-cols-2 gap-4",children:[o.jsx(aa,{label:"To",value:m.email.toEmail,mono:!0}),o.jsx(aa,{label:"From",value:m.email.fromEmail,mono:!0}),o.jsx(aa,{label:"Template",value:m.email.templateKey??"—"}),o.jsx(aa,{label:"Category",value:m.email.category??"—"}),o.jsx(aa,{label:"Journey",value:m.email.journeyId??"—",mono:!0}),o.jsx(aa,{label:"User",value:m.email.userId??"—",mono:!0}),o.jsx(aa,{label:"Message ID",value:m.email.messageId??"—",mono:!0}),o.jsx(aa,{label:"Created",value:mn(m.email.createdAt)})]}),o.jsxs("section",{children:[o.jsx("h3",{className:"eyebrow mb-3 text-white/50",children:"Timeline"}),m.events.length===0?o.jsx("p",{className:"text-sm text-white/60",children:"No delivery events recorded yet."}):o.jsx("ul",{className:"[&>li:last-child>div:first-child>span:last-child]:hidden",children:m.events.map((v,b)=>o.jsx(A_,{event:v},`${v.type}-${v.timestamp}-${b}`))})]}),o.jsxs("section",{children:[o.jsxs("h3",{className:"eyebrow mb-3 text-white/50",children:["Tracked links (",m.trackedLinks.length,")"]}),m.trackedLinks.length===0?o.jsx("p",{className:"text-sm text-white/60",children:"No tracked links in this email."}):o.jsx("ul",{className:"space-y-2",children:m.trackedLinks.map(v=>o.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border bg-white/[0.015] p-3",children:[o.jsx("span",{className:"break-all text-sm text-white/80",children:v.originalUrl}),o.jsxs("span",{className:"shrink-0 text-xs text-white/50",children:[v.clickCount," click",v.clickCount===1?"":"s"]})]},v.id))})]})]}):null}),o.jsx(Ra,{open:f,onClose:()=>h(!1),onConfirm:()=>p.mutate(),title:"Resend this email?",description:"A new send will be queued from the original template and recipient.",confirmLabel:"Resend",loading:p.isPending})]})}const O_=["queued","rendered","sent","delivered","opened","clicked","bounced","complained","failed"],z_=["opened","clicked","bounced","complained"],Mr=25,Vv={templateKey:"",status:"",engagement:"",journeyId:"",userId:"",from:"",to:""};function D_(){var T,q;const[n,a]=Q.useState(Vv),[i,r]=Q.useState("createdAt"),[u,f]=Q.useState("desc"),[h,y]=Q.useState(0),[p,m]=Q.useState(null),x=n.from?new Date(`${n.from}T00:00:00`).toISOString():void 0,v=n.to?new Date(`${n.to}T23:59:59`).toISOString():void 0,b={limit:Mr,offset:h,templateKey:n.templateKey||void 0,status:n.status||void 0,engagement:n.engagement||void 0,journeyId:n.journeyId||void 0,userId:n.userId||void 0,from:x,to:v,sort:i,order:u},w=We({queryKey:Le.emails(b),queryFn:()=>xC(b),placeholderData:Vc});function N(D){a(z=>({...z,...D})),y(0)}function R(D){i===D?f(z=>z==="asc"?"desc":"asc"):(r(D),f("desc")),y(0)}const j=Object.values(n).some(Boolean),O=((T=w.data)==null?void 0:T.total)??0,A=((q=w.data)==null?void 0:q.emails)??[];function B({column:D,label:z}){const k=i===D;return o.jsx(xe,{children:o.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 transition-colors duration-200 hover:text-white",onClick:()=>R(D),children:[z,k?u==="asc"?o.jsx(rR,{className:"h-3 w-3"}):o.jsx(aR,{className:"h-3 w-3"}):null]})})}return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Sends",description:"Every email sent — filter, sort, and drill into the timeline."}),o.jsxs("div",{className:"grid gap-3 rounded-lg border bg-white/[0.015] p-4 md:grid-cols-3 lg:grid-cols-4",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"f-template",children:"Template"}),o.jsx(lt,{id:"f-template",placeholder:"template key",value:n.templateKey,onChange:D=>N({templateKey:D.target.value})})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"f-status",children:"Status"}),o.jsxs(Cl,{id:"f-status",value:n.status,onChange:D=>N({status:D.target.value}),children:[o.jsx("option",{value:"",children:"All"}),O_.map(D=>o.jsx("option",{value:D,children:D},D))]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"f-engagement",children:"Engagement"}),o.jsxs(Cl,{id:"f-engagement",value:n.engagement,onChange:D=>N({engagement:D.target.value}),children:[o.jsx("option",{value:"",children:"Any"}),z_.map(D=>o.jsx("option",{value:D,children:D},D))]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"f-journey",children:"Journey ID"}),o.jsx(lt,{id:"f-journey",placeholder:"journey id",value:n.journeyId,onChange:D=>N({journeyId:D.target.value})})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"f-user",children:"User ID"}),o.jsx(lt,{id:"f-user",placeholder:"user id",value:n.userId,onChange:D=>N({userId:D.target.value})})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"f-from",children:"From"}),o.jsx(lt,{id:"f-from",type:"date",value:n.from,onChange:D=>N({from:D.target.value})})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"f-to",children:"To"}),o.jsx(lt,{id:"f-to",type:"date",value:n.to,onChange:D=>N({to:D.target.value})})]}),j?o.jsx("div",{className:"flex items-end",children:o.jsx(ve,{variant:"ghost",size:"sm",onClick:()=>{a(Vv),y(0)},children:"Clear filters"})}):null]}),w.isPending?o.jsx(Na,{}):w.isError?o.jsx(St,{error:w.error,onRetry:()=>w.refetch()}):A.length===0?o.jsx(qn,{title:"No sends found",description:j?"Try widening or clearing your filters.":"Emails will appear here once your journeys start sending."}):o.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:o.jsxs(_s,{children:[o.jsx(Ts,{children:o.jsxs(Tt,{children:[o.jsx(xe,{children:"Recipient"}),o.jsx(xe,{children:"Subject"}),o.jsx(xe,{children:"Template"}),o.jsx(xe,{children:"Status"}),o.jsx(B,{column:"sentAt",label:"Sent"}),o.jsx(B,{column:"createdAt",label:"Created"})]})}),o.jsx(Es,{children:A.map(D=>o.jsxs(Tt,{className:"cursor-pointer",onClick:()=>m(D.id),children:[o.jsx(ge,{className:"font-medium text-white",children:D.toEmail}),o.jsx(ge,{className:"text-white/80",children:Mx(D.subject,40)}),o.jsx(ge,{className:"text-white/60",children:D.templateKey??"—"}),o.jsx(ge,{children:o.jsx(Zr,{status:D.status})}),o.jsx(ge,{className:"text-white/60",children:mn(D.sentAt)}),o.jsx(ge,{className:"text-white/60",children:mn(D.createdAt)})]},D.id))})]})}),O>0?o.jsxs("div",{className:"flex items-center justify-between text-sm text-white/60",children:[o.jsxs("span",{children:[h+1,"–",Math.min(h+Mr,O)," of ",O]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(ve,{variant:"outline",size:"sm",disabled:h===0,onClick:()=>y(D=>Math.max(0,D-Mr)),children:"Previous"}),o.jsx(ve,{variant:"outline",size:"sm",disabled:h+Mr>=O,onClick:()=>y(D=>D+Mr),children:"Next"})]})]}):null,o.jsx(k_,{emailId:p,onClose:()=>m(null)})]})}const U_=["read","journey-admin","full-admin"];function L_(){var A;const{toast:n}=yn(),a=Hn(),[i,r]=Q.useState(!1),[u,f]=Q.useState(""),[h,y]=Q.useState(["read"]),[p,m]=Q.useState(null),[x,v]=Q.useState(null),b=We({queryKey:Le.apiKeys,queryFn:qC}),w=Bt({mutationFn:()=>HC({name:u.trim(),scopes:h}),onSuccess:B=>{r(!1),f(""),y(["read"]),m(B),a.invalidateQueries({queryKey:Le.apiKeys})},onError:B=>{n({variant:"error",title:"Could not create key",description:B instanceof bt?B.message:"Unexpected error."})}}),N=Bt({mutationFn:B=>QC(B),onSuccess:()=>{n({title:"API key revoked"}),v(null),a.invalidateQueries({queryKey:Le.apiKeys})},onError:B=>{n({variant:"error",title:"Revoke failed",description:B instanceof bt?B.message:"Unexpected error."}),v(null)}});function R(B){y(T=>T.includes(B)?T.filter(q=>q!==B):[...T,B])}async function j(B){try{await navigator.clipboard.writeText(B),n({title:"Copied to clipboard"})}catch{n({variant:"error",title:"Copy failed"})}}const O=((A=b.data)==null?void 0:A.keys)??[];return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Settings",description:"API keys for programmatic access to the Hogsend admin API.",action:o.jsxs(ve,{onClick:()=>r(!0),children:[o.jsx(ch,{className:"h-4 w-4"}),"New API key"]})}),b.isPending?o.jsx(Na,{}):b.isError?o.jsx(St,{error:b.error,onRetry:()=>b.refetch()}):O.length===0?o.jsx(qn,{icon:OR,title:"No API keys",description:"Create a key to authenticate API and webhook requests."}):o.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:o.jsxs(_s,{children:[o.jsx(Ts,{children:o.jsxs(Tt,{children:[o.jsx(xe,{children:"Name"}),o.jsx(xe,{children:"Prefix"}),o.jsx(xe,{children:"Scopes"}),o.jsx(xe,{children:"Last used"}),o.jsx(xe,{children:"Status"}),o.jsx(xe,{className:"text-right",children:"Action"})]})}),o.jsx(Es,{children:O.map(B=>{const T=B.revokedAt!==null;return o.jsxs(Tt,{children:[o.jsx(ge,{className:"font-medium text-white",children:B.name}),o.jsxs(ge,{className:"font-mono text-xs text-white/70",children:[B.keyPrefix,"…"]}),o.jsx(ge,{children:o.jsx("div",{className:"flex flex-wrap gap-1",children:B.scopes.map(q=>o.jsx(Me,{variant:"secondary",children:q},q))})}),o.jsx(ge,{className:"text-white/60",children:mn(B.lastUsedAt)}),o.jsx(ge,{children:T?o.jsx(Me,{variant:"destructive",children:"Revoked"}):o.jsx(Me,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Active"})}),o.jsx(ge,{className:"text-right",children:T?null:o.jsx(ve,{variant:"outline",size:"sm",onClick:()=>v(B),children:"Revoke"})})]},B.id)})})]})}),o.jsxs(wl,{open:i,onClose:()=>r(!1),title:"Create API key",description:"Choose a descriptive name and the scopes this key needs.",footer:o.jsxs(o.Fragment,{children:[o.jsx(ve,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),o.jsx(ve,{onClick:()=>w.mutate(),disabled:!u.trim()||h.length===0||w.isPending,children:w.isPending?"Creating…":"Create key"})]}),children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"key-name",children:"Name"}),o.jsx(lt,{id:"key-name",placeholder:"CI ingest key",value:u,onChange:B=>f(B.target.value)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(nt,{children:"Scopes"}),o.jsx("div",{className:"flex flex-col gap-2",children:U_.map(B=>o.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/80",htmlFor:`scope-${B}`,children:[o.jsx("input",{id:`scope-${B}`,type:"checkbox",className:"h-4 w-4 rounded border-hairline-faint accent-accent",checked:h.includes(B),onChange:()=>R(B)}),B]},B))})]})]}),o.jsx(wl,{open:p!==null,onClose:()=>m(null),title:"API key created",description:"Copy this key now — it will not be shown again.",footer:o.jsx(ve,{onClick:()=>m(null),children:"Done"}),children:p?o.jsxs("div",{className:"space-y-2",children:[o.jsx(nt,{children:"Secret key"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("code",{className:"flex-1 break-all rounded-md border border-hairline-faint bg-white/[0.04] px-3 py-2 font-mono text-xs text-white/90",children:p.key}),o.jsx(ve,{variant:"outline",size:"icon",onClick:()=>j(p.key),"aria-label":"Copy key",children:o.jsx(Hr,{className:"h-4 w-4"})})]})]}):null}),o.jsx(Ra,{open:x!==null,onClose:()=>v(null),onConfirm:()=>x&&N.mutate(x.id),title:"Revoke this API key?",description:x?`"${x.name}" will stop working immediately. This cannot be undone.`:void 0,confirmLabel:"Revoke",destructive:!0,loading:N.isPending})]})}const B_=/^([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/i,q_={verified:{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80"},pending:{variant:"secondary"},failed:{variant:"destructive"},not_found:{variant:"outline"}};function H_({state:n}){const a=q_[n];return o.jsx(Me,{variant:a.variant,className:a.className,children:n.replace("_"," ")})}function Q_({testMode:n}){return n.active?o.jsxs("div",{className:"rounded-md border border-accent/40 bg-accent-tint p-4 text-sm",children:[o.jsxs("p",{className:"font-medium text-accent",children:["Test mode is active",n.reason==="domain_unverified"?" — sending domain not verified":n.reason==="env_flag"?" — forced via HOGSEND_TEST_MODE":""]}),o.jsxs("p",{className:"mt-1 text-white/60",children:[n.redirectTo?`All sends are redirected to ${n.redirectTo}.`:"No redirect address is configured — sends will fail until one is set.",n.fromOverride?` From address is overridden to ${n.fromOverride}.`:""]})]}):null}function Yv({value:n}){const{toast:a}=yn();return o.jsx(ve,{variant:"ghost",size:"sm","aria-label":"Copy value",onClick:()=>{navigator.clipboard.writeText(n).then(()=>{a({title:"Copied",description:"Value copied to clipboard."})})},children:o.jsx(Hr,{className:"h-3.5 w-3.5",strokeWidth:1.5})})}function G_({onSubmit:n,loading:a}){const[i,r]=Q.useState(""),u=B_.test(i);return o.jsxs("form",{className:"flex max-w-md items-end gap-2",onSubmit:f=>{f.preventDefault(),u&&n(i.toLowerCase())},children:[o.jsxs("div",{className:"flex flex-1 flex-col gap-1.5",children:[o.jsx(nt,{htmlFor:"setup-domain",children:"Sending domain"}),o.jsx(lt,{id:"setup-domain",placeholder:"mysite.com",value:i,onChange:f=>r(f.target.value)})]}),o.jsx(ve,{type:"submit",disabled:!u||a,children:a?"Adding…":"Add domain"})]})}function P_(){var v,b,w;const{toast:n}=yn(),a=Hn(),i=We({queryKey:Le.domain,queryFn:()=>Qv()}),r=N=>{a.setQueryData(Le.domain,N)},u=N=>R=>{n({variant:"error",title:N,description:R instanceof bt?R.status===501?"The active email provider does not support domain management.":R.message:"Unexpected error."})},f=Bt({mutationFn:()=>Qv(!0),onSuccess:r,onError:u("Re-check failed")}),h=Bt({mutationFn:()=>VC(),onSuccess:N=>{var R;r(N),n({title:"Verification pass triggered",description:((R=N.status)==null?void 0:R.state)==="verified"?"Domain is verified.":"DNS can take a few minutes — re-check shortly."})},onError:u("Verify failed")}),y=Bt({mutationFn:N=>PC(N),onSuccess:N=>{r(N),n({title:"Domain registered",description:"Add the DNS records below at your DNS host."})},onError:u("Add domain failed")}),p=i.data,m=((v=p==null?void 0:p.status)==null?void 0:v.records)??[],x=(p==null?void 0:p.supported)===!0&&(p.status===null||p.status.state==="not_found");return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Setup",description:"Sending-domain verification — DNS records, status, and test mode.",action:p!=null&&p.supported?o.jsxs("div",{className:"flex gap-2",children:[o.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>f.mutate(),disabled:f.isPending,children:[o.jsx(wx,{className:"h-4 w-4"}),f.isPending?"Checking…":"Re-check"]}),p.domain?o.jsxs(ve,{size:"sm",onClick:()=>h.mutate(),disabled:h.isPending,children:[o.jsx(WR,{className:"h-4 w-4"}),h.isPending?"Verifying…":"Verify"]}):null]}):null}),i.isPending?o.jsx(Na,{}):i.isError?o.jsx(St,{error:i.error,onRetry:()=>i.refetch()}):p?p.supported?o.jsxs(o.Fragment,{children:[o.jsx(Q_,{testMode:p.testMode}),o.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2 rounded-lg border bg-white/[0.015] p-4 text-sm",children:[o.jsxs("span",{children:[o.jsx("span",{className:"text-white/60",children:"Domain: "}),o.jsx("span",{className:"font-medium text-white",children:p.domain??"not configured"})]}),o.jsxs("span",{children:[o.jsx("span",{className:"text-white/60",children:"Provider: "}),o.jsx("span",{className:"font-medium text-white",children:p.providerId})]}),o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-white/60",children:"State:"}),o.jsx(H_,{state:((b=p.status)==null?void 0:b.state)??"not_found"})]}),(w=p.status)!=null&&w.checkedAt?o.jsxs("span",{className:"text-white/50",children:["Checked ",mn(p.status.checkedAt)]}):null]}),x?o.jsxs("div",{className:"space-y-3",children:[o.jsx("p",{className:"text-sm text-white/60",children:p.domain?`${p.domain} isn't registered with ${p.providerId} yet — add it to get the DNS records.`:"No sending domain configured. Add one to get the DNS records to verify."}),o.jsx(G_,{onSubmit:N=>y.mutate(N),loading:y.isPending})]}):null,m.length>0?o.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:o.jsxs(_s,{children:[o.jsx(Ts,{children:o.jsxs(Tt,{children:[o.jsx(xe,{children:"Type"}),o.jsx(xe,{children:"Name"}),o.jsx(xe,{children:"Value"}),o.jsx(xe,{className:"text-right",children:"Priority"}),o.jsx(xe,{children:"Purpose"}),o.jsx(xe,{children:"Status"})]})}),o.jsx(Es,{children:m.map(N=>o.jsxs(Tt,{children:[o.jsx(ge,{className:"font-medium text-white",children:N.type}),o.jsx(ge,{className:"font-mono text-xs text-white/70",children:o.jsxs("span",{className:"flex items-center gap-1",children:[N.name,o.jsx(Yv,{value:N.name})]})}),o.jsx(ge,{className:"max-w-[18rem] font-mono text-xs text-white/70",children:o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("span",{className:"truncate",title:N.value,children:N.value}),o.jsx(Yv,{value:N.value})]})}),o.jsx(ge,{className:"text-right text-white/60",children:N.priority??""}),o.jsx(ge,{className:"text-white/60",children:N.purpose}),o.jsx(ge,{children:o.jsx(Zr,{status:N.status})})]},`${N.type}-${N.name}-${N.value}`))})]})}):x?null:o.jsx(qn,{icon:oh,title:"No DNS records yet",description:"The provider hasn't reported any DNS records for this domain. Re-check, or verify it in the provider dashboard."})]}):o.jsx(qn,{icon:oh,title:"Domain management not supported",description:`The active email provider (${p.providerId}) does not expose a domains API. Verify your sending domain in the provider's own dashboard instead.`}):null]})}const V_=[{value:"",label:"All"},{value:"bounced",label:"Bounced"},{value:"unsubscribed",label:"Unsubscribed"},{value:"complained",label:"Complained"}];function Y_({row:n}){return o.jsxs("div",{className:"flex flex-wrap gap-1",children:[n.unsubscribedAll?o.jsx(Me,{variant:"destructive",children:"Unsubscribed"}):null,n.bounceCount>0?o.jsxs(Me,{variant:"secondary",children:[ct(n.bounceCount)," bounce"]}):null,n.suppressed&&n.bounceCount===0&&!n.unsubscribedAll?o.jsx(Me,{variant:"destructive",children:"Complained"}):null,n.suppressed&&!n.unsubscribedAll&&n.bounceCount>0?o.jsx(Me,{variant:"destructive",children:"Suppressed"}):null]})}function K_(){var m;const{toast:n}=yn(),a=Hn(),[i,r]=Q.useState(""),[u,f]=Q.useState(null),h=We({queryKey:Le.suppressions(i),queryFn:()=>BC(i||void 0),placeholderData:Vc}),y=Bt({mutationFn:x=>Ex(x.userId,{suppressed:!1,unsubscribedAll:!1}),onSuccess:()=>{n({title:"Recipient restored",description:"They can receive emails again."}),f(null),a.invalidateQueries({queryKey:["suppressions"]})},onError:x=>{n({variant:"error",title:"Un-suppress failed",description:x instanceof bt?x.message:"Unexpected error."}),f(null)}}),p=((m=h.data)==null?void 0:m.suppressions)??[];return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Suppressions",description:"Bounced, unsubscribed, and complained recipients."}),o.jsxs("div",{className:"flex max-w-xs flex-col gap-1.5",children:[o.jsx(nt,{htmlFor:"supp-type",children:"Type"}),o.jsx(Cl,{id:"supp-type",value:i,onChange:x=>r(x.target.value),children:V_.map(x=>o.jsx("option",{value:x.value,children:x.label},x.value))})]}),h.isPending?o.jsx(Na,{}):h.isError?o.jsx(St,{error:h.error,onRetry:()=>h.refetch()}):p.length===0?o.jsx(qn,{title:"No suppressions",description:"Recipients who bounce, unsubscribe, or complain appear here."}):o.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:o.jsxs(_s,{children:[o.jsx(Ts,{children:o.jsxs(Tt,{children:[o.jsx(xe,{children:"Email"}),o.jsx(xe,{children:"User ID"}),o.jsx(xe,{children:"Reason"}),o.jsx(xe,{className:"text-right",children:"Suppressed"}),o.jsx(xe,{className:"text-right",children:"Action"})]})}),o.jsx(Es,{children:p.map(x=>o.jsxs(Tt,{children:[o.jsx(ge,{className:"font-medium text-white",children:x.email}),o.jsx(ge,{className:"font-mono text-xs text-white/70",children:x.userId}),o.jsx(ge,{children:o.jsx(Y_,{row:x})}),o.jsx(ge,{className:"text-right text-white/60",children:mn(x.suppressedAt)}),o.jsx(ge,{className:"text-right",children:o.jsx(ve,{variant:"outline",size:"sm",onClick:()=>f(x),children:"Un-suppress"})})]},x.id))})]})}),o.jsx(Ra,{open:u!==null,onClose:()=>f(null),onConfirm:()=>u&&y.mutate(u),title:"Un-suppress this recipient?",description:u?`${u.email} will be eligible to receive emails again.`:void 0,confirmLabel:"Un-suppress",loading:y.isPending})]})}function Rc({label:n,value:a}){return o.jsxs("div",{className:"rounded-md border border-hairline-faint bg-white/[0.015] p-3",children:[o.jsx("p",{className:"eyebrow text-white/50",children:n}),o.jsx("p",{className:"mt-2 font-display text-lg text-white tracking-[-0.02em]",children:a})]})}function X_({template:n}){const{toast:a}=yn(),[i,r]=Q.useState(!1),[u,f]=Q.useState(""),h=We({queryKey:Le.templatePreview(n.key),queryFn:()=>wC(n.key)}),y=We({queryKey:Le.templateReport(n.key),queryFn:()=>RC(n.key),retry:(x,v)=>!(v instanceof bt&&v.status===404)&&x<2}),p=Bt({mutationFn:()=>NC(n.key,u),onSuccess:x=>{a({title:"Test email sent",description:`Status: ${x.status}.`}),r(!1),f("")},onError:x=>{a({variant:"error",title:"Send-test failed",description:x instanceof bt?x.message:"Unexpected error."})}}),m=y.isError&&y.error instanceof bt&&y.error.status===404;return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h2",{className:"font-display text-xl text-white tracking-[-0.02em]",children:n.key}),n.category?o.jsx(Me,{variant:"secondary",children:n.category}):null]}),o.jsx("p",{className:"text-sm text-white/60",children:n.defaultSubject})]}),o.jsxs(ve,{onClick:()=>r(!0),children:[o.jsx(Xr,{className:"h-4 w-4"}),"Send test"]})]}),o.jsxs("section",{className:"space-y-3",children:[o.jsx("h3",{className:"eyebrow text-white/50",children:"Performance"}),y.isPending?o.jsx(Lt,{className:"h-28 w-full"}):m?o.jsx("p",{className:"rounded-md border border-dashed border-white/15 p-6 text-center text-sm text-white/60",children:"This template has never been sent."}):y.isError?o.jsx(St,{error:y.error,onRetry:()=>y.refetch()}):y.data?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[o.jsx(Rc,{label:"Sent",value:ct(y.data.totals.sent)}),o.jsx(Rc,{label:"Delivered",value:ct(y.data.totals.delivered)}),o.jsx(Rc,{label:"Open rate",value:Rl(y.data.totals.openRate)}),o.jsx(Rc,{label:"Click rate",value:Rl(y.data.totals.clickRate)})]}),o.jsxs(qt,{children:[o.jsx(Ht,{className:"pb-2",children:o.jsx(Wt,{className:"eyebrow text-white/50",children:"Sends over time"})}),o.jsx(Qt,{children:o.jsx(uh,{label:"sent",data:y.data.series.map(x=>({date:x.date,value:x.sent}))})})]})]}):null]}),o.jsxs("section",{className:"space-y-3",children:[o.jsx("h3",{className:"eyebrow text-white/50",children:"Preview"}),h.isPending?o.jsx(Lt,{className:"h-96 w-full"}):h.isError?o.jsx(St,{error:h.error,onRetry:()=>h.refetch()}):h.data?o.jsx("div",{className:"overflow-hidden rounded-lg border bg-white",children:o.jsx("iframe",{title:`${n.key} preview`,srcDoc:h.data.html,sandbox:"",className:"h-[600px] w-full"})}):null]}),o.jsx(wl,{open:i,onClose:()=>r(!1),title:"Send a test email",description:`Sends "${n.key}" with example props.`,footer:o.jsxs(o.Fragment,{children:[o.jsx(ve,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),o.jsx(ve,{onClick:()=>p.mutate(),disabled:!u||p.isPending,children:p.isPending?"Sending…":"Send test"})]}),children:o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(nt,{htmlFor:"test-to",children:"Recipient email"}),o.jsx(lt,{id:"test-to",type:"email",placeholder:"you@example.com",value:u,onChange:x=>f(x.target.value)})]})})]})}function Z_(){var f;const n=We({queryKey:Le.templates,queryFn:jC}),[a,i]=Q.useState(null),r=((f=n.data)==null?void 0:f.templates)??[];Q.useEffect(()=>{const h=r[0];a===null&&h&&i(h.key)},[a,r]);const u=r.find(h=>h.key===a)??null;return o.jsxs("div",{className:"space-y-6",children:[o.jsx(An,{title:"Templates",description:"Catalog, per-template stats, live previews, and send-test."}),n.isPending?o.jsx(Lt,{className:"h-96 w-full"}):n.isError?o.jsx(St,{error:n.error,onRetry:()=>n.refetch()}):r.length===0?o.jsx(qn,{title:"No templates registered",description:"Templates appear here once they're added to your email registry."}):o.jsxs("div",{className:"grid gap-6 lg:grid-cols-[260px_1fr]",children:[o.jsx("nav",{className:"space-y-1",children:r.map(h=>o.jsxs("button",{type:"button",onClick:()=>i(h.key),className:Fe("w-full rounded-md px-3 py-2 text-left text-sm transition-colors duration-200",h.key===a?"bg-accent-tint text-accent":"text-white/60 hover:bg-white/5 hover:text-white"),children:[o.jsx("span",{className:"block font-medium",children:h.key}),h.category?o.jsx("span",{className:"block text-xs opacity-70",children:h.category}):null]},h.key))}),u?o.jsx(X_,{template:u},u.key):null]})]})}const gn=bw({component:pC}),F_=Mn({getParentRoute:()=>gn,path:"/",component:E_}),I_=Mn({getParentRoute:()=>gn,path:"/sends",component:D_}),J_=Mn({getParentRoute:()=>gn,path:"/templates",component:Z_}),$_=Mn({getParentRoute:()=>gn,path:"/links",component:C_}),W_=Mn({getParentRoute:()=>gn,path:"/journeys",component:j_}),eT=Mn({getParentRoute:()=>gn,path:"/buckets",component:e_}),tT=Mn({getParentRoute:()=>gn,path:"/contacts",component:r_}),nT=Mn({getParentRoute:()=>gn,path:"/suppressions",component:K_}),sT=Mn({getParentRoute:()=>gn,path:"/integrations",component:x_}),aT=Mn({getParentRoute:()=>gn,path:"/setup",component:P_}),iT=Mn({getParentRoute:()=>gn,path:"/settings",component:L_}),lT=Mn({getParentRoute:()=>gn,path:"/debug",component:c_}),rT=gn.addChildren([F_,I_,J_,$_,W_,eT,tT,nT,lT,sT,aT,iT]),oT=Aw({routeTree:rT,basepath:"/studio",defaultPreload:"intent"}),Ox=document.getElementById("root");if(!Ox)throw new Error("Root element #root not found");Hw.createRoot(Ox).render(o.jsx(Q.StrictMode,{children:o.jsx(AS,{client:fC,children:o.jsx(dC,{children:o.jsx(WN,{children:o.jsx(zw,{router:oT})})})})}));