@atproto/oauth-provider-ui 0.5.2 → 0.6.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.
@@ -1,20 +0,0 @@
1
- var aa=e=>{throw TypeError(e)};var di=(e,t,r)=>t.has(e)||aa("Cannot "+r);var y=(e,t,r)=>(di(e,t,"read from private field"),r?r.call(e):t.get(e)),F=(e,t,r)=>t.has(e)?aa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),D=(e,t,r,n)=>(di(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Z=(e,t,r)=>(di(e,t,"access private method"),r);var gs=(e,t,r,n)=>({set _(s){D(e,t,s,r)},get _(){return y(e,t,n)}});import{r as v,j as h,a as mu,p as Hr,c as Gn,u as rt,B as pr,T as X,L as bd,b as wd,d as vs,g as Sd,A as xo,e as gu,f as Rd,h as Pd,C as Cd,i as Ad}from"./admonition-CynrBtB4.js";import{r as vu,P as as,u as Yi,c as yu,a as Gs,b as xd,d as Od,e as Ed,f as Jn,g as _u,h as jd,i as kd,R as zd,j as Md,k as Id,F as Ld,D as Td,A as bu,l as Nd,m as wu,n as Dd,o as Oo,p as qd,q as cs,s as Br,t as K,v as Fd,w as Qs,x as Ud,y as Hd,z as Bd,B as Vd,C as Kd,N as $d,E as Zd,S as Jd,I as Wd}from"./index-BtIdBUOA.js";import{E as Su,e as Gd}from"./error-view-Bn_MnV68.js";import"./form-card-BodfR5wP.js";var Vr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ir=typeof window>"u"||"Deno"in globalThis;function Le(){}function Qd(e,t){return typeof e=="function"?e(t):e}function Xi(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ru(e,t){return Math.max(e+(t||0)-Date.now(),0)}function mr(e,t){return typeof e=="function"?e(t):e}function He(e,t){return typeof e=="function"?e(t):e}function ca(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==Eo(o,t.options))return!1}else if(!Qn(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function ua(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(or(t.options.mutationKey)!==or(i))return!1}else if(!Qn(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Eo(e,t){return((t==null?void 0:t.queryKeyHashFn)||or)(e)}function or(e){return JSON.stringify(e,(t,r)=>eo(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Qn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Qn(e[r],t[r])):!1}function Pu(e,t){if(e===t)return e;const r=la(e)&&la(t);if(r||eo(e)&&eo(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{};let c=0;for(let l=0;l<o;l++){const d=r?l:i[l];(!r&&n.includes(d)||r)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=Pu(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return s===o&&c===s?e:a}return t}function Ms(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function la(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function eo(e){if(!da(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!da(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function da(e){return Object.prototype.toString.call(e)==="[object Object]"}function Yd(e){return new Promise(t=>{setTimeout(t,e)})}function to(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Pu(e,t):t}function Xd(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function eh(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var jo=Symbol();function Cu(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===jo?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Qt,Pt,Rr,iu,th=(iu=class extends Vr{constructor(){super();F(this,Qt);F(this,Pt);F(this,Rr);D(this,Rr,t=>{if(!ir&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){y(this,Pt)||this.setEventListener(y(this,Rr))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,Pt))==null||t.call(this),D(this,Pt,void 0))}setEventListener(t){var r;D(this,Rr,t),(r=y(this,Pt))==null||r.call(this),D(this,Pt,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){y(this,Qt)!==t&&(D(this,Qt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof y(this,Qt)=="boolean"?y(this,Qt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Qt=new WeakMap,Pt=new WeakMap,Rr=new WeakMap,iu),ko=new th,Pr,Ct,Cr,ou,rh=(ou=class extends Vr{constructor(){super();F(this,Pr,!0);F(this,Ct);F(this,Cr);D(this,Cr,t=>{if(!ir&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){y(this,Ct)||this.setEventListener(y(this,Cr))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,Ct))==null||t.call(this),D(this,Ct,void 0))}setEventListener(t){var r;D(this,Cr,t),(r=y(this,Ct))==null||r.call(this),D(this,Ct,t(this.setOnline.bind(this)))}setOnline(t){y(this,Pr)!==t&&(D(this,Pr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return y(this,Pr)}},Pr=new WeakMap,Ct=new WeakMap,Cr=new WeakMap,ou),Is=new rh;function ro(){let e,t;const r=new Promise((s,i)=>{e=s,t=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function nh(e){return Math.min(1e3*2**e,3e4)}function Au(e){return(e??"online")==="online"?Is.isOnline():!0}var xu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function hi(e){return e instanceof xu}function Ou(e){let t=!1,r=0,n=!1,s;const i=ro(),o=p=>{var b;n||(f(new xu(p)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},c=()=>{t=!1},l=()=>ko.isFocused()&&(e.networkMode==="always"||Is.isOnline())&&e.canRun(),d=()=>Au(e.networkMode)&&e.canRun(),u=p=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,p),s==null||s(),i.resolve(p))},f=p=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,p),s==null||s(),i.reject(p))},m=()=>new Promise(p=>{var b;s=w=>{(n||l())&&p(w)},(b=e.onPause)==null||b.call(e)}).then(()=>{var p;s=void 0,n||(p=e.onContinue)==null||p.call(e)}),g=()=>{if(n)return;let p;const b=r===0?e.initialPromise:void 0;try{p=b??e.fn()}catch(w){p=Promise.reject(w)}Promise.resolve(p).then(u).catch(w=>{var C;if(n)return;const _=e.retry??(ir?0:3),P=e.retryDelay??nh,O=typeof P=="function"?P(r,w):P,j=_===!0||typeof _=="number"&&r<_||typeof _=="function"&&_(r,w);if(t||!j){f(w);return}r++,(C=e.onFail)==null||C.call(e,r,w),Yd(O).then(()=>l()?void 0:m()).then(()=>{t?f(w):g()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:c,canStart:d,start:()=>(d()?g():m().then(g),i)}}var sh=e=>setTimeout(e,0);function ih(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=sh;const i=a=>{t?e.push(a):s(()=>{r(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(c=>{r(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||o()}return c},batchCalls:a=>(...c)=>{i(()=>{a(...c)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var me=ih(),Yt,au,Eu=(au=class{constructor(){F(this,Yt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Xi(this.gcTime)&&D(this,Yt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ir?1/0:5*60*1e3))}clearGcTimeout(){y(this,Yt)&&(clearTimeout(y(this,Yt)),D(this,Yt,void 0))}},Yt=new WeakMap,au),Ar,xr,Ie,Xt,be,ns,er,qe,at,cu,oh=(cu=class extends Eu{constructor(t){super();F(this,qe);F(this,Ar);F(this,xr);F(this,Ie);F(this,Xt);F(this,be);F(this,ns);F(this,er);D(this,er,!1),D(this,ns,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Xt,t.client),D(this,Ie,y(this,Xt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Ar,ah(this.options)),this.state=t.state??y(this,Ar),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=y(this,be))==null?void 0:t.promise}setOptions(t){this.options={...y(this,ns),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&y(this,Ie).remove(this)}setData(t,r){const n=to(this.state.data,t,this.options);return Z(this,qe,at).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Z(this,qe,at).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=y(this,be))==null?void 0:n.promise;return(s=y(this,be))==null||s.cancel(t),r?r.then(Le).catch(Le):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(y(this,Ar))}isActive(){return this.observers.some(t=>He(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===jo||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Ru(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=y(this,be))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=y(this,be))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),y(this,Ie).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(y(this,be)&&(y(this,er)?y(this,be).cancel({revert:!0}):y(this,be).cancelRetry()),this.scheduleGc()),y(this,Ie).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Z(this,qe,at).call(this,{type:"invalidate"})}fetch(t,r){var c,l,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(y(this,be))return y(this,be).continueRetry(),y(this,be).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,s=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(D(this,er,!0),n.signal)})},i=()=>{const u=Cu(this.options,r),f={client:y(this,Xt),queryKey:this.queryKey,meta:this.meta};return s(f),D(this,er,!1),this.options.persister?this.options.persister(u,f,this):u(f)},o={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:y(this,Xt),state:this.state,fetchFn:i};s(o),(c=this.options.behavior)==null||c.onFetch(o,this),D(this,xr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=o.fetchOptions)==null?void 0:l.meta))&&Z(this,qe,at).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=u=>{var f,m,g,p;hi(u)&&u.silent||Z(this,qe,at).call(this,{type:"error",error:u}),hi(u)||((m=(f=y(this,Ie).config).onError)==null||m.call(f,u,this),(p=(g=y(this,Ie).config).onSettled)==null||p.call(g,this.state.data,u,this)),this.scheduleGc()};return D(this,be,Ou({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:u=>{var f,m,g,p;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(b){a(b);return}(m=(f=y(this,Ie).config).onSuccess)==null||m.call(f,u,this),(p=(g=y(this,Ie).config).onSettled)==null||p.call(g,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,f)=>{Z(this,qe,at).call(this,{type:"failed",failureCount:u,error:f})},onPause:()=>{Z(this,qe,at).call(this,{type:"pause"})},onContinue:()=>{Z(this,qe,at).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),y(this,be).start()}},Ar=new WeakMap,xr=new WeakMap,Ie=new WeakMap,Xt=new WeakMap,be=new WeakMap,ns=new WeakMap,er=new WeakMap,qe=new WeakSet,at=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...ju(n.data,this.options),fetchMeta:t.meta??null};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return hi(s)&&s.revert&&y(this,xr)?{...y(this,xr),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),me.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),y(this,Ie).notify({query:this,type:"updated",action:t})})},cu);function ju(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Au(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ah(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var We,uu,ch=(uu=class extends Vr{constructor(t={}){super();F(this,We);this.config=t,D(this,We,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??Eo(s,r);let o=this.get(i);return o||(o=new oh({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){y(this,We).has(t.queryHash)||(y(this,We).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=y(this,We).get(t.queryHash);r&&(t.destroy(),r===t&&y(this,We).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return y(this,We).get(t)}getAll(){return[...y(this,We).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ca(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>ca(t,n)):r}notify(t){me.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},We=new WeakMap,uu),Ge,we,tr,Qe,wt,lu,uh=(lu=class extends Eu{constructor(t){super();F(this,Qe);F(this,Ge);F(this,we);F(this,tr);this.mutationId=t.mutationId,D(this,we,t.mutationCache),D(this,Ge,[]),this.state=t.state||ku(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){y(this,Ge).includes(t)||(y(this,Ge).push(t),this.clearGcTimeout(),y(this,we).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,Ge,y(this,Ge).filter(r=>r!==t)),this.scheduleGc(),y(this,we).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){y(this,Ge).length||(this.state.status==="pending"?this.scheduleGc():y(this,we).remove(this))}continue(){var t;return((t=y(this,tr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,c,l,d,u,f,m,g,p,b,w,_,P,O,j,C,x;D(this,tr,Ou({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,S)=>{Z(this,Qe,wt).call(this,{type:"failed",failureCount:R,error:S})},onPause:()=>{Z(this,Qe,wt).call(this,{type:"pause"})},onContinue:()=>{Z(this,Qe,wt).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>y(this,we).canRun(this)}));const r=this.state.status==="pending",n=!y(this,tr).canStart();try{if(!r){Z(this,Qe,wt).call(this,{type:"pending",variables:t,isPaused:n}),await((i=(s=y(this,we).config).onMutate)==null?void 0:i.call(s,t,this));const S=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));S!==this.state.context&&Z(this,Qe,wt).call(this,{type:"pending",context:S,variables:t,isPaused:n})}const R=await y(this,tr).start();return await((l=(c=y(this,we).config).onSuccess)==null?void 0:l.call(c,R,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,R,t,this.state.context)),await((m=(f=y(this,we).config).onSettled)==null?void 0:m.call(f,R,null,this.state.variables,this.state.context,this)),await((p=(g=this.options).onSettled)==null?void 0:p.call(g,R,null,t,this.state.context)),Z(this,Qe,wt).call(this,{type:"success",data:R}),R}catch(R){try{throw await((w=(b=y(this,we).config).onError)==null?void 0:w.call(b,R,t,this.state.context,this)),await((P=(_=this.options).onError)==null?void 0:P.call(_,R,t,this.state.context)),await((j=(O=y(this,we).config).onSettled)==null?void 0:j.call(O,void 0,R,this.state.variables,this.state.context,this)),await((x=(C=this.options).onSettled)==null?void 0:x.call(C,void 0,R,t,this.state.context)),R}finally{Z(this,Qe,wt).call(this,{type:"error",error:R})}}finally{y(this,we).runNext(this)}}},Ge=new WeakMap,we=new WeakMap,tr=new WeakMap,Qe=new WeakSet,wt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),me.batch(()=>{y(this,Ge).forEach(n=>{n.onMutationUpdate(t)}),y(this,we).notify({mutation:this,type:"updated",action:t})})},lu);function ku(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ct,Fe,ss,du,lh=(du=class extends Vr{constructor(t={}){super();F(this,ct);F(this,Fe);F(this,ss);this.config=t,D(this,ct,new Set),D(this,Fe,new Map),D(this,ss,0)}build(t,r,n){const s=new uh({mutationCache:this,mutationId:++gs(this,ss)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){y(this,ct).add(t);const r=ys(t);if(typeof r=="string"){const n=y(this,Fe).get(r);n?n.push(t):y(this,Fe).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(y(this,ct).delete(t)){const r=ys(t);if(typeof r=="string"){const n=y(this,Fe).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&y(this,Fe).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=ys(t);if(typeof r=="string"){const n=y(this,Fe).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=ys(t);if(typeof r=="string"){const s=(n=y(this,Fe).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){me.batch(()=>{y(this,ct).forEach(t=>{this.notify({type:"removed",mutation:t})}),y(this,ct).clear(),y(this,Fe).clear()})}getAll(){return Array.from(y(this,ct))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ua(r,n))}findAll(t={}){return this.getAll().filter(r=>ua(t,r))}notify(t){me.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return me.batch(()=>Promise.all(t.map(r=>r.continue().catch(Le))))}},ct=new WeakMap,Fe=new WeakMap,ss=new WeakMap,du);function ys(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ha(e){return{onFetch:(t,r)=>{var d,u,f,m,g;const n=t.options,s=(f=(u=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:u.fetchMore)==null?void 0:f.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const b=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},w=Cu(t.options,t.fetchOptions),_=async(P,O,j)=>{if(p)return Promise.reject();if(O==null&&P.pages.length)return Promise.resolve(P);const C={client:t.client,queryKey:t.queryKey,pageParam:O,direction:j?"backward":"forward",meta:t.options.meta};b(C);const x=await w(C),{maxPages:R}=t.options,S=j?eh:Xd;return{pages:S(P.pages,x,R),pageParams:S(P.pageParams,O,R)}};if(s&&i.length){const P=s==="backward",O=P?dh:fa,j={pages:i,pageParams:o},C=O(n,j);a=await _(j,C,P)}else{const P=e??i.length;do{const O=c===0?o[0]??n.initialPageParam:fa(n,a);if(c>0&&O==null)break;a=await _(a,O),c++}while(c<P)}return a};t.options.persister?t.fetchFn=()=>{var p,b;return(b=(p=t.options).persister)==null?void 0:b.call(p,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function fa(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function dh(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var le,At,xt,Or,Er,Ot,jr,kr,hu,hh=(hu=class{constructor(e={}){F(this,le);F(this,At);F(this,xt);F(this,Or);F(this,Er);F(this,Ot);F(this,jr);F(this,kr);D(this,le,e.queryCache||new ch),D(this,At,e.mutationCache||new lh),D(this,xt,e.defaultOptions||{}),D(this,Or,new Map),D(this,Er,new Map),D(this,Ot,0)}mount(){gs(this,Ot)._++,y(this,Ot)===1&&(D(this,jr,ko.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,le).onFocus())})),D(this,kr,Is.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,le).onOnline())})))}unmount(){var e,t;gs(this,Ot)._--,y(this,Ot)===0&&((e=y(this,jr))==null||e.call(this),D(this,jr,void 0),(t=y(this,kr))==null||t.call(this),D(this,kr,void 0))}isFetching(e){return y(this,le).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return y(this,At).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=y(this,le).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=y(this,le).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(mr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return y(this,le).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=y(this,le).get(n.queryHash),i=s==null?void 0:s.state.data,o=Qd(t,i);if(o!==void 0)return y(this,le).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return me.batch(()=>y(this,le).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=y(this,le).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=y(this,le);me.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=y(this,le);return me.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=me.batch(()=>y(this,le).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Le).catch(Le)}invalidateQueries(e,t={}){return me.batch(()=>(y(this,le).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=me.batch(()=>y(this,le).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(Le)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Le)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=y(this,le).build(this,t);return r.isStaleByTime(mr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Le).catch(Le)}fetchInfiniteQuery(e){return e.behavior=ha(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Le).catch(Le)}ensureInfiniteQueryData(e){return e.behavior=ha(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Is.isOnline()?y(this,At).resumePausedMutations():Promise.resolve()}getQueryCache(){return y(this,le)}getMutationCache(){return y(this,At)}getDefaultOptions(){return y(this,xt)}setDefaultOptions(e){D(this,xt,e)}setQueryDefaults(e,t){y(this,Or).set(or(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...y(this,Or).values()],r={};return t.forEach(n=>{Qn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){y(this,Er).set(or(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...y(this,Er).values()],r={};return t.forEach(n=>{Qn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...y(this,xt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Eo(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===jo&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...y(this,xt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){y(this,le).clear(),y(this,At).clear()}},le=new WeakMap,At=new WeakMap,xt=new WeakMap,Or=new WeakMap,Er=new WeakMap,Ot=new WeakMap,jr=new WeakMap,kr=new WeakMap,hu),Re,J,is,Se,rr,zr,Et,Ye,os,Mr,Ir,nr,sr,jt,Lr,ee,Bn,no,so,io,oo,ao,co,uo,zu,fu,fh=(fu=class extends Vr{constructor(t,r){super();F(this,ee);F(this,Re);F(this,J);F(this,is);F(this,Se);F(this,rr);F(this,zr);F(this,Et);F(this,Ye);F(this,os);F(this,Mr);F(this,Ir);F(this,nr);F(this,sr);F(this,jt);F(this,Lr,new Set);this.options=r,D(this,Re,t),D(this,Ye,null),D(this,Et,ro()),this.options.experimental_prefetchInRender||y(this,Et).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(y(this,J).addObserver(this),pa(y(this,J),this.options)?Z(this,ee,Bn).call(this):this.updateResult(),Z(this,ee,oo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return lo(y(this,J),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lo(y(this,J),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Z(this,ee,ao).call(this),Z(this,ee,co).call(this),y(this,J).removeObserver(this)}setOptions(t){const r=this.options,n=y(this,J);if(this.options=y(this,Re).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof He(this.options.enabled,y(this,J))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Z(this,ee,uo).call(this),y(this,J).setOptions(this.options),r._defaulted&&!Ms(this.options,r)&&y(this,Re).getQueryCache().notify({type:"observerOptionsUpdated",query:y(this,J),observer:this});const s=this.hasListeners();s&&ma(y(this,J),n,this.options,r)&&Z(this,ee,Bn).call(this),this.updateResult(),s&&(y(this,J)!==n||He(this.options.enabled,y(this,J))!==He(r.enabled,y(this,J))||mr(this.options.staleTime,y(this,J))!==mr(r.staleTime,y(this,J)))&&Z(this,ee,no).call(this);const i=Z(this,ee,so).call(this);s&&(y(this,J)!==n||He(this.options.enabled,y(this,J))!==He(r.enabled,y(this,J))||i!==y(this,jt))&&Z(this,ee,io).call(this,i)}getOptimisticResult(t){const r=y(this,Re).getQueryCache().build(y(this,Re),t),n=this.createResult(r,t);return mh(this,n)&&(D(this,Se,n),D(this,zr,this.options),D(this,rr,y(this,J).state)),n}getCurrentResult(){return y(this,Se)}trackResult(t,r){const n={};return Object.keys(t).forEach(s=>{Object.defineProperty(n,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),r==null||r(s),t[s])})}),n}trackProp(t){y(this,Lr).add(t)}getCurrentQuery(){return y(this,J)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=y(this,Re).defaultQueryOptions(t),n=y(this,Re).getQueryCache().build(y(this,Re),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Z(this,ee,Bn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),y(this,Se)))}createResult(t,r){var R;const n=y(this,J),s=this.options,i=y(this,Se),o=y(this,rr),a=y(this,zr),l=t!==n?t.state:y(this,is),{state:d}=t;let u={...d},f=!1,m;if(r._optimisticResults){const S=this.hasListeners(),L=!S&&pa(t,r),N=S&&ma(t,n,r,s);(L||N)&&(u={...u,...ju(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:g,errorUpdatedAt:p,status:b}=u;if(r.select&&u.data!==void 0)if(i&&u.data===(o==null?void 0:o.data)&&r.select===y(this,os))m=y(this,Mr);else try{D(this,os,r.select),m=r.select(u.data),m=to(i==null?void 0:i.data,m,r),D(this,Mr,m),D(this,Ye,null)}catch(S){D(this,Ye,S)}else m=u.data;if(r.placeholderData!==void 0&&m===void 0&&b==="pending"){let S;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))S=i.data;else if(S=typeof r.placeholderData=="function"?r.placeholderData((R=y(this,Ir))==null?void 0:R.state.data,y(this,Ir)):r.placeholderData,r.select&&S!==void 0)try{S=r.select(S),D(this,Ye,null)}catch(L){D(this,Ye,L)}S!==void 0&&(b="success",m=to(i==null?void 0:i.data,S,r),f=!0)}y(this,Ye)&&(g=y(this,Ye),m=y(this,Mr),p=Date.now(),b="error");const w=u.fetchStatus==="fetching",_=b==="pending",P=b==="error",O=_&&w,j=m!==void 0,x={status:b,fetchStatus:u.fetchStatus,isPending:_,isSuccess:b==="success",isError:P,isInitialLoading:O,isLoading:O,data:m,dataUpdatedAt:u.dataUpdatedAt,error:g,errorUpdatedAt:p,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:w,isRefetching:w&&!_,isLoadingError:P&&!j,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:P&&j,isStale:zo(t,r),refetch:this.refetch,promise:y(this,Et)};if(this.options.experimental_prefetchInRender){const S=I=>{x.status==="error"?I.reject(x.error):x.data!==void 0&&I.resolve(x.data)},L=()=>{const I=D(this,Et,x.promise=ro());S(I)},N=y(this,Et);switch(N.status){case"pending":t.queryHash===n.queryHash&&S(N);break;case"fulfilled":(x.status==="error"||x.data!==N.value)&&L();break;case"rejected":(x.status!=="error"||x.error!==N.reason)&&L();break}}return x}updateResult(){const t=y(this,Se),r=this.createResult(y(this,J),this.options);if(D(this,rr,y(this,J).state),D(this,zr,this.options),y(this,rr).data!==void 0&&D(this,Ir,y(this,J)),Ms(r,t))return;D(this,Se,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!y(this,Lr).size)return!0;const o=new Set(i??y(this,Lr));return this.options.throwOnError&&o.add("error"),Object.keys(y(this,Se)).some(a=>{const c=a;return y(this,Se)[c]!==t[c]&&o.has(c)})};Z(this,ee,zu).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Z(this,ee,oo).call(this)}},Re=new WeakMap,J=new WeakMap,is=new WeakMap,Se=new WeakMap,rr=new WeakMap,zr=new WeakMap,Et=new WeakMap,Ye=new WeakMap,os=new WeakMap,Mr=new WeakMap,Ir=new WeakMap,nr=new WeakMap,sr=new WeakMap,jt=new WeakMap,Lr=new WeakMap,ee=new WeakSet,Bn=function(t){Z(this,ee,uo).call(this);let r=y(this,J).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Le)),r},no=function(){Z(this,ee,ao).call(this);const t=mr(this.options.staleTime,y(this,J));if(ir||y(this,Se).isStale||!Xi(t))return;const n=Ru(y(this,Se).dataUpdatedAt,t)+1;D(this,nr,setTimeout(()=>{y(this,Se).isStale||this.updateResult()},n))},so=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(y(this,J)):this.options.refetchInterval)??!1},io=function(t){Z(this,ee,co).call(this),D(this,jt,t),!(ir||He(this.options.enabled,y(this,J))===!1||!Xi(y(this,jt))||y(this,jt)===0)&&D(this,sr,setInterval(()=>{(this.options.refetchIntervalInBackground||ko.isFocused())&&Z(this,ee,Bn).call(this)},y(this,jt)))},oo=function(){Z(this,ee,no).call(this),Z(this,ee,io).call(this,Z(this,ee,so).call(this))},ao=function(){y(this,nr)&&(clearTimeout(y(this,nr)),D(this,nr,void 0))},co=function(){y(this,sr)&&(clearInterval(y(this,sr)),D(this,sr,void 0))},uo=function(){const t=y(this,Re).getQueryCache().build(y(this,Re),this.options);if(t===y(this,J))return;const r=y(this,J);D(this,J,t),D(this,is,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},zu=function(t){me.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(y(this,Se))}),y(this,Re).getQueryCache().notify({query:y(this,J),type:"observerResultsUpdated"})})},fu);function ph(e,t){return He(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function pa(e,t){return ph(e,t)||e.state.data!==void 0&&lo(e,t,t.refetchOnMount)}function lo(e,t,r){if(He(t.enabled,e)!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&zo(e,t)}return!1}function ma(e,t,r,n){return(e!==t||He(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&zo(e,r)}function zo(e,t){return He(t.enabled,e)!==!1&&e.isStaleByTime(mr(t.staleTime,e))}function mh(e,t){return!Ms(e.getCurrentResult(),t)}var kt,zt,Pe,ut,mt,Es,ho,pu,gh=(pu=class extends Vr{constructor(t,r){super();F(this,mt);F(this,kt);F(this,zt);F(this,Pe);F(this,ut);D(this,kt,t),this.setOptions(r),this.bindMethods(),Z(this,mt,Es).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=y(this,kt).defaultMutationOptions(t),Ms(this.options,r)||y(this,kt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:y(this,Pe),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&or(r.mutationKey)!==or(this.options.mutationKey)?this.reset():((n=y(this,Pe))==null?void 0:n.state.status)==="pending"&&y(this,Pe).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=y(this,Pe))==null||t.removeObserver(this)}onMutationUpdate(t){Z(this,mt,Es).call(this),Z(this,mt,ho).call(this,t)}getCurrentResult(){return y(this,zt)}reset(){var t;(t=y(this,Pe))==null||t.removeObserver(this),D(this,Pe,void 0),Z(this,mt,Es).call(this),Z(this,mt,ho).call(this)}mutate(t,r){var n;return D(this,ut,r),(n=y(this,Pe))==null||n.removeObserver(this),D(this,Pe,y(this,kt).getMutationCache().build(y(this,kt),this.options)),y(this,Pe).addObserver(this),y(this,Pe).execute(t)}},kt=new WeakMap,zt=new WeakMap,Pe=new WeakMap,ut=new WeakMap,mt=new WeakSet,Es=function(){var r;const t=((r=y(this,Pe))==null?void 0:r.state)??ku();D(this,zt,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},ho=function(t){me.batch(()=>{var r,n,s,i,o,a,c,l;if(y(this,ut)&&this.hasListeners()){const d=y(this,zt).variables,u=y(this,zt).context;(t==null?void 0:t.type)==="success"?((n=(r=y(this,ut)).onSuccess)==null||n.call(r,t.data,d,u),(i=(s=y(this,ut)).onSettled)==null||i.call(s,t.data,null,d,u)):(t==null?void 0:t.type)==="error"&&((a=(o=y(this,ut)).onError)==null||a.call(o,t.error,d,u),(l=(c=y(this,ut)).onSettled)==null||l.call(c,void 0,t.error,d,u))}this.listeners.forEach(d=>{d(y(this,zt))})})},pu),Mu=v.createContext(void 0),Ys=e=>{const t=v.useContext(Mu);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vh=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(Mu.Provider,{value:e,children:t})),Iu=v.createContext(!1),yh=()=>v.useContext(Iu);Iu.Provider;function _h(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bh=v.createContext(_h()),wh=()=>v.useContext(bh);function Lu(e,t){return typeof e=="function"?e(...t):!!e}function fo(){}var Sh=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Rh=e=>{v.useEffect(()=>{e.clearReset()},[e])},Ph=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||Lu(r,[e.error,n])),Ch=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...r)=>Math.max(t(...r),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Ah=(e,t)=>e.isLoading&&e.isFetching&&!t,xh=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ga=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Oh(e,t,r){var u,f,m,g,p;const n=Ys(),s=yh(),i=wh(),o=n.defaultQueryOptions(e);(f=(u=n.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||f.call(u,o),o._optimisticResults=s?"isRestoring":"optimistic",Ch(o),Sh(o,i),Rh(i);const a=!n.getQueryCache().get(o.queryHash),[c]=v.useState(()=>new t(n,o)),l=c.getOptimisticResult(o),d=!s&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(b=>{const w=d?c.subscribe(me.batchCalls(b)):fo;return c.updateResult(),w},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),v.useEffect(()=>{c.setOptions(o)},[o,c]),xh(o,l))throw ga(o,c,i);if(Ph({result:l,errorResetBoundary:i,throwOnError:o.throwOnError,query:n.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;if((g=(m=n.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||g.call(m,o,l),o.experimental_prefetchInRender&&!ir&&Ah(l,s)){const b=a?ga(o,c,i):(p=n.getQueryCache().get(o.queryHash))==null?void 0:p.promise;b==null||b.catch(fo).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function Tu(e,t){return Oh(e,fh)}function Xs(e,t){const r=Ys(),[n]=v.useState(()=>new gh(r,e));v.useEffect(()=>{n.setOptions(e)},[n,e]);const s=v.useSyncExternalStore(v.useCallback(o=>n.subscribe(me.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=v.useCallback((o,a)=>{n.mutate(o,a).catch(fo)},[n]);if(s.error&&Lu(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}var Eh="Invariant failed";function dt(e,t){if(!e)throw new Error(Eh)}const gr=new WeakMap,js=new WeakMap,Ls={current:[]};let fi=!1,Wn=0;const Vn=new Set,_s=new Map;function Nu(e){const t=Array.from(e).sort((r,n)=>r instanceof vr&&r.options.deps.includes(n)?1:n instanceof vr&&n.options.deps.includes(r)?-1:0);for(const r of t){if(Ls.current.includes(r))continue;Ls.current.push(r),r.recompute();const n=js.get(r);if(n)for(const s of n){const i=gr.get(s);i&&Nu(i)}}}function jh(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function kh(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function Du(e){if(Wn>0&&!_s.has(e)&&_s.set(e,e.prevState),Vn.add(e),!(Wn>0)&&!fi)try{for(fi=!0;Vn.size>0;){const t=Array.from(Vn);Vn.clear();for(const r of t){const n=_s.get(r)??r.prevState;r.prevState=n,jh(r)}for(const r of t){const n=gr.get(r);n&&(Ls.current.push(r),Nu(n))}for(const r of t){const n=gr.get(r);if(n)for(const s of n)kh(s)}}}finally{fi=!1,Ls.current=[],_s.clear()}}function pi(e){Wn++;try{e()}finally{if(Wn--,Wn===0){const t=Array.from(Vn)[0];t&&Du(t)}}}function zh(e){return typeof e=="function"}class po{constructor(t,r){this.listeners=new Set,this.subscribe=n=>{var s,i;this.listeners.add(n);const o=(i=(s=this.options)==null?void 0:s.onSubscribe)==null?void 0:i.call(s,n,this);return()=>{this.listeners.delete(n),o==null||o()}},this.prevState=t,this.state=t,this.options=r}setState(t){var r,n,s;this.prevState=this.state,(r=this.options)!=null&&r.updateFn?this.state=this.options.updateFn(this.prevState)(t):zh(t)?this.state=t(this.prevState):this.state=t,(s=(n=this.options)==null?void 0:n.onUpdate)==null||s.call(n),Du(this)}}class vr{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const r=[],n=[];for(const s of this.options.deps)r.push(s.prevState),n.push(s.state);return this.lastSeenDepValues=n,{prevDepVals:r,currDepVals:n,prevVal:this.prevState??void 0}},this.recompute=()=>{var r,n;this.prevState=this.state;const{prevDepVals:s,currDepVals:i,prevVal:o}=this.getDepVals();this.state=this.options.fn({prevDepVals:s,currDepVals:i,prevVal:o}),(n=(r=this.options).onUpdate)==null||n.call(r)},this.checkIfRecalculationNeededDeeply=()=>{for(const i of this.options.deps)i instanceof vr&&i.checkIfRecalculationNeededDeeply();let r=!1;const n=this.lastSeenDepValues,{currDepVals:s}=this.getDepVals();for(let i=0;i<s.length;i++)if(s[i]!==n[i]){r=!0;break}r&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const r of this._subscriptions)r()}),this.subscribe=r=>{var n,s;this.listeners.add(r);const i=(s=(n=this.options).onSubscribe)==null?void 0:s.call(n,r,this);return()=>{this.listeners.delete(r),i==null||i()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const r of t)if(r instanceof vr)r.registerOnGraph(),this.registerOnGraph(r.options.deps);else if(r instanceof po){let n=gr.get(r);n||(n=new Set,gr.set(r,n)),n.add(this);let s=js.get(this);s||(s=new Set,js.set(this,s)),s.add(r)}}unregisterFromGraph(t=this.options.deps){for(const r of t)if(r instanceof vr)this.unregisterFromGraph(r.options.deps);else if(r instanceof po){const n=gr.get(r);n&&n.delete(this);const s=js.get(this);s&&s.delete(r)}}}const It="__TSR_index",va="popstate",ya="beforeunload";function qu(e){let t=e.getLocation();const r=new Set,n=o=>{t=e.getLocation(),r.forEach(a=>a({location:t,action:o}))},s=o=>{e.notifyOnIndexChange??!0?n(o):t=e.getLocation()},i=async({task:o,navigateOpts:a,...c})=>{var l,d;if((a==null?void 0:a.ignoreBlocker)??!1){o();return}const f=((l=e.getBlockers)==null?void 0:l.call(e))??[],m=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&m)for(const g of f){const p=Yn(c.path,c.state);if(await g.blockerFn({currentLocation:t,nextLocation:p,action:c.type})){(d=e.onBlocked)==null||d.call(e);return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:o=>(r.add(o),()=>{r.delete(o)}),push:(o,a,c)=>{const l=t.state[It];a=mo(l+1,a),i({task:()=>{e.pushState(o,a),n({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:o,state:a})},replace:(o,a,c)=>{const l=t.state[It];a=mo(l,a),i({task:()=>{e.replaceState(o,a),n({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:o,state:a})},go:(o,a)=>{i({task:()=>{e.go(o),s({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{i({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{i({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[It]!==0,createHref:o=>e.createHref(o),block:o=>{var a;if(!e.setBlockers)return()=>{};const c=((a=e.getBlockers)==null?void 0:a.call(e))??[];return e.setBlockers([...c,o]),()=>{var l,d;const u=((l=e.getBlockers)==null?void 0:l.call(e))??[];(d=e.setBlockers)==null||d.call(e,u.filter(f=>f!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:n}}function mo(e,t){return t||(t={}),{...t,key:Mo(),[It]:e}}function Mh(e){var t;const r=typeof document<"u"?window:void 0,n=r.history.pushState,s=r.history.replaceState;let i=[];const o=()=>i,a=S=>i=S,c=S=>S,l=()=>Yn(`${r.location.pathname}${r.location.search}${r.location.hash}`,r.history.state);(t=r.history.state)!=null&&t.key||r.history.replaceState({[It]:0,key:Mo()},"");let d=l(),u,f=!1,m=!1,g=!1,p=!1;const b=()=>d;let w,_;const P=()=>{w&&(R._ignoreSubscribers=!0,(w.isPush?r.history.pushState:r.history.replaceState)(w.state,"",w.href),R._ignoreSubscribers=!1,w=void 0,_=void 0,u=void 0)},O=(S,L,N)=>{const I=c(L);_||(u=d),d=Yn(L,N),w={href:I,state:N,isPush:(w==null?void 0:w.isPush)||S==="push"},_||(_=Promise.resolve().then(()=>P()))},j=S=>{d=l(),R.notify({type:S})},C=async()=>{if(m){m=!1;return}const S=l(),L=S.state[It]-d.state[It],N=L===1,I=L===-1,T=!N&&!I||f;f=!1;const U=T?"GO":I?"BACK":"FORWARD",H=T?{type:"GO",index:L}:{type:I?"BACK":"FORWARD"};if(g)g=!1;else{const q=o();if(typeof document<"u"&&q.length){for(const B of q)if(await B.blockerFn({currentLocation:d,nextLocation:S,action:U})){m=!0,r.history.go(1),R.notify(H);return}}}d=l(),R.notify(H)},x=S=>{if(p){p=!1;return}let L=!1;const N=o();if(typeof document<"u"&&N.length)for(const I of N){const T=I.enableBeforeUnload??!0;if(T===!0){L=!0;break}if(typeof T=="function"&&T()===!0){L=!0;break}}if(L)return S.preventDefault(),S.returnValue=""},R=qu({getLocation:b,getLength:()=>r.history.length,pushState:(S,L)=>O("push",S,L),replaceState:(S,L)=>O("replace",S,L),back:S=>(S&&(g=!0),p=!0,r.history.back()),forward:S=>{S&&(g=!0),p=!0,r.history.forward()},go:S=>{f=!0,r.history.go(S)},createHref:S=>c(S),flush:P,destroy:()=>{r.history.pushState=n,r.history.replaceState=s,r.removeEventListener(ya,x,{capture:!0}),r.removeEventListener(va,C)},onBlocked:()=>{u&&d!==u&&(d=u)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return r.addEventListener(ya,x,{capture:!0}),r.addEventListener(va,C),r.history.pushState=function(...S){const L=n.apply(r.history,S);return R._ignoreSubscribers||j("PUSH"),L},r.history.replaceState=function(...S){const L=s.apply(r.history,S);return R._ignoreSubscribers||j("REPLACE"),L},R}function Ih(e={initialEntries:["/"]}){const t=e.initialEntries;let r=e.initialIndex?Math.min(Math.max(e.initialIndex,0),t.length-1):t.length-1;const n=t.map((i,o)=>mo(o,void 0));return qu({getLocation:()=>Yn(t[r],n[r]),getLength:()=>t.length,pushState:(i,o)=>{r<t.length-1&&(t.splice(r+1),n.splice(r+1)),n.push(o),t.push(i),r=Math.max(t.length-1,0)},replaceState:(i,o)=>{n[r]=o,t[r]=i},back:()=>{r=Math.max(r-1,0)},forward:()=>{r=Math.min(r+1,t.length-1)},go:i=>{r=Math.min(Math.max(r+i,0),t.length-1)},createHref:i=>i})}function Yn(e,t){const r=e.indexOf("#"),n=e.indexOf("?");return{href:e,pathname:e.substring(0,r>0?n>0?Math.min(r,n):r:n>0?n:e.length),hash:r>-1?e.substring(r):"",search:n>-1?e.slice(n,r===-1?void 0:r):"",state:t||{[It]:0,key:Mo()}}}function Mo(){return(Math.random()+1).toString(36).substring(7)}function hr(e){return e[e.length-1]}function Lh(e){return typeof e=="function"}function Wt(e,t){return Lh(e)?e(t):e}function go(e,t){return t.reduce((r,n)=>(r[n]=e[n],r),{})}function Me(e,t){if(e===t)return e;const r=t,n=ba(e)&&ba(r);if(n||Ts(e)&&Ts(r)){const s=n?e:Object.keys(e),i=s.length,o=n?r:Object.keys(r),a=o.length,c=n?[]:{};let l=0;for(let d=0;d<a;d++){const u=n?d:o[d];(!n&&s.includes(u)||n)&&e[u]===void 0&&r[u]===void 0?(c[u]=void 0,l++):(c[u]=Me(e[u],r[u]),c[u]===e[u]&&e[u]!==void 0&&l++)}return i===a&&l===i?e:c}return r}function Ts(e){if(!_a(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!_a(r)||!r.hasOwnProperty("isPrototypeOf"))}function _a(e){return Object.prototype.toString.call(e)==="[object Object]"}function ba(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wa(e,t){let r=Object.keys(e);return t&&(r=r.filter(n=>e[n]!==void 0)),r}function yr(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Ts(e)&&Ts(t)){const n=(r==null?void 0:r.ignoreUndefined)??!0,s=wa(e,n),i=wa(t,n);return!(r!=null&&r.partial)&&s.length!==i.length?!1:i.every(o=>yr(e[o],t[o],r))}return Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:!e.some((n,s)=>!yr(n,t[s],r)):!1}function dr(e){let t,r;const n=new Promise((s,i)=>{t=s,r=i});return n.status="pending",n.resolve=s=>{n.status="resolved",n.value=s,t(s),e==null||e(s)},n.reject=s=>{n.status="rejected",r(s)},n}function Th(e){return/%[0-9A-Fa-f]{2}/.test(e)}function pt(e){return ei(e.filter(t=>t!==void 0).join("/"))}function ei(e){return e.replace(/\/{2,}/g,"/")}function Io(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Gt(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Nh(e){return Gt(Io(e))}function Ns(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Dh(e,t,r){return Ns(e,r)===Ns(t,r)}function qh({basepath:e,base:t,to:r,trailingSlash:n="never",caseSensitive:s}){var i,o;t=Ds(e,t,s),r=Ds(e,r,s);let a=Tr(t);const c=Tr(r);a.length>1&&((i=hr(a))==null?void 0:i.value)==="/"&&a.pop(),c.forEach((d,u)=>{d.value==="/"?u?u===c.length-1&&a.push(d):a=[d]:d.value===".."?a.pop():d.value==="."||a.push(d)}),a.length>1&&(((o=hr(a))==null?void 0:o.value)==="/"?n==="never"&&a.pop():n==="always"&&a.push({type:"pathname",value:"/"}));const l=pt([e,...a.map(d=>d.value)]);return ei(l)}function Tr(e){if(!e)return[];e=ei(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const r=e.split("/").filter(Boolean);return t.push(...r.map(n=>n==="$"||n==="*"?{type:"wildcard",value:n}:n.charAt(0)==="$"?{type:"param",value:n}:{type:"pathname",value:n.includes("%25")?n.split("%25").map(s=>decodeURI(s)).join("%25"):decodeURI(n)})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function bs({path:e,params:t,leaveWildcards:r,leaveParams:n,decodeCharMap:s}){const i=Tr(e);function o(l){const d=t[l],u=typeof d=="string";return["*","_splat"].includes(l)?u?encodeURI(d):d:u?Fh(d,s):d}const a={},c=pt(i.map(l=>{if(l.type==="wildcard"){a._splat=t._splat;const d=o("_splat");return r?`${l.value}${d??""}`:d}if(l.type==="param"){const d=l.value.substring(1);if(a[d]=t[d],n){const u=o(l.value);return`${l.value}${u??""}`}return o(d)??"undefined"}return l.value}));return{usedParams:a,interpolatedPath:c}}function Fh(e,t){let r=encodeURIComponent(e);if(t)for(const[n,s]of t)r=r.replaceAll(n,s);return r}function ws(e,t,r){const n=Uh(e,t,r);if(!(r.to&&!n))return n??{}}function Ds(e,t,r=!1){const n=r?e:e.toLowerCase(),s=r?t:t.toLowerCase();switch(!0){case n==="/":return t;case s===n:return"";case t.length<e.length:return t;case s[n.length]!=="/":return t;case s.startsWith(n):return t.slice(e.length);default:return t}}function Uh(e,t,r){if(e!=="/"&&!t.startsWith(e))return;t=Ds(e,t,r.caseSensitive);const n=Ds(e,`${r.to??"$"}`,r.caseSensitive),s=Tr(t),i=Tr(n);t.startsWith("/")||s.unshift({type:"pathname",value:"/"}),n.startsWith("/")||i.unshift({type:"pathname",value:"/"});const o={};return(()=>{for(let c=0;c<Math.max(s.length,i.length);c++){const l=s[c],d=i[c],u=c>=s.length-1,f=c>=i.length-1;if(d){if(d.type==="wildcard"){const m=decodeURI(pt(s.slice(c).map(g=>g.value)));return o["*"]=m,o._splat=m,!0}if(d.type==="pathname"){if(d.value==="/"&&!(l!=null&&l.value))return!0;if(l){if(r.caseSensitive){if(d.value!==l.value)return!1}else if(d.value.toLowerCase()!==l.value.toLowerCase())return!1}}if(!l)return!1;if(d.type==="param"){if(l.value==="/")return!1;l.value.charAt(0)!=="$"&&(o[d.value.substring(1)]=decodeURIComponent(l.value))}}if(!u&&f)return o["**"]=pt(s.slice(c+1).map(m=>m.value)),!!r.fuzzy&&(d==null?void 0:d.value)!=="/"}return!0})()?o:void 0}function Te(e){return!!(e!=null&&e.isNotFound)}const qs="tsr-scroll-restoration-v1_3";let Fu=!1;try{Fu=typeof window<"u"&&typeof window.sessionStorage=="object"}catch{}const Hh=(e,t)=>{let r;return(...n)=>{r||(r=setTimeout(()=>{e(...n),r=null},t))}},fr=Fu?{state:JSON.parse(window.sessionStorage.getItem(qs)||"null")||{},set:t=>(fr.state=Wt(t,fr.state)||fr.state,window.sessionStorage.setItem(qs,JSON.stringify(fr.state)))}:void 0,vo=e=>e.state.key||e.href;function Bh(e){const t=[];let r;for(;r=e.parentNode;)t.unshift(`${e.tagName}:nth-child(${[].indexOf.call(r.children,e)+1})`),e=r;return`${t.join(" > ")}`.toLowerCase()}let Fs=!1;function Uu(e,t,r,n,s){var i;let o;try{o=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(l){console.error(l);return}const a=t||((i=window.history.state)==null?void 0:i.key),c=o[a];Fs=!0,(()=>{if(n&&c){for(const d in c){const u=c[d];if(d==="window")window.scrollTo({top:u.scrollY,left:u.scrollX,behavior:r});else if(d){const f=document.querySelector(d);f&&(f.scrollLeft=u.scrollX,f.scrollTop=u.scrollY)}}return}const l=window.location.hash.split("#")[1];if(l){const d=(window.history.state||{}).__hashScrollIntoViewOptions??!0;if(d){const u=document.getElementById(l);u&&u.scrollIntoView(d)}return}["window",...(s==null?void 0:s.filter(d=>d!=="window"))??[]].forEach(d=>{const u=d==="window"?window:document.querySelector(d);u&&u.scrollTo({top:0,left:0,behavior:r})})})(),Fs=!1}function Vh(e,t){if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),typeof document>"u"||e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,Fs=!1;const n=e.options.getScrollRestorationKey||vo;window.history.scrollRestoration="manual";const s=i=>{if(Fs||!e.isScrollRestoring)return;let o="";if(i.target===document||i.target===window)o="window";else{const c=i.target.getAttribute("data-scroll-restoration-id");c?o=`[data-scroll-restoration-id="${c}"]`:o=Bh(i.target)}const a=n(e.state.location);fr.set(c=>{const l=c[a]=c[a]||{},d=l[o]=l[o]||{};if(o==="window")d.scrollX=window.scrollX||0,d.scrollY=window.scrollY||0;else if(o){const u=document.querySelector(o);u&&(d.scrollX=u.scrollLeft||0,d.scrollY=u.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",Hh(s,100),!0),e.subscribe("onRendered",i=>{const o=n(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}Uu(qs,o,e.options.scrollRestorationBehavior||void 0,e.isScrollRestoring||void 0,e.options.scrollToTopSelectors||void 0),e.isScrollRestoring&&fr.set(a=>(a[o]=a[o]||{},a))})}function Kh(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const r=document.getElementById(e.state.location.hash);r&&r.scrollIntoView(t)}}}function $h(e,t){const r=Object.entries(e).flatMap(([s,i])=>Array.isArray(i)?i.map(o=>[s,String(o)]):[[s,String(i)]]);return""+new URLSearchParams(r).toString()}function mi(e){if(!e)return"";const t=Th(e)?decodeURIComponent(e):decodeURIComponent(encodeURIComponent(e));return t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t}function Zh(e,t){const r=e;return[...new URLSearchParams(r).entries()].reduce((i,[o,a])=>{const c=i[o];return c==null?i[o]=mi(a):i[o]=Array.isArray(c)?[...c,mi(a)]:[c,mi(a)],i},{})}const Jh=Gh(JSON.parse),Wh=Qh(JSON.stringify,JSON.parse);function Gh(e){return t=>{t.substring(0,1)==="?"&&(t=t.substring(1));const r=Zh(t);for(const n in r){const s=r[n];if(typeof s=="string")try{r[n]=e(s)}catch{}}return r}}function Qh(e,t){function r(n){if(typeof n=="object"&&n!==null)try{return e(n)}catch{}else if(typeof n=="string"&&typeof t=="function")try{return t(n),e(n)}catch{}return n}return n=>{n={...n},Object.keys(n).forEach(i=>{const o=n[i];typeof o>"u"||o===void 0?delete n[i]:n[i]=r(o)});const s=$h(n).toString();return s?`?${s}`:""}}const Ue="__root__";function Zt(e){return!!(e!=null&&e.isRedirect)}function gi(e){return!!(e!=null&&e.isRedirect)&&e.href}function _r(e){const t=e.resolvedLocation,r=e.location,n=(t==null?void 0:t.pathname)!==r.pathname,s=(t==null?void 0:t.href)!==r.href,i=(t==null?void 0:t.hash)!==r.hash;return{fromLocation:t,toLocation:r,pathChanged:n,hrefChanged:s,hashChanged:i}}class Yh{constructor(t){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.startTransition=r=>r(),this.update=r=>{var n;r.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const s=this.options;this.options={...this.options,...r},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(i=>[encodeURIComponent(i),i])):void 0,(!this.basepath||r.basepath&&r.basepath!==s.basepath)&&(r.basepath===void 0||r.basepath===""||r.basepath==="/"?this.basepath="/":this.basepath=`/${Nh(r.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?Ih({initialEntries:[this.basepath||"/"]}):Mh()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new po(ef(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(i=>!["redirected"].includes(i.status))}}}),Vh(this)),typeof window<"u"&&"CSS"in window&&typeof((n=window.CSS)==null?void 0:n.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[r.id]=r);const n=o=>{o.forEach((a,c)=>{a.init({originalIndex:c,defaultSsr:this.options.defaultSsr});const l=this.routesById[a.id];if(dt(!l,`Duplicate routes found with id: ${String(a.id)}`),this.routesById[a.id]=a,!a.isRoot&&a.path){const u=Gt(a.fullPath);(!this.routesByPath[u]||a.fullPath.endsWith("/"))&&(this.routesByPath[u]=a)}const d=a.children;d!=null&&d.length&&n(d)})};n([this.routeTree]);const s=[];Object.values(this.routesById).forEach((o,a)=>{var c;if(o.isRoot||!o.path)return;const l=Io(o.fullPath),d=Tr(l);for(;d.length>1&&((c=d[0])==null?void 0:c.value)==="/";)d.shift();const u=d.map(f=>f.value==="/"?.75:f.type==="param"?.5:f.type==="wildcard"?.25:1);s.push({child:o,trimmed:l,parsed:d,index:a,scores:u})}),this.flatRoutes=s.sort((o,a)=>{const c=Math.min(o.scores.length,a.scores.length);for(let l=0;l<c;l++)if(o.scores[l]!==a.scores[l])return a.scores[l]-o.scores[l];if(o.scores.length!==a.scores.length)return a.scores.length-o.scores.length;for(let l=0;l<c;l++)if(o.parsed[l].value!==a.parsed[l].value)return o.parsed[l].value>a.parsed[l].value?1:-1;return o.index-a.index}).map((o,a)=>(o.child.rank=a,o.child))},this.subscribe=(r,n)=>{const s={eventType:r,fn:n};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=r=>{this.subscribers.forEach(n=>{n.eventType===r.type&&n.fn(r)})},this.parseLocation=(r,n)=>{const s=({pathname:c,search:l,hash:d,state:u})=>{const f=this.options.parseSearch(l),m=this.options.stringifySearch(f);return{pathname:c,searchStr:m,search:Me(r==null?void 0:r.search,f),hash:d.split("#").reverse()[0]??"",href:`${c}${m}${d}`,state:Me(r==null?void 0:r.state,u)}},i=s(n??this.history.location),{__tempLocation:o,__tempKey:a}=i.state;if(o&&(!a||a===this.tempLocationKey)){const c=s(o);return c.state.key=i.state.key,delete c.state.__tempLocation,{...c,maskedLocation:i}}return i},this.resolvePathWithBase=(r,n)=>qh({basepath:this.basepath,base:r,to:ei(n),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.matchRoutes=(r,n,s)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:n},s):this.matchRoutesInternal(r,n),this.getMatchedRoutes=(r,n)=>{let s={};const i=Gt(r.pathname),o=d=>ws(this.basepath,i,{to:d.fullPath,caseSensitive:d.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let a=(n==null?void 0:n.to)!==void 0?this.routesByPath[n.to]:void 0;a?s=o(a):a=this.flatRoutes.find(d=>{const u=o(d);return u?(s=u,!0):!1});let c=a||this.routesById[Ue];const l=[c];for(;c.parentRoute;)c=c.parentRoute,l.unshift(c);return{matchedRoutes:l,routeParams:s,foundRoute:a}},this.cancelMatch=r=>{const n=this.getMatch(r);n&&(n.abortController.abort(),clearTimeout(n.pendingTimeout))},this.cancelMatches=()=>{var r;(r=this.state.pendingMatches)==null||r.forEach(n=>{this.cancelMatch(n.id)})},this.buildLocation=r=>{const n=(i={},o)=>{var a,c,l,d,u,f,m;const g=i._fromLocation?this.matchRoutes(i._fromLocation,{_buildLocation:!0}):this.state.matches,p=i.from!=null?g.find(I=>ws(this.basepath,Gt(I.pathname),{to:i.from,caseSensitive:!1,fuzzy:!1})):void 0,b=(p==null?void 0:p.pathname)||this.latestLocation.pathname;dt(i.from==null||p!=null,"Could not find match for from: "+i.from);const w=(a=this.state.pendingMatches)!=null&&a.length?(c=hr(this.state.pendingMatches))==null?void 0:c.search:((l=hr(g))==null?void 0:l.search)||this.latestLocation.search,_=o==null?void 0:o.matchedRoutes.filter(I=>g.find(T=>T.routeId===I.id));let P;if(i.to){const I=(p==null?void 0:p.fullPath)||((d=hr(g))==null?void 0:d.fullPath)||this.latestLocation.pathname;P=this.resolvePathWithBase(I,`${i.to}`)}else{const I=this.routesById[(u=_==null?void 0:_.find(T=>{const U=bs({path:T.fullPath,params:(o==null?void 0:o.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;return pt([this.basepath,U])===b}))==null?void 0:u.id];P=this.resolvePathWithBase(b,(I==null?void 0:I.to)??b)}const O={...(f=hr(g))==null?void 0:f.params};let j=(i.params??!0)===!0?O:{...O,...Wt(i.params,O)};Object.keys(j).length>0&&(o==null||o.matchedRoutes.map(I=>{var T;return((T=I.options.params)==null?void 0:T.stringify)??I.options.stringifyParams}).filter(Boolean).forEach(I=>{j={...j,...I(j)}})),P=bs({path:P,params:j??{},leaveWildcards:!1,leaveParams:r.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;let C=w;if(r._includeValidateSearch&&((m=this.options.search)!=null&&m.strict)){let I={};o==null||o.matchedRoutes.forEach(T=>{try{T.options.validateSearch&&(I={...I,...vi(T.options.validateSearch,{...I,...C})??{}})}catch{}}),C=I}C=(I=>{const T=(o==null?void 0:o.matchedRoutes.reduce((q,B)=>{var V;const W=[];if("search"in B.options)(V=B.options.search)!=null&&V.middlewares&&W.push(...B.options.search.middlewares);else if(B.options.preSearchFilters||B.options.postSearchFilters){const Y=({search:G,next:ve})=>{let te=G;"preSearchFilters"in B.options&&B.options.preSearchFilters&&(te=B.options.preSearchFilters.reduce((oe,ae)=>ae(oe),G));const re=ve(te);return"postSearchFilters"in B.options&&B.options.postSearchFilters?B.options.postSearchFilters.reduce((oe,ae)=>ae(oe),re):re};W.push(Y)}if(r._includeValidateSearch&&B.options.validateSearch){const Y=({search:G,next:ve})=>{const te=ve(G);try{return{...te,...vi(B.options.validateSearch,te)??{}}}catch{return te}};W.push(Y)}return q.concat(W)},[]))??[],U=({search:q})=>i.search?i.search===!0?q:Wt(i.search,q):{};T.push(U);const H=(q,B)=>{if(q>=T.length)return B;const V=T[q];return V({search:B,next:Y=>H(q+1,Y)})};return H(0,I)})(C),C=Me(w,C);const R=this.options.stringifySearch(C),S=i.hash===!0?this.latestLocation.hash:i.hash?Wt(i.hash,this.latestLocation.hash):void 0,L=S?`#${S}`:"";let N=i.state===!0?this.latestLocation.state:i.state?Wt(i.state,this.latestLocation.state):{};return N=Me(this.latestLocation.state,N),{pathname:P,search:C,searchStr:R,state:N,hash:S??"",href:`${P}${R}${L}`,unmaskOnReload:i.unmaskOnReload}},s=(i={},o)=>{var a;const c=n(i);let l=o?n(o):void 0;if(!l){let f={};const m=(a=this.options.routeMasks)==null?void 0:a.find(g=>{const p=ws(this.basepath,c.pathname,{to:g.from,caseSensitive:!1,fuzzy:!1});return p?(f=p,!0):!1});if(m){const{from:g,...p}=m;o={...go(r,["from"]),...p,params:f},l=n(o)}}const d=this.getMatchedRoutes(c,i),u=n(i,d);if(l){const f=this.getMatchedRoutes(l,o),m=n(o,f);u.maskedLocation=m}return u};return r.mask?s(r,{...go(r,["from"]),...r.mask}):s(r)},this.commitLocation=({viewTransition:r,ignoreBlocker:n,...s})=>{const i=()=>{const c=["key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(d=>{s.state[d]=this.latestLocation.state[d]});const l=yr(s.state,this.latestLocation.state);return c.forEach(d=>{delete s.state[d]}),l},o=this.latestLocation.href===s.href,a=this.commitLocationPromise;if(this.commitLocationPromise=dr(()=>{a==null||a.resolve()}),o&&i())this.load();else{let{maskedLocation:c,hashScrollIntoView:l,...d}=s;c&&(d={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...d,search:d.searchStr,state:{...d.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(d.unmaskOnReload??this.options.unmaskOnReload??!1)&&(d.state.__tempKey=this.tempLocationKey)),d.state.__hashScrollIntoViewOptions=l??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[s.replace?"replace":"push"](d.href,d.state,{ignoreBlocker:n})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:n,hashScrollIntoView:s,viewTransition:i,ignoreBlocker:o,href:a,...c}={})=>{if(a){const d=this.history.location.state.__TSR_index,u=Yn(a,{__TSR_index:r?d:d+1});c.to=u.pathname,c.search=this.options.parseSearch(u.search),c.hash=u.hash.slice(1)}const l=this.buildLocation({...c,_includeValidateSearch:!0});return this.commitLocation({...l,viewTransition:i,replace:r,resetScroll:n,hashScrollIntoView:s,ignoreBlocker:o})},this.navigate=({to:r,reloadDocument:n,href:s,...i})=>{if(n){if(!s){const o=this.buildLocation({to:r,...i});s=this.history.createHref(o.href)}i.replace?window.location.replace(s):window.location.href=s;return}return this.buildAndCommitLocation({...i,href:s,to:r})},this.load=async r=>{this.latestLocation=this.parseLocation(this.latestLocation);let n,s,i;for(i=new Promise(o=>{this.startTransition(async()=>{var a;try{const c=this.latestLocation,l=this.state.resolvedLocation;this.cancelMatches();let d;pi(()=>{d=this.matchRoutes(c),this.__store.setState(u=>({...u,status:"pending",isLoading:!0,location:c,pendingMatches:d,cachedMatches:u.cachedMatches.filter(f=>!d.find(m=>m.id===f.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",..._r({resolvedLocation:l,location:c})}),this.emit({type:"onBeforeLoad",..._r({resolvedLocation:l,location:c})}),await this.loadMatches({sync:r==null?void 0:r.sync,matches:d,location:c,onReady:async()=>{this.startViewTransition(async()=>{let u,f,m;pi(()=>{this.__store.setState(g=>{const p=g.matches,b=g.pendingMatches||g.matches;return u=p.filter(w=>!b.find(_=>_.id===w.id)),f=b.filter(w=>!p.find(_=>_.id===w.id)),m=p.filter(w=>b.find(_=>_.id===w.id)),{...g,isLoading:!1,loadedAt:Date.now(),matches:b,pendingMatches:void 0,cachedMatches:[...g.cachedMatches,...u.filter(w=>w.status!=="error")]}}),this.clearExpiredCache()}),[[u,"onLeave"],[f,"onEnter"],[m,"onStay"]].forEach(([g,p])=>{g.forEach(b=>{var w,_;(_=(w=this.looseRoutesById[b.routeId].options)[p])==null||_.call(w,b)})})})}})}catch(c){gi(c)?(n=c,this.isServer||this.navigate({...n,replace:!0,ignoreBlocker:!0})):Te(c)&&(s=c),this.__store.setState(l=>({...l,statusCode:n?n.statusCode:s?404:l.matches.some(d=>d.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===i&&((a=this.commitLocationPromise)==null||a.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()&&this.__store.setState(o=>({...o,statusCode:404}))},this.startViewTransition=r=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;typeof n=="object"&&this.isViewTransitionTypesSupported?s={update:r,types:n.types}:s=r,document.startViewTransition(s)}else r()},this.updateMatch=(r,n)=>{var s;let i;const o=(s=this.state.pendingMatches)==null?void 0:s.find(d=>d.id===r),a=this.state.matches.find(d=>d.id===r),c=this.state.cachedMatches.find(d=>d.id===r),l=o?"pendingMatches":a?"matches":c?"cachedMatches":"";return l&&this.__store.setState(d=>{var u;return{...d,[l]:(u=d[l])==null?void 0:u.map(f=>f.id===r?i=n(f):f)}}),i},this.getMatch=r=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(n=>n.id===r),this.loadMatches=async({location:r,matches:n,preload:s,onReady:i,updateMatch:o=this.updateMatch,sync:a})=>{let c,l=!1;const d=async()=>{l||(l=!0,await(i==null?void 0:i()))},u=m=>!!(s&&!this.state.matches.find(g=>g.id===m));!this.isServer&&!this.state.matches.length&&d();const f=(m,g)=>{var p,b,w,_;if(gi(g)&&!g.reloadDocument)throw g;if(Zt(g)||Te(g)){if(o(m.id,P=>({...P,status:Zt(g)?"redirected":Te(g)?"notFound":"error",isFetching:!1,error:g,beforeLoadPromise:void 0,loaderPromise:void 0})),g.routeId||(g.routeId=m.routeId),(p=m.beforeLoadPromise)==null||p.resolve(),(b=m.loaderPromise)==null||b.resolve(),(w=m.loadPromise)==null||w.resolve(),Zt(g))throw l=!0,g=this.resolveRedirect({...g,_fromLocation:r}),g;if(Te(g))throw this._handleNotFound(n,g,{updateMatch:o}),(_=this.serverSsr)==null||_.onMatchSettled({router:this,match:this.getMatch(m.id)}),g}};try{await new Promise((m,g)=>{(async()=>{var p,b,w,_;try{const P=(C,x,R)=>{var S,L;const{id:N,routeId:I}=n[C],T=this.looseRoutesById[I];if(x instanceof Promise)throw x;x.routerCode=R,c=c??C,f(this.getMatch(N),x);try{(L=(S=T.options).onError)==null||L.call(S,x)}catch(U){x=U,f(this.getMatch(N),x)}o(N,U=>{var H,q;return(H=U.beforeLoadPromise)==null||H.resolve(),(q=U.loadPromise)==null||q.resolve(),{...U,error:x,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[C,{id:x,routeId:R}]of n.entries()){const S=this.getMatch(x),L=(p=n[C-1])==null?void 0:p.id,N=this.looseRoutesById[R],I=N.options.pendingMs??this.options.defaultPendingMs,T=!!(i&&!this.isServer&&!u(x)&&(N.options.loader||N.options.beforeLoad)&&typeof I=="number"&&I!==1/0&&(N.options.pendingComponent??((b=this.options)==null?void 0:b.defaultPendingComponent)));let U=!0;if((S.beforeLoadPromise||S.loaderPromise)&&(T&&setTimeout(()=>{try{d()}catch{}},I),await S.beforeLoadPromise,U=this.getMatch(x).status!=="success"),U){try{o(x,ce=>{const Q=ce.loadPromise;return{...ce,loadPromise:dr(()=>{Q==null||Q.resolve()}),beforeLoadPromise:dr()}});const H=new AbortController;let q;T&&(q=setTimeout(()=>{try{d()}catch{}},I));const{paramsError:B,searchError:V}=this.getMatch(x);B&&P(C,B,"PARSE_PARAMS"),V&&P(C,V,"VALIDATE_SEARCH");const W=()=>L?this.getMatch(L).context:this.options.context??{};o(x,ce=>({...ce,isFetching:"beforeLoad",fetchCount:ce.fetchCount+1,abortController:H,pendingTimeout:q,context:{...W(),...ce.__routeContext}}));const{search:Y,params:G,context:ve,cause:te}=this.getMatch(x),re=u(x),oe={search:Y,abortController:H,params:G,preload:re,context:ve,location:r,navigate:ce=>this.navigate({...ce,_fromLocation:r}),buildLocation:this.buildLocation,cause:re?"preload":te,matches:n},ae=await((_=(w=N.options).beforeLoad)==null?void 0:_.call(w,oe))??{};(Zt(ae)||Te(ae))&&P(C,ae,"BEFORE_LOAD"),o(x,ce=>({...ce,__beforeLoadContext:ae,context:{...W(),...ce.__routeContext,...ae},abortController:H}))}catch(H){P(C,H,"BEFORE_LOAD")}o(x,H=>{var q;return(q=H.beforeLoadPromise)==null||q.resolve(),{...H,beforeLoadPromise:void 0,isFetching:!1}})}}const O=n.slice(0,c),j=[];O.forEach(({id:C,routeId:x},R)=>{j.push((async()=>{const{loaderPromise:S}=this.getMatch(C);let L=!1,N=!1;if(S){await S;const I=this.getMatch(C);I.error&&f(I,I.error)}else{const I=j[R-1],T=this.looseRoutesById[x],U=()=>{const{params:te,loaderDeps:re,abortController:oe,context:ae,cause:ce}=this.getMatch(C),Q=u(C);return{params:te,deps:re,preload:!!Q,parentMatchPromise:I,abortController:oe,context:ae,location:r,navigate:ie=>this.navigate({...ie,_fromLocation:r}),cause:Q?"preload":ce,route:T}},H=Date.now()-this.getMatch(C).updatedAt,q=u(C),B=q?T.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:T.options.staleTime??this.options.defaultStaleTime??0,V=T.options.shouldReload,W=typeof V=="function"?V(U()):V;o(C,te=>({...te,loaderPromise:dr(),preload:!!q&&!this.state.matches.find(re=>re.id===C)}));const Y=async()=>{var te,re,oe,ae,ce,Q,ie,$e,ke,Ze,ze;try{const Oe=async()=>{const de=this.getMatch(C);de.minPendingPromise&&await de.minPendingPromise};try{this.loadRouteChunk(T),o(C,Ht=>({...Ht,isFetching:"loader"}));const de=await((re=(te=T.options).loader)==null?void 0:re.call(te,U()));f(this.getMatch(C),de),await T._lazyPromise,await Oe();const ye={matches:n,match:this.getMatch(C),params:this.getMatch(C).params,loaderData:de},fe=(ae=(oe=T.options).head)==null?void 0:ae.call(oe,ye),_t=fe==null?void 0:fe.meta,st=fe==null?void 0:fe.links,ms=fe==null?void 0:fe.scripts,ne=(Q=(ce=T.options).scripts)==null?void 0:Q.call(ce,ye),ue=($e=(ie=T.options).headers)==null?void 0:$e.call(ie,{loaderData:de});o(C,Ht=>({...Ht,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:de,meta:_t,links:st,headScripts:ms,headers:ue,scripts:ne}))}catch(de){let ye=de;await Oe(),f(this.getMatch(C),de);try{(Ze=(ke=T.options).onError)==null||Ze.call(ke,de)}catch(fe){ye=fe,f(this.getMatch(C),fe)}o(C,fe=>({...fe,error:ye,status:"error",isFetching:!1}))}(ze=this.serverSsr)==null||ze.onMatchSettled({router:this,match:this.getMatch(C)}),await T._componentsPromise}catch(Oe){o(C,de=>({...de,loaderPromise:void 0})),f(this.getMatch(C),Oe)}},{status:G,invalid:ve}=this.getMatch(C);L=G==="success"&&(ve||(W??H>B)),q&&T.options.preload===!1||(L&&!a?(N=!0,(async()=>{try{await Y();const{loaderPromise:te,loadPromise:re}=this.getMatch(C);te==null||te.resolve(),re==null||re.resolve(),o(C,oe=>({...oe,loaderPromise:void 0}))}catch(te){gi(te)&&await this.navigate(te)}})()):(G!=="success"||L&&a)&&await Y())}if(!N){const{loaderPromise:I,loadPromise:T}=this.getMatch(C);I==null||I.resolve(),T==null||T.resolve()}return o(C,I=>({...I,isFetching:N?I.isFetching:!1,loaderPromise:N?I.loaderPromise:void 0,invalid:!1})),this.getMatch(C)})())}),await Promise.all(j),m()}catch(P){g(P)}})()}),await d()}catch(m){if(Zt(m)||Te(m))throw Te(m)&&!s&&await d(),m}return n},this.invalidate=r=>{const n=s=>{var i;return((i=r==null?void 0:r.filter)==null?void 0:i.call(r,s))??!0?{...s,invalid:!0,...s.status==="error"?{status:"pending",error:void 0}:{}}:s};return this.__store.setState(s=>{var i;return{...s,matches:s.matches.map(n),cachedMatches:s.cachedMatches.map(n),pendingMatches:(i=s.pendingMatches)==null?void 0:i.map(n)}}),this.load({sync:r==null?void 0:r.sync})},this.resolveRedirect=r=>{const n=r;return n.href||(n.href=this.buildLocation(n).href),n},this.clearCache=r=>{const n=r==null?void 0:r.filter;n!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(i=>!n(i))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const r=n=>{const s=this.looseRoutesById[n.routeId];if(!s.options.loader)return!0;const i=(n.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(n.status!=="error"&&Date.now()-n.updatedAt<i)};this.clearCache({filter:r})},this.loadRouteChunk=r=>(r._lazyPromise===void 0&&(r.lazyFn?r._lazyPromise=r.lazyFn().then(n=>{const{id:s,...i}=n.options;Object.assign(r.options,i)}):r._lazyPromise=Promise.resolve()),r._componentsPromise===void 0&&(r._componentsPromise=r._lazyPromise.then(()=>Promise.all(Hu.map(async n=>{const s=r.options[n];s!=null&&s.preload&&await s.preload()})))),r._componentsPromise),this.preloadRoute=async r=>{const n=this.buildLocation(r);let s=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:r});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id)),o=new Set([...i,...this.state.cachedMatches.map(a=>a.id)]);pi(()=>{s.forEach(a=>{o.has(a.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,a]}))})});try{return s=await this.loadMatches({matches:s,location:n,preload:!0,updateMatch:(a,c)=>{i.has(a)?s=s.map(l=>l.id===a?c(l):l):this.updateMatch(a,c)}}),s}catch(a){if(Zt(a))return a.reloadDocument?void 0:await this.preloadRoute({...a,_fromLocation:n});Te(a)||console.error(a);return}},this.matchRoute=(r,n)=>{const s={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},i=this.buildLocation(s);if(n!=null&&n.pending&&this.state.status!=="pending")return!1;const a=((n==null?void 0:n.pending)===void 0?!this.state.isLoading:n.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,c=ws(this.basepath,a.pathname,{...n,to:i.pathname});return!c||r.params&&!yr(c,r.params,{partial:!0})?!1:c&&((n==null?void 0:n.includeSearch)??!0)?yr(a.search,i.search,{partial:!0})?c:!1:c},this._handleNotFound=(r,n,{updateMatch:s=this.updateMatch}={})=>{var i;const o=this.routesById[n.routeId??""]??this.routeTree,a={};for(const l of r)a[l.routeId]=l;!o.options.notFoundComponent&&((i=this.options)!=null&&i.defaultNotFoundComponent)&&(o.options.notFoundComponent=this.options.defaultNotFoundComponent),dt(o.options.notFoundComponent);const c=a[o.id];dt(c,"Could not find match for route: "+o.id),s(c.id,l=>({...l,status:"notFound",error:n,isFetching:!1})),n.routerCode==="BEFORE_LOAD"&&o.parentRoute&&(n.routeId=o.parentRoute.id,this._handleNotFound(r,n,{updateMatch:s}))},this.hasNotFoundMatch=()=>this.__store.state.matches.some(r=>r.status==="notFound"||r.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Wh,parseSearch:t.parseSearch??Jh}),typeof document<"u"&&(window.__TSR_ROUTER__=this)}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,r){const{foundRoute:n,matchedRoutes:s,routeParams:i}=this.getMatchedRoutes(t,r==null?void 0:r.dest);let o=!1;(n?n.path!=="/"&&i["**"]:Gt(t.pathname))&&(this.options.notFoundRoute?s.push(this.options.notFoundRoute):o=!0);const a=(()=>{if(o){if(this.options.notFoundMode!=="root")for(let u=s.length-1;u>=0;u--){const f=s[u];if(f.children)return f.id}return Ue}})(),c=s.map(u=>{var f;let m;const g=((f=u.options.params)==null?void 0:f.parse)??u.options.parseParams;if(g)try{const p=g(i);Object.assign(i,p)}catch(p){if(m=new Xh(p.message,{cause:p}),r!=null&&r.throwOnError)throw m;return m}}),l=[],d=u=>(u==null?void 0:u.id)?u.context??this.options.context??{}:this.options.context??{};return s.forEach((u,f)=>{var m,g;const p=l[f-1],[b,w,_]=(()=>{const T=(p==null?void 0:p.search)??t.search,U=(p==null?void 0:p._strictSearch)??{};try{const H=vi(u.options.validateSearch,{...T})??{};return[{...T,...H},{...U,...H},void 0]}catch(H){let q=H;if(H instanceof Us||(q=new Us(H.message,{cause:H})),r!=null&&r.throwOnError)throw q;return[T,{},q]}})(),P=((g=(m=u.options).loaderDeps)==null?void 0:g.call(m,{search:b}))??"",O=P?JSON.stringify(P):"",{usedParams:j,interpolatedPath:C}=bs({path:u.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),x=bs({path:u.id,params:i,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath+O,R=this.getMatch(x),S=this.state.matches.find(T=>T.routeId===u.id),L=S?"stay":"enter";let N;if(R)N={...R,cause:L,params:S?Me(S.params,i):i,_strictParams:j,search:Me(S?S.search:R.search,b),_strictSearch:w};else{const T=u.options.loader||u.options.beforeLoad||u.lazyFn||tf(u)?"pending":"success";N={id:x,index:f,routeId:u.id,params:S?Me(S.params,i):i,_strictParams:j,pathname:pt([this.basepath,C]),updatedAt:Date.now(),search:S?Me(S.search,b):b,_strictSearch:w,searchError:void 0,status:T,isFetching:!1,error:void 0,paramsError:c[f],__routeContext:{},__beforeLoadContext:{},context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:S?Me(S.loaderDeps,P):P,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:u.options.staticData||{},loadPromise:dr(),fullPath:u.fullPath}}r!=null&&r.preload||(N.globalNotFound=a===u.id),N.searchError=_;const I=d(p);N.context={...I,...N.__routeContext,...N.__beforeLoadContext},l.push(N)}),l.forEach((u,f)=>{var m,g,p,b,w,_,P,O;const j=this.looseRoutesById[u.routeId];if(!this.getMatch(u.id)&&(r==null?void 0:r._buildLocation)!==!0){const x=l[f-1],R=d(x),S={deps:u.loaderDeps,params:u.params,context:R,location:t,navigate:L=>this.navigate({...L,_fromLocation:t}),buildLocation:this.buildLocation,cause:u.cause,abortController:u.abortController,preload:!!u.preload,matches:l};u.__routeContext=((g=(m=j.options).context)==null?void 0:g.call(m,S))??{},u.context={...R,...u.__routeContext,...u.__beforeLoadContext}}if(u.status==="success"){u.headers=(b=(p=j.options).headers)==null?void 0:b.call(p,{loaderData:u.loaderData});const x={matches:l,match:u,params:u.params,loaderData:u.loaderData},R=(_=(w=j.options).head)==null?void 0:_.call(w,x);u.links=R==null?void 0:R.links,u.headScripts=R==null?void 0:R.scripts,u.meta=R==null?void 0:R.meta,u.scripts=(O=(P=j.options).scripts)==null?void 0:O.call(P,x)}}),l}}class Us extends Error{}class Xh extends Error{}function ef(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function vi(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Us("Async validation not supported");if(r.issues)throw new Us(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}const Hu=["component","errorComponent","pendingComponent","notFoundComponent"];function tf(e){var t;for(const r of Hu)if((t=e.options[r])!=null&&t.preload)return!0;return!1}const rf="Error preloading route! ☝️";class Bu{constructor(t){if(this.init=r=>{var n,s;this.originalIndex=r.originalIndex;const i=this.options,o=!(i!=null&&i.path)&&!(i!=null&&i.id);if(this.parentRoute=(s=(n=this.options).getParentRoute)==null?void 0:s.call(n),o)this._path=Ue;else if(!this.parentRoute)throw new Error("Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");let a=o?Ue:i==null?void 0:i.path;a&&a!=="/"&&(a=Io(a));const c=(i==null?void 0:i.id)||a;let l=o?Ue:pt([this.parentRoute.id===Ue?"":this.parentRoute.id,c]);a===Ue&&(a="/"),l!==Ue&&(l=pt(["/",l]));const d=l===Ue?"/":pt([this.parentRoute.fullPath,a]);this._path=a,this._id=l,this._fullPath=d,this._to=d,this._ssr=(i==null?void 0:i.ssr)??r.defaultSsr??!0},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}get ssr(){return this._ssr}}class nf extends Bu{constructor(t){super(t)}}function Lo(e){const t=e.errorComponent??ti;return h.jsx(sf,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:n})=>r?v.createElement(t,{error:r,reset:n}):e.children})}class sf extends v.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,r){r.error&&r.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,r){this.props.onCatch&&this.props.onCatch(t,r)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function ti({error:e}){const[t,r]=v.useState(!1);return h.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[h.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),h.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(n=>!n),children:t?"Hide Error":"Show Error"})]}),h.jsx("div",{style:{height:".25rem"}}),t?h.jsx("div",{children:h.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?h.jsx("code",{children:e.message}):null})}):null]})}var yi={exports:{}},_i={},bi={exports:{}},wi={};/**
2
- * @license React
3
- * use-sync-external-store-shim.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 Sa;function of(){if(Sa)return wi;Sa=1;var e=mu();function t(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,s=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function a(u,f){var m=f(),g=n({inst:{value:m,getSnapshot:f}}),p=g[0].inst,b=g[1];return i(function(){p.value=m,p.getSnapshot=f,c(p)&&b({inst:p})},[u,m,f]),s(function(){return c(p)&&b({inst:p}),u(function(){c(p)&&b({inst:p})})},[u]),o(m),m}function c(u){var f=u.getSnapshot;u=u.value;try{var m=f();return!r(u,m)}catch{return!0}}function l(u,f){return f()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:a;return wi.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,wi}var Ra;function af(){return Ra||(Ra=1,bi.exports=of()),bi.exports}/**
10
- * @license React
11
- * use-sync-external-store-shim/with-selector.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 Pa;function cf(){if(Pa)return _i;Pa=1;var e=mu(),t=af();function r(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var n=typeof Object.is=="function"?Object.is:r,s=t.useSyncExternalStore,i=e.useRef,o=e.useEffect,a=e.useMemo,c=e.useDebugValue;return _i.useSyncExternalStoreWithSelector=function(l,d,u,f,m){var g=i(null);if(g.current===null){var p={hasValue:!1,value:null};g.current=p}else p=g.current;g=a(function(){function w(C){if(!_){if(_=!0,P=C,C=f(C),m!==void 0&&p.hasValue){var x=p.value;if(m(x,C))return O=x}return O=C}if(x=O,n(P,C))return x;var R=f(C);return m!==void 0&&m(x,R)?(P=C,x):(P=C,O=R)}var _=!1,P,O,j=u===void 0?null:u;return[function(){return w(d())},j===null?void 0:function(){return w(j())}]},[d,u,f,m]);var b=s(l,g[0],g[1]);return o(function(){p.hasValue=!0,p.value=b},[b]),c(b),b},_i}var Ca;function uf(){return Ca||(Ca=1,yi.exports=cf()),yi.exports}var lf=uf();function df(e,t=r=>r){return lf.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,hf)}function hf(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,s]of e)if(!t.has(n)||!Object.is(s,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}const Si=v.createContext(null);function Vu(){return typeof document>"u"?Si:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Si,Si)}function De(e){const t=v.useContext(Vu());return e==null||e.warn,t}function ge(e){const t=De({warn:(e==null?void 0:e.router)===void 0}),r=(e==null?void 0:e.router)||t,n=v.useRef(void 0);return df(r.__store,s=>{if(e!=null&&e.select){if(e.structuralSharing??r.options.defaultStructuralSharing){const i=Me(n.current,e.select(s));return n.current=i,i}return e.select(s)}return s})}const ri=v.createContext(void 0),ff=v.createContext(void 0);function Lt(e){const t=v.useContext(e.from?ff:ri);return ge({select:n=>{const s=n.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(dt(!((e.shouldThrow??!0)&&!s),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),s!==void 0)return e.select?e.select(s):s},structuralSharing:e.structuralSharing})}function Ku(e){return Lt({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function $u(e){const{select:t,...r}=e;return Lt({...r,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function Zu(e){return Lt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.params):t.params})}function Ju(e){return Lt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Wu(e){const{navigate:t}=De();return v.useCallback(r=>t({from:e==null?void 0:e.from,...r}),[e==null?void 0:e.from,t])}let pf=class extends Bu{constructor(t){super(t),this.useMatch=r=>Lt({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Lt({...r,from:this.id,select:n=>r!=null&&r.select?r.select(n.context):n.context}),this.useSearch=r=>Ju({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Zu({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>$u({...r,from:this.id}),this.useLoaderData=r=>Ku({...r,from:this.id}),this.useNavigate=()=>Wu({from:this.fullPath}),this.$$typeof=Symbol.for("react.memo")}};function yo(e){return new pf(e)}let mf=class extends nf{constructor(t){super(t),this.useMatch=r=>Lt({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Lt({...r,from:this.id,select:n=>r!=null&&r.select?r.select(n.context):n.context}),this.useSearch=r=>Ju({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Zu({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>$u({...r,from:this.id}),this.useLoaderData=r=>Ku({...r,from:this.id}),this.useNavigate=()=>Wu({from:this.fullPath}),this.$$typeof=Symbol.for("react.memo")}};function gf(e){return new mf(e)}function vf(e){const t=ge({select:r=>`not-found-${r.location.pathname}-${r.status}`});return h.jsx(Lo,{getResetKey:()=>t,onCatch:(r,n)=>{var s;if(Te(r))(s=e.onCatch)==null||s.call(e,r,n);else throw r},errorComponent:({error:r})=>{var n;if(Te(r))return(n=e.fallback)==null?void 0:n.call(e,r);throw r},children:e.children})}function yf(){return h.jsx("p",{children:"Not Found"})}function ks(e){return h.jsx(h.Fragment,{children:e.children})}function Gu(e,t,r){return t.options.notFoundComponent?h.jsx(t.options.notFoundComponent,{data:r}):e.options.defaultNotFoundComponent?h.jsx(e.options.defaultNotFoundComponent,{data:r}):h.jsx(yf,{})}var Ri,Aa;function _f(){if(Aa)return Ri;Aa=1;const e={},t=e.hasOwnProperty,r=(R,S)=>{for(const L in R)t.call(R,L)&&S(L,R[L])},n=(R,S)=>(S&&r(S,(L,N)=>{R[L]=N}),R),s=(R,S)=>{const L=R.length;let N=-1;for(;++N<L;)S(R[N])},i=R=>"\\u"+("0000"+R).slice(-4),o=(R,S)=>{let L=R.toString(16);return S?L:L.toUpperCase()},a=e.toString,c=Array.isArray,l=R=>typeof Buffer=="function"&&Buffer.isBuffer(R),d=R=>a.call(R)=="[object Object]",u=R=>typeof R=="string"||a.call(R)=="[object String]",f=R=>typeof R=="number"||a.call(R)=="[object Number]",m=R=>typeof R=="bigint",g=R=>typeof R=="function",p=R=>a.call(R)=="[object Map]",b=R=>a.call(R)=="[object Set]",w={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},_=/[\\\b\f\n\r\t]/,P=/[0-9]/,O=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,j=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,C=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,x=(R,S)=>{const L=()=>{B=q,++S.indentLevel,q=S.indent.repeat(S.indentLevel)},N={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},I=S&&S.json;I&&(N.quotes="double",N.wrap=!0),S=n(N,S),S.quotes!="single"&&S.quotes!="double"&&S.quotes!="backtick"&&(S.quotes="single");const T=S.quotes=="double"?'"':S.quotes=="backtick"?"`":"'",U=S.compact,H=S.lowercaseHex;let q=S.indent.repeat(S.indentLevel),B="";const V=S.__inline1__,W=S.__inline2__,Y=U?"":`
18
- `;let G,ve=!0;const te=S.numbers=="binary",re=S.numbers=="octal",oe=S.numbers=="decimal",ae=S.numbers=="hexadecimal";if(I&&R&&g(R.toJSON)&&(R=R.toJSON()),!u(R)){if(p(R))return R.size==0?"new Map()":(U||(S.__inline1__=!0,S.__inline2__=!1),"new Map("+x(Array.from(R),S)+")");if(b(R))return R.size==0?"new Set()":"new Set("+x(Array.from(R),S)+")";if(l(R))return R.length==0?"Buffer.from([])":"Buffer.from("+x(Array.from(R),S)+")";if(c(R))return G=[],S.wrap=!0,V&&(S.__inline1__=!1,S.__inline2__=!0),W||L(),s(R,Q=>{ve=!1,W&&(S.__inline2__=!1),G.push((U||W?"":q)+x(Q,S))}),ve?"[]":W?"["+G.join(", ")+"]":"["+Y+G.join(","+Y)+Y+(U?"":B)+"]";if(f(R)||m(R)){if(I)return JSON.stringify(Number(R));let Q;if(oe)Q=String(R);else if(ae){let ie=R.toString(16);H||(ie=ie.toUpperCase()),Q="0x"+ie}else te?Q="0b"+R.toString(2):re&&(Q="0o"+R.toString(8));return m(R)?Q+"n":Q}else return m(R)?I?JSON.stringify(Number(R)):R+"n":d(R)?(G=[],S.wrap=!0,L(),r(R,(Q,ie)=>{ve=!1,G.push((U?"":q)+x(Q,S)+":"+(U?"":" ")+x(ie,S))}),ve?"{}":"{"+Y+G.join(","+Y)+Y+(U?"":B)+"}"):I?JSON.stringify(R)||"null":String(R)}const ce=S.escapeEverything?j:C;return G=R.replace(ce,(Q,ie,$e,ke,Ze,ze)=>{if(ie){if(S.minimal)return ie;const de=ie.charCodeAt(0),ye=ie.charCodeAt(1);if(S.es6){const fe=(de-55296)*1024+ye-56320+65536;return"\\u{"+o(fe,H)+"}"}return i(o(de,H))+i(o(ye,H))}if($e)return i(o($e.charCodeAt(0),H));if(Q=="\0"&&!I&&!P.test(ze.charAt(Ze+1)))return"\\0";if(ke)return ke==T||S.escapeEverything?"\\"+ke:ke;if(_.test(Q))return w[Q];if(S.minimal&&!O.test(Q))return Q;const Oe=o(Q.charCodeAt(0),H);return I||Oe.length>2?i(Oe):"\\x"+("00"+Oe).slice(-2)}),T=="`"&&(G=G.replace(/\$\{/g,"\\${")),S.isScriptContext&&(G=G.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,I?"\\u003C!--":"\\x3C!--")),S.wrap&&(G=T+G+T),G};return x.version="3.0.2",Ri=x,Ri}_f();function bf({children:e,log:t}){return typeof document<"u"?null:h.jsx("script",{className:"tsr-once",dangerouslySetInnerHTML:{__html:[e,"",'if (typeof __TSR_SSR__ !== "undefined") __TSR_SSR__.cleanScripts()'].filter(Boolean).join(`
19
- `)}})}function wf(){const e=De(),r=(e.options.getScrollRestorationKey||vo)(e.latestLocation),n=r!==vo(e.latestLocation)?r:null;return!e.isScrollRestoring||!e.isServer?null:h.jsx(bf,{children:`(${Uu.toString()})(${JSON.stringify(qs)},${JSON.stringify(n)}, undefined, true)`,log:!1})}const Qu=v.memo(function({matchId:t}){var r,n;const s=De(),i=ge({select:w=>{var _;return(_=w.matches.find(P=>P.id===t))==null?void 0:_.routeId}});dt(i);const o=s.routesById[i],a=o.options.pendingComponent??s.options.defaultPendingComponent,c=a?h.jsx(a,{}):null,l=o.options.errorComponent??s.options.defaultErrorComponent,d=o.options.onCatch??s.options.defaultOnCatch,u=o.isRoot?o.options.notFoundComponent??((r=s.options.notFoundRoute)==null?void 0:r.options.component):o.options.notFoundComponent,f=(!o.isRoot||o.options.wrapInSuspense)&&(o.options.wrapInSuspense??a??((n=o.options.errorComponent)==null?void 0:n.preload))?v.Suspense:ks,m=l?Lo:ks,g=u?vf:ks,p=ge({select:w=>w.loadedAt}),b=ge({select:w=>{var _;const P=w.matches.findIndex(O=>O.id===t);return(_=w.matches[P-1])==null?void 0:_.routeId}});return h.jsxs(h.Fragment,{children:[h.jsx(ri.Provider,{value:t,children:h.jsx(f,{fallback:c,children:h.jsx(m,{getResetKey:()=>p,errorComponent:l||ti,onCatch:(w,_)=>{if(Te(w))throw w;d==null||d(w,_)},children:h.jsx(g,{fallback:w=>{if(!u||w.routeId&&w.routeId!==i||!w.routeId&&!o.isRoot)throw w;return v.createElement(u,w)},children:h.jsx(Rf,{matchId:t})})})})}),b===Ue&&s.options.scrollRestoration?h.jsxs(h.Fragment,{children:[h.jsx(Sf,{}),h.jsx(wf,{})]}):null]})});function Sf(){var e;const t=De(),r=v.useRef(void 0);return h.jsx("script",{suppressHydrationWarning:!0,ref:n=>{var s;n&&(r.current===void 0||r.current.href!==((s=t.state.resolvedLocation)==null?void 0:s.href))&&(t.emit({type:"onRendered",..._r(t.state)}),r.current=t.state.resolvedLocation)}},(e=t.state.resolvedLocation)==null?void 0:e.state.key)}const Rf=v.memo(function({matchId:t}){var r,n,s;const i=De(),{match:o,key:a,routeId:c}=ge({select:f=>{const m=f.matches.findIndex(P=>P.id===t),g=f.matches[m],p=g.routeId,b=i.routesById[p].options.remountDeps??i.options.defaultRemountDeps,w=b==null?void 0:b({routeId:p,loaderDeps:g.loaderDeps,params:g._strictParams,search:g._strictSearch});return{key:w?JSON.stringify(w):void 0,routeId:p,match:go(g,["id","status","error"])}},structuralSharing:!0}),l=i.routesById[c],d=v.useMemo(()=>{const f=l.options.component??i.options.defaultComponent;return f?h.jsx(f,{},a):h.jsx(To,{})},[a,l.options.component,i.options.defaultComponent]),u=(l.options.errorComponent??i.options.defaultErrorComponent)||ti;if(o.status==="notFound")return dt(Te(o.error)),Gu(i,l,o.error);if(o.status==="redirected")throw dt(Zt(o.error)),(r=i.getMatch(o.id))==null?void 0:r.loadPromise;if(o.status==="error"){if(i.isServer)return h.jsx(u,{error:o.error,reset:void 0,info:{componentStack:""}});throw o.error}if(o.status==="pending"){const f=l.options.pendingMinMs??i.options.defaultPendingMinMs;if(f&&!((n=i.getMatch(o.id))!=null&&n.minPendingPromise)&&!i.isServer){const m=dr();Promise.resolve().then(()=>{i.updateMatch(o.id,g=>({...g,minPendingPromise:m}))}),setTimeout(()=>{m.resolve(),i.updateMatch(o.id,g=>({...g,minPendingPromise:void 0}))},f)}throw(s=i.getMatch(o.id))==null?void 0:s.loadPromise}return d}),To=v.memo(function(){const t=De(),r=v.useContext(ri),n=ge({select:l=>{var d;return(d=l.matches.find(u=>u.id===r))==null?void 0:d.routeId}}),s=t.routesById[n],i=ge({select:l=>{const u=l.matches.find(f=>f.id===r);return dt(u),u.globalNotFound}}),o=ge({select:l=>{var d;const u=l.matches,f=u.findIndex(m=>m.id===r);return(d=u[f+1])==null?void 0:d.id}});if(i)return Gu(t,s,void 0);if(!o)return null;const a=h.jsx(Qu,{matchId:o}),c=t.options.defaultPendingComponent?h.jsx(t.options.defaultPendingComponent,{}):null;return r===Ue?h.jsx(v.Suspense,{fallback:c,children:a}):a}),Kn=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Pi(e){const t=v.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function Pf(e,t,r={},n={}){const s=v.useRef(typeof IntersectionObserver=="function"),i=v.useRef(null);return v.useEffect(()=>{if(!(!e.current||!s.current||n.disabled))return i.current=new IntersectionObserver(([o])=>{t(o)},r),i.current.observe(e.current),()=>{var o;(o=i.current)==null||o.disconnect()}},[t,r,n.disabled,e]),i.current}function Cf(e){const t=v.useRef(null);return v.useImperativeHandle(e,()=>t.current,[]),t}function Af(){const e=De(),t=v.useRef({router:e,mounted:!1}),r=ge({select:({isLoading:u})=>u}),[n,s]=v.useState(!1),i=ge({select:u=>u.matches.some(f=>f.status==="pending"),structuralSharing:!0}),o=Pi(r),a=r||n||i,c=Pi(a),l=r||i,d=Pi(l);return e.isServer||(e.startTransition=u=>{s(!0),v.startTransition(()=>{u(),s(!1)})}),v.useEffect(()=>{const u=e.history.subscribe(e.load),f=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Gt(e.latestLocation.href)!==Gt(f.href)&&e.commitLocation({...f,replace:!0}),()=>{u()}},[e,e.history]),Kn(()=>{if(typeof window<"u"&&e.clientSsr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(f){console.error(f)}})()},[e]),Kn(()=>{o&&!r&&e.emit({type:"onLoad",..._r(e.state)})},[o,e,r]),Kn(()=>{d&&!l&&e.emit({type:"onBeforeRouteMount",..._r(e.state)})},[l,d,e]),Kn(()=>{c&&!a&&(e.emit({type:"onResolved",..._r(e.state)}),e.__store.setState(u=>({...u,status:"idle",resolvedLocation:u.location})),Kh(e))},[a,c,e]),null}function xf(){const e=De(),t=e.options.defaultPendingComponent?h.jsx(e.options.defaultPendingComponent,{}):null,r=e.isServer||typeof document<"u"&&e.clientSsr?ks:v.Suspense,n=h.jsxs(r,{fallback:t,children:[h.jsx(Af,{}),h.jsx(Of,{})]});return e.options.InnerWrap?h.jsx(e.options.InnerWrap,{children:n}):n}function Of(){const e=ge({select:r=>{var n;return(n=r.matches[0])==null?void 0:n.id}}),t=ge({select:r=>r.loadedAt});return h.jsx(ri.Provider,{value:e,children:h.jsx(Lo,{getResetKey:()=>t,errorComponent:ti,onCatch:r=>{r.message||r.toString()},children:e?h.jsx(Qu,{matchId:e}):null})})}function Ef(e){return ge({select:t=>{const r=t.matches;return e!=null&&e.select?e.select(r):r},structuralSharing:e==null?void 0:e.structuralSharing})}function jf(e,t){const r=De(),[n,s]=v.useState(!1),i=v.useRef(!1),o=Cf(t),{activeProps:a=()=>({className:"active"}),inactiveProps:c=()=>({}),activeOptions:l,to:d,preload:u,preloadDelay:f,hashScrollIntoView:m,replace:g,startTransition:p,resetScroll:b,viewTransition:w,children:_,target:P,disabled:O,style:j,className:C,onClick:x,onFocus:R,onMouseEnter:S,onMouseLeave:L,onTouchStart:N,ignoreBlocker:I,...T}=e,{params:U,search:H,hash:q,state:B,mask:V,reloadDocument:W,...Y}=T,G=v.useMemo(()=>{try{return new URL(`${d}`),"external"}catch{}return"internal"},[d]),ve=ge({select:ne=>ne.location.search,structuralSharing:!0}),te=Ef({select:ne=>{var ue;return e.from??((ue=ne[ne.length-1])==null?void 0:ue.fullPath)}}),re=v.useMemo(()=>({...e,from:te}),[e,te]),oe=v.useMemo(()=>r.buildLocation(re),[r,re,ve]),ae=v.useMemo(()=>re.reloadDocument?!1:u??r.options.defaultPreload,[r.options.defaultPreload,u,re.reloadDocument]),ce=f??r.options.defaultPreloadDelay??0,Q=ge({select:ne=>{if(l!=null&&l.exact){if(!Dh(ne.location.pathname,oe.pathname,r.basepath))return!1}else{const ue=Ns(ne.location.pathname,r.basepath).split("/");if(!Ns(oe.pathname,r.basepath).split("/").every((yd,_d)=>yd===ue[_d]))return!1}return((l==null?void 0:l.includeSearch)??!0)&&!yr(ne.location.search,oe.search,{partial:!(l!=null&&l.exact),ignoreUndefined:!(l!=null&&l.explicitUndefined)})?!1:l!=null&&l.includeHash?ne.location.hash===oe.hash:!0}}),ie=v.useCallback(()=>{r.preloadRoute(re).catch(ne=>{console.warn(ne),console.warn(rf)})},[re,r]),$e=v.useCallback(ne=>{ne!=null&&ne.isIntersecting&&ie()},[ie]);if(Pf(o,$e,{rootMargin:"100px"},{disabled:!!O||ae!=="viewport"}),Kn(()=>{i.current||!O&&ae==="render"&&(ie(),i.current=!0)},[O,ie,ae]),G==="external")return{...Y,ref:o,type:G,href:d,..._&&{children:_},...P&&{target:P},...O&&{disabled:O},...j&&{style:j},...C&&{className:C},...x&&{onClick:x},...R&&{onFocus:R},...S&&{onMouseEnter:S},...L&&{onMouseLeave:L},...N&&{onTouchStart:N}};const ke=ne=>{if(!O&&!kf(ne)&&!ne.defaultPrevented&&(!P||P==="_self")&&ne.button===0){ne.preventDefault(),vu.flushSync(()=>{s(!0)});const ue=r.subscribe("onResolved",()=>{ue(),s(!1)});return r.navigate({...re,replace:g,resetScroll:b,hashScrollIntoView:m,startTransition:p,viewTransition:w,ignoreBlocker:I})}},Ze=ne=>{O||ae&&ie()},ze=Ze,Oe=ne=>{if(O)return;const ue=ne.target||{};if(ae){if(ue.preloadTimeout)return;ue.preloadTimeout=setTimeout(()=>{ue.preloadTimeout=null,ie()},ce)}},de=ne=>{if(O)return;const ue=ne.target||{};ue.preloadTimeout&&(clearTimeout(ue.preloadTimeout),ue.preloadTimeout=null)},ye=ne=>ue=>{var Ht;(Ht=ue.persist)==null||Ht.call(ue),ne.filter(Boolean).forEach(oa=>{ue.defaultPrevented||oa(ue)})},fe=Q?Wt(a,{})??{}:{},_t=Q?{}:Wt(c,{}),st=[C,fe.className,_t.className].filter(Boolean).join(" "),ms={...j,...fe.style,..._t.style};return{...Y,...fe,..._t,href:O?void 0:oe.maskedLocation?r.history.createHref(oe.maskedLocation.href):r.history.createHref(oe.href),ref:o,onClick:ye([x,ke]),onFocus:ye([R,Ze]),onMouseEnter:ye([S,Oe]),onMouseLeave:ye([L,de]),onTouchStart:ye([N,ze]),disabled:!!O,target:P,...Object.keys(ms).length&&{style:ms},...st&&{className:st},...O&&{role:"link","aria-disabled":!0},...Q&&{"data-status":"active","aria-current":"page"},...n&&{"data-transitioning":"transitioning"}}}const Hs=v.forwardRef((e,t)=>{const{_asChild:r,...n}=e,{type:s,ref:i,...o}=jf(n,t),a=typeof n.children=="function"?n.children({isActive:o["data-status"]==="active"}):n.children;return typeof r>"u"&&delete o.disabled,v.createElement(r||"a",{...o,ref:i},a)});function kf(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const zf=e=>new Mf(e);class Mf extends Yh{constructor(t){super(t)}}function If({router:e,children:t,...r}){e.update({...e.options,...r,context:{...e.options.context,...r.context}});const n=Vu(),s=h.jsx(n.Provider,{value:e,children:t});return e.options.Wrap?h.jsx(e.options.Wrap,{children:s}):s}function Lf({router:e,...t}){return h.jsx(If,{router:e,...t,children:h.jsx(xf,{})})}const Tf=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),v.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]),Nf=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,72H212V64a28,28,0,0,0-28-28H40A28,28,0,0,0,12,64v88a28,28,0,0,0,28,28h96v12a28,28,0,0,0,28,28h60a28,28,0,0,0,28-28V100A28,28,0,0,0,224,72ZM40,156a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H184a4,4,0,0,1,4,4v8H164a28,28,0,0,0-28,28v56Zm188,36a4,4,0,0,1-4,4H164a4,4,0,0,1-4-4V100a4,4,0,0,1,4-4h60a4,4,0,0,1,4,4ZM124,208a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h24A12,12,0,0,1,124,208Zm88-84a12,12,0,0,1-12,12H188a12,12,0,0,1,0-24h12A12,12,0,0,1,212,124Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M200,64V80H176a16,16,0,0,0-16,16v80H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H184A16,16,0,0,1,200,64Z",opacity:"0.2"}),v.createElement("path",{d:"M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72Zm8,120a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,74H206V64a22,22,0,0,0-22-22H40A22,22,0,0,0,18,64v96a22,22,0,0,0,22,22H154v10a22,22,0,0,0,22,22h48a22,22,0,0,0,22-22V96A22,22,0,0,0,224,74ZM40,170a10,10,0,0,1-10-10V64A10,10,0,0,1,40,54H184a10,10,0,0,1,10,10V74H176a22,22,0,0,0-22,22v74Zm194,22a10,10,0,0,1-10,10H176a10,10,0,0,1-10-10V96a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10ZM134,208a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h40A6,6,0,0,1,134,208Zm80-96a6,6,0,0,1-6,6H192a6,6,0,0,1,0-12h16A6,6,0,0,1,214,112Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,76H204V64a20,20,0,0,0-20-20H40A20,20,0,0,0,20,64v96a20,20,0,0,0,20,20H156v12a20,20,0,0,0,20,20h48a20,20,0,0,0,20-20V96A20,20,0,0,0,224,76ZM40,172a12,12,0,0,1-12-12V64A12,12,0,0,1,40,52H184a12,12,0,0,1,12,12V76H176a20,20,0,0,0-20,20v76Zm196,20a12,12,0,0,1-12,12H176a12,12,0,0,1-12-12V96a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12ZM132,208a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h40A4,4,0,0,1,132,208Zm80-96a4,4,0,0,1-4,4H192a4,4,0,0,1,0-8h16A4,4,0,0,1,212,112Z"}))]]),Df=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,187a113.4,113.4,0,0,1-20.39-35h40.82a116.94,116.94,0,0,1-10,20.77A108.61,108.61,0,0,1,128,207Zm-26.49-59a135.42,135.42,0,0,1,0-40h53a135.42,135.42,0,0,1,0,40ZM44,128a83.49,83.49,0,0,1,2.43-20H77.25a160.63,160.63,0,0,0,0,40H46.43A83.49,83.49,0,0,1,44,128Zm84-79a113.4,113.4,0,0,1,20.39,35H107.59a116.94,116.94,0,0,1,10-20.77A108.61,108.61,0,0,1,128,49Zm50.73,59h30.82a83.52,83.52,0,0,1,0,40H178.75a160.63,160.63,0,0,0,0-40Zm20.77-24H173.71a140.82,140.82,0,0,0-15.5-34.36A84.51,84.51,0,0,1,199.52,84ZM97.79,49.64A140.82,140.82,0,0,0,82.29,84H56.48A84.51,84.51,0,0,1,97.79,49.64ZM56.48,172H82.29a140.82,140.82,0,0,0,15.5,34.36A84.51,84.51,0,0,1,56.48,172Zm101.73,34.36A140.82,140.82,0,0,0,173.71,172h25.81A84.51,84.51,0,0,1,158.21,206.36Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),v.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm78.36,64H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM216,128a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM128,43a115.27,115.27,0,0,1,26,45H102A115.11,115.11,0,0,1,128,43ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48Zm50.35,61.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,28h0A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,190.61c-6.33-6.09-23-24.41-31.27-54.61h62.54C151,194.2,134.33,212.52,128,218.61ZM94.82,156a140.42,140.42,0,0,1,0-56h66.36a140.42,140.42,0,0,1,0,56ZM128,37.39c6.33,6.09,23,24.41,31.27,54.61H96.73C105,61.8,121.67,43.48,128,37.39ZM169.41,100h46.23a92.09,92.09,0,0,1,0,56H169.41a152.65,152.65,0,0,0,0-56Zm43.25-8h-45a129.39,129.39,0,0,0-29.19-55.4A92.25,92.25,0,0,1,212.66,92ZM117.54,36.6A129.39,129.39,0,0,0,88.35,92h-45A92.25,92.25,0,0,1,117.54,36.6ZM40.36,100H86.59a152.65,152.65,0,0,0,0,56H40.36a92.09,92.09,0,0,1,0-56Zm3,64h45a129.39,129.39,0,0,0,29.19,55.4A92.25,92.25,0,0,1,43.34,164Zm95.12,55.4A129.39,129.39,0,0,0,167.65,164h45A92.25,92.25,0,0,1,138.46,219.4Z"}))]]),qf=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M222.14,105.85l-80-80a20,20,0,0,0-28.28,0l-80,80A19.86,19.86,0,0,0,28,120v96a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V120A19.86,19.86,0,0,0,222.14,105.85ZM204,204H52V121.65l76-76,76,76Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,120v96H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z",opacity:"0.2"}),v.createElement("path",{d:"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8H216a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H48V120l80-80,80,80Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,120v96a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a15.87,15.87,0,0,1,4.69-11.32l80-80a16,16,0,0,1,22.62,0l80,80A15.87,15.87,0,0,1,224,120Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M217.9,110.1l-80-80a14,14,0,0,0-19.8,0l-80,80A13.92,13.92,0,0,0,34,120v96a6,6,0,0,0,6,6H216a6,6,0,0,0,6-6V120A13.92,13.92,0,0,0,217.9,110.1ZM210,210H46V120a2,2,0,0,1,.58-1.42l80-80a2,2,0,0,1,2.84,0l80,80A2,2,0,0,1,210,120Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8H216a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H48V120l80-80,80,80Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216.49,111.51l-80-80a12,12,0,0,0-17,0l-80,80A12,12,0,0,0,36,120v96a4,4,0,0,0,4,4H216a4,4,0,0,0,4-4V120A12,12,0,0,0,216.49,111.51ZM212,212H44V120a4,4,0,0,1,1.17-2.83l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,212,120Z"}))]]),Ff=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M235.79,142.88a12,12,0,0,0,4.7-19.87L125,7.52a12,12,0,0,0-17,0L70.25,45.29,48.48,23.52a12,12,0,0,0-17,17L53.28,62.26,12.2,103.35a28,28,0,0,0,0,39.6l84.86,84.86a28,28,0,0,0,39.6,0L214.48,150Zm-31.58-14.77a12,12,0,0,0-4.7,2.9l-79.82,79.83a4,4,0,0,1-5.66,0L29.17,126a4,4,0,0,1,0-5.66L70.25,79.24l24.29,24.29a32,32,0,0,0,52.09,35.11h0a32,32,0,0,0-35.12-52.08L87.23,62.26,116.52,33l93.27,93.28Zm-85.87-17.75,0,0a8,8,0,1,1-.06.06ZM256,208a24,24,0,0,1-48,0c0-19.44,12.93-37.23,14.4-39.2a12,12,0,0,1,19.2,0C243.07,170.78,256,188.57,256,208Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M248,208a16,16,0,0,1-32,0c0-16,16-40,16-40S248,192,248,208Zm-16-76.52-24,8-79.83,79.83a16,16,0,0,1-22.63,0L20.69,134.46a16,16,0,0,1,0-22.63L116.52,16Zm-93.86-29.62a20,20,0,1,0,0,28.28A20,20,0,0,0,138.14,101.86Z",opacity:"0.2"}),v.createElement("path",{d:"M238.66,163.56a8,8,0,0,0-13.32,0C223.57,166.23,208,190.09,208,208a24,24,0,0,0,48,0C256,190.09,240.43,166.23,238.66,163.56ZM232,216a8,8,0,0,1-8-8c0-6.8,4-16.32,8-24.08,4,7.76,8,17.34,8,24.08A8,8,0,0,1,232,216Zm2.53-76.93a8,8,0,0,0,3.13-13.24L122.17,10.34a8,8,0,0,0-11.31,0L70.25,51,45.65,26.34A8,8,0,0,0,34.34,37.66l24.6,24.6L15,106.17a24,24,0,0,0,0,33.94L99.89,225a24,24,0,0,0,33.94,0l78.49-78.49Zm-32.19-5.24-79.83,79.83a8,8,0,0,1-11.31,0L26.34,128.8a8,8,0,0,1,0-11.31L70.25,73.57l29.12,29.12a28,28,0,1,0,11.31-11.32L81.57,62.26l35-34.95L217.19,128l-11.72,3.9A8.09,8.09,0,0,0,202.34,133.83Zm-86.83-26.31,0,0a13.26,13.26,0,1,1-.05.06S115.51,107.53,115.51,107.52Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M256,208a24,24,0,0,1-48,0c0-17.91,15.57-41.77,17.34-44.44a8,8,0,0,1,13.32,0C240.43,166.23,256,190.09,256,208ZM132.49,124.49a12,12,0,0,0-17-17l0,0s0,0,0,0a12,12,0,0,0,17,16.94ZM37.65,18.34A8,8,0,0,0,26.34,29.66l32.6,32.6L70.25,51ZM234.53,139.07a8,8,0,0,0,3.13-13.24L122.17,10.34a8,8,0,0,0-11.31,0L70.25,51l40.43,40.42a28,28,0,1,1-11.31,11.32L58.94,62.26,15,106.17a24,24,0,0,0,0,33.94L99.89,225a24,24,0,0,0,33.94,0l78.49-78.49Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M237,164.67a6,6,0,0,0-10,0c-.7,1-17,25.72-17,43.33a22,22,0,0,0,44,0C254,190.39,237.69,165.71,237,164.67ZM232,218a10,10,0,0,1-10-10c0-8.17,5.37-19.92,10-28.34,4.63,8.41,10,20.15,10,28.34A10,10,0,0,1,232,218Zm1.9-80.82a6,6,0,0,0,2.34-9.94L120.76,11.76a6,6,0,0,0-8.49,0l-42,42-26-26a6,6,0,0,0-8.49,8.48l26,26L16.44,107.59a22,22,0,0,0,0,31.11l84.86,84.86a22,22,0,0,0,31.11,0l78.83-78.83Zm-30.14-1.94-79.83,79.83a10,10,0,0,1-14.14,0L24.93,130.21a10,10,0,0,1,0-14.14L70.25,70.75l31.62,31.61a26,26,0,0,0,3.75,32,26,26,0,0,0,36.76,0h0a26,26,0,0,0-32-40.51L78.74,62.26l37.78-37.77L220.89,128.86l-14.79,4.93A6.07,6.07,0,0,0,203.76,135.24ZM114.1,106.11l0,0a14,14,0,1,1,0,19.82,13.91,13.91,0,0,1,0-19.82Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M234.53,139.07a8,8,0,0,0,3.13-13.24L122.17,10.34a8,8,0,0,0-11.31,0L70.25,51,45.65,26.34A8,8,0,0,0,34.34,37.66l24.6,24.6L15,106.17a24,24,0,0,0,0,33.94L99.89,225a24,24,0,0,0,33.94,0l78.49-78.49Zm-32.19-5.24-79.83,79.83a8,8,0,0,1-11.31,0L26.34,128.8a8,8,0,0,1,0-11.31L70.25,73.57l29.12,29.12a28,28,0,1,0,11.31-11.32L81.57,62.26l35-34.95L217.19,128l-11.72,3.9A8.09,8.09,0,0,0,202.34,133.83Zm-86.83-26.31,0,0a13.26,13.26,0,1,1-.05.06S115.51,107.53,115.51,107.52Zm123.15,56a8,8,0,0,0-13.32,0C223.57,166.23,208,190.09,208,208a24,24,0,0,0,48,0C256,190.09,240.43,166.23,238.66,163.56ZM232,216a8,8,0,0,1-8-8c0-6.8,4-16.32,8-24.08,4,7.76,8,17.34,8,24.08A8,8,0,0,1,232,216Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M235.33,165.78a4,4,0,0,0-6.66,0C228,166.8,212,191,212,208a20,20,0,0,0,40,0C252,191,236,166.8,235.33,165.78ZM232,220a12,12,0,0,1-12-12c0-10.25,7.49-24.64,12-32.37,4.51,7.73,12,22.1,12,32.37A12,12,0,0,1,232,220Zm3.89-87.6a4,4,0,0,0-1.06-3.74L119.34,13.17a4,4,0,0,0-5.65,0L70.25,56.6,42.82,29.17a4,4,0,0,0-5.65,5.66L64.6,62.26,17.86,109a20,20,0,0,0,0,28.29l84.85,84.85a20,20,0,0,0,28.29,0L210.16,143l23.1-7.7A4,4,0,0,0,235.89,132.4Zm-29.15,3.29a4.06,4.06,0,0,0-1.57,1l-79.83,79.82a12,12,0,0,1-17,0L23.51,131.63a12,12,0,0,1,0-17L70.25,67.92l34.2,34.2A24,24,0,0,0,141,133h0a24,24,0,0,0-30.86-36.51l-34.2-34.2,40.61-40.6L224.59,129.74Zm-94.05-31a0,0,0,0,0,0,0,16,16,0,1,1,0,22.64,16,16,0,0,1,0-22.64Z"}))]]),Uf=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),v.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),Yu=v.forwardRef((e,t)=>v.createElement(Hr,{ref:t,...e,weights:Tf}));Yu.displayName="ArrowLeftIcon";const Xu=v.forwardRef((e,t)=>v.createElement(Hr,{ref:t,...e,weights:Nf}));Xu.displayName="DevicesIcon";const el=v.forwardRef((e,t)=>v.createElement(Hr,{ref:t,...e,weights:Df}));el.displayName="GlobeIcon";const tl=v.forwardRef((e,t)=>v.createElement(Hr,{ref:t,...e,weights:qf}));tl.displayName="HouseSimpleIcon";const rl=v.forwardRef((e,t)=>v.createElement(Hr,{ref:t,...e,weights:Ff}));rl.displayName="PaintBucketIcon";const nl=v.forwardRef((e,t)=>v.createElement(Hr,{ref:t,...e,weights:Uf}));nl.displayName="PaperPlaneTiltIcon";function Hf(){return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center justify-center",children:[h.jsx("div",{className:"bg-contrast-0 p-5"}),h.jsx("div",{className:"bg-contrast-25 p-5"}),h.jsx("div",{className:"bg-contrast-50 p-5"}),h.jsx("div",{className:"bg-contrast-100 p-5"}),h.jsx("div",{className:"bg-contrast-200 p-5"}),h.jsx("div",{className:"bg-contrast-300 p-5"}),h.jsx("div",{className:"bg-contrast-400 p-5"}),h.jsx("div",{className:"bg-contrast-500 p-5"}),h.jsx("div",{className:"bg-contrast-600 p-5"}),h.jsx("div",{className:"bg-contrast-700 p-5"}),h.jsx("div",{className:"bg-contrast-800 p-5"}),h.jsx("div",{className:"bg-contrast-900 p-5"}),h.jsx("div",{className:"bg-contrast-950 p-5"}),h.jsx("div",{className:"bg-contrast-975 p-5"}),h.jsx("div",{className:"bg-contrast-1000 p-5"})]}),h.jsxs("div",{className:"flex items-center justify-center",children:[h.jsx("div",{className:"bg-primary-25 p-5"}),h.jsx("div",{className:"bg-primary-50 p-5"}),h.jsx("div",{className:"bg-primary-100 p-5"}),h.jsx("div",{className:"bg-primary-200 p-5"}),h.jsx("div",{className:"bg-primary-300 p-5"}),h.jsx("div",{className:"bg-primary-400 p-5"}),h.jsx("div",{className:"bg-primary-500 p-5"}),h.jsx("div",{className:"bg-primary-600 p-5"}),h.jsx("div",{className:"bg-primary-700 p-5"}),h.jsx("div",{className:"bg-primary-800 p-5"}),h.jsx("div",{className:"bg-primary-900 p-5"}),h.jsx("div",{className:"bg-primary-950 p-5"}),h.jsx("div",{className:"bg-primary-975 p-5"})]}),h.jsxs("div",{className:"flex items-center justify-center",children:[h.jsx("div",{className:"bg-error-25 p-5"}),h.jsx("div",{className:"bg-error-50 p-5"}),h.jsx("div",{className:"bg-error-100 p-5"}),h.jsx("div",{className:"bg-error-200 p-5"}),h.jsx("div",{className:"bg-error-300 p-5"}),h.jsx("div",{className:"bg-error-400 p-5"}),h.jsx("div",{className:"bg-error-500 p-5"}),h.jsx("div",{className:"bg-error-600 p-5"}),h.jsx("div",{className:"bg-error-700 p-5"}),h.jsx("div",{className:"bg-error-800 p-5"}),h.jsx("div",{className:"bg-error-900 p-5"}),h.jsx("div",{className:"bg-error-950 p-5"}),h.jsx("div",{className:"bg-error-975 p-5"})]}),h.jsxs("div",{className:"flex items-center justify-center",children:[h.jsx("div",{className:"bg-warning-25 p-5"}),h.jsx("div",{className:"bg-warning-50 p-5"}),h.jsx("div",{className:"bg-warning-100 p-5"}),h.jsx("div",{className:"bg-warning-200 p-5"}),h.jsx("div",{className:"bg-warning-300 p-5"}),h.jsx("div",{className:"bg-warning-400 p-5"}),h.jsx("div",{className:"bg-warning-500 p-5"}),h.jsx("div",{className:"bg-warning-600 p-5"}),h.jsx("div",{className:"bg-warning-700 p-5"}),h.jsx("div",{className:"bg-warning-800 p-5"}),h.jsx("div",{className:"bg-warning-900 p-5"}),h.jsx("div",{className:"bg-warning-950 p-5"}),h.jsx("div",{className:"bg-warning-975 p-5"})]}),h.jsxs("div",{className:"flex items-center justify-center",children:[h.jsx("div",{className:"bg-info-25 p-5"}),h.jsx("div",{className:"bg-info-50 p-5"}),h.jsx("div",{className:"bg-info-100 p-5"}),h.jsx("div",{className:"bg-info-200 p-5"}),h.jsx("div",{className:"bg-info-300 p-5"}),h.jsx("div",{className:"bg-info-400 p-5"}),h.jsx("div",{className:"bg-info-500 p-5"}),h.jsx("div",{className:"bg-info-600 p-5"}),h.jsx("div",{className:"bg-info-700 p-5"}),h.jsx("div",{className:"bg-info-800 p-5"}),h.jsx("div",{className:"bg-info-900 p-5"}),h.jsx("div",{className:"bg-info-950 p-5"}),h.jsx("div",{className:"bg-info-975 p-5"})]}),h.jsxs("div",{className:"flex items-center justify-center",children:[h.jsx("div",{className:"bg-success-25 p-5"}),h.jsx("div",{className:"bg-success-50 p-5"}),h.jsx("div",{className:"bg-success-100 p-5"}),h.jsx("div",{className:"bg-success-200 p-5"}),h.jsx("div",{className:"bg-success-300 p-5"}),h.jsx("div",{className:"bg-success-400 p-5"}),h.jsx("div",{className:"bg-success-500 p-5"}),h.jsx("div",{className:"bg-success-600 p-5"}),h.jsx("div",{className:"bg-success-700 p-5"}),h.jsx("div",{className:"bg-success-800 p-5"}),h.jsx("div",{className:"bg-success-900 p-5"}),h.jsx("div",{className:"bg-success-950 p-5"}),h.jsx("div",{className:"bg-success-975 p-5"})]}),h.jsxs("div",{className:"flex items-center justify-center",children:[h.jsx("div",{className:"bg-primary text-primary-contrast p-5",children:"Az"}),h.jsx("div",{className:"bg-error text-error-contrast p-5",children:"Az"}),h.jsx("div",{className:"bg-warning text-warning-contrast p-5",children:"Az"}),h.jsx("div",{className:"bg-success text-success-contrast p-5",children:"Az"})]})]})}const Bf=["top","right","bottom","left"],Tt=Math.min,Ee=Math.max,Bs=Math.round,Ss=Math.floor,et=e=>({x:e,y:e}),Vf={left:"right",right:"left",bottom:"top",top:"bottom"},Kf={start:"end",end:"start"};function _o(e,t,r){return Ee(e,Tt(t,r))}function gt(e,t){return typeof e=="function"?e(t):e}function vt(e){return e.split("-")[0]}function Kr(e){return e.split("-")[1]}function No(e){return e==="x"?"y":"x"}function Do(e){return e==="y"?"height":"width"}function Nt(e){return["top","bottom"].includes(vt(e))?"y":"x"}function qo(e){return No(Nt(e))}function $f(e,t,r){r===void 0&&(r=!1);const n=Kr(e),s=qo(e),i=Do(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Vs(o)),[o,Vs(o)]}function Zf(e){const t=Vs(e);return[bo(e),t,bo(t)]}function bo(e){return e.replace(/start|end/g,t=>Kf[t])}function Jf(e,t,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?i:o;default:return[]}}function Wf(e,t,r,n){const s=Kr(e);let i=Jf(vt(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(bo)))),i}function Vs(e){return e.replace(/left|right|bottom|top/g,t=>Vf[t])}function Gf(e){return{top:0,right:0,bottom:0,left:0,...e}}function sl(e){return typeof e!="number"?Gf(e):{top:e,right:e,bottom:e,left:e}}function Ks(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function xa(e,t,r){let{reference:n,floating:s}=e;const i=Nt(t),o=qo(t),a=Do(o),c=vt(t),l=i==="y",d=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2;let m;switch(c){case"top":m={x:d,y:n.y-s.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-s.width,y:u};break;default:m={x:n.x,y:n.y}}switch(Kr(t)){case"start":m[o]-=f*(r&&l?-1:1);break;case"end":m[o]+=f*(r&&l?-1:1);break}return m}const Qf=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:u}=xa(l,n,c),f=n,m={},g=0;for(let p=0;p<a.length;p++){const{name:b,fn:w}=a[p],{x:_,y:P,data:O,reset:j}=await w({x:d,y:u,initialPlacement:n,placement:f,strategy:s,middlewareData:m,rects:l,platform:o,elements:{reference:e,floating:t}});d=_??d,u=P??u,m={...m,[b]:{...m[b],...O}},j&&g<=50&&(g++,typeof j=="object"&&(j.placement&&(f=j.placement),j.rects&&(l=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):j.rects),{x:d,y:u}=xa(l,f,c)),p=-1)}return{x:d,y:u,placement:f,strategy:s,middlewareData:m}};async function Xn(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=gt(t,e),g=sl(m),b=a[f?u==="floating"?"reference":"floating":u],w=Ks(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),_=u==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),O=await(i.isElement==null?void 0:i.isElement(P))?await(i.getScale==null?void 0:i.getScale(P))||{x:1,y:1}:{x:1,y:1},j=Ks(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:P,strategy:c}):_);return{top:(w.top-j.top+g.top)/O.y,bottom:(j.bottom-w.bottom+g.bottom)/O.y,left:(w.left-j.left+g.left)/O.x,right:(j.right-w.right+g.right)/O.x}}const Yf=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=gt(e,t)||{};if(l==null)return{};const u=sl(d),f={x:r,y:n},m=qo(s),g=Do(m),p=await o.getDimensions(l),b=m==="y",w=b?"top":"left",_=b?"bottom":"right",P=b?"clientHeight":"clientWidth",O=i.reference[g]+i.reference[m]-f[m]-i.floating[g],j=f[m]-i.reference[m],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let x=C?C[P]:0;(!x||!await(o.isElement==null?void 0:o.isElement(C)))&&(x=a.floating[P]||i.floating[g]);const R=O/2-j/2,S=x/2-p[g]/2-1,L=Tt(u[w],S),N=Tt(u[_],S),I=L,T=x-p[g]-N,U=x/2-p[g]/2+R,H=_o(I,U,T),q=!c.arrow&&Kr(s)!=null&&U!==H&&i.reference[g]/2-(U<I?L:N)-p[g]/2<0,B=q?U<I?U-I:U-T:0;return{[m]:f[m]+B,data:{[m]:H,centerOffset:U-H-B,...q&&{alignmentOffset:B}},reset:q}}}),Xf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...b}=gt(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const w=vt(s),_=Nt(a),P=vt(a)===a,O=await(c.isRTL==null?void 0:c.isRTL(l.floating)),j=f||(P||!p?[Vs(a)]:Zf(a)),C=g!=="none";!f&&C&&j.push(...Wf(a,p,g,O));const x=[a,...j],R=await Xn(t,b),S=[];let L=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&S.push(R[w]),u){const U=$f(s,o,O);S.push(R[U[0]],R[U[1]])}if(L=[...L,{placement:s,overflows:S}],!S.every(U=>U<=0)){var N,I;const U=(((N=i.flip)==null?void 0:N.index)||0)+1,H=x[U];if(H)return{data:{index:U,overflows:L},reset:{placement:H}};let q=(I=L.filter(B=>B.overflows[0]<=0).sort((B,V)=>B.overflows[1]-V.overflows[1])[0])==null?void 0:I.placement;if(!q)switch(m){case"bestFit":{var T;const B=(T=L.filter(V=>{if(C){const W=Nt(V.placement);return W===_||W==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(W=>W>0).reduce((W,Y)=>W+Y,0)]).sort((V,W)=>V[1]-W[1])[0])==null?void 0:T[0];B&&(q=B);break}case"initialPlacement":q=a;break}if(s!==q)return{reset:{placement:q}}}return{}}}};function Oa(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ea(e){return Bf.some(t=>e[t]>=0)}const ep=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=gt(e,t);switch(n){case"referenceHidden":{const i=await Xn(t,{...s,elementContext:"reference"}),o=Oa(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Ea(o)}}}case"escaped":{const i=await Xn(t,{...s,altBoundary:!0}),o=Oa(i,r.floating);return{data:{escapedOffsets:o,escaped:Ea(o)}}}default:return{}}}}};async function tp(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=vt(r),a=Kr(r),c=Nt(r)==="y",l=["left","top"].includes(o)?-1:1,d=i&&c?-1:1,u=gt(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof g=="number"&&(m=a==="end"?g*-1:g),c?{x:m*d,y:f*l}:{x:f*l,y:m*d}}const rp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,c=await tp(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},np=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:w,y:_}=b;return{x:w,y:_}}},...c}=gt(e,t),l={x:r,y:n},d=await Xn(t,c),u=Nt(vt(s)),f=No(u);let m=l[f],g=l[u];if(i){const b=f==="y"?"top":"left",w=f==="y"?"bottom":"right",_=m+d[b],P=m-d[w];m=_o(_,m,P)}if(o){const b=u==="y"?"top":"left",w=u==="y"?"bottom":"right",_=g+d[b],P=g-d[w];g=_o(_,g,P)}const p=a.fn({...t,[f]:m,[u]:g});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[f]:i,[u]:o}}}}}},sp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=gt(e,t),d={x:r,y:n},u=Nt(s),f=No(u);let m=d[f],g=d[u];const p=gt(a,t),b=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const P=f==="y"?"height":"width",O=i.reference[f]-i.floating[P]+b.mainAxis,j=i.reference[f]+i.reference[P]-b.mainAxis;m<O?m=O:m>j&&(m=j)}if(l){var w,_;const P=f==="y"?"width":"height",O=["top","left"].includes(vt(s)),j=i.reference[u]-i.floating[P]+(O&&((w=o.offset)==null?void 0:w[u])||0)+(O?0:b.crossAxis),C=i.reference[u]+i.reference[P]+(O?0:((_=o.offset)==null?void 0:_[u])||0)-(O?b.crossAxis:0);g<j?g=j:g>C&&(g=C)}return{[f]:m,[u]:g}}}},ip=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:c=()=>{},...l}=gt(e,t),d=await Xn(t,l),u=vt(s),f=Kr(s),m=Nt(s)==="y",{width:g,height:p}=i.floating;let b,w;u==="top"||u==="bottom"?(b=u,w=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=u,b=f==="end"?"top":"bottom");const _=p-d.top-d.bottom,P=g-d.left-d.right,O=Tt(p-d[b],_),j=Tt(g-d[w],P),C=!t.middlewareData.shift;let x=O,R=j;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=P),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(x=_),C&&!f){const L=Ee(d.left,0),N=Ee(d.right,0),I=Ee(d.top,0),T=Ee(d.bottom,0);m?R=g-2*(L!==0||N!==0?L+N:Ee(d.left,d.right)):x=p-2*(I!==0||T!==0?I+T:Ee(d.top,d.bottom))}await c({...t,availableWidth:R,availableHeight:x});const S=await o.getDimensions(a.floating);return g!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}};function ni(){return typeof window<"u"}function $r(e){return il(e)?(e.nodeName||"").toLowerCase():"#document"}function je(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(il(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function il(e){return ni()?e instanceof Node||e instanceof je(e).Node:!1}function Ve(e){return ni()?e instanceof Element||e instanceof je(e).Element:!1}function tt(e){return ni()?e instanceof HTMLElement||e instanceof je(e).HTMLElement:!1}function ja(e){return!ni()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof je(e).ShadowRoot}function us(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Ke(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function op(e){return["table","td","th"].includes($r(e))}function si(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Fo(e){const t=Uo(),r=Ve(e)?Ke(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function ap(e){let t=Dt(e);for(;tt(t)&&!Nr(t);){if(Fo(t))return t;if(si(t))return null;t=Dt(t)}return null}function Uo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Nr(e){return["html","body","#document"].includes($r(e))}function Ke(e){return je(e).getComputedStyle(e)}function ii(e){return Ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Dt(e){if($r(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ja(e)&&e.host||nt(e);return ja(t)?t.host:t}function ol(e){const t=Dt(e);return Nr(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&us(t)?t:ol(t)}function es(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=ol(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=je(s);if(i){const a=wo(o);return t.concat(o,o.visualViewport||[],us(s)?s:[],a&&r?es(a):[])}return t.concat(s,es(s,[],r))}function wo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function al(e){const t=Ke(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=tt(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Bs(r)!==i||Bs(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Ho(e){return Ve(e)?e:e.contextElement}function br(e){const t=Ho(e);if(!tt(t))return et(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=al(t);let o=(i?Bs(r.width):r.width)/n,a=(i?Bs(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const cp=et(0);function cl(e){const t=je(e);return!Uo()||!t.visualViewport?cp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function up(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==je(e)?!1:t}function ar(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Ho(e);let o=et(1);t&&(n?Ve(n)&&(o=br(n)):o=br(e));const a=up(i,r,n)?cl(i):et(0);let c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,d=s.width/o.x,u=s.height/o.y;if(i){const f=je(i),m=n&&Ve(n)?je(n):n;let g=f,p=wo(g);for(;p&&n&&m!==g;){const b=br(p),w=p.getBoundingClientRect(),_=Ke(p),P=w.left+(p.clientLeft+parseFloat(_.paddingLeft))*b.x,O=w.top+(p.clientTop+parseFloat(_.paddingTop))*b.y;c*=b.x,l*=b.y,d*=b.x,u*=b.y,c+=P,l+=O,g=je(p),p=wo(g)}}return Ks({width:d,height:u,x:c,y:l})}function Bo(e,t){const r=ii(e).scrollLeft;return t?t.left+r:ar(nt(e)).left+r}function ul(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:Bo(e,n)),i=n.top+t.scrollTop;return{x:s,y:i}}function lp(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=nt(n),a=t?si(t.floating):!1;if(n===o||a&&i)return r;let c={scrollLeft:0,scrollTop:0},l=et(1);const d=et(0),u=tt(n);if((u||!u&&!i)&&(($r(n)!=="body"||us(o))&&(c=ii(n)),tt(n))){const m=ar(n);l=br(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}const f=o&&!u&&!i?ul(o,c,!0):et(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+d.x+f.x,y:r.y*l.y-c.scrollTop*l.y+d.y+f.y}}function dp(e){return Array.from(e.getClientRects())}function hp(e){const t=nt(e),r=ii(e),n=e.ownerDocument.body,s=Ee(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ee(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Bo(e);const a=-r.scrollTop;return Ke(n).direction==="rtl"&&(o+=Ee(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function fp(e,t){const r=je(e),n=nt(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const l=Uo();(!l||l&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function pp(e,t){const r=ar(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=tt(e)?br(e):et(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,c=s*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function ka(e,t,r){let n;if(t==="viewport")n=fp(e,r);else if(t==="document")n=hp(nt(e));else if(Ve(t))n=pp(t,r);else{const s=cl(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Ks(n)}function ll(e,t){const r=Dt(e);return r===t||!Ve(r)||Nr(r)?!1:Ke(r).position==="fixed"||ll(r,t)}function mp(e,t){const r=t.get(e);if(r)return r;let n=es(e,[],!1).filter(a=>Ve(a)&&$r(a)!=="body"),s=null;const i=Ke(e).position==="fixed";let o=i?Dt(e):e;for(;Ve(o)&&!Nr(o);){const a=Ke(o),c=Fo(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||us(o)&&!c&&ll(e,o))?n=n.filter(d=>d!==o):s=a,o=Dt(o)}return t.set(e,n),n}function gp(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?si(t)?[]:mp(t,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,d)=>{const u=ka(t,d,s);return l.top=Ee(u.top,l.top),l.right=Tt(u.right,l.right),l.bottom=Tt(u.bottom,l.bottom),l.left=Ee(u.left,l.left),l},ka(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function vp(e){const{width:t,height:r}=al(e);return{width:t,height:r}}function yp(e,t,r){const n=tt(t),s=nt(t),i=r==="fixed",o=ar(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=et(0);if(n||!n&&!i)if(($r(t)!=="body"||us(s))&&(a=ii(t)),n){const f=ar(t,!0,i,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&(c.x=Bo(s));const l=s&&!n&&!i?ul(s,a):et(0),d=o.left+a.scrollLeft-c.x-l.x,u=o.top+a.scrollTop-c.y-l.y;return{x:d,y:u,width:o.width,height:o.height}}function Ci(e){return Ke(e).position==="static"}function za(e,t){if(!tt(e)||Ke(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return nt(e)===r&&(r=r.ownerDocument.body),r}function dl(e,t){const r=je(e);if(si(e))return r;if(!tt(e)){let s=Dt(e);for(;s&&!Nr(s);){if(Ve(s)&&!Ci(s))return s;s=Dt(s)}return r}let n=za(e,t);for(;n&&op(n)&&Ci(n);)n=za(n,t);return n&&Nr(n)&&Ci(n)&&!Fo(n)?r:n||ap(e)||r}const _p=async function(e){const t=this.getOffsetParent||dl,r=this.getDimensions,n=await r(e.floating);return{reference:yp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bp(e){return Ke(e).direction==="rtl"}const wp={convertOffsetParentRelativeRectToViewportRelativeRect:lp,getDocumentElement:nt,getClippingRect:gp,getOffsetParent:dl,getElementRects:_p,getClientRects:dp,getDimensions:vp,getScale:br,isElement:Ve,isRTL:bp};function hl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sp(e,t){let r=null,n;const s=nt(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const l=e.getBoundingClientRect(),{left:d,top:u,width:f,height:m}=l;if(a||t(),!f||!m)return;const g=Ss(u),p=Ss(s.clientWidth-(d+f)),b=Ss(s.clientHeight-(u+m)),w=Ss(d),P={rootMargin:-g+"px "+-p+"px "+-b+"px "+-w+"px",threshold:Ee(0,Tt(1,c))||1};let O=!0;function j(C){const x=C[0].intersectionRatio;if(x!==c){if(!O)return o();x?o(!1,x):n=setTimeout(()=>{o(!1,1e-7)},1e3)}x===1&&!hl(l,e.getBoundingClientRect())&&o(),O=!1}try{r=new IntersectionObserver(j,{...P,root:s.ownerDocument})}catch{r=new IntersectionObserver(j,P)}r.observe(e)}return o(!0),i}function Rp(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=Ho(e),d=s||i?[...l?es(l):[],...es(t)]:[];d.forEach(w=>{s&&w.addEventListener("scroll",r,{passive:!0}),i&&w.addEventListener("resize",r)});const u=l&&a?Sp(l,r):null;let f=-1,m=null;o&&(m=new ResizeObserver(w=>{let[_]=w;_&&_.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var P;(P=m)==null||P.observe(t)})),r()}),l&&!c&&m.observe(l),m.observe(t));let g,p=c?ar(e):null;c&&b();function b(){const w=ar(e);p&&!hl(p,w)&&r(),p=w,g=requestAnimationFrame(b)}return r(),()=>{var w;d.forEach(_=>{s&&_.removeEventListener("scroll",r),i&&_.removeEventListener("resize",r)}),u==null||u(),(w=m)==null||w.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const Pp=rp,Cp=np,Ap=Xf,xp=ip,Op=ep,Ma=Yf,Ep=sp,jp=(e,t,r)=>{const n=new Map,s={platform:wp,...r},i={...s.platform,_c:n};return Qf(e,t,{...s,platform:i})};var zs=typeof document<"u"?v.useLayoutEffect:v.useEffect;function $s(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!$s(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!$s(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function fl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ia(e,t){const r=fl(e);return Math.round(t*r)/r}function Ai(e){const t=v.useRef(e);return zs(()=>{t.current=e}),t}function kp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[d,u]=v.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=v.useState(n);$s(f,n)||m(n);const[g,p]=v.useState(null),[b,w]=v.useState(null),_=v.useCallback(V=>{V!==C.current&&(C.current=V,p(V))},[]),P=v.useCallback(V=>{V!==x.current&&(x.current=V,w(V))},[]),O=i||g,j=o||b,C=v.useRef(null),x=v.useRef(null),R=v.useRef(d),S=c!=null,L=Ai(c),N=Ai(s),I=Ai(l),T=v.useCallback(()=>{if(!C.current||!x.current)return;const V={placement:t,strategy:r,middleware:f};N.current&&(V.platform=N.current),jp(C.current,x.current,V).then(W=>{const Y={...W,isPositioned:I.current!==!1};U.current&&!$s(R.current,Y)&&(R.current=Y,vu.flushSync(()=>{u(Y)}))})},[f,t,r,N,I]);zs(()=>{l===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,u(V=>({...V,isPositioned:!1})))},[l]);const U=v.useRef(!1);zs(()=>(U.current=!0,()=>{U.current=!1}),[]),zs(()=>{if(O&&(C.current=O),j&&(x.current=j),O&&j){if(L.current)return L.current(O,j,T);T()}},[O,j,T,L,S]);const H=v.useMemo(()=>({reference:C,floating:x,setReference:_,setFloating:P}),[_,P]),q=v.useMemo(()=>({reference:O,floating:j}),[O,j]),B=v.useMemo(()=>{const V={position:r,left:0,top:0};if(!q.floating)return V;const W=Ia(q.floating,d.x),Y=Ia(q.floating,d.y);return a?{...V,transform:"translate("+W+"px, "+Y+"px)",...fl(q.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:W,top:Y}},[r,a,q.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:T,refs:H,elements:q,floatingStyles:B}),[d,T,H,q,B])}const zp=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Ma({element:n.current,padding:s}).fn(r):{}:n?Ma({element:n,padding:s}).fn(r):{}}}},Mp=(e,t)=>({...Pp(e),options:[e,t]}),Ip=(e,t)=>({...Cp(e),options:[e,t]}),Lp=(e,t)=>({...Ep(e),options:[e,t]}),Tp=(e,t)=>({...Ap(e),options:[e,t]}),Np=(e,t)=>({...xp(e),options:[e,t]}),Dp=(e,t)=>({...Op(e),options:[e,t]}),qp=(e,t)=>({...zp(e),options:[e,t]});var Fp="Arrow",pl=v.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return h.jsx(as.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});pl.displayName=Fp;var Up=pl;function Hp(e){const[t,r]=v.useState(void 0);return Yi(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Vo="Popper",[ml,gl]=yu(Vo),[Bp,vl]=ml(Vo),yl=e=>{const{__scopePopper:t,children:r}=e,[n,s]=v.useState(null);return h.jsx(Bp,{scope:t,anchor:n,onAnchorChange:s,children:r})};yl.displayName=Vo;var _l="PopperAnchor",bl=v.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=vl(_l,r),o=v.useRef(null),a=Gs(t,o),c=v.useRef(null);return v.useEffect(()=>{const l=c.current;c.current=(n==null?void 0:n.current)||o.current,l!==c.current&&i.onAnchorChange(c.current)}),n?null:h.jsx(as.div,{...s,ref:a})});bl.displayName=_l;var Ko="PopperContent",[Vp,Kp]=ml(Ko),wl=v.forwardRef((e,t)=>{var ce,Q,ie,$e,ke,Ze;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:g,...p}=e,b=vl(Ko,r),[w,_]=v.useState(null),P=Gs(t,ze=>_(ze)),[O,j]=v.useState(null),C=Hp(O),x=(C==null?void 0:C.width)??0,R=(C==null?void 0:C.height)??0,S=n+(i!=="center"?"-"+i:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},N=Array.isArray(l)?l:[l],I=N.length>0,T={padding:L,boundary:N.filter(Zp),altBoundary:I},{refs:U,floatingStyles:H,placement:q,isPositioned:B,middlewareData:V}=kp({strategy:"fixed",placement:S,whileElementsMounted:(...ze)=>Rp(...ze,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[Mp({mainAxis:s+R,alignmentAxis:o}),c&&Ip({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Lp():void 0,...T}),c&&Tp({...T}),Np({...T,apply:({elements:ze,rects:Oe,availableWidth:de,availableHeight:ye})=>{const{width:fe,height:_t}=Oe.reference,st=ze.floating.style;st.setProperty("--radix-popper-available-width",`${de}px`),st.setProperty("--radix-popper-available-height",`${ye}px`),st.setProperty("--radix-popper-anchor-width",`${fe}px`),st.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),O&&qp({element:O,padding:a}),Jp({arrowWidth:x,arrowHeight:R}),f&&Dp({strategy:"referenceHidden",...T})]}),[W,Y]=Pl(q),G=xd(g);Yi(()=>{B&&(G==null||G())},[B,G]);const ve=(ce=V.arrow)==null?void 0:ce.x,te=(Q=V.arrow)==null?void 0:Q.y,re=((ie=V.arrow)==null?void 0:ie.centerOffset)!==0,[oe,ae]=v.useState();return Yi(()=>{w&&ae(window.getComputedStyle(w).zIndex)},[w]),h.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:B?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[($e=V.transformOrigin)==null?void 0:$e.x,(ke=V.transformOrigin)==null?void 0:ke.y].join(" "),...((Ze=V.hide)==null?void 0:Ze.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(Vp,{scope:r,placedSide:W,onArrowChange:j,arrowX:ve,arrowY:te,shouldHideArrow:re,children:h.jsx(as.div,{"data-side":W,"data-align":Y,...p,ref:P,style:{...p.style,animation:B?void 0:"none"}})})})});wl.displayName=Ko;var Sl="PopperArrow",$p={top:"bottom",right:"left",bottom:"top",left:"right"},Rl=v.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=Kp(Sl,n),o=$p[i.placedSide];return h.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:h.jsx(Up,{...s,ref:r,style:{...s.style,display:"block"}})})});Rl.displayName=Sl;function Zp(e){return e!==null}var Jp=e=>({name:"transformOrigin",options:e,fn(t){var b,w,_;const{placement:r,rects:n,middlewareData:s}=t,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[l,d]=Pl(r),u={start:"0%",center:"50%",end:"100%"}[d],f=(((w=s.arrow)==null?void 0:w.x)??0)+a/2,m=(((_=s.arrow)==null?void 0:_.y)??0)+c/2;let g="",p="";return l==="bottom"?(g=o?u:`${f}px`,p=`${-c}px`):l==="top"?(g=o?u:`${f}px`,p=`${n.floating.height+c}px`):l==="right"?(g=`${-c}px`,p=o?u:`${m}px`):l==="left"&&(g=`${n.floating.width+c}px`,p=o?u:`${m}px`),{data:{x:g,y:p}}}});function Pl(e){const[t,r="center"]=e.split("-");return[t,r]}var Wp=yl,Cl=bl,Gp=wl,Qp=Rl,oi="Popover",[Al,Vm]=yu(oi,[gl]),ls=gl(),[Yp,qt]=Al(oi),xl=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!1}=e,a=ls(t),c=v.useRef(null),[l,d]=v.useState(!1),[u,f]=Od({prop:n,defaultProp:s??!1,onChange:i,caller:oi});return h.jsx(Wp,{...a,children:h.jsx(Yp,{scope:t,contentId:Ed(),triggerRef:c,open:u,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:l,onCustomAnchorAdd:v.useCallback(()=>d(!0),[]),onCustomAnchorRemove:v.useCallback(()=>d(!1),[]),modal:o,children:r})})};xl.displayName=oi;var Ol="PopoverAnchor",Xp=v.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=qt(Ol,r),i=ls(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=s;return v.useEffect(()=>(o(),()=>a()),[o,a]),h.jsx(Cl,{...i,...n,ref:t})});Xp.displayName=Ol;var El="PopoverTrigger",jl=v.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=qt(El,r),i=ls(r),o=Gs(t,s.triggerRef),a=h.jsx(as.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Tl(s.open),...n,ref:o,onClick:Jn(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?a:h.jsx(Cl,{asChild:!0,...i,children:a})});jl.displayName=El;var $o="PopoverPortal",[e0,t0]=Al($o,{forceMount:void 0}),kl=e=>{const{__scopePopover:t,forceMount:r,children:n,container:s}=e,i=qt($o,t);return h.jsx(e0,{scope:t,forceMount:r,children:h.jsx(_u,{present:r||i.open,children:h.jsx(jd,{asChild:!0,container:s,children:n})})})};kl.displayName=$o;var Dr="PopoverContent",zl=v.forwardRef((e,t)=>{const r=t0(Dr,e.__scopePopover),{forceMount:n=r.forceMount,...s}=e,i=qt(Dr,e.__scopePopover);return h.jsx(_u,{present:n||i.open,children:i.modal?h.jsx(n0,{...s,ref:t}):h.jsx(s0,{...s,ref:t})})});zl.displayName=Dr;var r0=Md("PopoverContent.RemoveScroll"),n0=v.forwardRef((e,t)=>{const r=qt(Dr,e.__scopePopover),n=v.useRef(null),s=Gs(t,n),i=v.useRef(!1);return v.useEffect(()=>{const o=n.current;if(o)return kd(o)},[]),h.jsx(zd,{as:r0,allowPinchZoom:!0,children:h.jsx(Ml,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Jn(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Jn(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;i.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Jn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),s0=v.forwardRef((e,t)=>{const r=qt(Dr,e.__scopePopover),n=v.useRef(!1),s=v.useRef(!1);return h.jsx(Ml,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((l=r.triggerRef.current)==null?void 0:l.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),Ml=v.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:d,...u}=e,f=qt(Dr,r),m=ls(r);return Id(),h.jsx(Ld,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:h.jsx(Td,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:h.jsx(Gp,{"data-state":Tl(f.open),role:"dialog",id:f.contentId,...m,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Il="PopoverClose",Ll=v.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=qt(Il,r);return h.jsx(as.button,{type:"button",...n,ref:t,onClick:Jn(e.onClick,()=>s.onOpenChange(!1))})});Ll.displayName=Il;var i0="PopoverArrow",o0=v.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=ls(r);return h.jsx(Qp,{...s,...n,ref:t})});o0.displayName=i0;function Tl(e){return e?"open":"closed"}var Nl=xl,Dl=jl,ql=kl,Fl=zl,a0=Ll;function Ul({account:e,className:t,...r}){return h.jsxs("div",{className:Gn("flex min-h-full max-w-full flex-col items-center justify-start gap-1",t),...r,children:[h.jsx(bu,{account:e,size:"3xl",className:"mb-4 max-w-full"}),e.name&&h.jsx(Nd,{account:e,className:"text-text-default max-w-full truncate text-xl font-medium"}),h.jsx(wu,{account:e,className:"text-md text-text-light max-w-full truncate"})]})}function c0(e){const{i18n:t,_:r}=rt(),{session:n,canSwitchAccounts:s}=Dd(),{setSession:i,doSignOut:o}=Oo();return h.jsxs(Nl,{children:[h.jsx(Dl,{asChild:!0,children:h.jsx(pr,{"aria-label":t._({id:"1D3nu5"}),shape:"circle",transparent:!0,color:"gray",...e,children:h.jsx(bu,{account:n.account,size:e.size})})}),h.jsx(ql,{children:h.jsx(Fl,{side:"top",align:"end",className:"w-full",sideOffset:5,style:{width:320},children:h.jsxs("div",{className:"relative flex flex-col gap-2 rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-slate-700 dark:bg-slate-800",children:[h.jsx(Ul,{account:n.account,"aria-label":t._({id:"OLYdKb"}),className:"mt-4"}),h.jsx(pr,{onClick:()=>o(n.account),color:"primary",children:h.jsx(X,{id:"fcWrnU"})},"signout"),s&&h.jsx(pr,{onClick:()=>i(null),children:h.jsx(X,{id:"T8poTj"})},"other"),h.jsx(a0,{className:"absolute right-2 top-2 rounded opacity-50 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2","aria-label":t._({id:"NqPBw0"}),children:h.jsx(qd,{className:"size-6","aria-hidden":!0})},"close")]})})})]})}function u0({children:e,basePath:t,title:r,links:n}){const{_:s}=rt(),{pathname:i}=ge().location,o=i===t,a=n.find(d=>d.to===i),c=a==null?void 0:a.title,l=typeof c=="object"?s(c):c;return h.jsx(bd,{title:r,header:h.jsx(c0,{className:"shrink-0",size:"lg"}),children:h.jsxs("div",{className:"flex w-full flex-1 flex-col md:flex-row",children:[h.jsx("aside",{className:`shrink-0 p-4 md:px-8 ${o?"w-full md:w-auto":"hidden max-w-xs md:block"}`,role:"navigation",children:h.jsx("nav",{className:"flex flex-col gap-2",children:n.filter(({hidden:d,to:u})=>!d||i===u).map(({to:d,title:u,description:f,icon:m})=>h.jsxs(Hs,{to:d,className:Gn("flex items-center justify-start","min-h-12 px-4","rounded-3xl transition-colors","whitespace-nowrap font-medium md:whitespace-normal","focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2","text-text-default","md:text-text-light md:[&.active]:text-text-default","hover:bg-slate-100 dark:hover:bg-slate-800","[&.active]:bg-slate-100 dark:[&.active]:bg-slate-800",o&&d===t&&"hidden md:flex"),activeOptions:{exact:!0},activeProps:{className:"active","aria-current":"page"},children:[m&&h.jsx("span",{"aria-hidden":"true",className:"bg-primary text-primary-contrast -ml-2 mb-auto mr-2 mt-2 inline-flex size-8 shrink-0 grow-0 items-center justify-center rounded-full",children:h.jsx(m,{className:"size-4"})}),h.jsxs("span",{className:"my-1 min-w-0 flex-1",children:[h.jsx("span",{className:"block truncate",children:typeof u=="object"?s(u):u}),f&&h.jsx("span",{className:"block whitespace-pre-wrap text-xs md:hidden",children:typeof f=="object"?s(f):f})]})]},d))})}),h.jsxs("main",{className:`w-4xl mx-auto min-w-0 max-w-full px-4 md:px-8 ${o?"-order-1 md:order-1 md:block":""}`,role:"main",children:[h.jsxs("nav",{className:"mb-4 flex items-center gap-2",children:[!o&&h.jsx(Hs,{to:t,className:"text-text-light rounded-full p-2 hover:bg-slate-200 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 md:hidden dark:hover:bg-slate-800",children:h.jsx(Yu,{className:"size-6"})},"back"),l&&h.jsxs("h2",{className:"text-text-default text-2xl font-light",children:[h.jsx("title",{children:l}),h.jsx("b",{children:l})]})]}),e]})]})})}const Zo=gf({component:To,errorComponent:Su});function Hl(e){const{name:t,logo:r}=wd();return h.jsxs("span",{...e,children:[r&&h.jsx("img",{src:r,alt:t,className:"not-prose mr-1 inline-block h-[1em] select-none object-contain align-baseline"}),h.jsx("b",{children:t})]})}function l0(){const{account:e}=cs();return h.jsxs("div",{className:"prose-sm md:prose prose-slate dark:prose-invert max-w-none",children:[h.jsx("section",{children:h.jsx(X,{id:"/y3yb7",components:{0:h.jsx("h2",{}),1:h.jsx("p",{}),2:h.jsx("strong",{})}})}),h.jsx("section",{children:h.jsx(X,{id:"SBs48I",components:{0:h.jsx("h3",{}),1:h.jsx("p",{}),2:h.jsx(vs,{className:"underline",href:"https://bsky.app"}),3:h.jsx("p",{}),4:h.jsx("p",{}),5:h.jsx("strong",{className:"whitespace-nowrap"}),6:h.jsx(wu,{account:e})}})}),h.jsx("section",{children:h.jsx(X,{id:"gB0RTR",components:{0:h.jsx("h3",{}),1:h.jsx("p",{}),2:h.jsx("ul",{}),3:h.jsx("li",{}),4:h.jsx("strong",{}),5:h.jsx("li",{}),6:h.jsx("strong",{}),7:h.jsx("li",{}),8:h.jsx("strong",{}),9:h.jsx("li",{}),10:h.jsx("strong",{})}})}),h.jsx("section",{children:h.jsx(X,{id:"bfpG7G",components:{0:h.jsx("h3",{}),1:h.jsx("p",{}),2:h.jsx("strong",{}),3:h.jsx("ul",{}),4:h.jsx("li",{}),5:h.jsx("li",{}),6:h.jsx("li",{}),7:h.jsx("p",{}),8:h.jsx(vs,{href:`https://bsky.app/profile/${e.preferred_username??e.sub}`}),9:h.jsx("p",{}),10:h.jsx(Hl,{})}})}),h.jsxs("section",{children:[h.jsx(X,{id:"7+d6kP",components:{0:h.jsx("h3",{}),1:h.jsx("p",{})}}),h.jsxs("ul",{children:[h.jsx("li",{children:h.jsx(X,{id:"NS7S2h",components:{0:h.jsx(vs,{className:"underline",href:"https://bsky.social"})}})}),h.jsx("li",{children:h.jsx(X,{id:"ZWuMKu",components:{0:h.jsx(vs,{className:"underline",href:"https://atproto.com"})}})})]})]})]})}function Jo({value:e,startAngle:t=0,progressDirection:r="clockwise",size:n=24,strokeWidth:s=2,className:i,...o}){const a=n/2,c=a-s/2,l=2*Math.PI*c,u=Math.max(0,Math.min(100,e??70))/100,f=r==="clockwise"?l*(1-u):l*u;return h.jsxs("svg",{width:n,height:n,style:{transform:`rotate(${t}deg)`},className:Gn(e==null&&"animate-spin",i),...o,children:[h.jsx("circle",{cx:a,cy:a,r:c,fill:"none",stroke:"currentColor",strokeWidth:s,className:"opacity-20"}),h.jsx("circle",{cx:a,cy:a,r:c,fill:"none",stroke:"currentColor",strokeWidth:s,strokeDasharray:l,strokeDashoffset:f,strokeLinecap:"round",className:"transition-all duration-100 ease-linear",style:{transform:r==="counter-clockwise"?"scaleX(-1)":void 0,transformOrigin:"center"}})]})}function Bl(e){const{i18n:t,_:r}=rt(),n=d0(e),s=h0(),i=Math.floor(n/1e3);if(i<60)return t._({id:"xOTzt5"});const o=Math.floor(i/60);if(o===1)return t._({id:"kMDavg"});if(o<60)return t._({id:"KtNcea",values:{deltaMinutes:o}});const a=Math.floor(o/60);if(a===1)return t._({id:"x6/d1l"});if(a<24)return t._({id:"69w9p3",values:{deltaHours:a}});if(a<48&&new Date(e).getTime()<s)return t._({id:"rQRrkB"});const c=Math.floor(a/24);return t._({id:"cd9Wo5",values:{deltaDays:c}})}function d0(e){const t=v.useMemo(()=>new Date(e),[e]),[r,n]=v.useState(()=>Date.now()-t.getTime());return v.useEffect(()=>{const s=setInterval(()=>{n(Date.now()-t.getTime())},1e3);return()=>clearInterval(s)},[t]),r}function h0(){const[e,t]=v.useState(()=>{const r=new Date;return new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime()});return v.useEffect(()=>{const r=setInterval(()=>{const n=new Date;t(new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime())},6e4);return()=>clearInterval(r)},[]),e}function f0({date:e}){return Bl(e)}const So=({sub:e})=>["oauth-sessions",e];function p0({sub:e}){const t=Br();return Tu({refetchOnWindowFocus:"always",queryKey:So({sub:e}),retry:0,staleTime:5e3,queryFn:async r=>await t.fetch("GET","/oauth-sessions",{sub:e},r)})}function m0(){const e=Br(),t=Ys();return Xs({async mutationFn({sub:r,tokenId:n}){await e.fetch("POST","/revoke-oauth-session",{sub:r,tokenId:n})},onError(r,{sub:n}){t.invalidateQueries({queryKey:So({sub:n})})},onSuccess(r,{sub:n}){t.invalidateQueries({queryKey:So({sub:n})})}})}var Bt={},Gr={},La;function Vl(){return La||(La=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.CLIENT_ASSERTION_TYPE_JWT_BEARER=void 0,Gr.CLIENT_ASSERTION_TYPE_JWT_BEARER="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),Gr}var xi={},pe={},Ta;function Zr(){var u;if(Ta)return pe;Ta=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.isSpaceSeparatedValue=pe.numberPreprocess=pe.jsonObjectPreprocess=pe.canParseUrl=void 0,pe.isHostnameIP=e,pe.isLoopbackHost=t,pe.isLocalHostname=r,pe.safeUrl=n,pe.extractUrlPath=s,pe.arrayEquivalent=a,pe.includedIn=c,pe.asArray=l,pe.canParseUrl=((u=URL.canParse)==null?void 0:u.bind(URL))??(f=>{try{return new URL(f),!0}catch{return!1}});function e(f){return!!(f.match(/^\d+\.\d+\.\d+\.\d+$/)||f.startsWith("[")&&f.endsWith("]"))}function t(f){return f==="localhost"||f==="127.0.0.1"||f==="[::1]"}function r(f){const m=f.split(".");if(m.length<2)return!0;const g=m.at(-1).toLowerCase();return g==="test"||g==="local"||g==="localhost"||g==="invalid"||g==="example"}function n(f){try{return new URL(f)}catch{return null}}function s(f){const m=f.startsWith("https://")?8:f.startsWith("http://")?7:-1;if(m===-1)throw new TypeError('URL must use the "https:" or "http:" protocol');const g=f.indexOf("#",m),p=f.indexOf("?",m),b=p!==-1&&(g===-1||p<g)?p:-1,w=g===-1?b===-1?f.length:b:b===-1?g:Math.min(g,b),_=f.indexOf("/",m),P=_===-1||_>w?w:_;if(m===P)throw new TypeError("URL must contain a host");return f.substring(P,w)}const i=f=>{if(typeof f=="string"&&f.startsWith("{")&&f.endsWith("}"))try{return JSON.parse(f)}catch{return f}return f};pe.jsonObjectPreprocess=i;const o=f=>{if(typeof f=="string"){const m=Number(f);if(!Number.isNaN(m))return m}return f};pe.numberPreprocess=o;function a(f,m){return f===m?!0:f.every(c,m)&&m.every(c,f)}function c(f){return this.includes(f)}function l(f){if(f!=null)return Array.isArray(f)?f:Array.from(f)}const d=(f,m)=>{if(f.length===0)throw new TypeError("Value cannot be empty");if(f.includes(" "))throw new TypeError("Value cannot contain spaces");const g=m.length,p=f.length;if(g<p)return!1;let b=m.indexOf(f),w;for(;b!==-1;){if(w=b+p,(b===0||m.charCodeAt(b-1)===32)&&(w===g||m.charCodeAt(w)===32))return!0;b=m.indexOf(f,w+1)}return!1};return pe.isSpaceSeparatedValue=d,pe}var Na;function Ft(){return Na||(Na=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.privateUseUriSchema=e.webUriSchema=e.httpsUriSchema=e.loopbackUriSchema=e.dangerousUriSchema=void 0;const t=K(),r=Zr();e.dangerousUriSchema=t.z.string().refine(n=>n.includes(":")&&(0,r.canParseUrl)(n),{message:"Invalid URL"}),e.loopbackUriSchema=e.dangerousUriSchema.superRefine((n,s)=>{if(!n.startsWith("http://"))return s.addIssue({code:t.ZodIssueCode.custom,message:'URL must use the "http:" protocol'}),!1;const i=new URL(n);return(0,r.isLoopbackHost)(i.hostname)?!0:(s.addIssue({code:t.ZodIssueCode.custom,message:'URL must use "localhost", "127.0.0.1" or "[::1]" as hostname'}),!1)}),e.httpsUriSchema=e.dangerousUriSchema.superRefine((n,s)=>{if(!n.startsWith("https://"))return s.addIssue({code:t.ZodIssueCode.custom,message:'URL must use the "https:" protocol'}),!1;const i=new URL(n);if((0,r.isLoopbackHost)(i.hostname))return s.addIssue({code:t.ZodIssueCode.custom,message:"https: URL must not use a loopback host"}),!1;if(!(0,r.isHostnameIP)(i.hostname)){if(!i.hostname.includes("."))return s.addIssue({code:t.ZodIssueCode.custom,message:"Domain name must contain at least two segments"}),!1;if(i.hostname.endsWith(".local"))return s.addIssue({code:t.ZodIssueCode.custom,message:'Domain name must not end with ".local"'}),!1}return!0}),e.webUriSchema=t.z.string().superRefine((n,s)=>{if(n.startsWith("http://")){const i=e.loopbackUriSchema.safeParse(n);return i.success||i.error.issues.forEach(s.addIssue,s),i.success}if(n.startsWith("https://")){const i=e.httpsUriSchema.safeParse(n);return i.success||i.error.issues.forEach(s.addIssue,s),i.success}return s.addIssue({code:t.ZodIssueCode.custom,message:'URL must use the "http:" or "https:" protocol'}),!1}),e.privateUseUriSchema=e.dangerousUriSchema.superRefine((n,s)=>{const i=n.indexOf("."),o=n.indexOf(":");if(i===-1||o===-1||i>o)return s.addIssue({code:t.ZodIssueCode.custom,message:'Private-use URI scheme requires a "." as part of the protocol'}),!1;const a=new URL(n);if(!a.protocol.includes("."))return s.addIssue({code:t.ZodIssueCode.custom,message:"Invalid private-use URI scheme"}),!1;const l=a.protocol.slice(0,-1).split(".").reverse().join(".");return(0,r.isLocalHostname)(l)&&s.addIssue({code:t.ZodIssueCode.custom,message:"Private-use URI Scheme redirect URI must not be a local hostname"}),a.href.startsWith(`${a.protocol}//`)||a.username||a.password||a.hostname||a.port?(s.addIssue({code:t.ZodIssueCode.custom,message:"Private-Use URI Scheme must be in the form <scheme>:/{path} (notice the single slash!) as per RFC 8252"}),!1):!0})}(xi)),xi}var Qr={},Yr={},Da;function Kl(){return Da||(Da=1,Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.DEFAULT_LOOPBACK_CLIENT_REDIRECT_URIS=void 0,Yr.DEFAULT_LOOPBACK_CLIENT_REDIRECT_URIS=Object.freeze(["http://127.0.0.1/","http://[::1]/"])),Yr}var Oi={},Ei={},qa;function ds(){return qa||(qa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthScopeSchema=e.isOAuthScope=e.OAUTH_SCOPE_REGEXP=void 0;const t=K();e.OAUTH_SCOPE_REGEXP=/^[\x21\x23-\x5B\x5D-\x7E]+(?: [\x21\x23-\x5B\x5D-\x7E]+)*$/;const r=n=>e.OAUTH_SCOPE_REGEXP.test(n);e.isOAuthScope=r,e.oauthScopeSchema=t.z.string().refine(e.isOAuthScope,{message:"Invalid OAuth scope"})}(Ei)),Ei}var Fa;function Wo(){return Fa||(Fa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_ATPROTO_OAUTH_SCOPE=e.atprotoOAuthScopeSchema=e.ATPROTO_SCOPE_VALUE=void 0,e.isAtprotoOAuthScope=s,e.asAtprotoOAuthScope=i,e.assertAtprotoOAuthScope=o;const t=K(),r=ds(),n=Zr();e.ATPROTO_SCOPE_VALUE="atproto";function s(a){return(0,r.isOAuthScope)(a)&&(0,n.isSpaceSeparatedValue)(e.ATPROTO_SCOPE_VALUE,a)}function i(a){if(s(a))return a;throw new TypeError(`Value must contain "${e.ATPROTO_SCOPE_VALUE}" scope value`)}function o(a){i(a)}e.atprotoOAuthScopeSchema=t.z.string().refine(s,{message:"Invalid ATProto OAuth scope"}),e.DEFAULT_ATPROTO_OAUTH_SCOPE=e.ATPROTO_SCOPE_VALUE}(Oi)),Oi}var ji={},Xr={},Ua;function cr(){if(Ua)return Xr;Ua=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.oauthClientIdSchema=void 0;const e=K();return Xr.oauthClientIdSchema=e.z.string().min(1),Xr}var ki={},Ha;function Jr(){return Ha||(Ha=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthRedirectUriSchema=e.oauthLoopbackClientRedirectUriSchema=e.loopbackRedirectURISchema=void 0;const t=K(),r=Ft();e.loopbackRedirectURISchema=r.loopbackUriSchema.superRefine((n,s)=>n.startsWith("http://localhost")?(s.addIssue({code:t.ZodIssueCode.custom,message:'Use of "localhost" hostname is not allowed (RFC 8252), use a loopback IP such as "127.0.0.1" instead'}),!1):!0),e.oauthLoopbackClientRedirectUriSchema=e.loopbackRedirectURISchema,e.oauthRedirectUriSchema=t.z.string().superRefine((n,s)=>{if(n.startsWith("https:")){const i=r.httpsUriSchema.safeParse(n);return i.success||i.error.issues.forEach(s.addIssue,s),i.success}else if(n.startsWith("http:")){const i=e.loopbackRedirectURISchema.safeParse(n);return i.success||i.error.issues.forEach(s.addIssue,s),i.success}else if(/^[^.:]+(?:\.[^.:]+)+:/.test(n)){const i=r.privateUseUriSchema.safeParse(n);return i.success||i.error.issues.forEach(s.addIssue,s),i.success}else return s.addIssue({code:t.ZodIssueCode.custom,message:'URL must use the "https:" or "http:" protocol, or a private-use URI scheme (RFC 8252)'}),!1})}(ki)),ki}var Ba;function $l(){return Ba||(Ba=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthClientIdLoopbackSchema=e.LOOPBACK_CLIENT_ID_ORIGIN=void 0,e.assertOAuthLoopbackClientId=s,e.isOAuthClientIdLoopback=i,e.asOAuthClientIdLoopback=o,e.parseOAuthLoopbackClientId=a,e.safeParseOAuthLoopbackClientId=c,e.safeParseOAuthLoopbackClientIdQueryString=l;const t=cr(),r=Jr(),n=ds();e.LOOPBACK_CLIENT_ID_ORIGIN="http://localhost",e.oauthClientIdLoopbackSchema=t.oauthClientIdSchema.superRefine((d,u)=>{const f=c(d);return f.success||u.addIssue({code:"custom",message:f.message}),f.success});function s(d){a(d)}function i(d){return c(d).success}function o(d){return s(d),d}function a(d){const u=c(d);if(u.success)return u.value;throw new TypeError(`Invalid loopback client ID: ${u.message}`)}function c(d){if(!d.startsWith(e.LOOPBACK_CLIENT_ID_ORIGIN))return{success:!1,message:`Value must start with "${e.LOOPBACK_CLIENT_ID_ORIGIN}"`};if(d.includes("#",e.LOOPBACK_CLIENT_ID_ORIGIN.length))return{success:!1,message:"Value must not contain a hash component"};const u=d.length>e.LOOPBACK_CLIENT_ID_ORIGIN.length&&d.charCodeAt(e.LOOPBACK_CLIENT_ID_ORIGIN.length)===47?e.LOOPBACK_CLIENT_ID_ORIGIN.length+1:e.LOOPBACK_CLIENT_ID_ORIGIN.length;if(d.length!==u&&d.charCodeAt(u)!==63)return{success:!1,message:"Value must not contain a path component"};const f=d.slice(u+1);return l(f)}function l(d){const u={},f=typeof d=="string"?new URLSearchParams(d):d;for(const[m,g]of f)if(m==="scope"){if("scope"in u)return{success:!1,message:'Duplicate "scope" query parameter'};const p=n.oauthScopeSchema.safeParse(g);if(!p.success)return{success:!1,message:`Invalid "scope" query parameter: ${p.error.issues.map(w=>w.message).join(", ")||"Validation failed"}`};u.scope=p.data}else if(m==="redirect_uri"){const p=r.oauthLoopbackClientRedirectUriSchema.safeParse(g);if(!p.success)return{success:!1,message:`Invalid "redirect_uri" query parameter: ${p.error.issues.map(w=>w.message).join(", ")||"Validation failed"}`};u.redirect_uris==null?u.redirect_uris=[p.data]:u.redirect_uris.push(p.data)}else return{success:!1,message:`Unexpected query parameter "${m}"`};return{success:!0,value:u}}}(ji)),ji}var Va;function Zl(){if(Va)return Qr;Va=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.buildAtprotoLoopbackClientId=i,Qr.parseAtprotoLoopbackClientId=o;const e=Kl(),t=Wo(),r=$l(),n=Jr(),s=Zr();function i(a){if(a){const c=new URLSearchParams,{scope:l}=a;l!=null&&l!==t.DEFAULT_ATPROTO_OAUTH_SCOPE&&c.set("scope",(0,t.asAtprotoOAuthScope)(l));const d=(0,s.asArray)(a.redirect_uris);if(d&&!(0,s.arrayEquivalent)(d,e.DEFAULT_LOOPBACK_CLIENT_REDIRECT_URIS)){if(!d.length)throw new TypeError('Unexpected empty "redirect_uris" config');for(const u of d)c.append("redirect_uri",n.oauthLoopbackClientRedirectUriSchema.parse(u))}if(c.size)return`${r.LOOPBACK_CLIENT_ID_ORIGIN}?${c.toString()}`}return r.LOOPBACK_CLIENT_ID_ORIGIN}function o(a){const{scope:c=t.DEFAULT_ATPROTO_OAUTH_SCOPE,redirect_uris:l}=(0,r.parseOAuthLoopbackClientId)(a);if(!(0,t.isAtprotoOAuthScope)(c))throw new TypeError('ATProto Loopback ClientID must include "atproto" scope');return{scope:c,redirect_uris:l??[...e.DEFAULT_LOOPBACK_CLIENT_REDIRECT_URIS]}}return Qr}var en={},Ka;function g0(){if(Ka)return en;Ka=1,Object.defineProperty(en,"__esModule",{value:!0}),en.atprotoLoopbackClientMetadata=t,en.buildAtprotoLoopbackClientMetadata=r;const e=Zl();function t(s){const i=(0,e.parseAtprotoLoopbackClientId)(s);return n(s,i)}function r(s){const i=(0,e.buildAtprotoLoopbackClientId)(s);return n(i,(0,e.parseAtprotoLoopbackClientId)(i))}function n(s,i){return{client_id:s,scope:i.scope,redirect_uris:i.redirect_uris,response_types:["code"],grant_types:["authorization_code","refresh_token"],token_endpoint_auth_method:"none",application_type:"native",dpop_bound_access_tokens:!0}}return en}var tn={},rn={},Vt={},Rs={},zi={},$a;function ai(){return $a||($a=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.JwtVerifyError=e.JwtCreateError=e.JwkError=e.ERR_JWT_VERIFY=e.ERR_JWT_CREATE=e.ERR_JWT_INVALID=e.ERR_JWK_NOT_FOUND=e.ERR_JWK_INVALID=e.ERR_JWKS_NO_MATCHING_KEY=void 0,e.ERR_JWKS_NO_MATCHING_KEY="ERR_JWKS_NO_MATCHING_KEY",e.ERR_JWK_INVALID="ERR_JWK_INVALID",e.ERR_JWK_NOT_FOUND="ERR_JWK_NOT_FOUND",e.ERR_JWT_INVALID="ERR_JWT_INVALID",e.ERR_JWT_CREATE="ERR_JWT_CREATE",e.ERR_JWT_VERIFY="ERR_JWT_VERIFY";class t extends TypeError{constructor(i="JWK error",o=e.ERR_JWK_INVALID,a){super(i,a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:o})}}e.JwkError=t;class r extends Error{constructor(i="Unable to create JWT",o=e.ERR_JWT_CREATE,a){super(i,a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:o})}static from(i,o,a){return i instanceof r?i:i instanceof t?new r(a,i.code,{cause:i}):new r(a,o,{cause:i})}}e.JwtCreateError=r;class n extends Error{constructor(i="Invalid JWT",o=e.ERR_JWT_VERIFY,a){super(i,a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:o})}static from(i,o,a){return i instanceof n?i:i instanceof t?new n(a,i.code,{cause:i}):new n(a,o,{cause:i})}}e.JwtVerifyError=n}(zi)),zi}var Mi={},_e={};class v0{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class y0{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return Jl(this,t)}}class _0{constructor(t){this.decoders=t}or(t){return Jl(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Jl=(e,t)=>new _0({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class b0{constructor(t,r,n,s){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=s,this.encoder=new v0(t,r,n),this.decoder=new y0(t,r,s)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const w0=({name:e,prefix:t,encode:r,decode:n})=>new b0(e,t,r,n),S0=(e,t,r,n)=>{const s={};for(let d=0;d<t.length;++d)s[t[d]]=d;let i=e.length;for(;e[i-1]==="=";)--i;const o=new Uint8Array(i*r/8|0);let a=0,c=0,l=0;for(let d=0;d<i;++d){const u=s[e[d]];if(u===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|u,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},R0=(e,t,r)=>{const n=t[t.length-1]==="=",s=(1<<r)-1;let i="",o=0,a=0;for(let c=0;c<e.length;++c)for(a=a<<8|e[c],o+=8;o>r;)o-=r,i+=t[s&a>>o];if(o&&(i+=t[s&a<<r-o]),n)for(;i.length*r&7;)i+="=";return i},ci=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>w0({prefix:t,name:e,encode(s){return R0(s,n,r)},decode(s){return S0(s,n,r,e)}}),P0=ci({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),C0=ci({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),A0=ci({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),x0=ci({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),O0=Object.freeze(Object.defineProperty({__proto__:null,base64:P0,base64pad:C0,base64url:A0,base64urlpad:x0},Symbol.toStringTag,{value:"Module"})),E0=Sd(O0);var Za;function hs(){if(Za)return _e;Za=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.segmentedStringRefinementFactory=_e.jwtCharsRefinement=_e.cachedGetter=_e.preferredOrderCmp=_e.isDefined=void 0,_e.matchesAny=s,_e.parseB64uJson=a,_e.isLastOccurrence=d;const e=E0,t=K(),r=u=>u!==void 0;_e.isDefined=r;const n=u=>(f,m)=>{const g=u.indexOf(f),p=u.indexOf(m);return g===p?0:g===-1?1:p===-1?-1:g-p};_e.preferredOrderCmp=n;function s(u){return u==null?f=>!0:Array.isArray(u)?f=>u.includes(f):f=>f===u}const i=(u,f)=>function(){const m=u.call(this);return Object.defineProperty(this,u.name,{get:()=>m,enumerable:!0,configurable:!0}),m};_e.cachedGetter=i;const o=new TextDecoder;function a(u){const f=e.base64url.baseDecode(u),m=o.decode(f);return JSON.parse(m)}const c=(u,f)=>{let m;for(let g=0;g<u.length;g++)if(m=u.charCodeAt(g),!(65<=m&&m<=90||97<=m&&m<=122||48<=m&&m<=57||m===45||m===95||m===46)){const p=String.fromCodePoint(u.codePointAt(g));return f.addIssue({code:t.ZodIssueCode.custom,message:`Invalid character "${p}" in JWT at position ${g}`})}};_e.jwtCharsRefinement=c;const l=(u,f=2)=>{if(!Number.isFinite(u)||u<1||(u|0)!==u)throw new TypeError(`Count must be a natural number (got ${u})`);const m=u*f+(u-1),g="Invalid JWT format";return(p,b)=>{if(p.length<m)return b.addIssue({code:t.ZodIssueCode.custom,message:`${g}: too short`}),!1;let w=0;for(let _=0;_<u-1;_++){const P=p.indexOf(".",w);if(P===-1)return b.addIssue({code:t.ZodIssueCode.custom,message:`${g}: expected ${u} segments, got ${_+1}`}),!1;if(P-w<f)return b.addIssue({code:t.ZodIssueCode.custom,message:`${g}: segment ${_+1} is too short`}),!1;w=P+1}return p.indexOf(".",w)!==-1?(b.addIssue({code:t.ZodIssueCode.custom,message:`${g}: too many segments`}),!1):p.length-w<f?(b.addIssue({code:t.ZodIssueCode.custom,message:`${g}: last segment is too short`}),!1):!0}};_e.segmentedStringRefinementFactory=l;function d(u,f,m){return m.indexOf(u,f+1)===-1}return _e}var Ja;function fs(){return Ja||(Ja=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.jwkPrivateSchema=e.jwkPubSchema=e.jwkValidator=e.jwkSchema=e.keyUsageSchema=e.KEY_USAGE=e.privateKeyUsageSchema=e.PRIVATE_KEY_USAGE=e.publicKeyUsageSchema=e.PUBLIC_KEY_USAGE=void 0,e.isPublicKeyUsage=n,e.isSigKeyUsage=s,e.isEncKeyUsage=i,e.isPrivateKeyUsage=o,e.hasKid=m,e.hasSharedSecretJwk=g,e.hasPrivateSecretJwk=p,e.isPrivateJwk=b,e.isPublicJwk=w;const t=K(),r=hs();e.PUBLIC_KEY_USAGE=["verify","encrypt","wrapKey"],e.publicKeyUsageSchema=t.z.enum(e.PUBLIC_KEY_USAGE);function n(_){return e.PUBLIC_KEY_USAGE.includes(_)}function s(_){return _==="verify"}function i(_){return _==="encrypt"||_==="wrapKey"}e.PRIVATE_KEY_USAGE=["sign","decrypt","unwrapKey","deriveKey","deriveBits"],e.privateKeyUsageSchema=t.z.enum(e.PRIVATE_KEY_USAGE);function o(_){return e.PRIVATE_KEY_USAGE.includes(_)}e.KEY_USAGE=[...e.PRIVATE_KEY_USAGE,...e.PUBLIC_KEY_USAGE],e.keyUsageSchema=t.z.enum(e.KEY_USAGE);const a=t.z.object({kty:t.z.string().min(1),alg:t.z.string().min(1).optional(),kid:t.z.string().min(1).optional(),use:t.z.enum(["sig","enc"]).optional(),key_ops:t.z.array(e.keyUsageSchema).min(1,{message:"At least one key usage must be specified"}).refine(_=>_.every(r.isLastOccurrence),{message:"key_ops must not contain duplicates"}).optional(),x5c:t.z.array(t.z.string()).optional(),x5t:t.z.string().min(1).optional(),"x5t#S256":t.z.string().min(1).optional(),x5u:t.z.string().url().optional(),ext:t.z.boolean().optional(),iat:t.z.number().int().optional(),exp:t.z.number().int().optional(),nbf:t.z.number().int().optional(),revoked:t.z.object({revoked_at:t.z.number().int(),reason:t.z.string().optional()}).optional()}),c=a.extend({kty:t.z.literal("RSA"),alg:t.z.enum(["RS256","RS384","RS512","PS256","PS384","PS512"]).optional(),n:t.z.string().min(1),e:t.z.string().min(1),d:t.z.string().min(1).optional(),p:t.z.string().min(1).optional(),q:t.z.string().min(1).optional(),dp:t.z.string().min(1).optional(),dq:t.z.string().min(1).optional(),qi:t.z.string().min(1).optional(),oth:t.z.array(t.z.object({r:t.z.string().optional(),d:t.z.string().optional(),t:t.z.string().optional()})).min(1).optional()}),l=a.extend({kty:t.z.literal("EC"),alg:t.z.enum(["ES256","ES384","ES512"]).optional(),crv:t.z.enum(["P-256","P-384","P-521"]),x:t.z.string().min(1),y:t.z.string().min(1),d:t.z.string().min(1).optional()}),d=a.extend({kty:t.z.literal("EC"),alg:t.z.enum(["ES256K"]).optional(),crv:t.z.enum(["secp256k1"]),x:t.z.string().min(1),y:t.z.string().min(1),d:t.z.string().min(1).optional()}),u=a.extend({kty:t.z.literal("OKP"),alg:t.z.enum(["EdDSA"]).optional(),crv:t.z.enum(["Ed25519","Ed448"]),x:t.z.string().min(1),d:t.z.string().min(1).optional()}),f=a.extend({kty:t.z.literal("oct"),alg:t.z.enum(["HS256","HS384","HS512"]).optional(),k:t.z.string()});e.jwkSchema=t.z.union([c,l,d,u,f]).refine(_=>_.use==null||w(_),{message:'"use" can only be used with public keys',path:["use"]}).refine(_=>{var P;return!((P=_.key_ops)!=null&&P.some(o))||b(_)},{message:"private key usage not allowed for public keys",path:["key_ops"]}).refine(_=>_.use==null||_.key_ops==null||_.use==="sig"&&_.key_ops.every(s)||_.use==="enc"&&_.key_ops.every(i),{message:'"key_ops" must be consistent with "use"',path:["key_ops"]}),e.jwkValidator=e.jwkSchema,e.jwkPubSchema=e.jwkSchema.refine(m,{message:'"kid" is required',path:["kid"]}).refine(w,{message:"private key not allowed"}).refine(_=>!_.key_ops||_.key_ops.every(n),{message:'"key_ops" must not contain private key usage for public keys',path:["key_ops"]}),e.jwkPrivateSchema=e.jwkSchema.refine(b,{message:"private key required"});function m(_){return"kid"in _&&_.kid!=null}function g(_){return"k"in _&&_.k!=null}function p(_){return"d"in _&&_.d!=null}function b(_){return p(_)||g(_)}function w(_){return!p(_)&&!g(_)}}(Mi)),Mi}var Wa;function Wl(){var a;if(Wa)return Rs;Wa=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.jwkAlgorithms=s;const e=ai(),t=fs(),{process:r}=globalThis,n=typeof r<"u"&&typeof((a=r==null?void 0:r.versions)==null?void 0:a.node)=="string";function*s(c){if(typeof c.alg=="string"){yield c.alg;return}switch(c.kty){case"EC":{if(i(c)&&(yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW"),o(c)){const l="crv"in c?c.crv:void 0;switch(l){case"P-256":case"P-384":yield`ES${l.slice(-3)}`;break;case"P-521":yield"ES512";break;case"secp256k1":n&&(yield"ES256K");break;default:throw new e.JwkError(`Unsupported crv "${l}"`)}}return}case"OKP":{if(!c.use)throw new e.JwkError('Missing "use" Parameter value');yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW";return}case"RSA":{i(c)&&(yield"RSA-OAEP",yield"RSA-OAEP-256",yield"RSA-OAEP-384",yield"RSA-OAEP-512",n&&(yield"RSA1_5")),o(c)&&(yield"PS256",yield"PS384",yield"PS512",yield"RS256",yield"RS384",yield"RS512");return}case"oct":{i(c)&&(yield"A128GCMKW",yield"A192GCMKW",yield"A256GCMKW",yield"A128KW",yield"A192KW",yield"A256KW"),o(c)&&(yield"HS256",yield"HS384",yield"HS512");return}default:throw new e.JwkError(`Unsupported kty "${c.kty}"`)}}function i(c){var l;return((l=c.key_ops)==null?void 0:l.some(t.isEncKeyUsage))??(c.use==null||c.use==="enc")}function o(c){var l;return((l=c.key_ops)==null?void 0:l.some(t.isSigKeyUsage))??(c.use==null||c.use==="sig")}return Rs}var Kt={},Ga;function j0(){if(Ga)return Kt;Ga=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.jwksPubSchema=Kt.jwksSchema=void 0;const e=K(),t=fs();return Kt.jwksSchema=e.z.object({keys:e.z.array(e.z.unknown()).transform(r=>r.map(n=>t.jwkSchema.safeParse(n)).filter(n=>n.success).map(n=>n.data))}),Kt.jwksPubSchema=e.z.object({keys:e.z.array(e.z.unknown()).transform(r=>r.map(n=>t.jwkPubSchema.safeParse(n)).filter(n=>n.success).map(n=>n.data))}),Kt}var Ps={},Ii={},Qa;function Gl(){return Qa||(Qa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.jwtPayloadSchema=e.htuSchema=e.jwtHeaderSchema=e.isUnsignedJwt=e.unsignedJwtSchema=e.isSignedJwt=e.signedJwtSchema=void 0;const t=K(),r=fs(),n=hs();e.signedJwtSchema=t.z.string().superRefine(n.jwtCharsRefinement).superRefine((0,n.segmentedStringRefinementFactory)(3));const s=o=>e.signedJwtSchema.safeParse(o).success;e.isSignedJwt=s,e.unsignedJwtSchema=t.z.string().superRefine(n.jwtCharsRefinement).superRefine((0,n.segmentedStringRefinementFactory)(2));const i=o=>e.unsignedJwtSchema.safeParse(o).success;e.isUnsignedJwt=i,e.jwtHeaderSchema=t.z.object({alg:t.z.string(),jku:t.z.string().url().optional(),jwk:t.z.object({kty:t.z.string(),crv:t.z.string().optional(),x:t.z.string().optional(),y:t.z.string().optional(),e:t.z.string().optional(),n:t.z.string().optional()}).optional(),kid:t.z.string().optional(),x5u:t.z.string().optional(),x5c:t.z.array(t.z.string()).optional(),x5t:t.z.string().optional(),"x5t#S256":t.z.string().optional(),typ:t.z.string().optional(),cty:t.z.string().optional(),crit:t.z.array(t.z.string()).optional()}).passthrough(),e.htuSchema=t.z.string().superRefine((o,a)=>{try{const c=new URL(o);c.protocol!=="http:"&&c.protocol!=="https:"&&a.addIssue({code:t.z.ZodIssueCode.custom,message:"Only http: and https: protocols are allowed"}),(c.username||c.password)&&a.addIssue({code:t.z.ZodIssueCode.custom,message:"Credentials not allowed"}),c.search&&a.addIssue({code:t.z.ZodIssueCode.custom,message:"Query string not allowed"}),c.hash&&a.addIssue({code:t.z.ZodIssueCode.custom,message:"Fragment not allowed"})}catch{a.addIssue({code:t.z.ZodIssueCode.invalid_string,validation:"url"})}return o}),e.jwtPayloadSchema=t.z.object({iss:t.z.string().optional(),aud:t.z.union([t.z.string(),t.z.array(t.z.string()).nonempty()]).optional(),sub:t.z.string().optional(),exp:t.z.number().int().optional(),nbf:t.z.number().int().optional(),iat:t.z.number().int().optional(),jti:t.z.string().optional(),htm:t.z.string().optional(),htu:e.htuSchema.optional(),ath:t.z.string().optional(),acr:t.z.string().optional(),azp:t.z.string().optional(),amr:t.z.array(t.z.string()).optional(),cnf:t.z.object({kid:t.z.string().optional(),jwk:r.jwkPubSchema.optional(),jwe:t.z.string().optional(),jku:t.z.string().url().optional(),jkt:t.z.string().optional(),"x5t#S256":t.z.string().optional(),osc:t.z.string().optional()}).optional(),client_id:t.z.string().optional(),scope:t.z.string().optional(),nonce:t.z.string().optional(),at_hash:t.z.string().optional(),c_hash:t.z.string().optional(),s_hash:t.z.string().optional(),auth_time:t.z.number().int().optional(),name:t.z.string().optional(),family_name:t.z.string().optional(),given_name:t.z.string().optional(),middle_name:t.z.string().optional(),nickname:t.z.string().optional(),preferred_username:t.z.string().optional(),gender:t.z.string().optional(),picture:t.z.string().url().optional(),profile:t.z.string().url().optional(),website:t.z.string().url().optional(),birthdate:t.z.string().regex(/\d{4}-\d{2}-\d{2}/).optional(),zoneinfo:t.z.string().regex(/^[A-Za-z0-9_/]+$/).optional(),locale:t.z.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?$/).optional(),updated_at:t.z.number().int().optional(),email:t.z.string().optional(),email_verified:t.z.boolean().optional(),phone_number:t.z.string().optional(),phone_number_verified:t.z.boolean().optional(),address:t.z.object({formatted:t.z.string().optional(),street_address:t.z.string().optional(),locality:t.z.string().optional(),region:t.z.string().optional(),postal_code:t.z.string().optional(),country:t.z.string().optional()}).optional(),authorization_details:t.z.array(t.z.object({type:t.z.string(),locations:t.z.array(t.z.string()).optional(),actions:t.z.array(t.z.string()).optional(),datatypes:t.z.array(t.z.string()).optional(),identifier:t.z.string().optional(),privileges:t.z.array(t.z.string()).optional()}).passthrough()).optional()}).passthrough()}(Ii)),Ii}var Ya;function Ql(){if(Ya)return Ps;Ya=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.unsafeDecodeJwt=n;const e=ai(),t=Gl(),r=hs();function n(s){const{0:i,1:o,length:a}=s.split(".");if(a>3||a<2)throw new e.JwtVerifyError(void 0,e.ERR_JWT_INVALID);const c=t.jwtHeaderSchema.parse((0,r.parseB64uJson)(i));if(a===2&&(c==null?void 0:c.alg)!=="none")throw new e.JwtVerifyError(void 0,e.ERR_JWT_INVALID);const l=t.jwtPayloadSchema.parse((0,r.parseB64uJson)(o));return{header:c,payload:l}}return Ps}var Li={},Xa;function k0(){return Xa||(Xa=1,Object.defineProperty(Li,"__esModule",{value:!0})),Li}var it={},ec;function z0(){if(ec)return it;ec=1;var e=it&&it.__runInitializers||function(a,c,l){for(var d=arguments.length>2,u=0;u<c.length;u++)l=d?c[u].call(a,l):c[u].call(a);return d?l:void 0},t=it&&it.__esDecorate||function(a,c,l,d,u,f){function m(R){if(R!==void 0&&typeof R!="function")throw new TypeError("Function expected");return R}for(var g=d.kind,p=g==="getter"?"get":g==="setter"?"set":"value",b=!c&&a?d.static?a:a.prototype:null,w=c||(b?Object.getOwnPropertyDescriptor(b,d.name):{}),_,P=!1,O=l.length-1;O>=0;O--){var j={};for(var C in d)j[C]=C==="access"?{}:d[C];for(var C in d.access)j.access[C]=d.access[C];j.addInitializer=function(R){if(P)throw new TypeError("Cannot add initializers after decoration has completed");f.push(m(R||null))};var x=(0,l[O])(g==="accessor"?{get:w.get,set:w.set}:w[p],j);if(g==="accessor"){if(x===void 0)continue;if(x===null||typeof x!="object")throw new TypeError("Object expected");(_=m(x.get))&&(w.get=_),(_=m(x.set))&&(w.set=_),(_=m(x.init))&&u.unshift(_)}else(_=m(x))&&(g==="field"?u.unshift(_):w[p]=_)}b&&Object.defineProperty(b,d.name,w),P=!0};Object.defineProperty(it,"__esModule",{value:!0}),it.Key=void 0;const r=Wl(),n=fs(),s=hs();let i=(()=>{var a;let c=[],l,d,u,f,m;return a=class{constructor(p){Object.defineProperty(this,"jwk",{enumerable:!0,configurable:!0,writable:!0,value:(e(this,c),p)})}get isPrivate(){return(0,n.isPrivateJwk)(this.jwk)}get isSymetric(){return(0,n.hasSharedSecretJwk)(this.jwk)}get privateJwk(){if(this.isPrivate)return this.jwk}get publicJwk(){if(this.isSymetric)return;if(!this.isPrivate)return this.jwk;const p=n.jwkPubSchema.safeParse({...this.jwk,d:void 0,k:void 0,use:void 0,key_ops:o(this.keyOps)??n.PUBLIC_KEY_USAGE});if(p.success)return Object.freeze(p.data)}get bareJwk(){if(this.isSymetric)return;const{kty:p,crv:b,e:w,n:_,x:P,y:O}=this.jwk;return Object.freeze(n.jwkSchema.parse({crv:b,e:w,kty:p,n:_,x:P,y:O}))}get use(){return this.jwk.use}get keyOps(){return this.jwk.key_ops}get alg(){return this.jwk.alg}get kid(){return this.jwk.kid}get crv(){return this.jwk.crv}get algorithms(){return Object.freeze(Array.from((0,r.jwkAlgorithms)(this.jwk)))}get isRevoked(){return this.jwk.revoked!=null}isActive(p){var w;if(!(p!=null&&p.allowRevoked)&&this.isRevoked)return!1;const b=(p==null?void 0:p.clockTolerance)??0;if(b!==1/0){const _=((w=p==null?void 0:p.currentDate)==null?void 0:w.getTime())??Date.now(),{exp:P,nbf:O}=this.jwk;if(O!=null&&!(_>=O*1e3-b)||P!=null&&!(_<P*1e3+b))return!1}return!0}matches(p){return!(p.kid!=null&&!(Array.isArray(p.kid)?this.kid!=null&&p.kid.includes(this.kid):this.kid===p.kid)||p.alg!=null&&!(Array.isArray(p.alg)?p.alg.some(w=>this.algorithms.includes(w)):this.algorithms.includes(p.alg))||p.usage!=null&&(!(this.keyOps==null||this.keyOps.includes(p.usage)||p.usage==="verify"&&this.keyOps.includes("sign")||p.usage==="encrypt"&&this.keyOps.includes("decrypt")||p.usage==="wrapKey"&&this.keyOps.includes("unwrapKey"))||!(this.use==null||this.use==="sig"&&(0,n.isSigKeyUsage)(p.usage)||this.use==="enc"&&(0,n.isEncKeyUsage)(p.usage))||!(this.isPrivate||(0,n.isPublicKeyUsage)(p.usage))))}},(()=>{const g=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;l=[s.cachedGetter],d=[s.cachedGetter],u=[s.cachedGetter],f=[s.cachedGetter],m=[s.cachedGetter],t(a,null,l,{kind:"getter",name:"isPrivate",static:!1,private:!1,access:{has:p=>"isPrivate"in p,get:p=>p.isPrivate},metadata:g},null,c),t(a,null,d,{kind:"getter",name:"isSymetric",static:!1,private:!1,access:{has:p=>"isSymetric"in p,get:p=>p.isSymetric},metadata:g},null,c),t(a,null,u,{kind:"getter",name:"publicJwk",static:!1,private:!1,access:{has:p=>"publicJwk"in p,get:p=>p.publicJwk},metadata:g},null,c),t(a,null,f,{kind:"getter",name:"bareJwk",static:!1,private:!1,access:{has:p=>"bareJwk"in p,get:p=>p.bareJwk},metadata:g},null,c),t(a,null,m,{kind:"getter",name:"algorithms",static:!1,private:!1,access:{has:p=>"algorithms"in p,get:p=>p.algorithms},metadata:g},null,c),g&&Object.defineProperty(a,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:g})})(),a})();it.Key=i;function o(a){if(a==null)return;const c=new Set(a.filter(n.isPublicKeyUsage));return a.includes("sign")&&c.add("verify"),a.includes("decrypt")&&c.add("encrypt"),a.includes("unwrapKey")&&c.add("wrapKey"),Array.from(c)}return it}var ot={},tc;function M0(){if(tc)return ot;tc=1;var e=ot&&ot.__runInitializers||function(c,l,d){for(var u=arguments.length>2,f=0;f<l.length;f++)d=u?l[f].call(c,d):l[f].call(c);return u?d:void 0},t=ot&&ot.__esDecorate||function(c,l,d,u,f,m){function g(S){if(S!==void 0&&typeof S!="function")throw new TypeError("Function expected");return S}for(var p=u.kind,b=p==="getter"?"get":p==="setter"?"set":"value",w=!l&&c?u.static?c:c.prototype:null,_=l||(w?Object.getOwnPropertyDescriptor(w,u.name):{}),P,O=!1,j=d.length-1;j>=0;j--){var C={};for(var x in u)C[x]=x==="access"?{}:u[x];for(var x in u.access)C.access[x]=u.access[x];C.addInitializer=function(S){if(O)throw new TypeError("Cannot add initializers after decoration has completed");m.push(g(S||null))};var R=(0,d[j])(p==="accessor"?{get:_.get,set:_.set}:_[b],C);if(p==="accessor"){if(R===void 0)continue;if(R===null||typeof R!="object")throw new TypeError("Object expected");(P=g(R.get))&&(_.get=P),(P=g(R.set))&&(_.set=P),(P=g(R.init))&&f.unshift(P)}else(P=g(R))&&(p==="field"?f.unshift(P):_[b]=P)}w&&Object.defineProperty(w,u.name,_),O=!0};Object.defineProperty(ot,"__esModule",{value:!0}),ot.Keyset=void 0;const r=ai(),n=Ql(),s=hs(),i=c=>c.privateJwk,o=c=>c.publicJwk;let a=(()=>{var c;let l=[],d,u,f;return c=class{constructor(g,p=g instanceof c?[...g.preferredSigningAlgorithms]:["EdDSA","ES256K","ES256","PS256","PS384","PS512","HS256","HS384","HS512"]){Object.defineProperty(this,"preferredSigningAlgorithms",{enumerable:!0,configurable:!0,writable:!0,value:(e(this,l),p)}),Object.defineProperty(this,"keys",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const b=[],w=new Set;for(const _ of g)if(_&&(b.push(_),_.kid)){if(w.has(_.kid))throw new r.JwkError(`Duplicate key: ${_.kid}`);w.add(_.kid)}this.keys=Object.freeze(b)}get size(){return this.keys.length}get signAlgorithms(){const g=new Set;for(const p of this)if(p.use==="sig")for(const b of p.algorithms)g.add(b);return Object.freeze([...g].sort((0,s.preferredOrderCmp)(this.preferredSigningAlgorithms)))}get publicJwks(){return Object.freeze({keys:Object.freeze(Array.from(this,o).filter(s.isDefined))})}get privateJwks(){return Object.freeze({keys:Object.freeze(Array.from(this,i).filter(s.isDefined))})}has(g){return this.keys.some(p=>p.kid===g)}get(g){const p=this.find(g);if(p)return p;throw new r.JwkError(`Key not found ${g.kid??g.alg??g.usage??"<unknown>"}`,r.ERR_JWK_NOT_FOUND)}find(g){for(const p of this.list(g))return p}*list(g){for(const p of this)p.isActive(g)&&p.matches(g)&&(yield p)}findPrivateKey({kid:g,alg:p,usage:b,...w}){const _=[];Array.isArray(p)&&p.length===1&&(p=p[0]);for(const j of this.list({...w,kid:g,alg:p,usage:b})){if(typeof p=="string")return{key:j,alg:p};_.push(j)}const P=(0,s.matchesAny)(p),O=_.map(j=>[j,j.algorithms.filter(P)]);for(const j of this.preferredSigningAlgorithms)for(const[C,x]of O)if(x.includes(j))return{key:C,alg:j};for(const[j,C]of O)for(const x of C)return{key:j,alg:x};throw new r.JwkError(`No private key found for ${g||p||b}`,r.ERR_JWK_NOT_FOUND)}[(d=[s.cachedGetter],u=[s.cachedGetter],f=[s.cachedGetter],Symbol.iterator)](){return this.keys.values()}async createJwt({alg:g,kid:p,...b},w){try{const{key:_,alg:P}=this.findPrivateKey({alg:g,kid:p,usage:"sign",allowRevoked:!1}),O={...b,alg:P,kid:_.kid};return typeof w=="function"&&(w=await w(O,_)),await _.createJwt(O,w)}catch(_){throw r.JwtCreateError.from(_)}}async verifyJwt(g,p){const{header:b}=(0,n.unsafeDecodeJwt)(g),{kid:w,alg:_}=b,P=[];for(const O of this.list({...p,kid:w,alg:_,usage:"verify"}))try{return{...await O.verifyJwt(g,p),key:O}}catch(j){P.push(j)}switch(P.length){case 0:throw new r.JwtVerifyError("No key matched",r.ERR_JWKS_NO_MATCHING_KEY);case 1:throw r.JwtVerifyError.from(P[0],r.ERR_JWT_INVALID);default:throw r.JwtVerifyError.from(P,r.ERR_JWT_INVALID)}}toJSON(){return structuredClone(this.publicJwks)}},(()=>{const m=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t(c,null,d,{kind:"getter",name:"signAlgorithms",static:!1,private:!1,access:{has:g=>"signAlgorithms"in g,get:g=>g.signAlgorithms},metadata:m},null,l),t(c,null,u,{kind:"getter",name:"publicJwks",static:!1,private:!1,access:{has:g=>"publicJwks"in g,get:g=>g.publicJwks},metadata:m},null,l),t(c,null,f,{kind:"getter",name:"privateJwks",static:!1,private:!1,access:{has:g=>"privateJwks"in g,get:g=>g.privateJwks},metadata:m},null,l),m&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m})})(),c})();return ot.Keyset=a,ot}var rc;function ps(){return rc||(rc=1,function(e){var t=Vt&&Vt.__createBinding||(Object.create?function(s,i,o,a){a===void 0&&(a=o);var c=Object.getOwnPropertyDescriptor(i,o);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(s,a,c)}:function(s,i,o,a){a===void 0&&(a=o),s[a]=i[o]}),r=Vt&&Vt.__exportStar||function(s,i){for(var o in s)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,s,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationError=void 0;var n=K();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return n.ZodError}}),r(Wl(),e),r(ai(),e),r(fs(),e),r(j0(),e),r(Ql(),e),r(k0(),e),r(Gl(),e),r(z0(),e),r(M0(),e)}(Vt)),Vt}var Ti={},nc;function Go(){return nc||(nc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthAuthorizationDetailsSchema=e.oauthAuthorizationDetailSchema=void 0;const t=K(),r=Ft();e.oauthAuthorizationDetailSchema=t.z.object({type:t.z.string(),locations:t.z.array(r.dangerousUriSchema).optional(),actions:t.z.array(t.z.string()).optional(),datatypes:t.z.array(t.z.string()).optional(),identifier:t.z.string().optional(),privileges:t.z.array(t.z.string()).optional()}),e.oauthAuthorizationDetailsSchema=t.z.array(e.oauthAuthorizationDetailSchema)}(Ti)),Ti}var nn={},sc;function Yl(){if(sc)return nn;sc=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.oauthTokenTypeSchema=void 0;const e=K();return nn.oauthTokenTypeSchema=e.z.union([e.z.string().regex(/^DPoP$/i).transform(()=>"DPoP"),e.z.string().regex(/^Bearer$/i).transform(()=>"Bearer")]),nn}var ic;function Xl(){if(ic)return rn;ic=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.oauthTokenResponseSchema=void 0;const e=K(),t=ps(),r=Go(),n=Yl();return rn.oauthTokenResponseSchema=e.z.object({access_token:e.z.string(),token_type:n.oauthTokenTypeSchema,scope:e.z.string().optional(),refresh_token:e.z.string().optional(),expires_in:e.z.number().optional(),id_token:t.signedJwtSchema.optional(),authorization_details:r.oauthAuthorizationDetailsSchema.optional()}).passthrough(),rn}var oc;function I0(){if(oc)return tn;oc=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.atprotoOAuthTokenResponseSchema=void 0;const e=K(),t=Fd(),r=Wo(),n=Xl();return tn.atprotoOAuthTokenResponseSchema=n.oauthTokenResponseSchema.extend({token_type:e.z.literal("DPoP"),sub:t.atprotoDidSchema,scope:r.atprotoOAuthScopeSchema,id_token:e.z.never().optional()}),tn}var sn={},ac;function ed(){if(ac)return sn;ac=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.oauthAccessTokenSchema=void 0;const e=K();return sn.oauthAccessTokenSchema=e.z.string().min(1),sn}var on={},cc;function td(){if(cc)return on;cc=1,Object.defineProperty(on,"__esModule",{value:!0}),on.oauthAuthorizationCodeGrantTokenRequestSchema=void 0;const e=K(),t=Jr();return on.oauthAuthorizationCodeGrantTokenRequestSchema=e.z.object({grant_type:e.z.literal("authorization_code"),code:e.z.string().min(1),redirect_uri:t.oauthRedirectUriSchema,code_verifier:e.z.string().min(43).max(128).regex(/^[a-zA-Z0-9-._~]+$/).optional()}),on}var an={},uc;function Qo(){if(uc)return an;uc=1,Object.defineProperty(an,"__esModule",{value:!0}),an.oauthAuthorizationRequestJarSchema=void 0;const e=K(),t=ps();return an.oauthAuthorizationRequestJarSchema=e.z.object({request:e.z.union([t.signedJwtSchema,t.unsignedJwtSchema])}),an}var cn={},un={},ln={},lc;function rd(){if(lc)return ln;lc=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.oauthCodeChallengeMethodSchema=void 0;const e=K();return ln.oauthCodeChallengeMethodSchema=e.z.enum(["S256","plain"]),ln}var dn={},dc;function Yo(){if(dc)return dn;dc=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.oauthPromptModeSchema=void 0;const e=K();return dn.oauthPromptModeSchema=e.z.enum(["none","login","consent","select_account","create"]),dn}var hn={},hc;function nd(){if(hc)return hn;hc=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.oauthResponseModeSchema=void 0;const e=K();return hn.oauthResponseModeSchema=e.z.enum(["query","fragment","form_post"]),hn}var fn={},fc;function Xo(){if(fc)return fn;fc=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.oauthResponseTypeSchema=void 0;const e=K();return fn.oauthResponseTypeSchema=e.z.enum(["code","token","none","code id_token token","code id_token","code token","id_token token","id_token"]),fn}var pn={},pc;function sd(){if(pc)return pn;pc=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.oidcClaimsParameterSchema=void 0;const e=K();return pn.oidcClaimsParameterSchema=e.z.enum(["auth_time","nonce","acr","name","family_name","given_name","middle_name","nickname","preferred_username","gender","picture","profile","website","birthdate","zoneinfo","locale","updated_at","email","email_verified","phone_number","phone_number_verified","address"]),pn}var mn={},mc;function id(){if(mc)return mn;mc=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.oidcClaimsPropertiesSchema=void 0;const e=K(),t=e.z.union([e.z.string(),e.z.number(),e.z.boolean()]);return mn.oidcClaimsPropertiesSchema=e.z.object({essential:e.z.boolean().optional(),value:t.optional(),values:e.z.array(t).optional()}),mn}var gn={},gc;function od(){if(gc)return gn;gc=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.oidcEntityTypeSchema=void 0;const e=K();return gn.oidcEntityTypeSchema=e.z.enum(["userinfo","id_token"]),gn}var vc;function ea(){if(vc)return un;vc=1,Object.defineProperty(un,"__esModule",{value:!0}),un.oauthAuthorizationRequestParametersSchema=void 0;const e=K(),t=ps(),r=Go(),n=cr(),s=rd(),i=Yo(),o=Jr(),a=nd(),c=Xo(),l=ds(),d=sd(),u=id(),f=od(),m=Zr();return un.oauthAuthorizationRequestParametersSchema=e.z.object({client_id:n.oauthClientIdSchema,state:e.z.string().optional(),redirect_uri:o.oauthRedirectUriSchema.optional(),scope:l.oauthScopeSchema.optional(),response_type:c.oauthResponseTypeSchema,code_challenge:e.z.string().optional(),code_challenge_method:s.oauthCodeChallengeMethodSchema.optional(),dpop_jkt:e.z.string().optional(),response_mode:a.oauthResponseModeSchema.optional(),nonce:e.z.string().optional(),max_age:e.z.preprocess(m.numberPreprocess,e.z.number().int().min(0)).optional(),claims:e.z.preprocess(m.jsonObjectPreprocess,e.z.record(f.oidcEntityTypeSchema,e.z.record(d.oidcClaimsParameterSchema,e.z.union([e.z.literal(null),u.oidcClaimsPropertiesSchema])))).optional(),login_hint:e.z.string().min(1).optional(),ui_locales:e.z.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?( [a-z]{2,3}(-[A-Z]{2})?)*$/).optional(),id_token_hint:t.signedJwtSchema.optional(),display:e.z.enum(["page","popup","touch","wap"]).optional(),prompt:i.oauthPromptModeSchema.optional(),authorization_details:e.z.preprocess(m.jsonObjectPreprocess,r.oauthAuthorizationDetailsSchema).optional()}),un}var yc;function L0(){if(yc)return cn;yc=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.oauthAuthorizationRequestParSchema=void 0;const e=K(),t=Qo(),r=ea();return cn.oauthAuthorizationRequestParSchema=e.z.union([r.oauthAuthorizationRequestParametersSchema,t.oauthAuthorizationRequestJarSchema]),cn}var vn={},yn={},_n={},_c;function ad(){if(_c)return _n;_c=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.oauthRequestUriSchema=void 0;const e=K();return _n.oauthRequestUriSchema=e.z.string().min(1),_n}var bc;function cd(){if(bc)return yn;bc=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.oauthAuthorizationRequestUriSchema=void 0;const e=K(),t=ad();return yn.oauthAuthorizationRequestUriSchema=e.z.object({request_uri:t.oauthRequestUriSchema}),yn}var wc;function T0(){if(wc)return vn;wc=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.oauthAuthorizationRequestQuerySchema=void 0;const e=K(),t=Qo(),r=ea(),n=cd(),s=cr();return vn.oauthAuthorizationRequestQuerySchema=e.z.intersection(e.z.object({client_id:s.oauthClientIdSchema}),e.z.union([r.oauthAuthorizationRequestParametersSchema,t.oauthAuthorizationRequestJarSchema,n.oauthAuthorizationRequestUriSchema])),vn}var bn={},Sc;function N0(){if(Sc)return bn;Sc=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.oauthAuthorizationResponseErrorSchema=void 0;const e=K();return bn.oauthAuthorizationResponseErrorSchema=e.z.enum(["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invalid_scope","server_error","temporarily_unavailable"]),bn}var Ni={},wn={},Rc;function ta(){if(Rc)return wn;Rc=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.oauthIssuerIdentifierSchema=void 0;const e=K(),t=Ft();return wn.oauthIssuerIdentifierSchema=t.webUriSchema.superRefine((r,n)=>{if(r.endsWith("/"))return n.addIssue({code:e.z.ZodIssueCode.custom,message:"Issuer URL must not end with a slash"}),!1;const s=new URL(r);if(s.username||s.password)return n.addIssue({code:e.z.ZodIssueCode.custom,message:"Issuer URL must not contain a username or password"}),!1;if(s.hash||s.search)return n.addIssue({code:e.z.ZodIssueCode.custom,message:"Issuer URL must not contain a query or fragment"}),!1;const i=s.pathname==="/"?s.origin:s.href;return r!==i?(n.addIssue({code:e.z.ZodIssueCode.custom,message:"Issuer URL must be in the canonical form"}),!1):!0}),wn}var Pc;function D0(){return Pc||(Pc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthAuthorizationServerMetadataValidator=e.oauthAuthorizationServerMetadataSchema=void 0;const t=K(),r=rd(),n=ta(),s=Yo(),i=Ft();e.oauthAuthorizationServerMetadataSchema=t.z.object({issuer:n.oauthIssuerIdentifierSchema,claims_supported:t.z.array(t.z.string()).optional(),claims_locales_supported:t.z.array(t.z.string()).optional(),claims_parameter_supported:t.z.boolean().optional(),request_parameter_supported:t.z.boolean().optional(),request_uri_parameter_supported:t.z.boolean().optional(),require_request_uri_registration:t.z.boolean().optional(),scopes_supported:t.z.array(t.z.string()).optional(),subject_types_supported:t.z.array(t.z.string()).optional(),response_types_supported:t.z.array(t.z.string()).optional(),response_modes_supported:t.z.array(t.z.string()).optional(),grant_types_supported:t.z.array(t.z.string()).optional(),code_challenge_methods_supported:t.z.array(r.oauthCodeChallengeMethodSchema).min(1).optional(),ui_locales_supported:t.z.array(t.z.string()).optional(),id_token_signing_alg_values_supported:t.z.array(t.z.string()).optional(),display_values_supported:t.z.array(t.z.string()).optional(),request_object_signing_alg_values_supported:t.z.array(t.z.string()).optional(),authorization_response_iss_parameter_supported:t.z.boolean().optional(),authorization_details_types_supported:t.z.array(t.z.string()).optional(),request_object_encryption_alg_values_supported:t.z.array(t.z.string()).optional(),request_object_encryption_enc_values_supported:t.z.array(t.z.string()).optional(),jwks_uri:i.webUriSchema.optional(),authorization_endpoint:i.webUriSchema,token_endpoint:i.webUriSchema,token_endpoint_auth_methods_supported:t.z.array(t.z.string()).default(["client_secret_basic"]),token_endpoint_auth_signing_alg_values_supported:t.z.array(t.z.string()).optional(),revocation_endpoint:i.webUriSchema.optional(),introspection_endpoint:i.webUriSchema.optional(),pushed_authorization_request_endpoint:i.webUriSchema.optional(),require_pushed_authorization_requests:t.z.boolean().optional(),userinfo_endpoint:i.webUriSchema.optional(),end_session_endpoint:i.webUriSchema.optional(),registration_endpoint:i.webUriSchema.optional(),dpop_signing_alg_values_supported:t.z.array(t.z.string()).optional(),protected_resources:t.z.array(i.webUriSchema).optional(),client_id_metadata_document_supported:t.z.boolean().optional(),prompt_values_supported:t.z.array(s.oauthPromptModeSchema).optional()}),e.oauthAuthorizationServerMetadataValidator=e.oauthAuthorizationServerMetadataSchema.superRefine((o,a)=>{o.require_pushed_authorization_requests&&!o.pushed_authorization_request_endpoint&&a.addIssue({code:t.z.ZodIssueCode.custom,message:'"pushed_authorization_request_endpoint" required when "require_pushed_authorization_requests" is true'})}).superRefine((o,a)=>{o.response_types_supported&&(o.response_types_supported.includes("code")||a.addIssue({code:t.z.ZodIssueCode.custom,message:'Response type "code" is required'}))}).superRefine((o,a)=>{var c;(c=o.token_endpoint_auth_signing_alg_values_supported)!=null&&c.includes("none")&&a.addIssue({code:t.z.ZodIssueCode.custom,message:'Client authentication method "none" is not allowed'})})}(Ni)),Ni}var Sn={},Cc;function ud(){if(Cc)return Sn;Cc=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.oauthClientCredentialsGrantTokenRequestSchema=void 0;const e=K();return Sn.oauthClientCredentialsGrantTokenRequestSchema=e.z.object({grant_type:e.z.literal("client_credentials")}),Sn}var Di={},Ac;function q0(){return Ac||(Ac=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthClientCredentialsSchema=e.oauthClientCredentialsNoneSchema=e.oauthClientCredentialsSecretPostSchema=e.oauthClientCredentialsJwtBearerSchema=void 0;const t=K(),r=ps(),n=Vl(),s=cr();e.oauthClientCredentialsJwtBearerSchema=t.z.object({client_id:s.oauthClientIdSchema,client_assertion_type:t.z.literal(n.CLIENT_ASSERTION_TYPE_JWT_BEARER),client_assertion:r.signedJwtSchema}),e.oauthClientCredentialsSecretPostSchema=t.z.object({client_id:s.oauthClientIdSchema,client_secret:t.z.string()}),e.oauthClientCredentialsNoneSchema=t.z.object({client_id:s.oauthClientIdSchema}),e.oauthClientCredentialsSchema=t.z.union([e.oauthClientCredentialsJwtBearerSchema,e.oauthClientCredentialsSecretPostSchema,e.oauthClientCredentialsNoneSchema])}(Di)),Di}var qi={},xc;function F0(){return xc||(xc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.conventionalOAuthClientIdSchema=e.oauthClientIdDiscoverableSchema=void 0,e.isOAuthClientIdDiscoverable=i,e.isConventionalOAuthClientId=o,e.assertOAuthDiscoverableClientId=a,e.parseOAuthDiscoverableClientId=c;const t=K(),r=cr(),n=Ft(),s=Zr();e.oauthClientIdDiscoverableSchema=t.z.intersection(r.oauthClientIdSchema,n.httpsUriSchema).superRefine((l,d)=>{const u=new URL(l);return u.username||u.password?(d.addIssue({code:t.z.ZodIssueCode.custom,message:"ClientID must not contain credentials"}),!1):u.hash?(d.addIssue({code:t.z.ZodIssueCode.custom,message:"ClientID must not contain a fragment"}),!1):u.pathname==="/"?(d.addIssue({code:t.z.ZodIssueCode.custom,message:'ClientID must contain a path component (e.g. "/client-metadata.json")'}),!1):u.pathname.endsWith("/")?(d.addIssue({code:t.z.ZodIssueCode.custom,message:"ClientID path must not end with a trailing slash"}),!1):(0,s.isHostnameIP)(u.hostname)?(d.addIssue({code:t.z.ZodIssueCode.custom,message:"ClientID hostname must not be an IP address"}),!1):(0,s.extractUrlPath)(l)!==u.pathname?(d.addIssue({code:t.z.ZodIssueCode.custom,message:`ClientID must be in canonical form ("${u.href}", got "${l}")`}),!1):!0});function i(l){return e.oauthClientIdDiscoverableSchema.safeParse(l).success}e.conventionalOAuthClientIdSchema=e.oauthClientIdDiscoverableSchema.superRefine((l,d)=>{const u=new URL(l);return u.port?(d.addIssue({code:t.z.ZodIssueCode.custom,message:"ClientID must not contain a port"}),!1):u.search?(d.addIssue({code:t.z.ZodIssueCode.custom,message:"ClientID must not contain a query string"}),!1):u.pathname!=="/oauth-client-metadata.json"?(d.addIssue({code:t.z.ZodIssueCode.custom,message:'ClientID must be "/oauth-client-metadata.json"'}),!1):!0});function o(l){return e.conventionalOAuthClientIdSchema.safeParse(l).success}function a(l){e.oauthClientIdDiscoverableSchema.parse(l)}function c(l){return new URL(e.oauthClientIdDiscoverableSchema.parse(l))}}(qi)),qi}var Rn={},Pn={},Oc;function ld(){if(Oc)return Pn;Oc=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.oauthEndpointAuthMethod=void 0;const e=K();return Pn.oauthEndpointAuthMethod=e.z.enum(["client_secret_basic","client_secret_jwt","client_secret_post","none","private_key_jwt","self_signed_tls_client_auth","tls_client_auth"]),Pn}var Cn={},Ec;function dd(){if(Ec)return Cn;Ec=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.oauthGrantTypeSchema=void 0;const e=K();return Cn.oauthGrantTypeSchema=e.z.enum(["authorization_code","implicit","refresh_token","password","client_credentials","urn:ietf:params:oauth:grant-type:jwt-bearer","urn:ietf:params:oauth:grant-type:saml2-bearer"]),Cn}var jc;function U0(){if(jc)return Rn;jc=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.oauthClientMetadataSchema=void 0;const e=K(),t=ps(),r=cr(),n=ld(),s=dd(),i=Jr(),o=Xo(),a=ds(),c=Ft();return Rn.oauthClientMetadataSchema=e.z.object({redirect_uris:e.z.array(i.oauthRedirectUriSchema).nonempty(),response_types:e.z.array(o.oauthResponseTypeSchema).nonempty().default(["code"]),grant_types:e.z.array(s.oauthGrantTypeSchema).nonempty().default(["authorization_code"]),scope:a.oauthScopeSchema.optional(),token_endpoint_auth_method:n.oauthEndpointAuthMethod.default("client_secret_basic"),token_endpoint_auth_signing_alg:e.z.string().optional(),userinfo_signed_response_alg:e.z.string().optional(),userinfo_encrypted_response_alg:e.z.string().optional(),jwks_uri:c.webUriSchema.optional(),jwks:t.jwksPubSchema.optional(),application_type:e.z.enum(["web","native"]).default("web"),subject_type:e.z.enum(["public","pairwise"]).default("public"),request_object_signing_alg:e.z.string().optional(),id_token_signed_response_alg:e.z.string().optional(),authorization_signed_response_alg:e.z.string().default("RS256"),authorization_encrypted_response_enc:e.z.enum(["A128CBC-HS256"]).optional(),authorization_encrypted_response_alg:e.z.string().optional(),client_id:r.oauthClientIdSchema.optional(),client_name:e.z.string().optional(),client_uri:c.webUriSchema.optional(),policy_uri:c.webUriSchema.optional(),tos_uri:c.webUriSchema.optional(),logo_uri:c.webUriSchema.optional(),default_max_age:e.z.number().optional(),require_auth_time:e.z.boolean().optional(),contacts:e.z.array(e.z.string().email()).optional(),tls_client_certificate_bound_access_tokens:e.z.boolean().optional(),dpop_bound_access_tokens:e.z.boolean().optional(),authorization_details_types:e.z.array(e.z.string()).optional()}),Rn}var An={},kc;function H0(){return kc||(kc=1,Object.defineProperty(An,"__esModule",{value:!0}),An.OAUTH_ENDPOINT_NAMES=void 0,An.OAUTH_ENDPOINT_NAMES=["token","revocation","introspection","pushed_authorization_request"]),An}var Fi={},zc;function B0(){return zc||(zc=1,Object.defineProperty(Fi,"__esModule",{value:!0})),Fi}var xn={},Mc;function V0(){if(Mc)return xn;Mc=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.oauthParResponseSchema=void 0;const e=K();return xn.oauthParResponseSchema=e.z.object({request_uri:e.z.string(),expires_in:e.z.number().int().positive()}),xn}var On={},Ic;function hd(){if(Ic)return On;Ic=1,Object.defineProperty(On,"__esModule",{value:!0}),On.oauthPasswordGrantTokenRequestSchema=void 0;const e=K();return On.oauthPasswordGrantTokenRequestSchema=e.z.object({grant_type:e.z.literal("password"),username:e.z.string(),password:e.z.string()}),On}var En={},Lc;function K0(){if(Lc)return En;Lc=1,Object.defineProperty(En,"__esModule",{value:!0}),En.oauthProtectedResourceMetadataSchema=void 0;const e=K(),t=ta(),r=Ft();return En.oauthProtectedResourceMetadataSchema=e.z.object({resource:r.webUriSchema.refine(n=>!n.includes("?"),{message:"Resource URL must not contain query parameters"}).refine(n=>!n.includes("#"),{message:"Resource URL must not contain a fragment"}),authorization_servers:e.z.array(t.oauthIssuerIdentifierSchema).optional(),jwks_uri:r.webUriSchema.optional(),scopes_supported:e.z.array(e.z.string()).optional(),bearer_methods_supported:e.z.array(e.z.enum(["header","body","query"])).optional(),resource_signing_alg_values_supported:e.z.array(e.z.string()).optional(),resource_documentation:r.webUriSchema.optional(),resource_policy_uri:r.webUriSchema.optional(),resource_tos_uri:r.webUriSchema.optional()}),En}var jn={},kn={},Tc;function ra(){if(Tc)return kn;Tc=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.oauthRefreshTokenSchema=void 0;const e=K();return kn.oauthRefreshTokenSchema=e.z.string().min(1),kn}var Nc;function fd(){if(Nc)return jn;Nc=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.oauthRefreshTokenGrantTokenRequestSchema=void 0;const e=K(),t=ra();return jn.oauthRefreshTokenGrantTokenRequestSchema=e.z.object({grant_type:e.z.literal("refresh_token"),refresh_token:t.oauthRefreshTokenSchema}),jn}var zn={},Dc;function $0(){if(Dc)return zn;Dc=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.oauthTokenIdentificationSchema=void 0;const e=K(),t=ed(),r=ra();return zn.oauthTokenIdentificationSchema=e.z.object({token:e.z.union([t.oauthAccessTokenSchema,r.oauthRefreshTokenSchema]),token_type_hint:e.z.enum(["access_token","refresh_token"]).optional()}),zn}var Mn={},qc;function Z0(){if(qc)return Mn;qc=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.oauthTokenRequestSchema=void 0;const e=K(),t=td(),r=ud(),n=hd(),s=fd();return Mn.oauthTokenRequestSchema=e.z.discriminatedUnion("grant_type",[t.oauthAuthorizationCodeGrantTokenRequestSchema,s.oauthRefreshTokenGrantTokenRequestSchema,n.oauthPasswordGrantTokenRequestSchema,r.oauthClientCredentialsGrantTokenRequestSchema]),Mn}var In={},Fc;function J0(){if(Fc)return In;Fc=1,Object.defineProperty(In,"__esModule",{value:!0}),In.oidcAuthorizationResponseErrorSchema=void 0;const e=K();return In.oidcAuthorizationResponseErrorSchema=e.z.enum(["interaction_required","login_required","account_selection_required","consent_required","invalid_request_uri","invalid_request_object","request_not_supported","request_uri_not_supported","registration_not_supported"]),In}var Ln={},Uc;function W0(){if(Uc)return Ln;Uc=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.oidcUserinfoSchema=void 0;const e=K();return Ln.oidcUserinfoSchema=e.z.object({sub:e.z.string(),iss:e.z.string().url().optional(),aud:e.z.union([e.z.string(),e.z.array(e.z.string()).min(1)]).optional(),email:e.z.string().email().optional(),email_verified:e.z.boolean().optional(),name:e.z.string().optional(),preferred_username:e.z.string().optional(),picture:e.z.string().url().optional()}),Ln}var Hc;function G0(){return Hc||(Hc=1,function(e){var t=Bt&&Bt.__createBinding||(Object.create?function(n,s,i,o){o===void 0&&(o=i);var a=Object.getOwnPropertyDescriptor(s,i);(!a||("get"in a?!s.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return s[i]}}),Object.defineProperty(n,o,a)}:function(n,s,i,o){o===void 0&&(o=i),n[o]=s[i]}),r=Bt&&Bt.__exportStar||function(n,s){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i)&&t(s,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Vl(),e),r(Ft(),e),r(Zr(),e),r(Zl(),e),r(g0(),e),r(Kl(),e),r(Wo(),e),r(I0(),e),r(ed(),e),r(td(),e),r(Go(),e),r(Qo(),e),r(L0(),e),r(ea(),e),r(T0(),e),r(cd(),e),r(N0(),e),r(D0(),e),r(ud(),e),r(q0(),e),r(F0(),e),r($l(),e),r(cr(),e),r(U0(),e),r(ld(),e),r(H0(),e),r(dd(),e),r(B0(),e),r(ta(),e),r(V0(),e),r(hd(),e),r(Yo(),e),r(K0(),e),r(Jr(),e),r(fd(),e),r(ra(),e),r(ad(),e),r(nd(),e),r(Xo(),e),r(ds(),e),r($0(),e),r(Z0(),e),r(Xl(),e),r(Yl(),e),r(J0(),e),r(sd(),e),r(id(),e),r(od(),e),r(W0(),e)}(Bt)),Bt}var Zs=G0();function Q0({clientId:e}){const{i18n:t,_:r}=rt();return Zs.isOAuthClientIdLoopback(e)?t._({id:"u607t5"}):Zs.isConventionalOAuthClientId(e)?new URL(e).hostname:e}function Y0({clientId:e,clientMetadata:t}){const{i18n:r,_:n}=rt();return Zs.isOAuthClientIdLoopback(e)?r._({id:"4Yp2r7"}):t!=null&&t.client_name?t.client_name:Zs.isConventionalOAuthClientId(e)?new URL(e).hostname:e}function X0(){const{account:e}=cs(),{sub:t}=e,{data:r,isLoading:n,refetch:s}=p0({sub:t});return r?r.length>0?h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{children:h.jsx(X,{id:"kx1Bq7"})}),r.map(i=>h.jsx(em,{sub:t,session:i},i.tokenId)),h.jsx("p",{className:"text-text-light mt-4 text-sm",children:h.jsx(X,{id:"SLeBc7"})})]}):h.jsx("p",{children:h.jsx(X,{id:"pWhWXw"})}):n?h.jsx(Jo,{className:"text-primary",size:28}):h.jsx(xo,{role:"status",action:h.jsx(gu,{onClick:()=>s(),children:h.jsx(X,{id:"6gRgw8"})}),children:h.jsx(X,{id:"b9LiEi"})})}function em({session:{clientId:e,clientMetadata:t,tokenId:r,createdAt:n,updatedAt:s,scope:i=t==null?void 0:t.scope},sub:o}){const{i18n:a,i18n:c,_:l}=rt(),{notify:d}=Qs(),{mutateAsync:u,isPending:f}=m0(),m=Q0({clientId:e}),g=Y0({clientId:e,clientMetadata:t}),p=async()=>{try{await u({sub:o,tokenId:r}),d({variant:"success",title:a._({id:"AyHABv"}),duration:2e3})}catch(b){console.error("Failed to revoke OAuth session",b),d({variant:"error",title:a._({id:"ginpu1"}),duration:2e3})}};return h.jsxs("div",{className:"border-contrast-50 dark:border-contrast-100 flex flex-wrap items-center justify-between space-x-4 border-t px-2 pt-3",children:[h.jsxs("div",{className:"flex min-w-36 flex-1 flex-col space-x-2 truncate",children:[h.jsx("p",{className:"truncate font-semibold",children:g}),h.jsx("p",{className:"font-mono text-xs",children:m}),h.jsxs("p",{className:"text-text-light truncate text-xs",children:[h.jsx(X,{id:"4hPphw",values:{0:c.date(n,{year:"numeric",month:"short",day:"numeric"})}})," • ",h.jsx(X,{id:"NNWPjN",components:{0:h.jsx(f0,{date:s})}})]})]}),h.jsx(pr,{size:"sm",className:"min-w-max shrink-0 grow-0",loading:f,onClick:p,children:h.jsx(X,{id:"Hwam5t"})})]})}const pd=({sub:e})=>["account-sessions",e];function tm({sub:e}){const t=Br();return Tu({refetchOnWindowFocus:"always",staleTime:15e3,queryKey:pd({sub:e}),queryFn:async({signal:r})=>t.fetch("GET","/account-sessions",{sub:e},{signal:r})})}function rm(){const e=Br(),t=Ys();return Xs({async mutationFn({sub:r,deviceId:n}){return e.fetch("POST","/revoke-account-session",{sub:r,deviceId:n})},onSuccess(r,{sub:n}){t.invalidateQueries({queryKey:pd({sub:n})})}})}var nm="2.0.3",Ro=500,Bc="user-agent",qr="",Vc="?",Js="function",Mt="undefined",Fr="object",Po="string",Ce="browser",lt="cpu",Xe="device",Be="engine",Ne="os",wr="result",z="name",A="type",k="vendor",M="version",Ae="architecture",ts="major",E="model",$n="console",$="mobile",se="tablet",he="smarttv",Je="wearable",Ui="xr",Zn="embedded",Tn="inapp",na="brands",Jt="formFactors",sa="fullVersionList",Sr="platform",ia="platformVersion",ui="bitness",Ut="sec-ch-ua",sm=Ut+"-full-version-list",im=Ut+"-arch",om=Ut+"-"+ui,am=Ut+"-form-factors",cm=Ut+"-"+$,um=Ut+"-"+E,md=Ut+"-"+Sr,lm=md+"-version",gd=[na,sa,$,E,Sr,ia,Ae,Jt,ui],Cs="Amazon",ur="Apple",Kc="ASUS",$c="BlackBerry",$t="Google",Zc="Huawei",Jc="Lenovo",Wc="Honor",As="LG",Hi="Microsoft",Bi="Motorola",Vi="Nvidia",Gc="OnePlus",Ki="OPPO",Nn="Samsung",Qc="Sharp",Dn="Sony",$i="Xiaomi",Zi="Zebra",Yc="Chrome",Xc="Chromium",bt="Chromecast",dm="Edge",qn="Firefox",Fn="Opera",Ji="Facebook",eu="Sogou",lr="Mobile ",Un=" Browser",Co="Windows",hm=typeof window!==Mt,xe=hm&&window.navigator?window.navigator:void 0,St=xe&&xe.userAgentData?xe.userAgentData:void 0,fm=function(e,t){var r={},n=t;if(!Ws(t)){n={};for(var s in t)for(var i in t[s])n[i]=t[s][i].concat(n[i]?n[i]:[])}for(var o in e)r[o]=n[o]&&n[o].length%2===0?n[o].concat(e[o]):e[o];return r},li=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},Ao=function(e,t){if(typeof e===Fr&&e.length>0){for(var r in e)if(ht(e[r])==ht(t))return!0;return!1}return Wr(e)?ht(t).indexOf(ht(e))!==-1:!1},Ws=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||(t?Ws(e[r]):!1)},Wr=function(e){return typeof e===Po},Wi=function(e){if(e){for(var t=[],r=Ur(/\\?\"/g,e).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var s=rs(r[n]).split(";v=");t[n]={brand:s[0],version:s[1]}}else t[n]=rs(r[n]);return t}},ht=function(e){return Wr(e)?e.toLowerCase():e},Gi=function(e){return Wr(e)?Ur(/[^\d\.]/g,e).split(".")[0]:void 0},ft=function(e){for(var t in e){var r=e[t];typeof r==Fr&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},Ur=function(e,t){return Wr(t)?t.replace(e,qr):t},Hn=function(e){return Ur(/\\?\"/g,e)},rs=function(e,t){if(Wr(e))return e=Ur(/^\s\s*/,e),typeof t===Mt?e:e.substring(0,Ro)},Qi=function(e,t){if(!(!e||!t))for(var r=0,n,s,i,o,a,c;r<t.length&&!a;){var l=t[r],d=t[r+1];for(n=s=0;n<l.length&&!a&&l[n];)if(a=l[n++].exec(e),a)for(i=0;i<d.length;i++)c=a[++s],o=d[i],typeof o===Fr&&o.length>0?o.length===2?typeof o[1]==Js?this[o[0]]=o[1].call(this,c):this[o[0]]=o[1]:o.length===3?typeof o[1]===Js&&!(o[1].exec&&o[1].test)?this[o[0]]=c?o[1].call(this,c,o[2]):void 0:this[o[0]]=c?c.replace(o[1],o[2]):void 0:o.length===4&&(this[o[0]]=c?o[3].call(this,c.replace(o[1],o[2])):void 0):this[o]=c||void 0;r+=2}},Rt=function(e,t){for(var r in t)if(typeof t[r]===Fr&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(Ao(t[r][n],e))return r===Vc?void 0:r}else if(Ao(t[r],e))return r===Vc?void 0:r;return t.hasOwnProperty("*")?t["*"]:e},tu={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ru={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},nu={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[M,[z,lr+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[M,[z,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[z,M],[/opios[\/ ]+([\w\.]+)/i],[M,[z,Fn+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[M,[z,Fn+" GX"]],[/\bopr\/([\w\.]+)/i],[M,[z,Fn]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[M,[z,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[M,[z,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[z,M],[/quark(?:pc)?\/([-\w\.]+)/i],[M,[z,"Quark"]],[/\bddg\/([\w\.]+)/i],[M,[z,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[M,[z,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[M,[z,"WeChat"]],[/konqueror\/([\w\.]+)/i],[M,[z,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[M,[z,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[M,[z,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[M,[z,"Smart "+Jc+Un]],[/(avast|avg)\/([\w\.]+)/i],[[z,/(.+)/,"$1 Secure"+Un],M],[/\bfocus\/([\w\.]+)/i],[M,[z,qn+" Focus"]],[/\bopt\/([\w\.]+)/i],[M,[z,Fn+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[M,[z,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[M,[z,"Dolphin"]],[/coast\/([\w\.]+)/i],[M,[z,Fn+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[M,[z,"MIUI"+Un]],[/fxios\/([\w\.-]+)/i],[M,[z,lr+qn]],[/\bqihoobrowser\/?([\w\.]*)/i],[M,[z,"360"]],[/\b(qq)\/([\w\.]+)/i],[[z,/(.+)/,"$1Browser"],M],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[z,/(.+)/,"$1"+Un],M],[/samsungbrowser\/([\w\.]+)/i],[M,[z,Nn+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[M,[z,eu+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[z,eu+" Mobile"],M],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[z,M],[/(lbbrowser|rekonq)/i],[z],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[M,z],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[z,Ji],M,[A,Tn]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[z,M,[A,Tn]],[/\bgsa\/([\w\.]+) .*safari\//i],[M,[z,"GSA"],[A,Tn]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[M,[z,"TikTok"],[A,Tn]],[/\[(linkedin)app\]/i],[z,[A,Tn]],[/(chromium)[\/ ]([-\w\.]+)/i],[z,M],[/headlesschrome(?:\/([\w\.]+)| )/i],[M,[z,Yc+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[z,Yc+" WebView"],M],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[M,[z,"Android"+Un]],[/chrome\/([\w\.]+) mobile/i],[M,[z,lr+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[z,M],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[M,[z,lr+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[z,lr+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[M,z],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[z,[M,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[z,M],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[z,lr+qn],M],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[z,"Netscape"],M],[/(wolvic|librewolf)\/([\w\.]+)/i],[z,M],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[M,[z,qn+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[z,[M,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[z,[M,/[^\d\.]+./,qr]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Ae,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Ae,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Ae,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Ae,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Ae,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Ae,/ower/,qr,ht]],[/ sun4\w[;\)]/i],[[Ae,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Ae,ht]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[E,[k,Nn],[A,se]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[E,[k,Nn],[A,$]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[E,[k,ur],[A,$]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[E,[k,ur],[A,se]],[/(macintosh);/i],[E,[k,ur]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[E,[k,Qc],[A,$]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[E,[k,Wc],[A,se]],[/honor([-\w ]+)[;\)]/i],[E,[k,Wc],[A,$]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[E,[k,Zc],[A,se]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[E,[k,Zc],[A,$]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[E,/_/g," "],[k,$i],[A,se]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[E,/_/g," "],[k,$i],[A,$]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[E,[k,Ki],[A,$]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[E,[k,Rt,{OnePlus:["304","403","203"],"*":Ki}],[A,se]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[E,[k,"BLU"],[A,$]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[E,[k,"Vivo"],[A,$]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[E,[k,"Realme"],[A,$]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[E,[k,Bi],[A,$]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[E,[k,Bi],[A,se]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[E,[k,As],[A,se]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[E,[k,As],[A,$]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[E,[k,Jc],[A,se]],[/(nokia) (t[12][01])/i],[k,E,[A,se]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[E,/_/g," "],[A,$],[k,"Nokia"]],[/(pixel (c|tablet))\b/i],[E,[k,$t],[A,se]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[E,[k,$t],[A,$]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[E,[k,Dn],[A,$]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[E,"Xperia Tablet"],[k,Dn],[A,se]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[E,[k,Gc],[A,$]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[E,[k,Cs],[A,se]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[E,/(.+)/g,"Fire Phone $1"],[k,Cs],[A,$]],[/(playbook);[-\w\),; ]+(rim)/i],[E,k,[A,se]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[E,[k,$c],[A,$]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[E,[k,Kc],[A,se]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[E,[k,Kc],[A,$]],[/(nexus 9)/i],[E,[k,"HTC"],[A,se]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[k,[E,/_/g," "],[A,$]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[E,[k,"TCL"],[A,se]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[E,[k,"TCL"],[A,$]],[/(itel) ((\w+))/i],[[k,ht],E,[A,Rt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[E,[k,"Acer"],[A,se]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[E,[k,"Meizu"],[A,$]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[E,[k,"Ulefone"],[A,$]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[E,[k,"Energizer"],[A,$]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[E,[k,"Cat"],[A,$]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[E,[k,"Smartfren"],[A,$]],[/droid.+; (a(?:015|06[35]|142p?))/i],[E,[k,"Nothing"],[A,$]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[E,[k,"Archos"],[A,se]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[E,[k,"Archos"],[A,$]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[k,E,[A,se]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[k,E,[A,$]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[k,E,[A,se]],[/(surface duo)/i],[E,[k,Hi],[A,se]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[E,[k,"Fairphone"],[A,$]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[E,[k,Vi],[A,se]],[/(sprint) (\w+)/i],[k,E,[A,$]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[k,Hi],[A,$]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[E,[k,Zi],[A,se]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[E,[k,Zi],[A,$]],[/smart-tv.+(samsung)/i],[k,[A,he]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[k,Nn],[A,he]],[/tcast.+(lg)e?. ([-\w]+)/i],[k,E,[A,he]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[k,As],[A,he]],[/(apple) ?tv/i],[k,[E,ur+" TV"],[A,he]],[/crkey.*devicetype\/chromecast/i],[[E,bt+" Third Generation"],[k,$t],[A,he]],[/crkey.*devicetype\/([^/]*)/i],[[E,/^/,"Chromecast "],[k,$t],[A,he]],[/fuchsia.*crkey/i],[[E,bt+" Nest Hub"],[k,$t],[A,he]],[/crkey/i],[[E,bt],[k,$t],[A,he]],[/(portaltv)/i],[E,[k,Ji],[A,he]],[/droid.+aft(\w+)( bui|\))/i],[E,[k,Cs],[A,he]],[/(shield \w+ tv)/i],[E,[k,Vi],[A,he]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[E,[k,Qc],[A,he]],[/(bravia[\w ]+)( bui|\))/i],[E,[k,Dn],[A,he]],[/(mi(tv|box)-?\w+) bui/i],[E,[k,$i],[A,he]],[/Hbbtv.*(technisat) (.*);/i],[k,E,[A,he]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[k,rs],[E,rs],[A,he]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[E,[A,he]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[A,he]],[/(ouya)/i,/(nintendo) (\w+)/i],[k,E,[A,$n]],[/droid.+; (shield)( bui|\))/i],[E,[k,Vi],[A,$n]],[/(playstation \w+)/i],[E,[k,Dn],[A,$n]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[E,[k,Hi],[A,$n]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[E,[k,Nn],[A,Je]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[k,E,[A,Je]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[E,[k,Ki],[A,Je]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[E,[k,ur],[A,Je]],[/(opwwe\d{3})/i],[E,[k,Gc],[A,Je]],[/(moto 360)/i],[E,[k,Bi],[A,Je]],[/(smartwatch 3)/i],[E,[k,Dn],[A,Je]],[/(g watch r)/i],[E,[k,As],[A,Je]],[/droid.+; (wt63?0{2,3})\)/i],[E,[k,Zi],[A,Je]],[/droid.+; (glass) \d/i],[E,[k,$t],[A,Ui]],[/(pico) (4|neo3(?: link|pro)?)/i],[k,E,[A,Ui]],[/(quest( \d| pro)?s?).+vr/i],[E,[k,Ji],[A,Ui]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[k,[A,Zn]],[/(aeobc)\b/i],[E,[k,Cs],[A,Zn]],[/(homepod).+mac os/i],[E,[k,ur],[A,Zn]],[/windows iot/i],[[A,Zn]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[E,[A,Rt,{mobile:"Mobile",xr:"VR","*":se}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[A,se]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[A,$]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[E,[k,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[M,[z,dm+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[z,M],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[M,[z,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[z,M],[/ladybird\//i],[[z,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[M,z]],os:[[/microsoft (windows) (vista|xp)/i],[z,M],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[z,[M,Rt,tu]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[M,Rt,tu],[z,Co]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[M,/_/g,"."],[z,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[z,"macOS"],[M,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[M,[z,bt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[M,[z,bt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[M,[z,bt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[M,[z,bt+" Linux"]],[/crkey\/([\d\.]+)/i],[M,[z,bt]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[M,z],[/(ubuntu) ([\w\.]+) like android/i],[[z,/(.+)/,"$1 Touch"],M],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[z,M],[/\(bb(10);/i],[M,[z,$c]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[M,[z,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[M,[z,qn+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[M,[z,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[M,[z,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[z,"Chrome OS"],M],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[z,M],[/(sunos) ?([\w\.\d]*)/i],[[z,"Solaris"],M],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[z,M]]},xs=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return ft.call(e.init,[[Ce,[z,M,ts,A]],[lt,[Ae]],[Xe,[A,E,k]],[Be,[z,M]],[Ne,[z,M]]]),ft.call(e.isIgnore,[[Ce,[M,ts]],[Be,[M]],[Ne,[M]]]),ft.call(e.isIgnoreRgx,[[Ce,/ ?browser$/i],[Ne,/ ?os$/i]]),ft.call(e.toString,[[Ce,[z,M]],[lt,[Ae]],[Xe,[k,E]],[Be,[z,M]],[Ne,[z,M]]]),e}(),pm=function(e,t){var r=xs.init[t],n=xs.isIgnore[t]||0,s=xs.isIgnoreRgx[t]||0,i=xs.toString[t]||0;function o(){ft.call(this,r)}return o.prototype.getItem=function(){return e},o.prototype.withClientHints=function(){return St?St.getHighEntropyValues(gd).then(function(a){return e.setCH(new vd(a,!1)).parseCH().get()}):e.parseCH().get()},o.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=wr&&(o.prototype.is=function(a){var c=!1;for(var l in this)if(this.hasOwnProperty(l)&&!Ao(n,l)&&ht(s?Ur(s,this[l]):this[l])==ht(s?Ur(s,a):a)){if(c=!0,a!=Mt)break}else if(a==Mt&&c){c=!c;break}return c},o.prototype.toString=function(){var a=qr;for(var c in i)typeof this[i[c]]!==Mt&&(a+=(a?" ":qr)+this[i[c]]);return a||Mt}),St||(o.prototype.then=function(a){var c=this,l=function(){for(var u in c)c.hasOwnProperty(u)&&(this[u]=c[u])};l.prototype={is:o.prototype.is,toString:o.prototype.toString};var d=new l;return a(d),d}),new o};function vd(e,t){if(e=e||{},ft.call(this,gd),t)ft.call(this,[[na,Wi(e[Ut])],[sa,Wi(e[sm])],[$,/\?1/.test(e[cm])],[E,Hn(e[um])],[Sr,Hn(e[md])],[ia,Hn(e[lm])],[Ae,Hn(e[im])],[Jt,Wi(e[am])],[ui,Hn(e[om])]]);else for(var r in e)this.hasOwnProperty(r)&&typeof e[r]!==Mt&&(this[r]=e[r])}function su(e,t,r,n){return this.get=function(s){return s?this.data.hasOwnProperty(s)?this.data[s]:void 0:this.data},this.set=function(s,i){return this.data[s]=i,this},this.setCH=function(s){return this.uaCH=s,this},this.detectFeature=function(){if(xe&&xe.userAgent==this.ua)switch(this.itemType){case Ce:xe.brave&&typeof xe.brave.isBrave==Js&&this.set(z,"Brave");break;case Xe:!this.get(A)&&St&&St[$]&&this.set(A,$),this.get(E)=="Macintosh"&&xe&&typeof xe.standalone!==Mt&&xe.maxTouchPoints&&xe.maxTouchPoints>2&&this.set(E,"iPad").set(A,se);break;case Ne:!this.get(z)&&St&&St[Sr]&&this.set(z,St[Sr]);break;case wr:var s=this.data,i=function(o){return s[o].getItem().detectFeature().get()};this.set(Ce,i(Ce)).set(lt,i(lt)).set(Xe,i(Xe)).set(Be,i(Be)).set(Ne,i(Ne))}return this},this.parseUA=function(){return this.itemType!=wr&&Qi.call(this.data,this.ua,this.rgxMap),this.itemType==Ce&&this.set(ts,Gi(this.get(M))),this},this.parseCH=function(){var s=this.uaCH,i=this.rgxMap;switch(this.itemType){case Ce:case Be:var o=s[sa]||s[na],a;if(o)for(var c in o){var l=o[c].brand||o[c],d=o[c].version;this.itemType==Ce&&!/not.a.brand/i.test(l)&&(!a||/chrom/i.test(a)&&l!=Xc)&&(l=Rt(l,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(z,l).set(M,d).set(ts,Gi(d)),a=l),this.itemType==Be&&l==Xc&&this.set(M,d)}break;case lt:var u=s[Ae];u&&(u&&s[ui]=="64"&&(u+="64"),Qi.call(this.data,u+";",i));break;case Xe:if(s[$]&&this.set(A,$),s[E]&&(this.set(E,s[E]),!this.get(A)||!this.get(k))){var f={};Qi.call(f,"droid 9; "+s[E]+")",i),!this.get(A)&&f.type&&this.set(A,f.type),!this.get(k)&&f.vendor&&this.set(k,f.vendor)}if(s[Jt]){var m;if(typeof s[Jt]!="string")for(var g=0;!m&&g<s[Jt].length;)m=Rt(s[Jt][g++],ru);else m=Rt(s[Jt],ru);this.set(A,m)}break;case Ne:var p=s[Sr];if(p){var b=s[ia];p==Co&&(b=parseInt(Gi(b),10)>=13?"11":"10"),this.set(z,p).set(M,b)}this.get(z)==Co&&s[E]=="Xbox"&&this.set(z,"Xbox").set(M,void 0);break;case wr:var w=this.data,_=function(P){return w[P].getItem().setCH(s).parseCH().get()};this.set(Ce,_(Ce)).set(lt,_(lt)).set(Xe,_(Xe)).set(Be,_(Be)).set(Ne,_(Ne))}return this},ft.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",pm(this,e)]]),this}function yt(e,t,r){if(typeof e===Fr?(Ws(e,!0)?(typeof t===Fr&&(r=t),t=e):(r=e,t=void 0),e=void 0):typeof e===Po&&!Ws(t,!0)&&(r=t,t=void 0),r&&typeof r.append===Js){var n={};r.forEach(function(c,l){n[l]=c}),r=n}if(!(this instanceof yt))return new yt(e,t,r).getResult();var s=typeof e===Po?e:r&&r[Bc]?r[Bc]:xe&&xe.userAgent?xe.userAgent:qr,i=new vd(r,!0),o=t?fm(nu,t):nu,a=function(c){return c==wr?function(){return new su(c,s,o,i).set("ua",s).set(Ce,this.getBrowser()).set(lt,this.getCPU()).set(Xe,this.getDevice()).set(Be,this.getEngine()).set(Ne,this.getOS()).get()}:function(){return new su(c,s,o[c],i).parseUA().get()}};return ft.call(this,[["getBrowser",a(Ce)],["getCPU",a(lt)],["getDevice",a(Xe)],["getEngine",a(Be)],["getOS",a(Ne)],["getResult",a(wr)],["getUA",function(){return s}],["setUA",function(c){return Wr(c)&&(s=c.length>Ro?rs(c,Ro):c),this}]]).setUA(s),this}yt.VERSION=nm;yt.BROWSER=li([z,M,ts,A]);yt.CPU=li([Ae]);yt.DEVICE=li([E,k,A,$n,$,he,se,Je,Zn]);yt.ENGINE=yt.OS=li([z,M]);function mm(e){const t=v.useMemo(()=>e?yt(e):null,[e]);return t?t.device.is("mobile")?[t.os.name].filter(Boolean).join(" • "):[t.os.name,t.browser.name].filter(Boolean).join(" • "):void 0}function gm(){const{account:e}=cs(),{data:t,refetch:r,isLoading:n}=tm(e);return t?t.length>0?h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{children:h.jsx(X,{id:"CbBmBd",components:{0:h.jsx(Hs,{to:"/account/apps",className:"text-blue-600 hover:underline"})}})}),t.map(s=>h.jsx(vm,{sub:e.sub,session:s},`${e.sub}@${s.deviceId}`))]}):h.jsx("p",{children:h.jsx(X,{id:"Ssa5RR"})}):n?h.jsx(Jo,{className:"text-primary",size:28}):h.jsx(xo,{role:"status",action:h.jsx(gu,{onClick:()=>r(),children:h.jsx(X,{id:"6gRgw8"})}),children:h.jsx(X,{id:"b9LiEi"})})}function vm({session:e,sub:t}){const{notify:r}=Qs(),{i18n:n,_:s}=rt(),{mutateAsync:i,isPending:o}=rm(),{userAgent:a,lastSeenAt:c,ipAddress:l}=e.deviceMetadata,d=mm(a||void 0),u=Bl(c),f=async()=>{try{await i({sub:t,deviceId:e.deviceId}),r({variant:"success",title:n._({id:"jAO4/H"}),duration:2e3})}catch{r({variant:"error",title:n._({id:"CiwBmN"}),duration:2e3})}};return h.jsxs("div",{className:"border-contrast-50 dark:border-contrast-100 flex flex-wrap items-center justify-between space-x-4 border-t px-2 pt-3",children:[h.jsxs("div",{className:"flex min-w-36 flex-1 flex-col space-x-2 truncate",children:[h.jsx("p",{className:"truncate font-semibold",children:d||h.jsx(X,{id:"K80Okk"})}),h.jsx("p",{className:"font-mono text-xs",children:l}),h.jsx("p",{className:"text-text-light truncate text-xs",children:h.jsx(X,{id:"sJZ6K9",values:{lastUsedAgo:u}})})]}),h.jsx(pr,{size:"sm",className:"min-w-max shrink-0 grow-0",disabled:e.isCurrentDevice,loading:o,onClick:f,title:e.isCurrentDevice?n._({id:"JOalQJ"}):void 0,children:h.jsx(X,{id:"MzTcmM"})})]})}function ym(){const{account:e}=cs();return h.jsxs("div",{className:"flex min-h-full flex-col items-center justify-start gap-4 py-4 md:pt-24",children:[h.jsx(Ul,{account:e}),h.jsx(_m,{className:"text-text-light text-center text-sm"})]})}function _m(e){return h.jsxs("p",{...e,children:[h.jsx(X,{id:"Jn0vdi",components:{0:h.jsx(Hl,{})}})," ",h.jsx(Hs,{to:"/account/about",className:"text-sm text-blue-600 hover:underline",children:h.jsx(X,{id:"z73+hu"})})]})}function bm(e,{cooldownSeconds:t=60,initialCooldown:r=0}={}){const[n,s]=v.useState(r),i=n>0,o=v.useCallback((...c)=>{if(i)throw new Error("Action is on cooldown");return s(t),e==null?void 0:e(...c)},[e,t,i]);v.useEffect(()=>{if(n>0){const c=setTimeout(()=>{s(n-1)},1e3);return()=>clearTimeout(c)}},[n]);const a=v.useCallback(()=>s(0),[]);return v.useMemo(()=>({disabled:i,trigger:o,clear:a,remaining:n,total:t}),[i,o,a,n,t])}function wm({cooldownSeconds:e,initialCooldown:t,children:r,onClick:n,disabled:s=!1,className:i,...o}){const{i18n:a,_:c}=rt(),l=bm(n,{cooldownSeconds:e,initialCooldown:t}),[d,u]=v.useState(!1),f=Math.ceil(l.remaining),m=!s&&l.disabled;return h.jsx("div",{className:"inline-block",onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:h.jsxs(Nl,{open:m&&d,children:[h.jsx(Dl,{asChild:!0,children:h.jsxs(pr,{onClick:l.trigger,disabled:m||s,className:Gn("relative pr-9",i),"aria-label":m?a._({id:"6gxSCq",values:{remainingSeconds:f}}):void 0,"aria-live":m?"polite":void 0,"aria-atomic":"true",...o,children:[h.jsx(Jo,{size:16,value:(l.total-l.remaining)/l.total*100,startAngle:-90,className:Gn("absolute right-3 top-1/2 inline-block -translate-y-1/2 transform transition-opacity",m?"opacity-100":"opacity-0"),"aria-hidden":"true"}),r]})}),h.jsx(ql,{children:h.jsx(Fl,{side:"bottom",align:"center",role:"tooltip",children:h.jsx("div",{className:"rounded border border-slate-300 bg-white px-2 py-1.5 text-xs shadow-sm dark:border-slate-600 dark:bg-slate-800",children:h.jsx(X,{id:"VA4HpI",values:{remainingSeconds:f}})})})})]})})}function Sm(){const e=Br(),{i18n:t,_:r}=rt(),{notify:n}=Qs(),s=Rd();return Xs({async mutationFn({locale:i=s,email:o}){return e.fetch("POST","/reset-password-request",{locale:i,email:o})},onSuccess(i,o,a){n({variant:"success",title:t._({id:"boBFOP"}),description:t._({id:"lAK2OC"})})},onError(i,o,a){console.error("Failed to request password reset",i),n({variant:"error",title:t._({id:"eMlT5s"}),description:t._({id:"JANaVF"})})}})}function Rm(){const e=Br(),{i18n:t,_:r}=rt(),{notify:n}=Qs();return Xs({async mutationFn({token:s,password:i}){return e.fetch("POST","/reset-password-confirm",{token:s,password:i})},onSuccess(s,i,o){n({variant:"success",title:t._({id:"D9Jms7"}),description:t._({id:"67nRLM"})})},onError(s,i,o){console.error("Failed to reset password",s),n({variant:"error",title:t._({id:"3DLYmM"}),description:t._({id:"q1d4qv"})})}})}function Pm(){const[e,t]=v.useState(!1),{account:r}=cs(),{email:n}=r;if(!n)return h.jsx(xo,{role:"status",children:h.jsx(X,{id:"51yaeH"})});const s=Sm(),i=Rm();return h.jsxs("div",{className:"space-y-4",children:[h.jsx("p",{children:h.jsx(X,{id:"VaEN/4",values:{email:n},components:{0:h.jsx("strong",{})}})}),h.jsxs(wm,{onClick:async()=>{await s.mutateAsync({email:n})},cooldownSeconds:30,loading:s.isPending,disabled:e,className:"max-w-full",children:[h.jsx(nl,{"aria-hidden":!0,className:"mr-2",weight:"bold"}),h.jsx("span",{className:"flex-1 truncate",children:h.jsx(X,{id:"abag5u"})})]}),h.jsx(Ud,{disabled:e||i.isPending,onSubmit:async o=>{await i.mutateAsync(o),t(!0)}})]})}const Cm={"/":{icon:tl,position:0,title:{id:"AeXO77"},component:ym},"/devices":{icon:Xu,position:10,title:{id:"qavm0B"},description:{id:"bdNEzF"},component:gm},"/apps":{icon:el,position:20,title:{id:"VDvaN2"},description:{id:"xSiaWQ"},component:X0},"/password":{icon:Bd,position:30,title:{id:"8ZsakT"},description:{id:"Ar5o5b"},component:Pm},"/about":{icon:Hd,position:50,title:{id:"uyJsf6"},component:l0,description:{id:"nxn0xR"}}};function Am(e,t){const r={...Cm,...t},n=yo({path:e,component:i=>h.jsx(xm,{basePath:e,subPages:r,...i}),getParentRoute:()=>Zo}),s=Object.entries(r).map(([i,{component:o}])=>yo({getParentRoute:()=>n,path:i,component:o}));return[n,...s]}function xm({basePath:e,subPages:t}){const r=v.useMemo(()=>Object.entries(t).sort(([n,s],[i,o])=>{if(s.position!=null&&o.position!=null){const a=s.position-o.position;if(a!==0)return a}return n.localeCompare(i)}).map(([n,s])=>({to:e==="/"?n:n==="/"?e:`${e}${n}`,title:s.title,description:s.description,hidden:s.hidden,icon:s.icon})),[t,e]);return h.jsx(Om,{signOutTo:e,children:h.jsx(u0,{title:{id:"KdxItU"},basePath:e,links:r,children:h.jsx(To,{})})})}const Os=new URL(window.location.href);function Om({children:e,signOutTo:t}){const r=De(),{session:n}=Oo(),s=v.useRef(n!=null),i=Os.searchParams.get("display")==="popup",o=Os.searchParams.get("login_hint")||void 0,a=Os.searchParams.get("nonce")||void 0,c=Os.searchParams.get("redirect_uri")||void 0,l=v.useMemo(()=>{if(c&&a)return()=>{const d=new URL(c);window.location.href=d.toString()};if(i)return()=>{var d;(d=window.opener)==null||d.postMessage({nonce:a,event:"done"},"*"),window.postMessage({nonce:a,event:"done"},"*"),window.close()}},[i,c,a]);return v.useEffect(()=>{n&&!s.current?s.current=!0:!n&&s.current&&(s.current=!1,t&&r.navigate({to:t}),l==null||l())},[n,l]),h.jsx(Vd,{forcedIdentifier:o,disableRemember:i,onCancel:l,children:e})}const Em=yo({getParentRoute:()=>Zo,path:"/account/reset-password",component:jm,errorComponent:Su});function jm(){const{doInitiatePasswordReset:e,doConfirmResetPassword:t}=Oo(),r=De();return h.jsx(Kd,{onResetPasswordRequest:e,onResetPasswordConfirm:t,onBack:()=>{window.history.back(),setTimeout(()=>{r.state.location.pathname==="/account/reset-password"&&r.navigate({to:"/account"})},1e3)}})}const km=Am("/account",{"/branding":{icon:rl,hidden:!0,position:40,title:{id:"A3MAIm"},component:Hf}}),zm=zf({routeTree:Zo.addChildren([...km,Em])}),{__customizationData:Mm,__deviceSessions:Im}=window,Lm=new hh,Tm=document.getElementById("root");Pd.createRoot(Tm).render(h.jsx(v.StrictMode,{children:h.jsx(Cd,{value:Mm,children:h.jsx(Ad,{children:h.jsx($d,{children:h.jsx(Zd,{fallbackRender:Gd,children:h.jsx(Jd,{initialSessions:Im,initialSelected:Wd.Only,children:h.jsx(vh,{client:Lm,children:h.jsx(Lf,{router:zm})})})})})})})}));
20
- //# sourceMappingURL=account-page-Do28ZzQf.js.map