@remit/web-client-dist 0.0.1 → 0.0.3

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.
Files changed (51) hide show
  1. package/assets/{ComposeBody-aBxSwMFx.js → ComposeBody-Dlc8Ssvp.js} +6 -6
  2. package/assets/ErrorState-Usbrda21.js +1 -0
  3. package/assets/OnboardingWizard-_pTcP-qE.js +1 -0
  4. package/assets/{account-form-helpers-CTpj2uLI.js → account-form-helpers-C_ee2a4O.js} +1 -1
  5. package/assets/accounts-CS7T4bQk.js +1 -0
  6. package/assets/{advanced-BDJxTH_n.js → advanced-BEzMWUYb.js} +1 -1
  7. package/assets/{appearance-CHdDWkw_.js → appearance-DKWf6ze6.js} +1 -1
  8. package/assets/{avatar-oY_wEvtv.js → avatar-B0fRiRQb.js} +1 -1
  9. package/assets/{browser-ponyfill-CMFDlVql.js → browser-ponyfill-89q_3lDz.js} +2 -2
  10. package/assets/filter-status-BuiMQMI-.js +1 -0
  11. package/assets/filters-aHnAhVX7.js +1 -0
  12. package/assets/flagged-DkaOUkST.js +1 -0
  13. package/assets/folders-lDps6T1W.js +1 -0
  14. package/assets/index-B4uXCr8r.js +1 -0
  15. package/assets/index-BrpcF6Ef.js +1 -0
  16. package/assets/index-DmHlZDE_.css +1 -0
  17. package/assets/index-V9K94wLK.js +295 -0
  18. package/assets/kbd-DTH-9jp1.js +1 -0
  19. package/assets/mail-DmyFuI0h.js +112 -0
  20. package/assets/{onboarding-Cb5vjmx8.js → onboarding-Dhng7CWz.js} +1 -1
  21. package/assets/{select-B4IMFiui.js → select-Bd1pea2w.js} +1 -1
  22. package/assets/{send-DhbTNeod.js → send-DeYmROrv.js} +1 -1
  23. package/assets/senders-D32rgvYh.js +1 -0
  24. package/assets/settings-6Qjvfyms.js +1 -0
  25. package/assets/{settings-screen-DEw1vClH.js → settings-screen-DG-t9Xyh.js} +1 -1
  26. package/assets/{star-CkFv0GXu.js → star-B68Lw66k.js} +1 -1
  27. package/assets/suggested-vips-3SA4Vye6.js +1 -0
  28. package/assets/{trash-2-WJQWAcqb.js → trash-2-y5GMg9lb.js} +1 -1
  29. package/assets/useDebouncedValue-ukmb2ZZo.js +1 -0
  30. package/assets/{useMutation-iXt4Qkuv.js → useMutation-pSyvAytS.js} +1 -1
  31. package/assets/useSignature-JNR9wG4S.js +1 -0
  32. package/index.html +2 -2
  33. package/package.json +1 -1
  34. package/assets/ErrorState-CWz3ZzTM.js +0 -1
  35. package/assets/OnboardingWizard-BhFl4gCX.js +0 -1
  36. package/assets/accounts-BvhEwfb2.js +0 -1
  37. package/assets/filter-status-CeQbzi2r.js +0 -1
  38. package/assets/filters-DKRKo0z8.js +0 -1
  39. package/assets/flagged-DFXdbkZA.js +0 -1
  40. package/assets/folders-hQiLV99A.js +0 -1
  41. package/assets/index-BFeuoxPt.js +0 -295
  42. package/assets/index-CaeklzBt.js +0 -1
  43. package/assets/index-Czg1CqQC.js +0 -1
  44. package/assets/index-DEJQ3OJJ.css +0 -1
  45. package/assets/kbd-CDpzhkUB.js +0 -1
  46. package/assets/mail-C6GmqBz5.js +0 -112
  47. package/assets/senders-lAfIRRB4.js +0 -1
  48. package/assets/settings-Kmq-_D_z.js +0 -1
  49. package/assets/suggested-vips-CsZI5xE4.js +0 -1
  50. package/assets/useDebouncedValue-fj6OyJrO.js +0 -1
  51. package/assets/useSignature-DoTk6mQO.js +0 -1
@@ -1,295 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mail-C6GmqBz5.js","assets/kbd-CDpzhkUB.js","assets/avatar-oY_wEvtv.js","assets/star-CkFv0GXu.js","assets/trash-2-WJQWAcqb.js","assets/account-form-helpers-CTpj2uLI.js","assets/send-DhbTNeod.js","assets/useMutation-iXt4Qkuv.js","assets/useSignature-DoTk6mQO.js","assets/useDebouncedValue-fj6OyJrO.js","assets/ErrorState-CWz3ZzTM.js","assets/format-BGdB831k.js","assets/folder-roles-XnseeyyD.js","assets/select-B4IMFiui.js","assets/filter-status-CeQbzi2r.js","assets/onboarding-Cb5vjmx8.js","assets/OnboardingWizard-BhFl4gCX.js","assets/index-CaeklzBt.js","assets/flagged-DFXdbkZA.js","assets/accounts-BvhEwfb2.js","assets/settings-screen-DEw1vClH.js","assets/advanced-BDJxTH_n.js","assets/appearance-CHdDWkw_.js","assets/filters-DKRKo0z8.js","assets/folders-hQiLV99A.js","assets/senders-lAfIRRB4.js"])))=>i.map(i=>d[i]);
2
- function O5(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Tg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _1={exports:{}},hf={};var yN;function C$(){if(yN)return hf;yN=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,s,o){var a=null;if(o!==void 0&&(a=""+o),s.key!==void 0&&(a=""+s.key),"key"in s){o={};for(var u in s)u!=="key"&&(o[u]=s[u])}else o=s;return s=o.ref,{$$typeof:t,type:r,key:a,ref:s!==void 0?s:null,props:o}}return hf.Fragment=e,hf.jsx=n,hf.jsxs=n,hf}var bN;function w$(){return bN||(bN=1,_1.exports=C$()),_1.exports}var F=w$(),$h=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_$=class extends $h{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},yA=new _$,x$={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},A$=class{#e=x$;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},Cl=new A$;function T$(t){setTimeout(t,0)}var R$=typeof window>"u"||"Deno"in globalThis;function Dr(){}function I$(t,e){return typeof t=="function"?t(e):t}function m_(t){return typeof t=="number"&&t>=0&&t!==1/0}function N5(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ia(t,e){return typeof t=="function"?t(e):t}function os(t,e){return typeof t=="function"?t(e):t}function SN(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==bA(a,e.options))return!1}else if(!hh(e.queryKey,a))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||s&&s!==e.state.fetchStatus||o&&!o(e))}function EN(t,e){const{exact:n,status:r,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(fh(e.options.mutationKey)!==fh(o))return!1}else if(!hh(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function bA(t,e){return(e?.queryKeyHashFn||fh)(t)}function fh(t){return JSON.stringify(t,(e,n)=>y_(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function hh(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>hh(t[n],e[n])):!1}var O$=Object.prototype.hasOwnProperty;function M5(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=CN(t)&&CN(e);if(!r&&!(y_(t)&&y_(e)))return e;const o=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),u=a.length,c=r?new Array(u):{};let f=0;for(let p=0;p<u;p++){const g=r?p:a[p],m=t[g],y=e[g];if(m===y){c[g]=m,(r?p<o:O$.call(t,g))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[g]=y;continue}const S=M5(m,y,n+1);c[g]=S,S===m&&f++}return o===u&&f===o?t:c}function v_(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function CN(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function y_(t){if(!wN(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!wN(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function wN(t){return Object.prototype.toString.call(t)==="[object Object]"}function N$(t){return new Promise(e=>{Cl.setTimeout(e,t)})}function b_(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?M5(t,e):e}function txe(t){return t}function M$(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function P$(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var SA=Symbol();function P5(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===SA?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function k5(t,e){return typeof t=="function"?t(...e):!!t}function k$(t,e,n){let r=!1,s;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(s??=e(),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),t}var ph=(()=>{let t=()=>R$;return{isServer(){return t()},setIsServer(e){t=e}}})();function S_(){let t,e;const n=new Promise((s,o)=>{t=s,e=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}var D$=T$;function L$(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=D$;const o=u=>{e?t.push(u):s(()=>{n(u)})},a=()=>{const u=t;t=[],u.length&&s(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;e++;try{c=u()}finally{e--,e||a()}return c},batchCalls:u=>(...c)=>{o(()=>{u(...c)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{s=u}}}var er=L$(),U$=class extends $h{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},cv=new U$;function F$(t){return Math.min(1e3*2**t,3e4)}function D5(t){return(t??"online")==="online"?cv.isOnline():!0}var E_=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function L5(t){let e=!1,n=0,r;const s=S_(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new E_(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>yA.isFocused()&&(t.networkMode==="always"||cv.isOnline())&&t.canRun(),p=()=>D5(t.networkMode)&&t.canRun(),g=E=>{o()||(r?.(),s.resolve(E))},m=E=>{o()||(r?.(),s.reject(E))},y=()=>new Promise(E=>{r=C=>{(o()||f())&&E(C)},t.onPause?.()}).then(()=>{r=void 0,o()||t.onContinue?.()}),S=()=>{if(o())return;let E;const C=n===0?t.initialPromise:void 0;try{E=C??t.fn()}catch(w){E=Promise.reject(w)}Promise.resolve(E).then(g).catch(w=>{if(o())return;const x=t.retry??(ph.isServer()?0:3),T=t.retryDelay??F$,R=typeof T=="function"?T(n,w):T,M=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,w);if(e||!M){m(w);return}n++,t.onFail?.(n,w),N$(R).then(()=>f()?void 0:y()).then(()=>{e?m(w):S()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:c,canStart:p,start:()=>(p()?S():y().then(S),s)}}var U5=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),m_(this.gcTime)&&(this.#e=Cl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ph.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Cl.clearTimeout(this.#e),this.#e=void 0)}};function z$(t){return{onFetch:(e,n)=>{const r=e.options,s=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},c=0;const f=async()=>{let p=!1;const g=S=>{k$(S,()=>e.signal,()=>p=!0)},m=P5(e.options,e.fetchOptions),y=async(S,E,C)=>{if(p)return Promise.reject(e.signal.reason);if(E==null&&S.pages.length)return Promise.resolve(S);const x=(()=>{const O={client:e.client,queryKey:e.queryKey,pageParam:E,direction:C?"backward":"forward",meta:e.options.meta};return g(O),O})(),T=await m(x),{maxPages:R}=e.options,M=C?P$:M$;return{pages:M(S.pages,T,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?F5:C_,C={pages:o,pageParams:a},w=E(r,C);u=await y(C,w,S)}else{const S=t??o.length;do{const E=c===0?a[0]??r.initialPageParam:C_(r,u);if(c>0&&E==null)break;u=await y(u,E),c++}while(c<S)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=f}}}function C_(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function F5(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}function nxe(t,e){return e?C_(t,e)!=null:!1}function rxe(t,e){return!e||!t.getPreviousPageParam?!1:F5(t,e)!=null}var B$=class extends U5{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t){super(),this.#i=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#o=t.client,this.#r=this.#o.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=xN(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(t){if(this.options={...this.#a,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=xN(this.options);e.data!==void 0&&(this.setState(_N(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=b_(this.state.data,t,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t){this.#l({type:"setState",state:t})}cancel(t){const e=this.#s?.promise;return this.#s?.cancel(t),e?e.then(Dr).catch(Dr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>os(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===SA||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ia(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!N5(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#s&&(this.#i||this.#c()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},s=()=>{const c=P5(this.options,e),p=(()=>{const g={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(g),g})();return this.#i=!1,this.options.persister?this.options.persister(c,p,this):c(p)},a=(()=>{const c={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:s};return r(c),c})();(this.#e==="infinite"?z$(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:"fetch",meta:a.fetchOptions?.meta}),this.#s=L5({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof E_&&c.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(c,f)=>{this.#l({type:"failed",failureCount:c,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const c=await this.#s.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#r.config.onSuccess?.(c,this),this.#r.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof E_){if(c.silent)return this.#s.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#l({type:"error",error:c}),this.#r.config.onError?.(c,this),this.#r.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#l(t){const e=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,...z5(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,..._N(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?r:void 0,r;case"error":const s=t.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),er.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function z5(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:D5(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function _N(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function xN(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var j$=class extends $h{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=S_(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#n=void 0;#r=void 0;#o;#s;#a;#i;#c;#l;#p;#d;#f;#u;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),AN(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return w_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return w_(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#E(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof os(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#t.setOptions(this.options),e._defaulted&&!v_(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&TN(this.#t,n,this.options,e)&&this.#h(),this.updateResult(),r&&(this.#t!==n||os(this.options.enabled,this.#t)!==os(e.enabled,this.#t)||Ia(this.options.staleTime,this.#t)!==Ia(e.staleTime,this.#t))&&this.#m();const s=this.#v();r&&(this.#t!==n||os(this.options.enabled,this.#t)!==os(e.enabled,this.#t)||s!==this.#u)&&this.#y(s)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),n=this.createResult(e,t);return $$(this,n)&&(this.#r=n,this.#s=this.options,this.#o=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(n,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(t){this.#g.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),n=this.#e.getQueryCache().build(this.#e,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(t){this.#C();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Dr)),e}#m(){this.#S();const t=Ia(this.options.staleTime,this.#t);if(ph.isServer()||this.#r.isStale||!m_(t))return;const n=N5(this.#r.dataUpdatedAt,t)+1;this.#d=Cl.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#E(),this.#u=t,!(ph.isServer()||os(this.options.enabled,this.#t)===!1||!m_(this.#u)||this.#u===0)&&(this.#f=Cl.setInterval(()=>{(this.options.refetchIntervalInBackground||yA.isFocused())&&this.#h()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#S(){this.#d!==void 0&&(Cl.clearTimeout(this.#d),this.#d=void 0)}#E(){this.#f!==void 0&&(Cl.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){const n=this.#t,r=this.options,s=this.#r,o=this.#o,a=this.#s,c=t!==n?t.state:this.#n,{state:f}=t;let p={...f},g=!1,m;if(e._optimisticResults){const P=this.hasListeners(),k=!P&&AN(t,e),H=P&&TN(t,n,e,r);(k||H)&&(p={...p,...z5(f.data,t.options)}),e._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:S,status:E}=p;m=p.data;let C=!1;if(e.placeholderData!==void 0&&m===void 0&&E==="pending"){let P;s?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(P=s.data,C=!0):P=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,P!==void 0&&(E="success",m=b_(s?.data,P,e),g=!0)}if(e.select&&m!==void 0&&!C)if(s&&m===o?.data&&e.select===this.#c)m=this.#l;else try{this.#c=e.select,m=e.select(m),m=b_(s?.data,m,e),this.#l=m,this.#i=null}catch(P){this.#i=P}this.#i&&(y=this.#i,m=this.#l,S=Date.now(),E="error");const w=p.fetchStatus==="fetching",x=E==="pending",T=E==="error",R=x&&w,M=m!==void 0,I={status:E,fetchStatus:p.fetchStatus,isPending:x,isSuccess:E==="success",isError:T,isInitialLoading:R,isLoading:R,data:m,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:T&&!M,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&M,isStale:EA(t,e),refetch:this.refetch,promise:this.#a,isEnabled:os(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=I.data!==void 0,k=I.status==="error"&&!P,H=W=>{k?W.reject(I.error):P&&W.resolve(I.data)},U=()=>{const W=this.#a=I.promise=S_();H(W)},B=this.#a;switch(B.status){case"pending":t.queryHash===n.queryHash&&H(B);break;case"fulfilled":(k||I.data!==B.value)&&U();break;case"rejected":(!k||I.error!==B.reason)&&U();break}}return I}updateResult(){const t=this.#r,e=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#s=this.options,this.#o.data!==void 0&&(this.#p=this.#t),v_(e,t))return;this.#r=e;const n=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#g.size)return!0;const o=new Set(s??this.#g);return this.options.throwOnError&&o.add("error"),Object.keys(this.#r).some(a=>{const u=a;return this.#r[u]!==t[u]&&o.has(u)})};this.#w({listeners:n()})}#C(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#w(t){er.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function H$(t,e){return os(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&os(e.retryOnMount,t)===!1)}function AN(t,e){return H$(t,e)||t.state.data!==void 0&&w_(t,e,e.refetchOnMount)}function w_(t,e,n){if(os(e.enabled,t)!==!1&&Ia(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&EA(t,e)}return!1}function TN(t,e,n,r){return(t!==e||os(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&EA(t,n)}function EA(t,e){return os(e.enabled,t)!==!1&&t.isStaleByTime(Ia(e.staleTime,t))}function $$(t,e){return!v_(t.getCurrentResult(),e)}var q$=class extends U5{#e;#t;#n;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||W$(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#o({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=L5({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,a)=>{this.#o({type:"failed",failureCount:o,error:a})},onPause:()=>{this.#o({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",s=!this.#r.canStart();try{if(r)e();else{this.#o({type:"pending",variables:t,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,n);const a=await this.options.onMutate?.(t,n);a!==this.state.context&&this.#o({type:"pending",context:a,variables:t,isPaused:s})}const o=await this.#r.start();return await this.#n.config.onSuccess?.(o,t,this.state.context,this,n),await this.options.onSuccess?.(o,t,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,t,this.state.context,n),this.#o({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,t,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(o,t,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,o,t,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#o({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#o(t){const e=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=e(this.state),er.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function W$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var B5=class extends $h{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,n){const r=new q$({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){this.#e.add(t);const e=Rg(t);if(typeof e=="string"){const n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Rg(t);if(typeof e=="string"){const n=this.#t.get(e);if(n)if(n.length>1){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Rg(t);if(typeof e=="string"){const r=this.#t.get(e)?.find(s=>s.state.status==="pending");return!r||r===t}else return!0}runNext(t){const e=Rg(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){er.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>EN(e,n))}findAll(t={}){return this.getAll().filter(e=>EN(t,e))}notify(t){er.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return er.batch(()=>Promise.all(t.map(e=>e.continue().catch(Dr))))}};function Rg(t){return t.options.scope?.id}var j5=class extends $h{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,s=e.queryHash??bA(r,e);let o=this.get(s);return o||(o=new B$({client:t,queryKey:r,queryHash:s,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){er.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>SN(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>SN(t,n)):e}notify(t){er.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){er.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){er.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},G$=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t={}){this.#e=t.queryCache||new j5,this.#t=t.mutationCache||new B5,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=yA.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=cv.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Ia(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(r.queryHash)?.state.data,a=I$(e,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return er.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;er.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return er.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=er.batch(()=>this.#e.findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Dr).catch(Dr)}invalidateQueries(t,e={}){return er.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=er.batch(()=>this.#e.findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Dr)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Dr)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(Ia(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Dr).catch(Dr)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Dr).catch(Dr)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return cv.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#r.set(fh(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{hh(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(fh(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],n={};return e.forEach(r=>{hh(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=bA(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===SA&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},x1={exports:{}},We={};var RN;function V$(){if(RN)return We;RN=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),m=Symbol.iterator;function y(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function w(D,V,K){this.props=D,this.context=V,this.refs=C,this.updater=K||S}w.prototype.isReactComponent={},w.prototype.setState=function(D,V){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,V,"setState")},w.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function x(){}x.prototype=w.prototype;function T(D,V,K){this.props=D,this.context=V,this.refs=C,this.updater=K||S}var R=T.prototype=new x;R.constructor=T,E(R,w.prototype),R.isPureReactComponent=!0;var M=Array.isArray;function O(){}var I={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function k(D,V,K){var J=K.ref;return{$$typeof:t,type:D,key:V,ref:J!==void 0?J:null,props:K}}function H(D,V){return k(D.type,V,D.props)}function U(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function B(D){var V={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(K){return V[K]})}var W=/\/+/g;function Y(D,V){return typeof D=="object"&&D!==null&&D.key!=null?B(""+D.key):V.toString(36)}function ne(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(O,O):(D.status="pending",D.then(function(V){D.status==="pending"&&(D.status="fulfilled",D.value=V)},function(V){D.status==="pending"&&(D.status="rejected",D.reason=V)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function $(D,V,K,J,oe){var he=typeof D;(he==="undefined"||he==="boolean")&&(D=null);var ue=!1;if(D===null)ue=!0;else switch(he){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(D.$$typeof){case t:case e:ue=!0;break;case p:return ue=D._init,$(ue(D._payload),V,K,J,oe)}}if(ue)return oe=oe(D),ue=J===""?"."+Y(D,0):J,M(oe)?(K="",ue!=null&&(K=ue.replace(W,"$&/")+"/"),$(oe,V,K,"",function(Xe){return Xe})):oe!=null&&(U(oe)&&(oe=H(oe,K+(oe.key==null||D&&D.key===oe.key?"":(""+oe.key).replace(W,"$&/")+"/")+ue)),V.push(oe)),1;ue=0;var ve=J===""?".":J+":";if(M(D))for(var _e=0;_e<D.length;_e++)J=D[_e],he=ve+Y(J,_e),ue+=$(J,V,K,he,oe);else if(_e=y(D),typeof _e=="function")for(D=_e.call(D),_e=0;!(J=D.next()).done;)J=J.value,he=ve+Y(J,_e++),ue+=$(J,V,K,he,oe);else if(he==="object"){if(typeof D.then=="function")return $(ne(D),V,K,J,oe);throw V=String(D),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ue}function ee(D,V,K){if(D==null)return D;var J=[],oe=0;return $(D,J,"","",function(he){return V.call(K,he,oe++)}),J}function fe(D){if(D._status===-1){var V=D._result;V=V(),V.then(function(K){(D._status===0||D._status===-1)&&(D._status=1,D._result=K)},function(K){(D._status===0||D._status===-1)&&(D._status=2,D._result=K)}),D._status===-1&&(D._status=0,D._result=V)}if(D._status===1)return D._result.default;throw D._result}var de=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},Ae={map:ee,forEach:function(D,V,K){ee(D,function(){V.apply(this,arguments)},K)},count:function(D){var V=0;return ee(D,function(){V++}),V},toArray:function(D){return ee(D,function(V){return V})||[]},only:function(D){if(!U(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return We.Activity=g,We.Children=Ae,We.Component=w,We.Fragment=n,We.Profiler=s,We.PureComponent=T,We.StrictMode=r,We.Suspense=c,We.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,We.__COMPILER_RUNTIME={__proto__:null,c:function(D){return I.H.useMemoCache(D)}},We.cache=function(D){return function(){return D.apply(null,arguments)}},We.cacheSignal=function(){return null},We.cloneElement=function(D,V,K){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var J=E({},D.props),oe=D.key;if(V!=null)for(he in V.key!==void 0&&(oe=""+V.key),V)!P.call(V,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&V.ref===void 0||(J[he]=V[he]);var he=arguments.length-2;if(he===1)J.children=K;else if(1<he){for(var ue=Array(he),ve=0;ve<he;ve++)ue[ve]=arguments[ve+2];J.children=ue}return k(D.type,oe,J)},We.createContext=function(D){return D={$$typeof:a,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:o,_context:D},D},We.createElement=function(D,V,K){var J,oe={},he=null;if(V!=null)for(J in V.key!==void 0&&(he=""+V.key),V)P.call(V,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(oe[J]=V[J]);var ue=arguments.length-2;if(ue===1)oe.children=K;else if(1<ue){for(var ve=Array(ue),_e=0;_e<ue;_e++)ve[_e]=arguments[_e+2];oe.children=ve}if(D&&D.defaultProps)for(J in ue=D.defaultProps,ue)oe[J]===void 0&&(oe[J]=ue[J]);return k(D,he,oe)},We.createRef=function(){return{current:null}},We.forwardRef=function(D){return{$$typeof:u,render:D}},We.isValidElement=U,We.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:fe}},We.memo=function(D,V){return{$$typeof:f,type:D,compare:V===void 0?null:V}},We.startTransition=function(D){var V=I.T,K={};I.T=K;try{var J=D(),oe=I.S;oe!==null&&oe(K,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(O,de)}catch(he){de(he)}finally{V!==null&&K.types!==null&&(V.types=K.types),I.T=V}},We.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},We.use=function(D){return I.H.use(D)},We.useActionState=function(D,V,K){return I.H.useActionState(D,V,K)},We.useCallback=function(D,V){return I.H.useCallback(D,V)},We.useContext=function(D){return I.H.useContext(D)},We.useDebugValue=function(){},We.useDeferredValue=function(D,V){return I.H.useDeferredValue(D,V)},We.useEffect=function(D,V){return I.H.useEffect(D,V)},We.useEffectEvent=function(D){return I.H.useEffectEvent(D)},We.useId=function(){return I.H.useId()},We.useImperativeHandle=function(D,V,K){return I.H.useImperativeHandle(D,V,K)},We.useInsertionEffect=function(D,V){return I.H.useInsertionEffect(D,V)},We.useLayoutEffect=function(D,V){return I.H.useLayoutEffect(D,V)},We.useMemo=function(D,V){return I.H.useMemo(D,V)},We.useOptimistic=function(D,V){return I.H.useOptimistic(D,V)},We.useReducer=function(D,V,K){return I.H.useReducer(D,V,K)},We.useRef=function(D){return I.H.useRef(D)},We.useState=function(D){return I.H.useState(D)},We.useSyncExternalStore=function(D,V,K){return I.H.useSyncExternalStore(D,V,K)},We.useTransition=function(){return I.H.useTransition()},We.version="19.2.7",We}var IN;function qh(){return IN||(IN=1,x1.exports=V$()),x1.exports}var A=qh();const z=qa(A),H5=O5({__proto__:null,default:z},[A]);var $5=A.createContext(void 0),q5=t=>{const e=A.useContext($5);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},K$=({client:t,children:e})=>(A.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),F.jsx($5.Provider,{value:t,children:e})),W5=A.createContext(!1),Y$=()=>A.useContext(W5);W5.Provider;function Z$(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var X$=A.createContext(Z$()),Q$=()=>A.useContext(X$),J$=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?k5(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},eq=t=>{A.useEffect(()=>{t.clearReset()},[t])},tq=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||k5(n,[t.error,r])),nq=t=>{if(t.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},rq=(t,e)=>t.isLoading&&t.isFetching&&!e,sq=(t,e)=>t?.suspense&&e.isPending,ON=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function oq(t,e,n){const r=Y$(),s=Q$(),o=q5(),a=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const u=o.getQueryCache().get(a.queryHash),c=t.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,nq(a),J$(a,s,u),eq(s);const f=!o.getQueryCache().get(a.queryHash),[p]=A.useState(()=>new e(o,a)),g=p.getOptimisticResult(a),m=!r&&c;if(A.useSyncExternalStore(A.useCallback(y=>{const S=m?p.subscribe(er.batchCalls(y)):Dr;return p.updateResult(),S},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),A.useEffect(()=>{p.setOptions(a)},[a,p]),sq(a,g))throw ON(a,p,s);if(tq({result:g,errorResetBoundary:s,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw g.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(a,g),a.experimental_prefetchInRender&&!ph.isServer()&&rq(g,r)&&(f?ON(a,p,s):u?.promise)?.catch(Dr).finally(()=>{p.updateResult()}),a.notifyOnChangeProps?g:p.trackResult(g)}function iq(t,e){return oq(t,j$)}const aq="modulepreload",lq=function(t){return"/"+t},NN={},Bn=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let c=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");s=c(n.map(f=>{if(f=lq(f),f in NN)return;NN[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const m=document.createElement("link");if(m.rel=p?"stylesheet":aq,p||(m.as="script"),m.crossOrigin="",m.href=f,u&&m.setAttribute("nonce",u),document.head.appendChild(m),p)return new Promise((y,S)=>{m.addEventListener("load",y),m.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return s.then(a=>{for(const u of a||[])u.status==="rejected"&&o(u.reason);return e().catch(o)})};var MN=A.use,mc=typeof window<"u"?A.useLayoutEffect:A.useEffect;function A1(t){const e=A.useRef({value:t,prev:null}),n=e.current.value;return t!==n&&(e.current={value:t,prev:n}),e.current.prev}function uq(t,e,n={},r={}){A.useEffect(()=>{if(!t.current||r.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([o])=>{e(o)},n);return s.observe(t.current),()=>{s.disconnect()}},[e,n,r.disabled,t])}function cq(t){const e=A.useRef(null);return A.useImperativeHandle(t,()=>e.current,[]),e}const G5=!1;function gh(t){return t[t.length-1]}function dq(t){return typeof t=="function"}function wl(t,e){return dq(t)?t(e):t}const V5=Object.prototype.hasOwnProperty,PN=Object.prototype.propertyIsEnumerable;function K5(t){for(const e in t)if(V5.call(t,e))return!0;return!1}const fq=()=>Object.create(null),gl=(t,e)=>_l(t,e,fq);function _l(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=LN(t)&&LN(s);if(!o&&!(dv(t)&&dv(s)))return s;const a=o?t:kN(t);if(!a)return s;const u=o?s:kN(s);if(!u)return s;const c=a.length,f=u.length,p=o?new Array(f):n();let g=0;for(let m=0;m<f;m++){const y=o?m:u[m],S=t[y],E=s[y];if(S===E){p[y]=S,(o?m<c:V5.call(t,y))&&g++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){p[y]=E;continue}const C=_l(S,E,n,r+1);p[y]=C,C===S&&g++}return c===f&&g===c?t:p}function kN(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!PN.call(t,s))return!1;const n=Object.getOwnPropertySymbols(t);if(n.length===0)return e;const r=e;for(const s of n){if(!PN.call(t,s))return!1;r.push(s)}return r}function dv(t){if(!DN(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!DN(n)||!n.hasOwnProperty("isPrototypeOf"))}function DN(t){return Object.prototype.toString.call(t)==="[object Object]"}function LN(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Rl(t,e,n){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,s=t.length;r<s;r++)if(!Rl(t[r],e[r],n))return!1;return!0}if(dv(t)&&dv(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!Rl(t[a],e[a],n))return!1;return!0}let s=0;if(!r)s=Object.keys(t).length;else for(const a in t)t[a]!==void 0&&s++;let o=0;for(const a in e)if((!r||e[a]!==void 0)&&(o++,o>s||!Rl(t[a],e[a],n)))return!1;return s===o}return!1}function Oc(t){let e,n;const r=new Promise((s,o)=>{e=s,n=o});return r.status="pending",r.resolve=s=>{r.status="resolved",r.value=s,e(s),t?.(s)},r.reject=s=>{r.status="rejected",n(s)},r}function hq(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}function mh(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const pq=/[\x00-\x1f\x7f"<>`{}]/g;function gq(t){return t.replace(pq,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function UN(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return gq(e)}const mq=["http:","https:","mailto:","tel:"];function fv(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function pf(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let n=0,r="",s;for(;(s=e.exec(t))!==null;)r+=UN(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+UN(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function vq(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function yq(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function pi(){throw new Error("Invariant failed")}function vh(t){const e=new Map;let n,r;const s=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const a=e.get(o);if(a)return s(a),a.value},set(o,a){if(e.size>=t&&n){const c=n;e.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const u=e.get(o);if(u)u.value=a,s(u);else{const c={key:o,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),e.set(o,c)}},clear(){e.clear(),n=void 0,r=void 0}}}const Aa=4,Y5=5;function bq(t){const e=t.indexOf("{");if(e===-1)return null;const n=t.indexOf("}",e);return n===-1||e+1>=t.length?null:[e,n]}function Z5(t,e,n=new Uint16Array(6)){const r=t.indexOf("/",e),s=r===-1?t.length:r,o=t.substring(e,s);if(!o||!o.includes("$"))return n[0]=0,n[1]=e,n[2]=e,n[3]=s,n[4]=s,n[5]=s,n;if(o==="$"){const u=t.length;return n[0]=2,n[1]=e,n[2]=e,n[3]=u,n[4]=u,n[5]=u,n}if(o.charCodeAt(0)===36)return n[0]=1,n[1]=e,n[2]=e+1,n[3]=s,n[4]=s,n[5]=s,n;const a=bq(o);if(a){const[u,c]=a,f=o.charCodeAt(u+1);if(f===45){if(u+2<o.length&&o.charCodeAt(u+2)===36){const p=u+3,g=c;if(p<g)return n[0]=3,n[1]=e+u,n[2]=e+p,n[3]=e+g,n[4]=e+c+1,n[5]=s,n}}else if(f===36){const p=u+1,g=u+2;return g===c?(n[0]=2,n[1]=e+u,n[2]=e+p,n[3]=e+g,n[4]=e+c+1,n[5]=t.length,n):(n[0]=1,n[1]=e+u,n[2]=e+g,n[3]=e+c,n[4]=e+c+1,n[5]=s,n)}}return n[0]=0,n[1]=e,n[2]=e,n[3]=s,n[4]=s,n[5]=s,n}function ly(t,e,n,r,s,o,a){a?.(n);let u=r;{const c=n.fullPath??n.from,f=c.length,p=n.options?.caseSensitive??t,g=n.options?.params?.parse??n.options?.parseParams;for(;u<f;){const y=Z5(c,u,e);let S;const E=u,C=y[5];switch(u=C+1,o++,y[0]){case 0:{const w=c.substring(y[2],y[3]);if(p){const x=s.static?.get(w);if(x)S=x;else{s.static??=new Map;const T=xl(n.fullPath??n.from);T.parent=s,T.depth=o,S=T,s.static.set(w,T)}}else{const x=w.toLowerCase(),T=s.staticInsensitive?.get(x);if(T)S=T;else{s.staticInsensitive??=new Map;const R=xl(n.fullPath??n.from);R.parent=s,R.depth=o,S=R,s.staticInsensitive.set(x,R)}}break}case 1:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=p&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,O=!g&&s.dynamic?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(O)S=O;else{const I=R1(1,n.fullPath??n.from,T,R,M);S=I,I.depth=o,I.parent=s,s.dynamic??=[],s.dynamic.push(I)}break}case 3:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=p&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,O=!g&&s.optional?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(O)S=O;else{const I=R1(3,n.fullPath??n.from,T,R,M);S=I,I.parent=s,I.depth=o,s.optional??=[],s.optional.push(I)}break}case 2:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=p&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,O=R1(2,n.fullPath??n.from,T,R,M);S=O,O.parent=s,O.depth=o,s.wildcard??=[],s.wildcard.push(O)}}s=S}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const y=xl(n.fullPath??n.from);y.kind=Y5,y.parent=s,o++,y.depth=o,s.pathless??=[],s.pathless.push(y),s=y}const m=(n.path||!n.children)&&!n.isRoot;if(m&&c.endsWith("/")){const y=xl(n.fullPath??n.from);y.kind=Aa,y.parent=s,o++,y.depth=o,s.index=y,s=y}s.parse=g??null,s.priority=n.options?.params?.priority??0,m&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)ly(t,e,c,u,s,o,a)}function T1(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function va(t){if(t.pathless)for(const e of t.pathless)va(e);if(t.static)for(const e of t.static.values())va(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())va(e);if(t.dynamic?.length){t.dynamic.sort(T1);for(const e of t.dynamic)va(e)}if(t.optional?.length){t.optional.sort(T1);for(const e of t.optional)va(e)}if(t.wildcard?.length){t.wildcard.sort(T1);for(const e of t.wildcard)va(e)}}function xl(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}function R1(t,e,n,r,s){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:s}}function Sq(t,e){const n=xl("/"),r=new Uint16Array(6);for(const s of t)ly(!1,r,s,1,n,0);va(n),e.masksTree=n,e.flatCache=vh(1e3)}function Eq(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=CA(t,e.masksTree);return e.flatCache.set(t,r),r}function Cq(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=xl("/"),ly(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),CA(r,a,n)}function wq(t,e,n=!1){const r=n?t:`nofuzz\0${t}`,s=e.matchCache.get(r);if(s!==void 0)return s;t||="/";let o;try{o=CA(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=Q5(o.route)),e.matchCache.set(r,o),o}function _q(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function xq(t,e=!1,n){const r=xl(t.fullPath),s=new Uint16Array(6),o={},a={};let u=0;return ly(e,s,t,1,r,0,c=>{if(n?.(c,u),c.id in o&&pi(),o[c.id]=c,u!==0&&c.path){const f=_q(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),va(r),{processedTree:{segmentTree:r,singleCache:vh(1e3),matchCache:vh(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function CA(t,e,n=!1){const r=t.split("/"),s=Tq(t,r,e,n);if(!s)return null;const[o]=X5(t,r,s);return{route:s.node.route,rawParams:o}}function X5(t,e,n){const r=Aq(n.node);let s=null;const o=Object.create(null);let a=n.extract?.part??0,u=n.extract?.node??0,c=n.extract?.path??0,f=n.extract?.segment??0;for(;u<r.length;a++,u++,c++,f++){const p=r[u];if(p.kind===Aa)break;if(p.kind===Y5){f--,a--,c--;continue}const g=e[a],m=c;if(g&&(c+=g.length),p.kind===1){s??=n.node.fullPath.split("/");const y=s[f],S=p.prefix?.length??0;if(y.charCodeAt(S)===123){const E=p.suffix?.length??0,C=y.substring(S+2,y.length-E-1),w=g.substring(S,g.length-E);o[C]=decodeURIComponent(w)}else{const E=y.substring(1);o[E]=decodeURIComponent(g)}}else if(p.kind===3){if(n.skipped&1<<u){a--,c=m-1;continue}s??=n.node.fullPath.split("/");const y=s[f],S=p.prefix?.length??0,E=p.suffix?.length??0,C=y.substring(S+3,y.length-E-1),w=p.suffix||p.prefix?g.substring(S,g.length-E):g;w&&(o[C]=decodeURIComponent(w))}else if(p.kind===2){const y=p,S=t.substring(m+(y.prefix?.length??0),t.length-(y.suffix?.length??0)),E=decodeURIComponent(S);o["*"]=E,o._splat=E;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:a,node:u,path:c,segment:f}]}function Q5(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function Aq(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function Tq(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const s=!gh(e),o=s&&t!=="/",a=e.length-(s?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let c=null,f=null;for(;u.length;){const p=u.pop(),{node:g,index:m,skipped:y,depth:S,statics:E,dynamics:C,optionals:w}=p;let{extract:x,rawParams:T}=p;if(g.kind===2&&g.route&&!Og(f,p))continue;if(g.parse){if(!FN(t,e,p))continue;T=p.rawParams,x=p.extract}r&&g.route&&g.kind!==Aa&&Og(c,p)&&(c=p);const R=m===a;if(R&&(g.route&&(!o||g.kind===Aa||g.kind===2)&&Og(f,p)&&(f=p),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const M=R?void 0:e[m];let O;if(R&&g.index){const I={node:g.index,index:m,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T};let P=!0;if(g.index.parse&&(FN(t,e,I)||(P=!1)),P){if(!C&&!w&&!y&&Rq(E,a))return I;Og(f,I)&&(f=I)}}if(g.wildcard)for(let I=g.wildcard.length-1;I>=0;I--){const P=g.wildcard[I],{prefix:k,suffix:H}=P;if(!(k&&(R||!(P.caseSensitive?M:O??=M.toLowerCase()).startsWith(k)))){if(H){if(R)continue;const U=e.slice(m).join("/").slice(-H.length);if((P.caseSensitive?U:U.toLowerCase())!==H)continue}u.push({node:P,index:a,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}}if(g.optional){const I=y|1<<S,P=S+1;for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k];u.push({node:H,index:m,skipped:I,depth:P,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}if(!R)for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k],{prefix:U,suffix:B}=H;if(U||B){const W=H.caseSensitive?M:O??=M.toLowerCase();if(U&&!W.startsWith(U)||B&&!W.endsWith(B))continue}u.push({node:H,index:m+1,skipped:y,depth:P,statics:E,dynamics:C,optionals:w+Ig(a,m),extract:x,rawParams:T})}}if(!R&&g.dynamic&&M)for(let I=g.dynamic.length-1;I>=0;I--){const P=g.dynamic[I],{prefix:k,suffix:H}=P;if(k||H){const U=P.caseSensitive?M:O??=M.toLowerCase();if(k&&!U.startsWith(k)||H&&!U.endsWith(H))continue}u.push({node:P,index:m+1,skipped:y,depth:S+1,statics:E,dynamics:C+Ig(a,m),optionals:w,extract:x,rawParams:T})}if(!R&&g.staticInsensitive){const I=g.staticInsensitive.get(O??=M.toLowerCase());I&&u.push({node:I,index:m+1,skipped:y,depth:S+1,statics:E+Ig(a,m),dynamics:C,optionals:w,extract:x,rawParams:T})}if(!R&&g.static){const I=g.static.get(M);I&&u.push({node:I,index:m+1,skipped:y,depth:S+1,statics:E+Ig(a,m),dynamics:C,optionals:w,extract:x,rawParams:T})}if(g.pathless){const I=S+1;for(let P=g.pathless.length-1;P>=0;P--){const k=g.pathless[P];u.push({node:k,index:m,skipped:y,depth:I,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}}}if(f)return f;if(r&&c){let p=c.index;for(let m=0;m<c.index;m++)p+=e[m].length;const g=p===t.length?"/":t.slice(p);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(g),c}return null}function Ig(t,e){return 2**(t-e-1)}function Rq(t,e){return t===2**(e-1)-1}function FN(t,e,n){let r,s;try{[r,s]=X5(t,e,n)}catch{return null}if(n.rawParams=r,n.extract=s,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Og(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===Aa)>(t.node.kind===Aa)||e.node.kind===Aa==(t.node.kind===Aa)&&e.depth>t.depth))):!0}function km(t){return wA(t.filter(e=>e!==void 0).join("/"))}function wA(t){return t.replace(/\/{2,}/g,"/")}function J5(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function ci(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function e6(t){return ci(J5(t))}function hv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function Iq(t,e,n){return hv(t,n)===hv(e,n)}function Oq({base:t,to:e,trailingSlash:n="never",cache:r}){const s=e.startsWith("/"),o=!s&&e===".";let a;if(r){a=s?e:o?t:t+"\0"+e;const f=r.get(a);if(f)return f}let u;if(o)u=t.split("/");else if(s)u=e.split("/");else{for(u=t.split("/");u.length>1&&gh(u)==="";)u.pop();const f=e.split("/");for(let p=0,g=f.length;p<g;p++){const m=f[p];m===""?p?p===g-1&&u.push(m):u=[m]:m===".."?u.pop():m==="."||u.push(m)}}u.length>1&&(gh(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=wA(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function Nq(t){const e=new Map(t.map(s=>[encodeURIComponent(s),s])),n=Array.from(e.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return s=>s.replace(r,o=>e.get(o)??o)}function I1(t,e,n){const r=e[t];return typeof r!="string"?r:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>BN(s,n)).join("/"):BN(r,n)}function zN({path:t,params:e,decoder:n,...r}){let s=!1;const o=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:s};if(!t.includes("$"))return{interpolatedPath:t,usedParams:o,isMissingParams:s};const a=t.length;let u=0,c,f="";for(;u<a;){const p=u;c=Z5(t,p,c);const g=c[5];if(u=g+1,p===g)continue;const m=c[0];if(m===0){f+="/"+t.substring(p,g);continue}if(m===2){const y=e._splat;o._splat=y,o["*"]=y;const S=t.substring(p,c[1]),E=t.substring(c[4],g);if(!y){s=!0,(S||E)&&(f+="/"+S+E);continue}const C=I1("_splat",e,n);f+="/"+S+C+E;continue}if(m===1){const y=t.substring(c[2],c[3]);!s&&!(y in e)&&(s=!0),o[y]=e[y];const S=t.substring(p,c[1]),E=t.substring(c[4],g),C=I1(y,e,n)??"undefined";f+="/"+S+C+E;continue}if(m===3){const y=t.substring(c[2],c[3]),S=e[y];if(S==null)continue;o[y]=S;const E=t.substring(p,c[1]),C=t.substring(c[4],g),w=I1(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function BN(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function cr(t){return t?.isNotFound===!0}function Mq(){try{return sessionStorage}catch{return}}const Pq="tsr-scroll-restoration-v1_3",t6=Mq();function kq(){try{return JSON.parse(t6?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function Dq(){try{t6?.setItem(Pq,JSON.stringify(lc))}catch{}}const lc=kq(),jN="data-scroll-restoration-id",Lq=t=>t.state.__TSR_key||t.href;function Uq(t){const e=t.getAttribute(jN);if(e)return`[${jN}="${e}"]`;let n="",r=t,s;for(;s=r.parentNode;){let o=1,a=r;for(;a=a.previousElementSibling;)o++;const u=`${r.localName}:nth-child(${o})`;n=n?`${u} > ${n}`:u,r=s}return n}let Ng=!1;const Dm="window";function __(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function HN(t){const e=new Set;for(const n of t){if(n===Dm)continue;const r=__(n);r&&e.add(r)}return e}function Fq(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||Lq,o=new Set,a=u=>{const c=lc[u]||={};for(const f of o)f===document?c[Dm]={scrollX,scrollY}:f.isConnected&&(c[Uq(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Ng=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{Ng||o.add(u.target)},!0),t.subscribe("onBeforeLoad",u=>{u.fromLocation&&a(s(u.fromLocation)),o.clear()}),addEventListener("pagehide",()=>{a(s(t.stores.resolvedLocation.get()??t.stores.location.get())),Dq()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",u=>{const c=t.options.scrollRestorationBehavior,f=t.options.scrollToTopSelectors,p=r.next,g=r.hash;let m;if(o.clear(),r.next=!0,r.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const y=s(u.toLocation),S=u.fromLocation&&s(u.fromLocation);if(r.restoring&&S&&S!==y){const E=lc[S];if(E){let C=lc[y];for(const w in E){if(w===Dm){if(p)continue}else{const x=__(w);if(!x||p&&f&&(m??=HN(f),m.has(x)))continue}C||(C=lc[y]={}),C[w]??=E[w]}}}Ng=!0;try{const E=u.toLocation.hash,C=u.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(p){!E&&f&&(m??=HN(f));const x=E&&C&&g,T=r.restoring?lc[y]:void 0;if(T)for(const R in T){const{scrollX:M,scrollY:O}=T[R];if(R===Dm){if(x)continue;scrollTo({top:O,left:M,behavior:c}),w=!0}else{const I=__(R);I&&(I.scrollLeft=M,I.scrollTop=O,m?.delete(I))}}if(!E){const R={top:0,left:0,behavior:c};if(w||scrollTo(R),m)for(const M of m)M.scrollTo(R)}}!w&&E&&C&&document.getElementById(E)?.scrollIntoView(C)}finally{Ng=!1}}))}function zq(t,e=String){const n=new URLSearchParams;for(const r in t){const s=t[r];s!==void 0&&n.set(r,e(s))}return n.toString()}function O1(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function Bq(t){const e=new URLSearchParams(t),n=Object.create(null);for(const[r,s]of e.entries()){const o=n[r];o==null?n[r]=O1(s):Array.isArray(o)?o.push(O1(s)):n[r]=[o,O1(s)]}return n}const jq=$q(JSON.parse),Hq=qq(JSON.stringify,JSON.parse);function $q(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=Bq(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function qq(t,e){const n=typeof e=="function";function r(s){if(typeof s=="object"&&s!==null)try{return t(s)}catch{}else if(n&&typeof s=="string")try{return e(s),t(s)}catch{}return s}return s=>{const o=zq(s,r);return o?`?${o}`:""}}const Il="__root__";function n6(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const n=new Response(null,{status:t.statusCode,headers:e});if(n.options=t,t.throw)throw n;return n}function Lr(t){return t instanceof Response&&!!t.options}function Wq(t){return{input:({url:e})=>{for(const n of t)e=x_(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=r6(t[n],e);return e}}}function Gq(t){const e=e6(t.basepath),n=`/${e}`,r=t.caseSensitive?n:n.toLowerCase(),s=`${r}/`;return{input:({url:o})=>{const a=t.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===r?o.pathname="/":a.startsWith(s)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=km(["/",e,o.pathname]),o)}}function x_(t,e){const n=t?.input?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function r6(t,e){const n=t?.output?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function Vq(t,e){const{createMutableStore:n,createReadonlyStore:r,batch:s,init:o}=e,a=new Map,u=new Map,c=new Map,f=n(t.status),p=n(t.loadedAt),g=n(t.isLoading),m=n(t.isTransitioning),y=n(t.location),S=n(t.resolvedLocation),E=n(t.statusCode),C=n(t.redirect),w=n([]),x=n([]),T=n([]),R=r(()=>N1(a,w.get())),M=r(()=>N1(u,x.get())),O=r(()=>N1(c,T.get())),I=r(()=>w.get()[0]),P=r(()=>w.get().some(ee=>a.get(ee)?.get().status==="pending")),k=r(()=>({locationHref:y.get().href,resolvedLocationHref:S.get()?.href,status:f.get()})),H=r(()=>({status:f.get(),loadedAt:p.get(),isLoading:g.get(),isTransitioning:m.get(),matches:R.get(),location:y.get(),resolvedLocation:S.get(),statusCode:E.get(),redirect:C.get()})),U=vh(64);function B(ee){let fe=U.get(ee);return fe||(fe=r(()=>{const de=w.get();for(const Ae of de){const D=a.get(Ae);if(D&&D.routeId===ee)return D.get()}}),U.set(ee,fe)),fe}const W={status:f,loadedAt:p,isLoading:g,isTransitioning:m,location:y,resolvedLocation:S,statusCode:E,redirect:C,matchesId:w,pendingIds:x,cachedIds:T,matches:R,pendingMatches:M,cachedMatches:O,firstId:I,hasPending:P,matchRouteDeps:k,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:H,getRouteMatchStore:B,setMatches:Y,setPending:ne,setCached:$};Y(t.matches),o?.(W);function Y(ee){M1(ee,a,w,n,s)}function ne(ee){M1(ee,u,x,n,s)}function $(ee){M1(ee,c,T,n,s)}return W}function N1(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function M1(t,e,n,r,s){const o=t.map(u=>u.id),a=new Set(o);s(()=>{for(const u of e.keys())a.has(u)||e.delete(u);for(const u of t){const c=e.get(u.id);if(!c){const f=r(u);f.routeId=u.routeId,e.set(u.id,f);continue}c.routeId=u.routeId,c.get()!==u&&c.set(u)}yq(n.get(),o)||n.set(o)})}const A_=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Kq=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),uy=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Ol=(t,e,n=!0)=>{const r={...t.router.options.context??{}},s=n?e:e-1;for(let o=0;o<=s;o++){const a=t.matches[o];if(!a)continue;const u=t.router.getMatch(a.id);u&&Object.assign(r,u.__routeContext,u.__beforeLoadContext)}return r},$N=(t,e)=>{if(!t.matches.length)return;const n=e.routeId,r=t.matches.findIndex(a=>a.routeId===t.router.routeTree.id),s=r>=0?r:0;let o=n?t.matches.findIndex(a=>a.routeId===n):t.firstBadMatchIndex??t.matches.length-1;o<0&&(o=s);for(let a=o;a>=0;a--){const u=t.matches[a];if(t.router.looseRoutesById[u.routeId].options.notFoundComponent)return a}return n?o:s},Ta=(t,e,n)=>{if(!(!Lr(n)&&!cr(n)))throw Lr(n)&&n.redirectHandled&&!n.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=n,t.updateMatch(e.id,r=>({...r,status:Lr(n)?"redirected":cr(n)?"notFound":r.status==="pending"?"success":r.status,context:Ol(t,e.index),isFetching:!1,error:n})),cr(n)&&!n.routeId&&(n.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),Lr(n)&&(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n))),n},s6=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},qN=(t,e,n)=>{const r=Ol(t,n);t.updateMatch(e,s=>({...s,context:r}))},gf=(t,e,n)=>{const{id:r,routeId:s}=t.matches[e],o=t.router.looseRoutesById[s];if(n instanceof Promise)throw n;t.firstBadMatchIndex??=e,Ta(t,t.router.getMatch(r),n);try{o.options.onError?.(n)}catch(a){n=a,Ta(t,t.router.getMatch(r),n)}t.updateMatch(r,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!Lr(n)&&!cr(n)&&(t.serialError??=n)},o6=(t,e,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!uy(t,e)&&(n.options.loader||n.options.beforeLoad||a6(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{A_(t)},s);r._nonReactive.pendingTimeout=o}},Yq=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;o6(t,e,n,r);const s=()=>{const o=t.router.getMatch(e);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Ta(t,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},Zq=(t,e,n,r)=>{const s=t.router.getMatch(e);let o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Oc(()=>{o?.resolve(),o=void 0});const{paramsError:a,searchError:u}=s;a&&gf(t,n,a),u&&gf(t,n,u),o6(t,e,r,s);const c=new AbortController;let f=!1;const p=()=>{f||(f=!0,t.updateMatch(e,R=>({...R,isFetching:"beforeLoad",fetchCount:R.fetchCount+1,abortController:c})))},g=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,R=>({...R,isFetching:!1}))};if(!r.options.beforeLoad){t.router.batch(()=>{p(),g()});return}s._nonReactive.beforeLoadPromise=Oc();const m={...Ol(t,n,!1),...s.__routeContext},{search:y,params:S,cause:E}=s,C=uy(t,e),w={search:y,abortController:c,params:S,preload:C,context:m,location:t.location,navigate:R=>t.router.navigate({...R,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:C?"preload":E,matches:t.matches,routeId:r.id,...t.router.options.additionalContext},x=R=>{if(R===void 0){t.router.batch(()=>{p(),g()});return}(Lr(R)||cr(R))&&(p(),gf(t,n,R)),t.router.batch(()=>{p(),t.updateMatch(e,M=>({...M,__beforeLoadContext:R})),g()})};let T;try{if(T=r.options.beforeLoad(w),mh(T))return p(),T.catch(R=>{gf(t,n,R)}).then(x)}catch(R){p(),gf(t,n,R)}x(T)},Xq=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>Zq(t,n,e,s),u=()=>{if(s6(t,n))return;const c=Yq(t,n,s);return mh(c)?c.then(a):a()};return o()},Qq=(t,e,n)=>{const r=t.router.getMatch(e);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:t.router.options.ssr,matches:t.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([o,a,u])=>({meta:o?.meta,links:o?.links,headScripts:o?.scripts,headers:u,scripts:a,styles:o?.styles}))},i6=(t,e,n,r,s)=>{const o=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),p=Ol(t,r),g=uy(t,n);return{params:a,deps:u,preload:!!g,parentMatchPromise:o,abortController:c,context:p,location:t.location,navigate:m=>t.router.navigate({...m,_fromLocation:t.location}),cause:g?"preload":f,route:s,...t.router.options.additionalContext}},WN=async(t,e,n,r,s)=>{try{const o=t.router.getMatch(n);try{(!(G5??t.router.isServer)||o.ssr===!0)&&yh(s);const a=s.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(i6(t,e,n,r,s)),f=!!u&&mh(c);if((f||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||o._nonReactive.minPendingPromise)&&t.updateMatch(n,g=>({...g,isFetching:"loader"})),u){const g=f?await c:c;Ta(t,t.router.getMatch(n),g),g!==void 0&&t.updateMatch(n,m=>({...m,loaderData:g}))}s._lazyPromise&&await s._lazyPromise;const p=o._nonReactive.minPendingPromise;p&&await p,s._componentsPromise&&await s._componentsPromise,t.updateMatch(n,g=>({...g,error:void 0,context:Ol(t,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let u=a;if(u?.name==="AbortError"){if(o.abortController.signal.aborted){o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loaderPromise=void 0;return}t.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:Ol(t,r)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,cr(a)&&await s.options.notFoundComponent?.preload?.(),Ta(t,t.router.getMatch(n),a);try{s.options.onError?.(a)}catch(f){u=f,Ta(t,t.router.getMatch(n),f)}!Lr(u)&&!cr(u)&&await yh(s,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:Ol(t,r),status:"error",isFetching:!1}))}}catch(o){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Ta(t,a,o)}},Jq=async(t,e,n)=>{async function r(y,S,E,C,w){const x=Date.now()-S.updatedAt,T=y?w.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??t.router.options.defaultStaleTime??0,R=w.options.shouldReload,M=typeof R=="function"?R(i6(t,e,s,n,w)):R,{status:O,invalid:I}=C,P=x>=T&&(!!t.forceStaleReload||C.cause==="enter"||E!==void 0&&E!==C.id);a=O==="success"&&(I||(M??P)),y&&w.options.preload===!1||(a&&!t.sync&&p?(u=!0,(async()=>{try{await WN(t,e,s,n,w);const k=t.router.getMatch(s);k._nonReactive.loaderPromise?.resolve(),k._nonReactive.loadPromise?.resolve(),k._nonReactive.loaderPromise=void 0,k._nonReactive.loadPromise=void 0}catch(k){Lr(k)&&await t.router.navigate(k.options)}})()):O!=="success"||a?await WN(t,e,s,n,w):qN(t,s,n))}const{id:s,routeId:o}=t.matches[n];let a=!1,u=!1;const c=t.router.looseRoutesById[o],f=c.options.loader,p=((typeof f=="function"?void 0:f?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(s6(t,s)){if(!t.router.getMatch(s))return t.matches[n];qN(t,s,n)}else{const y=t.router.getMatch(s),S=t.router.stores.matchesId.get()[n],E=(S&&t.router.stores.matchStores.get(S)||null)?.routeId===o?S:t.router.stores.matches.get().find(w=>w.routeId===o)?.id,C=uy(t,s);if(y._nonReactive.loaderPromise){if(y.status==="success"&&!t.sync&&!y.preload&&p)return y;await y._nonReactive.loaderPromise;const w=t.router.getMatch(s),x=w._nonReactive.error||w.error;x&&Ta(t,w,x),w.status==="pending"&&await r(C,y,E,w,c)}else{const w=C&&!t.router.stores.matchStores.has(s),x=t.router.getMatch(s);x._nonReactive.loaderPromise=Oc(),w!==x.preload&&t.updateMatch(s,T=>({...T,preload:w})),await r(C,y,E,x,c)}}const g=t.router.getMatch(s);u||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,u||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const m=u?g.isFetching:!1;return m!==g.isFetching||g.invalid!==!1?(t.updateMatch(s,y=>({...y,isFetching:m,invalid:!1})),t.router.getMatch(s)):g};async function GN(t){const e=t,n=[];Kq(e.router)&&A_(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=Xq(e,m);mh(y)&&await y}catch(y){if(Lr(y))throw y;if(cr(y))r=y;else if(!e.preload)throw y;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const s=e.firstBadMatchIndex??e.matches.length,o=r&&!e.preload?$N(e,r):void 0,a=r&&e.preload?0:o!==void 0?Math.min(o+1,s):s;let u,c;for(let m=0;m<a;m++)n.push(Jq(e,n,m));try{await Promise.all(n)}catch{const m=await Promise.allSettled(n);for(const y of m){if(y.status!=="rejected")continue;const S=y.reason;if(Lr(S))throw S;cr(S)?u??=S:c??=S}if(c!==void 0)throw c}const f=u??(r&&!e.preload?r:void 0);let p=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!f&&r&&e.preload)return e.matches;if(f){const m=$N(e,f);m===void 0&&pi();const y=e.matches[m],S=e.router.looseRoutesById[y.routeId],E=e.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&E&&(S.options.notFoundComponent=E),f.routeId=y.routeId;const C=y.routeId===e.router.routeTree.id;e.updateMatch(y.id,w=>({...w,...C?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),p=m,await yh(S,["notFoundComponent"])}else if(!e.preload){const m=e.matches[0];m.globalNotFound||e.router.getMatch(m.id)?.globalNotFound&&e.updateMatch(m.id,y=>({...y,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const m=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await yh(m,["errorComponent"])}for(let m=0;m<=p;m++){const{id:y,routeId:S}=e.matches[m],E=e.router.looseRoutesById[S];try{const C=Qq(e,y,E);if(C){const w=await C;e.updateMatch(y,x=>({...x,...w}))}}catch(C){console.error(`Error executing head for route ${S}:`,C)}}const g=A_(e);if(mh(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function VN(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function yh(t,e=Lm){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(r=>{const{id:s,...o}=r.options;Object.assign(t.options,o),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const n=()=>t._componentsLoaded?void 0:e===Lm?(()=>{if(t._componentsPromise===void 0){const r=VN(t,Lm);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():VN(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function a6(t){for(const e of Lm)if(t.options[e]?.preload)return!0;return!1}const Lm=["component","errorComponent","pendingComponent","notFoundComponent"];var Oa="__TSR_index",KN="popstate",YN="beforeunload";function eW(t){let e=t.getLocation();const n=new Set,r=a=>{e=t.getLocation(),n.forEach(u=>u({location:e,action:a}))},s=a=>{t.notifyOnIndexChange??!0?r(a):e=t.getLocation()},o=async({task:a,navigateOpts:u,...c})=>{if(u?.ignoreBlocker??!1){a();return}const f=t.getBlockers?.()??[],p=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const g of f){const m=pv(c.path,c.state);if(await g.blockerFn({currentLocation:e,nextLocation:m,action:c.type})){t.onBlocked?.();return}}a()};return{get location(){return e},get length(){return t.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,u,c)=>{const f=e.state[Oa];u=ZN(f+1,u),o({task:()=>{t.pushState(a,u),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:u})},replace:(a,u,c)=>{const f=e.state[Oa];u=ZN(f,u),o({task:()=>{t.replaceState(a,u),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:u})},go:(a,u)=>{o({task:()=>{t.go(a),s({type:"GO",index:a})},navigateOpts:u,type:"GO"})},back:a=>{o({task:()=>{t.back(a?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{t.forward(a?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>e.state[Oa]!==0,createHref:a=>t.createHref(a),block:a=>{if(!t.setBlockers)return()=>{};const u=t.getBlockers?.()??[];return t.setBlockers([...u,a]),()=>{const c=t.getBlockers?.()??[];t.setBlockers?.(c.filter(f=>f!==a))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r}}function ZN(t,e){e||(e={});const n=_A();return{...e,key:n,__TSR_key:n,[Oa]:t}}function tW(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,r=e.history.replaceState;let s=[];const o=()=>s,a=P=>s=P,u=(P=>P),c=(()=>pv(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const P=_A();e.history.replaceState({[Oa]:0,key:P,__TSR_key:P},"")}let f=c(),p,g=!1,m=!1,y=!1,S=!1;const E=()=>f;let C,w;const x=()=>{C&&(I._ignoreSubscribers=!0,(C.isPush?e.history.pushState:e.history.replaceState)(C.state,"",C.href),I._ignoreSubscribers=!1,C=void 0,w=void 0,p=void 0)},T=(P,k,H)=>{const U=u(k);w||(p=f),f=pv(k,H),C={href:U,state:H,isPush:C?.isPush||P==="push"},w||(w=Promise.resolve().then(()=>x()))},R=P=>{f=c(),I.notify({type:P})},M=async()=>{if(m){m=!1;return}const P=c(),k=P.state[Oa]-f.state[Oa],H=k===1,U=k===-1,B=!H&&!U||g;g=!1;const W=B?"GO":U?"BACK":"FORWARD",Y=B?{type:"GO",index:k}:{type:U?"BACK":"FORWARD"};if(y)y=!1;else{const ne=o();if(typeof document<"u"&&ne.length){for(const $ of ne)if(await $.blockerFn({currentLocation:f,nextLocation:P,action:W})){m=!0,e.history.go(1),I.notify(Y);return}}}f=c(),I.notify(Y)},O=P=>{if(S){S=!1;return}let k=!1;const H=o();if(typeof document<"u"&&H.length)for(const U of H){const B=U.enableBeforeUnload??!0;if(B===!0){k=!0;break}if(typeof B=="function"&&B()===!0){k=!0;break}}if(k)return P.preventDefault(),P.returnValue=""},I=eW({getLocation:E,getLength:()=>e.history.length,pushState:(P,k)=>T("push",P,k),replaceState:(P,k)=>T("replace",P,k),back:P=>(P&&(y=!0),S=!0,e.history.back()),forward:P=>{P&&(y=!0),S=!0,e.history.forward()},go:P=>{g=!0,e.history.go(P)},createHref:P=>u(P),flush:x,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(YN,O,{capture:!0}),e.removeEventListener(KN,M)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(YN,O,{capture:!0}),e.addEventListener(KN,M),e.history.pushState=function(...P){const k=n.apply(e.history,P);return I._ignoreSubscribers||R("PUSH"),k},e.history.replaceState=function(...P){const k=r.apply(e.history,P);return I._ignoreSubscribers||R("REPLACE"),k},I}function nW(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function pv(t,e){const n=nW(t),r=n.indexOf("#"),s=n.indexOf("?"),o=_A();return{href:n,pathname:n.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:n.length),hash:r>-1?n.substring(r):"",search:s>-1?n.slice(s,r===-1?void 0:r):"",state:e||{[Oa]:0,key:o,__TSR_key:o}}}function _A(){return(Math.random()+1).toString(36).substring(7)}function xc(t,e){const n=e,r=t;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var rW=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,s=this.basepath??r?.basepath??"/",o=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Nq(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=tW()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=vh(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=Vq(oW(this.latestLocation),p),Fq(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||s!==c||a!==f){this.basepath=c;const p=[],g=e6(c);g&&g!=="/"&&p.push(Gq({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:Wq(p),this.history&&this.updateLatestLocation(),u=!0}u&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=xq(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&Sq(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const s={eventType:n,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const s=({pathname:c,search:f,hash:p,href:g,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const w=this.options.parseSearch(f),x=this.options.stringifySearch(w);return{href:c+x+p,publicHref:c+x+p,pathname:pf(c).path,external:!1,searchStr:x,search:gl(r?.search,w),hash:pf(p.slice(1)).path,state:_l(r?.state,m)}}const y=new URL(g,this.origin),S=x_(this.rewrite,y),E=this.options.parseSearch(S.search),C=this.options.stringifySearch(E);return S.search=C,{href:S.href.replace(S.origin,""),publicHref:g,pathname:pf(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:C,search:gl(r?.search,E),hash:pf(S.hash.slice(1)).path,state:_l(r?.state,m)}},o=s(n),{__tempLocation:a,__tempKey:u}=o.state;if(a&&(!u||u===this.tempLocationKey)){const c=s(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>Oq({base:n,to:r.includes("//")?wA(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},s):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>iW({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const r=this.stores.matchStores.get(n)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(o={})=>{const a=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??u.fullPath,f=o.to?`${o.to}`:void 0,p=u.search,g=Object.assign(Object.create(null),u.params),m=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(c,"."),y=f?this.resolvePathWithBase(m,f):m,S=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?g:Object.assign(g,wl(o.params,g)),E=this.routesByPath[ci(y)];let C;if(E)C=this.getRouteBranch(E);else if(y.includes("$"))C=[];else{const U=this.getMatchedRoutes(y);C=U.matchedRoutes,this.options.notFoundRoute&&(!U.foundRoute||U.foundRoute.path!=="/"&&U.routeParams["**"])&&(C=[...C,this.options.notFoundRoute])}if(C.length&&K5(S))for(const U of C){const B=U.options.params?.stringify??U.options.stringifyParams;if(B)try{Object.assign(S,B(S))}catch{}}const w=n.leaveParams?y:pf(zN({path:y,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=p;if(n._includeValidateSearch&&this.options.search?.strict){const U={};C.forEach(B=>{if(B.options.validateSearch)try{Object.assign(U,Um(B.options.validateSearch,{...U,...x}))}catch{}}),x=U}x=aW({search:x,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),x=gl(p,x);const T=this.options.stringifySearch(x),R=o.hash===!0?a.hash:o.hash?wl(o.hash,a.hash):void 0,M=R?`#${R}`:"";let O=o.state===!0?a.state:o.state?wl(o.state,a.state):{};O=_l(a.state,O);const I=`${w}${T}${M}`;let P,k,H=!1;if(this.rewrite){const U=new URL(I,this.origin),B=r6(this.rewrite,U);P=U.href.replace(U.origin,""),B.origin!==this.origin?(k=B.href,H=!0):k=B.pathname+B.search+B.hash}else P=vq(I),k=P;return{publicHref:k,href:P,pathname:w,search:x,searchStr:T,state:O,hash:R??"",external:H,unmaskOnReload:o.unmaskOnReload}},s=(o={},a)=>{const u=r(o);let c=a?r(a):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const p=Eq(u.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:g,params:m,...y}=p.route,S=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,wl(m,f));a={from:n.from,...y,params:S},c=r(a)}}}return c&&(u.maskedLocation=c),u};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...s})=>{let o;const a=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(g=>{s.state[g]=this.latestLocation.state[g]});const p=Rl(s.state,this.latestLocation.state);return f.forEach(g=>{delete s.state[g]}),p},u=ci(this.latestLocation.href)===ci(s.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Oc(()=>{c?.resolve(),c=void 0}),u&&a())this.load();else{let{maskedLocation:f,hashScrollIntoView:p,...g}=s;f&&(g={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=p??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,o=s.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:r})}return this._scroll.next=s.resetScroll??!0,this.history.subscribers.size||this.load(o?{action:{type:o}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:a,href:u,...c}={})=>{if(u){const g=this.history.location.state.__TSR_index,m=pv(u,{__TSR_index:n?g:g+1}),y=new URL(m.pathname,this.origin);c.to=x_(this.rewrite,y).pathname,c.search=this.options.parseSearch(m.search),c.hash=m.hash.slice(1)}const f=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const p=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:r,href:s,publicHref:o,...a})=>{let u=!1;if(s)try{new URL(`${s}`),u=!0}catch{}if(u&&!r&&(r=!0),r){if(n!==void 0||!s){const f=this.buildLocation({to:n,...a});s=s??f.publicHref,o=o??f.publicHref}const c=!u&&o?o:s;if(fv(c,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const p of f)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(c):window.location.href=c;return}return this.buildAndCommitLocation({...a,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(s=>!n.some(o=>o.id===s.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{const r=n?.action?.type;let s,o,a;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad(),r&&(this._scroll.hash=r==="PUSH"||r==="REPLACE");const p=this.latestLocation,g=xc(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await GN({router:this,sync:n?.sync,forceStaleReload:u.href===p.href,matches:this.stores.pendingMatches.get(),location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=null,y=null,S=null,E=null;this.batch(()=>{const C=this.stores.pendingMatches.get(),w=C.length,x=this.stores.matches.get();m=w?x.filter(M=>!this.stores.pendingMatchStores.has(M.id)):null;const T=new Set;for(const M of this.stores.pendingMatchStores.values())M.routeId&&T.add(M.routeId);const R=new Set;for(const M of this.stores.matchStores.values())M.routeId&&R.add(M.routeId);y=w?x.filter(M=>!T.has(M.routeId)):null,S=w?C.filter(M=>!R.has(M.routeId)):null,E=w?C.filter(M=>R.has(M.routeId)):x,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),w&&(this.stores.setMatches(C),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(M=>M.status!=="error"&&M.status!=="notFound"&&M.status!=="redirected")]),this.clearExpiredCache())});for(const[C,w]of[[y,"onLeave"],[S,"onEnter"],[E,"onStay"]])if(C)for(const x of C)this.looseRoutesById[x.routeId].options[w]?.(x)})})}})}catch(p){Lr(p)?(s=p,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):cr(p)&&(o=p);const g=s?s.status:o?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(g),this.stores.redirect.set(s)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(f=>f.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,a=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(xc(o,a)):r.types;if(u===!1){n();return}s={update:n,types:u}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const s=this.stores.pendingMatchStores.get(n);if(s){s.set(r);return}const o=this.stores.matchStores.get(n);if(o){o.set(r);return}const a=this.stores.cachedMatchStores.get(n);if(a){const u=r(a.get());u.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(f=>f!==n)):a.set(u)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const r=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const s=n.options._builtLocation??this.buildLocation(n.options),o=this.getParsedLocationHref(s);n.options.href=o,n.headers.set("Location",o)}else if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const o=s.pathname+s.search+s.hash;n.options.href=o,n.headers.set("Location",o)}}catch{}if(n.options.href&&!n.options._builtLocation&&fv(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(s=>!r(s))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=s=>{const o=this.looseRoutesById[s.routeId];if(!o.options.loader)return!0;const a=(s.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:n-s.updatedAt>=a};this.clearCache({filter:r})},this.loadRouteChunk=yh,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let s=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...o,...this.stores.cachedIds.get()]),u=s.filter(c=>!a.has(c.id));if(u.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...u])}try{return s=await GN({router:this,matches:s,location:r,preload:!0,updateMatch:(c,f)=>{o.has(c)?s=s.map(p=>p.id===c?f(p):p):this.updateMatch(c,f)}}),s}catch(c){if(Lr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});cr(c)||console.error(c);return}},this.matchRoute=(n,r)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(s);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const a=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=Cq(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Rl(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Rl(a.search,o.search,{partial:!0})?u.rawParams:!1:u.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Hq,parseSearch:t.parseSearch??jq,protocolAllowlist:t.protocolAllowlist??mq}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:n}){this.routesById=t,this.routesByPath=e,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(t){let e=this.routeBranchCache.get(t);return e||(e=Q5(t),this.routeBranchCache.set(t,e)),e}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const n=this.getMatchedRoutes(t.pathname),{foundRoute:r,routeParams:s}=n;let{matchedRoutes:o}=n,a=!1;(r?r.path!=="/"&&s["**"]:ci(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const u=a?uW(this.options.notFoundMode,o):void 0,c=new Array(o.length),f=new Map;for(const p of this.stores.matchStores.values())p.routeId&&f.set(p.routeId,p.get());for(let p=0;p<o.length;p++){const g=o[p],m=c[p-1];let y,S,E;{const B=m?.search??t.search,W=m?._strictSearch??void 0;try{const Y=Um(g.options.validateSearch,{...B})??void 0;y={...B,...Y},S={...W,...Y},E=void 0}catch(Y){let ne=Y;if(Y instanceof gv||(ne=new gv(Y.message,{cause:Y})),e?.throwOnError)throw ne;y=B,S={},E=ne}}const C=g.options.loaderDeps?.({search:y})??"",w=C?JSON.stringify(C):"",{interpolatedPath:x,usedParams:T}=zN({path:g.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),R=g.id+x+w,M=this.getMatch(R),O=f.get(g.id),I=M?._strictParams??T;let P;if(!M)try{XN(g,I)}catch(B){if(cr(B)||Lr(B)?P=B:P=new sW(B.message,{cause:B}),e?.throwOnError)throw P}Object.assign(s,I);const k=O?"stay":"enter";let H;if(M)H={...M,cause:k,params:O?.params??s,_strictParams:I,search:gl(O?O.search:M.search,y),_strictSearch:S};else{const B=g.options.loader||g.options.beforeLoad||g.lazyFn||a6(g)?"pending":"success";H={id:R,ssr:g.options.ssr,index:p,routeId:g.id,params:O?.params??s,_strictParams:I,pathname:x,updatedAt:Date.now(),search:O?gl(O.search,y):y,_strictSearch:S,searchError:void 0,status:B,isFetching:!1,error:void 0,paramsError:P,__routeContext:void 0,_nonReactive:{loadPromise:Oc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:k,loaderDeps:O?_l(O.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:g.options.staticData||{},fullPath:g.fullPath}}e?.preload||(H.globalNotFound=u===g.id),H.searchError=E;const U=this.getParentContext(m);H.context={...U,...H.__routeContext,...H.__beforeLoadContext},c[p]=H}for(let p=0;p<c.length;p++){const g=c[p],m=this.looseRoutesById[g.routeId],y=this.getMatch(g.id),S=f.get(g.routeId);if(g.params=S?gl(S.params,s):s,!y){const E=c[p-1],C=this.getParentContext(E);if(m.options.context){const w={deps:g.loaderDeps,params:g.params,context:C??{},location:t,navigate:x=>this.navigate({...x,_fromLocation:t}),buildLocation:this.buildLocation,cause:g.cause,abortController:g.abortController,preload:!!g.preload,matches:c,routeId:m.id};g.__routeContext=m.options.context(w)??void 0}g.context={...C,...g.__routeContext,...g.__beforeLoadContext}}}return c}matchRoutesLightweight(t){const e=gh(this.stores.matchesId.get()),n=this.lightweightCache.get(t);if(n&&n[0]===e)return n[1];const{matchedRoutes:r,routeParams:s}=this.getMatchedRoutes(t.pathname),o=gh(r),a={...t.search};for(const g of r)try{Object.assign(a,Um(g.options.validateSearch,a))}catch{}const u=e&&this.stores.matchStores.get(e)?.get(),c=u&&u.routeId===o.id&&u.pathname===t.pathname;let f;if(c)f=u.params;else{const g=Object.assign(Object.create(null),s);for(const m of r)try{XN(m,g)}catch{}f=g}const p={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,p]),p}},gv=class extends Error{},sW=class extends Error{};function oW(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function Um(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new gv("Async validation not supported");if(n.issues)throw new gv(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function iW({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=ci(t);let o;const a=wq(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function aW({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return lW(n)(t,e,r??!1)}function lW(t){let e,n;const r=[];for(const o of t){const a=o.options;if("search"in a)a.search?.middlewares&&r.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){const c=({search:f,next:p})=>{const g=p(a.preSearchFilters?a.preSearchFilters.reduce((m,y)=>y(m),f):f);return a.postSearchFilters?a.postSearchFilters.reduce((m,y)=>y(m),g):g};r.push(c)}const u=a.validateSearch;if(u){const c=({search:f,next:p,meta:g})=>{const m=p(f);if(n)try{const y=Um(u,m);if(g&&y)for(const S in y)S in m||(g.defaulted||=new Map).set(S,y[S]);return{...m,...y}}catch{}return m};r.push(c)}}const s=(o,a,u)=>{if(o>=r.length){if(!e.search)return{};if(e.search===!0)return a;const f=wl(e.search,a);return u&&(u.explicit=f),f}const c=(f,p)=>{if(p){const g=u||{};return{search:s(o+1,f,g),meta:g}}return s(o+1,f,u)};return r[o]({search:a,next:c,meta:u})};return function(a,u,c){return e=u,n=c,s(0,a)}}function uW(t,e){if(t!=="root")for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.children)return r.id}return Il}function XN(t,e){const n=t.options.params?.parse??t.options.parseParams;if(n){const r=n(e);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(e,r)}}const cW="Error preloading route! ☝️";var l6=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Il:this.parentRoute||pi();let s=r?Il:n?.path;s&&s!=="/"&&(s=J5(s));const o=n?.id||s;let a=r?Il:km([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=km(["/",a]));const u=a==="__root__"?"/":km([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=u,this._to=ci(u)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>n6({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},dW=class extends l6{constructor(t){super(t)}};function xA(t){const e=t.errorComponent??AA;return F.jsx(fW,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?A.createElement(e,{error:n,reset:r}):t.children})}var fW=class extends A.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,e){const n=t.getResetKey();return e.error&&e.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function AA({error:t}){const[e,n]=A.useState(!1);return F.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[F.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[F.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),F.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:e?"Hide Error":"Show Error"})]}),F.jsx("div",{style:{height:".25rem"}}),e?F.jsx("div",{children:F.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?F.jsx("code",{children:t.message}):null})}):null]})}function hW({children:t,fallback:e=null}){return u6()?F.jsx(z.Fragment,{children:t}):F.jsx(z.Fragment,{children:e})}function u6(){return z.useSyncExternalStore(pW,()=>!0,()=>!1)}function pW(){return()=>{}}var c6=A.createContext(null);function us(t){return A.useContext(c6)}var cy=A.createContext(void 0),gW=A.createContext(void 0),rn=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(rn||{});function mW({update:t,notify:e,unwatched:n}){return{link:r,unlink:s,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,p,g){const m=p.depsTail;if(m!==void 0&&m.dep===f)return;const y=m!==void 0?m.nextDep:p.deps;if(y!==void 0&&y.dep===f){y.version=g,p.depsTail=y;return}const S=f.subsTail;if(S!==void 0&&S.version===g&&S.sub===p)return;const E=p.depsTail=f.subsTail={version:g,dep:f,sub:p,prevDep:m,nextDep:y,prevSub:S,nextSub:void 0};y!==void 0&&(y.prevDep=E),m!==void 0?m.nextDep=E:p.deps=E,S!==void 0?S.nextSub=E:f.subs=E}function s(f,p=f.sub){const g=f.dep,m=f.prevDep,y=f.nextDep,S=f.nextSub,E=f.prevSub;return y!==void 0?y.prevDep=m:p.depsTail=m,m!==void 0?m.nextDep=y:p.deps=y,S!==void 0?S.prevSub=E:g.subsTail=E,E!==void 0?E.nextSub=S:(g.subs=S)===void 0&&n(g),y}function o(f){let p=f.nextSub,g;e:do{const m=f.sub;let y=m.flags;if(y&60?y&12?y&4?!(y&48)&&c(f,m)?(m.flags=y|40,y&=1):y=0:m.flags=y&-9|32:y=0:m.flags=y|32,y&2&&e(m),y&1){const S=m.subs;if(S!==void 0){const E=(f=S).nextSub;E!==void 0&&(g={value:p,prev:g},p=E);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;g!==void 0;)if(f=g.value,g=g.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function a(f,p){let g,m=0,y=!1;e:do{const S=f.dep,E=S.flags;if(p.flags&16)y=!0;else if((E&17)===17){if(t(S)){const C=S.subs;C.nextSub!==void 0&&u(C),y=!0}}else if((E&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(g={value:f,prev:g}),f=S.deps,p=S,++m;continue}if(!y){const C=f.nextDep;if(C!==void 0){f=C;continue}}for(;m--;){const C=p.subs,w=C.nextSub!==void 0;if(w?(f=g.value,g=g.prev):f=C,y){if(t(p)){w&&u(C),p=f.sub;continue}y=!1}else p.flags&=-33;p=f.sub;const x=f.nextDep;if(x!==void 0){f=x;continue e}}return y}while(!0)}function u(f){do{const p=f.sub,g=p.flags;(g&48)===32&&(p.flags=g|16,(g&6)===2&&e(p))}while((f=f.nextSub)!==void 0)}function c(f,p){let g=p.depsTail;for(;g!==void 0;){if(g===f)return!0;g=g.prevDep}return!1}}function vW(t,e,n){const r=typeof t=="object",s=r?t:void 0;return{next:(r?t.next:t)?.bind(s),error:(r?t.error:e)?.bind(s),complete:(r?t.complete:n)?.bind(s)}}const T_=[];let Fm=0;const{link:QN,unlink:yW,propagate:bW,checkDirty:d6,shallowPropagate:JN}=mW({update(t){return t._update()},notify(t){T_[R_++]=t,t.flags&=~rn.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=rn.Mutable|rn.Dirty,mv(t))}});let Mg=0,R_=0,bo,I_=0;function f6(t){try{++I_,t()}finally{--I_||h6()}}function mv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=yW(n,t)}function h6(){if(!(I_>0)){for(;Mg<R_;){const t=T_[Mg];T_[Mg++]=void 0,t.notify()}Mg=0,R_=0}}function eM(t,e){const n=typeof t=="function",r=t,s={_snapshot:n?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?rn.None:rn.Mutable,get(){return bo!==void 0&&QN(s,bo,Fm),s._snapshot},subscribe(o){const a=vW(o),u={current:!1},c=SW(()=>{s.get(),u.current?a.next?.(s._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=bo,u=e?.compare??Object.is;if(n)bo=s,++Fm,s.depsTail=void 0;else if(o===void 0)return!1;n&&(s.flags=rn.Mutable|rn.RecursedCheck);try{const c=s._snapshot,f=typeof o=="function"?o(c):o===void 0&&n?r(c):o;return c===void 0||!u(c,f)?(s._snapshot=f,!0):!1}finally{bo=a,n&&(s.flags&=~rn.RecursedCheck),mv(s)}}};return n?(s.flags=rn.Mutable|rn.Dirty,s.get=function(){const o=s.flags;if(o&rn.Dirty||o&rn.Pending&&d6(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&JN(a)}}else o&rn.Pending&&(s.flags=o&~rn.Pending);return bo!==void 0&&QN(s,bo,Fm),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(bW(a),JN(a),h6())}},s}function SW(t){const e=()=>{const r=bo;bo=n,++Fm,n.depsTail=void 0,n.flags=rn.Watching|rn.RecursedCheck;try{return t()}finally{bo=r,n.flags&=~rn.RecursedCheck,mv(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:rn.Watching|rn.RecursedCheck,notify(){const r=this.flags;r&rn.Dirty||r&rn.Pending&&d6(this.deps,this)?e():this.flags=rn.Watching},stop(){this.flags=rn.None,this.depsTail=void 0,mv(this)}};return e(),n}var P1={exports:{}},k1={},D1={exports:{}},L1={};var tM;function EW(){if(tM)return L1;tM=1;var t=qh();function e(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,s=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function u(g,m){var y=m(),S=r({inst:{value:y,getSnapshot:m}}),E=S[0].inst,C=S[1];return o(function(){E.value=y,E.getSnapshot=m,c(E)&&C({inst:E})},[g,y,m]),s(function(){return c(E)&&C({inst:E}),g(function(){c(E)&&C({inst:E})})},[g]),a(y),y}function c(g){var m=g.getSnapshot;g=g.value;try{var y=m();return!n(g,y)}catch{return!0}}function f(g,m){return m()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return L1.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,L1}var nM;function CW(){return nM||(nM=1,D1.exports=EW()),D1.exports}var rM;function wW(){if(rM)return k1;rM=1;var t=qh(),e=CW();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,o=t.useRef,a=t.useEffect,u=t.useMemo,c=t.useDebugValue;return k1.useSyncExternalStoreWithSelector=function(f,p,g,m,y){var S=o(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=u(function(){function w(O){if(!x){if(x=!0,T=O,O=m(O),y!==void 0&&E.hasValue){var I=E.value;if(y(I,O))return R=I}return R=O}if(I=R,r(T,O))return I;var P=m(O);return y!==void 0&&y(I,P)?(T=O,I):(T=O,R=P)}var x=!1,T,R,M=g===void 0?null:g;return[function(){return w(p())},M===null?void 0:function(){return w(M())}]},[p,g,m,y]);var C=s(f,S[0],S[1]);return a(function(){E.hasValue=!0,E.value=C},[C]),c(C),C},k1}var sM;function _W(){return sM||(sM=1,P1.exports=wW()),P1.exports}var TA=_W();const sxe=qa(TA);function xW(t,e){return t===e}function jr(t,e,n=xW){const r=A.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=A.useCallback(()=>t?.get(),[t]);return TA.useSyncExternalStoreWithSelector(r,s,s,e,n)}var U1={get(){},subscribe(){return{unsubscribe(){}}}};function AW(t,e){const n=A.useRef();return r=>{const s=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=_l(n.current,s):s}}function Zl(t){const e=us(),n=A.useContext(t.from?gW:cy),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=AW(t,e),o=jr(r??U1,a=>a?s(a):U1);if(o!==U1)return o;(t.shouldThrow??!0)&&pi()}function p6(t){return Zl({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function g6(t){const{select:e,...n}=t;return Zl({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function m6(t){return Zl({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const n=t.strict===!1?e.params:e._strictParams;return t.select?t.select(n):n}})}function v6(t){return Zl({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function RA(t){const e=us();return A.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function oxe(t){const e=us(),n=RA(),r=A.useRef(null);return mc(()=>{r.current!==t&&(n(t),r.current=t)},[e,t,n]),null}function y6(t){return Zl({...t,select:e=>t.select?t.select(e.context):e.context})}var F1={exports:{}},lr={};var oM;function TW(){if(oM)return lr;oM=1;var t=qh();function e(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(c,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:c,containerInfo:f,implementation:p}}var a=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return lr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,lr.createPortal=function(c,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return o(c,f,null,p)},lr.flushSync=function(c){var f=a.T,p=r.p;try{if(a.T=null,r.p=2,c)return c()}finally{a.T=f,r.p=p,r.d.f()}},lr.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},lr.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},lr.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var p=f.as,g=u(p,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:m,fetchPriority:y}):p==="script"&&r.d.X(c,{crossOrigin:g,integrity:m,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},lr.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=u(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},lr.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,g=u(p,f.crossOrigin);r.d.L(c,p,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},lr.preloadModule=function(c,f){if(typeof c=="string")if(f){var p=u(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},lr.requestFormReset=function(c){r.d.r(c)},lr.unstable_batchedUpdates=function(c,f){return c(f)},lr.useFormState=function(c,f,p){return a.H.useFormState(c,f,p)},lr.useFormStatus=function(){return a.H.useHostTransitionStatus()},lr.version="19.2.7",lr}var iM;function b6(){if(iM)return F1.exports;iM=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),F1.exports=TW(),F1.exports}var S6=b6();const ixe=qa(S6);function RW(t,e){const n=us(),r=cq(e),{activeProps:s,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:p,hashScrollIntoView:g,replace:m,startTransition:y,resetScroll:S,viewTransition:E,children:C,target:w,disabled:x,style:T,className:R,onClick:M,onBlur:O,onFocus:I,onMouseEnter:P,onMouseLeave:k,onTouchStart:H,ignoreBlocker:U,params:B,search:W,hash:Y,state:ne,mask:$,reloadDocument:ee,unsafeRelative:fe,from:de,_fromLocation:Ae,...D}=t,V=u6(),K=A.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),J=jr(n.stores.location,gt=>gt,(gt,mn)=>gt.href===mn.href),oe=A.useMemo(()=>{const gt={_fromLocation:J,...K};return n.buildLocation(gt)},[n,J,K]),he=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,ue=oe.maskedLocation?oe.maskedLocation.external:oe.external,ve=A.useMemo(()=>kW(he,ue,n.history,x),[x,ue,he,n.history]),_e=A.useMemo(()=>{if(ve?.external)return fv(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!DW(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),fv(u,n.protocolAllowlist)?void 0:u}catch{}},[u,ve,n.protocolAllowlist]),Xe=A.useMemo(()=>{if(_e)return!1;if(a?.exact){if(!Iq(J.pathname,oe.pathname,n.basepath))return!1}else{const gt=hv(J.pathname,n.basepath),mn=hv(oe.pathname,n.basepath);if(!(gt.startsWith(mn)&&(gt.length===mn.length||gt[mn.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Rl(J.search,oe.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?V&&J.hash===oe.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,J,_e,V,oe.hash,oe.pathname,oe.search,n.basepath]),Ee=Xe?wl(s,{})??IW:z1,pt=Xe?z1:wl(o,{})??z1,Ce=[R,Ee.className,pt.className].filter(Boolean).join(" "),ze=(T||Ee.style||pt.style)&&{...T,...Ee.style,...pt.style},[Be,He]=A.useState(!1),pr=A.useRef(!1),St=t.reloadDocument||_e?!1:c??n.options.defaultPreload,Gr=f??n.options.defaultPreloadDelay??0,Wn=A.useCallback(()=>{n.preloadRoute({...K,_builtLocation:oe}).catch(gt=>{console.warn(gt),console.warn(cW)})},[n,K,oe]);uq(r,A.useCallback(gt=>{gt?.isIntersecting&&Wn()},[Wn]),PW,{disabled:!!x||St!=="viewport"}),A.useEffect(()=>{pr.current||!x&&St==="render"&&(Wn(),pr.current=!0)},[x,Wn,St]);const _r=gt=>{const mn=gt.currentTarget.getAttribute("target"),Ar=w!==void 0?w:mn;if(!x&&!LW(gt)&&!gt.defaultPrevented&&(!Ar||Ar==="_self")&&gt.button===0){gt.preventDefault(),S6.flushSync(()=>{He(!0)});const no=n.subscribe("onResolved",()=>{no(),He(!1)});n.navigate({...K,replace:m,resetScroll:S,hashScrollIntoView:g,startTransition:y,viewTransition:E,ignoreBlocker:U})}};if(_e)return{...D,ref:r,href:_e,...C&&{children:C},...w&&{target:w},...x&&{disabled:x},...T&&{style:T},...R&&{className:R},...M&&{onClick:M},...O&&{onBlur:O},...I&&{onFocus:I},...P&&{onMouseEnter:P},...k&&{onMouseLeave:k},...H&&{onTouchStart:H}};const to=gt=>{if(x||St!=="intent")return;if(!Gr){Wn();return}const mn=gt.currentTarget;if(mf.has(mn))return;const Ar=setTimeout(()=>{mf.delete(mn),Wn()},Gr);mf.set(mn,Ar)},xr=gt=>{x||St!=="intent"||Wn()},Gt=gt=>{if(x||!St||!Gr)return;const mn=gt.currentTarget,Ar=mf.get(mn);Ar&&(clearTimeout(Ar),mf.delete(mn))};return{...D,...Ee,...pt,href:ve?.href,ref:r,onClick:Vu([M,_r]),onBlur:Vu([O,Gt]),onFocus:Vu([I,to]),onMouseEnter:Vu([P,to]),onMouseLeave:Vu([k,Gt]),onTouchStart:Vu([H,xr]),disabled:!!x,target:w,...ze&&{style:ze},...Ce&&{className:Ce},...x&&OW,...Xe&&NW,...V&&Be&&MW}}var z1={},IW={className:"active"},OW={role:"link","aria-disabled":!0},NW={"data-status":"active","aria-current":"page"},MW={"data-transitioning":"transitioning"},mf=new WeakMap,PW={rootMargin:"100px"},Vu=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function kW(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function DW(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var E6=A.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:s,...o}=RW(r,e),a=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=o;return A.createElement("a",c,a)}return A.createElement(n,o,a)});function LW(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var UW=class extends l6{constructor(e){super(e),this.useMatch=n=>Zl({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>y6({...n,from:this.id}),this.useSearch=n=>v6({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>m6({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>g6({...n,from:this.id}),this.useLoaderData=n=>p6({...n,from:this.id}),this.useNavigate=()=>RA({from:this.fullPath}),this.Link=z.forwardRef((n,r)=>F.jsx(E6,{ref:r,from:this.fullPath,...n}))}};function FW(t){return new UW(t)}function zW(){return t=>jW(t)}var BW=class extends dW{constructor(t){super(t),this.useMatch=e=>Zl({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>y6({...e,from:this.id}),this.useSearch=e=>v6({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>m6({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>g6({...e,from:this.id}),this.useLoaderData=e=>p6({...e,from:this.id}),this.useNavigate=()=>RA({from:this.fullPath}),this.Link=z.forwardRef((e,n)=>F.jsx(E6,{ref:n,from:this.fullPath,...e}))}};function jW(t){return new BW(t)}function dr(t){return new HW(t,{silent:!0}).createRoute}var HW=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=FW(n);return r.isRoot=!1,r},this.silent=e?.silent}};function rr(t,e){let n,r,s,o;const a=()=>(n||(n=t().then(c=>{n=void 0,r=c[e??"default"]}).catch(c=>{if(s=c,hq(s)&&s instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${s.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),o=!0)}})),n),u=function(f){if(o)throw window.location.reload(),new Promise(()=>{});if(s)throw s;if(!r)if(MN)MN(a());else throw a();return A.createElement(r,f)};return u.preload=a,u}function $W(t){const e=us(),n=`not-found-${jr(e.stores.location,r=>r.pathname)}-${jr(e.stores.status,r=>r)}`;return F.jsx(xA,{getResetKey:()=>n,onCatch:(r,s)=>{if(cr(r))t.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(cr(r))return t.fallback?.(r);throw r},children:t.children})}function qW(){return F.jsx("p",{children:"Not Found"})}function uc(t){return F.jsx(F.Fragment,{children:t.children})}function C6(t,e,n){return e.options.notFoundComponent?F.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?F.jsx(t.options.defaultNotFoundComponent,{...n}):F.jsx(qW,{})}function WW(t){return null}function GW(){return WW(us()),null}var VW=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,KW=(t,e)=>t[0]===e[0]&&t[1]===e[1],w6=A.memo(function({matchId:e}){const n=us(),r=n.stores.matchStores.get(e);r||pi();const s=jr(n.stores.loadedAt,a=>a),o=jr(r,a=>a,VW);return F.jsx(YW,{router:n,matchId:e,resetKey:s,matchState:A.useMemo(()=>{const a=o.routeId,u=n.routesById[a].parentRoute?.id;return{routeId:a,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:u}},[o._displayPending,o.routeId,o.ssr,n.routesById])})});function YW({router:t,matchId:e,resetKey:n,matchState:r}){const s=t.routesById[r.routeId],o=s.options.pendingComponent??t.options.defaultPendingComponent,a=o?F.jsx(o,{}):null,u=s.options.errorComponent??t.options.defaultErrorComponent,c=s.options.onCatch??t.options.defaultOnCatch,f=s.isRoot?s.options.notFoundComponent??t.options.notFoundRoute?.options.component:s.options.notFoundComponent,p=r.ssr===!1||r.ssr==="data-only",g=(!s.isRoot||s.options.wrapInSuspense||p)&&(s.options.wrapInSuspense??o??(s.options.errorComponent?.preload||p))?A.Suspense:uc,m=u?xA:uc,y=f?$W:uc;return F.jsxs(s.isRoot?s.options.shellComponent??uc:uc,{children:[F.jsx(cy.Provider,{value:e,children:F.jsx(g,{fallback:a,children:F.jsx(m,{getResetKey:()=>n,errorComponent:u||AA,onCatch:(S,E)=>{if(cr(S))throw S.routeId??=r.routeId,S;c?.(S,E)},children:F.jsx(y,{fallback:S=>{if(S.routeId??=r.routeId,!f||S.routeId&&S.routeId!==r.routeId||!S.routeId&&!s.isRoot)throw S;return A.createElement(f,S)},children:p||r._displayPending?F.jsx(hW,{fallback:a,children:F.jsx(aM,{matchId:e})}):F.jsx(aM,{matchId:e})})})})}),r.parentRouteId===Il?F.jsxs(F.Fragment,{children:[F.jsx(ZW,{}),t.options.scrollRestoration&&G5?F.jsx(GW,{}):null]}):null]})}function ZW(){const t=us(),e=A.useRef();return mc(()=>{const n=t.stores.resolvedLocation.get(),r=e.current;n&&(!r||r.href!==n.href)&&t.emit({type:"onRendered",...xc(t.stores.location.get(),r??n)}),e.current=n},[jr(t.stores.resolvedLocation,n=>n?.state.__TSR_key),t]),null}var aM=A.memo(function({matchId:e}){const n=us(),r=(p,g)=>n.getMatch(p.id)?._nonReactive[g]??p._nonReactive[g],s=n.stores.matchStores.get(e);s||pi();const o=jr(s,p=>p),a=o.routeId,u=n.routesById[a],c=A.useMemo(()=>{const p=(n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:a,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return p?JSON.stringify(p):void 0},[a,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=A.useMemo(()=>{const p=u.options.component??n.options.defaultComponent;return p?F.jsx(p,{},c):F.jsx(_6,{})},[c,u.options.component,n.options.defaultComponent]);if(o._displayPending)throw r(o,"displayPendingPromise");if(o._forcePending)throw r(o,"minPendingPromise");if(o.status==="pending"){const p=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(p){const g=n.getMatch(o.id);if(g&&!g._nonReactive.minPendingPromise){const m=Oc();g._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),g._nonReactive.minPendingPromise=void 0},p)}}throw r(o,"loadPromise")}if(o.status==="notFound")return cr(o.error)||pi(),C6(n,u,o.error);if(o.status==="redirected")throw Lr(o.error)||pi(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),_6=A.memo(function(){const e=us(),n=A.useContext(cy);let r,s=!1,o;{const f=n?e.stores.matchStores.get(n):void 0;[r,s]=jr(f,p=>[p?.routeId,p?.globalNotFound??!1],KW),o=jr(e.stores.matchesId,p=>p[p.findIndex(g=>g===n)+1])}const a=r?e.routesById[r]:void 0,u=e.options.defaultPendingComponent?F.jsx(e.options.defaultPendingComponent,{}):null;if(s)return a||pi(),C6(e,a,void 0);if(!o)return null;const c=F.jsx(w6,{matchId:o});return r===Il?F.jsx(A.Suspense,{fallback:u,children:c}):c});function XW(){const t=us(),e=A.useRef({router:t,mounted:!1}),[n,r]=A.useState(!1),s=jr(t.stores.isLoading,g=>g),o=jr(t.stores.hasPending,g=>g),a=A1(s),u=s||n||o,c=A1(u),f=s||o,p=A1(f);return t.startTransition=g=>{r(!0),A.startTransition(()=>{g(),r(!1)})},A.useEffect(()=>{const g=t.history.subscribe(t.load),m=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ci(t.latestLocation.publicHref)!==ci(m.publicHref)&&t.commitLocation({...m,replace:!0}),()=>{g()}},[t,t.history]),mc(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(m){console.error(m)}})()},[t]),mc(()=>{a&&!s&&t.emit({type:"onLoad",...xc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,s]),mc(()=>{p&&!f&&t.emit({type:"onBeforeRouteMount",...xc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,p,t]),mc(()=>{if(c&&!u){const g=xc(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),f6(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function QW(){const t=us(),e=t.routesById[Il].options.pendingComponent??t.options.defaultPendingComponent,n=e?F.jsx(e,{}):null,r=F.jsxs(typeof document<"u"&&t.ssr?uc:A.Suspense,{fallback:n,children:[F.jsx(XW,{}),F.jsx(JW,{})]});return t.options.InnerWrap?F.jsx(t.options.InnerWrap,{children:r}):r}function JW(){const t=us(),e=jr(t.stores.firstId,s=>s),n=jr(t.stores.loadedAt,s=>s),r=e?F.jsx(w6,{matchId:e}):null;return F.jsx(cy.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:F.jsx(xA,{getResetKey:()=>n,errorComponent:AA,onCatch:void 0,children:r})})}var eG=t=>({createMutableStore:eM,createReadonlyStore:eM,batch:f6}),tG=t=>new nG(t),nG=class extends rW{constructor(e){super(e,eG)}};function rG({router:t,children:e,...n}){K5(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=F.jsx(c6.Provider,{value:t,children:e});return t.options.Wrap?F.jsx(t.options.Wrap,{children:r}):r}function sG({router:t,...e}){return F.jsx(rG,{router:t,...e,children:F.jsx(QW,{})})}var B1={exports:{}},vf={},j1={exports:{}},H1={};var lM;function oG(){return lM||(lM=1,(function(t){function e($,ee){var fe=$.length;$.push(ee);e:for(;0<fe;){var de=fe-1>>>1,Ae=$[de];if(0<s(Ae,ee))$[de]=ee,$[fe]=Ae,fe=de;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var ee=$[0],fe=$.pop();if(fe!==ee){$[0]=fe;e:for(var de=0,Ae=$.length,D=Ae>>>1;de<D;){var V=2*(de+1)-1,K=$[V],J=V+1,oe=$[J];if(0>s(K,fe))J<Ae&&0>s(oe,K)?($[de]=oe,$[J]=fe,de=J):($[de]=K,$[V]=fe,de=V);else if(J<Ae&&0>s(oe,fe))$[de]=oe,$[J]=fe,de=J;else break e}}return ee}function s($,ee){var fe=$.sortIndex-ee.sortIndex;return fe!==0?fe:$.id-ee.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();t.unstable_now=function(){return a.now()-u}}var c=[],f=[],p=1,g=null,m=3,y=!1,S=!1,E=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R($){for(var ee=n(f);ee!==null;){if(ee.callback===null)r(f);else if(ee.startTime<=$)r(f),ee.sortIndex=ee.expirationTime,e(c,ee);else break;ee=n(f)}}function M($){if(E=!1,R($),!S)if(n(c)!==null)S=!0,O||(O=!0,B());else{var ee=n(f);ee!==null&&ne(M,ee.startTime-$)}}var O=!1,I=-1,P=5,k=-1;function H(){return C?!0:!(t.unstable_now()-k<P)}function U(){if(C=!1,O){var $=t.unstable_now();k=$;var ee=!0;try{e:{S=!1,E&&(E=!1,x(I),I=-1),y=!0;var fe=m;try{t:{for(R($),g=n(c);g!==null&&!(g.expirationTime>$&&H());){var de=g.callback;if(typeof de=="function"){g.callback=null,m=g.priorityLevel;var Ae=de(g.expirationTime<=$);if($=t.unstable_now(),typeof Ae=="function"){g.callback=Ae,R($),ee=!0;break t}g===n(c)&&r(c),R($)}else r(c);g=n(c)}if(g!==null)ee=!0;else{var D=n(f);D!==null&&ne(M,D.startTime-$),ee=!1}}break e}finally{g=null,m=fe,y=!1}ee=void 0}}finally{ee?B():O=!1}}}var B;if(typeof T=="function")B=function(){T(U)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Y=W.port2;W.port1.onmessage=U,B=function(){Y.postMessage(null)}}else B=function(){w(U,0)};function ne($,ee){I=w(function(){$(t.unstable_now())},ee)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function($){$.callback=null},t.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function($){switch(m){case 1:case 2:case 3:var ee=3;break;default:ee=m}var fe=m;m=ee;try{return $()}finally{m=fe}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function($,ee){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var fe=m;m=$;try{return ee()}finally{m=fe}},t.unstable_scheduleCallback=function($,ee,fe){var de=t.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?de+fe:de):fe=de,$){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=fe+Ae,$={id:p++,callback:ee,priorityLevel:$,startTime:fe,expirationTime:Ae,sortIndex:-1},fe>de?($.sortIndex=fe,e(f,$),n(c)===null&&$===n(f)&&(E?(x(I),I=-1):E=!0,ne(M,fe-de))):($.sortIndex=Ae,e(c,$),S||y||(S=!0,O||(O=!0,B()))),$},t.unstable_shouldYield=H,t.unstable_wrapCallback=function($){var ee=m;return function(){var fe=m;m=ee;try{return $.apply(this,arguments)}finally{m=fe}}}})(H1)),H1}var uM;function iG(){return uM||(uM=1,j1.exports=oG()),j1.exports}var cM;function aG(){if(cM)return vf;cM=1;var t=iG(),e=qh(),n=b6();function r(i){var l="https://react.dev/errors/"+i;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+i+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var l=i,d=i;if(i.alternate)for(;l.return;)l=l.return;else{i=l;do l=i,(l.flags&4098)!==0&&(d=l.return),i=l.return;while(i)}return l.tag===3?d:null}function a(i){if(i.tag===13){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function u(i){if(i.tag===31){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function c(i){if(o(i)!==i)throw Error(r(188))}function f(i){var l=i.alternate;if(!l){if(l=o(i),l===null)throw Error(r(188));return l!==i?null:i}for(var d=i,h=l;;){var v=d.return;if(v===null)break;var b=v.alternate;if(b===null){if(h=v.return,h!==null){d=h;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===d)return c(v),i;if(b===h)return c(v),l;b=b.sibling}throw Error(r(188))}if(d.return!==h.return)d=v,h=b;else{for(var _=!1,N=v.child;N;){if(N===d){_=!0,d=v,h=b;break}if(N===h){_=!0,h=v,d=b;break}N=N.sibling}if(!_){for(N=b.child;N;){if(N===d){_=!0,d=b,h=v;break}if(N===h){_=!0,h=b,d=v;break}N=N.sibling}if(!_)throw Error(r(189))}}if(d.alternate!==h)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:l}function p(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=p(i),l!==null)return l;i=i.sibling}return null}var g=Object.assign,m=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function B(i){return i===null||typeof i!="object"?null:(i=U&&i[U]||i["@@iterator"],typeof i=="function"?i:null)}var W=Symbol.for("react.client.reference");function Y(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===W?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case E:return"Fragment";case w:return"Profiler";case C:return"StrictMode";case M:return"Suspense";case O:return"SuspenseList";case k:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case T:return i.displayName||"Context";case x:return(i._context.displayName||"Context")+".Consumer";case R:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case I:return l=i.displayName||null,l!==null?l:Y(i.type)||"Memo";case P:l=i._payload,i=i._init;try{return Y(i(l))}catch{}}return null}var ne=Array.isArray,$=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},de=[],Ae=-1;function D(i){return{current:i}}function V(i){0>Ae||(i.current=de[Ae],de[Ae]=null,Ae--)}function K(i,l){Ae++,de[Ae]=i.current,i.current=l}var J=D(null),oe=D(null),he=D(null),ue=D(null);function ve(i,l){switch(K(he,l),K(oe,i),K(J,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?j2(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=j2(l),i=H2(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(J),K(J,i)}function _e(){V(J),V(oe),V(he)}function Xe(i){i.memoizedState!==null&&K(ue,i);var l=J.current,d=H2(l,i.type);l!==d&&(K(oe,i),K(J,d))}function Ee(i){oe.current===i&&(V(J),V(oe)),ue.current===i&&(V(ue),uf._currentValue=fe)}var pt,Ce;function ze(i){if(pt===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);pt=l&&l[1]||"",Ce=-1<d.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+pt+i+Ce}var Be=!1;function He(i,l){if(!i||Be)return"";Be=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(l){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(re){var te=re}Reflect.construct(i,[],ae)}else{try{ae.call()}catch(re){te=re}i.call(ae.prototype)}}else{try{throw Error()}catch(re){te=re}(ae=i())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(re){if(re&&te&&typeof re.stack=="string")return[re.stack,te.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=h.DetermineComponentFrameRoot(),_=b[0],N=b[1];if(_&&N){var j=_.split(`
5
- `),Q=N.split(`
6
- `);for(v=h=0;h<j.length&&!j[h].includes("DetermineComponentFrameRoot");)h++;for(;v<Q.length&&!Q[v].includes("DetermineComponentFrameRoot");)v++;if(h===j.length||v===Q.length)for(h=j.length-1,v=Q.length-1;1<=h&&0<=v&&j[h]!==Q[v];)v--;for(;1<=h&&0<=v;h--,v--)if(j[h]!==Q[v]){if(h!==1||v!==1)do if(h--,v--,0>v||j[h]!==Q[v]){var se=`
7
- `+j[h].replace(" at new "," at ");return i.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",i.displayName)),se}while(1<=h&&0<=v);break}}}finally{Be=!1,Error.prepareStackTrace=d}return(d=i?i.displayName||i.name:"")?ze(d):""}function pr(i,l){switch(i.tag){case 26:case 27:case 5:return ze(i.type);case 16:return ze("Lazy");case 13:return i.child!==l&&l!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return He(i.type,!1);case 11:return He(i.type.render,!1);case 1:return He(i.type,!0);case 31:return ze("Activity");default:return""}}function St(i){try{var l="",d=null;do l+=pr(i,d),d=i,i=i.return;while(i);return l}catch(h){return`
8
- Error generating stack: `+h.message+`
9
- `+h.stack}}var Gr=Object.prototype.hasOwnProperty,Wn=t.unstable_scheduleCallback,_r=t.unstable_cancelCallback,to=t.unstable_shouldYield,xr=t.unstable_requestPaint,Gt=t.unstable_now,gt=t.unstable_getCurrentPriorityLevel,mn=t.unstable_ImmediatePriority,Ar=t.unstable_UserBlockingPriority,no=t.unstable_NormalPriority,fd=t.unstable_LowPriority,ko=t.unstable_IdlePriority,uu=t.log,cu=t.unstable_setDisableYieldValue,Mi=null,ir=null;function Ps(i){if(typeof uu=="function"&&cu(i),ir&&typeof ir.setStrictMode=="function")try{ir.setStrictMode(Mi,i)}catch{}}var Gn=Math.clz32?Math.clz32:hs,hd=Math.log,Pi=Math.LN2;function hs(i){return i>>>=0,i===0?32:31-(hd(i)/Pi|0)|0}var ki=256,Va=262144,Ka=4194304;function ks(i){var l=i&42;if(l!==0)return l;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Ya(i,l,d){var h=i.pendingLanes;if(h===0)return 0;var v=0,b=i.suspendedLanes,_=i.pingedLanes;i=i.warmLanes;var N=h&134217727;return N!==0?(h=N&~b,h!==0?v=ks(h):(_&=N,_!==0?v=ks(_):d||(d=N&~i,d!==0&&(v=ks(d))))):(N=h&~b,N!==0?v=ks(N):_!==0?v=ks(_):d||(d=h&~i,d!==0&&(v=ks(d)))),v===0?0:l!==0&&l!==v&&(l&b)===0&&(b=v&-v,d=l&-l,b>=d||b===32&&(d&4194048)!==0)?l:v}function ro(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function du(i,l){switch(i){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vr(){var i=Ka;return Ka<<=1,(Ka&62914560)===0&&(Ka=4194304),i}function so(i){for(var l=[],d=0;31>d;d++)l.push(i);return l}function Do(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function pd(i,l,d,h,v,b){var _=i.pendingLanes;i.pendingLanes=d,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=d,i.entangledLanes&=d,i.errorRecoveryDisabledLanes&=d,i.shellSuspendCounter=0;var N=i.entanglements,j=i.expirationTimes,Q=i.hiddenUpdates;for(d=_&~d;0<d;){var se=31-Gn(d),ae=1<<se;N[se]=0,j[se]=-1;var te=Q[se];if(te!==null)for(Q[se]=null,se=0;se<te.length;se++){var re=te[se];re!==null&&(re.lane&=-536870913)}d&=~ae}h!==0&&fp(i,h,0),b!==0&&v===0&&i.tag!==0&&(i.suspendedLanes|=b&~(_&~l))}function fp(i,l,d){i.pendingLanes|=l,i.suspendedLanes&=~l;var h=31-Gn(l);i.entangledLanes|=l,i.entanglements[h]=i.entanglements[h]|1073741824|d&261930}function gd(i,l){var d=i.entangledLanes|=l;for(i=i.entanglements;d;){var h=31-Gn(d),v=1<<h;v&l|i[h]&l&&(i[h]|=l),d&=~v}}function fu(i,l){var d=l&-l;return d=(d&42)!==0?1:hu(d),(d&(i.suspendedLanes|l))!==0?0:d}function hu(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Za(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function hp(){var i=ee.p;return i!==0?i:(i=window.event,i===void 0?32:dN(i.type))}function Di(i,l){var d=ee.p;try{return ee.p=i,l()}finally{ee.p=d}}var oo=Math.random().toString(36).slice(2),Rn="__reactFiber$"+oo,nt="__reactProps$"+oo,Kr="__reactContainer$"+oo,md="__reactEvents$"+oo,pp="__reactListeners$"+oo,vd="__reactHandles$"+oo,yd="__reactResources$"+oo,Li="__reactMarker$"+oo;function bd(i){delete i[Rn],delete i[nt],delete i[md],delete i[pp],delete i[vd]}function Ui(i){var l=i[Rn];if(l)return l;for(var d=i.parentNode;d;){if(l=d[Kr]||d[Rn]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(i=Y2(i);i!==null;){if(d=i[Rn])return d;i=Y2(i)}return l}i=d,d=i.parentNode}return null}function Fi(i){if(i=i[Rn]||i[Kr]){var l=i.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return i}return null}function Xa(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i.stateNode;throw Error(r(33))}function gr(i){var l=i[yd];return l||(l=i[yd]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function an(i){i[Li]=!0}var io=new Set,gp={};function Ds(i,l){zi(i,l),zi(i+"Capture",l)}function zi(i,l){for(gp[i]=l,i=0;i<l.length;i++)io.add(l[i])}var mp=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Sd={},Qa={};function Ed(i){return Gr.call(Qa,i)?!0:Gr.call(Sd,i)?!1:mp.test(i)?Qa[i]=!0:(Sd[i]=!0,!1)}function Lo(i,l,d){if(Ed(l))if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":i.removeAttribute(l);return;case"boolean":var h=l.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(l);return}}i.setAttribute(l,""+d)}}function Ls(i,l,d){if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttribute(l,""+d)}}function mr(i,l,d,h){if(h===null)i.removeAttribute(d);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(d);return}i.setAttributeNS(l,d,""+h)}}function ln(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function vp(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Cb(i,l,d){var h=Object.getOwnPropertyDescriptor(i.constructor.prototype,l);if(!i.hasOwnProperty(l)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var v=h.get,b=h.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return v.call(this)},set:function(_){d=""+_,b.call(this,_)}}),Object.defineProperty(i,l,{enumerable:h.enumerable}),{getValue:function(){return d},setValue:function(_){d=""+_},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function pu(i){if(!i._valueTracker){var l=vp(i)?"checked":"value";i._valueTracker=Cb(i,l,""+i[l])}}function Cd(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var d=l.getValue(),h="";return i&&(h=vp(i)?i.checked?"true":"false":i.value),i=h,i!==d?(l.setValue(i),!0):!1}function gu(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var yp=/[\n"\\]/g;function Tr(i){return i.replace(yp,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function wd(i,l,d,h,v,b,_,N){i.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?i.type=_:i.removeAttribute("type"),l!=null?_==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+ln(l)):i.value!==""+ln(l)&&(i.value=""+ln(l)):_!=="submit"&&_!=="reset"||i.removeAttribute("value"),l!=null?Bi(i,_,ln(l)):d!=null?Bi(i,_,ln(d)):h!=null&&i.removeAttribute("value"),v==null&&b!=null&&(i.defaultChecked=!!b),v!=null&&(i.checked=v&&typeof v!="function"&&typeof v!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.name=""+ln(N):i.removeAttribute("name")}function _d(i,l,d,h,v,b,_,N){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.type=b),l!=null||d!=null){if(!(b!=="submit"&&b!=="reset"||l!=null)){pu(i);return}d=d!=null?""+ln(d):"",l=l!=null?""+ln(l):d,N||l===i.value||(i.value=l),i.defaultValue=l}h=h??v,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=N?i.checked:!!h,i.defaultChecked=!!h,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.name=_),pu(i)}function Bi(i,l,d){l==="number"&&gu(i.ownerDocument)===i||i.defaultValue===""+d||(i.defaultValue=""+d)}function ao(i,l,d,h){if(i=i.options,l){l={};for(var v=0;v<d.length;v++)l["$"+d[v]]=!0;for(d=0;d<i.length;d++)v=l.hasOwnProperty("$"+i[d].value),i[d].selected!==v&&(i[d].selected=v),v&&h&&(i[d].defaultSelected=!0)}else{for(d=""+ln(d),l=null,v=0;v<i.length;v++){if(i[v].value===d){i[v].selected=!0,h&&(i[v].defaultSelected=!0);return}l!==null||i[v].disabled||(l=i[v])}l!==null&&(l.selected=!0)}}function pe(i,l,d){if(l!=null&&(l=""+ln(l),l!==i.value&&(i.value=l),d==null)){i.defaultValue!==l&&(i.defaultValue=l);return}i.defaultValue=d!=null?""+ln(d):""}function L(i,l,d,h){if(l==null){if(h!=null){if(d!=null)throw Error(r(92));if(ne(h)){if(1<h.length)throw Error(r(93));h=h[0]}d=h}d==null&&(d=""),l=d}d=ln(l),i.defaultValue=d,h=i.textContent,h===d&&h!==""&&h!==null&&(i.value=h),pu(i)}function Z(i,l){if(l){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=l;return}}i.textContent=l}var ce=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Te(i,l,d){var h=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?h?i.setProperty(l,""):l==="float"?i.cssFloat="":i[l]="":h?i.setProperty(l,d):typeof d!="number"||d===0||ce.has(l)?l==="float"?i.cssFloat=d:i[l]=(""+d).trim():i[l]=d+"px"}function ke(i,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(i=i.style,d!=null){for(var h in d)!d.hasOwnProperty(h)||l!=null&&l.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var v in l)h=l[v],l.hasOwnProperty(v)&&d[v]!==h&&Te(i,v,h)}else for(var b in l)l.hasOwnProperty(b)&&Te(i,b,l[b])}function Ue(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var en=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Dn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ar(i){return Dn.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function tn(){}var vr=null;function In(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var mu=null,vu=null;function BR(i){var l=Fi(i);if(l&&(i=l.stateNode)){var d=i[nt]||null;e:switch(i=l.stateNode,l.type){case"input":if(wd(i,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=i;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Tr(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var h=d[l];if(h!==i&&h.form===i.form){var v=h[nt]||null;if(!v)throw Error(r(90));wd(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(l=0;l<d.length;l++)h=d[l],h.form===i.form&&Cd(h)}break e;case"textarea":pe(i,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&ao(i,!!d.multiple,l,!1)}}}var wb=!1;function jR(i,l,d){if(wb)return i(l,d);wb=!0;try{var h=i(l);return h}finally{if(wb=!1,(mu!==null||vu!==null)&&(og(),mu&&(l=mu,i=vu,vu=mu=null,BR(l),i)))for(l=0;l<i.length;l++)BR(i[l])}}function xd(i,l){var d=i.stateNode;if(d===null)return null;var h=d[nt]||null;if(h===null)return null;d=h[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Uo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_b=!1;if(Uo)try{var Ad={};Object.defineProperty(Ad,"passive",{get:function(){_b=!0}}),window.addEventListener("test",Ad,Ad),window.removeEventListener("test",Ad,Ad)}catch{_b=!1}var ji=null,xb=null,bp=null;function HR(){if(bp)return bp;var i,l=xb,d=l.length,h,v="value"in ji?ji.value:ji.textContent,b=v.length;for(i=0;i<d&&l[i]===v[i];i++);var _=d-i;for(h=1;h<=_&&l[d-h]===v[b-h];h++);return bp=v.slice(i,1<h?1-h:void 0)}function Sp(i){var l=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&l===13&&(i=13)):i=l,i===10&&(i=13),32<=i||i===13?i:0}function Ep(){return!0}function $R(){return!1}function Rr(i){function l(d,h,v,b,_){this._reactName=d,this._targetInst=v,this.type=h,this.nativeEvent=b,this.target=_,this.currentTarget=null;for(var N in i)i.hasOwnProperty(N)&&(d=i[N],this[N]=d?d(b):b[N]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Ep:$R,this.isPropagationStopped=$R,this}return g(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Ep)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Ep)},persist:function(){},isPersistent:Ep}),l}var Ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cp=Rr(Ja),Td=g({},Ja,{view:0,detail:0}),Sj=Rr(Td),Ab,Tb,Rd,wp=g({},Td,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ib,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Rd&&(Rd&&i.type==="mousemove"?(Ab=i.screenX-Rd.screenX,Tb=i.screenY-Rd.screenY):Tb=Ab=0,Rd=i),Ab)},movementY:function(i){return"movementY"in i?i.movementY:Tb}}),qR=Rr(wp),Ej=g({},wp,{dataTransfer:0}),Cj=Rr(Ej),wj=g({},Td,{relatedTarget:0}),Rb=Rr(wj),_j=g({},Ja,{animationName:0,elapsedTime:0,pseudoElement:0}),xj=Rr(_j),Aj=g({},Ja,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Tj=Rr(Aj),Rj=g({},Ja,{data:0}),WR=Rr(Rj),Ij={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Oj={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Nj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mj(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=Nj[i])?!!l[i]:!1}function Ib(){return Mj}var Pj=g({},Td,{key:function(i){if(i.key){var l=Ij[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=Sp(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?Oj[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ib,charCode:function(i){return i.type==="keypress"?Sp(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Sp(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),kj=Rr(Pj),Dj=g({},wp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),GR=Rr(Dj),Lj=g({},Td,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ib}),Uj=Rr(Lj),Fj=g({},Ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),zj=Rr(Fj),Bj=g({},wp,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),jj=Rr(Bj),Hj=g({},Ja,{newState:0,oldState:0}),$j=Rr(Hj),qj=[9,13,27,32],Ob=Uo&&"CompositionEvent"in window,Id=null;Uo&&"documentMode"in document&&(Id=document.documentMode);var Wj=Uo&&"TextEvent"in window&&!Id,VR=Uo&&(!Ob||Id&&8<Id&&11>=Id),KR=" ",YR=!1;function ZR(i,l){switch(i){case"keyup":return qj.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function XR(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var yu=!1;function Gj(i,l){switch(i){case"compositionend":return XR(l);case"keypress":return l.which!==32?null:(YR=!0,KR);case"textInput":return i=l.data,i===KR&&YR?null:i;default:return null}}function Vj(i,l){if(yu)return i==="compositionend"||!Ob&&ZR(i,l)?(i=HR(),bp=xb=ji=null,yu=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return VR&&l.locale!=="ko"?null:l.data;default:return null}}var Kj={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function QR(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!Kj[i.type]:l==="textarea"}function JR(i,l,d,h){mu?vu?vu.push(h):vu=[h]:mu=h,l=fg(l,"onChange"),0<l.length&&(d=new Cp("onChange","change",null,d,h),i.push({event:d,listeners:l}))}var Od=null,Nd=null;function Yj(i){D2(i,0)}function _p(i){var l=Xa(i);if(Cd(l))return i}function eI(i,l){if(i==="change")return l}var tI=!1;if(Uo){var Nb;if(Uo){var Mb="oninput"in document;if(!Mb){var nI=document.createElement("div");nI.setAttribute("oninput","return;"),Mb=typeof nI.oninput=="function"}Nb=Mb}else Nb=!1;tI=Nb&&(!document.documentMode||9<document.documentMode)}function rI(){Od&&(Od.detachEvent("onpropertychange",sI),Nd=Od=null)}function sI(i){if(i.propertyName==="value"&&_p(Nd)){var l=[];JR(l,Nd,i,In(i)),jR(Yj,l)}}function Zj(i,l,d){i==="focusin"?(rI(),Od=l,Nd=d,Od.attachEvent("onpropertychange",sI)):i==="focusout"&&rI()}function Xj(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return _p(Nd)}function Qj(i,l){if(i==="click")return _p(l)}function Jj(i,l){if(i==="input"||i==="change")return _p(l)}function eH(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var Yr=typeof Object.is=="function"?Object.is:eH;function Md(i,l){if(Yr(i,l))return!0;if(typeof i!="object"||i===null||typeof l!="object"||l===null)return!1;var d=Object.keys(i),h=Object.keys(l);if(d.length!==h.length)return!1;for(h=0;h<d.length;h++){var v=d[h];if(!Gr.call(l,v)||!Yr(i[v],l[v]))return!1}return!0}function oI(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function iI(i,l){var d=oI(i);i=0;for(var h;d;){if(d.nodeType===3){if(h=i+d.textContent.length,i<=l&&h>=l)return{node:d,offset:l-i};i=h}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=oI(d)}}function aI(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?aI(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function lI(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=gu(i.document);l instanceof i.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)i=l.contentWindow;else break;l=gu(i.document)}return l}function Pb(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}var tH=Uo&&"documentMode"in document&&11>=document.documentMode,bu=null,kb=null,Pd=null,Db=!1;function uI(i,l,d){var h=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Db||bu==null||bu!==gu(h)||(h=bu,"selectionStart"in h&&Pb(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Pd&&Md(Pd,h)||(Pd=h,h=fg(kb,"onSelect"),0<h.length&&(l=new Cp("onSelect","select",null,l,d),i.push({event:l,listeners:h}),l.target=bu)))}function el(i,l){var d={};return d[i.toLowerCase()]=l.toLowerCase(),d["Webkit"+i]="webkit"+l,d["Moz"+i]="moz"+l,d}var Su={animationend:el("Animation","AnimationEnd"),animationiteration:el("Animation","AnimationIteration"),animationstart:el("Animation","AnimationStart"),transitionrun:el("Transition","TransitionRun"),transitionstart:el("Transition","TransitionStart"),transitioncancel:el("Transition","TransitionCancel"),transitionend:el("Transition","TransitionEnd")},Lb={},cI={};Uo&&(cI=document.createElement("div").style,"AnimationEvent"in window||(delete Su.animationend.animation,delete Su.animationiteration.animation,delete Su.animationstart.animation),"TransitionEvent"in window||delete Su.transitionend.transition);function tl(i){if(Lb[i])return Lb[i];if(!Su[i])return i;var l=Su[i],d;for(d in l)if(l.hasOwnProperty(d)&&d in cI)return Lb[i]=l[d];return i}var dI=tl("animationend"),fI=tl("animationiteration"),hI=tl("animationstart"),nH=tl("transitionrun"),rH=tl("transitionstart"),sH=tl("transitioncancel"),pI=tl("transitionend"),gI=new Map,Ub="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ub.push("scrollEnd");function Us(i,l){gI.set(i,l),Ds(l,[i])}var xp=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},ps=[],Eu=0,Fb=0;function Ap(){for(var i=Eu,l=Fb=Eu=0;l<i;){var d=ps[l];ps[l++]=null;var h=ps[l];ps[l++]=null;var v=ps[l];ps[l++]=null;var b=ps[l];if(ps[l++]=null,h!==null&&v!==null){var _=h.pending;_===null?v.next=v:(v.next=_.next,_.next=v),h.pending=v}b!==0&&mI(d,v,b)}}function Tp(i,l,d,h){ps[Eu++]=i,ps[Eu++]=l,ps[Eu++]=d,ps[Eu++]=h,Fb|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function zb(i,l,d,h){return Tp(i,l,d,h),Rp(i)}function nl(i,l){return Tp(i,null,null,l),Rp(i)}function mI(i,l,d){i.lanes|=d;var h=i.alternate;h!==null&&(h.lanes|=d);for(var v=!1,b=i.return;b!==null;)b.childLanes|=d,h=b.alternate,h!==null&&(h.childLanes|=d),b.tag===22&&(i=b.stateNode,i===null||i._visibility&1||(v=!0)),i=b,b=b.return;return i.tag===3?(b=i.stateNode,v&&l!==null&&(v=31-Gn(d),i=b.hiddenUpdates,h=i[v],h===null?i[v]=[l]:h.push(l),l.lane=d|536870912),b):null}function Rp(i){if(50<tf)throw tf=0,K0=null,Error(r(185));for(var l=i.return;l!==null;)i=l,l=i.return;return i.tag===3?i.stateNode:null}var Cu={};function oH(i,l,d,h){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zr(i,l,d,h){return new oH(i,l,d,h)}function Bb(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Fo(i,l){var d=i.alternate;return d===null?(d=Zr(i.tag,l,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=l,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&65011712,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,l=i.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d.refCleanup=i.refCleanup,d}function vI(i,l){i.flags&=65011714;var d=i.alternate;return d===null?(i.childLanes=0,i.lanes=l,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=d.childLanes,i.lanes=d.lanes,i.child=d.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=d.memoizedProps,i.memoizedState=d.memoizedState,i.updateQueue=d.updateQueue,i.type=d.type,l=d.dependencies,i.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),i}function Ip(i,l,d,h,v,b){var _=0;if(h=i,typeof i=="function")Bb(i)&&(_=1);else if(typeof i=="string")_=c$(i,d,J.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case k:return i=Zr(31,d,l,v),i.elementType=k,i.lanes=b,i;case E:return rl(d.children,v,b,l);case C:_=8,v|=24;break;case w:return i=Zr(12,d,l,v|2),i.elementType=w,i.lanes=b,i;case M:return i=Zr(13,d,l,v),i.elementType=M,i.lanes=b,i;case O:return i=Zr(19,d,l,v),i.elementType=O,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:_=10;break e;case x:_=9;break e;case R:_=11;break e;case I:_=14;break e;case P:_=16,h=null;break e}_=29,d=Error(r(130,i===null?"null":typeof i,"")),h=null}return l=Zr(_,d,l,v),l.elementType=i,l.type=h,l.lanes=b,l}function rl(i,l,d,h){return i=Zr(7,i,h,l),i.lanes=d,i}function jb(i,l,d){return i=Zr(6,i,null,l),i.lanes=d,i}function yI(i){var l=Zr(18,null,null,0);return l.stateNode=i,l}function Hb(i,l,d){return l=Zr(4,i.children!==null?i.children:[],i.key,l),l.lanes=d,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}var bI=new WeakMap;function gs(i,l){if(typeof i=="object"&&i!==null){var d=bI.get(i);return d!==void 0?d:(l={value:i,source:l,stack:St(l)},bI.set(i,l),l)}return{value:i,source:l,stack:St(l)}}var wu=[],_u=0,Op=null,kd=0,ms=[],vs=0,Hi=null,lo=1,uo="";function zo(i,l){wu[_u++]=kd,wu[_u++]=Op,Op=i,kd=l}function SI(i,l,d){ms[vs++]=lo,ms[vs++]=uo,ms[vs++]=Hi,Hi=i;var h=lo;i=uo;var v=32-Gn(h)-1;h&=~(1<<v),d+=1;var b=32-Gn(l)+v;if(30<b){var _=v-v%5;b=(h&(1<<_)-1).toString(32),h>>=_,v-=_,lo=1<<32-Gn(l)+v|d<<v|h,uo=b+i}else lo=1<<b|d<<v|h,uo=i}function $b(i){i.return!==null&&(zo(i,1),SI(i,1,0))}function qb(i){for(;i===Op;)Op=wu[--_u],wu[_u]=null,kd=wu[--_u],wu[_u]=null;for(;i===Hi;)Hi=ms[--vs],ms[vs]=null,uo=ms[--vs],ms[vs]=null,lo=ms[--vs],ms[vs]=null}function EI(i,l){ms[vs++]=lo,ms[vs++]=uo,ms[vs++]=Hi,lo=l.id,uo=l.overflow,Hi=i}var Vn=null,Vt=null,dt=!1,$i=null,ys=!1,Wb=Error(r(519));function qi(i){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Dd(gs(l,i)),Wb}function CI(i){var l=i.stateNode,d=i.type,h=i.memoizedProps;switch(l[Rn]=i,l[nt]=h,d){case"dialog":at("cancel",l),at("close",l);break;case"iframe":case"object":case"embed":at("load",l);break;case"video":case"audio":for(d=0;d<rf.length;d++)at(rf[d],l);break;case"source":at("error",l);break;case"img":case"image":case"link":at("error",l),at("load",l);break;case"details":at("toggle",l);break;case"input":at("invalid",l),_d(l,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":at("invalid",l);break;case"textarea":at("invalid",l),L(l,h.value,h.defaultValue,h.children)}d=h.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||h.suppressHydrationWarning===!0||z2(l.textContent,d)?(h.popover!=null&&(at("beforetoggle",l),at("toggle",l)),h.onScroll!=null&&at("scroll",l),h.onScrollEnd!=null&&at("scrollend",l),h.onClick!=null&&(l.onclick=tn),l=!0):l=!1,l||qi(i,!0)}function wI(i){for(Vn=i.return;Vn;)switch(Vn.tag){case 5:case 31:case 13:ys=!1;return;case 27:case 3:ys=!0;return;default:Vn=Vn.return}}function xu(i){if(i!==Vn)return!1;if(!dt)return wI(i),dt=!0,!1;var l=i.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=i.type,d=!(d!=="form"&&d!=="button")||u1(i.type,i.memoizedProps)),d=!d),d&&Vt&&qi(i),wI(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Vt=K2(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Vt=K2(i)}else l===27?(l=Vt,sa(i.type)?(i=p1,p1=null,Vt=i):Vt=l):Vt=Vn?Ss(i.stateNode.nextSibling):null;return!0}function sl(){Vt=Vn=null,dt=!1}function Gb(){var i=$i;return i!==null&&(Mr===null?Mr=i:Mr.push.apply(Mr,i),$i=null),i}function Dd(i){$i===null?$i=[i]:$i.push(i)}var Vb=D(null),ol=null,Bo=null;function Wi(i,l,d){K(Vb,l._currentValue),l._currentValue=d}function jo(i){i._currentValue=Vb.current,V(Vb)}function Kb(i,l,d){for(;i!==null;){var h=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,h!==null&&(h.childLanes|=l)):h!==null&&(h.childLanes&l)!==l&&(h.childLanes|=l),i===d)break;i=i.return}}function Yb(i,l,d,h){var v=i.child;for(v!==null&&(v.return=i);v!==null;){var b=v.dependencies;if(b!==null){var _=v.child;b=b.firstContext;e:for(;b!==null;){var N=b;b=v;for(var j=0;j<l.length;j++)if(N.context===l[j]){b.lanes|=d,N=b.alternate,N!==null&&(N.lanes|=d),Kb(b.return,d,i),h||(_=null);break e}b=N.next}}else if(v.tag===18){if(_=v.return,_===null)throw Error(r(341));_.lanes|=d,b=_.alternate,b!==null&&(b.lanes|=d),Kb(_,d,i),_=null}else _=v.child;if(_!==null)_.return=v;else for(_=v;_!==null;){if(_===i){_=null;break}if(v=_.sibling,v!==null){v.return=_.return,_=v;break}_=_.return}v=_}}function Au(i,l,d,h){i=null;for(var v=l,b=!1;v!==null;){if(!b){if((v.flags&524288)!==0)b=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var _=v.alternate;if(_===null)throw Error(r(387));if(_=_.memoizedProps,_!==null){var N=v.type;Yr(v.pendingProps.value,_.value)||(i!==null?i.push(N):i=[N])}}else if(v===ue.current){if(_=v.alternate,_===null)throw Error(r(387));_.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(i!==null?i.push(uf):i=[uf])}v=v.return}i!==null&&Yb(l,i,d,h),l.flags|=262144}function Np(i){for(i=i.firstContext;i!==null;){if(!Yr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function il(i){ol=i,Bo=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Kn(i){return _I(ol,i)}function Mp(i,l){return ol===null&&il(i),_I(i,l)}function _I(i,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},Bo===null){if(i===null)throw Error(r(308));Bo=l,i.dependencies={lanes:0,firstContext:l},i.flags|=524288}else Bo=Bo.next=l;return d}var iH=typeof AbortController<"u"?AbortController:function(){var i=[],l=this.signal={aborted:!1,addEventListener:function(d,h){i.push(h)}};this.abort=function(){l.aborted=!0,i.forEach(function(d){return d()})}},aH=t.unstable_scheduleCallback,lH=t.unstable_NormalPriority,bn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zb(){return{controller:new iH,data:new Map,refCount:0}}function Ld(i){i.refCount--,i.refCount===0&&aH(lH,function(){i.controller.abort()})}var Ud=null,Xb=0,Tu=0,Ru=null;function uH(i,l){if(Ud===null){var d=Ud=[];Xb=0,Tu=e1(),Ru={status:"pending",value:void 0,then:function(h){d.push(h)}}}return Xb++,l.then(xI,xI),l}function xI(){if(--Xb===0&&Ud!==null){Ru!==null&&(Ru.status="fulfilled");var i=Ud;Ud=null,Tu=0,Ru=null;for(var l=0;l<i.length;l++)(0,i[l])()}}function cH(i,l){var d=[],h={status:"pending",value:null,reason:null,then:function(v){d.push(v)}};return i.then(function(){h.status="fulfilled",h.value=l;for(var v=0;v<d.length;v++)(0,d[v])(l)},function(v){for(h.status="rejected",h.reason=v,v=0;v<d.length;v++)(0,d[v])(void 0)}),h}var AI=$.S;$.S=function(i,l){u2=Gt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&uH(i,l),AI!==null&&AI(i,l)};var al=D(null);function Qb(){var i=al.current;return i!==null?i:qt.pooledCache}function Pp(i,l){l===null?K(al,al.current):K(al,l.pool)}function TI(){var i=Qb();return i===null?null:{parent:bn._currentValue,pool:i}}var Iu=Error(r(460)),Jb=Error(r(474)),kp=Error(r(542)),Dp={then:function(){}};function RI(i){return i=i.status,i==="fulfilled"||i==="rejected"}function II(i,l,d){switch(d=i[d],d===void 0?i.push(l):d!==l&&(l.then(tn,tn),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,NI(i),i;default:if(typeof l.status=="string")l.then(tn,tn);else{if(i=qt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=l,i.status="pending",i.then(function(h){if(l.status==="pending"){var v=l;v.status="fulfilled",v.value=h}},function(h){if(l.status==="pending"){var v=l;v.status="rejected",v.reason=h}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,NI(i),i}throw ul=l,Iu}}function ll(i){try{var l=i._init;return l(i._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(ul=d,Iu):d}}var ul=null;function OI(){if(ul===null)throw Error(r(459));var i=ul;return ul=null,i}function NI(i){if(i===Iu||i===kp)throw Error(r(483))}var Ou=null,Fd=0;function Lp(i){var l=Fd;return Fd+=1,Ou===null&&(Ou=[]),II(Ou,i,l)}function zd(i,l){l=l.props.ref,i.ref=l!==void 0?l:null}function Up(i,l){throw l.$$typeof===m?Error(r(525)):(i=Object.prototype.toString.call(l),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":i)))}function MI(i){function l(G,q){if(i){var X=G.deletions;X===null?(G.deletions=[q],G.flags|=16):X.push(q)}}function d(G,q){if(!i)return null;for(;q!==null;)l(G,q),q=q.sibling;return null}function h(G){for(var q=new Map;G!==null;)G.key!==null?q.set(G.key,G):q.set(G.index,G),G=G.sibling;return q}function v(G,q){return G=Fo(G,q),G.index=0,G.sibling=null,G}function b(G,q,X){return G.index=X,i?(X=G.alternate,X!==null?(X=X.index,X<q?(G.flags|=67108866,q):X):(G.flags|=67108866,q)):(G.flags|=1048576,q)}function _(G){return i&&G.alternate===null&&(G.flags|=67108866),G}function N(G,q,X,ie){return q===null||q.tag!==6?(q=jb(X,G.mode,ie),q.return=G,q):(q=v(q,X),q.return=G,q)}function j(G,q,X,ie){var Pe=X.type;return Pe===E?se(G,q,X.props.children,ie,X.key):q!==null&&(q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===P&&ll(Pe)===q.type)?(q=v(q,X.props),zd(q,X),q.return=G,q):(q=Ip(X.type,X.key,X.props,null,G.mode,ie),zd(q,X),q.return=G,q)}function Q(G,q,X,ie){return q===null||q.tag!==4||q.stateNode.containerInfo!==X.containerInfo||q.stateNode.implementation!==X.implementation?(q=Hb(X,G.mode,ie),q.return=G,q):(q=v(q,X.children||[]),q.return=G,q)}function se(G,q,X,ie,Pe){return q===null||q.tag!==7?(q=rl(X,G.mode,ie,Pe),q.return=G,q):(q=v(q,X),q.return=G,q)}function ae(G,q,X){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=jb(""+q,G.mode,X),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case y:return X=Ip(q.type,q.key,q.props,null,G.mode,X),zd(X,q),X.return=G,X;case S:return q=Hb(q,G.mode,X),q.return=G,q;case P:return q=ll(q),ae(G,q,X)}if(ne(q)||B(q))return q=rl(q,G.mode,X,null),q.return=G,q;if(typeof q.then=="function")return ae(G,Lp(q),X);if(q.$$typeof===T)return ae(G,Mp(G,q),X);Up(G,q)}return null}function te(G,q,X,ie){var Pe=q!==null?q.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Pe!==null?null:N(G,q,""+X,ie);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case y:return X.key===Pe?j(G,q,X,ie):null;case S:return X.key===Pe?Q(G,q,X,ie):null;case P:return X=ll(X),te(G,q,X,ie)}if(ne(X)||B(X))return Pe!==null?null:se(G,q,X,ie,null);if(typeof X.then=="function")return te(G,q,Lp(X),ie);if(X.$$typeof===T)return te(G,q,Mp(G,X),ie);Up(G,X)}return null}function re(G,q,X,ie,Pe){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return G=G.get(X)||null,N(q,G,""+ie,Pe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return G=G.get(ie.key===null?X:ie.key)||null,j(q,G,ie,Pe);case S:return G=G.get(ie.key===null?X:ie.key)||null,Q(q,G,ie,Pe);case P:return ie=ll(ie),re(G,q,X,ie,Pe)}if(ne(ie)||B(ie))return G=G.get(X)||null,se(q,G,ie,Pe,null);if(typeof ie.then=="function")return re(G,q,X,Lp(ie),Pe);if(ie.$$typeof===T)return re(G,q,X,Mp(q,ie),Pe);Up(q,ie)}return null}function Re(G,q,X,ie){for(var Pe=null,_t=null,Ne=q,Je=q=0,ct=null;Ne!==null&&Je<X.length;Je++){Ne.index>Je?(ct=Ne,Ne=null):ct=Ne.sibling;var xt=te(G,Ne,X[Je],ie);if(xt===null){Ne===null&&(Ne=ct);break}i&&Ne&&xt.alternate===null&&l(G,Ne),q=b(xt,q,Je),_t===null?Pe=xt:_t.sibling=xt,_t=xt,Ne=ct}if(Je===X.length)return d(G,Ne),dt&&zo(G,Je),Pe;if(Ne===null){for(;Je<X.length;Je++)Ne=ae(G,X[Je],ie),Ne!==null&&(q=b(Ne,q,Je),_t===null?Pe=Ne:_t.sibling=Ne,_t=Ne);return dt&&zo(G,Je),Pe}for(Ne=h(Ne);Je<X.length;Je++)ct=re(Ne,G,Je,X[Je],ie),ct!==null&&(i&&ct.alternate!==null&&Ne.delete(ct.key===null?Je:ct.key),q=b(ct,q,Je),_t===null?Pe=ct:_t.sibling=ct,_t=ct);return i&&Ne.forEach(function(ua){return l(G,ua)}),dt&&zo(G,Je),Pe}function De(G,q,X,ie){if(X==null)throw Error(r(151));for(var Pe=null,_t=null,Ne=q,Je=q=0,ct=null,xt=X.next();Ne!==null&&!xt.done;Je++,xt=X.next()){Ne.index>Je?(ct=Ne,Ne=null):ct=Ne.sibling;var ua=te(G,Ne,xt.value,ie);if(ua===null){Ne===null&&(Ne=ct);break}i&&Ne&&ua.alternate===null&&l(G,Ne),q=b(ua,q,Je),_t===null?Pe=ua:_t.sibling=ua,_t=ua,Ne=ct}if(xt.done)return d(G,Ne),dt&&zo(G,Je),Pe;if(Ne===null){for(;!xt.done;Je++,xt=X.next())xt=ae(G,xt.value,ie),xt!==null&&(q=b(xt,q,Je),_t===null?Pe=xt:_t.sibling=xt,_t=xt);return dt&&zo(G,Je),Pe}for(Ne=h(Ne);!xt.done;Je++,xt=X.next())xt=re(Ne,G,Je,xt.value,ie),xt!==null&&(i&&xt.alternate!==null&&Ne.delete(xt.key===null?Je:xt.key),q=b(xt,q,Je),_t===null?Pe=xt:_t.sibling=xt,_t=xt);return i&&Ne.forEach(function(E$){return l(G,E$)}),dt&&zo(G,Je),Pe}function zt(G,q,X,ie){if(typeof X=="object"&&X!==null&&X.type===E&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case y:e:{for(var Pe=X.key;q!==null;){if(q.key===Pe){if(Pe=X.type,Pe===E){if(q.tag===7){d(G,q.sibling),ie=v(q,X.props.children),ie.return=G,G=ie;break e}}else if(q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===P&&ll(Pe)===q.type){d(G,q.sibling),ie=v(q,X.props),zd(ie,X),ie.return=G,G=ie;break e}d(G,q);break}else l(G,q);q=q.sibling}X.type===E?(ie=rl(X.props.children,G.mode,ie,X.key),ie.return=G,G=ie):(ie=Ip(X.type,X.key,X.props,null,G.mode,ie),zd(ie,X),ie.return=G,G=ie)}return _(G);case S:e:{for(Pe=X.key;q!==null;){if(q.key===Pe)if(q.tag===4&&q.stateNode.containerInfo===X.containerInfo&&q.stateNode.implementation===X.implementation){d(G,q.sibling),ie=v(q,X.children||[]),ie.return=G,G=ie;break e}else{d(G,q);break}else l(G,q);q=q.sibling}ie=Hb(X,G.mode,ie),ie.return=G,G=ie}return _(G);case P:return X=ll(X),zt(G,q,X,ie)}if(ne(X))return Re(G,q,X,ie);if(B(X)){if(Pe=B(X),typeof Pe!="function")throw Error(r(150));return X=Pe.call(X),De(G,q,X,ie)}if(typeof X.then=="function")return zt(G,q,Lp(X),ie);if(X.$$typeof===T)return zt(G,q,Mp(G,X),ie);Up(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,q!==null&&q.tag===6?(d(G,q.sibling),ie=v(q,X),ie.return=G,G=ie):(d(G,q),ie=jb(X,G.mode,ie),ie.return=G,G=ie),_(G)):d(G,q)}return function(G,q,X,ie){try{Fd=0;var Pe=zt(G,q,X,ie);return Ou=null,Pe}catch(Ne){if(Ne===Iu||Ne===kp)throw Ne;var _t=Zr(29,Ne,null,G.mode);return _t.lanes=ie,_t.return=G,_t}}}var cl=MI(!0),PI=MI(!1),Gi=!1;function e0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function t0(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Vi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ki(i,l,d){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(Rt&2)!==0){var v=h.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),h.pending=l,l=Rp(i),mI(i,null,d),l}return Tp(i,h,l,d),Rp(i)}function Bd(i,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var h=l.lanes;h&=i.pendingLanes,d|=h,l.lanes=d,gd(i,d)}}function n0(i,l){var d=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,d===h)){var v=null,b=null;if(d=d.firstBaseUpdate,d!==null){do{var _={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};b===null?v=b=_:b=b.next=_,d=d.next}while(d!==null);b===null?v=b=l:b=b.next=l}else v=b=l;d={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:b,shared:h.shared,callbacks:h.callbacks},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=l:i.next=l,d.lastBaseUpdate=l}var r0=!1;function jd(){if(r0){var i=Ru;if(i!==null)throw i}}function Hd(i,l,d,h){r0=!1;var v=i.updateQueue;Gi=!1;var b=v.firstBaseUpdate,_=v.lastBaseUpdate,N=v.shared.pending;if(N!==null){v.shared.pending=null;var j=N,Q=j.next;j.next=null,_===null?b=Q:_.next=Q,_=j;var se=i.alternate;se!==null&&(se=se.updateQueue,N=se.lastBaseUpdate,N!==_&&(N===null?se.firstBaseUpdate=Q:N.next=Q,se.lastBaseUpdate=j))}if(b!==null){var ae=v.baseState;_=0,se=Q=j=null,N=b;do{var te=N.lane&-536870913,re=te!==N.lane;if(re?(ut&te)===te:(h&te)===te){te!==0&&te===Tu&&(r0=!0),se!==null&&(se=se.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Re=i,De=N;te=l;var zt=d;switch(De.tag){case 1:if(Re=De.payload,typeof Re=="function"){ae=Re.call(zt,ae,te);break e}ae=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=De.payload,te=typeof Re=="function"?Re.call(zt,ae,te):Re,te==null)break e;ae=g({},ae,te);break e;case 2:Gi=!0}}te=N.callback,te!==null&&(i.flags|=64,re&&(i.flags|=8192),re=v.callbacks,re===null?v.callbacks=[te]:re.push(te))}else re={lane:te,tag:N.tag,payload:N.payload,callback:N.callback,next:null},se===null?(Q=se=re,j=ae):se=se.next=re,_|=te;if(N=N.next,N===null){if(N=v.shared.pending,N===null)break;re=N,N=re.next,re.next=null,v.lastBaseUpdate=re,v.shared.pending=null}}while(!0);se===null&&(j=ae),v.baseState=j,v.firstBaseUpdate=Q,v.lastBaseUpdate=se,b===null&&(v.shared.lanes=0),Ji|=_,i.lanes=_,i.memoizedState=ae}}function kI(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function DI(i,l){var d=i.callbacks;if(d!==null)for(i.callbacks=null,i=0;i<d.length;i++)kI(d[i],l)}var Nu=D(null),Fp=D(0);function LI(i,l){i=Zo,K(Fp,i),K(Nu,l),Zo=i|l.baseLanes}function s0(){K(Fp,Zo),K(Nu,Nu.current)}function o0(){Zo=Fp.current,V(Nu),V(Fp)}var Xr=D(null),bs=null;function Yi(i){var l=i.alternate;K(vn,vn.current&1),K(Xr,i),bs===null&&(l===null||Nu.current!==null||l.memoizedState!==null)&&(bs=i)}function i0(i){K(vn,vn.current),K(Xr,i),bs===null&&(bs=i)}function UI(i){i.tag===22?(K(vn,vn.current),K(Xr,i),bs===null&&(bs=i)):Zi()}function Zi(){K(vn,vn.current),K(Xr,Xr.current)}function Qr(i){V(Xr),bs===i&&(bs=null),V(vn)}var vn=D(0);function zp(i){for(var l=i;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||f1(d)||h1(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Ho=0,Qe=null,Ut=null,Sn=null,Bp=!1,Mu=!1,dl=!1,jp=0,$d=0,Pu=null,dH=0;function fn(){throw Error(r(321))}function a0(i,l){if(l===null)return!1;for(var d=0;d<l.length&&d<i.length;d++)if(!Yr(i[d],l[d]))return!1;return!0}function l0(i,l,d,h,v,b){return Ho=b,Qe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,$.H=i===null||i.memoizedState===null?SO:w0,dl=!1,b=d(h,v),dl=!1,Mu&&(b=zI(l,d,h,v)),FI(i),b}function FI(i){$.H=Gd;var l=Ut!==null&&Ut.next!==null;if(Ho=0,Sn=Ut=Qe=null,Bp=!1,$d=0,Pu=null,l)throw Error(r(300));i===null||En||(i=i.dependencies,i!==null&&Np(i)&&(En=!0))}function zI(i,l,d,h){Qe=i;var v=0;do{if(Mu&&(Pu=null),$d=0,Mu=!1,25<=v)throw Error(r(301));if(v+=1,Sn=Ut=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}$.H=EO,b=l(d,h)}while(Mu);return b}function fH(){var i=$.H,l=i.useState()[0];return l=typeof l.then=="function"?qd(l):l,i=i.useState()[0],(Ut!==null?Ut.memoizedState:null)!==i&&(Qe.flags|=1024),l}function u0(){var i=jp!==0;return jp=0,i}function c0(i,l,d){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~d}function d0(i){if(Bp){for(i=i.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}Bp=!1}Ho=0,Sn=Ut=Qe=null,Mu=!1,$d=jp=0,Pu=null}function yr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Sn===null?Qe.memoizedState=Sn=i:Sn=Sn.next=i,Sn}function yn(){if(Ut===null){var i=Qe.alternate;i=i!==null?i.memoizedState:null}else i=Ut.next;var l=Sn===null?Qe.memoizedState:Sn.next;if(l!==null)Sn=l,Ut=i;else{if(i===null)throw Qe.alternate===null?Error(r(467)):Error(r(310));Ut=i,i={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},Sn===null?Qe.memoizedState=Sn=i:Sn=Sn.next=i}return Sn}function Hp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qd(i){var l=$d;return $d+=1,Pu===null&&(Pu=[]),i=II(Pu,i,l),l=Qe,(Sn===null?l.memoizedState:Sn.next)===null&&(l=l.alternate,$.H=l===null||l.memoizedState===null?SO:w0),i}function $p(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return qd(i);if(i.$$typeof===T)return Kn(i)}throw Error(r(438,String(i)))}function f0(i){var l=null,d=Qe.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var h=Qe.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(l={data:h.data.map(function(v){return v.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Hp(),Qe.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(i),h=0;h<i;h++)d[h]=H;return l.index++,d}function $o(i,l){return typeof l=="function"?l(i):l}function qp(i){var l=yn();return h0(l,Ut,i)}function h0(i,l,d){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=d;var v=i.baseQueue,b=h.pending;if(b!==null){if(v!==null){var _=v.next;v.next=b.next,b.next=_}l.baseQueue=v=b,h.pending=null}if(b=i.baseState,v===null)i.memoizedState=b;else{l=v.next;var N=_=null,j=null,Q=l,se=!1;do{var ae=Q.lane&-536870913;if(ae!==Q.lane?(ut&ae)===ae:(Ho&ae)===ae){var te=Q.revertLane;if(te===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ae===Tu&&(se=!0);else if((Ho&te)===te){Q=Q.next,te===Tu&&(se=!0);continue}else ae={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},j===null?(N=j=ae,_=b):j=j.next=ae,Qe.lanes|=te,Ji|=te;ae=Q.action,dl&&d(b,ae),b=Q.hasEagerState?Q.eagerState:d(b,ae)}else te={lane:ae,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},j===null?(N=j=te,_=b):j=j.next=te,Qe.lanes|=ae,Ji|=ae;Q=Q.next}while(Q!==null&&Q!==l);if(j===null?_=b:j.next=N,!Yr(b,i.memoizedState)&&(En=!0,se&&(d=Ru,d!==null)))throw d;i.memoizedState=b,i.baseState=_,i.baseQueue=j,h.lastRenderedState=b}return v===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function p0(i){var l=yn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var h=d.dispatch,v=d.pending,b=l.memoizedState;if(v!==null){d.pending=null;var _=v=v.next;do b=i(b,_.action),_=_.next;while(_!==v);Yr(b,l.memoizedState)||(En=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),d.lastRenderedState=b}return[b,h]}function BI(i,l,d){var h=Qe,v=yn(),b=dt;if(b){if(d===void 0)throw Error(r(407));d=d()}else d=l();var _=!Yr((Ut||v).memoizedState,d);if(_&&(v.memoizedState=d,En=!0),v=v.queue,v0($I.bind(null,h,v,i),[i]),v.getSnapshot!==l||_||Sn!==null&&Sn.memoizedState.tag&1){if(h.flags|=2048,ku(9,{destroy:void 0},HI.bind(null,h,v,d,l),null),qt===null)throw Error(r(349));b||(Ho&127)!==0||jI(h,l,d)}return d}function jI(i,l,d){i.flags|=16384,i={getSnapshot:l,value:d},l=Qe.updateQueue,l===null?(l=Hp(),Qe.updateQueue=l,l.stores=[i]):(d=l.stores,d===null?l.stores=[i]:d.push(i))}function HI(i,l,d,h){l.value=d,l.getSnapshot=h,qI(l)&&WI(i)}function $I(i,l,d){return d(function(){qI(l)&&WI(i)})}function qI(i){var l=i.getSnapshot;i=i.value;try{var d=l();return!Yr(i,d)}catch{return!0}}function WI(i){var l=nl(i,2);l!==null&&Pr(l,i,2)}function g0(i){var l=yr();if(typeof i=="function"){var d=i;if(i=d(),dl){Ps(!0);try{d()}finally{Ps(!1)}}}return l.memoizedState=l.baseState=i,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:i},l}function GI(i,l,d,h){return i.baseState=d,h0(i,Ut,typeof h=="function"?h:$o)}function hH(i,l,d,h,v){if(Vp(i))throw Error(r(485));if(i=l.action,i!==null){var b={payload:v,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){b.listeners.push(_)}};$.T!==null?d(!0):b.isTransition=!1,h(b),d=l.pending,d===null?(b.next=l.pending=b,VI(l,b)):(b.next=d.next,l.pending=d.next=b)}}function VI(i,l){var d=l.action,h=l.payload,v=i.state;if(l.isTransition){var b=$.T,_={};$.T=_;try{var N=d(v,h),j=$.S;j!==null&&j(_,N),KI(i,l,N)}catch(Q){m0(i,l,Q)}finally{b!==null&&_.types!==null&&(b.types=_.types),$.T=b}}else try{b=d(v,h),KI(i,l,b)}catch(Q){m0(i,l,Q)}}function KI(i,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(h){YI(i,l,h)},function(h){return m0(i,l,h)}):YI(i,l,d)}function YI(i,l,d){l.status="fulfilled",l.value=d,ZI(l),i.state=d,l=i.pending,l!==null&&(d=l.next,d===l?i.pending=null:(d=d.next,l.next=d,VI(i,d)))}function m0(i,l,d){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do l.status="rejected",l.reason=d,ZI(l),l=l.next;while(l!==h)}i.action=null}function ZI(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function XI(i,l){return l}function QI(i,l){if(dt){var d=qt.formState;if(d!==null){e:{var h=Qe;if(dt){if(Vt){t:{for(var v=Vt,b=ys;v.nodeType!==8;){if(!b){v=null;break t}if(v=Ss(v.nextSibling),v===null){v=null;break t}}b=v.data,v=b==="F!"||b==="F"?v:null}if(v){Vt=Ss(v.nextSibling),h=v.data==="F!";break e}}qi(h)}h=!1}h&&(l=d[0])}}return d=yr(),d.memoizedState=d.baseState=l,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:XI,lastRenderedState:l},d.queue=h,d=vO.bind(null,Qe,h),h.dispatch=d,h=g0(!1),b=C0.bind(null,Qe,!1,h.queue),h=yr(),v={state:l,dispatch:null,action:i,pending:null},h.queue=v,d=hH.bind(null,Qe,v,b,d),v.dispatch=d,h.memoizedState=i,[l,d,!1]}function JI(i){var l=yn();return eO(l,Ut,i)}function eO(i,l,d){if(l=h0(i,l,XI)[0],i=qp($o)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var h=qd(l)}catch(_){throw _===Iu?kp:_}else h=l;l=yn();var v=l.queue,b=v.dispatch;return d!==l.memoizedState&&(Qe.flags|=2048,ku(9,{destroy:void 0},pH.bind(null,v,d),null)),[h,b,i]}function pH(i,l){i.action=l}function tO(i){var l=yn(),d=Ut;if(d!==null)return eO(l,d,i);yn(),l=l.memoizedState,d=yn();var h=d.queue.dispatch;return d.memoizedState=i,[l,h,!1]}function ku(i,l,d,h){return i={tag:i,create:d,deps:h,inst:l,next:null},l=Qe.updateQueue,l===null&&(l=Hp(),Qe.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=i.next=i:(h=d.next,d.next=i,i.next=h,l.lastEffect=i),i}function nO(){return yn().memoizedState}function Wp(i,l,d,h){var v=yr();Qe.flags|=i,v.memoizedState=ku(1|l,{destroy:void 0},d,h===void 0?null:h)}function Gp(i,l,d,h){var v=yn();h=h===void 0?null:h;var b=v.memoizedState.inst;Ut!==null&&h!==null&&a0(h,Ut.memoizedState.deps)?v.memoizedState=ku(l,b,d,h):(Qe.flags|=i,v.memoizedState=ku(1|l,b,d,h))}function rO(i,l){Wp(8390656,8,i,l)}function v0(i,l){Gp(2048,8,i,l)}function gH(i){Qe.flags|=4;var l=Qe.updateQueue;if(l===null)l=Hp(),Qe.updateQueue=l,l.events=[i];else{var d=l.events;d===null?l.events=[i]:d.push(i)}}function sO(i){var l=yn().memoizedState;return gH({ref:l,nextImpl:i}),function(){if((Rt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function oO(i,l){return Gp(4,2,i,l)}function iO(i,l){return Gp(4,4,i,l)}function aO(i,l){if(typeof l=="function"){i=i();var d=l(i);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return i=i(),l.current=i,function(){l.current=null}}function lO(i,l,d){d=d!=null?d.concat([i]):null,Gp(4,4,aO.bind(null,l,i),d)}function y0(){}function uO(i,l){var d=yn();l=l===void 0?null:l;var h=d.memoizedState;return l!==null&&a0(l,h[1])?h[0]:(d.memoizedState=[i,l],i)}function cO(i,l){var d=yn();l=l===void 0?null:l;var h=d.memoizedState;if(l!==null&&a0(l,h[1]))return h[0];if(h=i(),dl){Ps(!0);try{i()}finally{Ps(!1)}}return d.memoizedState=[h,l],h}function b0(i,l,d){return d===void 0||(Ho&1073741824)!==0&&(ut&261930)===0?i.memoizedState=l:(i.memoizedState=d,i=d2(),Qe.lanes|=i,Ji|=i,d)}function dO(i,l,d,h){return Yr(d,l)?d:Nu.current!==null?(i=b0(i,d,h),Yr(i,l)||(En=!0),i):(Ho&42)===0||(Ho&1073741824)!==0&&(ut&261930)===0?(En=!0,i.memoizedState=d):(i=d2(),Qe.lanes|=i,Ji|=i,l)}function fO(i,l,d,h,v){var b=ee.p;ee.p=b!==0&&8>b?b:8;var _=$.T,N={};$.T=N,C0(i,!1,l,d);try{var j=v(),Q=$.S;if(Q!==null&&Q(N,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var se=cH(j,h);Wd(i,l,se,ts(i))}else Wd(i,l,h,ts(i))}catch(ae){Wd(i,l,{then:function(){},status:"rejected",reason:ae},ts())}finally{ee.p=b,_!==null&&N.types!==null&&(_.types=N.types),$.T=_}}function mH(){}function S0(i,l,d,h){if(i.tag!==5)throw Error(r(476));var v=hO(i).queue;fO(i,v,l,fe,d===null?mH:function(){return pO(i),d(h)})}function hO(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:fe},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:d},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function pO(i){var l=hO(i);l.next===null&&(l=i.alternate.memoizedState),Wd(i,l.next.queue,{},ts())}function E0(){return Kn(uf)}function gO(){return yn().memoizedState}function mO(){return yn().memoizedState}function vH(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var d=ts();i=Vi(d);var h=Ki(l,i,d);h!==null&&(Pr(h,l,d),Bd(h,l,d)),l={cache:Zb()},i.payload=l;return}l=l.return}}function yH(i,l,d){var h=ts();d={lane:h,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Vp(i)?yO(l,d):(d=zb(i,l,d,h),d!==null&&(Pr(d,i,h),bO(d,l,h)))}function vO(i,l,d){var h=ts();Wd(i,l,d,h)}function Wd(i,l,d,h){var v={lane:h,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Vp(i))yO(l,v);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var _=l.lastRenderedState,N=b(_,d);if(v.hasEagerState=!0,v.eagerState=N,Yr(N,_))return Tp(i,l,v,0),qt===null&&Ap(),!1}catch{}if(d=zb(i,l,v,h),d!==null)return Pr(d,i,h),bO(d,l,h),!0}return!1}function C0(i,l,d,h){if(h={lane:2,revertLane:e1(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Vp(i)){if(l)throw Error(r(479))}else l=zb(i,d,h,2),l!==null&&Pr(l,i,2)}function Vp(i){var l=i.alternate;return i===Qe||l!==null&&l===Qe}function yO(i,l){Mu=Bp=!0;var d=i.pending;d===null?l.next=l:(l.next=d.next,d.next=l),i.pending=l}function bO(i,l,d){if((d&4194048)!==0){var h=l.lanes;h&=i.pendingLanes,d|=h,l.lanes=d,gd(i,d)}}var Gd={readContext:Kn,use:$p,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useLayoutEffect:fn,useInsertionEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useSyncExternalStore:fn,useId:fn,useHostTransitionStatus:fn,useFormState:fn,useActionState:fn,useOptimistic:fn,useMemoCache:fn,useCacheRefresh:fn};Gd.useEffectEvent=fn;var SO={readContext:Kn,use:$p,useCallback:function(i,l){return yr().memoizedState=[i,l===void 0?null:l],i},useContext:Kn,useEffect:rO,useImperativeHandle:function(i,l,d){d=d!=null?d.concat([i]):null,Wp(4194308,4,aO.bind(null,l,i),d)},useLayoutEffect:function(i,l){return Wp(4194308,4,i,l)},useInsertionEffect:function(i,l){Wp(4,2,i,l)},useMemo:function(i,l){var d=yr();l=l===void 0?null:l;var h=i();if(dl){Ps(!0);try{i()}finally{Ps(!1)}}return d.memoizedState=[h,l],h},useReducer:function(i,l,d){var h=yr();if(d!==void 0){var v=d(l);if(dl){Ps(!0);try{d(l)}finally{Ps(!1)}}}else v=l;return h.memoizedState=h.baseState=v,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:v},h.queue=i,i=i.dispatch=yH.bind(null,Qe,i),[h.memoizedState,i]},useRef:function(i){var l=yr();return i={current:i},l.memoizedState=i},useState:function(i){i=g0(i);var l=i.queue,d=vO.bind(null,Qe,l);return l.dispatch=d,[i.memoizedState,d]},useDebugValue:y0,useDeferredValue:function(i,l){var d=yr();return b0(d,i,l)},useTransition:function(){var i=g0(!1);return i=fO.bind(null,Qe,i.queue,!0,!1),yr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,d){var h=Qe,v=yr();if(dt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),qt===null)throw Error(r(349));(ut&127)!==0||jI(h,l,d)}v.memoizedState=d;var b={value:d,getSnapshot:l};return v.queue=b,rO($I.bind(null,h,b,i),[i]),h.flags|=2048,ku(9,{destroy:void 0},HI.bind(null,h,b,d,l),null),d},useId:function(){var i=yr(),l=qt.identifierPrefix;if(dt){var d=uo,h=lo;d=(h&~(1<<32-Gn(h)-1)).toString(32)+d,l="_"+l+"R_"+d,d=jp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=dH++,l="_"+l+"r_"+d.toString(32)+"_";return i.memoizedState=l},useHostTransitionStatus:E0,useFormState:QI,useActionState:QI,useOptimistic:function(i){var l=yr();l.memoizedState=l.baseState=i;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=C0.bind(null,Qe,!0,d),d.dispatch=l,[i,l]},useMemoCache:f0,useCacheRefresh:function(){return yr().memoizedState=vH.bind(null,Qe)},useEffectEvent:function(i){var l=yr(),d={impl:i};return l.memoizedState=d,function(){if((Rt&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},w0={readContext:Kn,use:$p,useCallback:uO,useContext:Kn,useEffect:v0,useImperativeHandle:lO,useInsertionEffect:oO,useLayoutEffect:iO,useMemo:cO,useReducer:qp,useRef:nO,useState:function(){return qp($o)},useDebugValue:y0,useDeferredValue:function(i,l){var d=yn();return dO(d,Ut.memoizedState,i,l)},useTransition:function(){var i=qp($o)[0],l=yn().memoizedState;return[typeof i=="boolean"?i:qd(i),l]},useSyncExternalStore:BI,useId:gO,useHostTransitionStatus:E0,useFormState:JI,useActionState:JI,useOptimistic:function(i,l){var d=yn();return GI(d,Ut,i,l)},useMemoCache:f0,useCacheRefresh:mO};w0.useEffectEvent=sO;var EO={readContext:Kn,use:$p,useCallback:uO,useContext:Kn,useEffect:v0,useImperativeHandle:lO,useInsertionEffect:oO,useLayoutEffect:iO,useMemo:cO,useReducer:p0,useRef:nO,useState:function(){return p0($o)},useDebugValue:y0,useDeferredValue:function(i,l){var d=yn();return Ut===null?b0(d,i,l):dO(d,Ut.memoizedState,i,l)},useTransition:function(){var i=p0($o)[0],l=yn().memoizedState;return[typeof i=="boolean"?i:qd(i),l]},useSyncExternalStore:BI,useId:gO,useHostTransitionStatus:E0,useFormState:tO,useActionState:tO,useOptimistic:function(i,l){var d=yn();return Ut!==null?GI(d,Ut,i,l):(d.baseState=i,[i,d.queue.dispatch])},useMemoCache:f0,useCacheRefresh:mO};EO.useEffectEvent=sO;function _0(i,l,d,h){l=i.memoizedState,d=d(h,l),d=d==null?l:g({},l,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var x0={enqueueSetState:function(i,l,d){i=i._reactInternals;var h=ts(),v=Vi(h);v.payload=l,d!=null&&(v.callback=d),l=Ki(i,v,h),l!==null&&(Pr(l,i,h),Bd(l,i,h))},enqueueReplaceState:function(i,l,d){i=i._reactInternals;var h=ts(),v=Vi(h);v.tag=1,v.payload=l,d!=null&&(v.callback=d),l=Ki(i,v,h),l!==null&&(Pr(l,i,h),Bd(l,i,h))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var d=ts(),h=Vi(d);h.tag=2,l!=null&&(h.callback=l),l=Ki(i,h,d),l!==null&&(Pr(l,i,d),Bd(l,i,d))}};function CO(i,l,d,h,v,b,_){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,_):l.prototype&&l.prototype.isPureReactComponent?!Md(d,h)||!Md(v,b):!0}function wO(i,l,d,h){i=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,h),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,h),l.state!==i&&x0.enqueueReplaceState(l,l.state,null)}function fl(i,l){var d=l;if("ref"in l){d={};for(var h in l)h!=="ref"&&(d[h]=l[h])}if(i=i.defaultProps){d===l&&(d=g({},d));for(var v in i)d[v]===void 0&&(d[v]=i[v])}return d}function _O(i){xp(i)}function xO(i){console.error(i)}function AO(i){xp(i)}function Kp(i,l){try{var d=i.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(h){setTimeout(function(){throw h})}}function TO(i,l,d){try{var h=i.onCaughtError;h(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function A0(i,l,d){return d=Vi(d),d.tag=3,d.payload={element:null},d.callback=function(){Kp(i,l)},d}function RO(i){return i=Vi(i),i.tag=3,i}function IO(i,l,d,h){var v=d.type.getDerivedStateFromError;if(typeof v=="function"){var b=h.value;i.payload=function(){return v(b)},i.callback=function(){TO(l,d,h)}}var _=d.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(i.callback=function(){TO(l,d,h),typeof v!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var N=h.stack;this.componentDidCatch(h.value,{componentStack:N!==null?N:""})})}function bH(i,l,d,h,v){if(d.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(l=d.alternate,l!==null&&Au(l,d,v,!0),d=Xr.current,d!==null){switch(d.tag){case 31:case 13:return bs===null?ig():d.alternate===null&&hn===0&&(hn=3),d.flags&=-257,d.flags|=65536,d.lanes=v,h===Dp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([h]):l.add(h),X0(i,h,v)),!1;case 22:return d.flags|=65536,h===Dp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([h])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([h]):d.add(h)),X0(i,h,v)),!1}throw Error(r(435,d.tag))}return X0(i,h,v),ig(),!1}if(dt)return l=Xr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=v,h!==Wb&&(i=Error(r(422),{cause:h}),Dd(gs(i,d)))):(h!==Wb&&(l=Error(r(423),{cause:h}),Dd(gs(l,d))),i=i.current.alternate,i.flags|=65536,v&=-v,i.lanes|=v,h=gs(h,d),v=A0(i.stateNode,h,v),n0(i,v),hn!==4&&(hn=2)),!1;var b=Error(r(520),{cause:h});if(b=gs(b,d),ef===null?ef=[b]:ef.push(b),hn!==4&&(hn=2),l===null)return!0;h=gs(h,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,i=v&-v,d.lanes|=i,i=A0(d.stateNode,h,i),n0(d,i),!1;case 1:if(l=d.type,b=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(ea===null||!ea.has(b))))return d.flags|=65536,v&=-v,d.lanes|=v,v=RO(v),IO(v,i,d,h),n0(d,v),!1}d=d.return}while(d!==null);return!1}var T0=Error(r(461)),En=!1;function Yn(i,l,d,h){l.child=i===null?PI(l,null,d,h):cl(l,i.child,d,h)}function OO(i,l,d,h,v){d=d.render;var b=l.ref;if("ref"in h){var _={};for(var N in h)N!=="ref"&&(_[N]=h[N])}else _=h;return il(l),h=l0(i,l,d,_,b,v),N=u0(),i!==null&&!En?(c0(i,l,v),qo(i,l,v)):(dt&&N&&$b(l),l.flags|=1,Yn(i,l,h,v),l.child)}function NO(i,l,d,h,v){if(i===null){var b=d.type;return typeof b=="function"&&!Bb(b)&&b.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=b,MO(i,l,b,h,v)):(i=Ip(d.type,null,h,l,l.mode,v),i.ref=l.ref,i.return=l,l.child=i)}if(b=i.child,!D0(i,v)){var _=b.memoizedProps;if(d=d.compare,d=d!==null?d:Md,d(_,h)&&i.ref===l.ref)return qo(i,l,v)}return l.flags|=1,i=Fo(b,h),i.ref=l.ref,i.return=l,l.child=i}function MO(i,l,d,h,v){if(i!==null){var b=i.memoizedProps;if(Md(b,h)&&i.ref===l.ref)if(En=!1,l.pendingProps=h=b,D0(i,v))(i.flags&131072)!==0&&(En=!0);else return l.lanes=i.lanes,qo(i,l,v)}return R0(i,l,d,h,v)}function PO(i,l,d,h){var v=h.children,b=i!==null?i.memoizedState:null;if(i===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((l.flags&128)!==0){if(b=b!==null?b.baseLanes|d:d,i!==null){for(h=l.child=i.child,v=0;h!==null;)v=v|h.lanes|h.childLanes,h=h.sibling;h=v&~b}else h=0,l.child=null;return kO(i,l,b,d,h)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},i!==null&&Pp(l,b!==null?b.cachePool:null),b!==null?LI(l,b):s0(),UI(l);else return h=l.lanes=536870912,kO(i,l,b!==null?b.baseLanes|d:d,d,h)}else b!==null?(Pp(l,b.cachePool),LI(l,b),Zi(),l.memoizedState=null):(i!==null&&Pp(l,null),s0(),Zi());return Yn(i,l,v,d),l.child}function Vd(i,l){return i!==null&&i.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function kO(i,l,d,h,v){var b=Qb();return b=b===null?null:{parent:bn._currentValue,pool:b},l.memoizedState={baseLanes:d,cachePool:b},i!==null&&Pp(l,null),s0(),UI(l),i!==null&&Au(i,l,h,!0),l.childLanes=v,null}function Yp(i,l){return l=Xp({mode:l.mode,children:l.children},i.mode),l.ref=i.ref,i.child=l,l.return=i,l}function DO(i,l,d){return cl(l,i.child,null,d),i=Yp(l,l.pendingProps),i.flags|=2,Qr(l),l.memoizedState=null,i}function SH(i,l,d){var h=l.pendingProps,v=(l.flags&128)!==0;if(l.flags&=-129,i===null){if(dt){if(h.mode==="hidden")return i=Yp(l,h),l.lanes=536870912,Vd(null,i);if(i0(l),(i=Vt)?(i=V2(i,ys),i=i!==null&&i.data==="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:Hi!==null?{id:lo,overflow:uo}:null,retryLane:536870912,hydrationErrors:null},d=yI(i),d.return=l,l.child=d,Vn=l,Vt=null)):i=null,i===null)throw qi(l);return l.lanes=536870912,null}return Yp(l,h)}var b=i.memoizedState;if(b!==null){var _=b.dehydrated;if(i0(l),v)if(l.flags&256)l.flags&=-257,l=DO(i,l,d);else if(l.memoizedState!==null)l.child=i.child,l.flags|=128,l=null;else throw Error(r(558));else if(En||Au(i,l,d,!1),v=(d&i.childLanes)!==0,En||v){if(h=qt,h!==null&&(_=fu(h,d),_!==0&&_!==b.retryLane))throw b.retryLane=_,nl(i,_),Pr(h,i,_),T0;ig(),l=DO(i,l,d)}else i=b.treeContext,Vt=Ss(_.nextSibling),Vn=l,dt=!0,$i=null,ys=!1,i!==null&&EI(l,i),l=Yp(l,h),l.flags|=4096;return l}return i=Fo(i.child,{mode:h.mode,children:h.children}),i.ref=l.ref,l.child=i,i.return=l,i}function Zp(i,l){var d=l.ref;if(d===null)i!==null&&i.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(i===null||i.ref!==d)&&(l.flags|=4194816)}}function R0(i,l,d,h,v){return il(l),d=l0(i,l,d,h,void 0,v),h=u0(),i!==null&&!En?(c0(i,l,v),qo(i,l,v)):(dt&&h&&$b(l),l.flags|=1,Yn(i,l,d,v),l.child)}function LO(i,l,d,h,v,b){return il(l),l.updateQueue=null,d=zI(l,h,d,v),FI(i),h=u0(),i!==null&&!En?(c0(i,l,b),qo(i,l,b)):(dt&&h&&$b(l),l.flags|=1,Yn(i,l,d,b),l.child)}function UO(i,l,d,h,v){if(il(l),l.stateNode===null){var b=Cu,_=d.contextType;typeof _=="object"&&_!==null&&(b=Kn(_)),b=new d(h,b),l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=x0,l.stateNode=b,b._reactInternals=l,b=l.stateNode,b.props=h,b.state=l.memoizedState,b.refs={},e0(l),_=d.contextType,b.context=typeof _=="object"&&_!==null?Kn(_):Cu,b.state=l.memoizedState,_=d.getDerivedStateFromProps,typeof _=="function"&&(_0(l,d,_,h),b.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(_=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),_!==b.state&&x0.enqueueReplaceState(b,b.state,null),Hd(l,h,b,v),jd(),b.state=l.memoizedState),typeof b.componentDidMount=="function"&&(l.flags|=4194308),h=!0}else if(i===null){b=l.stateNode;var N=l.memoizedProps,j=fl(d,N);b.props=j;var Q=b.context,se=d.contextType;_=Cu,typeof se=="object"&&se!==null&&(_=Kn(se));var ae=d.getDerivedStateFromProps;se=typeof ae=="function"||typeof b.getSnapshotBeforeUpdate=="function",N=l.pendingProps!==N,se||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N||Q!==_)&&wO(l,b,h,_),Gi=!1;var te=l.memoizedState;b.state=te,Hd(l,h,b,v),jd(),Q=l.memoizedState,N||te!==Q||Gi?(typeof ae=="function"&&(_0(l,d,ae,h),Q=l.memoizedState),(j=Gi||CO(l,d,j,h,te,Q,_))?(se||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(l.flags|=4194308)):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=h,l.memoizedState=Q),b.props=h,b.state=Q,b.context=_,h=j):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),h=!1)}else{b=l.stateNode,t0(i,l),_=l.memoizedProps,se=fl(d,_),b.props=se,ae=l.pendingProps,te=b.context,Q=d.contextType,j=Cu,typeof Q=="object"&&Q!==null&&(j=Kn(Q)),N=d.getDerivedStateFromProps,(Q=typeof N=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(_!==ae||te!==j)&&wO(l,b,h,j),Gi=!1,te=l.memoizedState,b.state=te,Hd(l,h,b,v),jd();var re=l.memoizedState;_!==ae||te!==re||Gi||i!==null&&i.dependencies!==null&&Np(i.dependencies)?(typeof N=="function"&&(_0(l,d,N,h),re=l.memoizedState),(se=Gi||CO(l,d,se,h,te,re,j)||i!==null&&i.dependencies!==null&&Np(i.dependencies))?(Q||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(h,re,j),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(h,re,j)),typeof b.componentDidUpdate=="function"&&(l.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof b.componentDidUpdate!="function"||_===i.memoizedProps&&te===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===i.memoizedProps&&te===i.memoizedState||(l.flags|=1024),l.memoizedProps=h,l.memoizedState=re),b.props=h,b.state=re,b.context=j,h=se):(typeof b.componentDidUpdate!="function"||_===i.memoizedProps&&te===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===i.memoizedProps&&te===i.memoizedState||(l.flags|=1024),h=!1)}return b=h,Zp(i,l),h=(l.flags&128)!==0,b||h?(b=l.stateNode,d=h&&typeof d.getDerivedStateFromError!="function"?null:b.render(),l.flags|=1,i!==null&&h?(l.child=cl(l,i.child,null,v),l.child=cl(l,null,d,v)):Yn(i,l,d,v),l.memoizedState=b.state,i=l.child):i=qo(i,l,v),i}function FO(i,l,d,h){return sl(),l.flags|=256,Yn(i,l,d,h),l.child}var I0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function O0(i){return{baseLanes:i,cachePool:TI()}}function N0(i,l,d){return i=i!==null?i.childLanes&~d:0,l&&(i|=es),i}function zO(i,l,d){var h=l.pendingProps,v=!1,b=(l.flags&128)!==0,_;if((_=b)||(_=i!==null&&i.memoizedState===null?!1:(vn.current&2)!==0),_&&(v=!0,l.flags&=-129),_=(l.flags&32)!==0,l.flags&=-33,i===null){if(dt){if(v?Yi(l):Zi(),(i=Vt)?(i=V2(i,ys),i=i!==null&&i.data!=="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:Hi!==null?{id:lo,overflow:uo}:null,retryLane:536870912,hydrationErrors:null},d=yI(i),d.return=l,l.child=d,Vn=l,Vt=null)):i=null,i===null)throw qi(l);return h1(i)?l.lanes=32:l.lanes=536870912,null}var N=h.children;return h=h.fallback,v?(Zi(),v=l.mode,N=Xp({mode:"hidden",children:N},v),h=rl(h,v,d,null),N.return=l,h.return=l,N.sibling=h,l.child=N,h=l.child,h.memoizedState=O0(d),h.childLanes=N0(i,_,d),l.memoizedState=I0,Vd(null,h)):(Yi(l),M0(l,N))}var j=i.memoizedState;if(j!==null&&(N=j.dehydrated,N!==null)){if(b)l.flags&256?(Yi(l),l.flags&=-257,l=P0(i,l,d)):l.memoizedState!==null?(Zi(),l.child=i.child,l.flags|=128,l=null):(Zi(),N=h.fallback,v=l.mode,h=Xp({mode:"visible",children:h.children},v),N=rl(N,v,d,null),N.flags|=2,h.return=l,N.return=l,h.sibling=N,l.child=h,cl(l,i.child,null,d),h=l.child,h.memoizedState=O0(d),h.childLanes=N0(i,_,d),l.memoizedState=I0,l=Vd(null,h));else if(Yi(l),h1(N)){if(_=N.nextSibling&&N.nextSibling.dataset,_)var Q=_.dgst;_=Q,h=Error(r(419)),h.stack="",h.digest=_,Dd({value:h,source:null,stack:null}),l=P0(i,l,d)}else if(En||Au(i,l,d,!1),_=(d&i.childLanes)!==0,En||_){if(_=qt,_!==null&&(h=fu(_,d),h!==0&&h!==j.retryLane))throw j.retryLane=h,nl(i,h),Pr(_,i,h),T0;f1(N)||ig(),l=P0(i,l,d)}else f1(N)?(l.flags|=192,l.child=i.child,l=null):(i=j.treeContext,Vt=Ss(N.nextSibling),Vn=l,dt=!0,$i=null,ys=!1,i!==null&&EI(l,i),l=M0(l,h.children),l.flags|=4096);return l}return v?(Zi(),N=h.fallback,v=l.mode,j=i.child,Q=j.sibling,h=Fo(j,{mode:"hidden",children:h.children}),h.subtreeFlags=j.subtreeFlags&65011712,Q!==null?N=Fo(Q,N):(N=rl(N,v,d,null),N.flags|=2),N.return=l,h.return=l,h.sibling=N,l.child=h,Vd(null,h),h=l.child,N=i.child.memoizedState,N===null?N=O0(d):(v=N.cachePool,v!==null?(j=bn._currentValue,v=v.parent!==j?{parent:j,pool:j}:v):v=TI(),N={baseLanes:N.baseLanes|d,cachePool:v}),h.memoizedState=N,h.childLanes=N0(i,_,d),l.memoizedState=I0,Vd(i.child,h)):(Yi(l),d=i.child,i=d.sibling,d=Fo(d,{mode:"visible",children:h.children}),d.return=l,d.sibling=null,i!==null&&(_=l.deletions,_===null?(l.deletions=[i],l.flags|=16):_.push(i)),l.child=d,l.memoizedState=null,d)}function M0(i,l){return l=Xp({mode:"visible",children:l},i.mode),l.return=i,i.child=l}function Xp(i,l){return i=Zr(22,i,null,l),i.lanes=0,i}function P0(i,l,d){return cl(l,i.child,null,d),i=M0(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function BO(i,l,d){i.lanes|=l;var h=i.alternate;h!==null&&(h.lanes|=l),Kb(i.return,l,d)}function k0(i,l,d,h,v,b){var _=i.memoizedState;_===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:h,tail:d,tailMode:v,treeForkCount:b}:(_.isBackwards=l,_.rendering=null,_.renderingStartTime=0,_.last=h,_.tail=d,_.tailMode=v,_.treeForkCount=b)}function jO(i,l,d){var h=l.pendingProps,v=h.revealOrder,b=h.tail;h=h.children;var _=vn.current,N=(_&2)!==0;if(N?(_=_&1|2,l.flags|=128):_&=1,K(vn,_),Yn(i,l,h,d),h=dt?kd:0,!N&&i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&BO(i,d,l);else if(i.tag===19)BO(i,d,l);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break e;for(;i.sibling===null;){if(i.return===null||i.return===l)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(v){case"forwards":for(d=l.child,v=null;d!==null;)i=d.alternate,i!==null&&zp(i)===null&&(v=d),d=d.sibling;d=v,d===null?(v=l.child,l.child=null):(v=d.sibling,d.sibling=null),k0(l,!1,v,d,b,h);break;case"backwards":case"unstable_legacy-backwards":for(d=null,v=l.child,l.child=null;v!==null;){if(i=v.alternate,i!==null&&zp(i)===null){l.child=v;break}i=v.sibling,v.sibling=d,d=v,v=i}k0(l,!0,d,null,b,h);break;case"together":k0(l,!1,null,null,void 0,h);break;default:l.memoizedState=null}return l.child}function qo(i,l,d){if(i!==null&&(l.dependencies=i.dependencies),Ji|=l.lanes,(d&l.childLanes)===0)if(i!==null){if(Au(i,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(i!==null&&l.child!==i.child)throw Error(r(153));if(l.child!==null){for(i=l.child,d=Fo(i,i.pendingProps),l.child=d,d.return=l;i.sibling!==null;)i=i.sibling,d=d.sibling=Fo(i,i.pendingProps),d.return=l;d.sibling=null}return l.child}function D0(i,l){return(i.lanes&l)!==0?!0:(i=i.dependencies,!!(i!==null&&Np(i)))}function EH(i,l,d){switch(l.tag){case 3:ve(l,l.stateNode.containerInfo),Wi(l,bn,i.memoizedState.cache),sl();break;case 27:case 5:Xe(l);break;case 4:ve(l,l.stateNode.containerInfo);break;case 10:Wi(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,i0(l),null;break;case 13:var h=l.memoizedState;if(h!==null)return h.dehydrated!==null?(Yi(l),l.flags|=128,null):(d&l.child.childLanes)!==0?zO(i,l,d):(Yi(l),i=qo(i,l,d),i!==null?i.sibling:null);Yi(l);break;case 19:var v=(i.flags&128)!==0;if(h=(d&l.childLanes)!==0,h||(Au(i,l,d,!1),h=(d&l.childLanes)!==0),v){if(h)return jO(i,l,d);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),K(vn,vn.current),h)break;return null;case 22:return l.lanes=0,PO(i,l,d,l.pendingProps);case 24:Wi(l,bn,i.memoizedState.cache)}return qo(i,l,d)}function HO(i,l,d){if(i!==null)if(i.memoizedProps!==l.pendingProps)En=!0;else{if(!D0(i,d)&&(l.flags&128)===0)return En=!1,EH(i,l,d);En=(i.flags&131072)!==0}else En=!1,dt&&(l.flags&1048576)!==0&&SI(l,kd,l.index);switch(l.lanes=0,l.tag){case 16:e:{var h=l.pendingProps;if(i=ll(l.elementType),l.type=i,typeof i=="function")Bb(i)?(h=fl(i,h),l.tag=1,l=UO(null,l,i,h,d)):(l.tag=0,l=R0(null,l,i,h,d));else{if(i!=null){var v=i.$$typeof;if(v===R){l.tag=11,l=OO(null,l,i,h,d);break e}else if(v===I){l.tag=14,l=NO(null,l,i,h,d);break e}}throw l=Y(i)||i,Error(r(306,l,""))}}return l;case 0:return R0(i,l,l.type,l.pendingProps,d);case 1:return h=l.type,v=fl(h,l.pendingProps),UO(i,l,h,v,d);case 3:e:{if(ve(l,l.stateNode.containerInfo),i===null)throw Error(r(387));h=l.pendingProps;var b=l.memoizedState;v=b.element,t0(i,l),Hd(l,h,null,d);var _=l.memoizedState;if(h=_.cache,Wi(l,bn,h),h!==b.cache&&Yb(l,[bn],d,!0),jd(),h=_.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:_.cache},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){l=FO(i,l,h,d);break e}else if(h!==v){v=gs(Error(r(424)),l),Dd(v),l=FO(i,l,h,d);break e}else for(i=l.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,Vt=Ss(i.firstChild),Vn=l,dt=!0,$i=null,ys=!0,d=PI(l,null,h,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(sl(),h===v){l=qo(i,l,d);break e}Yn(i,l,h,d)}l=l.child}return l;case 26:return Zp(i,l),i===null?(d=J2(l.type,null,l.pendingProps,null))?l.memoizedState=d:dt||(d=l.type,i=l.pendingProps,h=hg(he.current).createElement(d),h[Rn]=l,h[nt]=i,Zn(h,d,i),an(h),l.stateNode=h):l.memoizedState=J2(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return Xe(l),i===null&&dt&&(h=l.stateNode=Z2(l.type,l.pendingProps,he.current),Vn=l,ys=!0,v=Vt,sa(l.type)?(p1=v,Vt=Ss(h.firstChild)):Vt=v),Yn(i,l,l.pendingProps.children,d),Zp(i,l),i===null&&(l.flags|=4194304),l.child;case 5:return i===null&&dt&&((v=h=Vt)&&(h=XH(h,l.type,l.pendingProps,ys),h!==null?(l.stateNode=h,Vn=l,Vt=Ss(h.firstChild),ys=!1,v=!0):v=!1),v||qi(l)),Xe(l),v=l.type,b=l.pendingProps,_=i!==null?i.memoizedProps:null,h=b.children,u1(v,b)?h=null:_!==null&&u1(v,_)&&(l.flags|=32),l.memoizedState!==null&&(v=l0(i,l,fH,null,null,d),uf._currentValue=v),Zp(i,l),Yn(i,l,h,d),l.child;case 6:return i===null&&dt&&((i=d=Vt)&&(d=QH(d,l.pendingProps,ys),d!==null?(l.stateNode=d,Vn=l,Vt=null,i=!0):i=!1),i||qi(l)),null;case 13:return zO(i,l,d);case 4:return ve(l,l.stateNode.containerInfo),h=l.pendingProps,i===null?l.child=cl(l,null,h,d):Yn(i,l,h,d),l.child;case 11:return OO(i,l,l.type,l.pendingProps,d);case 7:return Yn(i,l,l.pendingProps,d),l.child;case 8:return Yn(i,l,l.pendingProps.children,d),l.child;case 12:return Yn(i,l,l.pendingProps.children,d),l.child;case 10:return h=l.pendingProps,Wi(l,l.type,h.value),Yn(i,l,h.children,d),l.child;case 9:return v=l.type._context,h=l.pendingProps.children,il(l),v=Kn(v),h=h(v),l.flags|=1,Yn(i,l,h,d),l.child;case 14:return NO(i,l,l.type,l.pendingProps,d);case 15:return MO(i,l,l.type,l.pendingProps,d);case 19:return jO(i,l,d);case 31:return SH(i,l,d);case 22:return PO(i,l,d,l.pendingProps);case 24:return il(l),h=Kn(bn),i===null?(v=Qb(),v===null&&(v=qt,b=Zb(),v.pooledCache=b,b.refCount++,b!==null&&(v.pooledCacheLanes|=d),v=b),l.memoizedState={parent:h,cache:v},e0(l),Wi(l,bn,v)):((i.lanes&d)!==0&&(t0(i,l),Hd(l,null,null,d),jd()),v=i.memoizedState,b=l.memoizedState,v.parent!==h?(v={parent:h,cache:h},l.memoizedState=v,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=v),Wi(l,bn,h)):(h=b.cache,Wi(l,bn,h),h!==v.cache&&Yb(l,[bn],d,!0))),Yn(i,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Wo(i){i.flags|=4}function L0(i,l,d,h,v){if((l=(i.mode&32)!==0)&&(l=!1),l){if(i.flags|=16777216,(v&335544128)===v)if(i.stateNode.complete)i.flags|=8192;else if(g2())i.flags|=8192;else throw ul=Dp,Jb}else i.flags&=-16777217}function $O(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!sN(l))if(g2())i.flags|=8192;else throw ul=Dp,Jb}function Qp(i,l){l!==null&&(i.flags|=4),i.flags&16384&&(l=i.tag!==22?Vr():536870912,i.lanes|=l,Fu|=l)}function Kd(i,l){if(!dt)switch(i.tailMode){case"hidden":l=i.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?i.tail=null:d.sibling=null;break;case"collapsed":d=i.tail;for(var h=null;d!==null;)d.alternate!==null&&(h=d),d=d.sibling;h===null?l||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function Kt(i){var l=i.alternate!==null&&i.alternate.child===i.child,d=0,h=0;if(l)for(var v=i.child;v!==null;)d|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=i,v=v.sibling;else for(v=i.child;v!==null;)d|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=i,v=v.sibling;return i.subtreeFlags|=h,i.childLanes=d,l}function CH(i,l,d){var h=l.pendingProps;switch(qb(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(l),null;case 1:return Kt(l),null;case 3:return d=l.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),jo(bn),_e(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(xu(l)?Wo(l):i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Gb())),Kt(l),null;case 26:var v=l.type,b=l.memoizedState;return i===null?(Wo(l),b!==null?(Kt(l),$O(l,b)):(Kt(l),L0(l,v,null,h,d))):b?b!==i.memoizedState?(Wo(l),Kt(l),$O(l,b)):(Kt(l),l.flags&=-16777217):(i=i.memoizedProps,i!==h&&Wo(l),Kt(l),L0(l,v,i,h,d)),null;case 27:if(Ee(l),d=he.current,v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==h&&Wo(l);else{if(!h){if(l.stateNode===null)throw Error(r(166));return Kt(l),null}i=J.current,xu(l)?CI(l):(i=Z2(v,h,d),l.stateNode=i,Wo(l))}return Kt(l),null;case 5:if(Ee(l),v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==h&&Wo(l);else{if(!h){if(l.stateNode===null)throw Error(r(166));return Kt(l),null}if(b=J.current,xu(l))CI(l);else{var _=hg(he.current);switch(b){case 1:b=_.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:b=_.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":b=_.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":b=_.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":b=_.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof h.is=="string"?_.createElement("select",{is:h.is}):_.createElement("select"),h.multiple?b.multiple=!0:h.size&&(b.size=h.size);break;default:b=typeof h.is=="string"?_.createElement(v,{is:h.is}):_.createElement(v)}}b[Rn]=l,b[nt]=h;e:for(_=l.child;_!==null;){if(_.tag===5||_.tag===6)b.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===l)break e;for(;_.sibling===null;){if(_.return===null||_.return===l)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}l.stateNode=b;e:switch(Zn(b,v,h),v){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Wo(l)}}return Kt(l),L0(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,d),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==h&&Wo(l);else{if(typeof h!="string"&&l.stateNode===null)throw Error(r(166));if(i=he.current,xu(l)){if(i=l.stateNode,d=l.memoizedProps,h=null,v=Vn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}i[Rn]=l,i=!!(i.nodeValue===d||h!==null&&h.suppressHydrationWarning===!0||z2(i.nodeValue,d)),i||qi(l,!0)}else i=hg(i).createTextNode(h),i[Rn]=l,l.stateNode=i}return Kt(l),null;case 31:if(d=l.memoizedState,i===null||i.memoizedState!==null){if(h=xu(l),d!==null){if(i===null){if(!h)throw Error(r(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Rn]=l}else sl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Kt(l),i=!1}else d=Gb(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=d),i=!0;if(!i)return l.flags&256?(Qr(l),l):(Qr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Kt(l),null;case 13:if(h=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(v=xu(l),h!==null&&h.dehydrated!==null){if(i===null){if(!v)throw Error(r(318));if(v=l.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[Rn]=l}else sl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Kt(l),v=!1}else v=Gb(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=v),v=!0;if(!v)return l.flags&256?(Qr(l),l):(Qr(l),null)}return Qr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=h!==null,i=i!==null&&i.memoizedState!==null,d&&(h=l.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool),b=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(b=h.memoizedState.cachePool.pool),b!==v&&(h.flags|=2048)),d!==i&&d&&(l.child.flags|=8192),Qp(l,l.updateQueue),Kt(l),null);case 4:return _e(),i===null&&s1(l.stateNode.containerInfo),Kt(l),null;case 10:return jo(l.type),Kt(l),null;case 19:if(V(vn),h=l.memoizedState,h===null)return Kt(l),null;if(v=(l.flags&128)!==0,b=h.rendering,b===null)if(v)Kd(h,!1);else{if(hn!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(b=zp(i),b!==null){for(l.flags|=128,Kd(h,!1),i=b.updateQueue,l.updateQueue=i,Qp(l,i),l.subtreeFlags=0,i=d,d=l.child;d!==null;)vI(d,i),d=d.sibling;return K(vn,vn.current&1|2),dt&&zo(l,h.treeForkCount),l.child}i=i.sibling}h.tail!==null&&Gt()>rg&&(l.flags|=128,v=!0,Kd(h,!1),l.lanes=4194304)}else{if(!v)if(i=zp(b),i!==null){if(l.flags|=128,v=!0,i=i.updateQueue,l.updateQueue=i,Qp(l,i),Kd(h,!0),h.tail===null&&h.tailMode==="hidden"&&!b.alternate&&!dt)return Kt(l),null}else 2*Gt()-h.renderingStartTime>rg&&d!==536870912&&(l.flags|=128,v=!0,Kd(h,!1),l.lanes=4194304);h.isBackwards?(b.sibling=l.child,l.child=b):(i=h.last,i!==null?i.sibling=b:l.child=b,h.last=b)}return h.tail!==null?(i=h.tail,h.rendering=i,h.tail=i.sibling,h.renderingStartTime=Gt(),i.sibling=null,d=vn.current,K(vn,v?d&1|2:d&1),dt&&zo(l,h.treeForkCount),i):(Kt(l),null);case 22:case 23:return Qr(l),o0(),h=l.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(l.flags|=8192):h&&(l.flags|=8192),h?(d&536870912)!==0&&(l.flags&128)===0&&(Kt(l),l.subtreeFlags&6&&(l.flags|=8192)):Kt(l),d=l.updateQueue,d!==null&&Qp(l,d.retryQueue),d=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==d&&(l.flags|=2048),i!==null&&V(al),null;case 24:return d=null,i!==null&&(d=i.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),jo(bn),Kt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function wH(i,l){switch(qb(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return jo(bn),_e(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return Ee(l),null;case 31:if(l.memoizedState!==null){if(Qr(l),l.alternate===null)throw Error(r(340));sl()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 13:if(Qr(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));sl()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return V(vn),null;case 4:return _e(),null;case 10:return jo(l.type),null;case 22:case 23:return Qr(l),o0(),i!==null&&V(al),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return jo(bn),null;case 25:return null;default:return null}}function qO(i,l){switch(qb(l),l.tag){case 3:jo(bn),_e();break;case 26:case 27:case 5:Ee(l);break;case 4:_e();break;case 31:l.memoizedState!==null&&Qr(l);break;case 13:Qr(l);break;case 19:V(vn);break;case 10:jo(l.type);break;case 22:case 23:Qr(l),o0(),i!==null&&V(al);break;case 24:jo(bn)}}function Yd(i,l){try{var d=l.updateQueue,h=d!==null?d.lastEffect:null;if(h!==null){var v=h.next;d=v;do{if((d.tag&i)===i){h=void 0;var b=d.create,_=d.inst;h=b(),_.destroy=h}d=d.next}while(d!==v)}}catch(N){Pt(l,l.return,N)}}function Xi(i,l,d){try{var h=l.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var b=v.next;h=b;do{if((h.tag&i)===i){var _=h.inst,N=_.destroy;if(N!==void 0){_.destroy=void 0,v=l;var j=d,Q=N;try{Q()}catch(se){Pt(v,j,se)}}}h=h.next}while(h!==b)}}catch(se){Pt(l,l.return,se)}}function WO(i){var l=i.updateQueue;if(l!==null){var d=i.stateNode;try{DI(l,d)}catch(h){Pt(i,i.return,h)}}}function GO(i,l,d){d.props=fl(i.type,i.memoizedProps),d.state=i.memoizedState;try{d.componentWillUnmount()}catch(h){Pt(i,l,h)}}function Zd(i,l){try{var d=i.ref;if(d!==null){switch(i.tag){case 26:case 27:case 5:var h=i.stateNode;break;case 30:h=i.stateNode;break;default:h=i.stateNode}typeof d=="function"?i.refCleanup=d(h):d.current=h}}catch(v){Pt(i,l,v)}}function co(i,l){var d=i.ref,h=i.refCleanup;if(d!==null)if(typeof h=="function")try{h()}catch(v){Pt(i,l,v)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(v){Pt(i,l,v)}else d.current=null}function VO(i){var l=i.type,d=i.memoizedProps,h=i.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&h.focus();break e;case"img":d.src?h.src=d.src:d.srcSet&&(h.srcset=d.srcSet)}}catch(v){Pt(i,i.return,v)}}function U0(i,l,d){try{var h=i.stateNode;WH(h,i.type,d,l),h[nt]=l}catch(v){Pt(i,i.return,v)}}function KO(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&sa(i.type)||i.tag===4}function F0(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||KO(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&sa(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function z0(i,l,d){var h=i.tag;if(h===5||h===6)i=i.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(i,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(i),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=tn));else if(h!==4&&(h===27&&sa(i.type)&&(d=i.stateNode,l=null),i=i.child,i!==null))for(z0(i,l,d),i=i.sibling;i!==null;)z0(i,l,d),i=i.sibling}function Jp(i,l,d){var h=i.tag;if(h===5||h===6)i=i.stateNode,l?d.insertBefore(i,l):d.appendChild(i);else if(h!==4&&(h===27&&sa(i.type)&&(d=i.stateNode),i=i.child,i!==null))for(Jp(i,l,d),i=i.sibling;i!==null;)Jp(i,l,d),i=i.sibling}function YO(i){var l=i.stateNode,d=i.memoizedProps;try{for(var h=i.type,v=l.attributes;v.length;)l.removeAttributeNode(v[0]);Zn(l,h,d),l[Rn]=i,l[nt]=d}catch(b){Pt(i,i.return,b)}}var Go=!1,Cn=!1,B0=!1,ZO=typeof WeakSet=="function"?WeakSet:Set,Ln=null;function _H(i,l){if(i=i.containerInfo,a1=Sg,i=lI(i),Pb(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var h=d.getSelection&&d.getSelection();if(h&&h.rangeCount!==0){d=h.anchorNode;var v=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{d.nodeType,b.nodeType}catch{d=null;break e}var _=0,N=-1,j=-1,Q=0,se=0,ae=i,te=null;t:for(;;){for(var re;ae!==d||v!==0&&ae.nodeType!==3||(N=_+v),ae!==b||h!==0&&ae.nodeType!==3||(j=_+h),ae.nodeType===3&&(_+=ae.nodeValue.length),(re=ae.firstChild)!==null;)te=ae,ae=re;for(;;){if(ae===i)break t;if(te===d&&++Q===v&&(N=_),te===b&&++se===h&&(j=_),(re=ae.nextSibling)!==null)break;ae=te,te=ae.parentNode}ae=re}d=N===-1||j===-1?null:{start:N,end:j}}else d=null}d=d||{start:0,end:0}}else d=null;for(l1={focusedElem:i,selectionRange:d},Sg=!1,Ln=l;Ln!==null;)if(l=Ln,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,Ln=i;else for(;Ln!==null;){switch(l=Ln,b=l.alternate,i=l.flags,l.tag){case 0:if((i&4)!==0&&(i=l.updateQueue,i=i!==null?i.events:null,i!==null))for(d=0;d<i.length;d++)v=i[d],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&b!==null){i=void 0,d=l,v=b.memoizedProps,b=b.memoizedState,h=d.stateNode;try{var Re=fl(d.type,v);i=h.getSnapshotBeforeUpdate(Re,b),h.__reactInternalSnapshotBeforeUpdate=i}catch(De){Pt(d,d.return,De)}}break;case 3:if((i&1024)!==0){if(i=l.stateNode.containerInfo,d=i.nodeType,d===9)d1(i);else if(d===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":d1(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=l.sibling,i!==null){i.return=l.return,Ln=i;break}Ln=l.return}}function XO(i,l,d){var h=d.flags;switch(d.tag){case 0:case 11:case 15:Ko(i,d),h&4&&Yd(5,d);break;case 1:if(Ko(i,d),h&4)if(i=d.stateNode,l===null)try{i.componentDidMount()}catch(_){Pt(d,d.return,_)}else{var v=fl(d.type,l.memoizedProps);l=l.memoizedState;try{i.componentDidUpdate(v,l,i.__reactInternalSnapshotBeforeUpdate)}catch(_){Pt(d,d.return,_)}}h&64&&WO(d),h&512&&Zd(d,d.return);break;case 3:if(Ko(i,d),h&64&&(i=d.updateQueue,i!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{DI(i,l)}catch(_){Pt(d,d.return,_)}}break;case 27:l===null&&h&4&&YO(d);case 26:case 5:Ko(i,d),l===null&&h&4&&VO(d),h&512&&Zd(d,d.return);break;case 12:Ko(i,d);break;case 31:Ko(i,d),h&4&&e2(i,d);break;case 13:Ko(i,d),h&4&&t2(i,d),h&64&&(i=d.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(d=PH.bind(null,d),JH(i,d))));break;case 22:if(h=d.memoizedState!==null||Go,!h){l=l!==null&&l.memoizedState!==null||Cn,v=Go;var b=Cn;Go=h,(Cn=l)&&!b?Yo(i,d,(d.subtreeFlags&8772)!==0):Ko(i,d),Go=v,Cn=b}break;case 30:break;default:Ko(i,d)}}function QO(i){var l=i.alternate;l!==null&&(i.alternate=null,QO(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&bd(l)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var nn=null,Ir=!1;function Vo(i,l,d){for(d=d.child;d!==null;)JO(i,l,d),d=d.sibling}function JO(i,l,d){if(ir&&typeof ir.onCommitFiberUnmount=="function")try{ir.onCommitFiberUnmount(Mi,d)}catch{}switch(d.tag){case 26:Cn||co(d,l),Vo(i,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Cn||co(d,l);var h=nn,v=Ir;sa(d.type)&&(nn=d.stateNode,Ir=!1),Vo(i,l,d),of(d.stateNode),nn=h,Ir=v;break;case 5:Cn||co(d,l);case 6:if(h=nn,v=Ir,nn=null,Vo(i,l,d),nn=h,Ir=v,nn!==null)if(Ir)try{(nn.nodeType===9?nn.body:nn.nodeName==="HTML"?nn.ownerDocument.body:nn).removeChild(d.stateNode)}catch(b){Pt(d,l,b)}else try{nn.removeChild(d.stateNode)}catch(b){Pt(d,l,b)}break;case 18:nn!==null&&(Ir?(i=nn,W2(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,d.stateNode),Gu(i)):W2(nn,d.stateNode));break;case 4:h=nn,v=Ir,nn=d.stateNode.containerInfo,Ir=!0,Vo(i,l,d),nn=h,Ir=v;break;case 0:case 11:case 14:case 15:Xi(2,d,l),Cn||Xi(4,d,l),Vo(i,l,d);break;case 1:Cn||(co(d,l),h=d.stateNode,typeof h.componentWillUnmount=="function"&&GO(d,l,h)),Vo(i,l,d);break;case 21:Vo(i,l,d);break;case 22:Cn=(h=Cn)||d.memoizedState!==null,Vo(i,l,d),Cn=h;break;default:Vo(i,l,d)}}function e2(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Gu(i)}catch(d){Pt(l,l.return,d)}}}function t2(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Gu(i)}catch(d){Pt(l,l.return,d)}}function xH(i){switch(i.tag){case 31:case 13:case 19:var l=i.stateNode;return l===null&&(l=i.stateNode=new ZO),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new ZO),l;default:throw Error(r(435,i.tag))}}function eg(i,l){var d=xH(i);l.forEach(function(h){if(!d.has(h)){d.add(h);var v=kH.bind(null,i,h);h.then(v,v)}})}function Or(i,l){var d=l.deletions;if(d!==null)for(var h=0;h<d.length;h++){var v=d[h],b=i,_=l,N=_;e:for(;N!==null;){switch(N.tag){case 27:if(sa(N.type)){nn=N.stateNode,Ir=!1;break e}break;case 5:nn=N.stateNode,Ir=!1;break e;case 3:case 4:nn=N.stateNode.containerInfo,Ir=!0;break e}N=N.return}if(nn===null)throw Error(r(160));JO(b,_,v),nn=null,Ir=!1,b=v.alternate,b!==null&&(b.return=null),v.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)n2(l,i),l=l.sibling}var Fs=null;function n2(i,l){var d=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Or(l,i),Nr(i),h&4&&(Xi(3,i,i.return),Yd(3,i),Xi(5,i,i.return));break;case 1:Or(l,i),Nr(i),h&512&&(Cn||d===null||co(d,d.return)),h&64&&Go&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(d=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=d===null?h:d.concat(h))));break;case 26:var v=Fs;if(Or(l,i),Nr(i),h&512&&(Cn||d===null||co(d,d.return)),h&4){var b=d!==null?d.memoizedState:null;if(h=i.memoizedState,d===null)if(h===null)if(i.stateNode===null){e:{h=i.type,d=i.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":b=v.getElementsByTagName("title")[0],(!b||b[Li]||b[Rn]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=v.createElement(h),v.head.insertBefore(b,v.querySelector("head > title"))),Zn(b,h,d),b[Rn]=i,an(b),h=b;break e;case"link":var _=nN("link","href",v).get(h+(d.href||""));if(_){for(var N=0;N<_.length;N++)if(b=_[N],b.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&b.getAttribute("rel")===(d.rel==null?null:d.rel)&&b.getAttribute("title")===(d.title==null?null:d.title)&&b.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){_.splice(N,1);break t}}b=v.createElement(h),Zn(b,h,d),v.head.appendChild(b);break;case"meta":if(_=nN("meta","content",v).get(h+(d.content||""))){for(N=0;N<_.length;N++)if(b=_[N],b.getAttribute("content")===(d.content==null?null:""+d.content)&&b.getAttribute("name")===(d.name==null?null:d.name)&&b.getAttribute("property")===(d.property==null?null:d.property)&&b.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&b.getAttribute("charset")===(d.charSet==null?null:d.charSet)){_.splice(N,1);break t}}b=v.createElement(h),Zn(b,h,d),v.head.appendChild(b);break;default:throw Error(r(468,h))}b[Rn]=i,an(b),h=b}i.stateNode=h}else rN(v,i.type,i.stateNode);else i.stateNode=tN(v,h,i.memoizedProps);else b!==h?(b===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):b.count--,h===null?rN(v,i.type,i.stateNode):tN(v,h,i.memoizedProps)):h===null&&i.stateNode!==null&&U0(i,i.memoizedProps,d.memoizedProps)}break;case 27:Or(l,i),Nr(i),h&512&&(Cn||d===null||co(d,d.return)),d!==null&&h&4&&U0(i,i.memoizedProps,d.memoizedProps);break;case 5:if(Or(l,i),Nr(i),h&512&&(Cn||d===null||co(d,d.return)),i.flags&32){v=i.stateNode;try{Z(v,"")}catch(Re){Pt(i,i.return,Re)}}h&4&&i.stateNode!=null&&(v=i.memoizedProps,U0(i,v,d!==null?d.memoizedProps:v)),h&1024&&(B0=!0);break;case 6:if(Or(l,i),Nr(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,d=i.stateNode;try{d.nodeValue=h}catch(Re){Pt(i,i.return,Re)}}break;case 3:if(mg=null,v=Fs,Fs=pg(l.containerInfo),Or(l,i),Fs=v,Nr(i),h&4&&d!==null&&d.memoizedState.isDehydrated)try{Gu(l.containerInfo)}catch(Re){Pt(i,i.return,Re)}B0&&(B0=!1,r2(i));break;case 4:h=Fs,Fs=pg(i.stateNode.containerInfo),Or(l,i),Nr(i),Fs=h;break;case 12:Or(l,i),Nr(i);break;case 31:Or(l,i),Nr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,eg(i,h)));break;case 13:Or(l,i),Nr(i),i.child.flags&8192&&i.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(ng=Gt()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,eg(i,h)));break;case 22:v=i.memoizedState!==null;var j=d!==null&&d.memoizedState!==null,Q=Go,se=Cn;if(Go=Q||v,Cn=se||j,Or(l,i),Cn=se,Go=Q,Nr(i),h&8192)e:for(l=i.stateNode,l._visibility=v?l._visibility&-2:l._visibility|1,v&&(d===null||j||Go||Cn||hl(i)),d=null,l=i;;){if(l.tag===5||l.tag===26){if(d===null){j=d=l;try{if(b=j.stateNode,v)_=b.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{N=j.stateNode;var ae=j.memoizedProps.style,te=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;N.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(Re){Pt(j,j.return,Re)}}}else if(l.tag===6){if(d===null){j=l;try{j.stateNode.nodeValue=v?"":j.memoizedProps}catch(Re){Pt(j,j.return,Re)}}}else if(l.tag===18){if(d===null){j=l;try{var re=j.stateNode;v?G2(re,!0):G2(j.stateNode,!1)}catch(Re){Pt(j,j.return,Re)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===i)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break e;for(;l.sibling===null;){if(l.return===null||l.return===i)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}h&4&&(h=i.updateQueue,h!==null&&(d=h.retryQueue,d!==null&&(h.retryQueue=null,eg(i,d))));break;case 19:Or(l,i),Nr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,eg(i,h)));break;case 30:break;case 21:break;default:Or(l,i),Nr(i)}}function Nr(i){var l=i.flags;if(l&2){try{for(var d,h=i.return;h!==null;){if(KO(h)){d=h;break}h=h.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var v=d.stateNode,b=F0(i);Jp(i,b,v);break;case 5:var _=d.stateNode;d.flags&32&&(Z(_,""),d.flags&=-33);var N=F0(i);Jp(i,N,_);break;case 3:case 4:var j=d.stateNode.containerInfo,Q=F0(i);z0(i,Q,j);break;default:throw Error(r(161))}}catch(se){Pt(i,i.return,se)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function r2(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;r2(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),i=i.sibling}}function Ko(i,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)XO(i,l.alternate,l),l=l.sibling}function hl(i){for(i=i.child;i!==null;){var l=i;switch(l.tag){case 0:case 11:case 14:case 15:Xi(4,l,l.return),hl(l);break;case 1:co(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&GO(l,l.return,d),hl(l);break;case 27:of(l.stateNode);case 26:case 5:co(l,l.return),hl(l);break;case 22:l.memoizedState===null&&hl(l);break;case 30:hl(l);break;default:hl(l)}i=i.sibling}}function Yo(i,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var h=l.alternate,v=i,b=l,_=b.flags;switch(b.tag){case 0:case 11:case 15:Yo(v,b,d),Yd(4,b);break;case 1:if(Yo(v,b,d),h=b,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(Q){Pt(h,h.return,Q)}if(h=b,v=h.updateQueue,v!==null){var N=h.stateNode;try{var j=v.shared.hiddenCallbacks;if(j!==null)for(v.shared.hiddenCallbacks=null,v=0;v<j.length;v++)kI(j[v],N)}catch(Q){Pt(h,h.return,Q)}}d&&_&64&&WO(b),Zd(b,b.return);break;case 27:YO(b);case 26:case 5:Yo(v,b,d),d&&h===null&&_&4&&VO(b),Zd(b,b.return);break;case 12:Yo(v,b,d);break;case 31:Yo(v,b,d),d&&_&4&&e2(v,b);break;case 13:Yo(v,b,d),d&&_&4&&t2(v,b);break;case 22:b.memoizedState===null&&Yo(v,b,d),Zd(b,b.return);break;case 30:break;default:Yo(v,b,d)}l=l.sibling}}function j0(i,l){var d=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==d&&(i!=null&&i.refCount++,d!=null&&Ld(d))}function H0(i,l){i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&Ld(i))}function zs(i,l,d,h){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)s2(i,l,d,h),l=l.sibling}function s2(i,l,d,h){var v=l.flags;switch(l.tag){case 0:case 11:case 15:zs(i,l,d,h),v&2048&&Yd(9,l);break;case 1:zs(i,l,d,h);break;case 3:zs(i,l,d,h),v&2048&&(i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&Ld(i)));break;case 12:if(v&2048){zs(i,l,d,h),i=l.stateNode;try{var b=l.memoizedProps,_=b.id,N=b.onPostCommit;typeof N=="function"&&N(_,l.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(j){Pt(l,l.return,j)}}else zs(i,l,d,h);break;case 31:zs(i,l,d,h);break;case 13:zs(i,l,d,h);break;case 23:break;case 22:b=l.stateNode,_=l.alternate,l.memoizedState!==null?b._visibility&2?zs(i,l,d,h):Xd(i,l):b._visibility&2?zs(i,l,d,h):(b._visibility|=2,Du(i,l,d,h,(l.subtreeFlags&10256)!==0||!1)),v&2048&&j0(_,l);break;case 24:zs(i,l,d,h),v&2048&&H0(l.alternate,l);break;default:zs(i,l,d,h)}}function Du(i,l,d,h,v){for(v=v&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var b=i,_=l,N=d,j=h,Q=_.flags;switch(_.tag){case 0:case 11:case 15:Du(b,_,N,j,v),Yd(8,_);break;case 23:break;case 22:var se=_.stateNode;_.memoizedState!==null?se._visibility&2?Du(b,_,N,j,v):Xd(b,_):(se._visibility|=2,Du(b,_,N,j,v)),v&&Q&2048&&j0(_.alternate,_);break;case 24:Du(b,_,N,j,v),v&&Q&2048&&H0(_.alternate,_);break;default:Du(b,_,N,j,v)}l=l.sibling}}function Xd(i,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=i,h=l,v=h.flags;switch(h.tag){case 22:Xd(d,h),v&2048&&j0(h.alternate,h);break;case 24:Xd(d,h),v&2048&&H0(h.alternate,h);break;default:Xd(d,h)}l=l.sibling}}var Qd=8192;function Lu(i,l,d){if(i.subtreeFlags&Qd)for(i=i.child;i!==null;)o2(i,l,d),i=i.sibling}function o2(i,l,d){switch(i.tag){case 26:Lu(i,l,d),i.flags&Qd&&i.memoizedState!==null&&d$(d,Fs,i.memoizedState,i.memoizedProps);break;case 5:Lu(i,l,d);break;case 3:case 4:var h=Fs;Fs=pg(i.stateNode.containerInfo),Lu(i,l,d),Fs=h;break;case 22:i.memoizedState===null&&(h=i.alternate,h!==null&&h.memoizedState!==null?(h=Qd,Qd=16777216,Lu(i,l,d),Qd=h):Lu(i,l,d));break;default:Lu(i,l,d)}}function i2(i){var l=i.alternate;if(l!==null&&(i=l.child,i!==null)){l.child=null;do l=i.sibling,i.sibling=null,i=l;while(i!==null)}}function Jd(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var h=l[d];Ln=h,l2(h,i)}i2(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)a2(i),i=i.sibling}function a2(i){switch(i.tag){case 0:case 11:case 15:Jd(i),i.flags&2048&&Xi(9,i,i.return);break;case 3:Jd(i);break;case 12:Jd(i);break;case 22:var l=i.stateNode;i.memoizedState!==null&&l._visibility&2&&(i.return===null||i.return.tag!==13)?(l._visibility&=-3,tg(i)):Jd(i);break;default:Jd(i)}}function tg(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var h=l[d];Ln=h,l2(h,i)}i2(i)}for(i=i.child;i!==null;){switch(l=i,l.tag){case 0:case 11:case 15:Xi(8,l,l.return),tg(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,tg(l));break;default:tg(l)}i=i.sibling}}function l2(i,l){for(;Ln!==null;){var d=Ln;switch(d.tag){case 0:case 11:case 15:Xi(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var h=d.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Ld(d.memoizedState.cache)}if(h=d.child,h!==null)h.return=d,Ln=h;else e:for(d=i;Ln!==null;){h=Ln;var v=h.sibling,b=h.return;if(QO(h),h===d){Ln=null;break e}if(v!==null){v.return=b,Ln=v;break e}Ln=b}}}var AH={getCacheForType:function(i){var l=Kn(bn),d=l.data.get(i);return d===void 0&&(d=i(),l.data.set(i,d)),d},cacheSignal:function(){return Kn(bn).controller.signal}},TH=typeof WeakMap=="function"?WeakMap:Map,Rt=0,qt=null,it=null,ut=0,Mt=0,Jr=null,Qi=!1,Uu=!1,$0=!1,Zo=0,hn=0,Ji=0,pl=0,q0=0,es=0,Fu=0,ef=null,Mr=null,W0=!1,ng=0,u2=0,rg=1/0,sg=null,ea=null,On=0,ta=null,zu=null,Xo=0,G0=0,V0=null,c2=null,tf=0,K0=null;function ts(){return(Rt&2)!==0&&ut!==0?ut&-ut:$.T!==null?e1():hp()}function d2(){if(es===0)if((ut&536870912)===0||dt){var i=Va;Va<<=1,(Va&3932160)===0&&(Va=262144),es=i}else es=536870912;return i=Xr.current,i!==null&&(i.flags|=32),es}function Pr(i,l,d){(i===qt&&(Mt===2||Mt===9)||i.cancelPendingCommit!==null)&&(Bu(i,0),na(i,ut,es,!1)),Do(i,d),((Rt&2)===0||i!==qt)&&(i===qt&&((Rt&2)===0&&(pl|=d),hn===4&&na(i,ut,es,!1)),fo(i))}function f2(i,l,d){if((Rt&6)!==0)throw Error(r(327));var h=!d&&(l&127)===0&&(l&i.expiredLanes)===0||ro(i,l),v=h?OH(i,l):Z0(i,l,!0),b=h;do{if(v===0){Uu&&!h&&na(i,l,0,!1);break}else{if(d=i.current.alternate,b&&!RH(d)){v=Z0(i,l,!1),b=!1;continue}if(v===2){if(b=l,i.errorRecoveryDisabledLanes&b)var _=0;else _=i.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){l=_;e:{var N=i;v=ef;var j=N.current.memoizedState.isDehydrated;if(j&&(Bu(N,_).flags|=256),_=Z0(N,_,!1),_!==2){if($0&&!j){N.errorRecoveryDisabledLanes|=b,pl|=b,v=4;break e}b=Mr,Mr=v,b!==null&&(Mr===null?Mr=b:Mr.push.apply(Mr,b))}v=_}if(b=!1,v!==2)continue}}if(v===1){Bu(i,0),na(i,l,0,!0);break}e:{switch(h=i,b=v,b){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:na(h,l,es,!Qi);break e;case 2:Mr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(v=ng+300-Gt(),10<v)){if(na(h,l,es,!Qi),Ya(h,0,!0)!==0)break e;Xo=l,h.timeoutHandle=$2(h2.bind(null,h,d,Mr,sg,W0,l,es,pl,Fu,Qi,b,"Throttled",-0,0),v);break e}h2(h,d,Mr,sg,W0,l,es,pl,Fu,Qi,b,null,-0,0)}}break}while(!0);fo(i)}function h2(i,l,d,h,v,b,_,N,j,Q,se,ae,te,re){if(i.timeoutHandle=-1,ae=l.subtreeFlags,ae&8192||(ae&16785408)===16785408){ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tn},o2(l,b,ae);var Re=(b&62914560)===b?ng-Gt():(b&4194048)===b?u2-Gt():0;if(Re=f$(ae,Re),Re!==null){Xo=b,i.cancelPendingCommit=Re(E2.bind(null,i,l,b,d,h,v,_,N,j,se,ae,null,te,re)),na(i,b,_,!Q);return}}E2(i,l,b,d,h,v,_,N,j)}function RH(i){for(var l=i;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var h=0;h<d.length;h++){var v=d[h],b=v.getSnapshot;v=v.value;try{if(!Yr(b(),v))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function na(i,l,d,h){l&=~q0,l&=~pl,i.suspendedLanes|=l,i.pingedLanes&=~l,h&&(i.warmLanes|=l),h=i.expirationTimes;for(var v=l;0<v;){var b=31-Gn(v),_=1<<b;h[b]=-1,v&=~_}d!==0&&fp(i,d,l)}function og(){return(Rt&6)===0?(nf(0),!1):!0}function Y0(){if(it!==null){if(Mt===0)var i=it.return;else i=it,Bo=ol=null,d0(i),Ou=null,Fd=0,i=it;for(;i!==null;)qO(i.alternate,i),i=i.return;it=null}}function Bu(i,l){var d=i.timeoutHandle;d!==-1&&(i.timeoutHandle=-1,KH(d)),d=i.cancelPendingCommit,d!==null&&(i.cancelPendingCommit=null,d()),Xo=0,Y0(),qt=i,it=d=Fo(i.current,null),ut=l,Mt=0,Jr=null,Qi=!1,Uu=ro(i,l),$0=!1,Fu=es=q0=pl=Ji=hn=0,Mr=ef=null,W0=!1,(l&8)!==0&&(l|=l&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=l;0<h;){var v=31-Gn(h),b=1<<v;l|=i[v],h&=~b}return Zo=l,Ap(),d}function p2(i,l){Qe=null,$.H=Gd,l===Iu||l===kp?(l=OI(),Mt=3):l===Jb?(l=OI(),Mt=4):Mt=l===T0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Jr=l,it===null&&(hn=1,Kp(i,gs(l,i.current)))}function g2(){var i=Xr.current;return i===null?!0:(ut&4194048)===ut?bs===null:(ut&62914560)===ut||(ut&536870912)!==0?i===bs:!1}function m2(){var i=$.H;return $.H=Gd,i===null?Gd:i}function v2(){var i=$.A;return $.A=AH,i}function ig(){hn=4,Qi||(ut&4194048)!==ut&&Xr.current!==null||(Uu=!0),(Ji&134217727)===0&&(pl&134217727)===0||qt===null||na(qt,ut,es,!1)}function Z0(i,l,d){var h=Rt;Rt|=2;var v=m2(),b=v2();(qt!==i||ut!==l)&&(sg=null,Bu(i,l)),l=!1;var _=hn;e:do try{if(Mt!==0&&it!==null){var N=it,j=Jr;switch(Mt){case 8:Y0(),_=6;break e;case 3:case 2:case 9:case 6:Xr.current===null&&(l=!0);var Q=Mt;if(Mt=0,Jr=null,ju(i,N,j,Q),d&&Uu){_=0;break e}break;default:Q=Mt,Mt=0,Jr=null,ju(i,N,j,Q)}}IH(),_=hn;break}catch(se){p2(i,se)}while(!0);return l&&i.shellSuspendCounter++,Bo=ol=null,Rt=h,$.H=v,$.A=b,it===null&&(qt=null,ut=0,Ap()),_}function IH(){for(;it!==null;)y2(it)}function OH(i,l){var d=Rt;Rt|=2;var h=m2(),v=v2();qt!==i||ut!==l?(sg=null,rg=Gt()+500,Bu(i,l)):Uu=ro(i,l);e:do try{if(Mt!==0&&it!==null){l=it;var b=Jr;t:switch(Mt){case 1:Mt=0,Jr=null,ju(i,l,b,1);break;case 2:case 9:if(RI(b)){Mt=0,Jr=null,b2(l);break}l=function(){Mt!==2&&Mt!==9||qt!==i||(Mt=7),fo(i)},b.then(l,l);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:RI(b)?(Mt=0,Jr=null,b2(l)):(Mt=0,Jr=null,ju(i,l,b,7));break;case 5:var _=null;switch(it.tag){case 26:_=it.memoizedState;case 5:case 27:var N=it;if(_?sN(_):N.stateNode.complete){Mt=0,Jr=null;var j=N.sibling;if(j!==null)it=j;else{var Q=N.return;Q!==null?(it=Q,ag(Q)):it=null}break t}}Mt=0,Jr=null,ju(i,l,b,5);break;case 6:Mt=0,Jr=null,ju(i,l,b,6);break;case 8:Y0(),hn=6;break e;default:throw Error(r(462))}}NH();break}catch(se){p2(i,se)}while(!0);return Bo=ol=null,$.H=h,$.A=v,Rt=d,it!==null?0:(qt=null,ut=0,Ap(),hn)}function NH(){for(;it!==null&&!to();)y2(it)}function y2(i){var l=HO(i.alternate,i,Zo);i.memoizedProps=i.pendingProps,l===null?ag(i):it=l}function b2(i){var l=i,d=l.alternate;switch(l.tag){case 15:case 0:l=LO(d,l,l.pendingProps,l.type,void 0,ut);break;case 11:l=LO(d,l,l.pendingProps,l.type.render,l.ref,ut);break;case 5:d0(l);default:qO(d,l),l=it=vI(l,Zo),l=HO(d,l,Zo)}i.memoizedProps=i.pendingProps,l===null?ag(i):it=l}function ju(i,l,d,h){Bo=ol=null,d0(l),Ou=null,Fd=0;var v=l.return;try{if(bH(i,v,l,d,ut)){hn=1,Kp(i,gs(d,i.current)),it=null;return}}catch(b){if(v!==null)throw it=v,b;hn=1,Kp(i,gs(d,i.current)),it=null;return}l.flags&32768?(dt||h===1?i=!0:Uu||(ut&536870912)!==0?i=!1:(Qi=i=!0,(h===2||h===9||h===3||h===6)&&(h=Xr.current,h!==null&&h.tag===13&&(h.flags|=16384))),S2(l,i)):ag(l)}function ag(i){var l=i;do{if((l.flags&32768)!==0){S2(l,Qi);return}i=l.return;var d=CH(l.alternate,l,Zo);if(d!==null){it=d;return}if(l=l.sibling,l!==null){it=l;return}it=l=i}while(l!==null);hn===0&&(hn=5)}function S2(i,l){do{var d=wH(i.alternate,i);if(d!==null){d.flags&=32767,it=d;return}if(d=i.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(i=i.sibling,i!==null)){it=i;return}it=i=d}while(i!==null);hn=6,it=null}function E2(i,l,d,h,v,b,_,N,j){i.cancelPendingCommit=null;do lg();while(On!==0);if((Rt&6)!==0)throw Error(r(327));if(l!==null){if(l===i.current)throw Error(r(177));if(b=l.lanes|l.childLanes,b|=Fb,pd(i,d,b,_,N,j),i===qt&&(it=qt=null,ut=0),zu=l,ta=i,Xo=d,G0=b,V0=v,c2=h,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,DH(no,function(){return A2(),null})):(i.callbackNode=null,i.callbackPriority=0),h=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||h){h=$.T,$.T=null,v=ee.p,ee.p=2,_=Rt,Rt|=4;try{_H(i,l,d)}finally{Rt=_,ee.p=v,$.T=h}}On=1,C2(),w2(),_2()}}function C2(){if(On===1){On=0;var i=ta,l=zu,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=$.T,$.T=null;var h=ee.p;ee.p=2;var v=Rt;Rt|=4;try{n2(l,i);var b=l1,_=lI(i.containerInfo),N=b.focusedElem,j=b.selectionRange;if(_!==N&&N&&N.ownerDocument&&aI(N.ownerDocument.documentElement,N)){if(j!==null&&Pb(N)){var Q=j.start,se=j.end;if(se===void 0&&(se=Q),"selectionStart"in N)N.selectionStart=Q,N.selectionEnd=Math.min(se,N.value.length);else{var ae=N.ownerDocument||document,te=ae&&ae.defaultView||window;if(te.getSelection){var re=te.getSelection(),Re=N.textContent.length,De=Math.min(j.start,Re),zt=j.end===void 0?De:Math.min(j.end,Re);!re.extend&&De>zt&&(_=zt,zt=De,De=_);var G=iI(N,De),q=iI(N,zt);if(G&&q&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==q.node||re.focusOffset!==q.offset)){var X=ae.createRange();X.setStart(G.node,G.offset),re.removeAllRanges(),De>zt?(re.addRange(X),re.extend(q.node,q.offset)):(X.setEnd(q.node,q.offset),re.addRange(X))}}}}for(ae=[],re=N;re=re.parentNode;)re.nodeType===1&&ae.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ae.length;N++){var ie=ae[N];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Sg=!!a1,l1=a1=null}finally{Rt=v,ee.p=h,$.T=d}}i.current=l,On=2}}function w2(){if(On===2){On=0;var i=ta,l=zu,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=$.T,$.T=null;var h=ee.p;ee.p=2;var v=Rt;Rt|=4;try{XO(i,l.alternate,l)}finally{Rt=v,ee.p=h,$.T=d}}On=3}}function _2(){if(On===4||On===3){On=0,xr();var i=ta,l=zu,d=Xo,h=c2;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?On=5:(On=0,zu=ta=null,x2(i,i.pendingLanes));var v=i.pendingLanes;if(v===0&&(ea=null),Za(d),l=l.stateNode,ir&&typeof ir.onCommitFiberRoot=="function")try{ir.onCommitFiberRoot(Mi,l,void 0,(l.current.flags&128)===128)}catch{}if(h!==null){l=$.T,v=ee.p,ee.p=2,$.T=null;try{for(var b=i.onRecoverableError,_=0;_<h.length;_++){var N=h[_];b(N.value,{componentStack:N.stack})}}finally{$.T=l,ee.p=v}}(Xo&3)!==0&&lg(),fo(i),v=i.pendingLanes,(d&261930)!==0&&(v&42)!==0?i===K0?tf++:(tf=0,K0=i):tf=0,nf(0)}}function x2(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,Ld(l)))}function lg(){return C2(),w2(),_2(),A2()}function A2(){if(On!==5)return!1;var i=ta,l=G0;G0=0;var d=Za(Xo),h=$.T,v=ee.p;try{ee.p=32>d?32:d,$.T=null,d=V0,V0=null;var b=ta,_=Xo;if(On=0,zu=ta=null,Xo=0,(Rt&6)!==0)throw Error(r(331));var N=Rt;if(Rt|=4,a2(b.current),s2(b,b.current,_,d),Rt=N,nf(0,!1),ir&&typeof ir.onPostCommitFiberRoot=="function")try{ir.onPostCommitFiberRoot(Mi,b)}catch{}return!0}finally{ee.p=v,$.T=h,x2(i,l)}}function T2(i,l,d){l=gs(d,l),l=A0(i.stateNode,l,2),i=Ki(i,l,2),i!==null&&(Do(i,2),fo(i))}function Pt(i,l,d){if(i.tag===3)T2(i,i,d);else for(;l!==null;){if(l.tag===3){T2(l,i,d);break}else if(l.tag===1){var h=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ea===null||!ea.has(h))){i=gs(d,i),d=RO(2),h=Ki(l,d,2),h!==null&&(IO(d,h,l,i),Do(h,2),fo(h));break}}l=l.return}}function X0(i,l,d){var h=i.pingCache;if(h===null){h=i.pingCache=new TH;var v=new Set;h.set(l,v)}else v=h.get(l),v===void 0&&(v=new Set,h.set(l,v));v.has(d)||($0=!0,v.add(d),i=MH.bind(null,i,l,d),l.then(i,i))}function MH(i,l,d){var h=i.pingCache;h!==null&&h.delete(l),i.pingedLanes|=i.suspendedLanes&d,i.warmLanes&=~d,qt===i&&(ut&d)===d&&(hn===4||hn===3&&(ut&62914560)===ut&&300>Gt()-ng?(Rt&2)===0&&Bu(i,0):q0|=d,Fu===ut&&(Fu=0)),fo(i)}function R2(i,l){l===0&&(l=Vr()),i=nl(i,l),i!==null&&(Do(i,l),fo(i))}function PH(i){var l=i.memoizedState,d=0;l!==null&&(d=l.retryLane),R2(i,d)}function kH(i,l){var d=0;switch(i.tag){case 31:case 13:var h=i.stateNode,v=i.memoizedState;v!==null&&(d=v.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(l),R2(i,d)}function DH(i,l){return Wn(i,l)}var ug=null,Hu=null,Q0=!1,cg=!1,J0=!1,ra=0;function fo(i){i!==Hu&&i.next===null&&(Hu===null?ug=Hu=i:Hu=Hu.next=i),cg=!0,Q0||(Q0=!0,UH())}function nf(i,l){if(!J0&&cg){J0=!0;do for(var d=!1,h=ug;h!==null;){if(i!==0){var v=h.pendingLanes;if(v===0)var b=0;else{var _=h.suspendedLanes,N=h.pingedLanes;b=(1<<31-Gn(42|i)+1)-1,b&=v&~(_&~N),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(d=!0,M2(h,b))}else b=ut,b=Ya(h,h===qt?b:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(b&3)===0||ro(h,b)||(d=!0,M2(h,b));h=h.next}while(d);J0=!1}}function LH(){I2()}function I2(){cg=Q0=!1;var i=0;ra!==0&&VH()&&(i=ra);for(var l=Gt(),d=null,h=ug;h!==null;){var v=h.next,b=O2(h,l);b===0?(h.next=null,d===null?ug=v:d.next=v,v===null&&(Hu=d)):(d=h,(i!==0||(b&3)!==0)&&(cg=!0)),h=v}On!==0&&On!==5||nf(i),ra!==0&&(ra=0)}function O2(i,l){for(var d=i.suspendedLanes,h=i.pingedLanes,v=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var _=31-Gn(b),N=1<<_,j=v[_];j===-1?((N&d)===0||(N&h)!==0)&&(v[_]=du(N,l)):j<=l&&(i.expiredLanes|=N),b&=~N}if(l=qt,d=ut,d=Ya(i,i===l?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h=i.callbackNode,d===0||i===l&&(Mt===2||Mt===9)||i.cancelPendingCommit!==null)return h!==null&&h!==null&&_r(h),i.callbackNode=null,i.callbackPriority=0;if((d&3)===0||ro(i,d)){if(l=d&-d,l===i.callbackPriority)return l;switch(h!==null&&_r(h),Za(d)){case 2:case 8:d=Ar;break;case 32:d=no;break;case 268435456:d=ko;break;default:d=no}return h=N2.bind(null,i),d=Wn(d,h),i.callbackPriority=l,i.callbackNode=d,l}return h!==null&&h!==null&&_r(h),i.callbackPriority=2,i.callbackNode=null,2}function N2(i,l){if(On!==0&&On!==5)return i.callbackNode=null,i.callbackPriority=0,null;var d=i.callbackNode;if(lg()&&i.callbackNode!==d)return null;var h=ut;return h=Ya(i,i===qt?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h===0?null:(f2(i,h,l),O2(i,Gt()),i.callbackNode!=null&&i.callbackNode===d?N2.bind(null,i):null)}function M2(i,l){if(lg())return null;f2(i,l,!0)}function UH(){YH(function(){(Rt&6)!==0?Wn(mn,LH):I2()})}function e1(){if(ra===0){var i=Tu;i===0&&(i=ki,ki<<=1,(ki&261888)===0&&(ki=256)),ra=i}return ra}function P2(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:ar(""+i)}function k2(i,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,i.id&&d.setAttribute("form",i.id),l.parentNode.insertBefore(d,l),i=new FormData(i),d.parentNode.removeChild(d),i}function FH(i,l,d,h,v){if(l==="submit"&&d&&d.stateNode===v){var b=P2((v[nt]||null).action),_=h.submitter;_&&(l=(l=_[nt]||null)?P2(l.formAction):_.getAttribute("formAction"),l!==null&&(b=l,_=null));var N=new Cp("action","action",null,h,v);i.push({event:N,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ra!==0){var j=_?k2(v,_):new FormData(v);S0(d,{pending:!0,data:j,method:v.method,action:b},null,j)}}else typeof b=="function"&&(N.preventDefault(),j=_?k2(v,_):new FormData(v),S0(d,{pending:!0,data:j,method:v.method,action:b},b,j))},currentTarget:v}]})}}for(var t1=0;t1<Ub.length;t1++){var n1=Ub[t1],zH=n1.toLowerCase(),BH=n1[0].toUpperCase()+n1.slice(1);Us(zH,"on"+BH)}Us(dI,"onAnimationEnd"),Us(fI,"onAnimationIteration"),Us(hI,"onAnimationStart"),Us("dblclick","onDoubleClick"),Us("focusin","onFocus"),Us("focusout","onBlur"),Us(nH,"onTransitionRun"),Us(rH,"onTransitionStart"),Us(sH,"onTransitionCancel"),Us(pI,"onTransitionEnd"),zi("onMouseEnter",["mouseout","mouseover"]),zi("onMouseLeave",["mouseout","mouseover"]),zi("onPointerEnter",["pointerout","pointerover"]),zi("onPointerLeave",["pointerout","pointerover"]),Ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ds("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jH=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(rf));function D2(i,l){l=(l&4)!==0;for(var d=0;d<i.length;d++){var h=i[d],v=h.event;h=h.listeners;e:{var b=void 0;if(l)for(var _=h.length-1;0<=_;_--){var N=h[_],j=N.instance,Q=N.currentTarget;if(N=N.listener,j!==b&&v.isPropagationStopped())break e;b=N,v.currentTarget=Q;try{b(v)}catch(se){xp(se)}v.currentTarget=null,b=j}else for(_=0;_<h.length;_++){if(N=h[_],j=N.instance,Q=N.currentTarget,N=N.listener,j!==b&&v.isPropagationStopped())break e;b=N,v.currentTarget=Q;try{b(v)}catch(se){xp(se)}v.currentTarget=null,b=j}}}}function at(i,l){var d=l[md];d===void 0&&(d=l[md]=new Set);var h=i+"__bubble";d.has(h)||(L2(l,i,2,!1),d.add(h))}function r1(i,l,d){var h=0;l&&(h|=4),L2(d,i,h,l)}var dg="_reactListening"+Math.random().toString(36).slice(2);function s1(i){if(!i[dg]){i[dg]=!0,io.forEach(function(d){d!=="selectionchange"&&(jH.has(d)||r1(d,!1,i),r1(d,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[dg]||(l[dg]=!0,r1("selectionchange",!1,l))}}function L2(i,l,d,h){switch(dN(l)){case 2:var v=g$;break;case 8:v=m$;break;default:v=b1}d=v.bind(null,l,d,i),v=void 0,!_b||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(v=!0),h?v!==void 0?i.addEventListener(l,d,{capture:!0,passive:v}):i.addEventListener(l,d,!0):v!==void 0?i.addEventListener(l,d,{passive:v}):i.addEventListener(l,d,!1)}function o1(i,l,d,h,v){var b=h;if((l&1)===0&&(l&2)===0&&h!==null)e:for(;;){if(h===null)return;var _=h.tag;if(_===3||_===4){var N=h.stateNode.containerInfo;if(N===v)break;if(_===4)for(_=h.return;_!==null;){var j=_.tag;if((j===3||j===4)&&_.stateNode.containerInfo===v)return;_=_.return}for(;N!==null;){if(_=Ui(N),_===null)return;if(j=_.tag,j===5||j===6||j===26||j===27){h=b=_;continue e}N=N.parentNode}}h=h.return}jR(function(){var Q=b,se=In(d),ae=[];e:{var te=gI.get(i);if(te!==void 0){var re=Cp,Re=i;switch(i){case"keypress":if(Sp(d)===0)break e;case"keydown":case"keyup":re=kj;break;case"focusin":Re="focus",re=Rb;break;case"focusout":Re="blur",re=Rb;break;case"beforeblur":case"afterblur":re=Rb;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=qR;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=Cj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=Uj;break;case dI:case fI:case hI:re=xj;break;case pI:re=zj;break;case"scroll":case"scrollend":re=Sj;break;case"wheel":re=jj;break;case"copy":case"cut":case"paste":re=Tj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=GR;break;case"toggle":case"beforetoggle":re=$j}var De=(l&4)!==0,zt=!De&&(i==="scroll"||i==="scrollend"),G=De?te!==null?te+"Capture":null:te;De=[];for(var q=Q,X;q!==null;){var ie=q;if(X=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||X===null||G===null||(ie=xd(q,G),ie!=null&&De.push(sf(q,ie,X))),zt)break;q=q.return}0<De.length&&(te=new re(te,Re,null,d,se),ae.push({event:te,listeners:De}))}}if((l&7)===0){e:{if(te=i==="mouseover"||i==="pointerover",re=i==="mouseout"||i==="pointerout",te&&d!==vr&&(Re=d.relatedTarget||d.fromElement)&&(Ui(Re)||Re[Kr]))break e;if((re||te)&&(te=se.window===se?se:(te=se.ownerDocument)?te.defaultView||te.parentWindow:window,re?(Re=d.relatedTarget||d.toElement,re=Q,Re=Re?Ui(Re):null,Re!==null&&(zt=o(Re),De=Re.tag,Re!==zt||De!==5&&De!==27&&De!==6)&&(Re=null)):(re=null,Re=Q),re!==Re)){if(De=qR,ie="onMouseLeave",G="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(De=GR,ie="onPointerLeave",G="onPointerEnter",q="pointer"),zt=re==null?te:Xa(re),X=Re==null?te:Xa(Re),te=new De(ie,q+"leave",re,d,se),te.target=zt,te.relatedTarget=X,ie=null,Ui(se)===Q&&(De=new De(G,q+"enter",Re,d,se),De.target=X,De.relatedTarget=zt,ie=De),zt=ie,re&&Re)t:{for(De=HH,G=re,q=Re,X=0,ie=G;ie;ie=De(ie))X++;ie=0;for(var Pe=q;Pe;Pe=De(Pe))ie++;for(;0<X-ie;)G=De(G),X--;for(;0<ie-X;)q=De(q),ie--;for(;X--;){if(G===q||q!==null&&G===q.alternate){De=G;break t}G=De(G),q=De(q)}De=null}else De=null;re!==null&&U2(ae,te,re,De,!1),Re!==null&&zt!==null&&U2(ae,zt,Re,De,!0)}}e:{if(te=Q?Xa(Q):window,re=te.nodeName&&te.nodeName.toLowerCase(),re==="select"||re==="input"&&te.type==="file")var _t=eI;else if(QR(te))if(tI)_t=Jj;else{_t=Xj;var Ne=Zj}else re=te.nodeName,!re||re.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?Q&&Ue(Q.elementType)&&(_t=eI):_t=Qj;if(_t&&(_t=_t(i,Q))){JR(ae,_t,d,se);break e}Ne&&Ne(i,te,Q),i==="focusout"&&Q&&te.type==="number"&&Q.memoizedProps.value!=null&&Bi(te,"number",te.value)}switch(Ne=Q?Xa(Q):window,i){case"focusin":(QR(Ne)||Ne.contentEditable==="true")&&(bu=Ne,kb=Q,Pd=null);break;case"focusout":Pd=kb=bu=null;break;case"mousedown":Db=!0;break;case"contextmenu":case"mouseup":case"dragend":Db=!1,uI(ae,d,se);break;case"selectionchange":if(tH)break;case"keydown":case"keyup":uI(ae,d,se)}var Je;if(Ob)e:{switch(i){case"compositionstart":var ct="onCompositionStart";break e;case"compositionend":ct="onCompositionEnd";break e;case"compositionupdate":ct="onCompositionUpdate";break e}ct=void 0}else yu?ZR(i,d)&&(ct="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(ct="onCompositionStart");ct&&(VR&&d.locale!=="ko"&&(yu||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&yu&&(Je=HR()):(ji=se,xb="value"in ji?ji.value:ji.textContent,yu=!0)),Ne=fg(Q,ct),0<Ne.length&&(ct=new WR(ct,i,null,d,se),ae.push({event:ct,listeners:Ne}),Je?ct.data=Je:(Je=XR(d),Je!==null&&(ct.data=Je)))),(Je=Wj?Gj(i,d):Vj(i,d))&&(ct=fg(Q,"onBeforeInput"),0<ct.length&&(Ne=new WR("onBeforeInput","beforeinput",null,d,se),ae.push({event:Ne,listeners:ct}),Ne.data=Je)),FH(ae,i,Q,d,se)}D2(ae,l)})}function sf(i,l,d){return{instance:i,listener:l,currentTarget:d}}function fg(i,l){for(var d=l+"Capture",h=[];i!==null;){var v=i,b=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||b===null||(v=xd(i,d),v!=null&&h.unshift(sf(i,v,b)),v=xd(i,l),v!=null&&h.push(sf(i,v,b))),i.tag===3)return h;i=i.return}return[]}function HH(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function U2(i,l,d,h,v){for(var b=l._reactName,_=[];d!==null&&d!==h;){var N=d,j=N.alternate,Q=N.stateNode;if(N=N.tag,j!==null&&j===h)break;N!==5&&N!==26&&N!==27||Q===null||(j=Q,v?(Q=xd(d,b),Q!=null&&_.unshift(sf(d,Q,j))):v||(Q=xd(d,b),Q!=null&&_.push(sf(d,Q,j)))),d=d.return}_.length!==0&&i.push({event:l,listeners:_})}var $H=/\r\n?/g,qH=/\u0000|\uFFFD/g;function F2(i){return(typeof i=="string"?i:""+i).replace($H,`
10
- `).replace(qH,"")}function z2(i,l){return l=F2(l),F2(i)===l}function Ft(i,l,d,h,v,b){switch(d){case"children":typeof h=="string"?l==="body"||l==="textarea"&&h===""||Z(i,h):(typeof h=="number"||typeof h=="bigint")&&l!=="body"&&Z(i,""+h);break;case"className":Ls(i,"class",h);break;case"tabIndex":Ls(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Ls(i,d,h);break;case"style":ke(i,h,b);break;case"data":if(l!=="object"){Ls(i,"data",h);break}case"src":case"href":if(h===""&&(l!=="a"||d!=="href")){i.removeAttribute(d);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(d);break}h=ar(""+h),i.setAttribute(d,h);break;case"action":case"formAction":if(typeof h=="function"){i.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(d==="formAction"?(l!=="input"&&Ft(i,l,"name",v.name,v,null),Ft(i,l,"formEncType",v.formEncType,v,null),Ft(i,l,"formMethod",v.formMethod,v,null),Ft(i,l,"formTarget",v.formTarget,v,null)):(Ft(i,l,"encType",v.encType,v,null),Ft(i,l,"method",v.method,v,null),Ft(i,l,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(d);break}h=ar(""+h),i.setAttribute(d,h);break;case"onClick":h!=null&&(i.onclick=tn);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(d=h.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}d=ar(""+h),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,""+h):i.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,""):i.removeAttribute(d);break;case"capture":case"download":h===!0?i.setAttribute(d,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,h):i.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(d,h):i.removeAttribute(d);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(d):i.setAttribute(d,h);break;case"popover":at("beforetoggle",i),at("toggle",i),Lo(i,"popover",h);break;case"xlinkActuate":mr(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":mr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":mr(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":mr(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":mr(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":mr(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":mr(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":mr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":mr(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Lo(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=en.get(d)||d,Lo(i,d,h))}}function i1(i,l,d,h,v,b){switch(d){case"style":ke(i,h,b);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(d=h.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"children":typeof h=="string"?Z(i,h):(typeof h=="number"||typeof h=="bigint")&&Z(i,""+h);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"onClick":h!=null&&(i.onclick=tn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gp.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(v=d.endsWith("Capture"),l=d.slice(2,v?d.length-7:void 0),b=i[nt]||null,b=b!=null?b[d]:null,typeof b=="function"&&i.removeEventListener(l,b,v),typeof h=="function")){typeof b!="function"&&b!==null&&(d in i?i[d]=null:i.hasAttribute(d)&&i.removeAttribute(d)),i.addEventListener(l,h,v);break e}d in i?i[d]=h:h===!0?i.setAttribute(d,""):Lo(i,d,h)}}}function Zn(i,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",i),at("load",i);var h=!1,v=!1,b;for(b in d)if(d.hasOwnProperty(b)){var _=d[b];if(_!=null)switch(b){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ft(i,l,b,_,d,null)}}v&&Ft(i,l,"srcSet",d.srcSet,d,null),h&&Ft(i,l,"src",d.src,d,null);return;case"input":at("invalid",i);var N=b=_=v=null,j=null,Q=null;for(h in d)if(d.hasOwnProperty(h)){var se=d[h];if(se!=null)switch(h){case"name":v=se;break;case"type":_=se;break;case"checked":j=se;break;case"defaultChecked":Q=se;break;case"value":b=se;break;case"defaultValue":N=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,l));break;default:Ft(i,l,h,se,d,null)}}_d(i,b,N,j,Q,_,v,!1);return;case"select":at("invalid",i),h=_=b=null;for(v in d)if(d.hasOwnProperty(v)&&(N=d[v],N!=null))switch(v){case"value":b=N;break;case"defaultValue":_=N;break;case"multiple":h=N;default:Ft(i,l,v,N,d,null)}l=b,d=_,i.multiple=!!h,l!=null?ao(i,!!h,l,!1):d!=null&&ao(i,!!h,d,!0);return;case"textarea":at("invalid",i),b=v=h=null;for(_ in d)if(d.hasOwnProperty(_)&&(N=d[_],N!=null))switch(_){case"value":h=N;break;case"defaultValue":v=N;break;case"children":b=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:Ft(i,l,_,N,d,null)}L(i,h,v,b);return;case"option":for(j in d)d.hasOwnProperty(j)&&(h=d[j],h!=null)&&(j==="selected"?i.selected=h&&typeof h!="function"&&typeof h!="symbol":Ft(i,l,j,h,d,null));return;case"dialog":at("beforetoggle",i),at("toggle",i),at("cancel",i),at("close",i);break;case"iframe":case"object":at("load",i);break;case"video":case"audio":for(h=0;h<rf.length;h++)at(rf[h],i);break;case"image":at("error",i),at("load",i);break;case"details":at("toggle",i);break;case"embed":case"source":case"link":at("error",i),at("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in d)if(d.hasOwnProperty(Q)&&(h=d[Q],h!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ft(i,l,Q,h,d,null)}return;default:if(Ue(l)){for(se in d)d.hasOwnProperty(se)&&(h=d[se],h!==void 0&&i1(i,l,se,h,d,void 0));return}}for(N in d)d.hasOwnProperty(N)&&(h=d[N],h!=null&&Ft(i,l,N,h,d,null))}function WH(i,l,d,h){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,b=null,_=null,N=null,j=null,Q=null,se=null;for(re in d){var ae=d[re];if(d.hasOwnProperty(re)&&ae!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":j=ae;default:h.hasOwnProperty(re)||Ft(i,l,re,null,h,ae)}}for(var te in h){var re=h[te];if(ae=d[te],h.hasOwnProperty(te)&&(re!=null||ae!=null))switch(te){case"type":b=re;break;case"name":v=re;break;case"checked":Q=re;break;case"defaultChecked":se=re;break;case"value":_=re;break;case"defaultValue":N=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,l));break;default:re!==ae&&Ft(i,l,te,re,h,ae)}}wd(i,_,N,j,Q,se,b,v);return;case"select":re=_=N=te=null;for(b in d)if(j=d[b],d.hasOwnProperty(b)&&j!=null)switch(b){case"value":break;case"multiple":re=j;default:h.hasOwnProperty(b)||Ft(i,l,b,null,h,j)}for(v in h)if(b=h[v],j=d[v],h.hasOwnProperty(v)&&(b!=null||j!=null))switch(v){case"value":te=b;break;case"defaultValue":N=b;break;case"multiple":_=b;default:b!==j&&Ft(i,l,v,b,h,j)}l=N,d=_,h=re,te!=null?ao(i,!!d,te,!1):!!h!=!!d&&(l!=null?ao(i,!!d,l,!0):ao(i,!!d,d?[]:"",!1));return;case"textarea":re=te=null;for(N in d)if(v=d[N],d.hasOwnProperty(N)&&v!=null&&!h.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Ft(i,l,N,null,h,v)}for(_ in h)if(v=h[_],b=d[_],h.hasOwnProperty(_)&&(v!=null||b!=null))switch(_){case"value":te=v;break;case"defaultValue":re=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==b&&Ft(i,l,_,v,h,b)}pe(i,te,re);return;case"option":for(var Re in d)te=d[Re],d.hasOwnProperty(Re)&&te!=null&&!h.hasOwnProperty(Re)&&(Re==="selected"?i.selected=!1:Ft(i,l,Re,null,h,te));for(j in h)te=h[j],re=d[j],h.hasOwnProperty(j)&&te!==re&&(te!=null||re!=null)&&(j==="selected"?i.selected=te&&typeof te!="function"&&typeof te!="symbol":Ft(i,l,j,te,h,re));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var De in d)te=d[De],d.hasOwnProperty(De)&&te!=null&&!h.hasOwnProperty(De)&&Ft(i,l,De,null,h,te);for(Q in h)if(te=h[Q],re=d[Q],h.hasOwnProperty(Q)&&te!==re&&(te!=null||re!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,l));break;default:Ft(i,l,Q,te,h,re)}return;default:if(Ue(l)){for(var zt in d)te=d[zt],d.hasOwnProperty(zt)&&te!==void 0&&!h.hasOwnProperty(zt)&&i1(i,l,zt,void 0,h,te);for(se in h)te=h[se],re=d[se],!h.hasOwnProperty(se)||te===re||te===void 0&&re===void 0||i1(i,l,se,te,h,re);return}}for(var G in d)te=d[G],d.hasOwnProperty(G)&&te!=null&&!h.hasOwnProperty(G)&&Ft(i,l,G,null,h,te);for(ae in h)te=h[ae],re=d[ae],!h.hasOwnProperty(ae)||te===re||te==null&&re==null||Ft(i,l,ae,te,h,re)}function B2(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function GH(){if(typeof performance.getEntriesByType=="function"){for(var i=0,l=0,d=performance.getEntriesByType("resource"),h=0;h<d.length;h++){var v=d[h],b=v.transferSize,_=v.initiatorType,N=v.duration;if(b&&N&&B2(_)){for(_=0,N=v.responseEnd,h+=1;h<d.length;h++){var j=d[h],Q=j.startTime;if(Q>N)break;var se=j.transferSize,ae=j.initiatorType;se&&B2(ae)&&(j=j.responseEnd,_+=se*(j<N?1:(N-Q)/(j-Q)))}if(--h,l+=8*(b+_)/(v.duration/1e3),i++,10<i)break}}if(0<i)return l/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var a1=null,l1=null;function hg(i){return i.nodeType===9?i:i.ownerDocument}function j2(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function H2(i,l){if(i===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&l==="foreignObject"?0:i}function u1(i,l){return i==="textarea"||i==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var c1=null;function VH(){var i=window.event;return i&&i.type==="popstate"?i===c1?!1:(c1=i,!0):(c1=null,!1)}var $2=typeof setTimeout=="function"?setTimeout:void 0,KH=typeof clearTimeout=="function"?clearTimeout:void 0,q2=typeof Promise=="function"?Promise:void 0,YH=typeof queueMicrotask=="function"?queueMicrotask:typeof q2<"u"?function(i){return q2.resolve(null).then(i).catch(ZH)}:$2;function ZH(i){setTimeout(function(){throw i})}function sa(i){return i==="head"}function W2(i,l){var d=l,h=0;do{var v=d.nextSibling;if(i.removeChild(d),v&&v.nodeType===8)if(d=v.data,d==="/$"||d==="/&"){if(h===0){i.removeChild(v),Gu(l);return}h--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")h++;else if(d==="html")of(i.ownerDocument.documentElement);else if(d==="head"){d=i.ownerDocument.head,of(d);for(var b=d.firstChild;b;){var _=b.nextSibling,N=b.nodeName;b[Li]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&b.rel.toLowerCase()==="stylesheet"||d.removeChild(b),b=_}}else d==="body"&&of(i.ownerDocument.body);d=v}while(d);Gu(l)}function G2(i,l){var d=i;i=0;do{var h=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),h&&h.nodeType===8)if(d=h.data,d==="/$"){if(i===0)break;i--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||i++;d=h}while(d)}function d1(i){var l=i.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":d1(d),bd(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}i.removeChild(d)}}function XH(i,l,d,h){for(;i.nodeType===1;){var v=d;if(i.nodeName.toLowerCase()!==l.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[Li])switch(l){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==v.rel||i.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||i.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||i.getAttribute("title")!==(v.title==null?null:v.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(b=i.getAttribute("src"),(b!==(v.src==null?null:v.src)||i.getAttribute("type")!==(v.type==null?null:v.type)||i.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(l==="input"&&i.type==="hidden"){var b=v.name==null?null:""+v.name;if(v.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=Ss(i.nextSibling),i===null)break}return null}function QH(i,l,d){if(l==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!d||(i=Ss(i.nextSibling),i===null))return null;return i}function V2(i,l){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Ss(i.nextSibling),i===null))return null;return i}function f1(i){return i.data==="$?"||i.data==="$~"}function h1(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function JH(i,l){var d=i.ownerDocument;if(i.data==="$~")i._reactRetry=l;else if(i.data!=="$?"||d.readyState!=="loading")l();else{var h=function(){l(),d.removeEventListener("DOMContentLoaded",h)};d.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}function Ss(i){for(;i!=null;i=i.nextSibling){var l=i.nodeType;if(l===1||l===3)break;if(l===8){if(l=i.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return i}var p1=null;function K2(i){i=i.nextSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"||d==="/&"){if(l===0)return Ss(i.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}i=i.nextSibling}return null}function Y2(i){i=i.previousSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return i;l--}else d!=="/$"&&d!=="/&"||l++}i=i.previousSibling}return null}function Z2(i,l,d){switch(l=hg(d),i){case"html":if(i=l.documentElement,!i)throw Error(r(452));return i;case"head":if(i=l.head,!i)throw Error(r(453));return i;case"body":if(i=l.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function of(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);bd(i)}var Es=new Map,X2=new Set;function pg(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Qo=ee.d;ee.d={f:e$,r:t$,D:n$,C:r$,L:s$,m:o$,X:a$,S:i$,M:l$};function e$(){var i=Qo.f(),l=og();return i||l}function t$(i){var l=Fi(i);l!==null&&l.tag===5&&l.type==="form"?pO(l):Qo.r(i)}var $u=typeof document>"u"?null:document;function Q2(i,l,d){var h=$u;if(h&&typeof l=="string"&&l){var v=Tr(l);v='link[rel="'+i+'"][href="'+v+'"]',typeof d=="string"&&(v+='[crossorigin="'+d+'"]'),X2.has(v)||(X2.add(v),i={rel:i,crossOrigin:d,href:l},h.querySelector(v)===null&&(l=h.createElement("link"),Zn(l,"link",i),an(l),h.head.appendChild(l)))}}function n$(i){Qo.D(i),Q2("dns-prefetch",i,null)}function r$(i,l){Qo.C(i,l),Q2("preconnect",i,l)}function s$(i,l,d){Qo.L(i,l,d);var h=$u;if(h&&i&&l){var v='link[rel="preload"][as="'+Tr(l)+'"]';l==="image"&&d&&d.imageSrcSet?(v+='[imagesrcset="'+Tr(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(v+='[imagesizes="'+Tr(d.imageSizes)+'"]')):v+='[href="'+Tr(i)+'"]';var b=v;switch(l){case"style":b=qu(i);break;case"script":b=Wu(i)}Es.has(b)||(i=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:i,as:l},d),Es.set(b,i),h.querySelector(v)!==null||l==="style"&&h.querySelector(af(b))||l==="script"&&h.querySelector(lf(b))||(l=h.createElement("link"),Zn(l,"link",i),an(l),h.head.appendChild(l)))}}function o$(i,l){Qo.m(i,l);var d=$u;if(d&&i){var h=l&&typeof l.as=="string"?l.as:"script",v='link[rel="modulepreload"][as="'+Tr(h)+'"][href="'+Tr(i)+'"]',b=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Wu(i)}if(!Es.has(b)&&(i=g({rel:"modulepreload",href:i},l),Es.set(b,i),d.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(lf(b)))return}h=d.createElement("link"),Zn(h,"link",i),an(h),d.head.appendChild(h)}}}function i$(i,l,d){Qo.S(i,l,d);var h=$u;if(h&&i){var v=gr(h).hoistableStyles,b=qu(i);l=l||"default";var _=v.get(b);if(!_){var N={loading:0,preload:null};if(_=h.querySelector(af(b)))N.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":l},d),(d=Es.get(b))&&g1(i,d);var j=_=h.createElement("link");an(j),Zn(j,"link",i),j._p=new Promise(function(Q,se){j.onload=Q,j.onerror=se}),j.addEventListener("load",function(){N.loading|=1}),j.addEventListener("error",function(){N.loading|=2}),N.loading|=4,gg(_,l,h)}_={type:"stylesheet",instance:_,count:1,state:N},v.set(b,_)}}}function a$(i,l){Qo.X(i,l);var d=$u;if(d&&i){var h=gr(d).hoistableScripts,v=Wu(i),b=h.get(v);b||(b=d.querySelector(lf(v)),b||(i=g({src:i,async:!0},l),(l=Es.get(v))&&m1(i,l),b=d.createElement("script"),an(b),Zn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function l$(i,l){Qo.M(i,l);var d=$u;if(d&&i){var h=gr(d).hoistableScripts,v=Wu(i),b=h.get(v);b||(b=d.querySelector(lf(v)),b||(i=g({src:i,async:!0,type:"module"},l),(l=Es.get(v))&&m1(i,l),b=d.createElement("script"),an(b),Zn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function J2(i,l,d,h){var v=(v=he.current)?pg(v):null;if(!v)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=qu(d.href),d=gr(v).hoistableStyles,h=d.get(l),h||(h={type:"style",instance:null,count:0,state:null},d.set(l,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){i=qu(d.href);var b=gr(v).hoistableStyles,_=b.get(i);if(_||(v=v.ownerDocument||v,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,_),(b=v.querySelector(af(i)))&&!b._p&&(_.instance=b,_.state.loading=5),Es.has(i)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Es.set(i,d),b||u$(v,i,d,_.state))),l&&h===null)throw Error(r(528,""));return _}if(l&&h!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Wu(d),d=gr(v).hoistableScripts,h=d.get(l),h||(h={type:"script",instance:null,count:0,state:null},d.set(l,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function qu(i){return'href="'+Tr(i)+'"'}function af(i){return'link[rel="stylesheet"]['+i+"]"}function eN(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function u$(i,l,d,h){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?h.loading=1:(l=i.createElement("link"),h.preload=l,l.addEventListener("load",function(){return h.loading|=1}),l.addEventListener("error",function(){return h.loading|=2}),Zn(l,"link",d),an(l),i.head.appendChild(l))}function Wu(i){return'[src="'+Tr(i)+'"]'}function lf(i){return"script[async]"+i}function tN(i,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var h=i.querySelector('style[data-href~="'+Tr(d.href)+'"]');if(h)return l.instance=h,an(h),h;var v=g({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),an(h),Zn(h,"style",v),gg(h,d.precedence,i),l.instance=h;case"stylesheet":v=qu(d.href);var b=i.querySelector(af(v));if(b)return l.state.loading|=4,l.instance=b,an(b),b;h=eN(d),(v=Es.get(v))&&g1(h,v),b=(i.ownerDocument||i).createElement("link"),an(b);var _=b;return _._p=new Promise(function(N,j){_.onload=N,_.onerror=j}),Zn(b,"link",h),l.state.loading|=4,gg(b,d.precedence,i),l.instance=b;case"script":return b=Wu(d.src),(v=i.querySelector(lf(b)))?(l.instance=v,an(v),v):(h=d,(v=Es.get(b))&&(h=g({},d),m1(h,v)),i=i.ownerDocument||i,v=i.createElement("script"),an(v),Zn(v,"link",h),i.head.appendChild(v),l.instance=v);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(h=l.instance,l.state.loading|=4,gg(h,d.precedence,i));return l.instance}function gg(i,l,d){for(var h=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,b=v,_=0;_<h.length;_++){var N=h[_];if(N.dataset.precedence===l)b=N;else if(b!==v)break}b?b.parentNode.insertBefore(i,b.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(i,l.firstChild))}function g1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function m1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var mg=null;function nN(i,l,d){if(mg===null){var h=new Map,v=mg=new Map;v.set(d,h)}else v=mg,h=v.get(d),h||(h=new Map,v.set(d,h));if(h.has(i))return h;for(h.set(i,null),d=d.getElementsByTagName(i),v=0;v<d.length;v++){var b=d[v];if(!(b[Li]||b[Rn]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var _=b.getAttribute(l)||"";_=i+_;var N=h.get(_);N?N.push(b):h.set(_,[b])}}return h}function rN(i,l,d){i=i.ownerDocument||i,i.head.insertBefore(d,l==="title"?i.querySelector("head > title"):null)}function c$(i,l,d){if(d===1||l.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(i=l.disabled,typeof l.precedence=="string"&&i==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function sN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function d$(i,l,d,h){if(d.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var v=qu(h.href),b=l.querySelector(af(v));if(b){l=b._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=vg.bind(i),l.then(i,i)),d.state.loading|=4,d.instance=b,an(b);return}b=l.ownerDocument||l,h=eN(h),(v=Es.get(v))&&g1(h,v),b=b.createElement("link"),an(b);var _=b;_._p=new Promise(function(N,j){_.onload=N,_.onerror=j}),Zn(b,"link",h),d.instance=b}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(i.count++,d=vg.bind(i),l.addEventListener("load",d),l.addEventListener("error",d))}}var v1=0;function f$(i,l){return i.stylesheets&&i.count===0&&bg(i,i.stylesheets),0<i.count||0<i.imgCount?function(d){var h=setTimeout(function(){if(i.stylesheets&&bg(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+l);0<i.imgBytes&&v1===0&&(v1=62500*GH());var v=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&bg(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>v1?50:800)+l);return i.unsuspend=d,function(){i.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function vg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)bg(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var yg=null;function bg(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,yg=new Map,l.forEach(h$,i),yg=null,vg.call(i))}function h$(i,l){if(!(l.state.loading&4)){var d=yg.get(i);if(d)var h=d.get(null);else{d=new Map,yg.set(i,d);for(var v=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<v.length;b++){var _=v[b];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(d.set(_.dataset.precedence,_),h=_)}h&&d.set(null,h)}v=l.instance,_=v.getAttribute("data-precedence"),b=d.get(_)||h,b===h&&d.set(null,v),d.set(_,v),this.count++,h=vg.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),b?b.parentNode.insertBefore(v,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(v,i.firstChild)),l.state.loading|=4}}var uf={$$typeof:T,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function p$(i,l,d,h,v,b,_,N,j){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=so(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=so(0),this.hiddenUpdates=so(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function oN(i,l,d,h,v,b,_,N,j,Q,se,ae){return i=new p$(i,l,d,_,j,Q,se,ae,N),l=1,b===!0&&(l|=24),b=Zr(3,null,null,l),i.current=b,b.stateNode=i,l=Zb(),l.refCount++,i.pooledCache=l,l.refCount++,b.memoizedState={element:h,isDehydrated:d,cache:l},e0(b),i}function iN(i){return i?(i=Cu,i):Cu}function aN(i,l,d,h,v,b){v=iN(v),h.context===null?h.context=v:h.pendingContext=v,h=Vi(l),h.payload={element:d},b=b===void 0?null:b,b!==null&&(h.callback=b),d=Ki(i,h,l),d!==null&&(Pr(d,i,l),Bd(d,i,l))}function lN(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function y1(i,l){lN(i,l),(i=i.alternate)&&lN(i,l)}function uN(i){if(i.tag===13||i.tag===31){var l=nl(i,67108864);l!==null&&Pr(l,i,67108864),y1(i,67108864)}}function cN(i){if(i.tag===13||i.tag===31){var l=ts();l=hu(l);var d=nl(i,l);d!==null&&Pr(d,i,l),y1(i,l)}}var Sg=!0;function g$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=2,b1(i,l,d,h)}finally{ee.p=b,$.T=v}}function m$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=8,b1(i,l,d,h)}finally{ee.p=b,$.T=v}}function b1(i,l,d,h){if(Sg){var v=S1(h);if(v===null)o1(i,l,h,Eg,d),fN(i,h);else if(y$(v,i,l,d,h))h.stopPropagation();else if(fN(i,h),l&4&&-1<v$.indexOf(i)){for(;v!==null;){var b=Fi(v);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var _=ks(b.pendingLanes);if(_!==0){var N=b;for(N.pendingLanes|=2,N.entangledLanes|=2;_;){var j=1<<31-Gn(_);N.entanglements[1]|=j,_&=~j}fo(b),(Rt&6)===0&&(rg=Gt()+500,nf(0))}}break;case 31:case 13:N=nl(b,2),N!==null&&Pr(N,b,2),og(),y1(b,2)}if(b=S1(h),b===null&&o1(i,l,h,Eg,d),b===v)break;v=b}v!==null&&h.stopPropagation()}else o1(i,l,h,null,d)}}function S1(i){return i=In(i),E1(i)}var Eg=null;function E1(i){if(Eg=null,i=Ui(i),i!==null){var l=o(i);if(l===null)i=null;else{var d=l.tag;if(d===13){if(i=a(l),i!==null)return i;i=null}else if(d===31){if(i=u(l),i!==null)return i;i=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;i=null}else l!==i&&(i=null)}}return Eg=i,null}function dN(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(gt()){case mn:return 2;case Ar:return 8;case no:case fd:return 32;case ko:return 268435456;default:return 32}default:return 32}}var C1=!1,oa=null,ia=null,aa=null,cf=new Map,df=new Map,la=[],v$="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function fN(i,l){switch(i){case"focusin":case"focusout":oa=null;break;case"dragenter":case"dragleave":ia=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":cf.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":df.delete(l.pointerId)}}function ff(i,l,d,h,v,b){return i===null||i.nativeEvent!==b?(i={blockedOn:l,domEventName:d,eventSystemFlags:h,nativeEvent:b,targetContainers:[v]},l!==null&&(l=Fi(l),l!==null&&uN(l)),i):(i.eventSystemFlags|=h,l=i.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),i)}function y$(i,l,d,h,v){switch(l){case"focusin":return oa=ff(oa,i,l,d,h,v),!0;case"dragenter":return ia=ff(ia,i,l,d,h,v),!0;case"mouseover":return aa=ff(aa,i,l,d,h,v),!0;case"pointerover":var b=v.pointerId;return cf.set(b,ff(cf.get(b)||null,i,l,d,h,v)),!0;case"gotpointercapture":return b=v.pointerId,df.set(b,ff(df.get(b)||null,i,l,d,h,v)),!0}return!1}function hN(i){var l=Ui(i.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){i.blockedOn=l,Di(i.priority,function(){cN(d)});return}}else if(l===31){if(l=u(d),l!==null){i.blockedOn=l,Di(i.priority,function(){cN(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){i.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Cg(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var d=S1(i.nativeEvent);if(d===null){d=i.nativeEvent;var h=new d.constructor(d.type,d);vr=h,d.target.dispatchEvent(h),vr=null}else return l=Fi(d),l!==null&&uN(l),i.blockedOn=d,!1;l.shift()}return!0}function pN(i,l,d){Cg(i)&&d.delete(l)}function b$(){C1=!1,oa!==null&&Cg(oa)&&(oa=null),ia!==null&&Cg(ia)&&(ia=null),aa!==null&&Cg(aa)&&(aa=null),cf.forEach(pN),df.forEach(pN)}function wg(i,l){i.blockedOn===l&&(i.blockedOn=null,C1||(C1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,b$)))}var _g=null;function gN(i){_g!==i&&(_g=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){_g===i&&(_g=null);for(var l=0;l<i.length;l+=3){var d=i[l],h=i[l+1],v=i[l+2];if(typeof h!="function"){if(E1(h||d)===null)continue;break}var b=Fi(d);b!==null&&(i.splice(l,3),l-=3,S0(b,{pending:!0,data:v,method:d.method,action:h},h,v))}}))}function Gu(i){function l(j){return wg(j,i)}oa!==null&&wg(oa,i),ia!==null&&wg(ia,i),aa!==null&&wg(aa,i),cf.forEach(l),df.forEach(l);for(var d=0;d<la.length;d++){var h=la[d];h.blockedOn===i&&(h.blockedOn=null)}for(;0<la.length&&(d=la[0],d.blockedOn===null);)hN(d),d.blockedOn===null&&la.shift();if(d=(i.ownerDocument||i).$$reactFormReplay,d!=null)for(h=0;h<d.length;h+=3){var v=d[h],b=d[h+1],_=v[nt]||null;if(typeof b=="function")_||gN(d);else if(_){var N=null;if(b&&b.hasAttribute("formAction")){if(v=b,_=b[nt]||null)N=_.formAction;else if(E1(v)!==null)continue}else N=_.action;typeof N=="function"?d[h+1]=N:(d.splice(h,3),h-=3),gN(d)}}}function mN(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(_){return v=_})},focusReset:"manual",scroll:"manual"})}function l(){v!==null&&(v(),v=null),h||setTimeout(d,20)}function d(){if(!h&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,v=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){h=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),v!==null&&(v(),v=null)}}}function w1(i){this._internalRoot=i}xg.prototype.render=w1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,h=ts();aN(d,h,i,l,null,null)},xg.prototype.unmount=w1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;aN(i.current,2,null,i,null,null),og(),l[Kr]=null}};function xg(i){this._internalRoot=i}xg.prototype.unstable_scheduleHydration=function(i){if(i){var l=hp();i={blockedOn:null,target:i,priority:l};for(var d=0;d<la.length&&l!==0&&l<la[d].priority;d++);la.splice(d,0,i),d===0&&hN(i)}};var vN=e.version;if(vN!=="19.2.7")throw Error(r(527,vN,"19.2.7"));ee.findDOMNode=function(i){var l=i._reactInternals;if(l===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(l),i=i!==null?p(i):null,i=i===null?null:i.stateNode,i};var S$={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ag=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ag.isDisabled&&Ag.supportsFiber)try{Mi=Ag.inject(S$),ir=Ag}catch{}}return vf.createRoot=function(i,l){if(!s(i))throw Error(r(299));var d=!1,h="",v=_O,b=xO,_=AO;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(_=l.onRecoverableError)),l=oN(i,1,!1,null,null,d,h,null,v,b,_,mN),i[Kr]=l.current,s1(i),new w1(l)},vf.hydrateRoot=function(i,l,d){if(!s(i))throw Error(r(299));var h=!1,v="",b=_O,_=xO,N=AO,j=null;return d!=null&&(d.unstable_strictMode===!0&&(h=!0),d.identifierPrefix!==void 0&&(v=d.identifierPrefix),d.onUncaughtError!==void 0&&(b=d.onUncaughtError),d.onCaughtError!==void 0&&(_=d.onCaughtError),d.onRecoverableError!==void 0&&(N=d.onRecoverableError),d.formState!==void 0&&(j=d.formState)),l=oN(i,1,!0,l,d??null,h,v,j,b,_,N,mN),l.context=iN(null),d=l.current,h=ts(),h=hu(h),v=Vi(h),v.callback=null,Ki(d,v,h),d=h,l.current.lanes=d,Do(l,d),fo(l),i[Kr]=l.current,s1(i),new xg(l)},vf.version="19.2.7",vf}var dM;function lG(){if(dM)return B1.exports;dM=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),B1.exports=aG(),B1.exports}var uG=lG(),$1,fM;function cG(){if(fM)return $1;fM=1;function t(){this.__data__=[],this.size=0}return $1=t,$1}var q1,hM;function Wh(){if(hM)return q1;hM=1;function t(e,n){return e===n||e!==e&&n!==n}return q1=t,q1}var W1,pM;function dy(){if(pM)return W1;pM=1;var t=Wh();function e(n,r){for(var s=n.length;s--;)if(t(n[s][0],r))return s;return-1}return W1=e,W1}var G1,gM;function dG(){if(gM)return G1;gM=1;var t=dy(),e=Array.prototype,n=e.splice;function r(s){var o=this.__data__,a=t(o,s);if(a<0)return!1;var u=o.length-1;return a==u?o.pop():n.call(o,a,1),--this.size,!0}return G1=r,G1}var V1,mM;function fG(){if(mM)return V1;mM=1;var t=dy();function e(n){var r=this.__data__,s=t(r,n);return s<0?void 0:r[s][1]}return V1=e,V1}var K1,vM;function hG(){if(vM)return K1;vM=1;var t=dy();function e(n){return t(this.__data__,n)>-1}return K1=e,K1}var Y1,yM;function pG(){if(yM)return Y1;yM=1;var t=dy();function e(n,r){var s=this.__data__,o=t(s,n);return o<0?(++this.size,s.push([n,r])):s[o][1]=r,this}return Y1=e,Y1}var Z1,bM;function fy(){if(bM)return Z1;bM=1;var t=cG(),e=dG(),n=fG(),r=hG(),s=pG();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,Z1=o,Z1}var X1,SM;function gG(){if(SM)return X1;SM=1;var t=fy();function e(){this.__data__=new t,this.size=0}return X1=e,X1}var Q1,EM;function mG(){if(EM)return Q1;EM=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return Q1=t,Q1}var J1,CM;function vG(){if(CM)return J1;CM=1;function t(e){return this.__data__.get(e)}return J1=t,J1}var eS,wM;function yG(){if(wM)return eS;wM=1;function t(e){return this.__data__.has(e)}return eS=t,eS}var tS,_M;function x6(){if(_M)return tS;_M=1;var t=typeof Tg=="object"&&Tg&&Tg.Object===Object&&Tg;return tS=t,tS}var nS,xM;function No(){if(xM)return nS;xM=1;var t=x6(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return nS=n,nS}var rS,AM;function hy(){if(AM)return rS;AM=1;var t=No(),e=t.Symbol;return rS=e,rS}var sS,TM;function bG(){if(TM)return sS;TM=1;var t=hy(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,s=t?t.toStringTag:void 0;function o(a){var u=n.call(a,s),c=a[s];try{a[s]=void 0;var f=!0}catch{}var p=r.call(a);return f&&(u?a[s]=c:delete a[s]),p}return sS=o,sS}var oS,RM;function SG(){if(RM)return oS;RM=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return oS=n,oS}var iS,IM;function Xc(){if(IM)return iS;IM=1;var t=hy(),e=bG(),n=SG(),r="[object Null]",s="[object Undefined]",o=t?t.toStringTag:void 0;function a(u){return u==null?u===void 0?s:r:o&&o in Object(u)?e(u):n(u)}return iS=a,iS}var aS,OM;function xi(){if(OM)return aS;OM=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return aS=t,aS}var lS,NM;function IA(){if(NM)return lS;NM=1;var t=Xc(),e=xi(),n="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",o="[object Proxy]";function a(u){if(!e(u))return!1;var c=t(u);return c==r||c==s||c==n||c==o}return lS=a,lS}var uS,MM;function EG(){if(MM)return uS;MM=1;var t=No(),e=t["__core-js_shared__"];return uS=e,uS}var cS,PM;function CG(){if(PM)return cS;PM=1;var t=EG(),e=(function(){var r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!e&&e in r}return cS=n,cS}var dS,kM;function A6(){if(kM)return dS;kM=1;var t=Function.prototype,e=t.toString;function n(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return dS=n,dS}var fS,DM;function wG(){if(DM)return fS;DM=1;var t=IA(),e=CG(),n=xi(),r=A6(),s=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,c=a.toString,f=u.hasOwnProperty,p=RegExp("^"+c.call(f).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(m){if(!n(m)||e(m))return!1;var y=t(m)?p:o;return y.test(r(m))}return fS=g,fS}var hS,LM;function _G(){if(LM)return hS;LM=1;function t(e,n){return e?.[n]}return hS=t,hS}var pS,UM;function Xl(){if(UM)return pS;UM=1;var t=wG(),e=_G();function n(r,s){var o=e(r,s);return t(o)?o:void 0}return pS=n,pS}var gS,FM;function OA(){if(FM)return gS;FM=1;var t=Xl(),e=No(),n=t(e,"Map");return gS=n,gS}var mS,zM;function py(){if(zM)return mS;zM=1;var t=Xl(),e=t(Object,"create");return mS=e,mS}var vS,BM;function xG(){if(BM)return vS;BM=1;var t=py();function e(){this.__data__=t?t(null):{},this.size=0}return vS=e,vS}var yS,jM;function AG(){if(jM)return yS;jM=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return yS=t,yS}var bS,HM;function TG(){if(HM)return bS;HM=1;var t=py(),e="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function s(o){var a=this.__data__;if(t){var u=a[o];return u===e?void 0:u}return r.call(a,o)?a[o]:void 0}return bS=s,bS}var SS,$M;function RG(){if($M)return SS;$M=1;var t=py(),e=Object.prototype,n=e.hasOwnProperty;function r(s){var o=this.__data__;return t?o[s]!==void 0:n.call(o,s)}return SS=r,SS}var ES,qM;function IG(){if(qM)return ES;qM=1;var t=py(),e="__lodash_hash_undefined__";function n(r,s){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=t&&s===void 0?e:s,this}return ES=n,ES}var CS,WM;function OG(){if(WM)return CS;WM=1;var t=xG(),e=AG(),n=TG(),r=RG(),s=IG();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,CS=o,CS}var wS,GM;function NG(){if(GM)return wS;GM=1;var t=OG(),e=fy(),n=OA();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return wS=r,wS}var _S,VM;function MG(){if(VM)return _S;VM=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return _S=t,_S}var xS,KM;function gy(){if(KM)return xS;KM=1;var t=MG();function e(n,r){var s=n.__data__;return t(r)?s[typeof r=="string"?"string":"hash"]:s.map}return xS=e,xS}var AS,YM;function PG(){if(YM)return AS;YM=1;var t=gy();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return AS=e,AS}var TS,ZM;function kG(){if(ZM)return TS;ZM=1;var t=gy();function e(n){return t(this,n).get(n)}return TS=e,TS}var RS,XM;function DG(){if(XM)return RS;XM=1;var t=gy();function e(n){return t(this,n).has(n)}return RS=e,RS}var IS,QM;function LG(){if(QM)return IS;QM=1;var t=gy();function e(n,r){var s=t(this,n),o=s.size;return s.set(n,r),this.size+=s.size==o?0:1,this}return IS=e,IS}var OS,JM;function NA(){if(JM)return OS;JM=1;var t=NG(),e=PG(),n=kG(),r=DG(),s=LG();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,OS=o,OS}var NS,eP;function UG(){if(eP)return NS;eP=1;var t=fy(),e=OA(),n=NA(),r=200;function s(o,a){var u=this.__data__;if(u instanceof t){var c=u.__data__;if(!e||c.length<r-1)return c.push([o,a]),this.size=++u.size,this;u=this.__data__=new n(c)}return u.set(o,a),this.size=u.size,this}return NS=s,NS}var MS,tP;function MA(){if(tP)return MS;tP=1;var t=fy(),e=gG(),n=mG(),r=vG(),s=yG(),o=UG();function a(u){var c=this.__data__=new t(u);this.size=c.size}return a.prototype.clear=e,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=s,a.prototype.set=o,MS=a,MS}var PS,nP;function FG(){if(nP)return PS;nP=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return PS=e,PS}var kS,rP;function zG(){if(rP)return kS;rP=1;function t(e){return this.__data__.has(e)}return kS=t,kS}var DS,sP;function BG(){if(sP)return DS;sP=1;var t=NA(),e=FG(),n=zG();function r(s){var o=-1,a=s==null?0:s.length;for(this.__data__=new t;++o<a;)this.add(s[o])}return r.prototype.add=r.prototype.push=e,r.prototype.has=n,DS=r,DS}var LS,oP;function jG(){if(oP)return LS;oP=1;function t(e,n){for(var r=-1,s=e==null?0:e.length;++r<s;)if(n(e[r],r,e))return!0;return!1}return LS=t,LS}var US,iP;function HG(){if(iP)return US;iP=1;function t(e,n){return e.has(n)}return US=t,US}var FS,aP;function T6(){if(aP)return FS;aP=1;var t=BG(),e=jG(),n=HG(),r=1,s=2;function o(a,u,c,f,p,g){var m=c&r,y=a.length,S=u.length;if(y!=S&&!(m&&S>y))return!1;var E=g.get(a),C=g.get(u);if(E&&C)return E==u&&C==a;var w=-1,x=!0,T=c&s?new t:void 0;for(g.set(a,u),g.set(u,a);++w<y;){var R=a[w],M=u[w];if(f)var O=m?f(M,R,w,u,a,g):f(R,M,w,a,u,g);if(O!==void 0){if(O)continue;x=!1;break}if(T){if(!e(u,function(I,P){if(!n(T,P)&&(R===I||p(R,I,c,f,g)))return T.push(P)})){x=!1;break}}else if(!(R===M||p(R,M,c,f,g))){x=!1;break}}return g.delete(a),g.delete(u),x}return FS=o,FS}var zS,lP;function R6(){if(lP)return zS;lP=1;var t=No(),e=t.Uint8Array;return zS=e,zS}var BS,uP;function $G(){if(uP)return BS;uP=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s,o){r[++n]=[o,s]}),r}return BS=t,BS}var jS,cP;function qG(){if(cP)return jS;cP=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s){r[++n]=s}),r}return jS=t,jS}var HS,dP;function WG(){if(dP)return HS;dP=1;var t=hy(),e=R6(),n=Wh(),r=T6(),s=$G(),o=qG(),a=1,u=2,c="[object Boolean]",f="[object Date]",p="[object Error]",g="[object Map]",m="[object Number]",y="[object RegExp]",S="[object Set]",E="[object String]",C="[object Symbol]",w="[object ArrayBuffer]",x="[object DataView]",T=t?t.prototype:void 0,R=T?T.valueOf:void 0;function M(O,I,P,k,H,U,B){switch(P){case x:if(O.byteLength!=I.byteLength||O.byteOffset!=I.byteOffset)return!1;O=O.buffer,I=I.buffer;case w:return!(O.byteLength!=I.byteLength||!U(new e(O),new e(I)));case c:case f:case m:return n(+O,+I);case p:return O.name==I.name&&O.message==I.message;case y:case E:return O==I+"";case g:var W=s;case S:var Y=k&a;if(W||(W=o),O.size!=I.size&&!Y)return!1;var ne=B.get(O);if(ne)return ne==I;k|=u,B.set(O,I);var $=r(W(O),W(I),k,H,U,B);return B.delete(O),$;case C:if(R)return R.call(O)==R.call(I)}return!1}return HS=M,HS}var $S,fP;function I6(){if(fP)return $S;fP=1;function t(e,n){for(var r=-1,s=n.length,o=e.length;++r<s;)e[o+r]=n[r];return e}return $S=t,$S}var qS,hP;function Ai(){if(hP)return qS;hP=1;var t=Array.isArray;return qS=t,qS}var WS,pP;function O6(){if(pP)return WS;pP=1;var t=I6(),e=Ai();function n(r,s,o){var a=s(r);return e(r)?a:t(a,o(r))}return WS=n,WS}var GS,gP;function GG(){if(gP)return GS;gP=1;function t(e,n){for(var r=-1,s=e==null?0:e.length,o=0,a=[];++r<s;){var u=e[r];n(u,r,e)&&(a[o++]=u)}return a}return GS=t,GS}var VS,mP;function N6(){if(mP)return VS;mP=1;function t(){return[]}return VS=t,VS}var KS,vP;function M6(){if(vP)return KS;vP=1;var t=GG(),e=N6(),n=Object.prototype,r=n.propertyIsEnumerable,s=Object.getOwnPropertySymbols,o=s?function(a){return a==null?[]:(a=Object(a),t(s(a),function(u){return r.call(a,u)}))}:e;return KS=o,KS}var YS,yP;function VG(){if(yP)return YS;yP=1;function t(e,n){for(var r=-1,s=Array(e);++r<e;)s[r]=n(r);return s}return YS=t,YS}var ZS,bP;function Ql(){if(bP)return ZS;bP=1;function t(e){return e!=null&&typeof e=="object"}return ZS=t,ZS}var XS,SP;function KG(){if(SP)return XS;SP=1;var t=Xc(),e=Ql(),n="[object Arguments]";function r(s){return e(s)&&t(s)==n}return XS=r,XS}var QS,EP;function PA(){if(EP)return QS;EP=1;var t=KG(),e=Ql(),n=Object.prototype,r=n.hasOwnProperty,s=n.propertyIsEnumerable,o=t((function(){return arguments})())?t:function(a){return e(a)&&r.call(a,"callee")&&!s.call(a,"callee")};return QS=o,QS}var Lf={exports:{}},JS,CP;function YG(){if(CP)return JS;CP=1;function t(){return!1}return JS=t,JS}Lf.exports;var wP;function kA(){return wP||(wP=1,(function(t,e){var n=No(),r=YG(),s=e&&!e.nodeType&&e,o=s&&!0&&t&&!t.nodeType&&t,a=o&&o.exports===s,u=a?n.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||r;t.exports=f})(Lf,Lf.exports)),Lf.exports}var eE,_P;function my(){if(_P)return eE;_P=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(r,s){var o=typeof r;return s=s??t,!!s&&(o=="number"||o!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<s}return eE=n,eE}var tE,xP;function DA(){if(xP)return tE;xP=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return tE=e,tE}var nE,AP;function ZG(){if(AP)return nE;AP=1;var t=Xc(),e=DA(),n=Ql(),r="[object Arguments]",s="[object Array]",o="[object Boolean]",a="[object Date]",u="[object Error]",c="[object Function]",f="[object Map]",p="[object Number]",g="[object Object]",m="[object RegExp]",y="[object Set]",S="[object String]",E="[object WeakMap]",C="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",T="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",O="[object Int32Array]",I="[object Uint8Array]",P="[object Uint8ClampedArray]",k="[object Uint16Array]",H="[object Uint32Array]",U={};U[x]=U[T]=U[R]=U[M]=U[O]=U[I]=U[P]=U[k]=U[H]=!0,U[r]=U[s]=U[C]=U[o]=U[w]=U[a]=U[u]=U[c]=U[f]=U[p]=U[g]=U[m]=U[y]=U[S]=U[E]=!1;function B(W){return n(W)&&e(W.length)&&!!U[t(W)]}return nE=B,nE}var rE,TP;function XG(){if(TP)return rE;TP=1;function t(e){return function(n){return e(n)}}return rE=t,rE}var Uf={exports:{}};Uf.exports;var RP;function QG(){return RP||(RP=1,(function(t,e){var n=x6(),r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===r,a=o&&n.process,u=(function(){try{var c=s&&s.require&&s.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();t.exports=u})(Uf,Uf.exports)),Uf.exports}var sE,IP;function LA(){if(IP)return sE;IP=1;var t=ZG(),e=XG(),n=QG(),r=n&&n.isTypedArray,s=r?e(r):t;return sE=s,sE}var oE,OP;function P6(){if(OP)return oE;OP=1;var t=VG(),e=PA(),n=Ai(),r=kA(),s=my(),o=LA(),a=Object.prototype,u=a.hasOwnProperty;function c(f,p){var g=n(f),m=!g&&e(f),y=!g&&!m&&r(f),S=!g&&!m&&!y&&o(f),E=g||m||y||S,C=E?t(f.length,String):[],w=C.length;for(var x in f)(p||u.call(f,x))&&!(E&&(x=="length"||y&&(x=="offset"||x=="parent")||S&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||s(x,w)))&&C.push(x);return C}return oE=c,oE}var iE,NP;function UA(){if(NP)return iE;NP=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,s=typeof r=="function"&&r.prototype||t;return n===s}return iE=e,iE}var aE,MP;function k6(){if(MP)return aE;MP=1;function t(e,n){return function(r){return e(n(r))}}return aE=t,aE}var lE,PP;function JG(){if(PP)return lE;PP=1;var t=k6(),e=t(Object.keys,Object);return lE=e,lE}var uE,kP;function eV(){if(kP)return uE;kP=1;var t=UA(),e=JG(),n=Object.prototype,r=n.hasOwnProperty;function s(o){if(!t(o))return e(o);var a=[];for(var u in Object(o))r.call(o,u)&&u!="constructor"&&a.push(u);return a}return uE=s,uE}var cE,DP;function vy(){if(DP)return cE;DP=1;var t=IA(),e=DA();function n(r){return r!=null&&e(r.length)&&!t(r)}return cE=n,cE}var dE,LP;function D6(){if(LP)return dE;LP=1;var t=P6(),e=eV(),n=vy();function r(s){return n(s)?t(s):e(s)}return dE=r,dE}var fE,UP;function tV(){if(UP)return fE;UP=1;var t=O6(),e=M6(),n=D6();function r(s){return t(s,n,e)}return fE=r,fE}var hE,FP;function nV(){if(FP)return hE;FP=1;var t=tV(),e=1,n=Object.prototype,r=n.hasOwnProperty;function s(o,a,u,c,f,p){var g=u&e,m=t(o),y=m.length,S=t(a),E=S.length;if(y!=E&&!g)return!1;for(var C=y;C--;){var w=m[C];if(!(g?w in a:r.call(a,w)))return!1}var x=p.get(o),T=p.get(a);if(x&&T)return x==a&&T==o;var R=!0;p.set(o,a),p.set(a,o);for(var M=g;++C<y;){w=m[C];var O=o[w],I=a[w];if(c)var P=g?c(I,O,w,a,o,p):c(O,I,w,o,a,p);if(!(P===void 0?O===I||f(O,I,u,c,p):P)){R=!1;break}M||(M=w=="constructor")}if(R&&!M){var k=o.constructor,H=a.constructor;k!=H&&"constructor"in o&&"constructor"in a&&!(typeof k=="function"&&k instanceof k&&typeof H=="function"&&H instanceof H)&&(R=!1)}return p.delete(o),p.delete(a),R}return hE=s,hE}var pE,zP;function rV(){if(zP)return pE;zP=1;var t=Xl(),e=No(),n=t(e,"DataView");return pE=n,pE}var gE,BP;function sV(){if(BP)return gE;BP=1;var t=Xl(),e=No(),n=t(e,"Promise");return gE=n,gE}var mE,jP;function oV(){if(jP)return mE;jP=1;var t=Xl(),e=No(),n=t(e,"Set");return mE=n,mE}var vE,HP;function iV(){if(HP)return vE;HP=1;var t=Xl(),e=No(),n=t(e,"WeakMap");return vE=n,vE}var yE,$P;function aV(){if($P)return yE;$P=1;var t=rV(),e=OA(),n=sV(),r=oV(),s=iV(),o=Xc(),a=A6(),u="[object Map]",c="[object Object]",f="[object Promise]",p="[object Set]",g="[object WeakMap]",m="[object DataView]",y=a(t),S=a(e),E=a(n),C=a(r),w=a(s),x=o;return(t&&x(new t(new ArrayBuffer(1)))!=m||e&&x(new e)!=u||n&&x(n.resolve())!=f||r&&x(new r)!=p||s&&x(new s)!=g)&&(x=function(T){var R=o(T),M=R==c?T.constructor:void 0,O=M?a(M):"";if(O)switch(O){case y:return m;case S:return u;case E:return f;case C:return p;case w:return g}return R}),yE=x,yE}var bE,qP;function lV(){if(qP)return bE;qP=1;var t=MA(),e=T6(),n=WG(),r=nV(),s=aV(),o=Ai(),a=kA(),u=LA(),c=1,f="[object Arguments]",p="[object Array]",g="[object Object]",m=Object.prototype,y=m.hasOwnProperty;function S(E,C,w,x,T,R){var M=o(E),O=o(C),I=M?p:s(E),P=O?p:s(C);I=I==f?g:I,P=P==f?g:P;var k=I==g,H=P==g,U=I==P;if(U&&a(E)){if(!a(C))return!1;M=!0,k=!1}if(U&&!k)return R||(R=new t),M||u(E)?e(E,C,w,x,T,R):n(E,C,I,w,x,T,R);if(!(w&c)){var B=k&&y.call(E,"__wrapped__"),W=H&&y.call(C,"__wrapped__");if(B||W){var Y=B?E.value():E,ne=W?C.value():C;return R||(R=new t),T(Y,ne,w,x,R)}}return U?(R||(R=new t),r(E,C,w,x,T,R)):!1}return bE=S,bE}var SE,WP;function L6(){if(WP)return SE;WP=1;var t=lV(),e=Ql();function n(r,s,o,a,u){return r===s?!0:r==null||s==null||!e(r)&&!e(s)?r!==r&&s!==s:t(r,s,o,a,n,u)}return SE=n,SE}var me=function(){return me=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},me.apply(this,arguments)};function FA(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function ht(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function At(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),s,o=[],a;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(u){a={error:u}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Qt(t,e,n){if(arguments.length===2)for(var r=0,s=e.length,o;r<s;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var kt;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(kt||(kt={}));var Ul;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(Ul||(Ul={}));var O_=kt.Start,zA=kt.Stop,Gh=kt.Raise,yy=kt.Send,U6=kt.Cancel,uV=kt.NullEvent,BA=kt.Assign;kt.After;kt.DoneState;var F6=kt.Log,cV=kt.Init,N_=kt.Invoke;kt.ErrorExecution;var GP=kt.ErrorPlatform,dV=kt.ErrorCustom,jA=kt.Update,fV=kt.Choose,hV=kt.Pure,z6=".",VP={},M_="xstate.guard",pV="",Pg;function HA(t,e,n){n===void 0&&(n=z6);var r=Xf(t,n),s=Xf(e,n);return It(s)?It(r)?s===r:!1:It(r)?r in s:Object.keys(r).every(function(o){return o in s?HA(r[o],s[o]):!1})}function B6(t){try{return It(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function P_(t,e){try{return Qc(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function gV(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function Xf(t,e){if(gV(t))return t.value;if(Qc(t))return vv(t);if(typeof t!="string")return t;var n=P_(t,e);return vv(n)}function vv(t){if(t.length===1)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function Ff(t,e){for(var n={},r=Object.keys(t),s=0;s<r.length;s++){var o=r[s];n[o]=e(t[o],o,t,s)}return n}function KP(t,e,n){var r,s,o={};try{for(var a=ht(Object.keys(t)),u=a.next();!u.done;u=a.next()){var c=u.value,f=t[c];n(f)&&(o[c]=e(f,c,t))}}catch(p){r={error:p}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}var mV=function(t){return function(e){var n,r,s=e;try{for(var o=ht(t),a=o.next();!a.done;a=o.next()){var u=a.value;s=s[u]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s}};function vV(t,e){return function(n){var r,s,o=n;try{for(var a=ht(t),u=a.next();!u.done;u=a.next()){var c=u.value;o=o[e][c]}}catch(f){r={error:f}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}}function zm(t){if(!t)return[[]];if(It(t))return[[t]];var e=cn(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:zm(t[n]).map(function(s){return[n].concat(s)})}));return e}function cn(t){var e;return(e=[]).concat.apply(e,Qt([],At(t),!1))}function j6(t){return Qc(t)?t:[t]}function Hs(t){return t===void 0?[]:j6(t)}function yv(t,e,n){var r,s;if(Ot(t))return t(e,n.data);var o={};try{for(var a=ht(Object.keys(t)),u=a.next();!u.done;u=a.next()){var c=u.value,f=t[c];Ot(f)?o[c]=f(e,n.data):o[c]=f}}catch(p){r={error:p}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}function yV(t){return/^(done|error)\./.test(t)}function YP(t){return!!(t instanceof Promise||t!==null&&(Ot(t)||typeof t=="object")&&Ot(t.then))}function bV(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function SV(t,e){var n,r,s=At([[],[]],2),o=s[0],a=s[1];try{for(var u=ht(t),c=u.next();!c.done;c=u.next()){var f=c.value;e(f)?o.push(f):a.push(f)}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return[o,a]}function H6(t,e){return Ff(t.states,function(n,r){if(n){var s=(It(e)?void 0:e[r])||(n?n.current:void 0);if(s)return{current:s,states:H6(n,s)}}})}function EV(t,e){return{current:e,states:H6(t,e)}}function ZP(t,e,n,r){var s=t&&n.reduce(function(o,a){var u,c,f=a.assignment,p={state:r,action:a,_event:e},g={};if(Ot(f))g=f(o,e.data,p);else try{for(var m=ht(Object.keys(f)),y=m.next();!y.done;y=m.next()){var S=y.value,E=f[S];g[S]=Ot(E)?E(o,e.data,p):E}}catch(C){u={error:C}}finally{try{y&&!y.done&&(c=m.return)&&c.call(m)}finally{if(u)throw u.error}}return Object.assign({},o,g)},t);return s}var CV=function(){};function Qc(t){return Array.isArray(t)}function Ot(t){return typeof t=="function"}function It(t){return typeof t=="string"}function $6(t,e){if(t)return It(t)?{type:M_,name:t,predicate:e?e[t]:void 0}:Ot(t)?{type:M_,name:t.name,predicate:t}:t}function wV(t){try{return"subscribe"in t&&Ot(t.subscribe)}catch{return!1}}var Ea=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();Pg={},Pg[Ea]=function(){return this},Pg[Symbol.observable]=function(){return this};function Nc(t){return!!t&&"__xstatenode"in t}function _V(t){return!!t&&typeof t.send=="function"}var xV=(function(){var t=0;return function(){return t++,t.toString(16)}})();function by(t,e){return It(t)||typeof t=="number"?me({type:t},e):t}function Jn(t,e){if(!It(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=by(t);return me({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function Ku(t,e){var n=j6(e).map(function(r){return typeof r>"u"||typeof r=="string"||Nc(r)?{target:r,event:t}:me(me({},r),{event:t})});return n}function AV(t){if(!(t===void 0||t===pV))return Hs(t)}function q6(t,e,n,r,s){var o=t.options.guards,a={state:s,cond:e,_event:r};if(e.type===M_)return(o?.[e.name]||e.predicate)(n,r.data,a);var u=o?.[e.type];if(!u)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return u(n,r.data,a)}function W6(t){return typeof t=="string"?{type:t}:t}function Qf(t,e,n){var r=function(){},s=typeof t=="object",o=s?t:null;return{next:((s?t.next:t)||r).bind(o),error:((s?t.error:e)||r).bind(o),complete:((s?t.complete:n)||r).bind(o)}}function kg(t,e){return"".concat(t,":invocation[").concat(e,"]")}function k_(t){return(t.type===Gh||t.type===yy&&t.to===Ul.Internal)&&typeof t.delay!="number"}var Nl=Jn({type:cV});function bv(t,e){return e&&e[t]||void 0}function Mc(t,e){var n;if(It(t)||typeof t=="number"){var r=bv(t,e);Ot(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Ot(t))n={type:t.name||t.toString(),exec:t};else{var r=bv(t.type,e);if(Ot(r))n=me(me({},t),{exec:r});else if(r){var s=r.type||t.type;n=me(me(me({},r),t),{type:s})}else n=t}return n}var li=function(t,e){if(!t)return[];var n=Qc(t)?t:[t];return n.map(function(r){return Mc(r,e)})};function Sy(t){var e=Mc(t);return me(me({id:It(t)?t:e.id},e),{type:e.type})}function G6(t,e){return{type:Gh,event:typeof t=="function"?t:by(t),delay:e?e.delay:void 0,id:e?.id}}function V6(t,e,n,r){var s={_event:n},o=Jn(Ot(t.event)?t.event(e,n.data,s):t.event),a;if(It(t.delay)){var u=r&&r[t.delay];a=Ot(u)?u(e,n.data,s):u}else a=Ot(t.delay)?t.delay(e,n.data,s):t.delay;return me(me({},t),{type:Gh,_event:o,delay:a})}function Ey(t,e){return{to:e?e.to:void 0,type:yy,event:Ot(t)?t:by(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Ot(t)?t.name:B6(t)}}function K6(t,e,n,r){var s={_event:n},o=Jn(Ot(t.event)?t.event(e,n.data,s):t.event),a;if(It(t.delay)){var u=r&&r[t.delay];a=Ot(u)?u(e,n.data,s):u}else a=Ot(t.delay)?t.delay(e,n.data,s):t.delay;var c=Ot(t.to)?t.to(e,n.data,s):t.to;return me(me({},t),{to:c,_event:o,event:o.data,delay:a})}function Y6(t,e){return Ey(t,me(me({},e),{to:Ul.Parent}))}function Z6(){return Y6(jA)}var X6=function(t,e,n){return me(me({},t),{value:It(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},Q6=function(t){return{type:U6,sendId:t}};function J6(t){var e=Sy(t);return{type:kt.Start,activity:e,exec:void 0}}function e8(t){var e=Ot(t)?t:Sy(t);return{type:kt.Stop,activity:e,exec:void 0}}function t8(t,e,n){var r=Ot(t.activity)?t.activity(e,n.data):t.activity,s=typeof r=="string"?{id:r}:r,o={type:kt.Stop,activity:s};return o}var n8=function(t){return{type:BA,assignment:t}};function r8(t,e){var n=e?"#".concat(e):"";return"".concat(kt.After,"(").concat(t,")").concat(n)}function zf(t,e){var n="".concat(kt.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Jf(t,e){var n="".concat(kt.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function vc(t,e){var n="".concat(kt.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function s8(t,e){return Ey(function(n,r){return r},me(me({},e),{to:t}))}function TV(t){return{type:kt.Choose,conds:t}}var RV=function(t){var e,n,r=[];try{for(var s=ht(t),o=s.next();!o.done;o=s.next())for(var a=o.value,u=0;u<a.actions.length;){if(a.actions[u].type===BA){r.push(a.actions[u]),a.actions.splice(u,1);continue}u++}}catch(c){e={error:c}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return r};function bh(t,e,n,r,s,o,a){a===void 0&&(a=!1);var u=a?[]:RV(s),c=u.length?ZP(n,r,u,e):n,f=a?[n]:void 0,p=[];function g(S,E){var C;switch(E.type){case Gh:{var w=V6(E,c,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,c,r),w}case yy:var x=K6(E,c,r,t.options.delays);return o&&x.to!==Ul.Internal&&(S==="entry"?p.push(x):o(x,c,r)),x;case F6:{var T=X6(E,c,r);return o?.(T,c,r),T}case fV:{var R=E,M=(C=R.conds.find(function($){var ee=$6($.cond,t.options.guards);return!ee||q6(t,ee,c,r,o?void 0:e)}))===null||C===void 0?void 0:C.actions;if(!M)return[];var O=At(bh(t,e,c,r,[{type:S,actions:li(Hs(M),t.options.actions)}],o,a),2),I=O[0],P=O[1];return c=P,f?.push(c),I}case hV:{var M=E.get(c,r.data);if(!M)return[];var k=At(bh(t,e,c,r,[{type:S,actions:li(Hs(M),t.options.actions)}],o,a),2),H=k[0],U=k[1];return c=U,f?.push(c),H}case zA:{var T=t8(E,c,r);return o?.(T,n,r),T}case BA:{c=ZP(c,r,[E],o?void 0:e),f?.push(c);break}default:var B=Mc(E,t.options.actions),W=B.exec;if(o)o(B,c,r);else if(W&&f){var Y=f.length-1,ne=me(me({},B),{exec:function($){for(var ee=[],fe=1;fe<arguments.length;fe++)ee[fe-1]=arguments[fe];W.apply(void 0,Qt([f[Y]],At(ee),!1))}});B=ne}return B}}function m(S){var E,C,w=[];try{for(var x=ht(S.actions),T=x.next();!T.done;T=x.next()){var R=T.value,M=g(S.type,R);M&&(w=w.concat(M))}}catch(O){E={error:O}}finally{try{T&&!T.done&&(C=x.return)&&C.call(x)}finally{if(E)throw E.error}}return p.forEach(function(O){o(O,c,r)}),p.length=0,w}var y=cn(s.map(m));return[y,c]}const o8=Object.freeze(Object.defineProperty({__proto__:null,after:r8,assign:n8,cancel:Q6,choose:TV,done:zf,doneInvoke:Jf,error:vc,forwardTo:s8,getActionFunction:bv,initEvent:Nl,raise:G6,resolveActions:bh,resolveLog:X6,resolveRaise:V6,resolveSend:K6,resolveStop:t8,send:Ey,sendParent:Y6,sendUpdate:Z6,start:J6,stop:e8,toActionObject:Mc,toActionObjects:li,toActivityDefinition:Sy},Symbol.toStringTag,{value:"Module"}));var Sv=[],cc=function(t,e){Sv.push(t);var n=e(t);return Sv.pop(),n},IV=function(t){return t(Sv[Sv.length-1])};function i8(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[Ea]=function(){return this},e}function OV(t,e,n,r){var s,o=W6(t.src),a=(s=e?.options.services)===null||s===void 0?void 0:s[o.type],u=t.data?yv(t.data,n,r):void 0,c=a?$A(a,t.id,u):i8(t.id);return c.meta=t,c}function $A(t,e,n){var r=i8(e);if(r.deferred=!0,Nc(t)){var s=r.state=cc(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return s}}return r}function NV(t){try{return typeof t.send=="function"}catch{return!1}}function MV(t){return NV(t)&&"id"in t}function PV(t){var e;return me((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[Ea]=function(){return this},e),t)}var Ev=function(t){return t.type==="atomic"||t.type==="final"};function a8(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function Sh(t){return a8(t).filter(function(e){return e.type!=="history"})}function l8(t){var e=[t];return Ev(t)?e:e.concat(cn(Sh(t).map(l8)))}function Bf(t,e){var n,r,s,o,a,u,c,f,p=new Set(t),g=D_(p),m=new Set(e);try{for(var y=ht(m),S=y.next();!S.done;S=y.next())for(var E=S.value,C=E.parent;C&&!m.has(C);)m.add(C),C=C.parent}catch(k){n={error:k}}finally{try{S&&!S.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}var w=D_(m);try{for(var x=ht(m),T=x.next();!T.done;T=x.next()){var E=T.value;if(E.type==="compound"&&(!w.get(E)||!w.get(E).length))g.get(E)?g.get(E).forEach(function(H){return m.add(H)}):E.initialStateNodes.forEach(function(H){return m.add(H)});else if(E.type==="parallel")try{for(var R=(a=void 0,ht(Sh(E))),M=R.next();!M.done;M=R.next()){var O=M.value;m.has(O)||(m.add(O),g.get(O)?g.get(O).forEach(function(H){return m.add(H)}):O.initialStateNodes.forEach(function(H){return m.add(H)}))}}catch(H){a={error:H}}finally{try{M&&!M.done&&(u=R.return)&&u.call(R)}finally{if(a)throw a.error}}}}catch(k){s={error:k}}finally{try{T&&!T.done&&(o=x.return)&&o.call(x)}finally{if(s)throw s.error}}try{for(var I=ht(m),P=I.next();!P.done;P=I.next())for(var E=P.value,C=E.parent;C&&!m.has(C);)m.add(C),C=C.parent}catch(k){c={error:k}}finally{try{P&&!P.done&&(f=I.return)&&f.call(I)}finally{if(c)throw c.error}}return m}function u8(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(Ev(r))return r.key}else return{}}var s={};return n.forEach(function(o){s[o.key]=u8(o,e)}),s}function D_(t){var e,n,r=new Map;try{for(var s=ht(t),o=s.next();!o.done;o=s.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return r}function kV(t,e){var n=Bf([t],e);return u8(t,D_(n))}function jf(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function DV(t){return Qt([],At(new Set(cn(Qt([],At(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Bm(t,e){return e.type==="compound"?Sh(e).some(function(n){return n.type==="final"&&jf(t,n)}):e.type==="parallel"?Sh(e).every(function(n){return Bm(t,n)}):!1}function LV(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function XP(t){return new Set(cn(t.map(function(e){return e.tags})))}function c8(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(It(t)||It(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(s){return c8(t[s],e[s])})}function UV(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function FV(t,e){var n=t.exec,r=me(me({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var $s=(function(){function t(e){var n=this,r;this.actions=[],this.activities=VP,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||VP,this.meta=LV(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(r=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&r!==void 0?r:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return DV(n.configuration)}})}return t.from=function(e,n){if(e instanceof t)return e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,events:[],configuration:[],transitions:[],children:{}}):e;var r=Nl;return new t({value:e,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=Nl;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),It(e))return[e];var s=Object.keys(e);return s.concat.apply(s,Qt([],At(s.map(function(o){return r.toStrings(e[o],n).map(function(a){return o+n+a})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=FA(e,["configuration","transitions","tags","machine"]);return me(me({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return HA(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;CV(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,e);return!!r?.transitions.length&&r.transitions.some(function(s){return s.target!==void 0||s.actions.length})},t})(),zV={deferEvents:!1},QP=(function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=me(me({},zV),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},t})(),EE=new Map,BV=0,yf={bookId:function(){return"x:".concat(BV++)},register:function(t,e){return EE.set(t,e),t},get:function(t){return EE.get(t)},free:function(t){EE.delete(t)}};function qA(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function jV(){var t=qA();if(t&&"__xstate__"in t)return t.__xstate__}function HV(t){if(qA()){var e=jV();e&&e.register(t)}}function $V(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,s=[],o=!1,a=function(){if(!o){for(o=!0;s.length>0;){var f=s.shift();n=t.transition(n,f,c),r.forEach(function(p){return p.next(n)})}o=!1}},u=PV({id:e.id,send:function(f){s.push(f),a()},getSnapshot:function(){return n},subscribe:function(f,p,g){var m=Qf(f,p,g);return r.add(m),m.next(n),{unsubscribe:function(){r.delete(m)}}}}),c={parent:e.parent,self:u,id:e.id||"anonymous",observers:r};return n=t.start?t.start(c):n,u}var L_={sync:!1,autoForward:!1},Nn;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Nn||(Nn={}));var qV=(function(){function t(e,n){n===void 0&&(n=t.defaultOptions);var r=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Nn.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(p,g){if(Qc(p))return r.batch(p),r.state;var m=Jn(by(p,g));if(r.status===Nn.Stopped)return r.state;if(r.status!==Nn.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(m.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
11
- Event: `).concat(JSON.stringify(m.data)));return r.scheduler.schedule(function(){r.forward(m);var y=r._nextState(m);r.update(y,m)}),r._state},this.sendTo=function(p,g,m){var y=r.parent&&(g===Ul.Parent||r.parent.id===g),S=y?r.parent:It(g)?g===Ul.Internal?r:r.children.get(g)||yf.get(g):_V(g)?g:void 0;if(!S){if(!y)throw new Error("Unable to send event to child '".concat(g,"' from service '").concat(r.id,"'."));return}if("machine"in S){if(r.status!==Nn.Stopped||r.parent!==S||r.state.done){var E=me(me({},p),{name:p.name===dV?"".concat(vc(r.id)):p.name,origin:r.sessionId});!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([S,E]):S.send(E)}}else!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([S,p.data]):S.send(p.data)},this._exec=function(p,g,m,y){y===void 0&&(y=r.machine.options.actions);var S=p.exec||bv(p.type,y),E=Ot(S)?S:S?S.exec:p.exec;if(E)try{return E(g,m.data,r.machine.config.predictableActionArguments?{action:p,_event:m}:{action:p,state:r.state,_event:m})}catch(Y){throw r.parent&&r.parent.send({type:"xstate.error",data:Y}),Y}switch(p.type){case Gh:{var C=p;r.defer(C);break}case yy:var w=p;if(typeof w.delay=="number"){r.defer(w);return}else w.to?r.sendTo(w._event,w.to,m===Nl):r.send(w._event);break;case U6:r.cancel(p.sendId);break;case O_:{if(r.status!==Nn.Running)return;var x=p.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[x.id||x.type])break;if(x.type===kt.Invoke){var T=W6(x.src),R=r.machine.options.services?r.machine.options.services[T.type]:void 0,M=x.id,O=x.data,I="autoForward"in x?x.autoForward:!!x.forward;if(!R)return;var P=O?yv(O,g,m):void 0;if(typeof R=="string")return;var k=Ot(R)?R(g,m.data,{data:P,src:T,meta:x.meta}):R;if(!k)return;var H=void 0;Nc(k)&&(k=P?k.withContext(P):k,H={autoForward:I}),r.spawn(k,M,H)}else r.spawnActivity(x);break}case zA:{r.stopChild(p.activity.id);break}case F6:var U=p,B=U.label,W=U.value;B?r.logger(B,W):r.logger(W);break}};var s=me(me({},t.defaultOptions),n),o=s.clock,a=s.logger,u=s.parent,c=s.id,f=c!==void 0?c:e.id;this.id=f,this.logger=a,this.clock=o,this.parent=u,this.options=s,this.scheduler=new QP({deferEvents:this.options.deferEvents}),this.sessionId=yf.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:cc(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,n){var r,s;try{for(var o=ht(e.actions),a=o.next();!a.done;a=o.next()){var u=a.value;this.exec(u,e,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,s,o,a,u,c,f,p,g=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===Nl)&&this.options.execute)this.execute(this.state);else for(var m=void 0;m=this._outgoingQueue.shift();)m[0].send(m[1]);if(this.children.forEach(function(k){g.state.children[k.id]=k}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var y=ht(this.eventListeners),S=y.next();!S.done;S=y.next()){var E=S.value;E(e.event)}}catch(k){r={error:k}}finally{try{S&&!S.done&&(s=y.return)&&s.call(y)}finally{if(r)throw r.error}}try{for(var C=ht(this.listeners),w=C.next();!w.done;w=C.next()){var E=w.value;E(e,e.event)}}catch(k){o={error:k}}finally{try{w&&!w.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}try{for(var x=ht(this.contextListeners),T=x.next();!T.done;T=x.next()){var R=T.value;R(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(k){u={error:k}}finally{try{T&&!T.done&&(c=x.return)&&c.call(x)}finally{if(u)throw u.error}}if(this.state.done){var M=e.configuration.find(function(k){return k.type==="final"&&k.parent===g.machine}),O=M&&M.doneData?yv(M.doneData,e.context,n):void 0;this._doneEvent=Jf(this.id,O);try{for(var I=ht(this.doneListeners),P=I.next();!P.done;P=I.next()){var E=P.value;E(this._doneEvent)}}catch(k){f={error:k}}finally{try{P&&!P.done&&(p=I.return)&&p.call(I)}finally{if(f)throw f.error}}this._stop(),this._stopChildren(),yf.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Nn.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var s=this,o=Qf(e,n,r);this.listeners.add(o.next),this.status!==Nn.NotStarted&&o.next(this.state);var a=function(){s.doneListeners.delete(a),s.stopListeners.delete(a),o.complete()};return this.status===Nn.Stopped?o.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){s.listeners.delete(o.next),s.doneListeners.delete(a),s.stopListeners.delete(a)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===Nn.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var n=this;if(this.status===Nn.Running)return this;this.machine._init(),yf.register(this.sessionId,this),this.initialized=!0,this.status=Nn.Running;var r=e===void 0?this.initialState:cc(this,function(){return UV(e)?n.machine.resolveState(e):n.machine.resolveState($s.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,Nl)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Ot(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,s,o,a,u,c,f,p;try{for(var g=ht(this.listeners),m=g.next();!m.done;m=g.next()){var y=m.value;this.listeners.delete(y)}}catch(I){e={error:I}}finally{try{m&&!m.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}try{for(var S=ht(this.stopListeners),E=S.next();!E.done;E=S.next()){var y=E.value;y(),this.stopListeners.delete(y)}}catch(I){r={error:I}}finally{try{E&&!E.done&&(s=S.return)&&s.call(S)}finally{if(r)throw r.error}}try{for(var C=ht(this.contextListeners),w=C.next();!w.done;w=C.next()){var y=w.value;this.contextListeners.delete(y)}}catch(I){o={error:I}}finally{try{w&&!w.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}try{for(var x=ht(this.doneListeners),T=x.next();!T.done;T=x.next()){var y=T.value;this.doneListeners.delete(y)}}catch(I){u={error:I}}finally{try{T&&!T.done&&(c=x.return)&&c.call(x)}finally{if(u)throw u.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Nn.Stopped,this._initialState=void 0;try{for(var R=ht(Object.keys(this.delayedEventsMap)),M=R.next();!M.done;M=R.next()){var O=M.value;this.clock.clearTimeout(this.delayedEventsMap[O])}}catch(I){f={error:I}}finally{try{M&&!M.done&&(p=R.return)&&p.call(R)}finally{if(f)throw f.error}}this.scheduler.clear(),this.scheduler=new QP({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=e._state)===null||r===void 0)&&r.done)){var s=Jn({type:"xstate.stop"}),o=cc(e,function(){var a=cn(Qt([],At(e.state.configuration),!1).sort(function(g,m){return m.order-g.order}).map(function(g){return li(g.onExit,e.machine.options.actions)})),u=At(bh(e.machine,e.state,e.state.context,s,[{type:"exit",actions:a}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),c=u[0],f=u[1],p=new $s({value:e.state.value,context:f,_event:s,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:c.filter(function(g){return!k_(g)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return p.changed=!0,p});e.update(o,s),e._stopChildren(),yf.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Nn.NotStarted&&this.options.deferEvents)){if(this.status!==Nn.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(e.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var s,o,a=n.state,u=!1,c=[],f=function(y){var S=Jn(y);n.forward(S),a=cc(n,function(){return n.machine.transition(a,S,void 0,r||void 0)}),c.push.apply(c,Qt([],At(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(E){return FV(E,a)})),!1)),u=u||!!a.changed};try{for(var p=ht(e),g=p.next();!g.done;g=p.next()){var m=g.value;f(m)}}catch(y){s={error:y}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(s)throw s.error}}a.changed=u,a.actions=c,n.update(a,Jn(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var s=Jn(e);if(s.name.indexOf(GP)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(GP)===0}))throw s.data.data;var o=cc(this,function(){return r.machine.transition(r.state,s,void 0,n||void 0)});return o},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var s=ht(this.forwardTo),o=s.next();!o.done;o=s.next()){var a=o.value,u=this.children.get(a);if(!u)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));u.send(e)}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},t.prototype.defer=function(e){var n=this,r=this.clock.setTimeout(function(){"to"in e&&e.to?n.sendTo(e._event,e.to,!0):n.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=r)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(e,n.context,n._event,r)},t.prototype.removeChild=function(e){var n;this.children.delete(e),this.forwardTo.delete(e),(n=this.state)===null||n===void 0||delete n.children[e]},t.prototype.stopChild=function(e){var n=this.children.get(e);n&&(this.removeChild(e),Ot(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Nn.Running)return $A(e,n);if(YP(e))return this.spawnPromise(Promise.resolve(e),n);if(Ot(e))return this.spawnCallback(e,n);if(MV(e))return this.spawnActor(e,n);if(wV(e))return this.spawnObservable(e,n);if(Nc(e))return this.spawnMachine(e,me(me({},r),{id:n}));if(bV(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var s=new t(e,me(me({},this.options),{parent:this,id:n.id||e.id})),o=me(me({},L_),n);o.sync&&s.onTransition(function(u){r.send(jA,{state:u,id:s.id})});var a=s;return this.children.set(s.id,a),o.autoForward&&this.forwardTo.add(s.id),s.onDone(function(u){r.removeChild(s.id),r.send(Jn(u,{origin:s.id}))}).start(),a},t.prototype.spawnBehavior=function(e,n){var r=$V(e,{id:n,parent:this});return this.children.set(n,r),r},t.prototype.spawnPromise=function(e,n){var r,s=this,o=!1,a;e.then(function(c){o||(a=c,s.removeChild(n),s.send(Jn(Jf(n,c),{origin:n})))},function(c){if(!o){s.removeChild(n);var f=vc(n,c);try{s.send(Jn(f,{origin:n}))}catch{s.devTools&&s.devTools.send(f,s.state),s.machine.strict&&s.stop()}}});var u=(r={id:n,send:function(){},subscribe:function(c,f,p){var g=Qf(c,f,p),m=!1;return e.then(function(y){m||(g.next(y),!m&&g.complete())},function(y){m||g.error(y)}),{unsubscribe:function(){return m=!0}}},stop:function(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[Ea]=function(){return this},r);return this.children.set(n,u),u},t.prototype.spawnCallback=function(e,n){var r,s=this,o=!1,a=new Set,u=new Set,c,f=function(m){c=m,u.forEach(function(y){return y(m)}),!o&&s.send(Jn(m,{origin:n}))},p;try{p=e(f,function(m){a.add(m)})}catch(m){this.send(vc(n,m))}if(YP(p))return this.spawnPromise(p,n);var g=(r={id:n,send:function(m){return a.forEach(function(y){return y(m)})},subscribe:function(m){var y=Qf(m);return u.add(y.next),{unsubscribe:function(){u.delete(y.next)}}},stop:function(){o=!0,Ot(p)&&p()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[Ea]=function(){return this},r);return this.children.set(n,g),g},t.prototype.spawnObservable=function(e,n){var r,s=this,o,a=e.subscribe(function(c){o=c,s.send(Jn(c,{origin:n}))},function(c){s.removeChild(n),s.send(Jn(vc(n,c),{origin:n}))},function(){s.removeChild(n),s.send(Jn(Jf(n),{origin:n}))}),u=(r={id:n,send:function(){},subscribe:function(c,f,p){return e.subscribe(c,f,p)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[Ea]=function(){return this},r);return this.children.set(n,u),u},t.prototype.spawnActor=function(e,n){return this.children.set(n,e),e},t.prototype.spawnActivity=function(e){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(n){var r=n(this.state.context,e);this.spawnEffect(e.id,r)}},t.prototype.spawnEffect=function(e,n){var r;this.children.set(e,(r={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},r[Ea]=function(){return this},r))},t.prototype.attachDev=function(){var e=qA();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(me(me({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:me({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}HV(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[Ea]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Nn.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,n){return setTimeout(e,n)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=d8,t})(),WV=function(t){return It(t)?me(me({},L_),{name:t}):me(me(me({},L_),{name:xV()}),t)};function bf(t,e){var n=WV(e);return IV(function(r){return r?r.spawn(t,n.name,n):$A(t,n.name)})}function d8(t,e){var n=new qV(t,e);return n}function GV(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function Dg(t){return me(me({type:N_},t),{toJSON:function(){t.onDone,t.onError;var e=FA(t,["onDone","onError"]);return me(me({},e),{type:N_,src:GV(t.src)})}})}var Lg="",U_="#",CE="*",Yu={},Zu=function(t){return t[0]===U_},VV=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},KV=(function(){function t(e,n,r,s){r===void 0&&(r="context"in e?e.context:void 0);var o=this,a;this.config=e,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(VV(),n),this.parent=s?.parent,this.key=this.config.key||s?.key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:z6),this.id=this.config.id||Qt([this.machine.key],At(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?Ff(this.config.states,function(f,p){var g,m=new t(f,{},void 0,{parent:o,key:p});return Object.assign(o.idMap,me((g={},g[m.id]=m,g),m.idMap)),m}):Yu;var u=0;function c(f){var p,g;f.order=u++;try{for(var m=ht(a8(f)),y=m.next();!y.done;y=m.next()){var S=y.value;c(S)}}catch(E){p={error:E}}finally{try{y&&!y.done&&(g=m.return)&&g.call(m)}finally{if(p)throw p.error}}}c(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(f){var p=f.event;return p===Lg}):Lg in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Hs(this.config.entry||this.config.onEntry).map(function(f){return Mc(f)}),this.onExit=Hs(this.config.exit||this.config.onExit).map(function(f){return Mc(f)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Hs(this.config.invoke).map(function(f,p){var g,m;if(Nc(f)){var y=kg(o.id,p);return o.machine.options.services=me((g={},g[y]=f,g),o.machine.options.services),Dg({src:y,id:y})}else if(It(f.src)){var y=f.id||kg(o.id,p);return Dg(me(me({},f),{id:y,src:f.src}))}else if(Nc(f.src)||Ot(f.src)){var y=f.id||kg(o.id,p);return o.machine.options.services=me((m={},m[y]=f.src,m),o.machine.options.services),Dg(me(me({id:y},f),{src:y}))}else{var S=f.src;return Dg(me(me({id:kg(o.id,p)},f),{src:S}))}}),this.activities=Hs(this.config.activities).concat(this.invoke).map(function(f){return Sy(f)}),this.transition=this.transition.bind(this),this.tags=Hs(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||l8(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,s=r.actions,o=r.activities,a=r.guards,u=r.services,c=r.delays;return new t(this.config,{actions:me(me({},s),e.actions),activities:me(me({},o),e.activities),guards:me(me({},a),e.guards),services:me(me({},u),e.services),delays:me(me({},c),e.delays)},n??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return Ot(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Ff(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var n=e===Lg,r=this.transitions.filter(function(s){var o=s.eventType===e;return n?o:o||s.eventType===CE});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(o,a){var u=Ot(o)?"".concat(e.id,":delay[").concat(a,"]"):o,c=r8(u,e.id);return e.onEntry.push(Ey(c,{delay:o})),e.onExit.push(Q6(c)),c},s=Qc(n)?n.map(function(o,a){var u=r(o.delay,a);return me(me({},o),{event:u})}):cn(Object.keys(n).map(function(o,a){var u=n[o],c=It(u)?{target:u}:u,f=isNaN(+o)?o:+o,p=r(f,a);return Hs(c).map(function(g){return me(me({},g),{event:p,delay:f})})}));return s.map(function(o){var a=o.delay;return me(me({},e.formatTransition(o)),{delay:a})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var s=e instanceof $s?e.value:Xf(e,this.delimiter);if(It(s)){var o=this.getStateNode(s).initial;return o!==void 0?this.getStateNodes((n={},n[s]=o,n)):[this,this.states[s]]}var a=Object.keys(s),u=[this];return u.push.apply(u,Qt([],At(cn(a.map(function(c){return r.getStateNode(c).getStateNodes(s[c])}))),!1)),u},t.prototype.handles=function(e){var n=B6(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof $s?e:$s.create(e),r=Array.from(Bf([],this.getStateNodes(n.value)));return new $s(me(me({},n),{value:this.resolve(n.value),configuration:r,done:Bm(r,this),tags:XP(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var s=this.getStateNode(e),o=s.next(n,r);return!o||!o.transitions.length?this.next(n,r):o},t.prototype.transitionCompoundNode=function(e,n,r){var s=Object.keys(e),o=this.getStateNode(s[0]),a=o._transition(e[s[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},t.prototype.transitionParallelNode=function(e,n,r){var s,o,a={};try{for(var u=ht(Object.keys(e)),c=u.next();!c.done;c=u.next()){var f=c.value,p=e[f];if(p){var g=this.getStateNode(f),m=g._transition(p,n,r);m&&(a[f]=m)}}}catch(w){s={error:w}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(s)throw s.error}}var y=Object.keys(a).map(function(w){return a[w]}),S=cn(y.map(function(w){return w.transitions})),E=y.some(function(w){return w.transitions.length>0});if(!E)return this.next(n,r);var C=cn(Object.keys(a).map(function(w){return a[w].configuration}));return{transitions:S,exitSet:cn(y.map(function(w){return w.exitSet})),configuration:C,source:n,actions:cn(Object.keys(a).map(function(w){return a[w].actions}))}},t.prototype._transition=function(e,n,r){return It(e)?this.transitionLeafNode(e,n,r):Object.keys(e).length===1?this.transitionCompoundNode(e,n,r):this.transitionParallelNode(e,n,r)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,Jn(n))},t.prototype.next=function(e,n){var r,s,o=this,a=n.name,u=[],c=[],f;try{for(var p=ht(this.getCandidates(a)),g=p.next();!g.done;g=p.next()){var m=g.value,y=m.cond,S=m.in,E=e.context,C=S?It(S)&&Zu(S)?e.matches(Xf(this.getStateNodeById(S).path,this.delimiter)):HA(Xf(S,this.delimiter),mV(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!y||q6(this.machine,y,E,n,e)}catch(R){throw new Error("Unable to evaluate guard '".concat(y.name||y.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
12
- `).concat(R.message))}if(w&&C){m.target!==void 0&&(c=m.target),u.push.apply(u,Qt([],At(m.actions),!1)),f=m;break}}}catch(R){r={error:R}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(r)throw r.error}}if(f){if(!c.length)return{transitions:[f],exitSet:[],configuration:e.value?[this]:[],source:e,actions:u};var x=cn(c.map(function(R){return o.getRelativeStateNodes(R,e.historyValue)})),T=!!f.internal;return{transitions:[f],exitSet:T?[]:cn(c.map(function(R){return o.getPotentiallyReenteringNodes(R)})),configuration:x,source:e,actions:u}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var n=[],r=this,s=e;r&&r!==s;)n.push(r),r=r.parent;return r!==s?[]:(n.push(s),n)},t.prototype.getActions=function(e,n,r,s,o,a,u){var c,f,p,g,m=this,y=a?Bf([],this.getStateNodes(a.value)):[],S=new Set;try{for(var E=ht(Array.from(e).sort(function(U,B){return U.order-B.order})),C=E.next();!C.done;C=E.next()){var w=C.value;(!jf(y,w)||jf(r.exitSet,w)||w.parent&&S.has(w.parent))&&S.add(w)}}catch(U){c={error:U}}finally{try{C&&!C.done&&(f=E.return)&&f.call(E)}finally{if(c)throw c.error}}try{for(var x=ht(y),T=x.next();!T.done;T=x.next()){var w=T.value;(!jf(e,w)||jf(r.exitSet,w.parent))&&r.exitSet.push(w)}}catch(U){p={error:U}}finally{try{T&&!T.done&&(g=x.return)&&g.call(x)}finally{if(p)throw p.error}}r.exitSet.sort(function(U,B){return B.order-U.order});var R=Array.from(S).sort(function(U,B){return U.order-B.order}),M=new Set(r.exitSet),O=cn(R.map(function(U){var B=[];if(U.type!=="final")return B;var W=U.parent;if(!W.parent)return B;B.push(zf(U.id,U.doneData),zf(W.id,U.doneData?yv(U.doneData,s,o):void 0));var Y=W.parent;return Y.type==="parallel"&&Sh(Y).every(function(ne){return Bm(r.configuration,ne)})&&B.push(zf(Y.id)),B})),I=R.map(function(U){var B=U.onEntry,W=U.activities.map(function(Y){return J6(Y)});return{type:"entry",actions:li(u?Qt(Qt([],At(B),!1),At(W),!1):Qt(Qt([],At(W),!1),At(B),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:O.map(function(U){return G6(U)})}),P=Array.from(M).map(function(U){return{type:"exit",actions:li(Qt(Qt([],At(U.onExit),!1),At(U.activities.map(function(B){return e8(B)})),!1),m.machine.options.actions)}}),k=P.concat({type:"transition",actions:li(r.actions,this.machine.options.actions)}).concat(I);if(n){var H=li(cn(Qt([],At(e),!1).sort(function(U,B){return B.order-U.order}).map(function(U){return U.onExit})),this.machine.options.actions).filter(function(U){return!k_(U)});return k.concat({type:"stop",actions:H})}return k},t.prototype.transition=function(e,n,r,s){e===void 0&&(e=this.initialState);var o=Jn(n),a;if(e instanceof $s)a=r===void 0?e:this.resolveState($s.from(e,r));else{var u=It(e)?this.resolve(vv(this.getResolvedPath(e))):this.resolve(e),c=r??this.machine.context;a=this.resolveState($s.from(u,c))}if(this.strict&&!this.events.includes(o.name)&&!yV(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var f=this._transition(a.value,a,o)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},p=Bf([],this.getStateNodes(a.value)),g=f.configuration.length?Bf(p,f.configuration):p;return f.configuration=Qt([],At(g),!1),this.resolveTransition(f,a,a.context,s,o)},t.prototype.resolveRaisedTransition=function(e,n,r,s){var o,a=e.actions;return e=this.transition(e,n,void 0,s),e._event=r,e.event=r.data,(o=e.actions).unshift.apply(o,Qt([],At(a),!1)),e},t.prototype.resolveTransition=function(e,n,r,s,o){var a,u,c,f,p=this;o===void 0&&(o=Nl);var g=e.configuration,m=!n||e.transitions.length>0,y=m?e.configuration:n?n.configuration:[],S=Bm(y,this),E=m?kV(this.machine,g):void 0,C=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,w=this.getActions(new Set(y),S,e,r,o,n,s),x=n?me({},n.activities):{};try{for(var T=ht(w),R=T.next();!R.done;R=T.next()){var M=R.value;try{for(var O=(c=void 0,ht(M.actions)),I=O.next();!I.done;I=O.next()){var P=I.value;P.type===O_?x[P.activity.id||P.activity.type]=P:P.type===zA&&(x[P.activity.id||P.activity.type]=!1)}}catch(J){c={error:J}}finally{try{I&&!I.done&&(f=O.return)&&f.call(O)}finally{if(c)throw c.error}}}}catch(J){a={error:J}}finally{try{R&&!R.done&&(u=T.return)&&u.call(T)}finally{if(a)throw a.error}}var k=At(bh(this,n,r,o,w,s,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),H=k[0],U=k[1],B=At(SV(H,k_),2),W=B[0],Y=B[1],ne=H.filter(function(J){var oe;return J.type===O_&&((oe=J.activity)===null||oe===void 0?void 0:oe.type)===N_}),$=ne.reduce(function(J,oe){return J[oe.activity.id]=OV(oe.activity,p.machine,U,o),J},n?me({},n.children):{}),ee=new $s({value:E||n.value,context:U,_event:o,_sessionid:n?n._sessionid:null,historyValue:E?C?EV(C,E):void 0:n?n.historyValue:void 0,history:!E||e.source?n:void 0,actions:E?Y:[],activities:E?x:n?n.activities:{},events:[],configuration:y,transitions:e.transitions,children:$,done:S,tags:XP(y),machine:this}),fe=r!==U;ee.changed=o.name===jA||fe;var de=ee.history;de&&delete de.history;var Ae=!S&&(this._transient||g.some(function(J){return J._transient}));if(!m&&(!Ae||o.name===Lg))return ee;var D=ee;if(!S)for(Ae&&(D=this.resolveRaisedTransition(D,{type:uV},o,s));W.length;){var V=W.shift();D=this.resolveRaisedTransition(D,V._event,o,s)}var K=D.changed||(de?!!D.actions.length||fe||typeof de.value!=typeof D.value||!c8(D.value,de.value):void 0);return D.changed=K,D.history=de,D},t.prototype.getStateNode=function(e){if(Zu(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[e];if(!n)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return n},t.prototype.getStateNodeById=function(e){var n=Zu(e)?e.slice(U_.length):e;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&Zu(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=P_(e,this.delimiter).slice(),r=this;n.length;){var s=n.shift();if(!s.length)break;r=r.getStateNode(s)}return r},t.prototype.resolve=function(e){var n,r=this;if(!e)return this.initialStateValue||Yu;switch(this.type){case"parallel":return Ff(this.initialStateValue,function(o,a){return o?r.getStateNode(a).resolve(e[a]||o):Yu});case"compound":if(It(e)){var s=this.getStateNode(e);return s.type==="parallel"||s.type==="compound"?(n={},n[e]=s.initialStateValue,n):e}return Object.keys(e).length?Ff(e,function(o,a){return o?r.getStateNode(a).resolve(o):Yu}):this.initialStateValue||{};default:return e||Yu}},t.prototype.getResolvedPath=function(e){if(Zu(e)){var n=this.machine.idMap[e.slice(U_.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return P_(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=KP(this.states,function(r){return r.initialStateValue||Yu},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=Ev(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var r=this.getStateNodes(e);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;It(n.target)?e=Zu(n.target)?vv(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:e=n.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,n,r){return r===void 0&&(r=!0),r?e.type==="history"?e.resolveHistory(n):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(Ev(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=zm(this.initialStateValue);return cn(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=At(e),r=n[0],s=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var o=this.getStateNode(r);if(o.type==="history")return o.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(s)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:KP(this.states,function(n,r){if(!e)return n.historyValue();var s=It(e)?void 0:e[r];return n.historyValue(s||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!e){var s=this.target;return s?cn(zm(s).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var o=vV(r.path,"states")(e).current;return It(o)?[r.getStateNode(o)]:cn(zm(o).map(function(a){return n.history==="deep"?r.getFromRelativePath(a):[r.states[a[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=cn(Object.keys(this.states).map(function(r){return e.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,n,r,s;if(this.__cache.events)return this.__cache.events;var o=this.states,a=new Set(this.ownEvents);if(o)try{for(var u=ht(Object.keys(o)),c=u.next();!c.done;c=u.next()){var f=c.value,p=o[f];if(p.states)try{for(var g=(r=void 0,ht(p.events)),m=g.next();!m.done;m=g.next()){var y=m.value;a.add("".concat(y))}}catch(S){r={error:S}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(r)throw r.error}}}}catch(S){e={error:S}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var n=this;if(e!==void 0)return e.map(function(r){if(!It(r))return r;var s=r[0]===n.delimiter;if(s&&!n.parent)return n.getStateNodeByPath(r.slice(1));var o=s?n.key+r:r;if(n.parent)try{var a=n.parent.getStateNodeByPath(o);return a}catch(u){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
13
- `).concat(u.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=AV(e.target),s="internal"in e?e.internal:r?r.some(function(c){return It(c)&&c[0]===n.delimiter}):!0,o=this.machine.options.guards,a=this.resolveTarget(r),u=me(me({},e),{actions:li(Hs(e.actions)),cond:$6(e.cond,o),target:a,source:this,internal:s,eventType:e.event,toJSON:function(){return me(me({},u),{target:u.target?u.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return u},t.prototype.formatTransitions=function(){var e,n,r=this,s;if(!this.config.on)s=[];else if(Array.isArray(this.config.on))s=this.config.on;else{var o=this.config.on,a=CE,u=o[a],c=u===void 0?[]:u,f=FA(o,[typeof a=="symbol"?a:a+""]);s=cn(Object.keys(f).map(function(x){var T=Ku(x,f[x]);return T}).concat(Ku(CE,c)))}var p=this.config.always?Ku("",this.config.always):[],g=this.config.onDone?Ku(String(zf(this.id)),this.config.onDone):[],m=cn(this.invoke.map(function(x){var T=[];return x.onDone&&T.push.apply(T,Qt([],At(Ku(String(Jf(x.id)),x.onDone)),!1)),x.onError&&T.push.apply(T,Qt([],At(Ku(String(vc(x.id)),x.onError)),!1)),T})),y=this.after,S=cn(Qt(Qt(Qt(Qt([],At(g),!1),At(m),!1),At(s),!1),At(p),!1).map(function(x){return Hs(x).map(function(T){return r.formatTransition(T)})}));try{for(var E=ht(y),C=E.next();!C.done;C=E.next()){var w=C.value;S.push(w)}}catch(x){e={error:x}}finally{try{C&&!C.done&&(n=E.return)&&n.call(E)}finally{if(e)throw e.error}}return S},t})();function Jc(t,e){return new KV(t,e)}var Jo=n8,Cy=Z6,YV=s8,ZV=A.useLayoutEffect;function JP(t){var e=A.useRef();return e.current||(e.current={v:t()}),e.current.v}var Cv=function(){return Cv=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},Cv.apply(this,arguments)},XV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n},QV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),s,o=[],a;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(u){a={error:u}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function JV(t,e){var n=JP(function(){return typeof t=="function"?t():t}),r=e.context,s=e.guards,o=e.actions,a=e.activities,u=e.services,c=e.delays;e.state;var f=XV(e,["context","guards","actions","activities","services","delays","state"]),p=JP(function(){var g={context:r,guards:s,actions:o,activities:a,services:u,delays:c},m=n.withConfig(g,function(){return Cv(Cv({},n.context),r)});return d8(m,f)});return ZV(function(){Object.assign(p.machine.options.actions,o),Object.assign(p.machine.options.guards,s),Object.assign(p.machine.options.activities,a),Object.assign(p.machine.options.services,u),Object.assign(p.machine.options.delays,c)},[o,s,a,u,c]),p}function eK(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=QV(e,2),s=r[0],o=s===void 0?{}:s,a=r[1],u=JV(t,o);return A.useEffect(function(){if(a){var c=u.subscribe(Qf(a));return function(){c.unsubscribe()}}},[a]),A.useEffect(function(){var c=o.state;return u.start(c?$s.create(c):void 0),function(){u.stop(),u.status=Nn.NotStarted}},[]),u}function tK(t){return t.status!==0?t.getSnapshot():t.machine.initialState}function nK(t){return"state"in t&&"machine"in t}function rK(t){return"state"in t}var sK=function(t,e){return t===e},oK=function(t,e){if(nK(t)){if(t.status===0&&e.current)return e.current;var n=tK(t);return e.current=t.status===0?n:null,n}return rK(t)?t.state:void 0};function iK(t,e,n,r){n===void 0&&(n=sK);var s=A.useRef(null),o=A.useCallback(function(c){var f=t.subscribe(c).unsubscribe;return f},[t]),a=A.useCallback(function(){return oK(t,s)},[t,r]),u=TA.useSyncExternalStoreWithSelector(o,a,a,e,n);return u}const aK="Logging",lK="x-amz-user-agent",uK="NoHubcallbackProvidedException";var rs;(function(t){t.DEBUG="DEBUG",t.ERROR="ERROR",t.INFO="INFO",t.WARN="WARN",t.VERBOSE="VERBOSE",t.NONE="NONE"})(rs||(rs={}));const e3={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class nr{constructor(e,n=rs.WARN){this.name=e,this.level=n,this._pluggables=[]}_padding(e){return e<10?"0"+e:""+e}_ts(){const e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()}configure(e){return e?(this._config=e,this._config):this._config}_log(e,...n){let r=this.level;nr.LOG_LEVEL&&(r=nr.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const s=e3[r];if(!(e3[e]>=s))return;let a=console.log.bind(console);e===rs.ERROR&&console.error&&(a=console.error.bind(console)),e===rs.WARN&&console.warn&&(a=console.warn.bind(console)),nr.BIND_ALL_LOG_LEVELS&&(e===rs.INFO&&console.info&&(a=console.info.bind(console)),e===rs.DEBUG&&console.debug&&(a=console.debug.bind(console)));const u=`[${e}] ${this._ts()} ${this.name}`;let c="";if(n.length===1&&typeof n[0]=="string")c=`${u} - ${n[0]}`,a(c);else if(n.length===1)c=`${u} ${n[0]}`,a(u,n[0]);else if(typeof n[0]=="string"){let f=n.slice(1);f.length===1&&(f=f[0]),c=`${u} - ${n[0]} ${f}`,a(`${u} - ${n[0]}`,f)}else c=`${u} ${n}`,a(u,n);for(const f of this._pluggables){const p={message:c,timestamp:Date.now()};f.pushLogs([p])}}log(...e){this._log(rs.INFO,...e)}info(...e){this._log(rs.INFO,...e)}warn(...e){this._log(rs.WARN,...e)}error(...e){this._log(rs.ERROR,...e)}debug(...e){this._log(rs.DEBUG,...e)}verbose(...e){this._log(rs.VERBOSE,...e)}addPluggable(e){e&&e.getCategoryName()===aK&&(this._pluggables.push(e),e.configure(this._config))}listPluggables(){return this._pluggables}}nr.LOG_LEVEL=null;nr.BIND_ALL_LOG_LEVELS=!1;class Hr extends Error{constructor({message:e,name:n,recoverySuggestion:r,underlyingError:s,metadata:o}){if(super(e),this.name=n,this.underlyingError=s,this.recoverySuggestion=r,o){const{extendedRequestId:a,httpStatusCode:u,requestId:c}=o;this.metadata={extendedRequestId:a,httpStatusCode:u,requestId:c}}this.constructor=Hr,Object.setPrototypeOf(this,Hr.prototype)}}var Pa;(function(t){t.NoEndpointId="NoEndpointId",t.PlatformNotSupported="PlatformNotSupported",t.Unknown="Unknown",t.NetworkError="NetworkError"})(Pa||(Pa={}));const wy=(t,e=Hr)=>(n,r,s)=>{const{message:o,recoverySuggestion:a}=t[r];if(!n)throw new e({name:r,message:s?`${o} ${s}`:o,recoverySuggestion:a})},xo=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",Sf=new nr("Hub");class f8{constructor(e){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}_remove(e,n){const r=this.listeners.get(e);if(!r){Sf.warn(`No listeners for ${e}`);return}this.listeners.set(e,[...r.filter(({callback:s})=>s!==n)])}dispatch(e,n,r,s){typeof e=="string"&&this.protectedChannels.indexOf(e)>-1&&(s===xo||Sf.warn(`WARNING: ${e} is protected and dispatching on it can have unintended consequences`));const o={channel:e,payload:{...n},source:r,patternInfo:[]};try{this._toListeners(o)}catch(a){Sf.error(a)}}listen(e,n,r="noname"){let s;if(typeof n!="function")throw new Hr({name:uK,message:"No callback supplied to Hub"});s=n;let o=this.listeners.get(e);return o||(o=[],this.listeners.set(e,o)),o.push({name:r,callback:s}),()=>{this._remove(e,s)}}_toListeners(e){const{channel:n,payload:r}=e,s=this.listeners.get(n);s&&s.forEach(o=>{Sf.debug(`Dispatching to ${n} with `,r);try{o.callback(e)}catch(a){Sf.error(a)}})}}const Ao=new f8("__default__"),wv=new f8("internal-hub"),WA=()=>{if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto;if(typeof crypto=="object")return crypto;throw new Hr({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},cK=()=>{if(typeof window<"u"&&typeof window.btoa=="function")return window.btoa;if(typeof btoa=="function")return btoa;throw new Hr({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},dK=()=>{if(typeof window<"u"&&typeof window.atob=="function")return window.atob;if(typeof atob=="function")return atob;throw new Hr({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})},GA={convert(t,e){let n=t;return e?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),dK()(n)}};var Eo;(function(t){t.AuthTokenConfigException="AuthTokenConfigException",t.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",t.AuthUserPoolException="AuthUserPoolException",t.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",t.OAuthNotConfigureException="OAuthNotConfigureException"})(Eo||(Eo={}));const fK={[Eo.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[Eo.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[Eo.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[Eo.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[Eo.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},VA=wy(fK);function lt(t){let e=!0;t?e=!!t.userPoolId&&!!t.userPoolClientId:e=!1,VA(e,Eo.AuthUserPoolException)}function _y(t){const e=!!t?.loginWith?.oauth?.domain&&!!t?.loginWith?.oauth?.redirectSignOut&&!!t?.loginWith?.oauth?.redirectSignIn&&!!t?.loginWith?.oauth?.responseType;VA(e,Eo.OAuthNotConfigureException)}function jm(t){const e=!!t?.identityPoolId;VA(e,Eo.InvalidIdentityPoolIdException)}function gi(t){const e=t.split(".");if(e.length!==3)throw new Error("Invalid token");try{const r=e[1].replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(GA.convert(r).split("").map(a=>`%${`00${a.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),o=JSON.parse(s);return{toString:()=>t,payload:o}}catch{throw new Error("Invalid token payload")}}const h8=t=>{const e=Reflect.ownKeys(t);for(const n of e){const r=t[n];(r&&typeof r=="object"||typeof r=="function")&&h8(r)}return Object.freeze(t)},hK=new nr("parseAWSExports"),pK={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},gK=(t={})=>{if(!Object.prototype.hasOwnProperty.call(t,"aws_project_region"))throw new Hr({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});const{aws_appsync_apiKey:e,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:r,aws_appsync_region:s,aws_bots_config:o,aws_cognito_identity_pool_id:a,aws_cognito_sign_up_verification_method:u,aws_cognito_mfa_configuration:c,aws_cognito_mfa_types:f,aws_cognito_password_protection_settings:p,aws_cognito_verification_mechanisms:g,aws_cognito_signup_attributes:m,aws_cognito_social_providers:y,aws_cognito_username_attributes:S,aws_mandatory_sign_in:E,aws_mobile_analytics_app_id:C,aws_mobile_analytics_app_region:w,aws_user_files_s3_bucket:x,aws_user_files_s3_bucket_region:T,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:R,aws_user_pools_id:M,aws_user_pools_web_client_id:O,geo:I,oauth:P,predictions:k,aws_cloud_logic_custom:H,Notifications:U,modelIntrospection:B}=t,W={};C&&(W.Analytics={Pinpoint:{appId:C,region:w}});const{InAppMessaging:Y,Push:ne}=U??{};if(Y?.AWSPinpoint||ne?.AWSPinpoint){if(Y?.AWSPinpoint){const{appId:J,region:oe}=Y.AWSPinpoint;W.Notifications={InAppMessaging:{Pinpoint:{appId:J,region:oe}}}}if(ne?.AWSPinpoint){const{appId:J,region:oe}=ne.AWSPinpoint;W.Notifications={...W.Notifications,PushNotification:{Pinpoint:{appId:J,region:oe}}}}}if(Array.isArray(o)&&(W.Interactions={LexV1:Object.fromEntries(o.map(J=>[J.name,J]))}),r){const J=pK[n];J||hK.debug(`Invalid authentication type ${n}. Falling back to IAM.`),W.API={GraphQL:{endpoint:r,apiKey:e,region:s,defaultAuthMode:J??"iam"}},B&&(W.API.GraphQL.modelIntrospection=B)}const $=c?{status:c&&c.toLowerCase(),totpEnabled:f?.includes("TOTP")??!1,smsEnabled:f?.includes("SMS")??!1}:void 0,ee=p?{minLength:p.passwordPolicyMinLength,requireLowercase:p.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:p.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:p.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:p.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,de=Array.from(new Set([...g??[],...m??[]])).reduce((J,oe)=>({...J,[oe.toLowerCase()]:{required:!0}}),{}),Ae=S?.includes("EMAIL")??!1,D=S?.includes("PHONE_NUMBER")??!1;(a||M)&&(W.Auth={Cognito:{identityPoolId:a,allowGuestAccess:E!=="enable",signUpVerificationMethod:u,userAttributes:de,userPoolClientId:O,userPoolId:M,mfa:$,passwordFormat:ee,loginWith:{username:!(Ae||D),email:Ae,phone:D}}});const V=P?Object.keys(P).length>0:!1,K=y?y.length>0:!1;if(W.Auth&&V&&(W.Auth.Cognito.loginWith={...W.Auth.Cognito.loginWith,oauth:{...mK(P),...K&&{providers:vK(y)}}}),x&&(W.Storage={S3:{bucket:x,region:T,dangerouslyConnectToHttpEndpointForTesting:R}}),I){const{amazon_location_service:J}=I;W.Geo={LocationService:{maps:J.maps,geofenceCollections:J.geofenceCollections,searchIndices:J.search_indices,region:J.region}}}if(H&&(W.API={...W.API,REST:H.reduce((J,oe)=>{const{name:he,endpoint:ue,region:ve,service:_e}=oe;return{...J,[he]:{endpoint:ue,..._e?{service:_e}:void 0,...ve?{region:ve}:void 0}}},{})}),k){const{VoiceId:J}=k?.convert?.speechGenerator?.defaults??{};W.Predictions=J?{...k,convert:{...k.convert,speechGenerator:{...k.convert.speechGenerator,defaults:{voiceId:J}}}}:k}return W},t3=t=>t?.split(",")??[],mK=({domain:t,scope:e,redirectSignIn:n,redirectSignOut:r,responseType:s})=>({domain:t,scopes:e,redirectSignIn:t3(n),redirectSignOut:t3(r),responseType:s}),vK=t=>t.map(e=>{const n=e.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),p8=Symbol("oauth-listener"),Xn=[];for(let t=0;t<256;++t)Xn.push((t+256).toString(16).slice(1));function yK(t,e=0){return(Xn[t[e+0]]+Xn[t[e+1]]+Xn[t[e+2]]+Xn[t[e+3]]+"-"+Xn[t[e+4]]+Xn[t[e+5]]+"-"+Xn[t[e+6]]+Xn[t[e+7]]+"-"+Xn[t[e+8]]+Xn[t[e+9]]+"-"+Xn[t[e+10]]+Xn[t[e+11]]+Xn[t[e+12]]+Xn[t[e+13]]+Xn[t[e+14]]+Xn[t[e+15]]).toLowerCase()}let wE;const bK=new Uint8Array(16);function SK(){if(!wE){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");wE=crypto.getRandomValues.bind(crypto)}return wE(bK)}const EK=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),n3={randomUUID:EK};function CK(t,e,n){if(n3.randomUUID&&!e&&!t)return n3.randomUUID();t=t||{};const r=t.random??t.rng?.()??SK();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){if(n=n||0,n<0||n+16>e.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let s=0;s<16;++s)e[n+s]=r[s];return e}return yK(r)}function wK(t){const{version:e}=t;return e?e.startsWith("1"):!1}function _K(t){if(!t)return;const{bucket_name:e,aws_region:n,buckets:r}=t;return{S3:{bucket:e,region:n,buckets:r&&DK(r)}}}function xK(t){if(!t)return;const{user_pool_id:e,user_pool_client_id:n,identity_pool_id:r,password_policy:s,mfa_configuration:o,mfa_methods:a,unauthenticated_identities_enabled:u,oauth:c,username_attributes:f,standard_required_attributes:p,groups:g,passwordless:m}=t,y={Cognito:{userPoolId:e,userPoolClientId:n,groups:g}};return r&&(y.Cognito={...y.Cognito,identityPoolId:r}),s&&(y.Cognito.passwordFormat={requireLowercase:s.require_lowercase,requireNumbers:s.require_numbers,requireUppercase:s.require_uppercase,requireSpecialCharacters:s.require_symbols,minLength:s.min_length??6}),o&&(y.Cognito.mfa={status:kK(o),smsEnabled:a?.includes("SMS"),totpEnabled:a?.includes("TOTP")}),u&&(y.Cognito.allowGuestAccess=u),c&&(y.Cognito.loginWith={oauth:{domain:c.domain,redirectSignIn:c.redirect_sign_in_uri,redirectSignOut:c.redirect_sign_out_uri,responseType:c.response_type==="token"?"token":"code",scopes:c.scopes,providers:PK(c.identity_providers)}}),f&&(y.Cognito.loginWith={...y.Cognito.loginWith,email:f.includes("email"),phone:f.includes("phone_number"),username:f.includes("username")}),p&&(y.Cognito.userAttributes=p.reduce((S,E)=>({...S,[E]:{required:!0}}),{})),m&&(y.Cognito.passwordless={emailOtpEnabled:m.email_otp_enabled,smsOtpEnabled:m.sms_otp_enabled,webAuthn:m.web_authn?{relyingPartyId:m.web_authn.relying_party_id,userVerification:m.web_authn.user_verification}:void 0,preferredChallenge:m.preferred_challenge}),y}function AK(t){if(!t?.amazon_pinpoint)return;const{amazon_pinpoint:e}=t;return{Pinpoint:{appId:e.app_id,region:e.aws_region}}}function TK(t){if(!t)return;const{aws_region:e,geofence_collections:n,maps:r,search_indices:s}=t;return{LocationService:{region:e,searchIndices:s,geofenceCollections:n,maps:r}}}function RK(t){if(!t)return;const{aws_region:e,default_authorization_type:n,url:r,api_key:s,model_introspection:o}=t;return{GraphQL:{endpoint:r,defaultAuthMode:g8(n),region:e,apiKey:s,modelIntrospection:o}}}function IK(t){if(!t?.events)return;const{url:e,aws_region:n,api_key:r,default_authorization_type:s}=t.events;return{Events:{endpoint:e,defaultAuthMode:g8(s),region:n,apiKey:r}}}function OK(t){if(!t)return;const{aws_region:e,channels:n,amazon_pinpoint_app_id:r}=t,s=n.includes("IN_APP_MESSAGING"),o=n.includes("APNS")||n.includes("FCM");if(!(s||o))return;const a={};return s&&(a.InAppMessaging={Pinpoint:{appId:r,region:e}}),o&&(a.PushNotification={Pinpoint:{appId:r,region:e}}),a}function NK(t){const e={};if(t.storage&&(e.Storage=_K(t.storage)),t.auth&&(e.Auth=xK(t.auth)),t.analytics&&(e.Analytics=AK(t.analytics)),t.geo&&(e.Geo=TK(t.geo)),t.data&&(e.API=RK(t.data)),t.custom){const n=IK(t.custom);n&&"Events"in n&&(e.API={...e.API,...n})}return t.notifications&&(e.Notifications=OK(t.notifications)),e}const MK={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function g8(t){return MK[t]}const r3={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function PK(t=[]){return t.reduce((e,n)=>(r3[n]!==void 0&&e.push(r3[n]),e),[])}function kK(t){return t==="OPTIONAL"?"optional":t==="REQUIRED"?"on":"off"}function DK(t){const e={};return t.forEach(({name:n,bucket_name:r,aws_region:s,paths:o})=>{if(n in e)throw new Error(`Duplicate friendly name found: ${n}. Name must be unique.`);const a=o?Object.entries(o).reduce((u,[c,f])=>(f!==void 0&&(u[c]=f),u),{}):void 0;e[n]={bucketName:r,region:s,paths:a}}),e}const m8=t=>Object.keys(t).some(e=>e.startsWith("aws_"))?gK(t):wK(t)?NK(t):t;var s3=function(){return s3=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s3.apply(this,arguments)};function uxe(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function LK(t,e,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(p){try{f(r.next(p))}catch(g){a(g)}}function c(p){try{f(r.throw(p))}catch(g){a(g)}}function f(p){p.done?o(p.value):s(p.value).then(u,c)}f((r=r.apply(t,e||[])).next())})}function UK(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,s,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(f){return function(p){return c([f,p])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,f[0]&&(n=0)),n;)try{if(r=1,s&&(o=f[0]&2?s.return:f[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,f[1])).done)return o;switch(s=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,s=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){n.label=f[1];break}if(f[0]===6&&n.label<o[1]){n.label=o[1],o=f;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(f);break}o[2]&&n.ops.pop(),n.trys.pop();continue}f=e.call(t,n)}catch(p){f=[6,p],s=0}finally{r=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function cxe(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,o;r<s;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var _s=64,FK=32,zK=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),BK=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],jK=Math.pow(2,53)-1,Hm=(function(){function t(){this.state=Int32Array.from(BK),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return t.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=e.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>jK)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[n++],r--,this.bufferLength===_s&&(this.hashBuffer(),this.bufferLength=0)},t.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%_s>=_s-8){for(var s=this.bufferLength;s<_s;s++)n.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<_s-8;s++)n.setUint8(s,0);n.setUint32(_s-8,Math.floor(e/4294967296),!0),n.setUint32(_s-4,e),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(FK),s=0;s<8;s++)o[s*4]=this.state[s]>>>24&255,o[s*4+1]=this.state[s]>>>16&255,o[s*4+2]=this.state[s]>>>8&255,o[s*4+3]=this.state[s]>>>0&255;return o},t.prototype.hashBuffer=function(){for(var e=this,n=e.buffer,r=e.state,s=r[0],o=r[1],a=r[2],u=r[3],c=r[4],f=r[5],p=r[6],g=r[7],m=0;m<_s;m++){if(m<16)this.temp[m]=(n[m*4]&255)<<24|(n[m*4+1]&255)<<16|(n[m*4+2]&255)<<8|n[m*4+3]&255;else{var y=this.temp[m-2],S=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10;y=this.temp[m-15];var E=(y>>>7|y<<25)^(y>>>18|y<<14)^y>>>3;this.temp[m]=(S+this.temp[m-7]|0)+(E+this.temp[m-16]|0)}var C=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&f^~c&p)|0)+(g+(zK[m]+this.temp[m]|0)|0)|0,w=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&o^s&a^o&a)|0;g=p,p=f,f=c,c=u+C|0,u=a,a=o,o=s,s=C+w|0}r[0]+=s,r[1]+=o,r[2]+=a,r[3]+=u,r[4]+=c,r[5]+=f,r[6]+=p,r[7]+=g},t})();const HK=t=>new TextEncoder().encode(t);var $K=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:HK;function v8(t){return t instanceof Uint8Array?t:typeof t=="string"?$K(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function qK(t){return typeof t=="string"?t.length===0:t.byteLength===0}var Fl=(function(){function t(e){this.secret=e,this.hash=new Hm,this.reset()}return t.prototype.update=function(e){if(!(qK(e)||this.error))try{this.hash.update(v8(e))}catch(n){this.error=n}},t.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},t.prototype.digest=function(){return LK(this,void 0,void 0,function(){return UK(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new Hm,this.secret){this.outer=new Hm;var e=WK(this.secret),n=new Uint8Array(_s);n.set(e);for(var r=0;r<_s;r++)e[r]^=54,n[r]^=92;this.hash.update(e),this.outer.update(n);for(var r=0;r<e.byteLength;r++)e[r]=0}},t})();function WK(t){var e=v8(t);if(e.byteLength>_s){var n=new Hm;n.update(e),e=n.digest()}var r=new Uint8Array(_s);return r.set(e),r}for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`)}var wn;(function(t){t.WebUnknown="0",t.React="1",t.NextJs="2",t.Angular="3",t.VueJs="4",t.Nuxt="5",t.Svelte="6",t.ServerSideUnknown="100",t.ReactSSR="101",t.NextJsSSR="102",t.AngularSSR="103",t.VueJsSSR="104",t.NuxtSSR="105",t.SvelteSSR="106",t.ReactNative="201",t.Expo="202"})(wn||(wn={}));var Rs;(function(t){t.AI="ai",t.API="api",t.Auth="auth",t.Analytics="analytics",t.DataStore="datastore",t.Geo="geo",t.InAppMessaging="inappmessaging",t.Interactions="interactions",t.Predictions="predictions",t.PubSub="pubsub",t.PushNotification="pushnotification",t.Storage="storage"})(Rs||(Rs={}));var oi;(function(t){t.CreateConversation="1",t.GetConversation="2",t.ListConversations="3",t.DeleteConversation="4",t.SendMessage="5",t.ListMessages="6",t.OnMessage="7",t.Generation="8",t.UpdateConversation="9"})(oi||(oi={}));var o3;(function(t){t.Record="1",t.IdentifyUser="2"})(o3||(o3={}));var i3;(function(t){t.GraphQl="1",t.Get="2",t.Post="3",t.Put="4",t.Patch="5",t.Del="6",t.Head="7"})(i3||(i3={}));var Ve;(function(t){t.SignUp="1",t.ConfirmSignUp="2",t.ResendSignUpCode="3",t.SignIn="4",t.FetchMFAPreference="6",t.UpdateMFAPreference="7",t.SetUpTOTP="10",t.VerifyTOTPSetup="11",t.ConfirmSignIn="12",t.DeleteUserAttributes="15",t.DeleteUser="16",t.UpdateUserAttributes="17",t.FetchUserAttributes="18",t.ConfirmUserAttribute="22",t.SignOut="26",t.UpdatePassword="27",t.ResetPassword="28",t.ConfirmResetPassword="29",t.FederatedSignIn="30",t.RememberDevice="32",t.ForgetDevice="33",t.FetchDevices="34",t.SendUserAttributeVerificationCode="35",t.SignInWithRedirect="36",t.StartWebAuthnRegistration="37",t.CompleteWebAuthnRegistration="38",t.ListWebAuthnCredentials="39",t.DeleteWebAuthnCredential="40"})(Ve||(Ve={}));var a3;(function(t){t.Subscribe="1",t.GraphQl="2"})(a3||(a3={}));var eh;(function(t){t.SearchByText="0",t.SearchByCoordinates="1",t.SearchForSuggestions="2",t.SearchByPlaceId="3",t.SaveGeofences="4",t.GetGeofence="5",t.ListGeofences="6",t.DeleteGeofences="7"})(eh||(eh={}));var F_;(function(t){t.SyncMessages="1",t.IdentifyUser="2",t.NotifyMessageInteraction="3"})(F_||(F_={}));var l3;(function(t){t.None="0"})(l3||(l3={}));var u3;(function(t){t.Convert="1",t.Identify="2",t.Interpret="3"})(u3||(u3={}));var c3;(function(t){t.Subscribe="1"})(c3||(c3={}));var d3;(function(t){t.InitializePushNotifications="1",t.IdentifyUser="2"})(d3||(d3={}));var qs;(function(t){t.UploadData="1",t.DownloadData="2",t.List="3",t.Copy="4",t.Remove="5",t.GetProperties="6",t.GetUrl="7",t.GetDataAccess="8",t.ListCallerAccessGrants="9"})(qs||(qs={}));const GK="6.18.0",xy=()=>typeof global<"u",ed=()=>typeof window<"u",y8=()=>typeof document<"u",KA=()=>typeof process<"u",Eh=(t,e)=>!!Object.keys(t).find(n=>n.startsWith(e));var f3={};function VK(){const t=r=>r.startsWith("_react")||r.startsWith("__react"),e=r=>Object.keys(r).find(t),n=()=>Array.from(document.querySelectorAll("[id]"));return y8()&&n().some(e)}function KK(){return KA()&&typeof f3<"u"&&!!Object.keys(f3).find(t=>t.includes("react"))}function YK(){return ed()&&Eh(window,"__VUE")}function ZK(){return xy()&&Eh(global,"__VUE")}var h3={};function XK(){return ed()&&Eh(window,"__SVELTE")}function QK(){return KA()&&typeof h3<"u"&&!!Object.keys(h3).find(t=>t.includes("svelte"))}function JK(){return ed()&&window.next&&typeof window.next=="object"}function eY(){return xy()&&(Eh(global,"__next")||Eh(global,"__NEXT"))}function tY(){return ed()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function nY(){return xy()&&typeof global.__NUXT_PATHS__<"u"}var p3={};function rY(){const t=!!(y8()&&document.querySelector("[ng-version]")),e=!!(ed()&&typeof window.ng<"u");return t||e}function sY(){return KA()&&typeof p3=="object"&&p3.npm_lifecycle_script?.startsWith("ng ")||!1}function oY(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function iY(){return xy()&&typeof global.expo<"u"}function aY(){return ed()}const lY=[{platform:wn.Expo,detectionMethod:iY},{platform:wn.ReactNative,detectionMethod:oY},{platform:wn.NextJs,detectionMethod:JK},{platform:wn.Nuxt,detectionMethod:tY},{platform:wn.Angular,detectionMethod:rY},{platform:wn.React,detectionMethod:VK},{platform:wn.VueJs,detectionMethod:YK},{platform:wn.Svelte,detectionMethod:XK},{platform:wn.WebUnknown,detectionMethod:aY},{platform:wn.NextJsSSR,detectionMethod:eY},{platform:wn.NuxtSSR,detectionMethod:nY},{platform:wn.ReactSSR,detectionMethod:KK},{platform:wn.VueJsSSR,detectionMethod:ZK},{platform:wn.AngularSSR,detectionMethod:sY},{platform:wn.SvelteSSR,detectionMethod:QK}];function uY(){return lY.find(t=>t.detectionMethod())?.platform||wn.ServerSideUnknown}let th;const _E=[];let z_=!1;const cY=10,dY=10,fY=1e3,b8=()=>{if(!th){if(th=uY(),z_)for(;_E.length;)_E.pop()?.();else _E.forEach(t=>{t()});g3(wn.ServerSideUnknown,cY),g3(wn.WebUnknown,dY)}return th};function hY(){th=void 0}function g3(t,e){th===t&&!z_&&setTimeout(()=>{hY(),z_=!0,setTimeout(b8,fY)},e)}const pa={},ei=t=>{pa[t.category]=t.apis.reduce((r,s)=>({...r,[s]:{refCount:r[s]?.refCount?r[s].refCount+1:1,additionalDetails:t.additionalDetails}}),pa[t.category]??{});let e=!1;return()=>{e||(e=!0,t.apis.forEach(r=>{const s=pa[t.category][r].refCount;s>1?pa[t.category][r].refCount=s-1:(delete pa[t.category][r],Object.keys(pa[t.category]).length||delete pa[t.category])}))}},pY=(t,e)=>pa[t]?.[e]?.additionalDetails,gY="aws-amplify",mY=t=>t.replace(/\+.*/,""),vY=({category:t,action:e}={})=>{const n=[[gY,mY(GK)]];if(t&&n.push([t,e]),n.push(["framework",b8()]),t&&e){const r=pY(t,e);r&&r.forEach(s=>{n.push(s)})}return n},Ay=t=>vY(t).map(([r,s])=>r&&s?`${r}/${s}`:r).join(" "),Ty=()=>typeof window<"u"&&typeof window.document<"u",m3=new nr("Auth");class yY{configure(e,n){this.authConfig=e,this.authOptions=n,e&&e.Cognito?.userPoolEndpoint&&m3.warn(v3("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&m3.warn(v3("Amazon Cognito Identity Pool"))}async fetchAuthSession(e={}){let n,r;const s=await this.getTokens(e);return s?(r=s.accessToken?.payload?.sub,n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:s,authenticated:!0,forceRefresh:e.forceRefresh})):n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:e.forceRefresh}),{tokens:s,credentials:n?.credentials,identityId:n?.identityId,userSub:r}}async clearCredentials(){await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId()}async getTokens(e){return await this.authOptions?.tokenProvider?.getTokens(e)??void 0}}const v3=t=>`You are using a custom Amazon ${t} endpoint, ensure the endpoint is correct.`;class bY{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new yY}configure(e,n){const r=m8(e);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=h8(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),(this.resourcesConfig.Analytics?.Pinpoint||this.resourcesConfig.Notifications?.InAppMessaging?.Pinpoint||this.resourcesConfig.Notifications?.PushNotification?.Pinpoint)&&console.warn("AWS will end support for Amazon Pinpoint on October 30, 2026. The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics."),Ao.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",xo),this.notifyOAuthListener(),this.isConfigured=!0}getConfig(){return this.isConfigured||console.warn("Amplify has not been configured. Please call Amplify.configure() before using this service."),this.resourcesConfig}[p8](e){this.resourcesConfig.Auth?.Cognito.loginWith?.oauth?e(this.resourcesConfig.Auth?.Cognito):this.oAuthListener=e}notifyOAuthListener(){!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth||!this.oAuthListener||(this.oAuthListener(this.resourcesConfig.Auth?.Cognito),this.oAuthListener=void 0)}}const Ht=new bY,S8=(t,e)=>t.Auth.fetchAuthSession(e),Ry=t=>S8(Ht,t);function E8(){return Ht.Auth.clearCredentials()}const Iy=t=>{const{headers:e,statusCode:n}=t;return{...SY(t)?t.$metadata:{},httpStatusCode:n,requestId:e["x-amzn-requestid"]??e["x-amzn-request-id"]??e["x-amz-request-id"],extendedRequestId:e["x-amz-id-2"],cfId:e["x-amz-cf-id"]}},SY=t=>typeof t?.$metadata=="object",td=async t=>{if(!t||t.statusCode<300)return;const e=await Vh(t),r=(a=>{const[u]=a.toString().split(/[,:]+/);return u.includes("#")?u.split("#")[1]:u})(t.headers["x-amzn-errortype"]??e.code??e.__type??"UnknownError"),s=e.message??e.Message??"Unknown error",o=new Error(s);return Object.assign(o,{name:r,$metadata:Iy(t)})},Vh=async t=>{if(!t.body)throw new Error("Missing response payload");const e=await t.body.json();return Object.assign(e,{$metadata:Iy(t)})},Tn=(t,e,n,r)=>async(s,o)=>{const a={...r,...s},u=await a.endpointResolver(a,o),c=await e(o,u),f=await t(c,{...a});return n(f)},EY=300*1e3;function CY(t=EY){return r=>{const s=2**r*100+100*Math.random();return s>t?!1:s}}const C8=3,y3="amz-sdk-invocation-id",wY="amz-sdk-request",b3=300*1e3,w8=t=>{const n=CY(b3)(t);return n===!1?b3:n},_Y=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],xY=t=>!!t&&_Y.includes(t),_8=t=>async(e,n)=>{const r=n??await t(e)??void 0,s=r?.code||r?.name,o=e?.statusCode;return{retryable:IY(n)||RY(o,s)||xY(s)||OY(o,s)}},AY=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],TY=["TimeoutError","RequestTimeout","RequestTimeoutException"],RY=(t,e)=>t===429||!!e&&AY.includes(e),IY=t=>[Pa.NetworkError,"ERR_NETWORK"].includes(t?.name),OY=(t,e)=>!!t&&[500,502,503,504].includes(t)||!!e&&TY.includes(e),x8="cognito-identity",A8={service:x8,retryDecider:_8(td),computeDelay:w8,cache:"no-store"},NY=({maxAttempts:t=C8,retryDecider:e,computeDelay:n,abortSignal:r})=>{if(t<1)throw new Error("maxAttempts must be greater than 0");return(s,o)=>async function(u){let c,f=o.attemptsCount??0,p;const g=()=>{if(p)return S3(p,f),p;throw S3(c,f),c};for(;!r?.aborted&&f<t;){try{p=await s(u),c=void 0}catch(S){c=S,p=void 0}f=(o.attemptsCount??0)>f?o.attemptsCount??0:f+1,o.attemptsCount=f;const{isCredentialsExpiredError:m,retryable:y}=await e(p,c,o);if(y){if(o.isCredentialsExpired=!!m,!r?.aborted&&f<t){const S=n(f);await MY(S,r)}continue}else return g()}if(r?.aborted)throw new Error("Request aborted.");return g()}},MY=(t,e)=>{if(e?.aborted)return Promise.resolve();let n,r;const s=new Promise(o=>{r=o,n=setTimeout(o,t)});return e?.addEventListener("abort",function o(a){clearTimeout(n),e?.removeEventListener("abort",o),r()}),s},S3=(t,e)=>{Object.prototype.toString.call(t)==="[object Object]"&&(t.$metadata={...t.$metadata??{},attempts:e})},PY=CK,kY=()=>t=>async function(n){return n.headers[y3]||(n.headers[y3]=PY()),t(n)},DY=({maxAttempts:t=C8})=>(e,n)=>async function(s){const o=n.attemptsCount??0;return s.headers[wY]=`attempt=${o+1}; max=${t}`,e(s)},LY=({userAgentHeader:t="x-amz-user-agent",userAgentValue:e=""})=>n=>async function(s){if(e.trim().length===0)return await n(s);{const o=t.toLowerCase();return s.headers[o]=s.headers[o]?`${s.headers[o]} ${e}`:e,await n(s)}},YA=(t,e)=>(n,r)=>{const s={};let o=a=>t(a,r);for(let a=e.length-1;a>=0;a--){const u=e[a];o=u(r)(o,s)}return o(n)},xE=t=>{let e;return()=>(e||(e=t()),e)},UY=t=>!["HEAD","GET"].includes(t.toUpperCase()),FY=async({url:t,method:e,headers:n,body:r},{abortSignal:s,cache:o,withCrossDomainCredentials:a})=>{let u;try{u=await fetch(t,{method:e,headers:n,body:UY(e)?r:void 0,signal:s,cache:o,credentials:a?"include":"same-origin"})}catch(g){throw g instanceof TypeError?new Hr({name:Pa.NetworkError,message:"A network error has occurred.",underlyingError:g}):g}const c={};u.headers?.forEach((g,m)=>{c[m.toLowerCase()]=g});const f={statusCode:u.status,headers:c,body:null},p=Object.assign(u.body??{},{text:xE(()=>u.text()),blob:xE(()=>u.blob()),json:xE(()=>u.json())});return{...f,body:p}},T8=YA(FY,[LY,kY,NY,DY]),zY=()=>t=>async function(n){return n.headers["cache-control"]="no-store",t(n)},R8=YA(T8,[zY]),I8=t=>(e,n)=>{const r=BY(t),s=JSON.stringify(e);return jY(n,r,s)},BY=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${t}`}),jY=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"}),E3=t=>Tn(R8,I8("GetCredentialsForIdentity"),HY,{...A8,...t,userAgentValue:Ay()}),HY=async t=>{if(t.statusCode>=300)throw await td(t);const e=await Vh(t);return{IdentityId:e.IdentityId,Credentials:$Y(e.Credentials),$metadata:Iy(t)}},$Y=({Expiration:t,...e}={})=>({...e,Expiration:t&&new Date(t*1e3)}),qY=t=>Tn(R8,I8("GetId"),WY,{...A8,...t,userAgentValue:Ay()}),WY=async t=>{if(t.statusCode>=300)throw await td(t);return{IdentityId:(await Vh(t)).IdentityId,$metadata:Iy(t)}},O8={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},GY={partitions:[O8,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},N8=t=>{const{partitions:e}=GY;for(const{regions:n,outputs:r,regionRegex:s}of e){const o=new RegExp(s);if(n.includes(t)||o.test(t))return r.dnsSuffix}return O8.outputs.dnsSuffix},Wa=URL,VY=({region:t})=>({url:new Wa(`https://${x8}.${t}.${N8(t)}`)});class Hf extends Hr{constructor(){super({name:Pa.PlatformNotSupported,message:"Function not supported on current platform"})}}class M8{constructor(e){this.storage=e}async setItem(e,n){if(!this.storage)throw new Hf;this.storage.setItem(e,n)}async getItem(e){if(!this.storage)throw new Hf;return this.storage.getItem(e)}async removeItem(e){if(!this.storage)throw new Hf;this.storage.removeItem(e)}async clear(){if(!this.storage)throw new Hf;this.storage.clear()}}class P8{constructor(){this.storage=new Map}get length(){return this.storage.size}key(e){return e>this.length-1?null:Array.from(this.storage.keys())[e]}setItem(e,n){this.storage.set(e,n)}getItem(e){return this.storage.get(e)??null}removeItem(e){this.storage.delete(e)}clear(){this.storage.clear()}}const k8=new nr("CoreStorageUtils"),KY=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{k8.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new P8},D8=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return k8.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new P8}};class YY extends M8{constructor(){super(KY())}}class ZY extends M8{constructor(){super(D8())}}class XY{constructor(e){this._storage=e}get storage(){if(!this._storage)throw new Hf;return this._storage}setItem(e,n){this.storage.setItem(e,n)}getItem(e){return this.storage.getItem(e)}removeItem(e){this.storage.removeItem(e)}clear(){this.storage.clear()}}class QY extends XY{constructor(){super(D8())}}function Ug(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)r!=="__proto__"&&(t[r]=n[r])}return t}var JY={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function B_(t,e){function n(s,o,a){if(!(typeof document>"u")){a=Ug({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=s+"="+t.write(o,s)+u}}function r(s){if(!(typeof document>"u"||arguments.length&&!s)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),f=c.slice(1).join("=");try{var p=decodeURIComponent(c[0]);if(p in a||(a[p]=t.read(f,p)),s===p)break}catch{}}return s?a[s]:a}}return Object.create({set:n,get:r,remove:function(s,o){n(s,"",Ug({},o,{expires:-1}))},withAttributes:function(s){return B_(this.converter,Ug({},this.attributes,s))},withConverter:function(s){return B_(Ug({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Fg=B_(JY,{path:"/"});class eZ{constructor(e={}){const{path:n,domain:r,expires:s,sameSite:o,secure:a}=e;if(this.domain=r,this.path=n||"/",this.expires=Object.prototype.hasOwnProperty.call(e,"expires")?s:365,this.secure=Object.prototype.hasOwnProperty.call(e,"secure")?a:!0,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!o||!["strict","lax","none"].includes(o))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if(o==="none"&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=o}}async setItem(e,n){Fg.set(e,n,this.getData())}async getItem(e){return Fg.get(e)??null}async removeItem(e){Fg.remove(e,this.getData())}async clear(){const e=Fg.get(),n=Object.keys(e).map(r=>this.removeItem(r));await Promise.all(n)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}const Kh=new YY;new ZY;const di=new QY,tZ=new nr("I18n");let nZ=class{constructor(){this._options=null,this._lang=null,this._dict={}}setDefaultLanguage(){!this._lang&&typeof window<"u"&&window&&window.navigator&&(this._lang=window.navigator.language),tZ.debug(this._lang)}setLanguage(e){this._lang=e}get(e,n=void 0){if(this.setDefaultLanguage(),!this._lang)return typeof n<"u"?n:e;const r=this._lang;let s=this.getByLanguage(e,r);return s||(r.indexOf("-")>0&&(s=this.getByLanguage(e,r.split("-")[0])),s)?s:typeof n<"u"?n:e}getByLanguage(e,n,r=null){if(!n)return r;const s=this._dict[n];return s?s[e]:r}putVocabulariesForLanguage(e,n){let r=this._dict[e];r||(r=this._dict[e]={}),this._dict[e]={...r,...n}}putVocabularies(e){Object.keys(e).forEach(n=>{this.putVocabulariesForLanguage(n,e[n])})}};var Al;(function(t){t.NotConfigured="NotConfigured"})(Al||(Al={}));const rZ={[Al.NotConfigured]:{message:"i18n is not configured."}},zg=wy(rZ),C3=new nr("I18n");let Bg={language:null},Bs=null,L8=class bl{static configure(e){return C3.debug("configure I18n"),e&&(Bg=Object.assign({},Bg,e.I18n||e),bl.createInstance()),Bg}static getModuleName(){return"I18n"}static createInstance(){C3.debug("create I18n instance"),!Bs&&(Bs=new nZ)}static setLanguage(e){bl.checkConfig(),zg(!!Bs,Al.NotConfigured),Bs.setLanguage(e)}static get(e,n){return bl.checkConfig(),zg(!!Bs,Al.NotConfigured),Bs.get(e,n)}static putVocabulariesForLanguage(e,n){bl.checkConfig(),zg(!!Bs,Al.NotConfigured),Bs.putVocabulariesForLanguage(e,n)}static putVocabularies(e){bl.checkConfig(),zg(!!Bs,Al.NotConfigured),Bs.putVocabularies(e)}static checkConfig(){return Bs||bl.createInstance(),!0}};L8.createInstance();const sZ=t=>{const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(t);WA().getRandomValues(r);for(const s of r)n.push(e[s%e.length]);return n.join("")};function oZ(t){return(t.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function iZ(t){return t.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const aZ=t=>{let e;return async(...n)=>e||(e=new Promise((r,s)=>{t(...n).then(o=>{r(o)}).catch(o=>{s(o)}).finally(()=>{e=void 0})}),e)};function w3({expiresAt:t,clockDrift:e,tolerance:n=5e3}){return Date.now()+e+n>t}const lZ=async()=>{const{userAgentData:t}=navigator;if(!t)return navigator.userAgent;const{platform:e="",platformVersion:n="",model:r="",architecture:s="",fullVersionList:o=[]}=await t.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]),a=o.map(c=>`${c.brand}/${c.version}`).join(";");return[e,n,s,r,e,a].filter(c=>c).join(" ")||navigator.userAgent};function uZ(t){return Array.from(t,e=>String.fromCodePoint(e)).join("")}const Pc={convert(t,e={urlSafe:!1,skipPadding:!1}){const n=typeof t=="string"?t:uZ(t);let r=cK()(n);return e.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),e.skipPadding&&(r=r.replace(/=/g,"")),r}};function cZ(){return WA().getRandomValues(new Uint32Array(1))[0]}function dZ(t){const{words:e}=t,{sigBytes:n}=t,r=[];for(let s=0;s<n;s++){const o=e[s>>>2]>>>24-s%4*8&255;r.push((o>>>4).toString(16)),r.push((o&15).toString(16))}return r.join("")}class ZA{constructor(e,n){this.words=[];let r=e;r=this.words=r||[],n!==void 0?this.sigBytes=n:this.sigBytes=r.length*4}random(e){const n=[];for(let r=0;r<e;r+=4)n.push(cZ());return new ZA(n,e)}toString(){return dZ(this)}}var Ge;(function(t){t.EmptySignInUsername="EmptySignInUsername",t.EmptySignInPassword="EmptySignInPassword",t.CustomAuthSignInPassword="CustomAuthSignInPassword",t.EmptySignUpUsername="EmptySignUpUsername",t.EmptySignUpPassword="EmptySignUpPassword",t.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",t.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",t.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",t.EmptyChallengeResponse="EmptyChallengeResponse",t.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",t.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",t.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",t.EmptyResetPasswordUsername="EmptyResetPasswordUsername",t.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",t.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",t.IncorrectMFAMethod="IncorrectMFAMethod",t.EmptyUpdatePassword="EmptyUpdatePassword",t.InvalidPreferredChallenge="InvalidPreferredChallenge"})(Ge||(Ge={}));const U8={[Ge.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[Ge.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[Ge.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[Ge.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[Ge.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[Ge.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[Ge.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[Ge.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[Ge.EmptySignInPassword]:{message:"password is required to signIn"},[Ge.EmptySignInUsername]:{message:"username is required to signIn"},[Ge.EmptySignUpPassword]:{message:"password is required to signUp"},[Ge.EmptySignUpUsername]:{message:"username is required to signUp"},[Ge.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[Ge.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[Ge.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[Ge.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[Ge.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[Ge.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};var Fn;(function(t){t.DEFAULT_MSG="Authentication Error",t.EMPTY_EMAIL="Email cannot be empty",t.EMPTY_PHONE="Phone number cannot be empty",t.EMPTY_USERNAME="Username cannot be empty",t.INVALID_USERNAME="The username should either be a string or one of the sign in types",t.EMPTY_PASSWORD="Password cannot be empty",t.EMPTY_CODE="Confirmation code cannot be empty",t.SIGN_UP_ERROR="Error creating account",t.NO_MFA="No valid MFA method provided",t.INVALID_MFA="Invalid MFA type",t.EMPTY_CHALLENGE="Challenge response cannot be empty",t.NO_USER_SESSION="Failed to get the session because the user is empty",t.NETWORK_ERROR="Network Error",t.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",t.AUTOSIGNIN_ERROR="Please use your credentials to sign in",t.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"})(Fn||(Fn={}));var To;(function(t){t.SignInException="SignInException",t.OAuthSignInError="OAuthSignInException"})(To||(To={}));class Le extends Hr{constructor(e){super(e),this.constructor=Le,Object.setPrototypeOf(this,Le.prototype)}}function dn(t,e){const{message:n,recoverySuggestion:r}=U8[e];if(!t)throw new Le({name:e,message:n,recoverySuggestion:r})}function yt(t){const e=t?.split("_")[0];if(!t||t.indexOf("_")<0||!e||typeof e!="string")throw new Le({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return e}function j_(t){if(!t||!t.includes(":"))throw new Le({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return t.split(":")[0]}function _3(t){return Object.entries(t).map(([e,n])=>({Name:e,Value:n}))}function fZ(t){const e={};return t?.forEach(n=>{n.Name&&(e[n.Name]=n.Value)}),e}var x3;(function(t){t.ConcurrentModificationException="ConcurrentModificationException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(x3||(x3={}));var A3;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(A3||(A3={}));var T3;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UsernameExistsException="UsernameExistsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(T3||(T3={}));var R3;(function(t){t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyFailedAttemptsException="TooManyFailedAttemptsException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(R3||(R3={}));var I3;(function(t){t.AliasExistsException="AliasExistsException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyFailedAttemptsException="TooManyFailedAttemptsException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotFoundException="UserNotFoundException"})(I3||(I3={}));var O3;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(O3||(O3={}));var N3;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(N3||(N3={}));var M3;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(M3||(M3={}));var P3;(function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotFoundException="UserNotFoundException"})(P3||(P3={}));var k3;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(k3||(k3={}));var D3;(function(t){t.ExternalServiceException="ExternalServiceException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceConflictException="ResourceConflictException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException"})(D3||(D3={}));var L3;(function(t){t.ExternalServiceException="ExternalServiceException",t.InternalErrorException="InternalErrorException",t.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceConflictException="ResourceConflictException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException"})(L3||(L3={}));var U3;(function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(U3||(U3={}));var F3;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException"})(F3||(F3={}));var _v;(function(t){t.PasswordResetRequiredException="PasswordResetRequiredException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(_v||(_v={}));var z3;(function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotFoundException="UserNotFoundException"})(z3||(z3={}));var B3;(function(t){t.AliasExistsException="AliasExistsException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.MFAMethodNotFoundException="MFAMethodNotFoundException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(B3||(B3={}));var j3;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(j3||(j3={}));var H_;(function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UsernameExistsException="UsernameExistsException"})(H_||(H_={}));var H3;(function(t){t.AliasExistsException="AliasExistsException",t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(H3||(H3={}));var $3;(function(t){t.CodeMismatchException="CodeMismatchException",t.EnableSoftwareTokenMFAException="EnableSoftwareTokenMFAException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})($3||($3={}));var q3;(function(t){t.AliasExistsException="AliasExistsException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(q3||(q3={}));var W3;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(W3||(W3={}));var G3;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(G3||(G3={}));const Oy="UserUnAuthenticatedException",hZ="UserAlreadyAuthenticatedException",pZ="DeviceMetadataNotFoundException",F8="AutoSignInException",gZ="InvalidRedirectException",mZ="InvalidAppSchemeException",vZ="InvalidPreferredRedirectUrlException",yZ=new Le({name:gZ,message:"signInRedirect or signOutRedirect had an invalid format or was not found.",recoverySuggestion:"Please make sure the signIn/Out redirect in your oauth config is valid."});new Le({name:mZ,message:"A valid non-http app scheme was not found in the config.",recoverySuggestion:"Please make sure a valid custom app scheme is present in the config."});new Le({name:vZ,message:"The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.",recoverySuggestion:"Please make sure a matching preferredRedirectUrl is provided."});const bZ="InvalidOriginException",SZ=new Le({name:bZ,message:"redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin",recoverySuggestion:"Please call signInWithRedirect from the same origin."}),EZ="OAuthSignOutException",CZ="TokenRefreshException",wZ="UnexpectedSignInInterruptionException";function nd(t){if(!t||!t.accessToken)throw new Le({name:Oy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function _Z(t){if(!t||!t.idToken)throw new Le({name:Oy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const xZ=new Le({name:CZ,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow.
14
- Please change your oauth configuration to use 'code grant' flow.`,recoverySuggestion:`Please logout and change your Amplify configuration to use "code grant" flow.
15
- E.g { responseType: 'code' }`}),AZ=new Le({name:Oy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function z8(t){if(IZ(t))throw xZ;if(!RZ(t))throw AZ}function B8(t){if(!t||!t.deviceKey||!t.deviceGroupKey||!t.randomPassword)throw new Le({name:pZ,message:"Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.",recoverySuggestion:"Make sure to not clear storage after calling the signIn API."})}const TZ={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function j8(t){return t?.accessToken||t?.idToken}function RZ(t){return j8(t)&&t?.refreshToken}function IZ(t){return j8(t)&&!t?.refreshToken}const OZ=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const n=await t.Auth.getTokens({forceRefresh:!1});nd(n);const{"cognito:username":r,sub:s}=n.idToken?.payload??{},o={username:r,userId:s},a=NZ(n);return a&&(o.signInDetails=a),o};function NZ(t){return t?.signInDetails}const Ny=async()=>OZ(Ht),Nt=(t,e)=>Ay({category:Rs.Auth,action:t,...e}),jn=t=>(e,n)=>{const r=MZ(t),s=JSON.stringify(e);return PZ(n,r,s)},MZ=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}),PZ=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"});function Is(t){if(!t||t.name==="Error"||t instanceof TypeError)throw new Le({name:Pa.Unknown,message:"An unknown error has occurred.",underlyingError:t})}const or=()=>async t=>{if(t.statusCode>=300){const e=await td(t);throw Is(e),new Le({name:e.name,message:e.message,metadata:e.$metadata})}return Vh(t)},kZ=()=>(t,e)=>async function(r){return r.headers={...r.headers,"cache-control":"no-store",...await Ht.libraryOptions?.Auth?.headers?.()},t(r)},Hn=YA(T8,[kZ]),H8="cognito-idp",$n={service:H8,retryDecider:_8(td),computeDelay:w8,get userAgentValue(){return Ay()},cache:"no-store"},Yh=t=>Tn(Hn,jn("InitiateAuth"),or(),{...$n,...t}),is=t=>Tn(Hn,jn("RespondToAuthChallenge"),or(),{...$n,...t}),DZ=t=>Tn(Hn,jn("VerifySoftwareToken"),or(),{...$n,...t}),LZ=t=>Tn(Hn,jn("AssociateSoftwareToken"),or(),{...$n,...t}),UZ=({region:t})=>({url:new Wa(`https://${H8}.${t}.${N8(t)}`)}),bt=({endpointOverride:t})=>e=>t?{url:new Wa(t)}:UZ(e),FZ=t=>Tn(Hn,jn("GetTokensFromRefreshToken"),or(),{...$n,...t}),zZ=async({tokens:t,authConfig:e,username:n,clientMetadata:r})=>{lt(e?.Cognito);const{userPoolId:s,userPoolClientId:o,userPoolEndpoint:a}=e.Cognito,u=yt(s);z8(t);const c=FZ({endpointResolver:bt({endpointOverride:a})}),{AuthenticationResult:f}=await c({region:u},{ClientId:o,RefreshToken:t.refreshToken,DeviceKey:t.deviceMetadata?.deviceKey,ClientMetadata:r}),p=gi(f?.AccessToken??""),g=f?.IdToken?gi(f.IdToken):void 0,{iat:m}=p.payload;if(!m)throw new Le({name:"iatNotFoundException",message:"iat not found in access token"});const y=m*1e3-new Date().getTime();return{accessToken:p,idToken:g,clockDrift:y,refreshToken:f?.RefreshToken??t.refreshToken,username:n}},BZ=aZ(zZ),jZ={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var xv;(function(t){t.InvalidAuthTokens="InvalidAuthTokens"})(xv||(xv={}));const HZ={[xv.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},$Z=wy(HZ),V3="CognitoIdentityServiceProvider";class qZ{getKeyValueStorage(){if(!this.keyValueStorage)throw new Le({name:"KeyValueStorageNotFoundException",message:"KeyValueStorage was not found in TokenStore"});return this.keyValueStorage}setKeyValueStorage(e){this.keyValueStorage=e}setAuthConfig(e){this.authConfig=e}async loadTokens(){try{const e=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(e.accessToken);if(!n)throw new Le({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});const r=gi(n),s=await this.getKeyValueStorage().getItem(e.idToken),o=s?gi(s):void 0,a=await this.getKeyValueStorage().getItem(e.refreshToken)??void 0,u=await this.getKeyValueStorage().getItem(e.clockDrift)??"0",c=Number.parseInt(u),f=await this.getKeyValueStorage().getItem(e.signInDetails),p={accessToken:r,idToken:o,refreshToken:a,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:c,username:await this.getLastAuthUser()};return f&&(p.signInDetails=JSON.parse(f)),p}catch{return null}}async storeTokens(e){$Z(e!==void 0,xv.InvalidAuthTokens);const n=e.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),n);const r=await this.getAuthKeys();await this.getKeyValueStorage().setItem(r.accessToken,e.accessToken.toString()),e.idToken?await this.getKeyValueStorage().setItem(r.idToken,e.idToken.toString()):await this.getKeyValueStorage().removeItem(r.idToken),e.refreshToken?await this.getKeyValueStorage().setItem(r.refreshToken,e.refreshToken):await this.getKeyValueStorage().removeItem(r.refreshToken),e.deviceMetadata&&(e.deviceMetadata.deviceKey&&await this.getKeyValueStorage().setItem(r.deviceKey,e.deviceMetadata.deviceKey),e.deviceMetadata.deviceGroupKey&&await this.getKeyValueStorage().setItem(r.deviceGroupKey,e.deviceMetadata.deviceGroupKey),await this.getKeyValueStorage().setItem(r.randomPasswordKey,e.deviceMetadata.randomPassword)),e.signInDetails?await this.getKeyValueStorage().setItem(r.signInDetails,JSON.stringify(e.signInDetails)):await this.getKeyValueStorage().removeItem(r.signInDetails),await this.getKeyValueStorage().setItem(r.clockDrift,`${e.clockDrift}`)}async clearTokens(){const e=await this.getAuthKeys();await Promise.all([this.getKeyValueStorage().removeItem(e.accessToken),this.getKeyValueStorage().removeItem(e.idToken),this.getKeyValueStorage().removeItem(e.clockDrift),this.getKeyValueStorage().removeItem(e.refreshToken),this.getKeyValueStorage().removeItem(e.signInDetails),this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),this.getKeyValueStorage().removeItem(e.oauthMetadata)])}async getDeviceMetadata(e){const n=await this.getAuthKeys(e),r=await this.getKeyValueStorage().getItem(n.deviceKey),s=await this.getKeyValueStorage().getItem(n.deviceGroupKey),o=await this.getKeyValueStorage().getItem(n.randomPasswordKey);return o&&s&&r?{deviceKey:r,deviceGroupKey:s,randomPassword:o}:null}async clearDeviceMetadata(e){const n=await this.getAuthKeys(e);await Promise.all([this.getKeyValueStorage().removeItem(n.deviceKey),this.getKeyValueStorage().removeItem(n.deviceGroupKey),this.getKeyValueStorage().removeItem(n.randomPasswordKey)])}async getAuthKeys(e){lt(this.authConfig?.Cognito);const n=e??await this.getLastAuthUser();return WZ(V3,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){lt(this.authConfig?.Cognito);const e=this.authConfig.Cognito.userPoolClientId;return`${V3}.${e}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(e){const{oauthMetadata:n}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(n,JSON.stringify(e))}async getOAuthMetadata(){const{oauthMetadata:e}=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(e);return n&&JSON.parse(n)}}const WZ=(t,e)=>XA(jZ)(`${t}`,e);function XA(t){const e=Object.values({...t});return(n,r)=>e.reduce((s,o)=>({...s,[o]:`${n}.${r}.${o}`}),{})}const K3="amplify-signin-with-hostedUI",ho="CognitoIdentityServiceProvider";class $8{constructor(e){this.keyValueStorage=e}async clearOAuthInflightData(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(e.inflightOAuth),this.keyValueStorage.removeItem(e.oauthPKCE),this.keyValueStorage.removeItem(e.oauthState)])}async clearOAuthData(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(K3),this.keyValueStorage.removeItem(e.oauthSignIn)}loadOAuthState(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthState)}storeOAuthState(e){lt(this.cognitoConfig);const n=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthState,e)}loadPKCE(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthPKCE)}storePKCE(e){lt(this.cognitoConfig);const n=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthPKCE,e)}setAuthConfig(e){this.cognitoConfig=e}async loadOAuthInFlight(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(e.inflightOAuth)==="true"}async storeOAuthInFlight(e){lt(this.cognitoConfig);const n=po(ho,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.inflightOAuth,`${e}`)}async loadOAuthSignIn(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId),n=await this.keyValueStorage.getItem(K3),[r,s]=(await this.keyValueStorage.getItem(e.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:r==="true"||n==="true",preferPrivateSession:s==="true"}}async storeOAuthSignIn(e,n=!1){lt(this.cognitoConfig);const r=po(ho,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(r.oauthSignIn,`${e},${n}`)}}const po=(t,e)=>XA(TZ)(t,e),Ur=new $8(Kh),$_=[],GZ=t=>{$_.push(t)},q8=()=>{for(;$_.length;)$_.pop()?.()};class VZ{constructor(){this.waitForInflightOAuth=Ty()?async()=>{if(await Ur.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((e,n)=>{GZ(e)}),this.inflightPromise)}:async()=>{}}setAuthConfig(e){Ur.setAuthConfig(e.Cognito),this.authConfig=e}setTokenRefresher(e){this.tokenRefresher=e}setAuthTokenStore(e){this.tokenStore=e}getTokenStore(){if(!this.tokenStore)throw new Le({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new Le({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(e){this.clientMetadataProvider=e}async getTokens(e){let n;try{lt(this.authConfig?.Cognito)}catch{return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,n=await this.getTokenStore().loadTokens();const r=await this.getTokenStore().getLastAuthUser();if(n===null)return null;const s=!!n?.idToken&&w3({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),o=w3({expiresAt:(n.accessToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0});return(e?.forceRefresh||s||o)&&(n=await this.refreshTokens({tokens:n,username:r,clientMetadata:e?.clientMetadata??await this.clientMetadataProvider?.()}),n===null)?null:{accessToken:n?.accessToken,idToken:n?.idToken,signInDetails:n?.signInDetails}}async refreshTokens({tokens:e,username:n,clientMetadata:r}){try{const{signInDetails:s}=e,o=await this.getTokenRefresher()({tokens:e,authConfig:this.authConfig,username:n,clientMetadata:r});return o.signInDetails=s,await this.setTokens({tokens:o}),Ao.dispatch("auth",{event:"tokenRefresh"},"Auth",xo),o}catch(s){return this.handleErrors(s)}}handleErrors(e){if(Is(e),this.isAuthenticationError(e)&&this.clearTokens(),Ao.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",xo),e.name.startsWith("NotAuthorizedException"))return null;throw e}isAuthenticationError(e){return["NotAuthorizedException","TokenRevokedException","UserNotFoundException","PasswordResetRequiredException","UserNotConfirmedException","RefreshTokenReuseException"].some(r=>e?.name?.startsWith?.(r))}async setTokens({tokens:e}){return this.getTokenStore().storeTokens(e)}async clearTokens(){return this.getTokenStore().clearTokens()}getDeviceMetadata(e){return this.getTokenStore().getDeviceMetadata(e)}clearDeviceMetadata(e){return this.getTokenStore().clearDeviceMetadata(e)}setOAuthMetadata(e){return this.getTokenStore().setOAuthMetadata(e)}getOAuthMetadata(){return this.getTokenStore().getOAuthMetadata()}}class KZ{constructor(){this.authTokenStore=new qZ,this.authTokenStore.setKeyValueStorage(Kh),this.tokenOrchestrator=new VZ,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(BZ)}getTokens(e={}){return this.tokenOrchestrator.getTokens(e)}setKeyValueStorage(e){this.authTokenStore.setKeyValueStorage(e)}setClientMetadataProvider(e){this.tokenOrchestrator.setClientMetadataProvider(e)}setAuthConfig(e){this.authTokenStore.setAuthConfig(e),this.tokenOrchestrator.setAuthConfig(e)}}const $m=new KZ,{tokenOrchestrator:$r}=$m;async function Ti(t){if(t.AccessToken){const e=gi(t.AccessToken),n=(e.payload.iat||0)*1e3,r=new Date().getTime(),s=n>0?n-r:0;let o,a,u;t.RefreshToken&&(a=t.RefreshToken),t.IdToken&&(o=gi(t.IdToken)),t?.NewDeviceMetadata&&(u=t.NewDeviceMetadata);const c={accessToken:e,idToken:o,refreshToken:a,clockDrift:s,deviceMetadata:u,username:t.username};t?.signInDetails&&(c.signInDetails=t.signInDetails),await $r.setTokens({tokens:c})}else throw new Hr({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}const YZ="Unable to get user session following successful sign-in.",Ga=async()=>{try{Ao.dispatch("auth",{event:"signedIn",data:await Ny()},"Auth",xo)}catch(t){throw t.name===Oy?new Le({name:wZ,message:YZ,recoverySuggestion:"This most likely is due to auth tokens not being persisted. If you are using cookie store, please ensure cookies can be correctly set from your server."}):t}};function W8(){return{active:!1}}const ZZ=(t,e)=>{switch(e.type){case"SET_USERNAME":return{...t,username:e.value};case"SET_SESSION":return{...t,session:e.value};case"START":return{...t,active:!0};case"RESET":return W8();default:return t}},XZ=t=>{let e=t(W8(),{type:"RESET"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Ra=XZ(ZZ),QZ=180*1e3,jg="CognitoSignInState",fi={username:`${jg}.username`,challengeName:`${jg}.challengeName`,signInSession:`${jg}.signInSession`,expiry:`${jg}.expiry`},JZ=(t,e)=>{switch(e.type){case"SET_SIGN_IN_SESSION":return Hg({signInSession:e.value}),{...t,signInSession:e.value};case"SET_SIGN_IN_STATE":return Hg(e.value),{...e.value};case"SET_CHALLENGE_NAME":return Hg({challengeName:e.value}),{...t,challengeName:e.value};case"SET_USERNAME":return Hg({username:e.value}),{...t,username:e.value};case"SET_INITIAL_STATE":return tX();case"RESET_STATE":return G8(),QA();default:return t}},eX=t=>{const e=Number(t),n=Date.now();return e<=n},Qs=()=>{Ro.dispatch({type:"RESET_STATE"})},G8=()=>{for(const t of Object.values(fi))di.removeItem(t)},QA=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),tX=()=>{const t=di.getItem(fi.expiry);if(!t||eX(t))return G8(),QA();const e=di.getItem(fi.username)??void 0,n=di.getItem(fi.challengeName)??void 0,r=di.getItem(fi.signInSession)??void 0;return{username:e,challengeName:n,signInSession:r}},nX=t=>{let e=t(QA(),{type:"SET_INITIAL_STATE"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Ro=nX(JZ);function Jl(t){Ro.dispatch({type:"SET_SIGN_IN_STATE",value:t})}const Hg=({challengeName:t,signInSession:e,username:n})=>{n&&di.setItem(fi.username,n),t&&di.setItem(fi.challengeName,t),e&&(di.setItem(fi.signInSession,e),di.setItem(fi.expiry,String(Date.now()+QZ)))},Y3="Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.";class Ts extends Hr{constructor(e){super(e),this.constructor=Ts,Object.setPrototypeOf(this,Ts.prototype)}}var Bt;(function(t){t.PasskeyNotSupported="PasskeyNotSupported",t.PasskeyAlreadyExists="PasskeyAlreadyExists",t.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",t.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",t.RelyingPartyMismatch="RelyingPartyMismatch",t.PasskeyRegistrationFailed="PasskeyRegistrationFailed",t.PasskeyRetrievalFailed="PasskeyRetrievalFailed",t.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",t.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",t.PasskeyOperationAborted="PasskeyOperationAborted"})(Bt||(Bt={}));const AE="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",Z3="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",kc={[Bt.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:Y3},[Bt.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:Z3},[Bt.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:Z3},[Bt.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:Y3},[Bt.PasskeyRetrievalFailed]:{message:"Device failed to retrieve passkey.",recoverySuggestion:"Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP."},[Bt.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[Bt.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:AE},[Bt.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:AE},[Bt.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:AE},[Bt.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},rd=wy(kc,Ts),V8=t=>{if(t instanceof Error){if(t.name==="AbortError"){const{message:e,recoverySuggestion:n}=kc[Bt.PasskeyOperationAborted];return new Ts({name:Bt.PasskeyOperationAborted,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="SecurityError"){const{message:e,recoverySuggestion:n}=kc[Bt.RelyingPartyMismatch];return new Ts({name:Bt.RelyingPartyMismatch,message:e,recoverySuggestion:n,underlyingError:t})}}return new Ts({name:Pa.Unknown,message:"An unknown error has occurred.",underlyingError:t})},rX=t=>{if(t instanceof Ts)return t;if(t instanceof Error&&t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=kc[Bt.PasskeyAuthenticationCanceled];return new Ts({name:Bt.PasskeyAuthenticationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}return V8(t)},K8=()=>Ty()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",Co=t=>Pc.convert(new Uint8Array(t),{urlSafe:!0,skipPadding:!0}),nh=t=>Uint8Array.from(GA.convert(t,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,sX=t=>{const e=nh(t.user.id),n=nh(t.challenge),r=(t.excludeCredentials||[]).map(s=>({...s,id:nh(s.id)}));return{...t,excludeCredentials:r,challenge:n,user:{...t.user,id:e}}},oX=t=>{const e={clientDataJSON:Co(t.response.clientDataJSON),attestationObject:Co(t.response.attestationObject),transports:t.response.getTransports(),publicKeyAlgorithm:t.response.getPublicKeyAlgorithm(),authenticatorData:Co(t.response.getAuthenticatorData())},n=t.response.getPublicKey();n&&(e.publicKey=Co(n));const r={type:t.type,id:t.id,rawId:Co(t.rawId),clientExtensionResults:t.getClientExtensionResults(),response:e};return t.authenticatorAttachment&&(r.authenticatorAttachment=t.authenticatorAttachment),r},iX=t=>{const e=nh(t.challenge),n=(t.allowCredentials||[]).map(r=>({...r,id:nh(r.id)}));return{...t,challenge:e,allowCredentials:n}},aX=t=>{const e={clientDataJSON:Co(t.response.clientDataJSON),authenticatorData:Co(t.response.authenticatorData),signature:Co(t.response.signature)};t.response.userHandle&&(e.userHandle=Co(t.response.userHandle));const n={id:t.id,rawId:Co(t.rawId),type:t.type,clientExtensionResults:t.getClientExtensionResults(),response:e};return t.authenticatorAttachment&&(n.authenticatorAttachment=t.authenticatorAttachment),n};function lX(t){rd([!!t,!!t?.challenge,!!t?.user,!!t?.rp,!!t?.pubKeyCredParams].every(Boolean),Bt.InvalidPasskeyRegistrationOptions)}function uX(t){rd(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAttestationResponse,Bt.PasskeyRegistrationFailed)}function cX(t){rd(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAssertionResponse,Bt.PasskeyRetrievalFailed)}const dX=async t=>{try{const e=K8();rd(e,Bt.PasskeyNotSupported);const n=iX(t),r=await navigator.credentials.get({publicKey:n});return cX(r),aX(r)}catch(e){throw rX(e)}},fX=t=>Tn(Hn,jn("ConfirmDevice"),or(),{...$n,...t}),qm={convert(t){return new TextEncoder().encode(t)}};function Ie(t,e){t!=null&&this.fromString(t,e)}function Cr(){return new Ie(null,null)}let Na;const hX=0xdeadbeefcafe,X3=(hX&16777215)===15715070;function pX(t,e,n,r,s,o){for(;--o>=0;){const a=e*this[t++]+n[r]+s;s=Math.floor(a/67108864),n[r++]=a&67108863}return s}function gX(t,e,n,r,s,o){const a=e&32767,u=e>>15;for(;--o>=0;){let c=this[t]&32767;const f=this[t++]>>15,p=u*c+f*a;c=a*c+((p&32767)<<15)+n[r]+(s&1073741823),s=(c>>>30)+(p>>>15)+u*f+(s>>>30),n[r++]=c&1073741823}return s}function mX(t,e,n,r,s,o){const a=e&16383,u=e>>14;for(;--o>=0;){let c=this[t]&16383;const f=this[t++]>>14,p=u*c+f*a;c=a*c+((p&16383)<<14)+n[r]+s,s=(c>>28)+(p>>14)+u*f,n[r++]=c&268435455}return s}const Q3=typeof navigator<"u";Q3&&X3&&navigator.appName==="Microsoft Internet Explorer"?(Ie.prototype.am=gX,Na=30):Q3&&X3&&navigator.appName!=="Netscape"?(Ie.prototype.am=pX,Na=26):(Ie.prototype.am=mX,Na=28);Ie.prototype.DB=Na;Ie.prototype.DM=(1<<Na)-1;Ie.prototype.DV=1<<Na;const JA=52;Ie.prototype.FV=Math.pow(2,JA);Ie.prototype.F1=JA-Na;Ie.prototype.F2=2*Na-JA;const vX="0123456789abcdefghijklmnopqrstuvwxyz",My=[];let sd,xs;sd=48;for(xs=0;xs<=9;++xs)My[sd++]=xs;sd=97;for(xs=10;xs<36;++xs)My[sd++]=xs;sd=65;for(xs=10;xs<36;++xs)My[sd++]=xs;function J3(t){return vX.charAt(t)}function yX(t,e){const n=My[t.charCodeAt(e)];return n??-1}function bX(t){for(let e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function SX(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0}function eT(t){const e=Cr();return e.fromInt(t),e}function EX(t,e){let n;if(e===16)n=4;else if(e===8)n=3;else if(e===2)n=1;else if(e===32)n=5;else if(e===4)n=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;let r=t.length,s=!1,o=0;for(;--r>=0;){const a=yX(t,r);if(a<0){t.charAt(r)==="-"&&(s=!0);continue}s=!1,o===0?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,o+=n,o>=this.DB&&(o-=this.DB)}this.clamp(),s&&Ie.ZERO.subTo(this,this)}function CX(){const t=this.s&this.DM;for(;this.t>0&&this[this.t-1]==t;)--this.t}function wX(t){if(this.s<0)return"-"+this.negate().toString(t);let e;if(t==16)e=4;else if(t===8)e=3;else if(t===2)e=1;else if(t===32)e=5;else if(t===4)e=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");const n=(1<<e)-1;let r,s=!1,o="",a=this.t,u=this.DB-a*this.DB%e;if(a-- >0)for(u<this.DB&&(r=this[a]>>u)>0&&(s=!0,o=J3(r));a>=0;)u<e?(r=(this[a]&(1<<u)-1)<<e-u,r|=this[--a]>>(u+=this.DB-e)):(r=this[a]>>(u-=e)&n,u<=0&&(u+=this.DB,--a)),r>0&&(s=!0),s&&(o+=J3(r));return s?o:"0"}function _X(){const t=Cr();return Ie.ZERO.subTo(this,t),t}function xX(){return this.s<0?this.negate():this}function AX(t){let e=this.s-t.s;if(e!=0)return e;let n=this.t;if(e=n-t.t,e!=0)return this.s<0?-e:e;for(;--n>=0;)if((e=this[n]-t[n])!=0)return e;return 0}function tT(t){let e=1,n;return(n=t>>>16)!==0&&(t=n,e+=16),(n=t>>8)!==0&&(t=n,e+=8),(n=t>>4)!==0&&(t=n,e+=4),(n=t>>2)!==0&&(t=n,e+=2),(n=t>>1)!==0&&(t=n,e+=1),e}function TX(){return this.t<=0?0:this.DB*(this.t-1)+tT(this[this.t-1]^this.s&this.DM)}function RX(t,e){let n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s}function IX(t,e){for(let n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s}function OX(t,e){const n=t%this.DB,r=this.DB-n,s=(1<<r)-1,o=Math.floor(t/this.DB);let a=this.s<<n&this.DM,u;for(u=this.t-1;u>=0;--u)e[u+o+1]=this[u]>>r|a,a=(this[u]&s)<<n;for(u=o-1;u>=0;--u)e[u]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()}function NX(t,e){e.s=this.s;const n=Math.floor(t/this.DB);if(n>=this.t){e.t=0;return}const r=t%this.DB,s=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(let a=n+1;a<this.t;++a)e[a-n-1]|=(this[a]&o)<<s,e[a-n]=this[a]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<s),e.t=this.t-n,e.clamp()}function MX(t,e){let n=0,r=0;const s=Math.min(t.t,this.t);for(;n<s;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()}function PX(t,e){const n=this.abs(),r=t.abs();let s=n.t;for(e.t=s+r.t;--s>=0;)e[s]=0;for(s=0;s<r.t;++s)e[s+n.t]=n.am(0,r[s],e,s,0,n.t);e.s=0,e.clamp(),this.s!==t.s&&Ie.ZERO.subTo(e,e)}function kX(t){const e=this.abs();let n=t.t=2*e.t;for(;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){const r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()}function DX(t,e,n){const r=t.abs();if(r.t<=0)return;const s=this.abs();if(s.t<r.t){e?.fromInt(0),n!=null&&this.copyTo(n);return}n===null&&(n=Cr());const o=Cr(),a=this.s,u=t.s,c=this.DB-tT(r[r.t-1]);c>0?(r.lShiftTo(c,o),s.lShiftTo(c,n)):(r.copyTo(o),s.copyTo(n));const f=o.t,p=o[f-1];if(p===0)return;const g=p*(1<<this.F1)+(f>1?o[f-2]>>this.F2:0),m=this.FV/g,y=(1<<this.F1)/g,S=1<<this.F2;let E=n.t,C=E-f;const w=e===null?Cr():e;for(o.dlShiftTo(C,w),n.compareTo(w)>=0&&(n[n.t++]=1,n.subTo(w,n)),Ie.ONE.dlShiftTo(f,w),w.subTo(o,o);o.t<f;)o[o.t++]=0;for(;--C>=0;){let x=n[--E]===p?this.DM:Math.floor(n[E]*m+(n[E-1]+S)*y);if((n[E]+=o.am(0,x,n,C,0,f))<x)for(o.dlShiftTo(C,w),n.subTo(w,n);n[E]<--x;)n.subTo(w,n)}e!==null&&(n.drShiftTo(f,e),a!==u&&Ie.ZERO.subTo(e,e)),n.t=f,n.clamp(),c>0&&n.rShiftTo(c,n),a<0&&Ie.ZERO.subTo(n,n)}function LX(t){const e=Cr();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Ie.ZERO)>0&&t.subTo(e,e),e}function UX(){if(this.t<1)return 0;const t=this[0];if((t&1)===0)return 0;let e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function FX(t){return this.compareTo(t)===0}function zX(t,e){let n=0,r=0;const s=Math.min(t.t,this.t);for(;n<s;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()}function BX(t){const e=Cr();return this.addTo(t,e),e}function jX(t){const e=Cr();return this.subTo(t,e),e}function HX(t){const e=Cr();return this.multiplyTo(t,e),e}function $X(t){const e=Cr();return this.divRemTo(t,e,null),e}function od(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function qX(t){const e=Cr();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(Ie.ZERO)>0&&this.m.subTo(e,e),e}function WX(t){const e=Cr();return t.copyTo(e),this.reduce(e),e}function GX(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(let e=0;e<this.m.t;++e){let n=t[e]&32767;const r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(n=e+this.m.t,t[n]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function VX(t,e){t.squareTo(e),this.reduce(e)}function KX(t,e,n){t.multiplyTo(e,n),this.reduce(n)}od.prototype.convert=qX;od.prototype.revert=WX;od.prototype.reduce=GX;od.prototype.mulTo=KX;od.prototype.sqrTo=VX;function YX(t,e,n){let r=t.bitLength(),s,o=eT(1);const a=new od(e);if(r<=0)return o;r<18?s=1:r<48?s=3:r<144?s=4:r<768?s=5:s=6;const u=[];let c=3;const f=s-1,p=(1<<s)-1;if(u[1]=a.convert(this),s>1){const w=Cr();for(a.sqrTo(u[1],w);c<=p;)u[c]=Cr(),a.mulTo(w,u[c-2],u[c]),c+=2}let g=t.t-1,m,y=!0,S=Cr(),E;for(r=tT(t[g])-1;g>=0;){for(r>=f?m=t[g]>>r-f&p:(m=(t[g]&(1<<r+1)-1)<<f-r,g>0&&(m|=t[g-1]>>this.DB+r-f)),c=s;(m&1)===0;)m>>=1,--c;if((r-=c)<0&&(r+=this.DB,--g),y)u[m].copyTo(o),y=!1;else{for(;c>1;)a.sqrTo(o,S),a.sqrTo(S,o),c-=2;c>0?a.sqrTo(o,S):(E=o,o=S,S=E),a.mulTo(S,u[m],o)}for(;g>=0&&(t[g]&1<<r)===0;)a.sqrTo(o,S),E=o,o=S,S=E,--r<0&&(r=this.DB-1,--g)}const C=a.revert(o);return n(null,C),C}Ie.prototype.copyTo=bX;Ie.prototype.fromInt=SX;Ie.prototype.fromString=EX;Ie.prototype.clamp=CX;Ie.prototype.dlShiftTo=RX;Ie.prototype.drShiftTo=IX;Ie.prototype.lShiftTo=OX;Ie.prototype.rShiftTo=NX;Ie.prototype.subTo=MX;Ie.prototype.multiplyTo=PX;Ie.prototype.squareTo=kX;Ie.prototype.divRemTo=DX;Ie.prototype.invDigit=UX;Ie.prototype.addTo=zX;Ie.prototype.toString=wX;Ie.prototype.negate=_X;Ie.prototype.abs=xX;Ie.prototype.compareTo=AX;Ie.prototype.bitLength=TX;Ie.prototype.mod=LX;Ie.prototype.equals=FX;Ie.prototype.add=BX;Ie.prototype.subtract=jX;Ie.prototype.multiply=HX;Ie.prototype.divide=$X;Ie.prototype.modPow=YX;Ie.ZERO=eT(0);Ie.ONE=eT(1);const ZX=async({a:t,g:e,k:n,x:r,B:s,N:o,U:a})=>new Promise((u,c)=>{e.modPow(r,o,(f,p)=>{if(f){c(f);return}s.subtract(n.multiply(p)).modPow(t.add(a.multiply(r)),o,(g,m)=>{if(g){c(g);return}u(m.mod(o))})})}),XX="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",Y8={},q_={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),Y8[t]=e,q_[e]=t}const Dc=t=>{if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2){const r=t.slice(n,n+2).toLowerCase();if(r in q_)e[n/2]=q_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e},nT=t=>{let e="";for(let n=0;n<t.byteLength;n++)e+=Y8[t[n]];return e},W_=t=>{const e=new Fl;e.update(t);const n=e.digestSync(),r=nT(n);return new Array(64-r.length).join("0")+r},Wm=t=>W_(Dc(t)),QX=/^[89a-f]/i,ii=t=>{if(!(t instanceof Ie))throw new Error("Not a BigInteger");const e=t.compareTo(Ie.ZERO)<0;let n=t.abs().toString(16);if(n=n.length%2!==0?`0${n}`:n,n=QX.test(n)?`00${n}`:n,e){const r=n.split("").map(o=>{const a=~parseInt(o,16)&15;return"0123456789ABCDEF".charAt(a)}).join("");n=new Ie(r,16).add(Ie.ONE).toString(16),n.toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},JX=({A:t,B:e})=>{const n=new Ie(Wm(ii(t)+ii(e)),16);if(n.equals(Ie.ZERO))throw new Error("U cannot be zero.");return n},eQ=(t,e,n)=>{const r=new Fl(e);r.update(t);const s=r.digestSync(),o=new Fl(s);return o.update(n),o.digestSync().slice(0,16)},rT=t=>{const e=new ZA().random(t).toString();return Dc(e)},tQ=()=>Pc.convert(rT(40));class nQ{constructor({userPoolName:e,a:n,g:r,A:s,N:o}){this.encoder=qm,this.userPoolName=e,this.a=n,this.g=r,this.A=s,this.N=o,this.k=new Ie(Wm(`${ii(o)}${ii(r)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new Le({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new Le({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new Le({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(e,n){this.randomPassword=tQ();const r=`${e}${n}:${this.randomPassword}`,s=W_(r),o=nT(rT(16));return this.saltToHashDevices=ii(new Ie(o,16)),new Promise((a,u)=>{this.g.modPow(new Ie(Wm(this.saltToHashDevices+s),16),this.N,(c,f)=>{if(c){u(c);return}this.verifierDevices=ii(f),a()})})}async getPasswordAuthenticationKey({username:e,password:n,serverBValue:r,salt:s}){if(r.mod(this.N).equals(Ie.ZERO))throw new Error("B cannot be zero.");const o=JX({A:this.A,B:r}),a=`${this.userPoolName}${e}:${n}`,u=W_(a),c=new Ie(Wm(ii(s)+u),16),f=await ZX({a:this.a,g:this.g,k:this.k,x:c,B:r,N:this.N,U:o}),p=this.encoder.convert("Caldera Derived Key"),g=this.encoder.convert(""),m=new Uint8Array(p.byteLength+g.byteLength);return m.set(p,0),m.set(g,p.byteLength),eQ(Dc(ii(f)),Dc(ii(o)),m)}}const rQ=async({a:t,g:e,N:n})=>new Promise((r,s)=>{e.modPow(t,n,(o,a)=>{if(o){s(o);return}if(a.mod(n).equals(Ie.ZERO)){s(new Error("Illegal parameter. A mod N cannot be 0."));return}r(a)})}),Zh=async t=>{const e=new Ie(XX,16),n=new Ie("2",16),r=sQ(),s=await rQ({a:r,g:n,N:e});return new nQ({userPoolName:t,a:r,g:n,A:s,N:e})},sQ=()=>{const t=nT(rT(128));return new Ie(t,16)};async function eu({userPoolId:t,userPoolEndpoint:e,newDeviceMetadata:n,accessToken:r}){if(!n)return;const s=t.split("_")[1]||"",o=await Zh(s),a=n?.DeviceKey,u=n?.DeviceGroupKey;try{await o.generateHashDevice(u??"",a??"")}catch{return}const c={Salt:Pc.convert(Dc(o.getSaltToHashDevices())),PasswordVerifier:Pc.convert(Dc(o.getVerifierDevices()))},f=o.getRandomPassword();try{return await fX({endpointResolver:bt({endpointOverride:e})})({region:yt(t)},{AccessToken:r,DeviceName:await lZ(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:c}),{deviceKey:a,deviceGroupKey:u,randomPassword:f}}catch{return}}async function oQ(t){const e=Ht.getConfig().Auth?.Cognito;lt(e);const{username:n,signInSession:r,signInDetails:s,challengeName:o}=Ro.getState();if(o!=="WEB_AUTHN"||!n)throw new Le({name:To.SignInException,message:"Unable to proceed due to invalid sign in state."});const{CREDENTIAL_REQUEST_OPTIONS:a}=t;rd(!!a,Bt.InvalidPasskeyAuthenticationOptions);const u=await dX(JSON.parse(a)),c=is({endpointResolver:bt({endpointOverride:e.userPoolEndpoint})}),{ChallengeName:f,ChallengeParameters:p,AuthenticationResult:g,Session:m}=await c({region:yt(e.userPoolId),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(u)},ClientId:e.userPoolClientId,Session:r});if(Jl({signInSession:m,username:n,challengeName:f,signInDetails:s}),g)return await Ti({...g,username:n,NewDeviceMetadata:await eu({userPoolId:e.userPoolId,userPoolEndpoint:e.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:s}),Ro.dispatch({type:"RESET_STATE"}),await Ga(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if(f==="WEB_AUTHN")throw new Le({name:To.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:f,challengeParameters:p}}function qn({username:t,userPoolId:e,userPoolClientId:n}){if(typeof window>"u")return;const r=window.AmazonCognitoAdvancedSecurityData;if(typeof r>"u")return;const s=r.getData(t,e,n);return s?{EncodedData:s}:{}}const iQ=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],aQ=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Z8=()=>{const t=new Date,e=aQ[t.getUTCDay()],n=iQ[t.getUTCMonth()],r=t.getUTCDate();let s=t.getUTCHours();s<10&&(s=`0${s}`);let o=t.getUTCMinutes();o<10&&(o=`0${o}`);let a=t.getUTCSeconds();a<10&&(a=`0${a}`);const u=t.getUTCFullYear();return`${e} ${n} ${r} ${s}:${o}:${a} UTC ${u}`},X8=({userPoolName:t,username:e,challengeParameters:n,dateNow:r,hkdf:s})=>{const o=qm.convert(t),a=qm.convert(e),u=lQ(n.SECRET_BLOCK),c=qm.convert(r),f=new Uint8Array(o.byteLength+a.byteLength+u.byteLength+c.byteLength);f.set(o,0),f.set(a,o.byteLength),f.set(u,o.byteLength+a.byteLength),f.set(c,o.byteLength+a.byteLength+u.byteLength);const p=new Fl(s);p.update(f);const g=p.digestSync();return Pc.convert(g)},lQ=t=>{const e="=".repeat((4-t.length%4)%4),n=(t+e).replace(/-/g,"+").replace(/_/g,"/"),r=GA.convert(n),s=new Uint8Array(r.length);for(let o=0;o<r.length;++o)s[o]=r.charCodeAt(o);return s};async function Xh({username:t,config:e,clientMetadata:n,session:r,tokenOrchestrator:s}){const{userPoolId:o,userPoolEndpoint:a}=e,u=e.userPoolClientId,c=await s?.getDeviceMetadata(t);B8(c);const f=await Zh(c.deviceGroupKey),p={USERNAME:t,SRP_A:f.A.toString(16),DEVICE_KEY:c.deviceKey},g={ChallengeName:"DEVICE_SRP_AUTH",ClientId:u,ChallengeResponses:p,ClientMetadata:n,Session:r},m=is({endpointResolver:bt({endpointOverride:a})}),{ChallengeParameters:y,Session:S}=await m({region:yt(o)},g);return uQ(t,y,n,S,f,e,s)}async function uQ(t,e,n,r,s,{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u},c){const f=await c?.getDeviceMetadata(t);B8(f);const p=new Ie(e?.SRP_B,16),g=new Ie(e?.SALT,16),{deviceKey:m}=f,{deviceGroupKey:y}=f,S=await s.getPasswordAuthenticationKey({username:f.deviceKey,password:f.randomPassword,serverBValue:p,salt:g}),E=Z8(),C={USERNAME:e?.USERNAME??t,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:X8({username:m,userPoolName:y,challengeParameters:e,dateNow:E,hkdf:S}),DEVICE_KEY:m},w=qn({username:t,userPoolId:o,userPoolClientId:a}),x={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:a,ChallengeResponses:C,Session:r,ClientMetadata:n,UserContextData:w};return is({endpointResolver:bt({endpointOverride:u})})({region:yt(o)},x)}async function sT(t,e,n,r,s,o,a){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=o,p=u?.split("_")[1]||"",g=new Ie(e?.SRP_B,16),m=new Ie(e?.SALT,16),y=e?.USER_ID_FOR_SRP;if(!y)throw new Le({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});const S=await s.getPasswordAuthenticationKey({username:y,password:t,serverBValue:g,salt:m}),E=Z8(),C={USERNAME:y,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:X8({username:y,userPoolName:p,challengeParameters:e,dateNow:E,hkdf:S})},w=await a.getDeviceMetadata(y);w&&w.deviceKey&&(C.DEVICE_KEY=w.deviceKey);const x=qn({username:y,userPoolId:u,userPoolClientId:c}),T={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:C,ClientMetadata:n,Session:r,ClientId:c,UserContextData:x},M=await is({endpointResolver:bt({endpointOverride:f})})({region:yt(u)},T);return M.ChallengeName==="DEVICE_SRP_AUTH"?Xh({username:y,config:o,clientMetadata:n,session:M.Session,tokenOrchestrator:a}):M}async function id(t,e,n,r){try{return await t(...e)}catch(s){if(s instanceof Le&&s.name==="ResourceNotFoundException"&&s.message.includes("Device does not exist."))return await r.clearDeviceMetadata(n),t(...e);throw s}}function tu(t){const{dispatch:e}=Ro;e({type:"SET_USERNAME",value:t})}async function Q8({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:o,preferredChallenge:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=r,p=u?.split("_")[1]||"",g=await Zh(p),m={USERNAME:t,SRP_A:g.A.toString(16)};o==="USER_AUTH"&&a&&(m.PREFERRED_CHALLENGE=a);const y=qn({username:t,userPoolId:u,userPoolClientId:c}),S={AuthFlow:o,AuthParameters:m,ClientMetadata:n,ClientId:c,UserContextData:y},C=await Yh({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Nt(Ve.SignIn)},S),{ChallengeParameters:w,Session:x}=C,T=w?.USERNAME??t;return tu(T),C.ChallengeName==="PASSWORD_VERIFIER"?id(sT,[e,w,n,x,g,r,s],T,s):C}async function cQ({username:t,session:e,selectedChallenge:n,config:r,clientMetadata:s}){return is({endpointResolver:bt({endpointOverride:r.userPoolEndpoint})})({region:yt(r.userPoolId),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:t,ANSWER:n},ClientId:r.userPoolClientId,Session:e,ClientMetadata:s})}async function dQ(t,e,n,r,s){const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c={ANSWER:"PASSWORD",USERNAME:t,PASSWORD:e},f=qn({username:t,userPoolId:o,userPoolClientId:a}),g=await is({endpointResolver:bt({endpointOverride:u})})({region:yt(o),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:c,ClientId:a,ClientMetadata:n,Session:s,UserContextData:f}),m=g.ChallengeParameters?.USERNAME??t;return tu(m),g}async function fQ(t,e,n,r,s,o){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=r,f=a.split("_")[1]||"",p=await Zh(f),g={ANSWER:"PASSWORD_SRP",USERNAME:t,SRP_A:p.A.toString(16)},m=qn({username:t,userPoolId:a,userPoolClientId:u}),S=await is({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:g,ClientId:u,ClientMetadata:n,Session:s,UserContextData:m}),E=S.ChallengeParameters?.USERNAME??t;return tu(E),S.ChallengeName==="PASSWORD_VERIFIER"?id(sT,[e,S.ChallengeParameters,n,S.Session,p,r,o],E,o):S}const G_="userAttributes.";function hQ(t){return"isSignedIn"in t&&"nextStep"in t}async function pQ({challengeResponse:t,clientMetadata:e,session:n,username:r,config:s,tokenOrchestrator:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=s,f={USERNAME:r,ANSWER:t},p=await o?.getDeviceMetadata(r);p&&p.deviceKey&&(f.DEVICE_KEY=p.deviceKey);const g=qn({username:r,userPoolId:a,userPoolClientId:u}),m={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:f,Session:n,ClientMetadata:e,ClientId:u,UserContextData:g},S=await is({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},m);return S.ChallengeName==="DEVICE_SRP_AUTH"?Xh({username:r,config:s,clientMetadata:e,session:S.Session,tokenOrchestrator:o}):S}async function gQ({challengeResponse:t,username:e,clientMetadata:n,session:r,deviceName:s,config:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=o;if(t==="EMAIL")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["EMAIL_OTP"]'},$metadata:{}};if(t==="TOTP")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["SOFTWARE_TOKEN_MFA"]'},$metadata:{}};const f={USERNAME:e};if(/^\d+$/.test(t)){const m=DZ({endpointResolver:bt({endpointOverride:c})}),{Session:y}=await m({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},{UserCode:t,Session:r,FriendlyDeviceName:s});Ro.dispatch({type:"SET_SIGN_IN_SESSION",value:y});const S={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:y,ClientMetadata:n,ClientId:u};return is({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},S)}if(t.includes("@")){f.EMAIL=t;const m={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:r,ClientMetadata:n,ClientId:u};return is({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},m)}throw new Le({name:To.SignInException,message:`Cannot proceed with MFA setup using challengeResponse: ${t}`,recoverySuggestion:'Try passing "EMAIL", "TOTP", a valid email, or OTP code as the challengeResponse.'})}async function mQ({challengeResponse:t,username:e,clientMetadata:n,session:r,config:s}){const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=s;dn(t==="TOTP"||t==="SMS"||t==="EMAIL",Ge.IncorrectMFAMethod);const c={USERNAME:e,ANSWER:AQ(t)},f=qn({username:e,userPoolId:o,userPoolClientId:a}),p={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:c,Session:r,ClientMetadata:n,ClientId:a,UserContextData:f};return is({endpointResolver:bt({endpointOverride:u})})({region:yt(o),userAgentValue:Nt(Ve.ConfirmSignIn)},p)}async function vQ({challengeResponse:t,clientMetadata:e,session:n,username:r,requiredAttributes:s,config:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=o,f={..._Q(s),NEW_PASSWORD:t,USERNAME:r},p=qn({username:r,userPoolId:a,userPoolClientId:u}),g={ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:f,ClientMetadata:e,Session:n,ClientId:u,UserContextData:p};return is({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},g)}async function yQ(t,e,n,r,s){const{userPoolClientId:o,userPoolId:a,userPoolEndpoint:u}=r,c={USERNAME:t,PASSWORD:e},f=await s.getDeviceMetadata(t);f&&f.deviceKey&&(c.DEVICE_KEY=f.deviceKey);const p=qn({username:t,userPoolId:a,userPoolClientId:o}),g={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:c,ClientMetadata:n,ClientId:o,UserContextData:p},y=await Yh({endpointResolver:bt({endpointOverride:u})})({region:yt(a),userAgentValue:Nt(Ve.SignIn)},g),S=y.ChallengeParameters?.USERNAME??y.ChallengeParameters?.USER_ID_FOR_SRP??t;return tu(S),y.ChallengeName==="DEVICE_SRP_AUTH"?Xh({username:S,config:r,clientMetadata:n,session:y.Session,tokenOrchestrator:s}):y}async function bQ(t,e,n,r,s){return Q8({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:"USER_SRP_AUTH"})}async function SQ(t,e,n,r){const{userPoolClientId:s,userPoolId:o,userPoolEndpoint:a}=n,u={USERNAME:t},c=await r.getDeviceMetadata(t);c&&c.deviceKey&&(u.DEVICE_KEY=c.deviceKey);const f=qn({username:t,userPoolId:o,userPoolClientId:s}),p={AuthFlow:"CUSTOM_AUTH",AuthParameters:u,ClientMetadata:e,ClientId:s,UserContextData:f},m=await Yh({endpointResolver:bt({endpointOverride:a})})({region:yt(o),userAgentValue:Nt(Ve.SignIn)},p),y=m.ChallengeParameters?.USERNAME??t;return tu(y),m.ChallengeName==="DEVICE_SRP_AUTH"?Xh({username:y,config:n,clientMetadata:e,session:m.Session,tokenOrchestrator:r}):m}async function EQ(t,e,n,r,s){lt(r);const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c=o?.split("_")[1]||"",f=await Zh(c),p={USERNAME:t,SRP_A:f.A.toString(16),CHALLENGE_NAME:"SRP_A"},g=qn({username:t,userPoolId:o,userPoolClientId:a}),m={AuthFlow:"CUSTOM_AUTH",AuthParameters:p,ClientMetadata:n,ClientId:a,UserContextData:g},y=Yh({endpointResolver:bt({endpointOverride:u})}),{ChallengeParameters:S,Session:E}=await y({region:yt(o),userAgentValue:Nt(Ve.SignIn)},m),C=S?.USERNAME??t;return tu(C),id(sT,[e,S,n,E,f,r,s],C,s)}async function nu(t){const{challengeName:e,challengeParameters:n,availableChallenges:r}=t,s=Ht.getConfig().Auth?.Cognito;switch(lt(s),e){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:n}};case"MFA_SETUP":{const{signInSession:o,username:a}=Ro.getState(),u=ek(tk(n.MFAS_CAN_SETUP))||[],c=RQ(u),f=c.includes("TOTP"),p=c.includes("EMAIL");if(f&&p)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:c}};if(p)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(f){const g=LZ({endpointResolver:bt({endpointOverride:s.userPoolEndpoint})}),{Session:m,SecretCode:y}=await g({region:yt(s.userPoolId)},{Session:o});return Ro.dispatch({type:"SET_SIGN_IN_SESSION",value:m}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:CQ(y,a)}}}throw new Le({name:To.SignInException,message:`Cannot initiate MFA setup from available types: ${u}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:wQ(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:ek(tk(n.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"SOFTWARE_TOKEN_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_TOTP_CODE"}};case"EMAIL_OTP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_EMAIL_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{const o=await oQ(n);return hQ(o)?o:nu(o)}case"PASSWORD":case"PASSWORD_SRP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_PASSWORD"}};case"SELECT_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION",availableChallenges:r}}}throw new Le({name:To.SignInException,message:`An error occurred during the sign in process. ${e} challengeName returned by the underlying service was not addressed.`})}function CQ(t,e){return{sharedSecret:t,getSetupUri:(n,r)=>{const s=`otpauth://totp/${n}:${r??e}?secret=${t}&issuer=${n}`;return new Wa(s)}}}function ad(t){if(t===_v.PasswordResetRequiredException)return{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}};if(t===_v.UserNotConfirmedException)return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}}function wQ(t){return t?JSON.parse(t).map(n=>n.includes(G_)?n.replace(G_,""):n):[]}function _Q(t){if(!t)return{};const e={};return Object.entries(t).forEach(([n,r])=>{r&&(e[`${G_}${n}`]=r)}),e}async function xQ(t,e,n,r,s,o,a,u){const c=u?.userAttributes,f=u?.friendlyDeviceName;switch(e){case"WEB_AUTHN":case"SELECT_CHALLENGE":return r==="PASSWORD_SRP"||r==="PASSWORD"?{ChallengeName:r,Session:n,$metadata:{}}:cQ({username:t,session:n,selectedChallenge:r,config:s,clientMetadata:a});case"SELECT_MFA_TYPE":return mQ({challengeResponse:r,clientMetadata:a,session:n,username:t,config:s});case"MFA_SETUP":return gQ({challengeResponse:r,clientMetadata:a,session:n,username:t,deviceName:f,config:s});case"NEW_PASSWORD_REQUIRED":return vQ({challengeResponse:r,clientMetadata:a,session:n,username:t,requiredAttributes:c,config:s});case"CUSTOM_CHALLENGE":return id(pQ,[{challengeResponse:r,clientMetadata:a,session:n,username:t,config:s,tokenOrchestrator:o}],t,o);case"SMS_MFA":case"SOFTWARE_TOKEN_MFA":case"SMS_OTP":case"EMAIL_OTP":return IQ({challengeName:e,challengeResponse:r,clientMetadata:a,session:n,username:t,config:s,tokenOrchestrator:o});case"PASSWORD":return dQ(t,r,a,s,n);case"PASSWORD_SRP":return fQ(t,r,a,s,n,o)}throw new Le({name:To.SignInException,message:`An error occurred during the sign in process.
16
- ${e} challengeName returned by the underlying service was not addressed.`})}function AQ(t){let e="SMS_MFA";return t==="TOTP"&&(e="SOFTWARE_TOKEN_MFA"),t==="EMAIL"&&(e="EMAIL_OTP"),e}function TQ(t){if(t==="SMS_MFA")return"SMS";if(t==="SOFTWARE_TOKEN_MFA")return"TOTP";if(t==="EMAIL_OTP")return"EMAIL"}function ek(t){if(t)return t.map(TQ).filter(Boolean)}function tk(t){return t?JSON.parse(t):[]}function RQ(t){return t.filter(e=>e==="EMAIL"||e==="TOTP")}async function J8(){let t;try{t=await Ny()}catch{}if(t&&t.userId&&t.username)throw new Le({name:hZ,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function Qh(t){return Ro.getState().username??t}async function IQ({challengeName:t,challengeResponse:e,clientMetadata:n,session:r,username:s,config:o,tokenOrchestrator:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=o,p={USERNAME:s};t==="EMAIL_OTP"&&(p.EMAIL_OTP_CODE=e),t==="SMS_MFA"&&(p.SMS_MFA_CODE=e),t==="SMS_OTP"&&(p.SMS_OTP_CODE=e),t==="SOFTWARE_TOKEN_MFA"&&(p.SOFTWARE_TOKEN_MFA_CODE=e);const g=await a?.getDeviceMetadata(s);g&&g.deviceKey&&(p.DEVICE_KEY=g.deviceKey);const m=qn({username:s,userPoolId:u,userPoolClientId:c}),y={ChallengeName:t,ChallengeResponses:p,Session:r,ClientMetadata:n,ClientId:c,UserContextData:m},E=await is({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Nt(Ve.ConfirmSignIn)},y);return E.ChallengeName==="DEVICE_SRP_AUTH"?Xh({username:s,config:o,clientMetadata:n,session:E.Session,tokenOrchestrator:a}):E}async function OQ(t){const e=Ht.getConfig().Auth?.Cognito;lt(e);const{username:n,password:r,options:s}=t,o={loginId:n,authFlowType:"CUSTOM_WITHOUT_SRP"},a=s?.clientMetadata;dn(!!n,Ge.EmptySignInUsername),dn(!r,Ge.CustomAuthSignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:p}=await id(SQ,[n,a,e,$r],n,$r),g=Qh(n);return Jl({signInSession:p,username:g,challengeName:u,signInDetails:o}),f?(await Ti({username:g,...f,NewDeviceMetadata:await eu({userPoolId:e.userPoolId,userPoolEndpoint:e.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),Qs(),await Ga(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):nu({challengeName:u,challengeParameters:c})}catch(u){Qs(),Is(u);const c=ad(u.name);if(c)return c;throw u}}async function NQ(t){const{username:e,password:n,options:r}=t,s={loginId:e,authFlowType:"CUSTOM_WITH_SRP"},o=Ht.getConfig().Auth?.Cognito;lt(o);const a=r?.clientMetadata;dn(!!e,Ge.EmptySignInUsername),dn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:p}=await EQ(e,n,a,o,$r),g=Qh(e);return Jl({signInSession:p,username:g,challengeName:u,signInDetails:s}),f?(await Ti({username:g,...f,NewDeviceMetadata:await eu({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:s}),Qs(),await Ga(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):nu({challengeName:u,challengeParameters:c})}catch(u){Qs(),Is(u);const c=ad(u.name);if(c)return c;throw u}}const e9=async()=>{throw new Le({name:F8,message:"The autoSignIn flow has not started, or has been cancelled/completed.",recoverySuggestion:"Please try to use the signIn API or log out before starting a new autoSignIn flow."})};let oT=e9;function V_(t){oT=t}function zr(t=!0){t&&(oT=e9),Ra.dispatch({type:"RESET"})}async function nk(t){const{username:e,password:n}=t,r=Ht.getConfig().Auth?.Cognito,s={loginId:e,authFlowType:"USER_SRP_AUTH"};lt(r);const o=t.options?.clientMetadata;dn(!!e,Ge.EmptySignInUsername),dn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:a,ChallengeParameters:u,AuthenticationResult:c,Session:f}=await bQ(e,n,o,r,$r),p=Qh(e);return Jl({signInSession:f,username:p,challengeName:a,signInDetails:s}),c?(await Ti({username:p,...c,NewDeviceMetadata:await eu({userPoolId:r.userPoolId,userPoolEndpoint:r.userPoolEndpoint,newDeviceMetadata:c.NewDeviceMetadata,accessToken:c.AccessToken}),signInDetails:s}),Qs(),await Ga(),zr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):nu({challengeName:a,challengeParameters:u})}catch(a){Qs(),zr(),Is(a);const u=ad(a.name);if(u)return u;throw a}}async function MQ(t){const{username:e,password:n,options:r}=t,s=Ht.getConfig().Auth?.Cognito,o={loginId:e,authFlowType:"USER_PASSWORD_AUTH"};lt(s);const a=r?.clientMetadata;dn(!!e,Ge.EmptySignInUsername),dn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:p}=await id(yQ,[e,n,a,s,$r],e,$r),g=Qh(e);return Jl({signInSession:p,username:g,challengeName:u,signInDetails:o}),f?(await Ti({...f,username:g,NewDeviceMetadata:await eu({userPoolId:s.userPoolId,userPoolEndpoint:s.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),Qs(),await Ga(),zr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):nu({challengeName:u,challengeParameters:c})}catch(u){Qs(),zr(),Is(u);const c=ad(u.name);if(c)return c;throw u}}async function PQ({username:t,clientMetadata:e,config:n,tokenOrchestrator:r,preferredChallenge:s,password:o,session:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=n,p=qn({username:t,userPoolId:u,userPoolClientId:c}),g={USERNAME:t};if(s){if(n.passwordless&&(s==="EMAIL_OTP"&&!n.passwordless.emailOtpEnabled||s==="SMS_OTP"&&!n.passwordless.smsOtpEnabled||s==="WEB_AUTHN"&&!n.passwordless.webAuthn)&&dn(!1,Ge.InvalidPreferredChallenge),s==="PASSWORD_SRP")return dn(!!o,Ge.EmptySignInPassword),Q8({username:t,password:o,clientMetadata:e,config:n,tokenOrchestrator:r,authFlow:"USER_AUTH",preferredChallenge:s});s==="PASSWORD"&&(dn(!!o,Ge.EmptySignInPassword),g.PASSWORD=o),g.PREFERRED_CHALLENGE=s}const m={AuthFlow:"USER_AUTH",AuthParameters:g,ClientMetadata:e,ClientId:c,UserContextData:p};a&&(m.Session=a);const S=await Yh({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Nt(Ve.SignIn)},m);return tu(t),S}async function t9(t){const{username:e,password:n,options:r}=t,s=Ht.getConfig().Auth?.Cognito,o={loginId:e,authFlowType:"USER_AUTH"};lt(s);const a=r?.clientMetadata,u=r?.preferredChallenge??s?.passwordless?.preferredChallenge;dn(!!e,Ge.EmptySignInUsername);try{const c={username:e,config:s,tokenOrchestrator:$r,clientMetadata:a,preferredChallenge:u,password:n},f=Ra.getState();f.active&&f.username===e&&(c.session=f.session);const p=await PQ(c),g=Qh(e);return Jl({signInSession:p.Session,username:g,challengeName:p.ChallengeName,signInDetails:o}),p.AuthenticationResult?(await Ti({username:g,...p.AuthenticationResult,NewDeviceMetadata:await eu({userPoolId:s.userPoolId,userPoolEndpoint:s.userPoolEndpoint,newDeviceMetadata:p.AuthenticationResult.NewDeviceMetadata,accessToken:p.AuthenticationResult.AccessToken}),signInDetails:o}),Qs(),await Ga(),zr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):nu({challengeName:p.ChallengeName,challengeParameters:p.ChallengeParameters,availableChallenges:"AvailableChallenges"in p?p.AvailableChallenges:void 0})}catch(c){Qs(),zr(),Is(c);const f=ad(c.name);if(f)return f;throw c}}async function iT(t){zr(!1);const e=t.options?.authFlowType;switch(await J8(),e){case"USER_SRP_AUTH":return nk(t);case"USER_PASSWORD_AUTH":return MQ(t);case"CUSTOM_WITHOUT_SRP":return OQ(t);case"CUSTOM_WITH_SRP":return NQ(t);case"USER_AUTH":return t9(t);default:return nk(t)}}const n9=180*1e3;function kQ(t){const e=wv.listen("auth-internal",async({payload:r})=>{r.event==="confirmSignUp"&&r.data?.isSignUpComplete&&(wv.dispatch("auth-internal",{event:"autoSignIn"}),V_(s9(t)),e())}),n=setTimeout(()=>{e(),clearTimeout(n),zr()},n9)}function r9(t,e){let n;return r=>{n||t(...r),clearTimeout(n),n=setTimeout(()=>{n=void 0},e)}}function DQ(t,e,n){const r=Date.now(),s=setInterval(async()=>{if(Date.now()-r>n9)clearInterval(s),n(new Le({name:F8,message:"The account was not confirmed on time.",recoverySuggestion:"Try to verify your account by clicking the link sent your email or phone and then login manually."})),zr();else try{const u=await iT(t);u.nextStep.signInStep!=="CONFIRM_SIGN_UP"&&(e(u),clearInterval(s),zr())}catch(u){clearInterval(s),n(u),zr()}},5e3)}const LQ=r9(DQ,300),UQ=r9(zQ,300);function FQ(t){return async()=>new Promise((e,n)=>{LQ([t,e,n])})}async function zQ(t,e,n){try{const r=t?.options?.authFlowType==="USER_AUTH"?await t9(t):await iT(t);e(r),zr()}catch(r){n(r),zr()}}function s9(t){return async()=>new Promise((e,n)=>{UQ([t,e,n])})}const BQ=s9,jQ=()=>async t=>{if(t.statusCode>=300){const e=await td(t);if(Is(e),e.name===H_.InvalidParameterException&&/'password'/.test(e.message)&&/Member must not be null/.test(e.message)){const n=Ge.EmptySignUpPassword,{message:r,recoverySuggestion:s}=U8[n];throw new Le({name:n,message:r,recoverySuggestion:s})}throw new Le({name:e.name,message:e.message})}return Vh(t)},HQ=t=>Tn(Hn,jn("SignUp"),jQ(),{...$n,...t});async function $Q(t){const{username:e,password:n,options:r}=t,s=Ht.getConfig().Auth?.Cognito,o=s?.signUpVerificationMethod??"code",{clientMetadata:a,validationData:u,autoSignIn:c}=t.options??{};lt(s),dn(!!e,Ge.EmptySignUpUsername);const f=typeof c!="boolean"?c:void 0,p={username:e,options:f};f?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(p.password=n);const{userPoolId:g,userPoolClientId:m,userPoolEndpoint:y}=s,S=HQ({endpointResolver:bt({endpointOverride:y})}),E={Username:e,Password:void 0,UserAttributes:r?.userAttributes&&_3(r?.userAttributes),ClientMetadata:a,ValidationData:u&&_3(u),ClientId:m,UserContextData:qn({username:e,userPoolId:g,userPoolClientId:m})};n&&(E.Password=n);const{UserSub:C,CodeDeliveryDetails:w,UserConfirmed:x,Session:T}=await S({region:yt(g),userAgentValue:Nt(Ve.SignUp)},E);(f||c===!0)&&(Ra.dispatch({type:"START"}),Ra.dispatch({type:"SET_USERNAME",value:e}),Ra.dispatch({type:"SET_SESSION",value:T}));const R={destination:w?.Destination,deliveryMedium:w?.DeliveryMedium,attributeName:w?.AttributeName},M=!!x,O=Ra.getState().active;if(M)return O?(V_(BQ(p)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:C}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:C};if(O){if(o==="link")return V_(FQ(p)),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:R},userId:C};kQ(p)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:R},userId:C}}const qQ=t=>Tn(Hn,jn("ForgotPassword"),or(),{...$n,...t});async function o9(t){const{username:e}=t;dn(!!e,Ge.EmptyResetPasswordUsername);const n=Ht.getConfig().Auth?.Cognito;lt(n);const{userPoolClientId:r,userPoolId:s,userPoolEndpoint:o}=n,a=t.options?.clientMetadata,u=qn({username:e,userPoolId:s,userPoolClientId:r}),p=(await qQ({endpointResolver:bt({endpointOverride:o})})({region:yt(s),userAgentValue:Nt(Ve.ResetPassword)},{Username:e,ClientMetadata:a,ClientId:r,UserContextData:u})).CodeDeliveryDetails;return{isPasswordReset:!1,nextStep:{resetPasswordStep:"CONFIRM_RESET_PASSWORD_WITH_CODE",codeDeliveryDetails:{deliveryMedium:p?.DeliveryMedium,destination:p?.Destination,attributeName:p?.AttributeName}}}}const WQ=t=>Tn(Hn,jn("ConfirmForgotPassword"),or(),{...$n,...t});async function GQ(t){const e=Ht.getConfig().Auth?.Cognito;lt(e);const{userPoolClientId:n,userPoolId:r,userPoolEndpoint:s}=e,{username:o,newPassword:a}=t;dn(!!o,Ge.EmptyConfirmResetPasswordUsername),dn(!!a,Ge.EmptyConfirmResetPasswordNewPassword);const u=t.confirmationCode;dn(!!u,Ge.EmptyConfirmResetPasswordConfirmationCode);const c=t.options?.clientMetadata,f=qn({username:o,userPoolId:r,userPoolClientId:n});await WQ({endpointResolver:bt({endpointOverride:s})})({region:yt(e.userPoolId),userAgentValue:Nt(Ve.ConfirmResetPassword)},{Username:o,ConfirmationCode:u,Password:a,ClientMetadata:c,ClientId:e.userPoolClientId,UserContextData:f})}const VQ=t=>Tn(Hn,jn("ResendConfirmationCode"),or(),{...$n,...t});async function KQ(t){const{username:e}=t;dn(!!e,Ge.EmptySignUpUsername);const n=Ht.getConfig().Auth?.Cognito;lt(n);const{userPoolClientId:r,userPoolId:s,userPoolEndpoint:o}=n,a=t.options?.clientMetadata,u=qn({username:e,userPoolId:s,userPoolClientId:r}),c=VQ({endpointResolver:bt({endpointOverride:o})}),{CodeDeliveryDetails:f}=await c({region:yt(n.userPoolId),userAgentValue:Nt(Ve.ResendSignUpCode)},{Username:e,ClientMetadata:a,ClientId:n.userPoolClientId,UserContextData:u}),{DeliveryMedium:p,AttributeName:g,Destination:m}={...f};return{destination:m,deliveryMedium:p,attributeName:g||void 0}}const YQ=t=>Tn(Hn,jn("ConfirmSignUp"),or(),{...$n,...t});async function ZQ(t){const{username:e,confirmationCode:n,options:r}=t,s=Ht.getConfig().Auth?.Cognito;lt(s);const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=s,c=r?.clientMetadata;dn(!!e,Ge.EmptyConfirmSignUpUsername),dn(!!n,Ge.EmptyConfirmSignUpCode);const f=qn({username:e,userPoolId:o,userPoolClientId:a}),p=YQ({endpointResolver:bt({endpointOverride:u})}),{Session:g}=await p({region:yt(s.userPoolId),userAgentValue:Nt(Ve.ConfirmSignUp)},{Username:e,ConfirmationCode:n,ClientMetadata:c,ForceAliasCreation:r?.forceAliasCreation,ClientId:s.userPoolClientId,UserContextData:f});return new Promise((m,y)=>{try{const S={isSignUpComplete:!0,nextStep:{signUpStep:"DONE"}},E=Ra.getState();if(!E.active||E.username!==e){m(S),zr();return}Ra.dispatch({type:"SET_SESSION",value:g});const C=wv.listen("auth-internal",({payload:w})=>{w.event==="autoSignIn"&&(m({isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"}}),C())});wv.dispatch("auth-internal",{event:"confirmSignUp",data:S})}catch(S){y(S)}})}async function i9(t){const{challengeResponse:e,options:n}=t,{username:r,challengeName:s,signInSession:o,signInDetails:a}=Ro.getState(),u=Ht.getConfig().Auth?.Cognito;lt(u);const c=n?.clientMetadata;if(dn(!!e,Ge.EmptyChallengeResponse),!r||!s||!o)throw new Le({name:To.SignInException,message:`
17
- An error occurred during the sign in process.
18
-
19
- This most likely occurred due to:
20
- 1. signIn was not called before confirmSignIn.
21
- 2. signIn threw an exception.
22
- 3. page was refreshed during the sign in flow and session has expired.
23
- `,recoverySuggestion:"Make sure a successful call to signIn is made before calling confirmSignInand that the session has not expired."});try{const{Session:f,ChallengeName:p,AuthenticationResult:g,ChallengeParameters:m}=await xQ(r,s,o,e,u,$r,c,n);return Jl({signInSession:f,username:r,challengeName:p,signInDetails:a}),g?(await Ti({username:r,...g,NewDeviceMetadata:await eu({userPoolId:u.userPoolId,userPoolEndpoint:u.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:a}),Qs(),await Ga(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):nu({challengeName:p,challengeParameters:m})}catch(f){Is(f);const p=ad(f.name);if(p)return p;throw f}}const XQ=t=>Tn(Hn,jn("GetUser"),or(),{...$n,...t}),QQ=t=>Tn(Hn,jn("VerifyUserAttribute"),or(),{...$n,...t});async function JQ(t){const e=Ht.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{confirmationCode:s,userAttributeKey:o}=t;dn(!!s,Ge.EmptyConfirmUserAttributeCode);const{tokens:a}=await Ry({forceRefresh:!1});nd(a),await QQ({endpointResolver:bt({endpointOverride:n})})({region:yt(r),userAgentValue:Nt(Ve.ConfirmUserAttribute)},{AccessToken:a.accessToken.toString(),AttributeName:o,Code:s})}new nr("AuthError");const eJ={oauthSignInError:{message:Fn.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:Fn.DEFAULT_MSG},missingAuthConfig:{message:Fn.DEFAULT_MSG},emptyUsername:{message:Fn.EMPTY_USERNAME},invalidUsername:{message:Fn.INVALID_USERNAME},emptyPassword:{message:Fn.EMPTY_PASSWORD},emptyCode:{message:Fn.EMPTY_CODE},signUpError:{message:Fn.SIGN_UP_ERROR},noMFA:{message:Fn.NO_MFA},invalidMFA:{message:Fn.INVALID_MFA},emptyChallengeResponse:{message:Fn.EMPTY_CHALLENGE},noUserSession:{message:Fn.NO_USER_SESSION},deviceConfig:{message:Fn.DEVICE_CONFIG},networkError:{message:Fn.NETWORK_ERROR},autoSignInError:{message:Fn.AUTOSIGNIN_ERROR},default:{message:Fn.DEFAULT_MSG}},ka=(t,e)=>new Le({message:t??"An error has occurred during the oauth process.",name:To.OAuthSignInError,recoverySuggestion:eJ.oauthSignInError.log});var K_;(function(t){t.NoConfig="noConfig",t.MissingAuthConfig="missingAuthConfig",t.EmptyUsername="emptyUsername",t.InvalidUsername="invalidUsername",t.EmptyPassword="emptyPassword",t.EmptyCode="emptyCode",t.SignUpError="signUpError",t.NoMFA="noMFA",t.InvalidMFA="invalidMFA",t.EmptyChallengeResponse="emptyChallengeResponse",t.NoUserSession="noUserSession",t.Default="default",t.DeviceConfig="deviceConfig",t.NetworkError="networkError",t.AutoSignInError="autoSignInError",t.OAuthSignInError="oauthSignInError"})(K_||(K_={}));const tJ="`signInWithRedirect` has been canceled.",nJ="An error occurred while validating the state.",rJ="Try to initiate an OAuth flow from Amplify",a9=async t=>{const e=await Ur.loadOAuthState(),n=t===e?e:void 0;if(!n)throw new Le({name:K_.OAuthSignInError,message:t===null?tJ:nJ,recoverySuggestion:t===null?void 0:rJ});return n},l9=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,responseType:s,domain:o,preferPrivateSession:a})=>{const u=new Wa(t),c=u.searchParams.get("error"),f=u.searchParams.get("error_description");if(c)throw ka(f??c);return s==="code"?sJ({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:o,preferPrivateSession:a}):oJ({currentUrl:t,redirectUri:r,preferPrivateSession:a})},sJ=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:s,preferPrivateSession:o})=>{const a=new Wa(t),u=a.searchParams.get("code"),c=a.searchParams.get("state");if(!u||!c)throw ka("User cancelled OAuth flow.");const f=await a9(c),p="https://"+s+"/oauth2/token",g=await Ur.loadPKCE(),m={grant_type:"authorization_code",code:u,client_id:n,redirect_uri:r,...g?{code_verifier:g}:{}},y=Object.entries(m).map(([O,I])=>`${encodeURIComponent(O)}=${encodeURIComponent(I)}`).join("&"),{access_token:S,refresh_token:E,id_token:C,error:w,error_message:x,token_type:T,expires_in:R}=await(await fetch(p,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[lK]:e},body:y})).json();if(w)throw ka(x??w);const M=(S&&gi(S).payload.username)??"username";return await Ti({username:M,AccessToken:S,IdToken:C,RefreshToken:E}),u9({redirectUri:r,state:f,preferPrivateSession:o})},oJ=async({currentUrl:t,redirectUri:e,preferPrivateSession:n})=>{const r=new Wa(t),{id_token:s,access_token:o,state:a,token_type:u,expires_in:c,error_description:f,error:p}=(r.hash??"#").substring(1).split("&").map(y=>y.split("=")).reduce((y,[S,E])=>({...y,[S]:E}),{id_token:void 0,access_token:void 0,state:void 0,token_type:void 0,expires_in:void 0,error_description:void 0,error:void 0});if(p)throw ka(f??p);if(!o)throw ka("No access token returned from OAuth flow.");const g=await a9(a),m=(o&&gi(o).payload.username)??"username";return await Ti({username:m,AccessToken:o,IdToken:s}),u9({redirectUri:e,state:g,preferPrivateSession:n})},u9=async({redirectUri:t,state:e,preferPrivateSession:n})=>{await $r.setOAuthMetadata({oauthSignIn:!0}),await Ur.clearOAuthData(),await Ur.storeOAuthSignIn(!0,n),q8(),lJ(t),iJ(e)&&Ao.dispatch("auth",{event:"customOAuthState",data:oZ(aJ(e))},"Auth",xo),Ao.dispatch("auth",{event:"signInWithRedirect"},"Auth",xo),await Ga()},iJ=t=>/-/.test(t),aJ=t=>t.split("-").splice(1).join("-"),lJ=t=>{typeof window<"u"&&typeof window.history<"u"&&window.history.replaceState(window.history.state,"",t)};function aT(t,e){{const n=t?.find(uJ)??t?.find(cJ),r=t?.find(fJ)??t?.find(dJ);if(n)return n;throw r?SZ:yZ}}const uJ=t=>t.startsWith(String(window.location.origin+(window.location.pathname||"/"))),cJ=t=>t.includes(String(window.location.hostname)),dJ=t=>t.startsWith("http://"),fJ=t=>t.startsWith("https://"),lT=async t=>{q8(),await Ur.clearOAuthInflightData(),Ao.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:t}},"Auth",xo)},hJ=async t=>{try{lt(t),_y(t),Ur.setAuthConfig(t)}catch{return}if(await Ur.loadOAuthInFlight())try{const e=window.location.href,{loginWith:n,userPoolClientId:r}=t,{domain:s,redirectSignIn:o,responseType:a}=n.oauth,u=aT(o);await l9({currentUrl:e,clientId:r,domain:s,redirectUri:u,responseType:a,userAgentValue:Nt(Ve.SignInWithRedirect)})}catch(e){await lT(e)}};Ty()&&Ht[p8](hJ);const pJ={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"},c9=async t=>{window?.location&&(window.location.href=t.replace("http://","https://"))},rk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",gJ=t=>{const e=new Uint8Array(t);WA().getRandomValues(e);let n="",r;for(const s of e)n+=rk.charAt(s%rk.length);return{value:n,method:"S256",toCodeChallenge(){return r||(r=mJ(n),r)}}};function mJ(t){const e=new Fl;return e.update(t),vJ(Pc.convert(e.digestSync(),{urlSafe:!0}))}function vJ(t){return t.replace(/=/g,"")}const yJ=()=>sZ(32),bJ=t=>{async function e(n){if(n.persisted&&await t.loadOAuthInFlight()){const s=ka("User cancelled OAuth flow.");await lT(s)}window.removeEventListener("pageshow",e)}window.addEventListener("pageshow",e)};async function d9(t){const e=Ht.getConfig().Auth?.Cognito;lt(e),_y(e),Ur.setAuthConfig(e),t?.options?.prompt||await J8();let n="COGNITO",r;return typeof t?.provider=="string"?n=pJ[t.provider]:t?.provider?.custom?n=t.provider.custom:t?.provider?.idpIdentifier&&({idpIdentifier:r}=t.provider),SJ({oauthConfig:e.loginWith.oauth,clientId:e.userPoolClientId,provider:n,idpIdentifier:r,customState:t?.customState,preferPrivateSession:t?.options?.preferPrivateSession,options:{loginHint:t?.options?.loginHint,lang:t?.options?.lang,nonce:t?.options?.nonce,prompt:t?.options?.prompt},authSessionOpener:t?.options?.authSessionOpener})}const SJ=async({oauthConfig:t,provider:e,idpIdentifier:n,clientId:r,customState:s,preferPrivateSession:o,options:a,authSessionOpener:u})=>{const{domain:c,redirectSignIn:f,responseType:p,scopes:g}=t,{loginHint:m,lang:y,nonce:S,prompt:E}=a??{},C=yJ(),w=u||c9,x=s?`${C}-${iZ(s)}`:C,{value:T,method:R,toCodeChallenge:M}=gJ(128),O=aT(t.redirectSignIn);Ty()&&Ur.storeOAuthInFlight(!0),Ur.storeOAuthState(x),Ur.storePKCE(T);const I=new URLSearchParams;I.append("redirect_uri",O),I.append("response_type",p),I.append("client_id",r),n?I.append("idp_identifier",n):I.append("identity_provider",e),I.append("scope",g.join(" ")),m&&I.append("login_hint",m),y&&I.append("lang",y),S&&I.append("nonce",S),E&&I.append("prompt",E.toLowerCase()),I.append("state",x),p==="code"&&(I.append("code_challenge",M()),I.append("code_challenge_method",R));const P=`https://${c}/oauth2/authorize?${I.toString()}`;bJ(Ur);const{type:k,error:H,url:U}=await w(P,f,o)??{};try{if(k==="error")throw ka(String(H));if(k==="canceled")throw ka(String(k));k==="success"&&U&&await l9({currentUrl:U,clientId:r,domain:c,redirectUri:O,responseType:p,userAgentValue:Nt(Ve.SignInWithRedirect),preferPrivateSession:o})}catch(B){throw await lT(B),B}},EJ=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{tokens:s}=await S8(t,{forceRefresh:!1});nd(s);const o=XQ({endpointResolver:bt({endpointOverride:n})}),{UserAttributes:a}=await o({region:yt(r),userAgentValue:Nt(Ve.FetchUserAttributes)},{AccessToken:s.accessToken.toString()});return fZ(a)},f9=()=>EJ(Ht),CJ=async t=>{await t.clearOAuthData(),$r.clearTokens(),await E8(),Ao.dispatch("auth",{event:"signedOut"},"Auth",xo)},wJ=async(t,e=!1,n)=>{_y(t);const{loginWith:r,userPoolClientId:s}=t,{domain:o,redirectSignOut:a}=r.oauth,u=aT(a),c=`https://${o}/logout?${Object.entries({client_id:s,logout_uri:encodeURIComponent(u)}).map(([f,p])=>`${f}=${p}`).join("&")}`;return c9(c)},_J=async(t,e,n,r)=>{const{isOAuthSignIn:s}=await e.loadOAuthSignIn(),o=await n.getOAuthMetadata();if(await CJ(e),s||o?.oauthSignIn)return wJ(t,!1)},xJ=t=>Tn(Hn,jn("RevokeToken"),or(),{...$n,...t}),AJ=new nr("Auth");async function TJ(t){const e=Ht.getConfig().Auth?.Cognito;lt(e),await RJ(e);let n;try{_y(e),n=!0}catch{n=!1}if(n){const r=new $8(Kh);r.setAuthConfig(e);const{type:s}=await _J(e,r,$r)??{};if(s==="error")throw new Le({name:EZ,message:"An error occurred when attempting to log out from OAuth provider."})}else $r.clearTokens(),await E8(),Ao.dispatch("auth",{event:"signedOut"},"Auth",xo)}async function RJ(t){try{const{userPoolEndpoint:e,userPoolId:n,userPoolClientId:r}=t,s=await $r.getTokenStore().loadTokens();z8(s),IJ(s.accessToken)&&await xJ({endpointResolver:bt({endpointOverride:e})})({region:yt(n),userAgentValue:Nt(Ve.SignOut)},{ClientId:r,Token:s.refreshToken})}catch{AJ.debug("Client signOut error caught but will proceed with token removal")}}const IJ=t=>!!t?.payload?.origin_jti,OJ=t=>Tn(Hn,jn("GetUserAttributeVerificationCode"),or(),{...$n,...t}),NJ=async t=>{const{userAttributeKey:e,options:n}=t,r=Ht.getConfig().Auth?.Cognito,s=n?.clientMetadata;lt(r);const{userPoolEndpoint:o,userPoolId:a}=r,{tokens:u}=await Ry({forceRefresh:!1});nd(u);const c=OJ({endpointResolver:bt({endpointOverride:o})}),{CodeDeliveryDetails:f}=await c({region:yt(a),userAgentValue:Nt(Ve.SendUserAttributeVerificationCode)},{AccessToken:u.accessToken.toString(),ClientMetadata:s,AttributeName:e}),{DeliveryMedium:p,AttributeName:g,Destination:m}={...f};return{destination:m,deliveryMedium:p,attributeName:g}},MJ={identityId:"identityId"},PJ=new nr("DefaultIdentityIdStore");class h9{setAuthConfig(e){jm(e.Cognito),this.authConfig=e,this._authKeys=kJ("Cognito",e.Cognito.identityPoolId)}constructor(e){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=e}async loadIdentityId(){jm(this.authConfig?.Cognito);try{if(this._primaryIdentityId)return{id:this._primaryIdentityId,type:"primary"};{const e=await this.keyValueStorage.getItem(this._authKeys.identityId);return e?(this._hasGuestIdentityId=!0,{id:e,type:"guest"}):null}}catch(e){return PJ.log("Error getting stored IdentityId.",e),null}}async storeIdentityId(e){jm(this.authConfig?.Cognito),e.type==="guest"?(this.keyValueStorage.setItem(this._authKeys.identityId,e.id),this._primaryIdentityId=void 0,this._hasGuestIdentityId=!0):(this._primaryIdentityId=e.id,this._hasGuestIdentityId&&(this.keyValueStorage.removeItem(this._authKeys.identityId),this._hasGuestIdentityId=!1))}async clearIdentityId(){this._primaryIdentityId=void 0,await this.keyValueStorage.removeItem(this._authKeys.identityId)}}const kJ=(t,e)=>XA(MJ)(`com.amplify.${t}`,e),Y_=({endpointOverride:t})=>e=>t?{url:new Wa(t)}:VY(e);function p9(t){const e=gi(t).payload.iss,n={};if(!e)throw new Le({name:"InvalidIdTokenException",message:"Invalid Idtoken."});const r=e.replace(/(^\w+:|^)\/\//,"");return n[r]=t,n}async function DJ({tokens:t,authConfig:e,identityIdStore:n}){n.setAuthConfig({Cognito:e});const r=await n.loadIdentityId();if(r)return r.id;const s=t?.idToken?p9(t.idToken.toString()):{},o=await LJ(s,e);return n.storeIdentityId({id:o,type:t?"primary":"guest"}),o}async function LJ(t,e){const n=e?.identityPoolId,r=j_(n),s=qY({endpointResolver:Y_({endpointOverride:e.identityPoolEndpoint})});let o;try{o=(await s({region:r},{IdentityPoolId:n,Logins:t})).IdentityId}catch(a){throw Is(a),new Le(a)}if(!o)throw new Le({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return o}const $g=new nr("CognitoCredentialsProvider"),sk=3e3*1e3;class g9{constructor(e){this._nextCredentialsRefresh=0,this._identityIdStore=e}async clearCredentialsAndIdentityId(){$g.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){$g.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(e){const n=e.authenticated,{tokens:r}=e,{authConfig:s}=e;try{jm(s?.Cognito)}catch{return}if(!n&&!s.Cognito.allowGuestAccess)return;const{forceRefresh:o}=e,a=this.hasTokenChanged(r),u=await DJ({tokens:r,authConfig:s.Cognito,identityIdStore:this._identityIdStore});return(o||a)&&this.clearCredentials(),n?(_Z(r),this.credsForOIDCTokens(s.Cognito,r,u)):this.getGuestCredentials(u,s.Cognito)}async getGuestCredentials(e,n){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!1)return $g.info("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const r=j_(n.identityPoolId),s=E3({endpointResolver:Y_({endpointOverride:n.identityPoolEndpoint})});let o;try{o=await s({region:r},{IdentityId:e})}catch(a){throw Is(a),new Le(a)}if(o?.Credentials?.AccessKeyId&&o?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+sk;const a={credentials:{accessKeyId:o.Credentials.AccessKeyId,secretAccessKey:o.Credentials.SecretKey,sessionToken:o.Credentials.SessionToken,expiration:o.Credentials.Expiration},identityId:e};return o.IdentityId&&(a.identityId=o.IdentityId,this._identityIdStore.storeIdentityId({id:o.IdentityId,type:"guest"})),this._credentialsAndIdentityId={...a,isAuthenticatedCreds:!1},a}else throw new Le({name:"CredentialsNotFoundException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}async credsForOIDCTokens(e,n,r){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!0)return $g.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const s=n.idToken?p9(n.idToken.toString()):{},o=j_(e.identityPoolId),a=E3({endpointResolver:Y_({endpointOverride:e.identityPoolEndpoint})});let u;try{u=await a({region:o},{IdentityId:r,Logins:s})}catch(c){throw Is(c),new Le(c)}if(u?.Credentials?.AccessKeyId&&u?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+sk;const c={credentials:{accessKeyId:u.Credentials.AccessKeyId,secretAccessKey:u.Credentials.SecretKey,sessionToken:u.Credentials.SessionToken,expiration:u.Credentials.Expiration},identityId:r};return u.IdentityId&&(c.identityId=u.IdentityId,this._identityIdStore.storeIdentityId({id:u.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...c,isAuthenticatedCreds:!0,associatedIdToken:n.idToken?.toString()},c}else throw new Le({name:"CredentialsException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}isPastTTL(){return this._nextCredentialsRefresh===void 0?!0:this._nextCredentialsRefresh<=Date.now()}hasTokenChanged(e){return!!e&&!!this._credentialsAndIdentityId?.associatedIdToken&&e.idToken?.toString()!==this._credentialsAndIdentityId.associatedIdToken}}const UJ=t=>{if(t instanceof Ts)return t;if(t instanceof Error){if(t.name==="InvalidStateError"){const{message:e,recoverySuggestion:n}=kc[Bt.PasskeyAlreadyExists];return new Ts({name:Bt.PasskeyAlreadyExists,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=kc[Bt.PasskeyRegistrationCanceled];return new Ts({name:Bt.PasskeyRegistrationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}}return V8(t)},FJ=async t=>{try{const e=K8();rd(e,Bt.PasskeyNotSupported);const n=sX(t),r=await navigator.credentials.create({publicKey:n});return uX(r),oX(r)}catch(e){throw UJ(e)}},zJ=t=>Tn(Hn,jn("StartWebAuthnRegistration"),or(),{...$n,...t}),BJ=t=>Tn(Hn,jn("CompleteWebAuthnRegistration"),or(),{...$n,...t});async function jJ(){const t=Ht.getConfig().Auth?.Cognito;lt(t);const{userPoolEndpoint:e,userPoolId:n}=t,{tokens:r}=await Ry();nd(r);const s=zJ({endpointResolver:bt({endpointOverride:e})}),{CredentialCreationOptions:o}=await s({region:yt(n),userAgentValue:Nt(Ve.StartWebAuthnRegistration)},{AccessToken:r.accessToken.toString()});lX(o);const a=await FJ(o);await BJ({endpointResolver:bt({endpointOverride:e})})({region:yt(n),userAgentValue:Nt(Ve.CompleteWebAuthnRegistration)},{AccessToken:r.accessToken.toString(),Credential:a})}const HJ=t=>Tn(Hn,jn("ListWebAuthnCredentials"),or(),{...$n,...t});async function $J(t,e){const n=t.getConfig().Auth?.Cognito;lt(n);const{userPoolEndpoint:r,userPoolId:s}=n,{tokens:o}=await t.Auth.fetchAuthSession();nd(o);const a=HJ({endpointResolver:bt({endpointOverride:r})}),{Credentials:u=[],NextToken:c}=await a({region:yt(s),userAgentValue:Nt(Ve.ListWebAuthnCredentials)},{AccessToken:o.accessToken.toString(),MaxResults:e?.pageSize,NextToken:e?.nextToken});return{credentials:u.map(p=>({credentialId:p.CredentialId,friendlyCredentialName:p.FriendlyCredentialName,relyingPartyId:p.RelyingPartyId,authenticatorAttachment:p.AuthenticatorAttachment,authenticatorTransports:p.AuthenticatorTransports,createdAt:p.CreatedAt?new Date(p.CreatedAt*1e3):void 0})),nextToken:c}}async function uT(t){return $J(Ht,t)}const cT=t=>t.context.actorRef?.getSnapshot(),Ch=t=>cT(t)?.context,qJ={category:Rs.AI,apis:[oi.CreateConversation,oi.DeleteConversation,oi.ListConversations,oi.UpdateConversation,oi.OnMessage,oi.SendMessage,oi.Generation]},WJ={apis:[Ve.DeleteUser,Ve.UpdatePassword],category:Rs.Auth},GJ={apis:[Ve.SignUp,Ve.ConfirmSignUp,Ve.ResendSignUpCode,Ve.SignIn,Ve.ConfirmSignIn,Ve.FetchUserAttributes,Ve.SignOut,Ve.ResetPassword,Ve.ConfirmResetPassword,Ve.SignInWithRedirect],category:Rs.Auth},VJ={apis:[qs.UploadData],category:Rs.Storage},KJ={apis:[F_.NotifyMessageInteraction],category:Rs.InAppMessaging},YJ={category:Rs.Geo,apis:[eh.SearchByText,eh.SearchForSuggestions,eh.SearchByPlaceId]},ZJ={category:Rs.Geo,apis:[]},XJ={apis:[qs.UploadData],category:Rs.Storage},QJ={apis:[qs.UploadData,qs.Copy,qs.GetUrl,qs.List,qs.Remove,qs.GetDataAccess,qs.ListCallerAccessGrants],category:Rs.Storage};function as(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function mi(t){return typeof t=="string"||typeof t=="object"&&Object.prototype.toString.call(t)==="[object String]"}function JJ(t){return as(t)&&Object.prototype.toString.call(t)==="[object Map]"}function eee(t){return as(t)&&Object.prototype.toString.call(t)==="[object Set]"}function dT(t){if(t==null)return!0;if(as(t)&&(JJ(t)||eee(t)))return!t.size;if(as(t)&&(mi(t)||Array.isArray(t)))return!t.length;for(const e in t)if(vi(t,e))return!1;return!0}function tee(t){return Array.isArray(t)&&dT(t)}function nee(...t){return t.every(tee)}function m9(t){return as(t)&&dT(t)}function ree(...t){return t.every(m9)}function vi(t,e){return t!=null&&Object.prototype.hasOwnProperty.call(t,e)}function yi(t){return typeof t=="function"}const jt=(t,e)=>e?`${t}--${e}`:"",Br=(t,e,n)=>n?`${t}--${e}`:"";function see(...t){}function oee(t,e){const n={},r={};return Object.entries(t).forEach(([s,o])=>{e(s)?n[s]=o:r[s]=o}),[n,r]}const v9=({payload:t},e,n)=>{const{data:r,event:s}=t,{send:o}=e,{onSignIn:a,onSignOut:u}=n??{};switch(s){case"signedIn":{yi(a)&&a(t);break}case"signInWithRedirect":{o("SIGN_IN_WITH_REDIRECT");break}case"signedOut":{yi(u)&&u(),o("SIGN_OUT");break}case"tokenRefresh_failure":{if(r?.error?.name===Pa.NetworkError)return;o("SIGN_OUT");break}}},iee=(t,e=v9)=>{const n=r=>e(r,t);return Ao.listen("auth",n,"authenticator-hub-handler")},y9=["+1","+7","+20","+27","+30","+31","+32","+33","+34","+36","+39","+40","+41","+43","+44","+45","+46","+47","+48","+49","+51","+52","+53","+54","+55","+56","+57","+58","+60","+61","+62","+63","+64","+65","+66","+81","+82","+84","+86","+90","+91","+92","+93","+94","+95","+98","+212","+213","+216","+218","+220","+221","+222","+223","+224","+225","+226","+227","+228","+229","+230","+231","+232","+233","+234","+235","+236","+237","+238","+239","+240","+241","+242","+243","+244","+245","+246","+248","+249","+250","+251","+252","+253","+254","+255","+256","+257","+258","+260","+261","+262","+263","+264","+265","+266","+267","+268","+269","+290","+291","+297","+298","+299","+345","+350","+351","+352","+353","+354","+355","+356","+357","+358","+359","+370","+371","+372","+373","+374","+375","+376","+377","+378","+379","+380","+381","+382","+385","+386","+387","+389","+420","+421","+423","+500","+501","+502","+503","+504","+505","+506","+507","+508","+509","+537","+590","+591","+593","+594","+595","+596","+597","+598","+599","+670","+672","+673","+674","+675","+676","+677","+678","+679","+680","+681","+682","+683","+685","+686","+687","+688","+689","+690","+691","+692","+850","+852","+853","+855","+856","+872","+880","+886","+960","+961","+962","+963","+964","+965","+966","+967","+968","+970","+971","+972","+973","+974","+975","+976","+977","+992","+993","+994","+995","+996","+998"],Py={birthdate:{label:"Birthdate",placeholder:"Enter your Birthdate",type:"date",autocomplete:"bday",isRequired:!0},confirmation_code:{label:"Confirmation Code",placeholder:"Enter your Confirmation Code",type:"text",autocomplete:"one-time-code",isRequired:!0},confirm_password:{label:"Confirm Password",placeholder:"Please confirm your Password",type:"password",autocomplete:"new-password",isRequired:!0},email:{label:"Email",placeholder:"Enter your Email",type:"email",autocomplete:"username",isRequired:!0},family_name:{label:"Family Name",placeholder:"Enter your Family Name",type:"text",autocomplete:"family-name",isRequired:!0},given_name:{label:"Given Name",placeholder:"Enter your Given Name",type:"text",autocomplete:"given-name",isRequired:!0},middle_name:{label:"Middle Name",placeholder:"Enter your Middle Name",type:"text",autocomplete:"additional-name",isRequired:!0},name:{label:"Name",placeholder:"Enter your Name",type:"text",autocomplete:"name",isRequired:!0},nickname:{label:"Nickname",placeholder:"Enter your Nickname",type:"text",autocomplete:"tel",isRequired:!0},password:{label:"Password",placeholder:"Enter your Password",type:"password",autocomplete:"new-password",isRequired:!0},phone_number:{label:"Phone Number",placeholder:"Enter your Phone Number",type:"tel",autocomplete:"tel",dialCode:"+1",dialCodeList:y9,isRequired:!0},preferred_username:{label:"Preferred Username",placeholder:"Enter your Preferred Username",type:"text",isRequired:!0},profile:{label:"Profile",placeholder:"Add your Profile",type:"url",autocomplete:"url",isRequired:!0},website:{label:"Website",placeholder:"Add your Website",type:"url",autocomplete:"url",isRequired:!0},username:{label:"Username",placeholder:"Enter your Username",type:"text",autocomplete:"username",isRequired:!0}},aee=["^","$","*",".","[","]","{","}","(",")","?",'"',"!","@","#","%","&","/","\\",",",">","<","'",":",";","|","_","~","`","=","+","-"," "],lee=(t,e)=>{if(e?.matches("federatedSignIn")){if(t.matches("signUpActor"))return"signUp";if(t.matches("signInActor"))return"signIn"}switch(!0){case t.matches("idle"):return"idle";case t.matches("setup"):return"setup";case t.matches("signOut"):return"signOut";case t.matches("authenticated"):return"authenticated";case e?.matches("confirmSignUp"):case e?.matches("resendSignUpCode"):return"confirmSignUp";case e?.matches("confirmSignIn"):return"confirmSignIn";case e?.matches("setupTotp.edit"):case e?.matches("setupTotp.submit"):return"setupTotp";case e?.matches("signIn.submit"):return e?.context.selectedAuthMethod!=null?"signInSelectAuthFactor":"signIn";case e?.matches("signIn.selectMethod"):return"signInSelectAuthFactor";case e?.matches("passkeyPrompt"):return"passkeyPrompt";case e?.matches("signIn"):return"signIn";case e?.matches("signUp"):case e?.matches("autoSignIn"):return"signUp";case e?.matches("forceChangePassword"):return"forceNewPassword";case e?.matches("forgotPassword"):return"forgotPassword";case e?.matches("confirmResetPassword"):return"confirmResetPassword";case e?.matches("selectUserAttributes"):return"verifyUser";case e?.matches("confirmVerifyUserAttribute"):return"confirmVerifyUser";case e?.matches("setupEmail"):return"setupEmail";case e?.matches("selectMfaType"):return"selectMfaType";case t.matches("getCurrentUser"):case e?.matches("fetchUserAttributes"):return"transition";default:return null}},uee=t=>{const e=n=>r=>t({type:n,data:r});return{initializeMachine:e("INIT"),resendCode:e("RESEND"),selectAuthMethod:e("SELECT_METHOD"),signOut:e("SIGN_OUT"),submitForm:e("SUBMIT"),toShowAuthMethods:e("SHOW_AUTH_METHODS"),updateForm:e("CHANGE"),updateBlur:e("BLUR"),toFederatedSignIn:e("FEDERATED_SIGN_IN"),toForgotPassword:e("FORGOT_PASSWORD"),toSignIn:e("SIGN_IN"),toSignUp:e("SIGN_UP"),skipVerification:e("SKIP")}},cee=t=>{const e=Ch(t)??{},{allowedMfaTypes:n,availableAuthMethods:r,challengeName:s,codeDeliveryDetails:o,preferredChallenge:a,remoteError:u,selectedAuthMethod:c,validationError:f,totpSecretCode:p=null,unverifiedUserAttributes:g,username:m}=e,{socialProviders:y=[],loginMechanisms:S}=t.context?.config??{},E=S?.[0],C=e?.user??t.context?.user,w=!!(f&&Object.keys(f).length>0),x=cT(t),T=t.hasTag("pending")||x?.hasTag("pending"),R=lee(t,x),M=(I=>{switch(I){case"idle":case"setup":return"configuring";case"authenticated":return"authenticated";default:return"unauthenticated"}})(R);return{allowedMfaTypes:n,authStatus:M,availableAuthMethods:r,challengeName:s,codeDeliveryDetails:o,error:u,hasValidationErrors:w,isPending:T,loginMechanism:E,preferredChallenge:a,route:R,selectedAuthMethod:c,socialProviders:y,totpSecretCode:p,unverifiedUserAttributes:g,user:C,username:m,validationErrors:f}},dee=({send:t,state:e})=>{const n=uee(t),r=cee(e);return{...n,...r}};var yc;(function(t){t.Apple="Apple",t.Amazon="Amazon",t.Facebook="Facebook",t.Google="Google"})(yc||(yc={}));var ok;(function(t){t.Email="email",t.PhoneNumber="phone_number"})(ok||(ok={}));const fee=["birthdate","email","family_name","given_name","middle_name","name","nickname","phone_number","preferred_username","profile","website"],hee=["username","email","phone_number"],b9=[...hee,...fee,"confirmation_code","password","confirm_password"],pee=t=>b9.includes(t),S9=t=>b9.includes(t),gee=t=>Array.isArray(t),mee=t=>t?gee(t)?t:[t]:null,vee=t=>{const e=t.trim().split("");for(let n=0;n<e.length;n++)n>0&&n<e.length-1&&(e[n]="*");return e.join("")},yee=t=>{if(t.length<4)return t;const e=t.split("");for(let n=0;n<e.length-4;n++)e[n]="*";return e.join("")},bee=t=>{const e=t.split("@");return`${vee(e[0])}@${e[1]}`},See=(t,e)=>t==="Phone Number"?yee(e):bee(e),Eee=t=>aee.some(e=>t.includes(e)),Cee=(t,e,n)=>encodeURI(`otpauth://totp/${t}:${e}?secret=${n}&issuer=${t}`);function wee(t,...e){return Object.entries(t).reduce((n,[r,s])=>({...n,[r]:e.includes(r)?s:s?.trim()}),{})}const _ee={ADD_PROFILE:"Add your Profile",ADD_WEBSITE:"Add your Website",BACK_SIGN_IN:"Back to Sign In",BIRTHDATE:"Birthdate",CHANGE_PASSWORD:"Change Password",CHANGING_PASSWORD:"Changing",CODE:"Code",CODE_ARRIVAL:"It may take a minute to arrive",CODE_EMAILED:"Your code is on the way. To log in, enter the code we emailed to",CODE_SENT:"Your code is on the way. To log in, enter the code we sent you",CODE_TEXTED:"Your code is on the way. To log in, enter the code we texted to",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Please confirm your Password",CONFIRM_RESET_PASSWORD_HEADING:"Reset your Password",CONFIRM_SIGNUP_HEADING:"Confirm Sign Up",CONFIRM_SMS:"Confirm SMS Code",CONFIRM_EMAIL:"Confirm Email Code",CONFIRM_MFA_DEFAULT:"Confirm MFA Code",CONFIRM_TOTP:"Confirm TOTP Code",CONFIRM:"Confirm",CONFIRMATION_CODE:"Confirmation Code",CONFIRMING:"Confirming",CONTINUE:"Continue",CONTINUE_WITHOUT_PASSKEY:"Continue without a Passkey",CREATE_ACCOUNT:"Create Account",CREATE_ACCOUNT_WITH_EMAIL_OTP:"Create account with Email OTP",CREATE_ACCOUNT_WITH_PASSWORD:"Create account with Password",CREATE_ACCOUNT_WITH_SMS_OTP:"Create account with SMS OTP",CREATE_PASSKEY:"Create a Passkey",CREATING_ACCOUNT:"Creating Account",EMAIL_ADDRESS:"Email",EMAIL_OTP:"Email Message",ENTER_BIRTHDATE:"Enter your Birthdate",ENTER_CODE:"Enter your code",ENTER_CONFIRMATION_CODE:"Enter your Confirmation Code",ENTER_EMAIL:"Enter your Email",ENTER_FAMILY_NAME:"Enter your Family Name",ENTER_GIVEN_NAME:"Enter your Given Name",ENTER_MIDDLE_NAME:"Enter your Middle Name",ENTER_NAME:"Enter your Name",ENTER_NICK_NAME:"Enter your Nickname",ENTER_PASSWORD:"Enter your Password",ENTER_PHONE_NUMBER:"Enter your Phone Number",ENTER_PREFERRED_USERNAME:"Enter your Preferred Username",ENTER_USERNAME:"Enter your username",ENTER_USERNAME_FIRST:"Please enter your username first",EXISTING_PASSKEYS:"Existing Passkeys",FAMILY_NAME:"Family Name",GIVEN_NAME:"Given Name",FORGOT_PASSWORD:"Forgot Password?",FORGOT_YOUR_PASSWORD:"Forgot your password?",HIDE_PASSWORD:"Hide password",LOADING:"Loading",LOGIN_NAME:"Username",MIDDLE_NAME:"Middle Name",MFA_SETUP_SELECTION:"Multi-Factor Authentication Setup",MFA_SELECTION:"Multi-Factor Authentication",NAME:"Name",NICKNAME:"Nickname",NEW_PASSWORD:"New password",OR:"or",OTHER_SIGN_IN_OPTIONS:"Other sign-in options",PASSKEY_AUTHENTICATION_CANCELED:"Passkey authentication was canceled. Please try again or use a different sign-in method.",PASSKEY_CREATED_SUCCESS:"Passkey created successfully!",PASSKEY_LABEL:"Passkey",PASSKEY_PROMPT_DESCRIPTION:"Passkeys are WebAuthn credentials that validate your identity using biometric data like touch or facial recognition or device authentication like passwords or PINs, serving as a secure password replacement.",PASSKEY_PROMPT_HEADING:"Sign in faster with Passkey",PASSKEY_REGISTERED:"Your passkey has been successfully registered.",PASSKEY_REGISTRATION_FAILED:"Failed to create passkey. Please try again.",PASSWORD:"Password",PASSWORDLESS_NOT_ENABLED:"Passwordless authentication is not enabled for this account. Please contact your administrator or use password sign-in.",PHONE_NUMBER:"Phone Number",PREFERRED_USERNAME:"Preferred Username",PROFILE:"Profile",REGISTERING:"Registering",RESEND_CODE:"Resend Code",RESET_PASSWORD_HEADING:"Reset your password",RESET_PASSWORD:"Reset Password",SEND_CODE:"Send code",CODE_DELIVERY_FAILED:"Unable to send verification code. Please try again.",VERIFICATION_CODE_EXPIRED:"Your verification code has expired. Please request a new code.",VERIFICATION_CODE_INVALID:"The verification code you entered is incorrect. Please try again.",SENDING:"Sending",SELECT_MFA_TYPE:"Select MFA Type",SETUP_ANOTHER_PASSKEY:"Setup another Passkey",SETUP_EMAIL:"Setup Email",SETUP_TOTP:"Setup TOTP",SHOW_PASSWORD:"Show password",SIGN_IN_BUTTON:"Sign in",SIGN_IN_TAB:"Sign In",SIGN_IN_WITH_AMAZON:"Sign In with Amazon",SIGN_IN_WITH_APPLE:"Sign In with Apple",SIGN_IN_WITH_EMAIL:"Sign In with Email",SIGN_IN_WITH_FACEBOOK:"Sign In with Facebook",SIGN_IN_WITH_GOOGLE:"Sign In with Google",SIGN_IN_WITH_PASSKEY:"Sign In with Passkey",SIGN_IN_WITH_PASSWORD:"Sign In with Password",SIGN_IN_WITH_SMS:"Sign In with SMS",SIGN_IN:"Sign in to your account",SIGN_UP_BUTTON:"Create a new account",SIGNING_IN_BUTTON:"Signing in",SKIP:"Skip",SMS_MFA:"Text Message (SMS)",SUBMIT:"Submit",SUBMITTING:"Submitting",SOFTWARE_TOKEN_MFA:"Authenticator App (TOTP)",UPPERCASE_COPY:"COPY",USERNAME:"Username",VERIFY_CONTACT:"Verify Contact",VERIFY_HEADING:"Account recovery requires verified contact information",VERIFY:"Verify",WE_EMAILED:"We Emailed You",WE_SENT_CODE:"We Sent A Code",WE_TEXTED:"We Texted You",WEBSITE:"Website"},Gm={..._ee},we={...Gm};function ye(t){return L8.get(t)}const fT=t=>{const e=t?.context.config?.loginMechanisms,[n]=e??["username"];return n},xee=t=>{const e={...t};for(const[n,r]of Object.entries(t)){const{label:s,placeholder:o}=r;e[n]={...r,label:s?ye(s):void 0,placeholder:o?ye(o):void 0}}return e},Aee=t=>Object.entries(t).sort((e,n)=>{const r=e[1].order||Number.MAX_VALUE,s=n[1].order||Number.MAX_VALUE;return r-s}).filter(e=>e[1]!==void 0),Tee="+1",bi=t=>{let e=Py[t];const{type:n}=e;return n==="tel"&&(e={...e,dialCode:Tee}),e},ky=t=>{const e=fT(t);return{...bi(e),autocomplete:"username"}},Vm=t=>({confirmation_code:{...bi("confirmation_code"),label:"Code *",placeholder:"Code"}}),Ree=t=>{const e=t.context.actorRef?.getSnapshot()?.context,n=e?.availableAuthMethods,r=e?.preferredChallenge,s=!n?.length||n.length===1&&n[0]==="PASSWORD"||n.length>1&&(!r||r==="PASSWORD"),o={username:{...ky(t)}};return s&&(o.password={...bi("password"),autocomplete:"current-password"}),o},Iee=t=>{const{loginMechanisms:e,signUpAttributes:n}=t.context.config,r=fT(t),o=t.context.actorRef?.getSnapshot()?.context?.availableAuthMethods,a=o&&o.length>1,u=Array.from(new Set([...e,"password","confirm_password",...n])),c={};for(const f of u)if(S9(f)){const p=f===r?ky(t):bi(f),g=a&&(f==="email"||f==="phone_number"||f==="password"||f==="confirm_password");c[f]={...p,...g&&{isRequired:!1}}}else console.debug(`Authenticator does not have a default implementation for ${f}. Customize SignUp FormFields to add your own.`);return c},Oee=t=>({confirmation_code:{...bi("confirmation_code"),placeholder:"Enter your code"}}),Nee=t=>{const e=fT(t),{label:n}=Py[e];return{username:{...ky(t),label:`Enter your ${n.toLowerCase()}`,placeholder:`Enter your ${n.toLowerCase()}`}}},Mee=t=>({...Vm(),password:{...bi("password"),label:"New Password",placeholder:"New Password"},confirm_password:{...bi("confirm_password"),label:"Confirm Password",placeholder:"Confirm Password"}}),Pee=t=>{const e=cT(t),{missingAttributes:n}=e.context,r=Array.from(new Set(["password","confirm_password",...n??[]])),s={};for(const o of r)S9(o)?s[o]={...bi(o)}:console.debug(`Authenticator does not have a default implementation for ${o}. Customize ForceNewPassword FormFields to add your own.`);return s},kee=t=>({email:bi("email")}),Dee={signIn:Ree,signUp:Iee,confirmSignUp:Oee,confirmSignIn:Vm,forceNewPassword:Pee,forgotPassword:Nee,confirmResetPassword:Mee,confirmVerifyUser:Vm,setupEmail:kee,setupTotp:Vm},Lee=(t,e)=>{const n=Dee[t];return n(e)},Uee=(t,e)=>{const n=Ch(e)?.formFields?.[t];return!n||Object.keys(n).length===0?{}:Object.entries(n).reduce((r,[s,o])=>{if((t==="signIn"||t==="forgotPassword")&&s==="username"){const u={...ky(e),...o};return{...r,[s]:u}}else if(pee(s)){const u={...Py[s],...o};return{...r,[s]:u}}else return{...r,[s]:o}},{})},Fee=(t,e)=>{const n=Lee(t,e),r=Uee(t,e),s={...n,...r};return delete s.QR,xee(s)},zee=t=>t.map(e=>{const n=e[0],r={...e[1],order:void 0};return[n,r]}),Bee=(t,e)=>{const n=Fee(t,e);return zee(Aee(n))},jee=t=>{switch(t){case"EMAIL_OTP":return ye(we.CONFIRM_EMAIL);case"SMS_MFA":return ye(we.CONFIRM_SMS);case"SOFTWARE_TOKEN_MFA":return ye(we.CONFIRM_TOTP);default:return ye(we.CONFIRM_MFA_DEFAULT)}},Hee=t=>{const{DeliveryMedium:e,Destination:n}=t??{},r=e==="EMAIL",s=e==="SMS",o=ye(we.CODE_ARRIVAL);return r||s?`${ye(r?we.CODE_EMAILED:we.CODE_TEXTED)} ${n}. ${o}.`:`${ye(we.CODE_SENT)}. ${o}.`},$ee=t=>{const{DeliveryMedium:e}=t??{},n=e==="EMAIL";return ye(!n&&e==="SMS"?we.WE_SENT_CODE:n?we.WE_EMAILED:we.WE_TEXTED)},qee={amazon:"Amazon",apple:"Apple",facebook:"Facebook",google:"Google"},Wee=(t,e)=>ye(`Sign ${t==="signIn"?"In":"Up"} with ${qee[e]}`),Gee=t=>ye(t==="MFA_SETUP"?we.MFA_SETUP_SELECTION:we.MFA_SELECTION),Vee=t=>{switch(t){case"email":return ye(we.EMAIL_ADDRESS);case"phone_number":return ye(we.PHONE_NUMBER);default:return ye(we.USERNAME)}},Kee=t=>{switch(t){case"EMAIL":return ye(Gm.EMAIL_OTP);case"SMS":return ye(Gm.SMS_MFA);case"TOTP":return ye(Gm.SOFTWARE_TOKEN_MFA);default:return ye(t)}},kn={getBackToSignInText:()=>ye(we.BACK_SIGN_IN),getChangePasswordText:()=>ye(we.CHANGE_PASSWORD),getChangingText:()=>ye(we.CHANGING_PASSWORD),getConfirmText:()=>ye(we.CONFIRM),getConfirmingText:()=>ye(we.CONFIRMING),getContinueText:()=>ye(we.CONTINUE),getCopyText:()=>ye(we.UPPERCASE_COPY),getHidePasswordText:()=>ye(we.HIDE_PASSWORD),getLoadingText:()=>ye(we.LOADING),getOrText:()=>ye(we.OR),getResendCodeText:()=>ye(we.RESEND_CODE),getSendCodeText:()=>ye(we.SEND_CODE),getSendingText:()=>ye(we.SENDING),getShowPasswordText:()=>ye(we.SHOW_PASSWORD),getSubmitText:()=>ye(we.SUBMIT),getSubmittingText:()=>ye(we.SUBMITTING),getSignInTabText:()=>ye(we.SIGN_IN_TAB),getSignUpTabText:()=>ye(we.CREATE_ACCOUNT),getForgotPasswordText:t=>ye(t?we.FORGOT_PASSWORD:we.FORGOT_YOUR_PASSWORD),getSigningInText:()=>ye(we.SIGNING_IN_BUTTON),getSignInText:()=>ye(we.SIGN_IN_BUTTON),getCreatingAccountText:()=>ye(we.CREATING_ACCOUNT),getCreateAccountText:()=>ye(we.CREATE_ACCOUNT),getCreateAccountWithEmailText:()=>ye(we.CREATE_ACCOUNT_WITH_EMAIL_OTP),getCreateAccountWithPasswordText:()=>ye(we.CREATE_ACCOUNT_WITH_PASSWORD),getCreateAccountWithSmsText:()=>ye(we.CREATE_ACCOUNT_WITH_SMS_OTP),getDeliveryMessageText:Hee,getDeliveryMethodText:$ee,getChallengeText:jee,getResetYourPasswordText:()=>ye(we.RESET_PASSWORD),getSetupEmailText:()=>ye(we.SETUP_EMAIL),getSetupTotpText:()=>ye(we.SETUP_TOTP),getSetupTotpInstructionsText:()=>ye("Copy and paste the secret key below into an authenticator app and then enter the code in the text field below."),getCopiedText:()=>ye("COPIED"),getSignInWithFederationText:Wee,getMfaTypeLabelByValue:Kee,getSelectMfaTypeByChallengeName:Gee,getSelectMfaTypeText:()=>ye(we.SELECT_MFA_TYPE),getSkipText:()=>ye(we.SKIP),getVerifyText:()=>ye(we.VERIFY),getVerifyContactText:()=>ye(we.VERIFY_CONTACT),getAccountRecoveryInfoText:()=>ye(we.VERIFY_HEADING),getPasskeyPromptHeadingText:()=>ye(we.PASSKEY_PROMPT_HEADING),getPasskeyPromptDescriptionText:()=>ye(we.PASSKEY_PROMPT_DESCRIPTION),getCreatePasskeyText:()=>ye(we.CREATE_PASSKEY),getRegisteringText:()=>ye(we.REGISTERING),getContinueWithoutPasskeyText:()=>ye(we.CONTINUE_WITHOUT_PASSKEY),getPasskeyCreatedSuccessText:()=>ye(we.PASSKEY_CREATED_SUCCESS),getPasskeyRegisteredText:()=>ye(we.PASSKEY_REGISTERED),getPasskeyRegistrationFailedText:()=>ye(we.PASSKEY_REGISTRATION_FAILED),getPasskeyLabelText:()=>ye(we.PASSKEY_LABEL),getExistingPasskeysText:()=>ye(we.EXISTING_PASSKEYS),getSetupAnotherPasskeyText:()=>ye(we.SETUP_ANOTHER_PASSKEY),getSignInWithPasswordText:()=>ye(we.SIGN_IN_WITH_PASSWORD),getSignInWithEmailText:()=>ye(we.SIGN_IN_WITH_EMAIL),getSignInWithSmsText:()=>ye(we.SIGN_IN_WITH_SMS),getSignInWithPasskeyText:()=>ye(we.SIGN_IN_WITH_PASSKEY),getOtherSignInOptionsText:()=>ye(we.OTHER_SIGN_IN_OPTIONS),getEnterUsernameFirstText:()=>ye(we.ENTER_USERNAME_FIRST),getUsernameLabelByLoginMechanism:Vee,getInvalidEmailText:()=>ye("Please enter a valid email"),getRequiredFieldText:()=>ye("This field is required")},Yee=new g9(new h9(Kh)),E9={configure(t,e){const n=m8(t),r=new eZ({sameSite:"lax"}),s=e?.ssr?r:Kh,o=e?.ssr?new g9(new h9(r)):Yee;if(!n.Auth||e?.Auth){Ht.configure(n,e);return}$m.setAuthConfig(n.Auth),$m.setKeyValueStorage(s),Ht.configure(n,{...e,Auth:{tokenProvider:$m,credentialsProvider:o}})},getConfig(){return Ht.getConfig()}};var TE,ik;function C9(){if(ik)return TE;ik=1;function t(e,n){for(var r=-1,s=e==null?0:e.length,o=Array(s);++r<s;)o[r]=n(e[r],r,e);return o}return TE=t,TE}var RE,ak;function Zee(){if(ak)return RE;ak=1;var t=MA(),e=L6(),n=1,r=2;function s(o,a,u,c){var f=u.length,p=f,g=!c;if(o==null)return!p;for(o=Object(o);f--;){var m=u[f];if(g&&m[2]?m[1]!==o[m[0]]:!(m[0]in o))return!1}for(;++f<p;){m=u[f];var y=m[0],S=o[y],E=m[1];if(g&&m[2]){if(S===void 0&&!(y in o))return!1}else{var C=new t;if(c)var w=c(S,E,y,o,a,C);if(!(w===void 0?e(E,S,n|r,c,C):w))return!1}}return!0}return RE=s,RE}var IE,lk;function w9(){if(lk)return IE;lk=1;var t=xi();function e(n){return n===n&&!t(n)}return IE=e,IE}var OE,uk;function Xee(){if(uk)return OE;uk=1;var t=w9(),e=D6();function n(r){for(var s=e(r),o=s.length;o--;){var a=s[o],u=r[a];s[o]=[a,u,t(u)]}return s}return OE=n,OE}var NE,ck;function _9(){if(ck)return NE;ck=1;function t(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}return NE=t,NE}var ME,dk;function Qee(){if(dk)return ME;dk=1;var t=Zee(),e=Xee(),n=_9();function r(s){var o=e(s);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(a){return a===s||t(a,s,o)}}return ME=r,ME}var PE,fk;function hT(){if(fk)return PE;fk=1;var t=Xc(),e=Ql(),n="[object Symbol]";function r(s){return typeof s=="symbol"||e(s)&&t(s)==n}return PE=r,PE}var kE,hk;function pT(){if(hk)return kE;hk=1;var t=Ai(),e=hT(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(o,a){if(t(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||e(o)?!0:r.test(o)||!n.test(o)||a!=null&&o in Object(a)}return kE=s,kE}var DE,pk;function Jee(){if(pk)return DE;pk=1;var t=NA(),e="Expected a function";function n(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new TypeError(e);var o=function(){var a=arguments,u=s?s.apply(this,a):a[0],c=o.cache;if(c.has(u))return c.get(u);var f=r.apply(this,a);return o.cache=c.set(u,f)||c,f};return o.cache=new(n.Cache||t),o}return n.Cache=t,DE=n,DE}var LE,gk;function ete(){if(gk)return LE;gk=1;var t=Jee(),e=500;function n(r){var s=t(r,function(a){return o.size===e&&o.clear(),a}),o=s.cache;return s}return LE=n,LE}var UE,mk;function tte(){if(mk)return UE;mk=1;var t=ete(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(e,function(a,u,c,f){o.push(c?f.replace(n,"$1"):u||a)}),o});return UE=r,UE}var FE,vk;function nte(){if(vk)return FE;vk=1;var t=hy(),e=C9(),n=Ai(),r=hT(),s=t?t.prototype:void 0,o=s?s.toString:void 0;function a(u){if(typeof u=="string")return u;if(n(u))return e(u,a)+"";if(r(u))return o?o.call(u):"";var c=u+"";return c=="0"&&1/u==-1/0?"-0":c}return FE=a,FE}var zE,yk;function gT(){if(yk)return zE;yk=1;var t=nte();function e(n){return n==null?"":t(n)}return zE=e,zE}var BE,bk;function Dy(){if(bk)return BE;bk=1;var t=Ai(),e=pT(),n=tte(),r=gT();function s(o,a){return t(o)?o:e(o,a)?[o]:n(r(o))}return BE=s,BE}var jE,Sk;function Jh(){if(Sk)return jE;Sk=1;var t=hT();function e(n){if(typeof n=="string"||t(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return jE=e,jE}var HE,Ek;function mT(){if(Ek)return HE;Ek=1;var t=Dy(),e=Jh();function n(r,s){s=t(s,r);for(var o=0,a=s.length;r!=null&&o<a;)r=r[e(s[o++])];return o&&o==a?r:void 0}return HE=n,HE}var $E,Ck;function rte(){if(Ck)return $E;Ck=1;var t=mT();function e(n,r,s){var o=n==null?void 0:t(n,r);return o===void 0?s:o}return $E=e,$E}var qE,wk;function ste(){if(wk)return qE;wk=1;function t(e,n){return e!=null&&n in Object(e)}return qE=t,qE}var WE,_k;function ote(){if(_k)return WE;_k=1;var t=Dy(),e=PA(),n=Ai(),r=my(),s=DA(),o=Jh();function a(u,c,f){c=t(c,u);for(var p=-1,g=c.length,m=!1;++p<g;){var y=o(c[p]);if(!(m=u!=null&&f(u,y)))break;u=u[y]}return m||++p!=g?m:(g=u==null?0:u.length,!!g&&s(g)&&r(y,g)&&(n(u)||e(u)))}return WE=a,WE}var GE,xk;function ite(){if(xk)return GE;xk=1;var t=ste(),e=ote();function n(r,s){return r!=null&&e(r,s,t)}return GE=n,GE}var VE,Ak;function ate(){if(Ak)return VE;Ak=1;var t=L6(),e=rte(),n=ite(),r=pT(),s=w9(),o=_9(),a=Jh(),u=1,c=2;function f(p,g){return r(p)&&s(g)?o(a(p),g):function(m){var y=e(m,p);return y===void 0&&y===g?n(m,p):t(g,y,u|c)}}return VE=f,VE}var KE,Tk;function vT(){if(Tk)return KE;Tk=1;function t(e){return e}return KE=t,KE}var YE,Rk;function lte(){if(Rk)return YE;Rk=1;function t(e){return function(n){return n?.[e]}}return YE=t,YE}var ZE,Ik;function ute(){if(Ik)return ZE;Ik=1;var t=mT();function e(n){return function(r){return t(r,n)}}return ZE=e,ZE}var XE,Ok;function cte(){if(Ok)return XE;Ok=1;var t=lte(),e=ute(),n=pT(),r=Jh();function s(o){return n(o)?t(r(o)):e(o)}return XE=s,XE}var QE,Nk;function dte(){if(Nk)return QE;Nk=1;var t=Qee(),e=ate(),n=vT(),r=Ai(),s=cte();function o(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?e(a[0],a[1]):t(a):s(a)}return QE=o,QE}var JE,Mk;function x9(){if(Mk)return JE;Mk=1;var t=Xl(),e=(function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}})();return JE=e,JE}var eC,Pk;function yT(){if(Pk)return eC;Pk=1;var t=x9();function e(n,r,s){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:s,writable:!0}):n[r]=s}return eC=e,eC}var tC,kk;function A9(){if(kk)return tC;kk=1;var t=yT(),e=Wh(),n=Object.prototype,r=n.hasOwnProperty;function s(o,a,u){var c=o[a];(!(r.call(o,a)&&e(c,u))||u===void 0&&!(a in o))&&t(o,a,u)}return tC=s,tC}var nC,Dk;function fte(){if(Dk)return nC;Dk=1;var t=A9(),e=Dy(),n=my(),r=xi(),s=Jh();function o(a,u,c,f){if(!r(a))return a;u=e(u,a);for(var p=-1,g=u.length,m=g-1,y=a;y!=null&&++p<g;){var S=s(u[p]),E=c;if(S==="__proto__"||S==="constructor"||S==="prototype")return a;if(p!=m){var C=y[S];E=f?f(C,S,y):void 0,E===void 0&&(E=r(C)?C:n(u[p+1])?[]:{})}t(y,S,E),y=y[S]}return a}return nC=o,nC}var rC,Lk;function hte(){if(Lk)return rC;Lk=1;var t=mT(),e=fte(),n=Dy();function r(s,o,a){for(var u=-1,c=o.length,f={};++u<c;){var p=o[u],g=t(s,p);a(g,p)&&e(f,n(p,s),g)}return f}return rC=r,rC}var sC,Uk;function bT(){if(Uk)return sC;Uk=1;var t=k6(),e=t(Object.getPrototypeOf,Object);return sC=e,sC}var oC,Fk;function pte(){if(Fk)return oC;Fk=1;var t=I6(),e=bT(),n=M6(),r=N6(),s=Object.getOwnPropertySymbols,o=s?function(a){for(var u=[];a;)t(u,n(a)),a=e(a);return u}:r;return oC=o,oC}var iC,zk;function gte(){if(zk)return iC;zk=1;function t(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}return iC=t,iC}var aC,Bk;function mte(){if(Bk)return aC;Bk=1;var t=xi(),e=UA(),n=gte(),r=Object.prototype,s=r.hasOwnProperty;function o(a){if(!t(a))return n(a);var u=e(a),c=[];for(var f in a)f=="constructor"&&(u||!s.call(a,f))||c.push(f);return c}return aC=o,aC}var lC,jk;function ST(){if(jk)return lC;jk=1;var t=P6(),e=mte(),n=vy();function r(s){return n(s)?t(s,!0):e(s)}return lC=r,lC}var uC,Hk;function vte(){if(Hk)return uC;Hk=1;var t=O6(),e=pte(),n=ST();function r(s){return t(s,n,e)}return uC=r,uC}var cC,$k;function yte(){if($k)return cC;$k=1;var t=C9(),e=dte(),n=hte(),r=vte();function s(o,a){if(o==null)return{};var u=t(r(o),function(c){return[c]});return a=e(a),n(o,u,function(c,f){return a(c,f[0])})}return cC=s,cC}var bte=yte();const Ste=qa(bte),Ete=!0,Cte="",wh=(t,e)=>`${t}${e}`.replace(/[^A-Z0-9+]/gi,""),wte=(t,e)=>{switch(e){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return e.startsWith("custom:")}},_te=t=>{const{phone_number:e,...n}=Ste(t,wte);if(mi(e)&&e!==Cte){const{country_code:r}=t;return{...n,phone_number:wh(r,e)}}return n},xte=(t,e,n,r)=>{const{password:s,...o}=e,a=_te(o),u=r&&r!=="PASSWORD";let c=a;r==="SMS_OTP"&&a.email&&(c={...a,email:""});const f={autoSignIn:u?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:r}:Ete,userAttributes:{...n==="phone_number"?{...c,phone_number:t}:c}};return{username:t,password:u?void 0:s,options:f}},Ate=({formValues:t,loginMechanisms:e})=>{const n=t.__authMethod;if(n==="SMS_OTP"){const{country_code:s,phone_number:o}=t;return wh(s,o)}if(n==="EMAIL_OTP")return t.email;if(e.includes("username"))return t.username;const r=e[0];if(r==="phone_number"){const{country_code:s,phone_number:o}=t;return wh(s,o)}return t[r]},Tte=(t,e)=>{const n=[],r=e!==void 0;n.push("PASSWORD"),(r||t?.emailOtpEnabled)&&n.push("EMAIL_OTP"),(r||t?.smsOtpEnabled)&&n.push("SMS_OTP"),(r||t?.webAuthnEnabled)&&n.push("WEB_AUTHN");const s=e??[],o=n.filter(a=>!s.includes(a));if(o.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return o},{assign:ot}=o8,Rte=ot({actorDoneData:void 0}),Ite=ot({challengeName:void 0}),Ote=ot({missingAttributes:void 0}),Nte=ot({remoteError:void 0}),Mte=ot({formValues:t=>({username:t.formValues?.username})}),Pte=ot({touched:{}}),kte=ot({user:void 0}),Dte=ot({validationError:{}}),Lte=ot({totpSecretCode:(t,{data:e})=>{const{sharedSecret:n}=e.nextStep?.totpSetupDetails??{};return n}}),Ute=ot({allowedMfaTypes:(t,{data:e})=>e.nextStep?.allowedMFATypes}),Fte=ot({step:"SIGN_IN"}),zte=ot({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Bte=ot({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),jte=ot({challengeName:(t,{data:e})=>{const{signInStep:n}=e.nextStep;switch(n){case"CONFIRM_SIGN_IN_WITH_SMS_CODE":return"SMS_MFA";case"CONFIRM_SIGN_IN_WITH_TOTP_CODE":return"SOFTWARE_TOKEN_MFA";case"CONFIRM_SIGN_IN_WITH_EMAIL_CODE":return"EMAIL_OTP";case"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION":case"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP":case"CONTINUE_SIGN_IN_WITH_TOTP_SETUP":return"MFA_SETUP";case"CONTINUE_SIGN_IN_WITH_MFA_SELECTION":return"SELECT_MFA_TYPE";default:return}}}),Hte=ot({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:r,country_code:s}=t;return n==="phone_number"?wh(s,r):r}}),$te=ot({username:Ate}),qte=ot({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:r,country_code:s}=t;return n==="phone_number"?wh(s,r):r}}),Wte=ot({step:(t,{data:e})=>e.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":e.nextStep.signInStep}),Gte=ot({step:(t,{data:e})=>e.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":e.nextStep.signUpStep}),Vte=ot({step:(t,{data:e})=>e.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":e.nextStep.resetPasswordStep}),Kte=ot({missingAttributes:(t,{data:e})=>e.nextStep?.missingAttributes}),Yte=ot({validationError:(t,{data:e})=>e}),Zte=ot({remoteError:(t,{data:e})=>{if(e.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const n=e?.message||"";return n.includes("USER_AUTH flow not enabled")?ye(we.PASSWORDLESS_NOT_ENABLED):n.includes("Cannot send code to either")?ye(we.CODE_DELIVERY_FAILED):n.includes("Invalid code or auth state")?ye(we.VERIFICATION_CODE_INVALID):n.includes("session is expired")?ye(we.VERIFICATION_CODE_EXPIRED):n.includes("ceremony has been canceled")?ye(we.PASSKEY_AUTHENTICATION_CANCELED):n||e}}),Xte=ot({user:(t,{data:e})=>e}),qk=t=>({Destination:t.destination,DeliveryMedium:t.deliveryMedium,AttributeName:t.attributName}),Qte=ot({codeDeliveryDetails:(t,{data:e})=>e?.nextStep?.codeDeliveryDetails?qk(e.nextStep.codeDeliveryDetails):qk(e)}),Jte=ot({formValues:(t,{data:e})=>{const{name:n,value:r}=e;return{...t.formValues,[n]:r}}}),ene=ot({formValues:(t,{data:e})=>wee({...t.formValues,...e},"password")}),tne=ot({touched:(t,{data:e})=>({...t.touched,[e.name]:!0})}),nne=ot({unverifiedUserAttributes:(t,{data:e})=>{const n=e||t.fetchedUserAttributes;if(!n)return{};const{email:r,phone_number:s}=n;return{...r&&{email:r},...s&&{phone_number:s}}}}),rne=ot({selectedUserAttribute:void 0}),sne=ot({selectedUserAttribute:t=>t.formValues?.unverifiedAttr}),one=ot({step:"CONFIRM_SIGN_UP"}),ine=ot({selectedAuthMethod:(t,{data:e})=>e.method}),ane=ot({selectedAuthMethod:(t,{data:e})=>e?.__authMethod||"PASSWORD"}),lne=ot({step:"SELECT_AUTH_METHOD"}),une=ot({fetchedUserAttributes:(t,e)=>e.data}),cne=ot({hasExistingPasskeys:(t,e)=>e.data}),dne=ot({hasExistingPasskeys:!1}),ep={clearActorDoneData:Rte,clearChallengeName:Ite,clearError:Nte,clearFormValues:Mte,clearHasExistingPasskeys:dne,clearMissingAttributes:Ote,clearSelectedUserAttribute:rne,clearTouched:Pte,clearUser:kte,clearValidationError:Dte,handleBlur:tne,handleInput:Jte,handleSubmit:ene,setAllowedMfaTypes:Ute,setChallengeName:jte,setCodeDeliveryDetails:Qte,setFetchedUserAttributes:une,setFieldErrors:Yte,setHasExistingPasskeys:cne,setMissingAttributes:Kte,setNextResetPasswordStep:Vte,setNextSignInStep:Wte,setNextSignUpStep:Gte,setRemoteError:Zte,setConfirmAttributeCompleteStep:Bte,setConfirmSignUpSignUpStep:one,setSelectAuthMethodStep:lne,setSelectedAuthMethod:ine,setSelectedAuthMethodFromForm:ane,setShouldVerifyUserAttributeStep:zte,setSelectedUserAttribute:sne,setSignInStep:Fte,setTotpSecretCode:Lte,setUser:Xte,setUnverifiedUserAttributes:nne,setUsernameForgotPassword:Hte,setUsernameSignIn:qte,setUsernameSignUp:$te},fne=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],hne=(t,{data:e})=>e?.nextStep.signInStep==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",pne=(t,{data:e})=>e?.nextStep?.signInStep==="RESET_PASSWORD",gne=(t,{data:e})=>e?.nextStep.signInStep==="CONFIRM_SIGN_UP",mne=(t,{data:e})=>e?.nextStep.signUpStep==="COMPLETE_AUTO_SIGN_IN",vne=(t,{data:e})=>e?.nextStep.signUpStep==="DONE"&&t.step==="CONFIRM_SIGN_UP",yne=(t,{data:e})=>e?.nextStep.signInStep==="DONE",bne=(t,{data:e})=>e?.nextStep.signUpStep==="DONE",Sne=(t,{data:e})=>e?.nextStep.resetPasswordStep==="DONE",Ene=(t,{data:e})=>e?.step==="CONFIRM_ATTRIBUTE_COMPLETE",Cne=(t,{data:e})=>e?.step==="CONFIRM_ATTRIBUTE_WITH_CODE",wne=(t,{data:e})=>e?.step==="SHOULD_CONFIRM_USER_ATTRIBUTE",_ne=(t,{data:e})=>e?.step==="RESET_PASSWORD",xne=(t,{data:e})=>e?.step==="CONFIRM_SIGN_UP",Ane=({step:t})=>fne.includes(t),Tne=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",Rne=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",Ine=({step:t})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t),One=({step:t})=>t==="RESET_PASSWORD",Nne=({step:t})=>t==="CONFIRM_RESET_PASSWORD_WITH_CODE",Mne=({step:t})=>t==="CONFIRM_SIGN_UP",Pne=(t,e)=>{const n=e.data||t.fetchedUserAttributes;if(!n)return!1;const{email:r,phone_number:s,phone_number_verified:o,email_verified:a}=n;return!r&&!s?!1:(a===void 0||a==="false")&&(o===void 0||o==="false")},kne=(t,{data:e})=>e.message==="User is already confirmed.",Dne=({availableAuthMethods:t,preferredChallenge:e,selectedAuthMethod:n})=>t&&t.length>1&&(!e||n===null),Lne=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignin==="ALWAYS"},Une=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignup==="ALWAYS"},Fne=({passwordless:t})=>t?.passkeyRegistrationPrompts!=null,zne=({selectedAuthMethod:t,step:e})=>t!=null&&e==="SELECT_AUTH_METHOD",Ly={hasCompletedAttributeConfirmation:Ene,hasCompletedResetPassword:Sne,hasCompletedSignIn:yne,hasCompletedSignUp:bne,hasPasskeyRegistrationPrompts:Fne,isConfirmSignUpStep:xne,isConfirmUserAttributeStep:Cne,isResetPasswordStep:_ne,isShouldConfirmUserAttributeStep:wne,isUserAlreadyConfirmed:kne,shouldAutoSignIn:mne,shouldManualSignIn:vne,shouldConfirmResetPassword:Nne,shouldConfirmSignIn:Ane,shouldConfirmSignInWithNewPassword:hne,shouldConfirmSignUp:Mne,shouldConfirmSignUpFromSignIn:gne,shouldResetPassword:One,shouldResetPasswordFromSignIn:pne,shouldReturnToSelectMethod:zne,shouldSelectAuthMethod:Dne,shouldSetupTotp:Tne,shouldSetupEmail:Rne,shouldSelectMfaType:Ine,shouldVerifyAttribute:Pne,shouldPromptPasskeyRegistration:Lne,shouldPromptPasskeyRegistrationAfterSignup:Une};var dC,Wk;function T9(){if(Wk)return dC;Wk=1;var t=yT(),e=Wh();function n(r,s,o){(o!==void 0&&!e(r[s],o)||o===void 0&&!(s in r))&&t(r,s,o)}return dC=n,dC}var fC,Gk;function Bne(){if(Gk)return fC;Gk=1;function t(e){return function(n,r,s){for(var o=-1,a=Object(n),u=s(n),c=u.length;c--;){var f=u[e?c:++o];if(r(a[f],f,a)===!1)break}return n}}return fC=t,fC}var hC,Vk;function jne(){if(Vk)return hC;Vk=1;var t=Bne(),e=t();return hC=e,hC}var $f={exports:{}};$f.exports;var Kk;function Hne(){return Kk||(Kk=1,(function(t,e){var n=No(),r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===r,a=o?n.Buffer:void 0,u=a?a.allocUnsafe:void 0;function c(f,p){if(p)return f.slice();var g=f.length,m=u?u(g):new f.constructor(g);return f.copy(m),m}t.exports=c})($f,$f.exports)),$f.exports}var pC,Yk;function $ne(){if(Yk)return pC;Yk=1;var t=R6();function e(n){var r=new n.constructor(n.byteLength);return new t(r).set(new t(n)),r}return pC=e,pC}var gC,Zk;function qne(){if(Zk)return gC;Zk=1;var t=$ne();function e(n,r){var s=r?t(n.buffer):n.buffer;return new n.constructor(s,n.byteOffset,n.length)}return gC=e,gC}var mC,Xk;function Wne(){if(Xk)return mC;Xk=1;function t(e,n){var r=-1,s=e.length;for(n||(n=Array(s));++r<s;)n[r]=e[r];return n}return mC=t,mC}var vC,Qk;function Gne(){if(Qk)return vC;Qk=1;var t=xi(),e=Object.create,n=(function(){function r(){}return function(s){if(!t(s))return{};if(e)return e(s);r.prototype=s;var o=new r;return r.prototype=void 0,o}})();return vC=n,vC}var yC,Jk;function Vne(){if(Jk)return yC;Jk=1;var t=Gne(),e=bT(),n=UA();function r(s){return typeof s.constructor=="function"&&!n(s)?t(e(s)):{}}return yC=r,yC}var bC,eD;function Kne(){if(eD)return bC;eD=1;var t=vy(),e=Ql();function n(r){return e(r)&&t(r)}return bC=n,bC}var SC,tD;function Yne(){if(tD)return SC;tD=1;var t=Xc(),e=bT(),n=Ql(),r="[object Object]",s=Function.prototype,o=Object.prototype,a=s.toString,u=o.hasOwnProperty,c=a.call(Object);function f(p){if(!n(p)||t(p)!=r)return!1;var g=e(p);if(g===null)return!0;var m=u.call(g,"constructor")&&g.constructor;return typeof m=="function"&&m instanceof m&&a.call(m)==c}return SC=f,SC}var EC,nD;function R9(){if(nD)return EC;nD=1;function t(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}return EC=t,EC}var CC,rD;function Zne(){if(rD)return CC;rD=1;var t=A9(),e=yT();function n(r,s,o,a){var u=!o;o||(o={});for(var c=-1,f=s.length;++c<f;){var p=s[c],g=a?a(o[p],r[p],p,o,r):void 0;g===void 0&&(g=r[p]),u?e(o,p,g):t(o,p,g)}return o}return CC=n,CC}var wC,sD;function Xne(){if(sD)return wC;sD=1;var t=Zne(),e=ST();function n(r){return t(r,e(r))}return wC=n,wC}var _C,oD;function Qne(){if(oD)return _C;oD=1;var t=T9(),e=Hne(),n=qne(),r=Wne(),s=Vne(),o=PA(),a=Ai(),u=Kne(),c=kA(),f=IA(),p=xi(),g=Yne(),m=LA(),y=R9(),S=Xne();function E(C,w,x,T,R,M,O){var I=y(C,x),P=y(w,x),k=O.get(P);if(k){t(C,x,k);return}var H=M?M(I,P,x+"",C,w,O):void 0,U=H===void 0;if(U){var B=a(P),W=!B&&c(P),Y=!B&&!W&&m(P);H=P,B||W||Y?a(I)?H=I:u(I)?H=r(I):W?(U=!1,H=e(P,!0)):Y?(U=!1,H=n(P,!0)):H=[]:g(P)||o(P)?(H=I,o(I)?H=S(I):(!p(I)||f(I))&&(H=s(P))):U=!1}U&&(O.set(P,H),R(H,P,T,M,O),O.delete(P)),t(C,x,H)}return _C=E,_C}var xC,iD;function Jne(){if(iD)return xC;iD=1;var t=MA(),e=T9(),n=jne(),r=Qne(),s=xi(),o=ST(),a=R9();function u(c,f,p,g,m){c!==f&&n(f,function(y,S){if(m||(m=new t),s(y))r(c,f,S,p,u,g,m);else{var E=g?g(a(c,S),y,S+"",c,f,m):void 0;E===void 0&&(E=y),e(c,S,E)}},o)}return xC=u,xC}var AC,aD;function ere(){if(aD)return AC;aD=1;function t(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}return AC=t,AC}var TC,lD;function tre(){if(lD)return TC;lD=1;var t=ere(),e=Math.max;function n(r,s,o){return s=e(s===void 0?r.length-1:s,0),function(){for(var a=arguments,u=-1,c=e(a.length-s,0),f=Array(c);++u<c;)f[u]=a[s+u];u=-1;for(var p=Array(s+1);++u<s;)p[u]=a[u];return p[s]=o(f),t(r,this,p)}}return TC=n,TC}var RC,uD;function nre(){if(uD)return RC;uD=1;function t(e){return function(){return e}}return RC=t,RC}var IC,cD;function rre(){if(cD)return IC;cD=1;var t=nre(),e=x9(),n=vT(),r=e?function(s,o){return e(s,"toString",{configurable:!0,enumerable:!1,value:t(o),writable:!0})}:n;return IC=r,IC}var OC,dD;function sre(){if(dD)return OC;dD=1;var t=800,e=16,n=Date.now;function r(s){var o=0,a=0;return function(){var u=n(),c=e-(u-a);if(a=u,c>0){if(++o>=t)return arguments[0]}else o=0;return s.apply(void 0,arguments)}}return OC=r,OC}var NC,fD;function ore(){if(fD)return NC;fD=1;var t=rre(),e=sre(),n=e(t);return NC=n,NC}var MC,hD;function ire(){if(hD)return MC;hD=1;var t=vT(),e=tre(),n=ore();function r(s,o){return n(e(s,o,t),s+"")}return MC=r,MC}var PC,pD;function are(){if(pD)return PC;pD=1;var t=Wh(),e=vy(),n=my(),r=xi();function s(o,a,u){if(!r(u))return!1;var c=typeof a;return(c=="number"?e(u)&&n(a,u.length):c=="string"&&a in u)?t(u[a],o):!1}return PC=s,PC}var kC,gD;function lre(){if(gD)return kC;gD=1;var t=ire(),e=are();function n(r){return t(function(s,o){var a=-1,u=o.length,c=u>1?o[u-1]:void 0,f=u>2?o[2]:void 0;for(c=r.length>3&&typeof c=="function"?(u--,c):void 0,f&&e(o[0],o[1],f)&&(c=u<3?void 0:c,u=1),s=Object(s);++a<u;){var p=o[a];p&&r(s,p,a,c)}return s})}return kC=n,kC}var DC,mD;function ure(){if(mD)return DC;mD=1;var t=Jne(),e=lre(),n=e(function(r,s,o){t(r,s,o)});return DC=n,DC}var cre=ure();const dre=qa(cre),Uy=async(t,e,n,r)=>{const s=await Promise.all(r.map(a=>a(t,e,n))),o=dre({},...s);return dT(o)?Promise.resolve():Promise.reject(o)},fre=8,hre=t=>Array.isArray(t),pre=t=>{if(t)return hre(t)?Object.entries(t).map(([e,n])=>Object.keys(n)[0]):Object.keys(t)},Da={async getAmplifyConfig(){const t=E9.getConfig(),e=t.Auth?.Cognito,{loginWith:n,userAttributes:r}=t.Auth?.Cognito??{},s=n?Object.entries(n).filter(([f,p])=>f!=="oauth").filter(([f,p])=>!!p).map(f=>f[0]==="phone"?"phone_number":f[0]):void 0,o=pre(r),a=n?.oauth?.providers?n.oauth.providers?.map(f=>f.toString().toLowerCase()):void 0,u=t.Auth?.Cognito?.passwordless,c={emailOtpEnabled:u?.emailOtpEnabled??u?.email_otp_enabled===!0,smsOtpEnabled:u?.smsOtpEnabled??u?.sms_otp_enabled===!0,webAuthnEnabled:!!(u?.webAuthn??u?.web_authn),preferredChallenge:u?.preferredChallenge??u?.preferred_challenge};return{...e,loginMechanisms:s,signUpAttributes:o,socialProviders:a,passwordlessCapabilities:c}},getCurrentUser:Ny,handleSignIn:iT,handleSignUp:$Q,handleConfirmSignIn:i9,handleConfirmSignUp:ZQ,handleForgotPasswordSubmit:GQ,handleForgotPassword:o9,handleResendSignUpCode:KQ,async validateCustomSignUp(t,e){},async validateFormPassword(t,e,n){const{password:r}=t,{password:s}=e;if(!s||!n)return null;const o=[],a=n.minLength??fre;return r.length<a&&o.push(`Password must have at least ${a} characters`),n.requireLowercase&&!/[a-z]/.test(r)&&o.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(r)&&o.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(r)&&o.push("Password must have numbers"),n.requireSpecialCharacters&&!Eee(r)&&o.push("Password must have special characters"),o.length!==0?{password:o}:null},async validateConfirmPassword(t,e){const{password:n,confirm_password:r}=t,{confirm_password:s,password:o}=e;if(!n&&!r)return null;if((n||r)&&n!==r&&(s&&o||n?.length>=6&&r?.length>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(t,e){},async validateRequiredFieldsForAuthMethod(t){const e=t.__authMethod;if(!e)return null;if(e==="EMAIL_OTP"&&!t.email)return{email:"Email is required for Email OTP sign up"};if(e==="SMS_OTP"&&!t.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(e==="PASSWORD"){const n={};return t.password||(n.password="Password is required"),t.confirm_password||(n.confirm_password="Confirm Password is required"),Object.keys(n).length>0?n:null}return null}};function gre({services:t}){return Jc({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleResetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...ep,sendUpdate:Cy()},guards:Ly,services:{handleResetPassword({username:e}){return t.handleForgotPassword({username:e})},handleConfirmResetPassword({formValues:e,username:n}){const{confirmation_code:r,password:s}=e;return t.handleForgotPasswordSubmit({confirmationCode:r,newPassword:s,username:n})},validateFields(e){return Uy(e.formValues,e.touched,e.passwordSettings,[Da.validateFormPassword,Da.validateConfirmPassword])}}})}const I9=t=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:t},onError:{actions:"setRemoteError",target:t}}}),mre=t=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t)?"mfa_type":t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",Km={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode","setAllowedMfaTypes","setCodeDeliveryDetails"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},qg=t=>({initial:"edit",exit:t,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"},RESEND:{target:"resend"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...Km}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function vre({services:t}){return Jc({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:"shouldSetupEmail",target:"setupEmail"},{cond:"shouldSelectMfaType",target:"selectMfaType"},{cond:({step:e})=>e==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...I9("signIn")},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await uT();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistration",target:"#signInActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}]},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SHOW_AUTH_METHODS:{actions:"setUsernameSignIn",target:"selectMethod"},SUBMIT:[{cond:"shouldSelectAuthMethod",actions:"handleSubmit",target:"selectMethod"},{actions:"handleSubmit",target:"submit"}]}},selectMethod:{entry:["sendUpdate","setSelectAuthMethodStep","setUsernameSignIn"],on:{SELECT_METHOD:{actions:"setSelectedAuthMethod",target:"submit"},SUBMIT:{actions:["handleSubmit","setSelectedAuthMethodFromForm"],target:"submit"},SIGN_IN:{target:"edit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",onDone:Km.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},Km.onError]}}}},confirmSignIn:{...qg(["clearChallengeName","clearFormValues","clearError","clearTouched"])},forceChangePassword:{entry:"sendUpdate",type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...Km}}}}}},setupTotp:{...qg(["clearFormValues","clearError","clearTouched"])},setupEmail:{...qg(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...qg(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({codeDeliveryDetails:e.codeDeliveryDetails,remoteError:e.remoteError,step:e.step,unverifiedUserAttributes:e.unverifiedUserAttributes,username:e.username})}}},{actions:{...ep,sendUpdate:Cy()},guards:Ly,services:{async fetchUserAttributes(){return f9()},resetPassword({username:e}){return o9({username:e})},handleResendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},resendSignInCode({username:e,selectedAuthMethod:n,availableAuthMethods:r,preferredChallenge:s}){const o=n??s??r?.[0]??"PASSWORD";return t.handleSignIn({username:e,options:{authFlowType:"USER_AUTH",preferredChallenge:o}})},handleSignIn({formValues:e,username:n,selectedAuthMethod:r,availableAuthMethods:s,preferredChallenge:o}){const a=r??o??s?.[0]??"PASSWORD";if(a==="PASSWORD"){const{password:u}=e;return t.handleSignIn({username:n,password:u})}else return t.handleSignIn({username:n,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},confirmSignIn({formValues:e,step:n}){const r=mre(n),{[r]:s}=e;return t.handleConfirmSignIn({challengeResponse:s})},async handleForceChangePassword({formValues:e}){let{password:n,phone_number:r,country_code:s,confirm_password:o,username:a,...u}=e,c;return r&&(c=`${s}${r}`.replace(/[^A-Z0-9+]/gi,""),u={...u,phone_number:c}),i9({challengeResponse:n,options:{userAttributes:u}})},signInWithRedirect(e,{data:n}){return d9(n)},async validateFields(e){return Uy(e.formValues,e.touched,e.passwordSettings,[Da.validateFormPassword,Da.validateConfirmPassword])}}})}const yre={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},bre={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode","setAllowedMfaTypes"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}};function Sre({services:t}){return Jc({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...bre}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await uT();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistrationAfterSignup",target:"#signUpActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}]},federatedSignIn:{...I9("signUp")},resetPassword:{invoke:{src:"resetPassword",...yre}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"],target:"#signUpActor.confirmSignUp"}]}},signUp:{type:"parallel",exit:"clearTouched",on:{FEDERATED_SIGN_IN:{target:"federatedSignIn"}},states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{BLUR:{actions:"handleBlur",target:".pending"},CHANGE:{actions:"handleInput",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:["sendUpdate"],on:{SUBMIT:{actions:["setSelectedAuthMethodFromForm","handleSubmit"],target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"handleSignUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},handleSignUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{cond:"shouldManualSignIn",actions:["clearFormValues","setSignInStep"],target:"#signUpActor.resolved"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},passkeyPrompt:{entry:"sendUpdate",on:{SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({challengeName:e.challengeName,missingAttributes:e.missingAttributes,remoteError:e.remoteError,step:e.step,totpSecretCode:e.totpSecretCode,username:e.username,unverifiedUserAttributes:e.unverifiedUserAttributes,allowedMfaTypes:e.allowedMfaTypes})}}},{actions:{...ep,sendUpdate:Cy()},guards:Ly,services:{autoSignIn(){return oT()},async fetchUserAttributes(){return f9()},confirmSignUp({formValues:e,username:n}){const{confirmation_code:r}=e,s={username:n,confirmationCode:r};return t.handleConfirmSignUp(s)},resendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},signInWithRedirect(e,{data:n}){return d9(n)},handleSignUp(e){const{formValues:n,loginMechanisms:r,username:s,selectedAuthMethod:o,preferredChallenge:a}=e,u=r[0],f=xte(s,n,u,o??a);return t.handleSignUp(f)},async validateSignUp(e){return Uy(e.formValues,e.touched,e.passwordSettings,[t.validateFormPassword,t.validateConfirmPassword,t.validatePreferredUsername,t.validateRequiredFieldsForAuthMethod,t.validateCustomSignUp])}}})}const Ere=()=>Jc({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:"pending",invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>TJ()}});function Cre(){return Jc({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...ep,sendUpdate:Cy()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:t}}){return NJ({userAttributeKey:t})},async confirmVerifyUserAttribute({formValues:{confirmation_code:t},selectedUserAttribute:e}){return JQ({confirmationCode:t,userAttributeKey:e})},async validateFields(t){return Uy(t.formValues,t.touched,t.passwordSettings,[Da.validateFormPassword,Da.validateConfirmPassword])}}})}const Wg=(t,e)=>{const n=Tte(t.passwordlessCapabilities,t.config?.passwordless?.hiddenAuthMethods),r=t.config?.passwordless?.preferredAuthMethod??t.passwordlessCapabilities?.preferredChallenge;return{...t.actorDoneData,step:t?.actorDoneData?.step??e,formValues:{},touched:{},validationError:{},formFields:t.config?.formFields,loginMechanisms:t.config?.loginMechanisms,passwordSettings:t.config?.passwordSettings,signUpAttributes:t.config?.signUpAttributes,socialProviders:t.config?.socialProviders,availableAuthMethods:n,preferredChallenge:r,passwordless:t.config?.passwordless}},{choose:wre,stop:_re}=o8,Ef=t=>_re(t),xre={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},Are={always:{actions:"configure",target:"getConfig"}};function Tre(t){const{useNextWaitConfig:e,...n}=t??{};return Jc({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Da,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"setup"},onError:{target:"setup"}}},setup:{initial:"initConfig",states:{initConfig:e?Are:xre,getConfig:{invoke:{src:"getAmplifyConfig",onDone:[{actions:["applyAmplifyConfig","setHasSetup"],cond:"hasUser",target:"#authenticator.authenticated"},{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}]}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Ef("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SELECT_METHOD:{actions:"forwardToActor"},SHOW_AUTH_METHODS:{actions:"forwardToActor"},SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Ef("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Ef("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Ef("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Ef("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...ep,forwardToActor:wre([{cond:"hasActor",actions:YV(({actorRef:s})=>s)}]),setActorDoneData:Jo({actorDoneData:(s,o)=>({challengeName:o.data.challengeName,codeDeliveryDetails:o.data.codeDeliveryDetails,missingAttributes:o.data.missingAttributes,remoteError:o.data.remoteError,username:o.data.username,step:o.data.step,totpSecretCode:o.data.totpSecretCode,unverifiedUserAttributes:o.data.unverifiedUserAttributes,allowedMfaTypes:o.data.allowedMfaTypes})}),applyAmplifyConfig:Jo({passwordlessCapabilities:(s,{data:o})=>o.passwordlessCapabilities,config(s,{data:o}){const{loginMechanisms:a=o.loginMechanisms??[],signUpAttributes:u=o.signUpAttributes??[],socialProviders:c=o.socialProviders??[],initialState:f,formFields:p,passwordSettings:g=o.passwordFormat??{},passwordless:m}=s.config;return a.length===0&&a.push("username"),{formFields:Rre(p)??{},initialState:f,loginMechanisms:a,passwordSettings:g,passwordless:m,signUpAttributes:u,socialProviders:c}}}),spawnSignInActor:Jo({actorRef:(s,o)=>{const{services:a}=s,u=vre({services:a}).withContext(Wg(s,"SIGN_IN"));return bf(u,{name:"signInActor"})}}),spawnSignUpActor:Jo({actorRef:(s,o)=>{const{services:a}=s,u=Sre({services:a}).withContext(Wg(s,"SIGN_UP"));return bf(u,{name:"signUpActor"})}}),spawnForgotPasswordActor:Jo({actorRef:(s,o)=>{const{services:a}=s,u=gre({services:a}).withContext(Wg(s,"FORGOT_PASSWORD"));return bf(u,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:Jo({actorRef:s=>{const o=Cre().withContext(Wg(s));return bf(o,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:Jo({actorRef:s=>{const o=Ere().withContext({user:s?.user});return bf(o,{name:"signOutActor"})}}),configure:Jo((s,o)=>{const{services:a,...u}=m9(n)?o.data??{}:n;return{services:{...Da,...a},config:u}}),setHasSetup:Jo({hasSetup:!0})},guards:{...Ly,hasActor:({actorRef:s})=>!!s,isInitialStateSignUp:({config:s})=>s.initialState==="signUp",isInitialStateResetPassword:({config:s})=>s.initialState==="forgotPassword",shouldSetup:({hasSetup:s})=>!s,hasUser:({user:s})=>!!s},services:{getAmplifyConfig:({services:s})=>s.getAmplifyConfig(),handleGetCurrentUser:({services:s})=>s.getCurrentUser()}})}function Rre(t){return t&&Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{let r=t[e][n];r.required=r.isRequired})}),t}const Ire={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Ore={red:{10:{value:"hsl(0, 75%, 95%)"},20:{value:"hsl(0, 75%, 85%)"},40:{value:"hsl(0, 75%, 75%)"},60:{value:"hsl(0, 50%, 50%)"},80:{value:"hsl(0, 95%, 30%)"},90:{value:"hsl(0, 100%, 20%)"},100:{value:"hsl(0, 100%, 15%)"}},orange:{10:{value:"hsl(30, 75%, 95%)"},20:{value:"hsl(30, 75%, 85%)"},40:{value:"hsl(30, 75%, 75%)"},60:{value:"hsl(30, 50%, 50%)"},80:{value:"hsl(30, 95%, 30%)"},90:{value:"hsl(30, 100%, 20%)"},100:{value:"hsl(30, 100%, 15%)"}},yellow:{10:{value:"hsl(60, 75%, 95%)"},20:{value:"hsl(60, 75%, 85%)"},40:{value:"hsl(60, 75%, 75%)"},60:{value:"hsl(60, 50%, 50%)"},80:{value:"hsl(60, 95%, 30%)"},90:{value:"hsl(60, 100%, 20%)"},100:{value:"hsl(60, 100%, 15%)"}},green:{10:{value:"hsl(130, 60%, 95%)"},20:{value:"hsl(130, 60%, 90%)"},40:{value:"hsl(130, 44%, 63%)"},60:{value:"hsl(130, 43%, 46%)"},80:{value:"hsl(130, 33%, 37%)"},90:{value:"hsl(130, 27%, 29%)"},100:{value:"hsl(130, 22%, 23%)"}},teal:{10:{value:"hsl(190, 75%, 95%)"},20:{value:"hsl(190, 75%, 85%)"},40:{value:"hsl(190, 70%, 70%)"},60:{value:"hsl(190, 50%, 50%)"},80:{value:"hsl(190, 95%, 30%)"},90:{value:"hsl(190, 100%, 20%)"},100:{value:"hsl(190, 100%, 15%)"}},blue:{10:{value:"hsl(220, 95%, 95%)"},20:{value:"hsl(220, 85%, 85%)"},40:{value:"hsl(220, 70%, 70%)"},60:{value:"hsl(220, 50%, 50%)"},80:{value:"hsl(220, 95%, 30%)"},90:{value:"hsl(220, 100%, 20%)"},100:{value:"hsl(220, 100%, 15%)"}},purple:{10:{value:"hsl(300, 95%, 95%)"},20:{value:"hsl(300, 85%, 85%)"},40:{value:"hsl(300, 70%, 70%)"},60:{value:"hsl(300, 50%, 50%)"},80:{value:"hsl(300, 95%, 30%)"},90:{value:"hsl(300, 100%, 20%)"},100:{value:"hsl(300, 100%, 15%)"}},pink:{10:{value:"hsl(340, 95%, 95%)"},20:{value:"hsl(340, 90%, 85%)"},40:{value:"hsl(340, 70%, 70%)"},60:{value:"hsl(340, 50%, 50%)"},80:{value:"hsl(340, 95%, 30%)"},90:{value:"hsl(340, 100%, 20%)"},100:{value:"hsl(340, 100%, 15%)"}},neutral:{10:{value:"hsl(210, 5%, 98%)"},20:{value:"hsl(210, 5%, 94%)"},40:{value:"hsl(210, 5%, 87%)"},60:{value:"hsl(210, 10%, 58%)"},80:{value:"hsl(210, 10%, 40%)"},90:{value:"hsl(210, 25%, 25%)"},100:{value:"hsl(210, 50%, 10%)"}},primary:{10:{value:"{colors.teal.10.value}"},20:{value:"{colors.teal.20.value}"},40:{value:"{colors.teal.40.value}"},60:{value:"{colors.teal.60.value}"},80:{value:"{colors.teal.80.value}"},90:{value:"{colors.teal.90.value}"},100:{value:"{colors.teal.100.value}"}},secondary:{10:{value:"{colors.purple.10.value}"},20:{value:"{colors.purple.20.value}"},40:{value:"{colors.purple.40.value}"},60:{value:"{colors.purple.60.value}"},80:{value:"{colors.purple.80.value}"},90:{value:"{colors.purple.90.value}"},100:{value:"{colors.purple.100.value}"}},font:{primary:{value:"{colors.neutral.100.value}"},secondary:{value:"{colors.neutral.90.value}"},tertiary:{value:"{colors.neutral.80.value}"},disabled:{value:"{colors.neutral.60.value}"},inverse:{value:"{colors.white.value}"},interactive:{value:"{colors.primary.80.value}"},hover:{value:"{colors.primary.90.value}"},focus:{value:"{colors.primary.100.value}"},active:{value:"{colors.primary.100.value}"},info:{value:"{colors.blue.90.value}"},warning:{value:"{colors.orange.90.value}"},error:{value:"{colors.red.90.value}"},success:{value:"{colors.green.90.value}"}},background:{primary:{value:"{colors.white.value}"},secondary:{value:"{colors.neutral.10.value}"},tertiary:{value:"{colors.neutral.20.value}"},quaternary:{value:"{colors.neutral.60.value}"},disabled:{value:"{colors.background.tertiary.value}"},info:{value:"{colors.blue.10.value}"},warning:{value:"{colors.orange.10.value}"},error:{value:"{colors.red.10.value}"},success:{value:"{colors.green.10.value}"}},border:{primary:{value:"{colors.neutral.60.value}"},secondary:{value:"{colors.neutral.40.value}"},tertiary:{value:"{colors.neutral.20.value}"},disabled:{value:"{colors.border.tertiary.value}"},pressed:{value:"{colors.primary.100.value}"},focus:{value:"{colors.primary.100.value}"},error:{value:"{colors.red.80.value}"},info:{value:"{colors.blue.80.value}"},success:{value:"{colors.green.80.value}"},warning:{value:"{colors.orange.80.value}"}},shadow:{primary:{value:"hsla(210, 50%, 10%, 0.25)"},secondary:{value:"hsla(210, 50%, 10%, 0.15)"},tertiary:{value:"hsla(210, 50%, 10%, 0.05)"}},overlay:{5:{value:"hsla(0, 0%, 0%, 0.05)"},10:{value:"hsla(0, 0%, 0%, 0.1)"},20:{value:"hsla(0, 0%, 0%, 0.2)"},30:{value:"hsla(0, 0%, 0%, 0.3)"},40:{value:"hsla(0, 0%, 0%, 0.4)"},50:{value:"hsla(0, 0%, 0%, 0.5)"},60:{value:"hsla(0, 0%, 0%, 0.6)"},70:{value:"hsla(0, 0%, 0%, 0.7)"},80:{value:"hsla(0, 0%, 0%, 0.8)"},90:{value:"hsla(0, 0%, 0%, 0.9)"}},black:{value:"hsl(0, 0%, 0%)"},white:{value:"hsl(0, 0%, 100%)"},transparent:{value:"transparent"}},Nre={alignItems:{value:"center"},justifyContent:{value:"space-between"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}}},Mre={message:{backgroundColor:{value:"{colors.background.secondary.value}"},borderRadius:{value:"{radii.large.value}"},gap:{value:"{space.small.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.small.value}"},user:{backgroundColor:{value:"{colors.background.secondary.value}"}},assistant:{backgroundColor:{value:"{colors.primary.10.value}"}},sender:{gap:{value:"{space.small.value}"},username:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"{fontWeights.bold.value}"}},timestamp:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"inherit"}}},body:{gap:{value:"{space.xs.value}"}},actions:{gap:{value:"{space.xs.value}"}}},form:{gap:{value:"{space.small.value}"},padding:{value:"{space.small.value}"}},attachment:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},fontSize:{value:"{fontSizes.small.value}"},paddingBlock:{value:"{space.xxxs.value}"},paddingInline:{value:"{space.xs.value}"},gap:{value:"{space.xs.value}"},list:{padding:{value:"{space.xs.value}"},paddingBlockStart:{value:"0"},gap:{value:"{space.xxs.value}"}},name:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},size:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},remove:{padding:{value:"{space.xxs.value}"}},image:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}}}},Pre={menu:{width:{value:"100%"},marginBlockStart:{value:"{space.xxxs}"},backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small}"},options:{display:{value:"flex"},flexDirection:{value:"column"},maxHeight:{value:"300px"}},option:{backgroundColor:{value:"{colors.background.primary}"},color:{value:"currentcolor"},cursor:{value:"pointer"},transitionDuration:{value:"{time.short}"},transitionProperty:{value:"background-color, color"},transitionTimingFunction:{value:"ease"},_active:{backgroundColor:{value:"{colors.primary.80}"},color:{value:"{colors.white}"}}},_empty:{display:{value:"flex"}},_loading:{alignItems:{value:"center"},display:{value:"flex"},gap:{value:"{space.xxxs}"}},spaceShared:{paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"}}}},kre={maxWidth:{value:"60rem"},modal:{width:{value:"{space.relative.full}"},height:{value:"{space.relative.full}"},backgroundColor:{value:"{colors.overlay.50.value}"},top:{value:"{space.zero}"},left:{value:"{space.zero}"}},container:{widthMax:{value:"30rem"}},router:{borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.medium.value}"}},footer:{paddingBottom:{value:"{space.medium.value}"}},form:{padding:{value:"{space.xl.value}"}},state:{inactive:{backgroundColor:{value:"{colors.background.secondary.value}"}}},orContainer:{color:{value:"{colors.neutral.80.value}"},orLine:{backgroundColor:{value:"{colors.background.primary.value}"}}}},Dre={color:{value:"{colors.font.tertiary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},width:{value:"{fontSizes.xxl.value}"},height:{value:"{fontSizes.xxl.value}"},backgroundColor:{value:"{colors.background.tertiary}"},borderRadius:{value:"100%"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"{colors.border.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"{colors.border.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"{colors.border.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"{colors.border.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},width:{value:"{fontSizes.xl.value}"},height:{value:"{fontSizes.xl.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}}},Lre={color:{value:"{colors.font.primary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},paddingVertical:{value:"{space.xs.value}"},paddingHorizontal:{value:"{space.small.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderRadius:{value:"{radii.xl.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},paddingVertical:{value:"{space.xxs.value}"},paddingHorizontal:{value:"{space.xs.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"}}},Ure={flexDirection:{value:"row"},flexWrap:{value:"wrap"},gap:{value:"0"},color:{value:"{colors.font.tertiary}"},item:{flexDirection:{value:"row"},color:{value:"inherit"},fontSize:{value:"inherit"},alignItems:{value:"center"},lineHeight:{value:"1"}},separator:{color:{value:"inherit"},fontSize:{value:"inherit"},paddingInline:{value:"{space.xxs}"}},link:{color:{value:"{components.link.color}"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"},paddingInline:{value:"{space.xs}"},paddingBlock:{value:"{space.xxs}"},current:{color:{value:"inherit"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"}}}},Fre={fontWeight:{value:"{fontWeights.bold.value}"},transitionDuration:{value:"{components.fieldcontrol.transitionDuration.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},lineHeight:{value:"{components.fieldcontrol.lineHeight.value}"},paddingBlockStart:{value:"{components.fieldcontrol.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.paddingInlineEnd.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},borderWidth:{value:"{components.fieldcontrol.borderWidth.value}"},borderStyle:{value:"{components.fieldcontrol.borderStyle.value}"},borderRadius:{value:"{components.fieldcontrol.borderRadius.value}"},color:{value:"{colors.font.primary.value}"},_hover:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.primary.60.value}"}},_focus:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{color:{value:"{colors.font.active.value}"},backgroundColor:{value:"{colors.primary.20.value}"},borderColor:{value:"{colors.primary.100.value}"}},_loading:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},outlined:{info:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"}},_focus:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"}},_focus:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"}},_focus:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"}},_focus:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_hover:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"}},_focus:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.neutral.100.value}"}}}},primary:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.font.inverse.value}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.100.value}"},color:{value:"{colors.font.inverse.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.100.value}"},color:{value:"{colors.font.inverse.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.100.value}"},color:{value:"{colors.font.inverse.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100.value}"},color:{value:"{colors.font.inverse.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.100.value}"},color:{value:"{colors.font.inverse.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.70}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}}}},menu:{borderWidth:{value:"{space.zero.value}"},backgroundColor:{value:"transparent"},justifyContent:{value:"start"},_hover:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_focus:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_active:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.90.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"}}},link:{backgroundColor:{value:"transparent"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.interactive.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.hover.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.20.value}"},color:{value:"{colors.font.active.value}"}},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.neutral.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.80.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.overlay.90.value}"}}}},warning:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.red.60}"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.red.60}"},_hover:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.font.error}"}},_focus:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.red.80}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"{colors.red.100}"},backgroundColor:{value:"{colors.red.20}"},color:{value:"{colors.red.100}"}},_disabled:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}}},destructive:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.red.60}"},color:{value:"{colors.font.inverse}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100}"},color:{value:"{colors.font.inverse}"}}},small:{fontSize:{value:"{components.fieldcontrol.small.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.small.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.small.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.small.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.small.paddingInlineEnd.value}"}},large:{fontSize:{value:"{components.fieldcontrol.large.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.large.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.large.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.large.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.large.paddingInlineEnd.value}"}},loaderWrapper:{alignItems:{value:"center"},gap:{value:"{space.xs.value}"}}},zre={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"none"},padding:{value:"{space.medium.value}"},outlined:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{components.card.boxShadow.value}"}},elevated:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"{shadows.medium.value}"}}},Bre={cursor:{value:"pointer"},alignItems:{value:"center"},_disabled:{cursor:{value:"not-allowed"}},button:{position:{value:"relative"},alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},before:{width:{value:"100%"},height:{value:"100%"},borderWidth:{value:"{borderWidths.medium.value}"},borderRadius:{value:"20%"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"}},_focus:{outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{borderColor:{value:"{colors.border.error.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},icon:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"20%"},opacity:{value:"{opacities.0.value}"},transform:{value:"scale(0)"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.short.value}"},transitionTimingFunction:{value:"ease-in-out"},_checked:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},_indeterminate:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},jre={alignItems:{value:"flex-start"},alignContent:{value:"center"},flexDirection:{value:"column"},justifyContent:{value:"center"}},Hre={pagination:{current:{color:{value:"{components.pagination.current.color}"},backgroundColor:{value:"{components.pagination.current.backgroundColor}"}},button:{color:{value:"{components.pagination.button.color}"},_hover:{backgroundColor:{value:"{components.pagination.button.hover.backgroundColor}"},color:{value:"{components.pagination.button.hover.color}"}},_disabled:{color:{value:"{components.pagination.button.disabled.color}"}}}},search:{input:{color:{value:"{components.searchfield.color}"}},button:{color:{value:"{components.searchfield.button.color}"},_active:{backgroundColor:{value:"{components.searchfield.button._active.backgroundColor}"},borderColor:{value:"{components.searchfield.button._active.borderColor}"},color:{value:"{components.searchfield.button._active.color}"}},_disabled:{backgroundColor:{value:"{components.searchfield.button._disabled.backgroundColor}"},borderColor:{value:"{components.searchfield.button._disabled.borderColor}"},color:{value:"{components.searchfield.button._disabled.color}"}},_focus:{backgroundColor:{value:"{components.searchfield.button._focus.backgroundColor}"},borderColor:{value:"{components.searchfield.button._focus.borderColor}"},color:{value:"{components.searchfield.button._focus.color}"}},_hover:{backgroundColor:{value:"{components.searchfield.button._hover.backgroundColor}"},borderColor:{value:"{components.searchfield.button._hover.borderColor}"},color:{value:"{components.searchfield.button._hover.color}"}}}}},$re={fontSize:{value:"{fontSizes.xs}"},gap:{value:"{space.relative.medium}"},svg:{path:{fill:{value:"{colors.font.primary}"}}},toolTip:{bottom:{value:"{space.large}"},color:{value:"{colors.teal.100}"},fontSize:{value:"{fontSizes.xxs}"}}},qre={height:{value:"{space.relative.full.value}"}},Wre={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},label:{color:{value:"{colors.font.tertiary.value}"},paddingInline:{value:"{space.medium.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.background.primary.value}"}},small:{borderWidth:{value:"{borderWidths.small.value}"}},large:{borderWidth:{value:"{borderWidths.large.value}"}},opacity:{value:"{opacities.60.value}"}},Gre={backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.font.primary}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.primary}"}},_disabled:{backgroundColor:{value:"{colors.background.disabled}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.disabled}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.disabled}"}},accepted:{backgroundColor:{value:"{colors.background.success}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.success}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.success}"}},rejected:{backgroundColor:{value:"{colors.background.error}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.error}"}}},Vre={backgroundColor:{value:"{colors.background.primary.value}"},item:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small.value}"},trigger:{alignItems:{value:"center"},backgroundColor:{value:"{colors.background.primary.value}"},color:{value:"inherit"},gap:{value:"{space.small.value}"},justifyContent:{value:"space-between"},paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},_hover:{color:{value:"inherit"},backgroundColor:{value:"{colors.overlay.5.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0",offsetY:"0",blurRadius:"0",spreadRadius:"2px",color:"{colors.border.focus.value}"}}}},content:{color:{value:"inherit"},paddingInline:{value:"{space.small.value}"},paddingBlockEnd:{value:"{space.small.value}"},paddingBlockStart:{value:"{space.xxxs.value}"}},icon:{color:{value:"{colors.font.tertiary.value}"},transitionDuration:{value:"{time.medium.value}"},transitionTimingFunction:{value:"cubic-bezier(0.87, 0, 0.13, 1)"}}}},Kre={gap:{value:"{space.xs.value}"},fontSize:{value:"{fontSizes.medium.value}"},flexDirection:{value:"column"},small:{gap:{value:"{space.xxxs.value}"},fontSize:{value:"{fontSizes.small.value}"}},large:{gap:{value:"{space.small.value}"},fontSize:{value:"{fontSizes.large.value}"}},label:{color:{value:"{colors.font.secondary.value}"}}},Yre={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},color:{value:"{colors.font.primary.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"},fontSize:{value:"{components.field.fontSize.value}"},lineHeight:{value:"{lineHeights.medium.value}"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},small:{fontSize:{value:"{components.field.small.fontSize.value}"},paddingBlockStart:{value:"{space.xxs.value}"},paddingBlockEnd:{value:"{space.xxs.value}"},paddingInlineStart:{value:"{space.small.value}"},paddingInlineEnd:{value:"{space.small.value}"}},large:{fontSize:{value:"{components.field.large.fontSize.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}},quiet:{borderStyle:{value:"none"},borderInlineStart:{value:"none"},borderInlineEnd:{value:"none"},borderBlockStart:{value:"none"},borderRadius:{value:"0"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderBlockEndColor:{value:"{colors.border.error.value}"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.focus.value}"}}},_disabled:{color:{value:"{colors.font.disabled.value}"},cursor:{value:"not-allowed"},borderColor:{value:"{colors.transparent.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},color:{value:"{colors.font.error.value}"},_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.error.value}"}}}},info:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.blue.100.value}"}}}},warning:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.orange.100.value}"}}}},success:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.green.100.value}"}}}},overlay:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.overlay.90.value}"}}}}},Zre={gap:{value:"{space.zero.value}"},vertical:{alignItems:{value:"center"}},outer:{alignItems:{value:"center"}}},Xre={backgroundColor:{value:"transparent"},borderRadius:{value:"{radii.xs.value}"},flexDirection:{value:"column"},gap:{value:"{components.field.gap.value}"},legend:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{components.field.fontSize.value}"},fontWeight:{value:"{fontWeights.bold.value}"},lineHeight:{value:"{lineHeights.medium.value}"},small:{fontSize:"{components.field.small.fontSize.value}"},large:{fontSize:"{components.field.large.fontSize.value}"}},outlined:{padding:"{space.medium.value}",borderColor:"{colors.neutral.40.value}",borderWidth:"{borderWidths.small.value}",borderStyle:"solid",small:{padding:"{space.small.value}"},large:{padding:"{space.large.value}"}},small:{gap:"{components.field.small.gap.value}"},large:{gap:"{components.field.large.gap.value}"}},Qre={error:{color:{value:"{colors.font.error.value}"},fontSize:{value:"{fontSizes.small.value}"}},description:{color:{value:"{colors.font.secondary.value}"},fontStyle:{value:"italic"},fontSize:{value:"{fontSizes.small.value}"}}},Jre={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.fileuploader.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.fileuploader.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},ese={gap:{value:"{space.medium.value}"},justifyContent:{value:"normal"},alignItems:{value:"stretch"},alignContent:{value:"normal"},flexWrap:{value:"nowrap"}},tse={color:{value:"{colors.font.primary.value}"},lineHeight:{value:"{lineHeights.small.value}"},1:{fontSize:{value:"{fontSizes.xxxxl.value}"},fontWeight:{value:"{fontWeights.light.value}"}},2:{fontSize:{value:"{fontSizes.xxxl.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},3:{fontSize:{value:"{fontSizes.xxl.value}"},fontWeight:{value:"{fontWeights.medium.value}"}},4:{fontSize:{value:"{fontSizes.xl.value}"},fontWeight:{value:"{fontWeights.semibold.value}"}},5:{fontSize:{value:"{fontSizes.large.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},6:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},nse={highlighted:{fontWeight:{value:"{fontWeights.bold}"}}},rse={lineHeight:{value:1},height:{value:"1em"}},sse={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},ose={maxWidth:{value:"100%"},height:{value:"auto"},objectFit:{value:"initial"},objectPosition:{value:"initial"}},ise={banner:{height:{value:"150px "},width:{value:"400px "}},button:{backgroundColor:{value:"#e8e8e8"},borderRadius:{value:"5px"},color:{value:"black"}},dialog:{height:{value:"50vh"},minHeight:{value:"400px"},minWidth:{value:"400px"},width:{value:"30vw"}},header:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},ase={active:{color:{value:"{colors.font.active.value}"}},color:{value:"{colors.font.interactive.value}"},focus:{color:{value:"{colors.font.focus.value}"}},hover:{color:{value:"{colors.font.hover.value}"}},visited:{color:{value:"{colors.font.interactive.value}"}}},lse={cameraModule:{backgroundColor:{value:"{colors.background.primary.value}"}}},use={width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},fontSize:{value:"{fontSizes.xs.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"},fontSize:{value:"{fontSizes.xxs.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"},fontSize:{value:"{fontSizes.small.value}"}},linear:{width:{value:"100%"},minWidth:{value:"5rem"},fontSize:{value:"{fontSizes.xxs.value}"},strokeWidth:{value:"{fontSizes.xxs.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{strokeWidth:{value:"{fontSizes.xxxs.value}"},fontSize:{value:"{fontSizes.xxxs.value}"}},large:{strokeWidth:{value:"{fontSizes.xs.value}"},fontSize:{value:"{fontSizes.xs.value}"}}},text:{fill:{value:"{colors.font.primary.value}"}}},cse={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.medium.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{shadows.large.value}"},flexDirection:{value:"column"},gap:{value:"{space.zero.value}"},maxWidth:{value:"30rem"},minWidth:{value:"14rem"},small:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}},large:{width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}},item:{minHeight:{value:"2.5rem"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}}},dse={alignItems:{value:"center"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderColor:{value:"transparent"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.xs.value}"},color:{value:"{colors.font.primary.value}"},justifyContent:{value:"flex-start"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},lineHeight:{value:"{lineHeights.small.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},dismiss:{gap:{value:"{space.xxs.value}"}},plain:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}}},outlined:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.primary.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.error.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.success.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.warning.value}"}}},filled:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.secondary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"transparent"}}}},fse={current:{alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.overlay.40.value}"}},button:{color:{value:"{colors.font.primary.value}"},paddingInlineStart:{value:"{space.xxs.value}"},paddingInlineEnd:{value:"{space.xxs.value}"},transitionProperty:{value:"background-color"},transitionDuration:{value:"{time.medium.value}"},hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},disabled:{color:{value:"{colors.font.disabled.value}"}}},ellipsis:{alignItems:{value:"baseline"},justifyContent:{value:"center"},paddingInlineStart:{value:"{space.xs.value}"},paddingInlineEnd:{value:"{space.xs.value}"}},itemContainer:{marginLeft:{value:"{space.xxxs.value}"},marginRight:{value:"{space.xxxs.value}"}},itemShared:{height:{value:"{fontSizes.xxl.value}"},minWidth:{value:"{fontSizes.xxl.value}"},borderRadius:{value:"{fontSizes.medium.value}"}}},hse={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_error:{color:{value:"{components.button.outlined.error.color.value}"},backgroundColor:{value:"{components.button.outlined.error.backgroundColor.value}"},borderColor:{value:"{components.button.outlined.error.borderColor.value}"},_active:{borderColor:{value:"{components.button.outlined.error._active.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._active.backgroundColor.value}"},color:{value:"{components.button.outlined.error._active.color.value}"}},_focus:{borderColor:{value:"{components.button.outlined.error._focus.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._focus.backgroundColor.value}"},color:{value:"{components.button.outlined.error._focus.color.value}"},boxShadow:{value:"{components.button.outlined.error._focus.boxShadow.value}"}},_hover:{borderColor:{value:"{components.button.outlined.error._hover.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._hover.backgroundColor.value}"},color:{value:"{components.button.outlined.error._hover.color.value}"}}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},pse={color:{value:"{components.fieldcontrol.color}"},borderColor:{value:"{components.fieldcontrol.borderColor}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}}},gse={borderRadius:{value:"{radii.small.value}"},transitionDuration:{value:"{time.long.value}"},startColor:{value:"{colors.background.secondary.value}"},endColor:{value:"{colors.background.tertiary.value}"},small:{height:{value:"{space.small.value}"}},default:{height:{value:"{space.medium.value}"}},large:{height:{value:"{space.large.value}"}}},mse={alignItems:{value:"center"},justifyContent:{value:"flex-start"},gap:{value:"inherit"},_disabled:{cursor:{value:"not-allowed"}},button:{alignItems:{value:"center"},justifyContent:{value:"center"},width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},boxSizing:{value:"border-box"},borderWidth:{value:"{borderWidths.medium.value}"},borderStyle:{value:"solid"},borderRadius:{value:"50%"},borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.background.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},padding:{value:"{borderWidths.medium.value}"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"}},_checked:{color:{value:"{colors.primary.80.value}"},_disabled:{color:{value:"{colors.background.disabled.value}"}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.primary.value}"}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},vse={radio:{borderWidth:{value:"{components.radio.button.borderWidth}"},borderColor:{value:"{components.radio.button.borderColor}"},backgroundColor:{value:"{components.radio.button.backgroundColor}"},_checked:{color:{value:"{components.radio.button._checked.color}"}},label:{color:{value:"{components.radio.label.color}"}}},legend:{color:{value:"{components.fieldset.legend.color}"},fontWeight:{value:"{fontWeights.normal}"}}},yse={large:{size:{value:"{fontSizes.xxxl.value}"}},default:{size:{value:"{fontSizes.xl.value}"}},small:{size:{value:"{fontSizes.small.value}"}},filled:{color:{value:"{colors.secondary.80.value}"}},empty:{color:{value:"{colors.background.tertiary.value}"}}},bse={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},backgroundColor:{value:"{colors.background.primary.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},Sse={color:{value:"{components.fieldcontrol.color}"},backgroundColor:{value:"{colors.background.primary.value}"},paddingInlineEnd:{value:"{space.xxl.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},wrapper:{flex:{value:"1"},display:{value:"block"},position:{value:"relative"},cursor:{value:"pointer"}},iconWrapper:{alignItems:{value:"center"},position:{value:"absolute"},top:{value:"50%"},right:{value:"{space.medium.value}"},transform:{value:"translateY(-50%)"},pointerEvents:{value:"none"},small:{right:{value:"{space.xs.value}"}},large:{right:{value:"{space.medium.value}"}}},option:{backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"}}},whiteSpace:{value:"nowrap"},minWidth:{value:"6.5rem"},small:{minWidth:{value:"5.5rem"},paddingInlineEnd:{value:"{space.xl.value}"}},large:{minWidth:{value:"7.5rem"},paddingInlineEnd:{value:"{space.xxl.value}"}},expanded:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},option:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"}}}},Ese={borderColor:{value:"{components.fieldcontrol.borderColor}"},color:{value:"{components.fieldcontrol.color}"},flexDirection:{value:"column"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}},label:{color:{value:"{components.field.label.color}"}}},Cse={paddingBlock:{value:"{space.xs.value}"},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"9999px"},height:{value:"0.375rem"},minWidth:{value:"10rem"}},range:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"9999px"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},thumb:{width:{value:"1.25rem"},height:{value:"1.25rem"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.small.value}"},borderRadius:{value:"50%"},borderWidth:{value:"{borderWidths.medium.value}"},borderColor:{value:"{colors.border.primary.value}"},borderStyle:{value:"solid"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"},borderColor:{value:"transparent"},boxShadow:{value:"none"}},_hover:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.focus.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}}},small:{track:{height:{value:"0.25rem"}},thumb:{width:{value:"1rem"},height:{value:"1rem"}}},large:{track:{height:{value:"0.625rem"}},thumb:{width:{value:"1.5rem"},height:{value:"1.5rem"}}}},wse={borderColor:{value:"{components.fieldcontrol.borderColor}"},flexDirection:{value:"column"},input:{color:{value:"{components.fieldcontrol.color}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},textAlign:{value:"center"}},button:{color:{value:"{components.button.color}"},backgroundColor:{value:"{colors.transparent}"},_active:{color:{value:"{components.button._active.color}"},backgroundColor:{value:"{components.button._active.backgroundColor}"}},_focus:{color:{value:"{components.button._focus.color}"},backgroundColor:{value:"{components.button._focus.backgroundColor}"}},_disabled:{color:{value:"{components.button._disabled.color}"},backgroundColor:{value:"{components.fieldcontrol._disabled.backgroundColor}"}},_hover:{color:{value:"{components.button._hover.color}"},backgroundColor:{value:"{components.button._hover.backgroundColor}"}}}},_se={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.storagemanager.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.storagemanager.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},xse={_disabled:{opacity:{value:"{opacities.60.value}"}},_focused:{shadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},fontSize:{value:"{fontSizes.medium.value}"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}},label:{padding:{value:"{space.xs.value}"}},thumb:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.xxxl.value}"},checked:{transform:{value:"{transforms.slideX.medium.value}"}},transition:{duration:{value:"{time.medium.value}"}},width:{value:"{space.relative.medium.value}"}},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"{radii.xxxl.value}"},checked:{backgroundColor:{value:"{colors.primary.80.value}"}},height:{value:"{space.relative.medium.value}"},padding:{value:"{outlineWidths.medium.value}"},transition:{duration:{value:"{time.short.value}"}},width:{value:"{space.relative.xl.value}"},_error:{backgroundColor:{value:"{colors.background.error.value}"}}}},Ase={borderCollapse:{value:"collapse"},display:{value:"table"},width:{value:"100%"},head:{display:{value:"table-header-group"},verticalAlign:{value:"middle"}},body:{display:{value:"table-row-group"},verticalAlign:{value:"middle"}},foot:{display:{value:"table-footer-group"},verticalAlign:{value:"middle"}},row:{display:{value:"table-row"},verticalAlign:{value:"middle"},hover:{backgroundColor:{value:"{colors.background.tertiary.value}"}},striped:{backgroundColor:{value:"{colors.background.secondary.value}"}}},header:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},data:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.normal.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},caption:{captionSide:{value:"bottom"},color:{value:"{colors.font.primary.value}"},display:{value:"table-caption"},fontSize:{value:"{fontSizes.medium.value}"},textAlign:{value:"center"},wordBreak:{value:"break-all"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}}}},Tse={backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},gap:{value:"0"},item:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},color:{value:"{colors.font.secondary.value}"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"},textAlign:{value:"center"},transitionDuration:{value:"{time.medium.value}"},_hover:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.hover.value}"}},_focus:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"{borderWidths.medium}",color:"{colors.border.focus.value}"}},color:{value:"{colors.font.focus.value}"}},_active:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.font.interactive.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.interactive.value}"}},_disabled:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.disabled.value}"}}},panel:{backgroundColor:{value:"transparent"},paddingInline:{value:"0"},paddingBlock:{value:"{space.small.value}"}}},Rse={color:{value:"{colors.font.primary.value}"},primary:{color:{value:"{colors.font.primary.value}"}},secondary:{color:{value:"{colors.font.secondary.value}"}},tertiary:{color:{value:"{colors.font.tertiary.value}"}},error:{color:{value:"{colors.font.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"}},success:{color:{value:"{colors.font.success.value}"}},info:{color:{value:"{colors.font.info.value}"}}},Ise={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Ose={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Nse={borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.font.primary.value}"},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.font.primary.value}"}},_active:{backgroundColor:{value:"{colors.transparent.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},borderColor:{value:"{colors.border.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{borderColor:{value:"{colors.border.pressed.value}"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.overlay.20.value}"},_hover:{backgroundColor:{value:"{colors.overlay.30.value}"}}},primary:{backgroundColor:{value:"{colors.transparent.value}"},borderWidth:{value:"{borderWidths.small.value}"},_focus:{borderColor:{value:"{colors.border.focus.value}"},backgroundColor:{value:"{colors.transparent.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"},color:{value:"{colors.font.primary.value}"}},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.primary.80.value}"},borderColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.background.primary.value}"},_focus:{backgroundColor:{value:"{colors.border.focus.value}"},borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.background.primary.value}"}},_hover:{borderColor:{value:"{colors.primary.60.value}"},backgroundColor:{value:"{colors.primary.60.value}"},boxShadow:{value:"{colors.primary.60.value}"},color:{value:"{colors.background.primary.value}"}}}},link:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"},_hover:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"}},_hover:{color:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.transparent.value}"}}}}},Mse={alignItems:{value:"center"},alignContent:{value:"center"},justifyContent:{value:"flex-start"}},Pse={accordion:Vre,aiConversation:Mre,alert:Nre,authenticator:kre,autocomplete:Pre,avatar:Dre,badge:Lre,breadcrumbs:Ure,button:Fre,card:zre,checkbox:Bre,checkboxfield:jre,collection:Hre,copy:$re,countrycodeselect:qre,divider:Wre,dropzone:Gre,field:Kre,fieldcontrol:Yre,fieldgroup:Zre,fieldmessages:Qre,fieldset:Xre,fileuploader:Jre,flex:ese,heading:tse,icon:rse,highlightmatch:nse,image:ose,inappmessaging:ise,input:sse,link:ase,liveness:lse,loader:use,menu:cse,message:dse,pagination:fse,passwordfield:hse,phonenumberfield:pse,placeholder:gse,radio:mse,radiogroup:vse,rating:yse,searchfield:bse,select:Sse,selectfield:Ese,sliderfield:Cse,stepperfield:wse,storagemanager:_se,switchfield:xse,table:Ase,tabs:Tse,text:Rse,textareafield:Ise,textfield:Ose,togglebutton:Nse,togglebuttongroup:Mse},kse={default:{variable:{value:`'InterVariable', 'Inter var', 'Inter', -apple-system, BlinkMacSystemFont,
24
- 'Helvetica Neue', 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans',
25
- sans-serif`},static:{value:`'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
26
- 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif`}}},ni={xxxs:{value:"0.375rem"},xxs:{value:"0.5rem"},xs:{value:"0.75rem"},small:{value:"0.875rem"},medium:{value:"1rem"},large:{value:"1.25rem"},xl:{value:"1.5rem"},xxl:{value:"2rem"},xxxl:{value:"2.5rem"},xxxxl:{value:"3rem"}},Dse={hairline:{value:100},thin:{value:200},light:{value:300},normal:{value:400},medium:{value:500},semibold:{value:600},bold:{value:700},extrabold:{value:800},black:{value:900}},Lse={small:{value:"1.25"},medium:{value:"1.5"},large:{value:"2"}},Use={0:{value:"0"},10:{value:"0.1"},20:{value:"0.2"},30:{value:"0.3"},40:{value:"0.4"},50:{value:"0.5"},60:{value:"0.6"},70:{value:"0.7"},80:{value:"0.8"},90:{value:"0.9"},100:{value:"1"}},Fse={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},zse={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Bse={xs:{value:"0.125rem"},small:{value:"0.25rem"},medium:{value:"0.5rem"},large:{value:"1rem"},xl:{value:"2rem"},xxl:{value:"4rem"},xxxl:{value:"8rem"}},jse={small:{value:{offsetX:"0px",offsetY:"2px",blurRadius:"4px",color:"{colors.shadow.tertiary.value}"}},medium:{value:{offsetX:"0px",offsetY:"2px",blurRadius:"6px",color:"{colors.shadow.secondary.value}"}},large:{value:{offsetX:"0px",offsetY:"4px",blurRadius:"12px",color:"{colors.shadow.primary.value}"}}},ri={zero:{value:"0"},xxxs:{value:"0.25rem"},xxs:{value:"0.375rem"},xs:{value:"0.5rem"},small:{value:"0.75rem"},medium:{value:"1rem"},large:{value:"1.5rem"},xl:{value:"2.0rem"},xxl:{value:"3.0rem"},xxxl:{value:"4.5rem"},relative:{xxxs:{value:"0.25em"},xxs:{value:"0.375em"},xs:{value:"0.5em"},small:{value:"0.75em"},medium:{value:"1em"},large:{value:"1.5em"},xl:{value:"2.0em"},xxl:{value:"3.0em"},xxxl:{value:"4.5em"},full:{value:"100%"}}},Hse={short:{value:"100ms"},medium:{value:"250ms"},long:{value:"500ms"}},$se={slideX:{small:{value:"translateX(0.5em)"},medium:{value:"translateX(1em)"},large:{value:"translateX(2em)"}}},qse={components:Pse,borderWidths:Ire,colors:Ore,fonts:kse,fontSizes:ni,fontWeights:Dse,lineHeights:Lse,opacities:Use,outlineOffsets:Fse,outlineWidths:zse,radii:Bse,shadows:jse,space:ri,time:Hse,transforms:$se};ni.xxs,ni.xs,ni.small,ni.medium,ni.large,ni.xl,ni.xxl,ni.xxxl,ri.xxxs,ri.xs,ri.small,ri.medium,ri.large,ri.xl,ri.xxl,ri.xxxl;const Wse={values:{base:0,small:480,medium:768,large:992,xl:1280,xxl:1536},defaultBreakpoint:"base"},O9={tokens:qse,breakpoints:Wse,name:"default-theme"};var LC,vD;function Gse(){if(vD)return LC;vD=1;function t(e,n,r,s){var o=-1,a=e==null?0:e.length;for(s&&a&&(r=e[++o]);++o<a;)r=n(r,e[o],o,e);return r}return LC=t,LC}var UC,yD;function Vse(){if(yD)return UC;yD=1;function t(e){return function(n){return e?.[n]}}return UC=t,UC}var FC,bD;function Kse(){if(bD)return FC;bD=1;var t=Vse(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},n=t(e);return FC=n,FC}var zC,SD;function Yse(){if(SD)return zC;SD=1;var t=Kse(),e=gT(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",s="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",a=r+s+o,u="["+a+"]",c=RegExp(u,"g");function f(p){return p=e(p),p&&p.replace(n,t).replace(c,"")}return zC=f,zC}var BC,ED;function Zse(){if(ED)return BC;ED=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return BC=e,BC}var jC,CD;function Xse(){if(CD)return jC;CD=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(n){return t.test(n)}return jC=e,jC}var HC,wD;function Qse(){if(wD)return HC;wD=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",s=e+n+r,o="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",u="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",p=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",g="A-Z\\xc0-\\xd6\\xd8-\\xde",m="\\ufe0e\\ufe0f",y=u+c+f+p,S="['’]",E="["+y+"]",C="["+s+"]",w="\\d+",x="["+o+"]",T="["+a+"]",R="[^"+t+y+w+o+a+g+"]",M="\\ud83c[\\udffb-\\udfff]",O="(?:"+C+"|"+M+")",I="[^"+t+"]",P="(?:\\ud83c[\\udde6-\\uddff]){2}",k="[\\ud800-\\udbff][\\udc00-\\udfff]",H="["+g+"]",U="\\u200d",B="(?:"+T+"|"+R+")",W="(?:"+H+"|"+R+")",Y="(?:"+S+"(?:d|ll|m|re|s|t|ve))?",ne="(?:"+S+"(?:D|LL|M|RE|S|T|VE))?",$=O+"?",ee="["+m+"]?",fe="(?:"+U+"(?:"+[I,P,k].join("|")+")"+ee+$+")*",de="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ae="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",D=ee+$+fe,V="(?:"+[x,P,k].join("|")+")"+D,K=RegExp([H+"?"+T+"+"+Y+"(?="+[E,H,"$"].join("|")+")",W+"+"+ne+"(?="+[E,H+B,"$"].join("|")+")",H+"?"+B+"+"+Y,H+"+"+ne,Ae,de,w,V].join("|"),"g");function J(oe){return oe.match(K)||[]}return HC=J,HC}var $C,_D;function Jse(){if(_D)return $C;_D=1;var t=Zse(),e=Xse(),n=gT(),r=Qse();function s(o,a,u){return o=n(o),a=u?void 0:a,a===void 0?e(o)?r(o):t(o):o.match(a)||[]}return $C=s,$C}var qC,xD;function eoe(){if(xD)return qC;xD=1;var t=Gse(),e=Yse(),n=Jse(),r="['’]",s=RegExp(r,"g");function o(a){return function(u){return t(n(e(u).replace(s,"")),a,"")}}return qC=o,qC}var WC,AD;function toe(){if(AD)return WC;AD=1;var t=eoe(),e=t(function(n,r,s){return n+(s?"-":"")+r.toLowerCase()});return WC=e,WC}var noe=toe();const N9=qa(noe),roe=/\{([^}]+)\}/g;function M9(t){const e=new RegExp(roe);if(typeof t=="string")return e.test(t);if(typeof t=="object"){let n=!1;for(const r in t)if(vi(t,r)){const s=t[r];if(M9(s)){n=!0;break}}return n}return!1}const soe="amplify";function Z_(t){return Object.entries(t).map(([e,n])=>{const r=Fy(n)?n.toString():P9({value:n});return`${N9(e)}:${r}; `}).join(" ")}function ET({path:t=[]}){return`${N9([soe,...t].join(" "))}`}const ooe=["offsetX","offsetY","blurRadius","spreadRadius","color"];function P9(t){const{value:e}=t;return mi(e)?RD(e):TD(e)?ooe.map(n=>RD(TD(t)?t[n]:e[n])).join(" "):e}function Fy(t){return as(t)&&vi(t,"value")}function TD(t){return as(t)&&vi(t,"offsetX")}function RD(t){if(!t)return"";if(M9(t)){const e=t.replace(/\{|\}/g,"").replace(".value","").split(".");return`var(--${ET({path:e})})`}return t}const ID=({token:t,path:e})=>{const n=`--${ET({path:e})}`,{value:r}=t,s=P9(t);return{name:n,original:r,path:e,value:s,toString:()=>`var(${n})`}};function X_({tokens:t,path:e=[],setupToken:n}){if(vi(t,"value"))return n({token:t,path:e});const r={};for(const s in t)if(vi(t,s)){const o=t[s],a=as(o)?o:{value:o};r[s]=X_({tokens:a,path:e.concat(s),setupToken:n})}return r}function Q_(t,e){e=e||[];for(var n in t)vi(t,n)&&(as(t[n])&&"value"in t[n]?e.push(t[n]):as(t[n])&&Q_(t[n],e));return e}function k9(t,e,n){if(t==null)return{};var r,s,o,a,u,c,f=t[0]||{},p=1,g=t.length;for(n=n||[],typeof f!="object"&&(f={});p<g;p++)if((u=t[p])!=null){for(a in u)if(vi(u,a)&&a!=="__proto__"&&(r=f[a],o=u[a],f!==o))if(o&&(as(o)||(s=Array.isArray(o)))){s?(s=!1,c=r&&Array.isArray(r)?r:[]):c=r&&as(r)?r:{};var m=n.slice(0);m.push(a),f[a]=k9([c,o],e,m)}else o!==void 0&&(f[a]=o)}return f}function OD(t,e){return e?`${t} { ${Object.entries(e).map(([n,r])=>`--${n}:${r}; `).join(" ")}}
27
- `:""}function ya(t,e){let n="";const{_modifiers:r={},_element:s={},_vars:o,...a}=e;if(Object.keys(a).length){const[u,c]=oee(a,f=>f.startsWith(":")||f.startsWith("["));Object.entries(u).forEach(([f,p])=>{const{_modifiers:g={},_element:m={},_vars:y,...S}=p;n+=`${t}${f} { ${Z_(S)} }
28
- `,n+=OD(`${t}${f}`,y)}),n+=`${t} { ${Z_(c)} }
29
- `}return n+=OD(t,o),Object.entries(r).forEach(([u,c])=>{c&&Object.keys(c).length&&(n+=ya(`${t}--${u}`,c))}),Object.entries(s).forEach(([u,c])=>{c&&Object.keys(c).length&&(n+=ya(`${t}__${u}`,c))}),n}function ioe({theme:t,components:e}){let n="";const{tokens:r,name:s,breakpoints:o}=t;return e.forEach(({name:a,theme:u,overrides:c})=>{const f=`amplify-${a}`,p=`[data-amplify-theme="${s}"] .${f}`,g=yi(u)?u(r):u;n+=ya(p,g),c&&c.forEach(m=>{const y=yi(m.theme)?m.theme(r):m.theme;if("mediaQuery"in m&&(n+=`@media (${m.mediaQuery}) {
30
- ${ya(p,y)}
31
- }`),"breakpoint"in m){const S=o.values[m.breakpoint];n+=`
32
- @media (min-width: ${S}px) {
33
- ${ya(p,y)}
34
- }`}"selector"in m&&(n+=ya(`${m.selector} .${f}`,y)),"colorMode"in m&&(n+=`
35
- @media (prefers-color-scheme: ${m.colorMode}) {
36
- ${ya(`[data-amplify-theme="${s}"][data-amplify-color-mode="system"] .${f}`,y)}
37
- }
38
- `,n+=ya(`[data-amplify-theme="${s}"][data-amplify-color-mode="${m.colorMode}"] .${f}`,y))})}),n}function ND({keys:t,value:e}){return t.reduce((n,r)=>({...n,[r]:{value:`{colors.${e}.${r}.value}`}}),{})}function aoe({animations:t,tokens:e}){let n="";return Object.entries(t).forEach(([r,s])=>{n+=`
39
- @keyframes ${r} {`,Object.entries(s).forEach(([o,a])=>{n+=`
40
- ${o} {
41
- `;const u=yi(a)?a(e):a;n+=Z_(u),n+=`
42
- }`}),n+=`
43
- }`}),n}function zy(t,e=O9){const n=k9([{},e,{...t,components:{}}]),{primaryColor:r,secondaryColor:s}=n;mi(r)&&(n.tokens.colors.primary=ND({keys:Object.keys(n.tokens.colors[r]),value:r})),mi(s)&&(n.tokens.colors.secondary=ND({keys:Object.keys(n.tokens.colors[s]),value:s}));const o=X_({tokens:n.tokens,setupToken:ID}),{breakpoints:a,name:u}=n;let c=`[data-amplify-theme="${u}"] {
44
- `+Q_(o).map(p=>`${p.name}: ${p.value};`).join(`
45
- `)+`
46
- }
47
- `;t?.components&&(c+=ioe({theme:{...n,tokens:o},components:t.components}));let f=[];return n.animations&&(c+=aoe({animations:n.animations,tokens:o})),n.overrides&&(f=n.overrides.map(p=>{const g=X_({tokens:p.tokens,setupToken:ID}),m=Q_(g).map(y=>`${y.name}: ${y.value};`).join(`
48
- `);if("selector"in p&&(c+=`
49
- ${p.selector} {
50
- ${m}
51
- }
52
- `),"mediaQuery"in p&&(c+=`
53
- @media (${p.mediaQuery}) {
54
- [data-amplify-theme="${u}"] {
55
- ${m}
56
- }
57
- }
58
- `),"breakpoint"in p){const y=n.breakpoints.values[p.breakpoint];c+=`
59
- @media (min-width: ${y}px) {
60
- [data-amplify-theme="${u}"] {
61
- ${m}
62
- }
63
- }
64
- `}return"colorMode"in p&&(c+=`
65
- @media (prefers-color-scheme: ${p.colorMode}) {
66
- [data-amplify-theme="${u}"][data-amplify-color-mode="system"] {
67
- ${m}
68
- color-scheme: ${p.colorMode};
69
- }
70
- }
71
- `,c+=`
72
- [data-amplify-theme="${u}"][data-amplify-color-mode="${p.colorMode}"] {
73
- ${m}
74
- color-scheme: ${p.colorMode};
75
- }
76
- `),{...p,tokens:g}})),{tokens:o,breakpoints:a,name:u,cssText:c,containerProps:({colorMode:p}={})=>({"data-amplify-theme":u,"data-amplify-color-mode":p}),overrides:f}}const je=(...t)=>{const e=[];for(const n of t)if(n){if(mi(n)){e.push(n);continue}if(typeof n=="number"){e.push(n.toString());continue}if(Array.isArray(n)){e.push(je(...n));continue}if(as(n)){if(n.toString!==Object.prototype.toString&&n.toString()!=="[object Object]"){e.push(n.toString());continue}for(const r in n)vi(n,r)&&n[r]&&e.push(r)}}return e.join(" ")},le={Alert:"amplify-alert",AlertIcon:"amplify-alert__icon",AlertHeading:"amplify-alert__heading",AlertBody:"amplify-alert__body",AlertDismiss:"amplify-alert__dismiss",Button:"amplify-button",ButtonLoaderWrapper:"amplify-button__loader-wrapper",CountryCodeSelect:"amplify-countrycodeselect",DialCodeSelect:"amplify-dialcodeselect",Divider:"amplify-divider",Field:"amplify-field",FieldDescription:"amplify-field__description",FieldErrorMessage:"amplify-field__error-message",FieldGroup:"amplify-field-group",FieldGroupControl:"amplify-field-group__control",FieldGroupOuterEnd:"amplify-field-group__outer-end",FieldGroupOuterStart:"amplify-field-group__outer-start",FieldGroupInnerEnd:"amplify-field-group__inner-end",FieldGroupInnerStart:"amplify-field-group__inner-start",FieldGroupHasInnerEnd:"amplify-field-group--has-inner-end",FieldGroupHasInnerStart:"amplify-field-group--has-inner-start",FieldShowPassword:"amplify-field__show-password",FieldGroupFieldWrapper:"amplify-field-group__field-wrapper",Fieldset:"amplify-fieldset",FieldsetLegend:"amplify-fieldset__legend",Flex:"amplify-flex",Heading:"amplify-heading",Icon:"amplify-icon",Input:"amplify-input",Label:"amplify-label",Loader:"amplify-loader",LoaderLabel:"amplify-loader__label",PasswordField:"amplify-passwordfield",PhoneNumberField:"amplify-phonenumberfield",Radio:"amplify-radio",RadioButton:"amplify-radio__button",RadioInput:"amplify-radio__input",RadioLabel:"amplify-radio__label",RadioGroupField:"amplify-radiogroupfield",RadioGroup:"amplify-radiogroup",Select:"amplify-select",SelectField:"amplify-selectfield",SelectWrapper:"amplify-select__wrapper",SelectIcon:"amplify-select__icon",Tabs:"amplify-tabs",TabsList:"amplify-tabs__list",TabsItem:"amplify-tabs__item",TabsPanel:"amplify-tabs__panel",Text:"amplify-text",TextField:"amplify-textfield",VisuallyHidden:"amplify-visually-hidden"},loe=({componentName:t,packageName:e,version:n})=>{const r=[`ui-${e}`,n];switch(t){case"AIConversation":{ei({...qJ,additionalDetails:[[t],r]});break}case"Authenticator":{ei({...GJ,additionalDetails:[[t],r]});break}case"ChangePassword":case"DeleteUser":{ei({...WJ,additionalDetails:[["AccountSettings"],r]});break}case"FileUploader":{ei({...VJ,additionalDetails:[[t],r]});break}case"InAppMessaging":{ei({...KJ,additionalDetails:[[t],r]});break}case"LocationSearch":{ei({...YJ,additionalDetails:[[t],r]});break}case"MapView":{ei({...ZJ,additionalDetails:[[t],r]});break}case"StorageManager":{ei({...XJ,additionalDetails:[[t],r]});break}case"StorageBrowser":{ei({...QJ,additionalDetails:[[t],r]});break}}return see},J_=z.createContext(null),uoe=t=>(e,n)=>{v9(e,n,t)};function D9({children:t}){const[e,n]=z.useState("configuring");z.useEffect(()=>{Ny().then(()=>{n("authenticated")}).catch(()=>{n("unauthenticated")})},[]);const r=A.useContext(J_),s=eK(Tre),o=A.useMemo(()=>r??{authStatus:e,service:s},[e,r,s]),{service:a}=o;return A.useEffect(()=>iee(a,uoe({onSignIn:()=>{n("authenticated")},onSignOut:()=>{n("unauthenticated")}})),[a]),z.createElement(J_.Provider,{value:o},t)}const coe="`useAuthenticator` must be used inside an `Authenticator.Provider`.",doe=["confirmResetPassword","confirmSignIn","confirmSignUp","confirmVerifyUser","forceNewPassword","forgotPassword","selectMfaType","setupEmail","setupTotp","signIn","signUp","verifyUser"],foe=t=>doe.some(e=>e===t),hoe=()=>!1;function poe(t,e){return t.length!==e.length?!1:t.every((n,r)=>{const s=e[r];return nee(n,s)||ree(n,s)?!0:n===s})}const goe=t=>(e,n)=>{const r=t(e),s=t(n);return poe(r,s)},moe=t=>({...Ch(t)?.formFields?.setupTotp?.QR}),voe=t=>t.flatMap(([e,n])=>({name:e,...n})),yoe=(t={})=>t&&Object.entries(t).map(([e,n])=>!mi(n)||!e?{}:{name:e,label:n,type:"radio",value:n}),boe=(t=[])=>t.map(e=>({name:"mfa_type",label:kn.getMfaTypeLabelByValue(e),type:"radio",value:e})),Soe=(t,e)=>foe(t)?t==="verifyUser"?yoe(Ch(e).unverifiedUserAttributes):t==="selectMfaType"?boe(Ch(e).allowedMfaTypes):voe(Bee(t,e)):[];function Ct(t){const e=z.useContext(J_);if(!e)throw new Error(coe);const{service:n}=e,{send:r}=n,s=A.useCallback(E=>({...dee({send:r,state:E})}),[r]),o=t?goe(t):hoe,{authStatus:a}=e,u=iK(n,s,o),{route:c,totpSecretCode:f,user:p,...g}=u,m=n.getSnapshot(),y=c==="setupTotp"?moe(m):null,S=Soe(c,m);return{...g,authStatus:a,route:c,totpSecretCode:f,user:p,fields:S,QRFields:y}}const Eoe=({route:t})=>[t];function Coe(t){const{route:e,initializeMachine:n}=Ct(Eoe),r=z.useRef(!1);z.useEffect(()=>{!r.current&&e==="setup"&&(n(t),r.current=!0)},[n,e,t])}const woe=({shouldWarn:t,message:e})=>{A.useEffect(()=>{},[t,e])};function _oe({componentName:t,packageName:e,version:n}){A.useEffect(()=>loe({componentName:t,packageName:e,version:n}),[t,e,n])}const L9=A.createContext({theme:zy(),colorMode:void 0}),CT={alignContent:"alignContent",alignItems:"alignItems",alignSelf:"alignSelf",area:"gridArea",aspectRatio:"aspectRatio",autoColumns:"gridAutoColumns",autoFlow:"gridAutoFlow",autoRows:"gridAutoRows",backgroundColor:"backgroundColor",backgroundImage:"backgroundImage",basis:"flexBasis",border:"border",borderRadius:"borderRadius",borderColor:"borderColor",borderWidth:"borderWidth",borderStyle:"borderStyle",bottom:"bottom",boxShadow:"boxShadow",color:"color",column:"gridColumn",columnEnd:"gridColumnEnd",columnGap:"columnGap",columnSpan:"gridColumn",columnStart:"gridColumnStart",direction:"flexDirection",display:"display",flex:"flex",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:"fontStyle",fontWeight:"fontWeight",gap:"gap",grow:"flexGrow",height:"height",justifyContent:"justifyContent",left:"left",letterSpacing:"letterSpacing",lineHeight:"lineHeight",margin:"margin",marginBlock:"marginBlock",marginBlockEnd:"marginBlockEnd",marginBlockStart:"marginBlockStart",marginBottom:"marginBlockEnd",marginInline:"marginInline",marginInlineEnd:"marginInlineEnd",marginInlineStart:"marginInlineStart",marginLeft:"marginInlineStart",marginRight:"marginInlineEnd",marginTop:"marginBlockStart",maxHeight:"maxHeight",maxWidth:"maxWidth",minHeight:"minHeight",minWidth:"minWidth",objectFit:"objectFit",objectPosition:"objectPosition",opacity:"opacity",order:"order",overflow:"overflow",padding:"padding",paddingBlock:"paddingBlock",paddingBlockEnd:"paddingBlockEnd",paddingBlockStart:"paddingBlockStart",paddingBottom:"paddingBlockEnd",paddingInline:"paddingInline",paddingInlineEnd:"paddingInlineEnd",paddingInlineStart:"paddingInlineStart",paddingLeft:"paddingInlineStart",paddingRight:"paddingInlineEnd",paddingTop:"paddingBlockStart",position:"position",resize:"resize",right:"right",row:"gridRow",rowEnd:"gridRowEnd",rowGap:"rowGap",rowSpan:"gridRow",rowStart:"gridRowStart",shrink:"flexShrink",templateAreas:"gridTemplateAreas",templateColumns:"gridTemplateColumns",templateRows:"gridTemplateRows",textAlign:"textAlign",textDecoration:"textDecoration",textTransform:"textTransform",top:"top",transform:"transform",transformOrigin:"transformOrigin",width:"width",whiteSpace:"whiteSpace",wrap:"flexWrap"},wT={Alert:{dismissButtonLabel:"Dismiss alert"},PhoneNumberField:{countryCodeLabel:"Country code"},PasswordField:{passwordIsHidden:"Password is hidden",passwordIsShown:"Password is shown",showPassword:"Show password"}},ex={backgroundColor:"colors",borderColor:"colors",borderWidth:"borderWidths",color:"colors",borderRadius:"radii",fontSize:"fontSizes",fontWeight:"fontWeights",fontFamily:"fonts",lineHeight:"lineHeights",opacity:"opacities",boxShadow:"shadows",transform:"transforms",left:"space",right:"space",top:"space",bottom:"space",height:"space",width:"space",letterSpacing:"space",margin:"space",marginBlock:"space",marginBlockEnd:"space",marginBlockStart:"space",marginInline:"space",marginInlineEnd:"space",marginInlineStart:"space",marginLeft:"space",marginRight:"space",marginTop:"space",marginBottom:"space",maxHeight:"space",maxWidth:"space",minHeight:"space",minWidth:"space",padding:"space",paddingBlock:"space",paddingBlockEnd:"space",paddingBlockStart:"space",paddingInline:"space",paddingInlineEnd:"space",paddingInlineStart:"space",paddingLeft:"space",paddingRight:"space",paddingTop:"space",paddingBottom:"space",gap:"space",columnGap:"space",rowGap:"space"},xoe=t=>t in ex,U9=t=>typeof t=="string"&&t.length===0,MD=t=>t==null||U9(t),By=t=>Object.keys(t),_T=(t,e,n)=>{if(typeof e!="string")return e;if(e.includes(" "))return e.split(" ").map(r=>_T(t,r,n)).join(" ");if(xoe(t)){const r=e.split("."),s=ex[t];let o=n[s];for(let a=0;a<r.length;a++){if(o){o=o[r[a]];continue}break}return Fy(o)?`var(--${ET({path:[ex[t],...r]})})`:e}return e},Aoe=({breakpoint:t,breakpoints:e,values:n})=>{const r=n[t];if(r!==void 0)return r;const s=By(e).sort((a,u)=>e[u]-e[a]),o=s.slice(s.indexOf(t));for(const a of o){const u=n[a];if(u!==void 0)return u}return null},Toe=t=>By(t).reduce((e,n)=>n in O9.breakpoints.values?{...e,[n]:t[n]}:e,{}),Roe=({breakpoint:t,breakpoints:e,values:n})=>{let r={};const s=By(e).sort((o,a)=>e[o]-e[a]);return Array.isArray(n)?n.forEach((o,a)=>{r[s[a]]=o}):typeof n=="object"&&(r=Toe(n)),Aoe({breakpoint:t,breakpoints:e,values:r})},Ioe=({breakpoints:t})=>{const e=By(t).sort((n,r)=>t[r]-t[n]);return e.map((n,r)=>{let s="";const o=t[n],a=e[r-1],u=a?t[a]-1:null;return o>=0&&(s=`(min-width: ${o}px)`),u!==null&&(s&&(s+=" and "),s+=`(max-width: ${u}px)`),{breakpoint:n,query:s,maxWidth:u,minWidth:o}})},Ooe=typeof window>"u"?A.useEffect:A.useLayoutEffect,Noe=({breakpoints:t,defaultBreakpoint:e})=>{const r=typeof window<"u"&&typeof window.matchMedia<"u"?window.matchMedia:null,s=A.useMemo(()=>Ioe({breakpoints:t}),[t]),[o,a]=A.useState(e),u=A.useCallback((c,f)=>{c&&a(f)},[a]);return Ooe(()=>{if(!r)return;const c=s.map(({query:f,breakpoint:p})=>{const g=r(f);u(g.matches,p);const m=y=>{y.matches&&a(p)};return g.addEventListener("change",m),()=>g.removeEventListener("change",m)});return()=>{c.forEach(f=>f())}},[t,a,r,s]),A.useDebugValue(o,c=>c),o},Moe=t=>typeof t>"u"||typeof t.theme>"u"?zy():t.theme,Poe=()=>{const t=A.useContext(L9);return Moe(t)},koe=({value:t,propKey:e,tokens:n})=>Fy(t)?t.toString():mi(t)?mi(e)?_T(e,t,n):t:null,Doe=t=>t==="auto"||typeof t=="number"&&!isNaN(t)||typeof t=="string"&&!isNaN(parseFloat(t)),GC=t=>t==="auto"?"auto":`span ${t}`,PD=t=>Doe(t)?GC(t):Array.isArray(t)?t.map(e=>GC(e)):typeof t=="object"&&t!=null?Object.entries(t).reduce((e,[n,r])=>({...e,[n]:GC(r)}),{}):null,Loe=t=>{const{rowSpan:e,columnSpan:n,row:r,column:s,...o}=t,{rowFromSpanValue:a,columnFromSpanValue:u}=A.useMemo(()=>({rowFromSpanValue:PD(e),columnFromSpanValue:PD(n)}),[e,n]);return{row:MD(r)?a:r,column:MD(s)?u:s,...o}},Uoe=t=>t in CT,Foe=({props:t={},style:e={},breakpoint:n,breakpoints:r,tokens:s})=>{const o={};return Object.keys(t).filter(a=>t[a]!==null).forEach(a=>{if(Uoe(a)){const u=t[a];if(u==null||U9(u))return;const c=CT[a];let f="";Fy(u)?f=u.toString():typeof u=="string"?f=_T(a,u,s):typeof u=="number"?f=u:typeof u=="object"&&(f=koe({propKey:a,tokens:s,value:Roe({values:u,breakpoint:n,breakpoints:r})})),e={...e,[c]:f}}else typeof t[a]<"u"&&(o[a]=t[a])}),{propStyles:e,nonStyleProps:o}},zoe=(t,e)=>{const{breakpoints:{values:n,defaultBreakpoint:r},tokens:s}=Poe(),o=Noe({breakpoints:n,defaultBreakpoint:r}),a=Loe(t);return A.useMemo(()=>Foe({props:a,style:e,breakpoint:o,breakpoints:n,tokens:s}),[a,e,n,o,s])},$t=t=>A.forwardRef(t),Boe=({as:t="div",children:e,testId:n,ariaLabel:r,isDisabled:s,style:o,inert:a,...u},c)=>{const{propStyles:f,nonStyleProps:p}=zoe(u,o);return A.createElement(t,{"aria-label":r,"data-testid":n,disabled:s,ref:c,inert:a?"":null,style:f,...p},e)},$e=$t(Boe);$e.displayName="View";const Cf={minX:0,minY:0,width:24,height:24},joe=({className:t,as:e="svg",fill:n="currentColor",pathData:r,viewBox:s=Cf,children:o,paths:a,...u},c)=>{const f=s.minX??Cf.minX,p=s.minY??Cf.minY,g=s.width??Cf.width,m=s.height??Cf.height;let y;return o&&(y=o),a&&(y=a.map((S,E)=>A.createElement("path",{...S,key:E}))),r&&(y=A.createElement("path",{d:r,fill:n})),A.createElement($e,{as:e,className:je(le.Icon,t),ref:c,viewBox:`${f} ${p} ${g} ${m}`,...u},y)},F9=$t(joe);F9.displayName="Icon";const Hoe=A.createContext({});function jy(t){const e=A.useContext(Hoe);if(t&&e)return e[t]}const $oe=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z",fill:"currentColor"})))},qoe=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z",fill:"currentColor"})))},Woe=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M11 7H13V9H11V7ZM11 11H13V17H11V11ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z",fill:"currentColor"})))},Goe=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z",fill:"currentColor"})))},z9=({variation:t,ariaHidden:e,ariaLabel:n,role:r})=>{const s=jy("alert");let o;switch(t){case"info":o=s?.info??A.createElement(Woe,{"aria-hidden":e,"aria-label":n,role:r});break;case"error":o=s?.error??A.createElement(qoe,{"aria-hidden":e,"aria-label":n,role:r});break;case"warning":o=s?.warning??A.createElement(Goe,{"aria-hidden":e,"aria-label":n,role:r});break;case"success":o=s?.success??A.createElement($oe,{"aria-hidden":e,"aria-label":n,role:r});break}return o?A.createElement("span",{className:le.AlertIcon},o):null};z9.displayName="AlertIcon";const Voe=globalThis?.document?A.useLayoutEffect:()=>{},Koe="amplify-id",Yoe=H5.useId||(()=>{});let Zoe=0;const La=t=>{const[e,n]=A.useState(Yoe());return Voe(()=>{t||n(r=>r??String(Zoe++))},[t]),t??(e?`${Koe}-${e}`:"")},B9=A.createContext({isFieldsetDisabled:!1}),tp=t=>{let n=A.useContext(B9).isFieldsetDisabled;return(n===void 0||n===!1)&&(n=t),{isFieldsetDisabled:n}},Xoe=({className:t,children:e,...n},r)=>A.createElement($e,{className:je(le.Flex,t),ref:r,...n},e),Fe=$t(Xoe);Fe.displayName="Flex";const Qoe="linear-empty",Joe="linear-filled",eie="circular-empty",tie="circular-filled",kD=8,tx=42,Gg=2*tx*Math.PI,nie=({className:t,filledColor:e,emptyColor:n,size:r,variation:s,isDeterminate:o=!1,isPercentageTextHidden:a=!1,percentage:u=0,...c},f)=>{u=Math.min(u,100),u=Math.max(u,0);const p=`${u}%`,g=je(le.Loader,jt(le.Loader,r),jt(le.Loader,s),Br(le.Loader,"determinate",o),t),m=A.createElement("g",null,A.createElement("line",{x1:"0",x2:"100%",y1:"50%",y2:"50%",style:{stroke:String(n)},"data-testid":Qoe}),A.createElement("line",{x1:"0",x2:o?p:"100%",y1:"50%",y2:"50%",style:{stroke:o&&u===0?"none":e?String(e):void 0},"data-testid":Joe}),o?A.createElement("text",{"aria-live":"polite",className:je(le.LoaderLabel,a?le.VisuallyHidden:null),x:`${-1+u}%`,y:"200%"},p):null),y=A.createElement("g",null,A.createElement("circle",{cx:"50%",cy:"50%",r:`${tx}%`,strokeWidth:`${kD}%`,style:{stroke:String(n)},"data-testid":eie}),A.createElement("circle",{cx:"50%",cy:"50%",r:`${tx}%`,strokeWidth:`${kD}%`,style:{stroke:String(e),strokeDasharray:o?`${Gg}% ${Gg}%`:void 0,strokeDashoffset:o?`${Gg-Gg*u/100}%`:void 0},"data-testid":tie}),o?A.createElement("text",{"aria-live":"polite",className:je(le.LoaderLabel,a?le.VisuallyHidden:null),x:"130%",y:"80%"},p):null);return A.createElement($e,{as:"svg","aria-valuenow":o?u:void 0,className:g,ref:f,role:"progressbar",...c},s==="linear"?m:y)},j9=$t(nie);j9.displayName="Loader";const rie=["link","primary",void 0],sie=({className:t,children:e,colorTheme:n,isFullWidth:r=!1,isDisabled:s,isLoading:o,loadingText:a="",size:u,type:c="button",variation:f,...p},g)=>{const m=rie.includes(f)&&n?`${f??"outlined"}--${n}`:void 0,{isFieldsetDisabled:y}=tp(s??o??p.disabled),S=je(le.Button,le.FieldGroupControl,jt(le.Button,f),jt(le.Button,m),jt(le.Button,u),Br(le.Button,"disabled",y),Br(le.Button,"loading",o),Br(le.Button,"fullwidth",r),t);return A.createElement($e,{ref:g,as:"button",className:S,isDisabled:y,type:c,...p},o?A.createElement(Fe,{as:"span",className:le.ButtonLoaderWrapper},A.createElement(j9,{size:u}),a||null):e)},Jt=$t(sie);Jt.displayName="Button";const oie=t=>{const{className:e,size:n,...r}=t;return A.createElement($e,{as:"span",width:n??"1em",height:n??"1em",className:je(le.Icon,e),...r},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n?{width:n,height:n}:void 0},A.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"currentColor"})))},iie=({as:t="p",className:e,children:n,isTruncated:r,variation:s,...o},a)=>{const u=je(le.Text,jt(le.Text,s),Br(le.Text,"truncated",r),e);return A.createElement($e,{as:t,className:u,ref:a,...o},n)},As=$t(iie);As.displayName="Text";const aie="qa-field-description",Hy=({descriptiveText:t,labelHidden:e,...n})=>t?A.createElement(As,{"data-testid":aie,className:je(le.FieldDescription,{[le.VisuallyHidden]:e}),...n},t):null;Hy.displayName="FieldDescription";const $y=({errorMessage:t,hasError:e,...n})=>e&&t?A.createElement(As,{className:le.FieldErrorMessage,...n},t):null;$y.displayName="FieldErrorMessage";const lie=({children:t,className:e,visuallyHidden:n,...r},s)=>A.createElement($e,{as:"label",className:je(le.Label,e,{[le.VisuallyHidden]:n}),ref:s,...r},t),xT=$t(lie);xT.displayName="Label";const uie=({buttonRef:t,children:e,className:n,dismissButtonLabel:r=wT.Alert.dismissButtonLabel,hasIcon:s=!0,heading:o,isDismissible:a=!1,onDismiss:u,variation:c,...f},p)=>{const[g,m]=A.useState(!1),y=jy("alert"),S=A.useCallback(()=>{m(!g),yi(u)&&u()},[m,u,g]);return g?null:A.createElement(Fe,{className:je(le.Alert,n,jt(le.Alert,c)),ref:p,role:"alert",...f},s&&A.createElement(z9,{variation:c,ariaHidden:!0}),A.createElement($e,{flex:"1"},o&&A.createElement($e,{className:le.AlertHeading},o),A.createElement($e,{className:le.AlertBody},e)),a&&A.createElement(Jt,{ariaLabel:r,variation:"link",className:le.AlertDismiss,onClick:S,ref:t},y?.close??A.createElement(oie,{"aria-hidden":"true"})))},H9=$t(uie);H9.displayName="Alert";const Ml=(t,e)=>t&&e?`${t}-${e}`:void 0,cie=({children:t,className:e,innerEndComponent:n,innerStartComponent:r,orientation:s="horizontal",outerEndComponent:o,outerStartComponent:a,variation:u,...c},f)=>{const p=r!=null,g=n!=null,m=p?le.FieldGroupHasInnerStart:null,y=g?le.FieldGroupHasInnerEnd:null,S=je(le.FieldGroup,m,y,jt(le.FieldGroup,s),e);return A.createElement(Fe,{className:S,ref:f,...c},a&&A.createElement($e,{className:je(le.FieldGroupOuterStart,jt(le.FieldGroupOuterStart,u))},a),A.createElement($e,{className:je(le.FieldGroupFieldWrapper,jt(le.FieldGroupFieldWrapper,s))},r&&A.createElement($e,{className:le.FieldGroupInnerStart},r),t,n&&A.createElement($e,{className:le.FieldGroupInnerEnd},n)),o&&A.createElement($e,{className:je(le.FieldGroupOuterEnd,jt(le.FieldGroupOuterEnd,u))},o))},$9=$t(cie);$9.displayName="FieldGroup";const die=({autoComplete:t,checked:e,className:n,defaultChecked:r,defaultValue:s,id:o,isDisabled:a,isReadOnly:u,isRequired:c,size:f,type:p="text",hasError:g=!1,value:m,variation:y,...S},E)=>{const C=je(le.Input,le.FieldGroupControl,jt(le.Input,y),Br(le.Input,"error",g),jt(le.Input,f),n),{isFieldsetDisabled:w}=tp(a);return A.createElement($e,{"aria-invalid":g,as:"input",autoComplete:t,checked:e,className:C,defaultChecked:r,defaultValue:s,isDisabled:w,id:o,readOnly:u,ref:E,required:c,type:p,value:m,...S})},AT=$t(die);AT.displayName="Input";const fie=t=>t in CT,q9=t=>{const e={styleProps:{},rest:{}};return Object.keys(t).forEach(n=>{fie(n)?e.styleProps={...e.styleProps,[n]:t[n]}:e.rest={...e.rest,[n]:t[n]}}),e},TT=t=>{const e=t.filter(n=>n!==void 0).join(" ");return e.length>0?e:void 0},RT="error",IT="description",hie=(t,e)=>{const{className:n,descriptiveText:r,errorMessage:s,hasError:o=!1,id:a,innerEndComponent:u,innerStartComponent:c,label:f,labelHidden:p=!1,outerEndComponent:g,outerStartComponent:m,size:y,testId:S,variation:E,inputStyles:C,...w}=t,x=La(a),T=La(),R=r?Ml(T,IT):void 0,M=o?Ml(T,RT):void 0,O=TT([M,R]),{styleProps:I,rest:P}=q9(w);return A.createElement(Fe,{className:je(le.Field,jt(le.Field,y),le.TextField,n),testId:S,...I},A.createElement(xT,{htmlFor:x,visuallyHidden:p},f),A.createElement(Hy,{id:R,labelHidden:p,descriptiveText:r}),A.createElement($9,{outerStartComponent:m,outerEndComponent:g,innerStartComponent:c,innerEndComponent:u,variation:E},A.createElement(AT,{"aria-describedby":O,hasError:o,id:x,ref:e,size:y,variation:E,...C,...P})),A.createElement($y,{id:M,hasError:o,errorMessage:s}))},np=$t(hie);np.displayName="TextField";const pie=({as:t="span",children:e,className:n,...r},s)=>A.createElement($e,{as:t,className:je(le.VisuallyHidden,n),ref:s,...r},e),qy=$t(pie);qy.displayName="VisuallyHidden";const gie=({className:t,orientation:e="horizontal",size:n,label:r,...s},o)=>{const a=je(le.Divider,jt(le.Divider,e),jt(le.Divider,n),t);return A.createElement($e,{"aria-orientation":e,as:"hr",className:a,"data-label":r,ref:o,...s})},OT=$t(gie);OT.displayName="Divider";const mie=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M16.59 8.58984L12 13.1698L7.41 8.58984L6 9.99984L12 15.9998L18 9.99984L16.59 8.58984Z",fill:"currentColor"})))},vie=({children:t,className:e,isDisabled:n,legend:r,legendHidden:s,size:o,testId:a,variation:u="plain",...c},f)=>{const{isFieldsetDisabled:p}=tp(n),g=A.useMemo(()=>({isFieldsetDisabled:p}),[p]),m=je(le.Fieldset,jt(le.Fieldset,u),jt(le.Fieldset,o),e),y=je(le.FieldsetLegend,jt(le.FieldsetLegend,o),{[le.VisuallyHidden]:s});return A.createElement(B9.Provider,{value:g},A.createElement(Fe,{as:"fieldset",className:m,ref:f,disabled:p,testId:a,...c},A.createElement(qy,{as:"legend"},r),A.createElement($e,{as:"div","aria-hidden":"true",className:y},r),t))},W9=$t(vie);W9.displayName="Fieldset";const yie={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},bie=({className:t,children:e,isTruncated:n,level:r=6,...s},o)=>A.createElement($e,{as:yie[r],className:je(le.Heading,jt(le.Heading,r),Br(le.Heading,"truncated",n),t),ref:o,...s},e),wr=$t(bie);wr.displayName="Heading";var Sie=A.createContext(void 0),Eie=t=>{const{dir:e,children:n}=t;return F.jsx(Sie.Provider,{value:e,children:n})};const Cie=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M12 6.0002C15.79 6.0002 19.17 8.1302 20.82 11.5002C20.23 12.7202 19.4 13.7702 18.41 14.6202L19.82 16.0302C21.21 14.8002 22.31 13.2602 23 11.5002C21.27 7.1102 17 4.0002 12 4.0002C10.73 4.0002 9.51 4.2002 8.36 4.5702L10.01 6.2202C10.66 6.0902 11.32 6.0002 12 6.0002ZM10.93 7.14019L13 9.2102C13.57 9.4602 14.03 9.9202 14.28 10.4902L16.35 12.5602C16.43 12.2202 16.49 11.8602 16.49 11.4902C16.5 9.0102 14.48 7.0002 12 7.0002C11.63 7.0002 11.28 7.05019 10.93 7.14019ZM2.01 3.8702L4.69 6.5502C3.06 7.8302 1.77 9.5302 1 11.5002C2.73 15.8902 7 19.0002 12 19.0002C13.52 19.0002 14.98 18.7102 16.32 18.1802L19.74 21.6002L21.15 20.1902L3.42 2.4502L2.01 3.8702ZM9.51 11.3702L12.12 13.9802C12.08 13.9902 12.04 14.0002 12 14.0002C10.62 14.0002 9.5 12.8802 9.5 11.5002C9.5 11.4502 9.51 11.4202 9.51 11.3702V11.3702ZM6.11 7.97019L7.86 9.7202C7.63 10.2702 7.5 10.8702 7.5 11.5002C7.5 13.9802 9.52 16.0002 12 16.0002C12.63 16.0002 13.23 15.8702 13.77 15.6402L14.75 16.6202C13.87 16.8602 12.95 17.0002 12 17.0002C8.21 17.0002 4.83 14.8702 3.18 11.5002C3.88 10.0702 4.9 8.89019 6.11 7.97019Z",fill:"currentColor"})))},wie=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M12 6C15.79 6 19.17 8.13 20.82 11.5C19.17 14.87 15.79 17 12 17C8.21 17 4.83 14.87 3.18 11.5C4.83 8.13 8.21 6 12 6ZM12 4C7 4 2.73 7.11 1 11.5C2.73 15.89 7 19 12 19C17 19 21.27 15.89 23 11.5C21.27 7.11 17 4 12 4ZM12 9C13.38 9 14.5 10.12 14.5 11.5C14.5 12.88 13.38 14 12 14C10.62 14 9.5 12.88 9.5 11.5C9.5 10.12 10.62 9 12 9ZM12 7C9.52 7 7.5 9.02 7.5 11.5C7.5 13.98 9.52 16 12 16C14.48 16 16.5 13.98 16.5 11.5C16.5 9.02 14.48 7 12 7Z",fill:"currentColor"})))},{passwordIsHidden:_ie,passwordIsShown:xie,showPassword:Aie}=wT.PasswordField,Tie=({fieldType:t,passwordIsHiddenLabel:e=_ie,passwordIsShownLabel:n=xie,showPasswordButtonLabel:r=Aie,size:s,hasError:o,...a},u)=>{const c=jy("passwordField"),f=je(le.FieldShowPassword,Br(le.FieldShowPassword,"error",o)),p=t==="password"?c?.visibility??A.createElement(wie,{"aria-hidden":"true"}):c?.visibilityOff??A.createElement(Cie,{"aria-hidden":"true"});return A.createElement(Jt,{"aria-checked":t!=="password",ariaLabel:r,className:f,colorTheme:o?"error":void 0,ref:u,role:"switch",size:s,...a},A.createElement(qy,{"aria-live":"polite"},t==="password"?e:n),p)},G9=$t(Tie);G9.displayName="ShowPasswordButton";const Rie=({autoComplete:t="current-password",label:e,className:n,hideShowPassword:r=!1,passwordIsHiddenLabel:s,passwordIsShownLabel:o,showPasswordButtonLabel:a,showPasswordButtonRef:u,size:c,hasError:f,...p},g)=>{const[m,y]=A.useState("password"),S=A.useCallback(()=>{y(m==="password"?"text":"password")},[y,m]);return A.createElement(np,{autoComplete:t,outerEndComponent:r?null:A.createElement(G9,{fieldType:m,onClick:S,passwordIsHiddenLabel:s,passwordIsShownLabel:o,ref:u,size:c,showPasswordButtonLabel:a,hasError:f}),size:c,type:m,label:e,className:je(le.PasswordField,n),ref:g,hasError:f,...p})},NT=$t(Rie);NT.displayName="PasswordField";const Iie=({autoComplete:t,className:e,size:n,variation:r,value:s,defaultValue:o,hasError:a,icon:u,iconColor:c,children:f,placeholder:p,isDisabled:g,isRequired:m,isMultiple:y=!1,selectSize:S=1,...E},C)=>{const x=s===void 0&&o===void 0&&p,T=y||S>1,R=je(le.Select,le.FieldGroupControl,jt(le.Select,n),jt(le.Select,r),Br(le.Select,"error",a),Br(le.Select,"expanded",T),e),M=jy("select"),{isFieldsetDisabled:O}=tp(g);return A.createElement($e,{className:le.SelectWrapper},A.createElement($e,{"aria-invalid":a,as:"select",autoComplete:t,value:s,defaultValue:x?"":o,isDisabled:O,multiple:y,size:S,required:m,className:R,ref:C,...E},p&&A.createElement("option",{value:""},p),f),T?null:A.createElement(Fe,{className:je(le.SelectIcon,jt(le.SelectIcon,n)),color:c,"aria-hidden":"true"},u??M?.expand??A.createElement(mie,null)))},V9=$t(Iie);V9.displayName="Select";const Oie=({children:t,options:e})=>t?(e?.length&&console.warn("Amplify UI: <SelectField> component defaults to rendering children over `options`. When using the `options` prop, omit children."),t):e?.map((n,r)=>A.createElement("option",{label:n,value:n,key:`${n}-${r}`},n)),Nie=(t,e)=>{const{children:n,className:r,descriptiveText:s,errorMessage:o,hasError:a=!1,id:u,label:c,labelHidden:f=!1,options:p,size:g,testId:m,inputStyles:y,...S}=t,E=La(u),C=La(),w=s?Ml(C,IT):void 0,x=a?Ml(C,RT):void 0,T=TT([x,w]),{styleProps:R,rest:M}=q9(S);return A.createElement(Fe,{className:je(le.Field,jt(le.Field,g),le.SelectField,r),testId:m,...R},A.createElement(xT,{htmlFor:E,visuallyHidden:f},c),A.createElement(Hy,{id:w,labelHidden:f,descriptiveText:s}),A.createElement(V9,{"aria-describedby":T,hasError:a,id:E,ref:e,size:g,...M,...y},Oie({children:n,options:p})),A.createElement($y,{id:x,hasError:a,errorMessage:o}))},K9=$t(Nie);K9.displayName="SelectField";const Mie=({className:t,dialCodeList:e,isReadOnly:n,...r},s)=>{const o=e??y9,a=A.useMemo(()=>o.map(u=>A.createElement("option",{key:u,value:u,disabled:n},u)),[o,n]);return A.createElement(K9,{"aria-disabled":n,autoComplete:"tel-country-code",className:je(le.CountryCodeSelect,le.DialCodeSelect,t),labelHidden:!0,ref:s,...r},a)},Y9=$t(Mie);Y9.displayName="DialCodeSelect";const Pie=({autoComplete:t="tel-national",className:e,defaultDialCode:n,dialCodeLabel:r=wT.PhoneNumberField.countryCodeLabel,dialCodeList:s,dialCodeName:o,dialCodeRef:a,hasError:u,isDisabled:c,isReadOnly:f,onDialCodeChange:p,onInput:g,size:m,variation:y,...S},E)=>A.createElement(np,{outerStartComponent:A.createElement(Y9,{defaultValue:n,dialCodeList:s,className:e,hasError:u,isDisabled:c,isReadOnly:f,label:r,name:o,onChange:p,ref:a,size:m,variation:y}),autoComplete:t,className:je(le.PhoneNumberField,e),hasError:u,isDisabled:c,isReadOnly:f,onInput:g,ref:E,size:m,type:"tel",variation:y,...S}),Z9=$t(Pie);Z9.displayName="PhoneNumberField";const kie={name:"default"},X9=z.createContext(kie),Die=()=>A.useContext(X9),Lie=({children:t,className:e,id:n,isDisabled:r=!1,testId:s,value:o,labelPosition:a,...u},c)=>{const{currentValue:f,defaultValue:p,name:g,hasError:m,isGroupDisabled:y=!1,isRequired:S,isReadOnly:E,onChange:C,size:w,labelPosition:x}=Die(),{isFieldsetDisabled:T}=tp(y||r||E&&p!==o),R=f!==void 0?o===f:void 0,M=p!==void 0?o===p:void 0,O=a??x;return A.createElement(Fe,{as:"label",className:je(le.Radio,Br(le.Radio,"disabled",T),O?`amplify-label-${O}`:null,e)},t&&A.createElement(As,{as:"span",className:je(le.RadioLabel,Br(le.RadioLabel,"disabled",T))},t),A.createElement(AT,{checked:R,className:je(le.VisuallyHidden,le.RadioInput),defaultChecked:M,hasError:m,id:n,isDisabled:T,isReadOnly:E,isRequired:S,onChange:C,ref:c,type:"radio",name:g,value:o,...u}),A.createElement(Fe,{"aria-hidden":"true",as:"span",className:je(le.RadioButton,jt(le.RadioButton,w)),testId:s}))},MT=$t(Lie);MT.displayName="Radio";const Uie=({children:t,className:e,defaultValue:n,descriptiveText:r,errorMessage:s,hasError:o=!1,id:a,isDisabled:u,isRequired:c,isReadOnly:f,legend:p,legendHidden:g=!1,labelPosition:m,onChange:y,name:S,size:E,testId:C,value:w,variation:x,...T},R)=>{const M=La(a),O=La(),I=r?Ml(O,IT):void 0,P=o?Ml(O,RT):void 0,k=TT([P,I]),H=Ml(C,le.RadioGroup),U=A.useMemo(()=>({currentValue:w,defaultValue:n,hasError:o,isRequired:c,isReadOnly:f,isGroupDisabled:u,onChange:y,size:E,name:S,labelPosition:m}),[n,o,u,c,f,y,E,S,w,m]);return A.createElement(W9,{className:je(le.Field,jt(le.Field,E),le.RadioGroupField,e),isDisabled:u,legend:p,legendHidden:g,ref:R,role:"radiogroup",size:E,testId:C,variation:x,...T},A.createElement(Hy,{id:I,labelHidden:g,descriptiveText:r}),A.createElement(Fe,{"aria-describedby":k,className:le.RadioGroup,id:M,testId:H},A.createElement(X9.Provider,{value:U},t)),A.createElement($y,{id:P,hasError:o,errorMessage:s}))},PT=$t(Uie);PT.displayName="RadioGroupField";const Wy=A.createContext({groupId:"",activeTab:"",setActiveTab:()=>{}}),Q9="-",Fie=({className:t,value:e,children:n,onClick:r,as:s="button",role:o="tab",...a},u)=>{const{activeTab:c,setActiveTab:f,groupId:p}=A.useContext(Wy);let g=e;typeof g=="string"&&(g=g.replace(" ",Q9));const m=c===e,y=S=>{yi(r)&&r?.(S),f(e)};return A.createElement($e,{...a,role:o,as:s,id:`${p}-tab-${g}`,"aria-selected":m,"aria-controls":`${p}-panel-${g}`,tabIndex:m?void 0:-1,className:je(le.TabsItem,Br(le.TabsItem,"active",c===e),t),ref:u,onClick:y},n)},kT=$t(Fie);kT.displayName="Tabs.Item";const zie=t=>A.isValidElement(t),Bie=({className:t,children:e,indicatorPosition:n,spacing:r,role:s="tablist",...o},a)=>{const u=A.useRef(null),{activeTab:c,setActiveTab:f}=A.useContext(Wy);A.useImperativeHandle(a,()=>u.current);const p=A.useMemo(()=>A.Children.toArray(e).map(E=>{if(E&&zie(E))return E.props.value}).filter(E=>!!E),[e]),g=p.indexOf(c),m=A.useCallback(()=>{let E=g===p.length-1?0:g+1;const C=u.current?.querySelectorAll("button")??[];for(;C[E].disabled;)E===p.length-1?E=0:E++;const w=p[E];if(w){f(w);const x=C[E];x?.focus(),x?.click()}},[g,f,p]),y=A.useCallback(()=>{let E=g===0?p.length-1:g-1;const C=u.current?.querySelectorAll("button")??[];for(;C[E].disabled;)E===0?E=p.length-1:E--;const w=p[E];if(w){f(w);const x=C[E];x?.focus(),x?.click()}},[g,f,p]),S=A.useCallback(E=>{switch(E.key){case"ArrowLeft":E.preventDefault(),E.stopPropagation(),y();break;case"ArrowUp":case"ArrowRight":E.preventDefault(),E.stopPropagation(),m();break}},[y,m]);return A.createElement($e,{...o,role:s,onKeyDown:S,className:je(le.TabsList,n?jt(le.TabsList,n):null,r?jt(le.TabsList,r):null,t),ref:u},e)},DT=$t(Bie);DT.displayName="Tabs.List";const jie=({className:t,value:e,children:n,role:r="tabpanel",...s},o)=>{const{activeTab:a,isLazy:u,groupId:c}=A.useContext(Wy);if(u&&a!==e)return null;let f=e;return typeof f=="string"&&(f=f.replace(" ",Q9)),A.createElement($e,{...s,role:r,id:`${c}-panel-${f}`,"aria-labelledby":`${c}-tab-${f}`,className:je(le.TabsPanel,Br(le.TabsPanel,"active",a===e),t),ref:o},n)},LT=$t(jie);LT.displayName="Tabs.Panel";const Hie=({children:t,defaultValue:e,className:n,value:r,onValueChange:s,isLazy:o,...a},u)=>{const c=La(),f=r!==void 0,[p,g]=A.useState(()=>f?r:e),m=f?r:p??"",y=A.useCallback(E=>{yi(s)&&s(E),f||g(E)},[s,f]),S=A.useMemo(()=>({activeTab:m,isLazy:o,setActiveTab:y,groupId:c}),[m,y,o,c]);return A.createElement(Wy.Provider,{value:S},A.createElement($e,{...a,ref:u,className:je(n,le.Tabs)},t))},UT=$t(Hie);UT.displayName="Tabs.Container";const $ie=({items:t,indicatorPosition:e,justifyContent:n,spacing:r,...s},o)=>A.createElement(UT,{...s,ref:o},A.createElement(DT,{indicatorPosition:e,justifyContent:n,spacing:r},t?.map(({value:a,label:u,content:c,...f})=>A.createElement(kT,{...f,key:a,value:a},u))),t?.map(({value:a,content:u,isDisabled:c})=>A.createElement(LT,{key:a,value:a,isDisabled:c},u))),Sl=Object.assign($t($ie),{Item:kT,List:DT,Panel:LT,Container:UT});Sl.displayName="Tabs";const VC=({errors:t,id:e,dataAttr:n})=>{if(!(t?.length>0))return null;const r=n?{[n]:!0}:{};return z.createElement($e,{...r,id:e},t.map(s=>z.createElement(As,{key:s,role:"alert",variation:"error"},ye(s))))},qie="6.15.4",Wie=({message:t,shouldWarn:e})=>{woe({message:t,shouldWarn:e})},J9=A.createContext(null),cs=()=>{const t=A.useContext(J9);if(!t)throw new Error("`useCustomComponents` cannot be used outside of a `CustomComponentsContext.Provider`");return t},Gie=t=>{const e=new FormData(t.target);return Object.fromEntries(e)};function ds(){const{submitForm:t,updateBlur:e,updateForm:n}=Ct(a=>[a.submitForm,a.updateBlur,a.updateForm]),r=A.useCallback(({target:{name:a}})=>{e({name:a})},[e]),s=A.useCallback(({target:{checked:a,name:u,type:c,value:f}})=>{n({name:u,value:c==="checkbox"&&!a?void 0:f})},[n]),o=A.useCallback(a=>{a.preventDefault(),t(Gie(a))},[t]);return{handleBlur:r,handleChange:s,handleSubmit:o}}const Wr=()=>{const{error:t}=Ct(e=>[e.error]);return z.createElement(z.Fragment,null,t?z.createElement(H9,{variation:"error",isDismissible:!0},ye(t)):null)};function DD({autocomplete:t,dialCode:e,name:n,type:r,...s}){const{validationErrors:o}=Ct(({validationErrors:p})=>[p]),a=A.useMemo(()=>mee(o[n]),[n,o]),u=a?.length>0,c=La(),f=u?c:void 0;return r==="tel"?A.createElement(A.Fragment,null,A.createElement(Z9,{...s,name:n,defaultDialCode:e,dialCodeName:"country_code",autoComplete:t,hasError:u,"aria-describedby":f}),A.createElement(VC,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c})):r==="password"?A.createElement(A.Fragment,null,A.createElement(NT,{...s,name:n,autoCapitalize:"off",autoComplete:t,hasError:u,"aria-describedby":f}),A.createElement(VC,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c})):A.createElement(A.Fragment,null,A.createElement(np,{...s,name:n,autoCapitalize:"off",autoComplete:t,hasError:u,type:r,"aria-describedby":f}),A.createElement(VC,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c}))}function Mo({includePassword:t}={}){const{fields:e}=Ct(({route:u})=>[u]),{selectedAuthMethod:n,preferredChallenge:r}=Ct(u=>[u.selectedAuthMethod,u.preferredChallenge]),s=n??r,o=t??(!s||s==="PASSWORD"),a=A.useRef(e.map((u,c)=>(u.name==="password"||u.name==="confirm_password")&&!o?A.createElement(DD,{key:c,...u,isRequired:!1}):A.createElement(DD,{key:c,...u})).filter(Boolean)).current;return A.createElement(A.Fragment,null,a)}function qr({children:t,className:e,variation:n="default"}){Ct(({route:o})=>[o]);const{components:{Header:r,Footer:s}}=cs();return z.createElement($e,{className:e,"data-amplify-authenticator":"","data-variation":n},z.createElement($e,{"data-amplify-container":""},z.createElement(r,null),z.createElement($e,{"data-amplify-router":"","data-amplify-router-content":void 0},t),z.createElement(s,null)))}const{getDeliveryMessageText:Vie,getDeliveryMethodText:Kie,getConfirmingText:Yie,getConfirmText:Zie,getResendCodeText:Xie}=kn;function zl({className:t,variation:e}){const{isPending:n,resendCode:r,codeDeliveryDetails:s}=Ct(f=>[f.isPending,f.resendCode,f.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=ds(),{components:{ConfirmSignUp:{Header:u=zl.Header,Footer:c=zl.Footer}}}=cs();return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignup":"",method:"post",onChange:o,onSubmit:a},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(u,null),z.createElement(Fe,{direction:"column"},z.createElement(As,{className:"amplify-authenticator__subtitle"},Vie(s)),z.createElement(Mo,null),z.createElement(Wr,null),z.createElement(Jt,{variation:"primary",isDisabled:n,type:"submit",loadingText:Yie(),isLoading:n},Zie()),z.createElement(Jt,{onClick:r,type:"button"},Xie())),z.createElement(c,null))))}const Qie=()=>{const{codeDeliveryDetails:t}=Ct(e=>[e.codeDeliveryDetails]);return z.createElement(wr,{level:4},Kie(t))};zl.Header=Qie;zl.Footer=function(){return null};const{getChangePasswordText:eF,getChangingText:Jie,getBackToSignInText:eae}=kn,Ys=({className:t,variation:e})=>{const{isPending:n,toSignIn:r}=Ct(p=>[p.isPending,p.toSignIn]),{handleBlur:s,handleChange:o,handleSubmit:a}=ds(),{components:{ForceNewPassword:{FormFields:u=Ys.FormFields,Header:c=Ys.Header,Footer:f=Ys.Footer}}}=cs();return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forcenewpassword":"",method:"post",onChange:o,onSubmit:a,onBlur:s},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(c,null),z.createElement(u,null),z.createElement(Wr,null),z.createElement(Jt,{isDisabled:n,type:"submit",variation:"primary",isLoading:n,loadingText:Jie()},eF()),z.createElement(Jt,{onClick:r,type:"button",variation:"link",size:"small"},eae()),z.createElement(f,null))))};Ys.FormFields=function(){return z.createElement(Mo,null)};Ys.Header=function(){return z.createElement(wr,{level:4},eF())};Ys.Footer=function(){return null};var Xu={},KC,LD;function tae(){return LD||(LD=1,KC=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),KC}var YC={},ca={},UD;function ru(){if(UD)return ca;UD=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return ca.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},ca.getSymbolTotalCodewords=function(r){return e[r]},ca.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},ca.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');t=r},ca.isKanjiModeEnabled=function(){return typeof t<"u"},ca.toSJIS=function(r){return t(r)},ca}var ZC={},FD;function FT(){return FD||(FD=1,(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,s){if(t.isValid(r))return r;try{return e(r)}catch{return s}}})(ZC)),ZC}var XC,zD;function nae(){if(zD)return XC;zD=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let r=0;r<n;r++)this.putBit((e>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},XC=t,XC}var QC,BD;function rae(){if(BD)return QC;BD=1;function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return t.prototype.set=function(e,n,r,s){const o=e*this.size+n;this.data[o]=r,s&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,n){return this.data[e*this.size+n]},t.prototype.xor=function(e,n,r){this.data[e*this.size+n]^=r},t.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},QC=t,QC}var JC={},jD;function sae(){return jD||(jD=1,(function(t){const e=ru().getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,o=e(r),a=o===145?26:Math.ceil((o-13)/(2*s-2))*2,u=[o-7];for(let c=1;c<s-1;c++)u[c]=u[c-1]-a;return u.push(6),u.reverse()},t.getPositions=function(r){const s=[],o=t.getRowColCoords(r),a=o.length;for(let u=0;u<a;u++)for(let c=0;c<a;c++)u===0&&c===0||u===0&&c===a-1||u===a-1&&c===0||s.push([o[u],o[c]]);return s}})(JC)),JC}var ew={},HD;function oae(){if(HD)return ew;HD=1;const t=ru().getSymbolSize,e=7;return ew.getPositions=function(r){const s=t(r);return[[0,0],[s-e,0],[0,s-e]]},ew}var tw={},$D;function iae(){return $D||($D=1,(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(s){return s!=null&&s!==""&&!isNaN(s)&&s>=0&&s<=7},t.from=function(s){return t.isValid(s)?parseInt(s,10):void 0},t.getPenaltyN1=function(s){const o=s.size;let a=0,u=0,c=0,f=null,p=null;for(let g=0;g<o;g++){u=c=0,f=p=null;for(let m=0;m<o;m++){let y=s.get(g,m);y===f?u++:(u>=5&&(a+=e.N1+(u-5)),f=y,u=1),y=s.get(m,g),y===p?c++:(c>=5&&(a+=e.N1+(c-5)),p=y,c=1)}u>=5&&(a+=e.N1+(u-5)),c>=5&&(a+=e.N1+(c-5))}return a},t.getPenaltyN2=function(s){const o=s.size;let a=0;for(let u=0;u<o-1;u++)for(let c=0;c<o-1;c++){const f=s.get(u,c)+s.get(u,c+1)+s.get(u+1,c)+s.get(u+1,c+1);(f===4||f===0)&&a++}return a*e.N2},t.getPenaltyN3=function(s){const o=s.size;let a=0,u=0,c=0;for(let f=0;f<o;f++){u=c=0;for(let p=0;p<o;p++)u=u<<1&2047|s.get(f,p),p>=10&&(u===1488||u===93)&&a++,c=c<<1&2047|s.get(p,f),p>=10&&(c===1488||c===93)&&a++}return a*e.N3},t.getPenaltyN4=function(s){let o=0;const a=s.data.length;for(let c=0;c<a;c++)o+=s.data[c];return Math.abs(Math.ceil(o*100/a/5)-10)*e.N4};function n(r,s,o){switch(r){case t.Patterns.PATTERN000:return(s+o)%2===0;case t.Patterns.PATTERN001:return s%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(s+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return s*o%2+s*o%3===0;case t.Patterns.PATTERN110:return(s*o%2+s*o%3)%2===0;case t.Patterns.PATTERN111:return(s*o%3+(s+o)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(s,o){const a=o.size;for(let u=0;u<a;u++)for(let c=0;c<a;c++)o.isReserved(c,u)||o.xor(c,u,n(s,c,u))},t.getBestMask=function(s,o){const a=Object.keys(t.Patterns).length;let u=0,c=1/0;for(let f=0;f<a;f++){o(f),t.applyMask(f,s);const p=t.getPenaltyN1(s)+t.getPenaltyN2(s)+t.getPenaltyN3(s)+t.getPenaltyN4(s);t.applyMask(f,s),p<c&&(c=p,u=f)}return u}})(tw)),tw}var Vg={},qD;function tF(){if(qD)return Vg;qD=1;const t=FT(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Vg.getBlocksCount=function(s,o){switch(o){case t.L:return e[(s-1)*4+0];case t.M:return e[(s-1)*4+1];case t.Q:return e[(s-1)*4+2];case t.H:return e[(s-1)*4+3];default:return}},Vg.getTotalCodewordsCount=function(s,o){switch(o){case t.L:return n[(s-1)*4+0];case t.M:return n[(s-1)*4+1];case t.Q:return n[(s-1)*4+2];case t.H:return n[(s-1)*4+3];default:return}},Vg}var nw={},wf={},WD;function aae(){if(WD)return wf;WD=1;const t=new Uint8Array(512),e=new Uint8Array(256);return(function(){let r=1;for(let s=0;s<255;s++)t[s]=r,e[r]=s,r<<=1,r&256&&(r^=285);for(let s=255;s<512;s++)t[s]=t[s-255]})(),wf.log=function(r){if(r<1)throw new Error("log("+r+")");return e[r]},wf.exp=function(r){return t[r]},wf.mul=function(r,s){return r===0||s===0?0:t[e[r]+e[s]]},wf}var GD;function lae(){return GD||(GD=1,(function(t){const e=aae();t.mul=function(r,s){const o=new Uint8Array(r.length+s.length-1);for(let a=0;a<r.length;a++)for(let u=0;u<s.length;u++)o[a+u]^=e.mul(r[a],s[u]);return o},t.mod=function(r,s){let o=new Uint8Array(r);for(;o.length-s.length>=0;){const a=o[0];for(let c=0;c<s.length;c++)o[c]^=e.mul(s[c],a);let u=0;for(;u<o.length&&o[u]===0;)u++;o=o.slice(u)}return o},t.generateECPolynomial=function(r){let s=new Uint8Array([1]);for(let o=0;o<r;o++)s=t.mul(s,new Uint8Array([1,e.exp(o)]));return s}})(nw)),nw}var rw,VD;function uae(){if(VD)return rw;VD=1;const t=lae();function e(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(r){this.degree=r,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const s=new Uint8Array(r.length+this.degree);s.set(r);const o=t.mod(s,this.genPoly),a=this.degree-o.length;if(a>0){const u=new Uint8Array(this.degree);return u.set(o,a),u}return o},rw=e,rw}var sw={},ow={},iw={},KD;function nF(){return KD||(KD=1,iw.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),iw}var go={},YD;function rF(){if(YD)return go;YD=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
77
- ]))+`;go.KANJI=new RegExp(n,"g"),go.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),go.BYTE=new RegExp(r,"g"),go.NUMERIC=new RegExp(t,"g"),go.ALPHANUMERIC=new RegExp(e,"g");const s=new RegExp("^"+n+"$"),o=new RegExp("^"+t+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return go.testKanji=function(c){return s.test(c)},go.testNumeric=function(c){return o.test(c)},go.testAlphanumeric=function(c){return a.test(c)},go}var ZD;function su(){return ZD||(ZD=1,(function(t){const e=nF(),n=rF();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,a){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?o.ccBits[0]:a<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return n.testNumeric(o)?t.NUMERIC:n.testAlphanumeric(o)?t.ALPHANUMERIC:n.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+s)}}t.from=function(o,a){if(t.isValid(o))return o;try{return r(o)}catch{return a}}})(ow)),ow}var XD;function cae(){return XD||(XD=1,(function(t){const e=ru(),n=tF(),r=FT(),s=su(),o=nF(),a=7973,u=e.getBCHDigit(a);function c(m,y,S){for(let E=1;E<=40;E++)if(y<=t.getCapacity(E,S,m))return E}function f(m,y){return s.getCharCountIndicator(m,y)+4}function p(m,y){let S=0;return m.forEach(function(E){const C=f(E.mode,y);S+=C+E.getBitsLength()}),S}function g(m,y){for(let S=1;S<=40;S++)if(p(m,S)<=t.getCapacity(S,y,s.MIXED))return S}t.from=function(y,S){return o.isValid(y)?parseInt(y,10):S},t.getCapacity=function(y,S,E){if(!o.isValid(y))throw new Error("Invalid QR Code version");typeof E>"u"&&(E=s.BYTE);const C=e.getSymbolTotalCodewords(y),w=n.getTotalCodewordsCount(y,S),x=(C-w)*8;if(E===s.MIXED)return x;const T=x-f(E,y);switch(E){case s.NUMERIC:return Math.floor(T/10*3);case s.ALPHANUMERIC:return Math.floor(T/11*2);case s.KANJI:return Math.floor(T/13);case s.BYTE:default:return Math.floor(T/8)}},t.getBestVersionForData=function(y,S){let E;const C=r.from(S,r.M);if(Array.isArray(y)){if(y.length>1)return g(y,C);if(y.length===0)return 1;E=y[0]}else E=y;return c(E.mode,E.getLength(),C)},t.getEncodedBits=function(y){if(!o.isValid(y)||y<7)throw new Error("Invalid QR Code version");let S=y<<12;for(;e.getBCHDigit(S)-u>=0;)S^=a<<e.getBCHDigit(S)-u;return y<<12|S}})(sw)),sw}var aw={},QD;function dae(){if(QD)return aw;QD=1;const t=ru(),e=1335,n=21522,r=t.getBCHDigit(e);return aw.getEncodedBits=function(o,a){const u=o.bit<<3|a;let c=u<<10;for(;t.getBCHDigit(c)-r>=0;)c^=e<<t.getBCHDigit(c)-r;return(u<<10|c)^n},aw}var lw={},uw,JD;function fae(){if(JD)return uw;JD=1;const t=su();function e(n){this.mode=t.NUMERIC,this.data=n.toString()}return e.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(r){let s,o,a;for(s=0;s+3<=this.data.length;s+=3)o=this.data.substr(s,3),a=parseInt(o,10),r.put(a,10);const u=this.data.length-s;u>0&&(o=this.data.substr(s),a=parseInt(o,10),r.put(a,u*3+1))},uw=e,uw}var cw,eL;function hae(){if(eL)return cw;eL=1;const t=su(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=t.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(s){let o;for(o=0;o+2<=this.data.length;o+=2){let a=e.indexOf(this.data[o])*45;a+=e.indexOf(this.data[o+1]),s.put(a,11)}this.data.length%2&&s.put(e.indexOf(this.data[o]),6)},cw=n,cw}var dw,tL;function pae(){return tL||(tL=1,dw=function(e){for(var n=[],r=e.length,s=0;s<r;s++){var o=e.charCodeAt(s);if(o>=55296&&o<=56319&&r>s+1){var a=e.charCodeAt(s+1);a>=56320&&a<=57343&&(o=(o-55296)*1024+a-56320+65536,s+=1)}if(o<128){n.push(o);continue}if(o<2048){n.push(o>>6|192),n.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){n.push(o>>12|224),n.push(o>>6&63|128),n.push(o&63|128);continue}if(o>=65536&&o<=1114111){n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer}),dw}var fw,nL;function gae(){if(nL)return fw;nL=1;const t=pae(),e=su();function n(r){this.mode=e.BYTE,this.data=new Uint8Array(t(r))}return n.getBitsLength=function(s){return s*8},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){for(let s=0,o=this.data.length;s<o;s++)r.put(this.data[s],8)},fw=n,fw}var hw,rL;function mae(){if(rL)return hw;rL=1;const t=su(),e=ru();function n(r){this.mode=t.KANJI,this.data=r}return n.getBitsLength=function(s){return s*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let s;for(s=0;s<this.data.length;s++){let o=e.toSJIS(this.data[s]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+`
78
- Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},hw=n,hw}var pw={exports:{}},sL;function vae(){return sL||(sL=1,(function(t){var e={single_source_shortest_paths:function(n,r,s){var o={},a={};a[r]=0;var u=e.PriorityQueue.make();u.push(r,0);for(var c,f,p,g,m,y,S,E,C;!u.empty();){c=u.pop(),f=c.value,g=c.cost,m=n[f]||{};for(p in m)m.hasOwnProperty(p)&&(y=m[p],S=g+y,E=a[p],C=typeof a[p]>"u",(C||E>S)&&(a[p]=S,u.push(p,S),o[p]=f))}if(typeof s<"u"&&typeof a[s]>"u"){var w=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(w)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var s=[],o=r;o;)s.push(o),n[o],o=n[o];return s.reverse(),s},find_path:function(n,r,s){var o=e.single_source_shortest_paths(n,r,s);return e.extract_shortest_path_from_predecessor_list(o,s)},PriorityQueue:{make:function(n){var r=e.PriorityQueue,s={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(s[o]=r[o]);return s.queue=[],s.sorter=n.sorter||r.default_sorter,s},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var s={value:n,cost:r};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(pw)),pw.exports}var oL;function yae(){return oL||(oL=1,(function(t){const e=su(),n=fae(),r=hae(),s=gae(),o=mae(),a=rF(),u=ru(),c=vae();function f(w){return unescape(encodeURIComponent(w)).length}function p(w,x,T){const R=[];let M;for(;(M=w.exec(T))!==null;)R.push({data:M[0],index:M.index,mode:x,length:M[0].length});return R}function g(w){const x=p(a.NUMERIC,e.NUMERIC,w),T=p(a.ALPHANUMERIC,e.ALPHANUMERIC,w);let R,M;return u.isKanjiModeEnabled()?(R=p(a.BYTE,e.BYTE,w),M=p(a.KANJI,e.KANJI,w)):(R=p(a.BYTE_KANJI,e.BYTE,w),M=[]),x.concat(T,R,M).sort(function(I,P){return I.index-P.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function m(w,x){switch(x){case e.NUMERIC:return n.getBitsLength(w);case e.ALPHANUMERIC:return r.getBitsLength(w);case e.KANJI:return o.getBitsLength(w);case e.BYTE:return s.getBitsLength(w)}}function y(w){return w.reduce(function(x,T){const R=x.length-1>=0?x[x.length-1]:null;return R&&R.mode===T.mode?(x[x.length-1].data+=T.data,x):(x.push(T),x)},[])}function S(w){const x=[];for(let T=0;T<w.length;T++){const R=w[T];switch(R.mode){case e.NUMERIC:x.push([R,{data:R.data,mode:e.ALPHANUMERIC,length:R.length},{data:R.data,mode:e.BYTE,length:R.length}]);break;case e.ALPHANUMERIC:x.push([R,{data:R.data,mode:e.BYTE,length:R.length}]);break;case e.KANJI:x.push([R,{data:R.data,mode:e.BYTE,length:f(R.data)}]);break;case e.BYTE:x.push([{data:R.data,mode:e.BYTE,length:f(R.data)}])}}return x}function E(w,x){const T={},R={start:{}};let M=["start"];for(let O=0;O<w.length;O++){const I=w[O],P=[];for(let k=0;k<I.length;k++){const H=I[k],U=""+O+k;P.push(U),T[U]={node:H,lastCount:0},R[U]={};for(let B=0;B<M.length;B++){const W=M[B];T[W]&&T[W].node.mode===H.mode?(R[W][U]=m(T[W].lastCount+H.length,H.mode)-m(T[W].lastCount,H.mode),T[W].lastCount+=H.length):(T[W]&&(T[W].lastCount=H.length),R[W][U]=m(H.length,H.mode)+4+e.getCharCountIndicator(H.mode,x))}}M=P}for(let O=0;O<M.length;O++)R[M[O]].end=0;return{map:R,table:T}}function C(w,x){let T;const R=e.getBestModeForData(w);if(T=e.from(x,R),T!==e.BYTE&&T.bit<R.bit)throw new Error('"'+w+'" cannot be encoded with mode '+e.toString(T)+`.
79
- Suggested mode is: `+e.toString(R));switch(T===e.KANJI&&!u.isKanjiModeEnabled()&&(T=e.BYTE),T){case e.NUMERIC:return new n(w);case e.ALPHANUMERIC:return new r(w);case e.KANJI:return new o(w);case e.BYTE:return new s(w)}}t.fromArray=function(x){return x.reduce(function(T,R){return typeof R=="string"?T.push(C(R,null)):R.data&&T.push(C(R.data,R.mode)),T},[])},t.fromString=function(x,T){const R=g(x,u.isKanjiModeEnabled()),M=S(R),O=E(M,T),I=c.find_path(O.map,"start","end"),P=[];for(let k=1;k<I.length-1;k++)P.push(O.table[I[k]].node);return t.fromArray(y(P))},t.rawSplit=function(x){return t.fromArray(g(x,u.isKanjiModeEnabled()))}})(lw)),lw}var iL;function bae(){if(iL)return YC;iL=1;const t=ru(),e=FT(),n=nae(),r=rae(),s=sae(),o=oae(),a=iae(),u=tF(),c=uae(),f=cae(),p=dae(),g=su(),m=yae();function y(O,I){const P=O.size,k=o.getPositions(I);for(let H=0;H<k.length;H++){const U=k[H][0],B=k[H][1];for(let W=-1;W<=7;W++)if(!(U+W<=-1||P<=U+W))for(let Y=-1;Y<=7;Y++)B+Y<=-1||P<=B+Y||(W>=0&&W<=6&&(Y===0||Y===6)||Y>=0&&Y<=6&&(W===0||W===6)||W>=2&&W<=4&&Y>=2&&Y<=4?O.set(U+W,B+Y,!0,!0):O.set(U+W,B+Y,!1,!0))}}function S(O){const I=O.size;for(let P=8;P<I-8;P++){const k=P%2===0;O.set(P,6,k,!0),O.set(6,P,k,!0)}}function E(O,I){const P=s.getPositions(I);for(let k=0;k<P.length;k++){const H=P[k][0],U=P[k][1];for(let B=-2;B<=2;B++)for(let W=-2;W<=2;W++)B===-2||B===2||W===-2||W===2||B===0&&W===0?O.set(H+B,U+W,!0,!0):O.set(H+B,U+W,!1,!0)}}function C(O,I){const P=O.size,k=f.getEncodedBits(I);let H,U,B;for(let W=0;W<18;W++)H=Math.floor(W/3),U=W%3+P-8-3,B=(k>>W&1)===1,O.set(H,U,B,!0),O.set(U,H,B,!0)}function w(O,I,P){const k=O.size,H=p.getEncodedBits(I,P);let U,B;for(U=0;U<15;U++)B=(H>>U&1)===1,U<6?O.set(U,8,B,!0):U<8?O.set(U+1,8,B,!0):O.set(k-15+U,8,B,!0),U<8?O.set(8,k-U-1,B,!0):U<9?O.set(8,15-U-1+1,B,!0):O.set(8,15-U-1,B,!0);O.set(k-8,8,1,!0)}function x(O,I){const P=O.size;let k=-1,H=P-1,U=7,B=0;for(let W=P-1;W>0;W-=2)for(W===6&&W--;;){for(let Y=0;Y<2;Y++)if(!O.isReserved(H,W-Y)){let ne=!1;B<I.length&&(ne=(I[B]>>>U&1)===1),O.set(H,W-Y,ne),U--,U===-1&&(B++,U=7)}if(H+=k,H<0||P<=H){H-=k,k=-k;break}}}function T(O,I,P){const k=new n;P.forEach(function(Y){k.put(Y.mode.bit,4),k.put(Y.getLength(),g.getCharCountIndicator(Y.mode,O)),Y.write(k)});const H=t.getSymbolTotalCodewords(O),U=u.getTotalCodewordsCount(O,I),B=(H-U)*8;for(k.getLengthInBits()+4<=B&&k.put(0,4);k.getLengthInBits()%8!==0;)k.putBit(0);const W=(B-k.getLengthInBits())/8;for(let Y=0;Y<W;Y++)k.put(Y%2?17:236,8);return R(k,O,I)}function R(O,I,P){const k=t.getSymbolTotalCodewords(I),H=u.getTotalCodewordsCount(I,P),U=k-H,B=u.getBlocksCount(I,P),W=k%B,Y=B-W,ne=Math.floor(k/B),$=Math.floor(U/B),ee=$+1,fe=ne-$,de=new c(fe);let Ae=0;const D=new Array(B),V=new Array(B);let K=0;const J=new Uint8Array(O.buffer);for(let _e=0;_e<B;_e++){const Xe=_e<Y?$:ee;D[_e]=J.slice(Ae,Ae+Xe),V[_e]=de.encode(D[_e]),Ae+=Xe,K=Math.max(K,Xe)}const oe=new Uint8Array(k);let he=0,ue,ve;for(ue=0;ue<K;ue++)for(ve=0;ve<B;ve++)ue<D[ve].length&&(oe[he++]=D[ve][ue]);for(ue=0;ue<fe;ue++)for(ve=0;ve<B;ve++)oe[he++]=V[ve][ue];return oe}function M(O,I,P,k){let H;if(Array.isArray(O))H=m.fromArray(O);else if(typeof O=="string"){let ne=I;if(!ne){const $=m.rawSplit(O);ne=f.getBestVersionForData($,P)}H=m.fromString(O,ne||40)}else throw new Error("Invalid data");const U=f.getBestVersionForData(H,P);if(!U)throw new Error("The amount of data is too big to be stored in a QR Code");if(!I)I=U;else if(I<U)throw new Error(`
80
- The chosen QR Code version cannot contain this amount of data.
81
- Minimum version required to store current data is: `+U+`.
82
- `);const B=T(I,P,H),W=t.getSymbolSize(I),Y=new r(W);return y(Y,I),S(Y),E(Y,I),w(Y,P,0),I>=7&&C(Y,I),x(Y,B),isNaN(k)&&(k=a.getBestMask(Y,w.bind(null,Y,P))),a.applyMask(k,Y),w(Y,P,k),{modules:Y,version:I,errorCorrectionLevel:P,maskPattern:k,segments:H}}return YC.create=function(I,P){if(typeof I>"u"||I==="")throw new Error("No input text");let k=e.M,H,U;return typeof P<"u"&&(k=e.from(P.errorCorrectionLevel,e.M),H=f.from(P.version),U=a.from(P.maskPattern),P.toSJISFunc&&t.setToSJISFunction(P.toSJISFunc)),M(I,H,k,U)},YC}var gw={},mw={},aL;function sF(){return aL||(aL=1,(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const s=parseInt(r.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const s=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,a=r.scale||4;return{width:o,scale:o?4:a,margin:s,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,s){return s.width&&s.width>=r+s.margin*2?s.width/(r+s.margin*2):s.scale},t.getImageWidth=function(r,s){const o=t.getScale(r,s);return Math.floor((r+s.margin*2)*o)},t.qrToImageData=function(r,s,o){const a=s.modules.size,u=s.modules.data,c=t.getScale(a,o),f=Math.floor((a+o.margin*2)*c),p=o.margin*c,g=[o.color.light,o.color.dark];for(let m=0;m<f;m++)for(let y=0;y<f;y++){let S=(m*f+y)*4,E=o.color.light;if(m>=p&&y>=p&&m<f-p&&y<f-p){const C=Math.floor((m-p)/c),w=Math.floor((y-p)/c);E=g[u[C*a+w]?1:0]}r[S++]=E.r,r[S++]=E.g,r[S++]=E.b,r[S]=E.a}}})(mw)),mw}var lL;function Sae(){return lL||(lL=1,(function(t){const e=sF();function n(s,o,a){s.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=a,o.width=a,o.style.height=a+"px",o.style.width=a+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,a,u){let c=u,f=a;typeof c>"u"&&(!a||!a.getContext)&&(c=a,a=void 0),a||(f=r()),c=e.getOptions(c);const p=e.getImageWidth(o.modules.size,c),g=f.getContext("2d"),m=g.createImageData(p,p);return e.qrToImageData(m.data,o,c),n(g,f,p),g.putImageData(m,0,0),f},t.renderToDataURL=function(o,a,u){let c=u;typeof c>"u"&&(!a||!a.getContext)&&(c=a,a=void 0),c||(c={});const f=t.render(o,a,c),p=c.type||"image/png",g=c.rendererOpts||{};return f.toDataURL(p,g.quality)}})(gw)),gw}var vw={},uL;function Eae(){if(uL)return vw;uL=1;const t=sF();function e(s,o){const a=s.a/255,u=o+'="'+s.hex+'"';return a<1?u+" "+o+'-opacity="'+a.toFixed(2).slice(1)+'"':u}function n(s,o,a){let u=s+o;return typeof a<"u"&&(u+=" "+a),u}function r(s,o,a){let u="",c=0,f=!1,p=0;for(let g=0;g<s.length;g++){const m=Math.floor(g%o),y=Math.floor(g/o);!m&&!f&&(f=!0),s[g]?(p++,g>0&&m>0&&s[g-1]||(u+=f?n("M",m+a,.5+y+a):n("m",c,0),c=0,f=!1),m+1<o&&s[g+1]||(u+=n("h",p),p=0)):c++}return u}return vw.render=function(o,a,u){const c=t.getOptions(a),f=o.modules.size,p=o.modules.data,g=f+c.margin*2,m=c.color.light.a?"<path "+e(c.color.light,"fill")+' d="M0 0h'+g+"v"+g+'H0z"/>':"",y="<path "+e(c.color.dark,"stroke")+' d="'+r(p,f,c.margin)+'"/>',S='viewBox="0 0 '+g+" "+g+'"',C='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+S+' shape-rendering="crispEdges">'+m+y+`</svg>
83
- `;return typeof u=="function"&&u(null,C),C},vw}var cL;function Cae(){if(cL)return Xu;cL=1;const t=tae(),e=bae(),n=Sae(),r=Eae();function s(o,a,u,c,f){const p=[].slice.call(arguments,1),g=p.length,m=typeof p[g-1]=="function";if(!m&&!t())throw new Error("Callback required as last argument");if(m){if(g<2)throw new Error("Too few arguments provided");g===2?(f=u,u=a,a=c=void 0):g===3&&(a.getContext&&typeof f>"u"?(f=c,c=void 0):(f=c,c=u,u=a,a=void 0))}else{if(g<1)throw new Error("Too few arguments provided");return g===1?(u=a,a=c=void 0):g===2&&!a.getContext&&(c=u,u=a,a=void 0),new Promise(function(y,S){try{const E=e.create(u,c);y(o(E,a,c))}catch(E){S(E)}})}try{const y=e.create(u,c);f(null,o(y,a,c))}catch(y){f(y)}}return Xu.create=e.create,Xu.toCanvas=s.bind(null,n.render),Xu.toDataURL=s.bind(null,n.renderToDataURL),Xu.toString=s.bind(null,function(o,a,u){return r.render(o,u)}),Xu}var wae=Cae();const _ae=qa(wae),xae=t=>t==="signIn"||t==="signUp",zT=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:Aae,getConfirmingText:Tae,getBackToSignInText:Rae,getResendCodeText:Iae}=kn,Gy=()=>{const{isPending:t,toSignIn:e,challengeName:n,resendCode:r,selectedAuthMethod:s,availableAuthMethods:o}=Ct(c=>[c.isPending,c.toSignIn,c.challengeName,c.resendCode,c.selectedAuthMethod,c.availableAuthMethods]),a=!!s&&s!=="PASSWORD"||!!o?.some(c=>c!=="PASSWORD"),u=zT(n)&&a&&r;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:Tae()},Aae()),u&&z.createElement(Jt,{onClick:r,type:"button"},Iae()),z.createElement(Jt,{onClick:e,type:"button",variation:"link",size:"small"},Rae()))},Oae=new nr("SetupTotp-logger"),{getSetupTotpText:Nae,getCopiedText:Mae,getLoadingText:Pae}=kn,Ua=({className:t,variation:e})=>{const{totpSecretCode:n,isPending:r,username:s,QRFields:o}=Ct(R=>[R.isPending,R.totpSecretCode,R.username]),{handleChange:a,handleSubmit:u}=ds(),{components:{SetupTotp:{Header:c=Ua.Header,Footer:f=Ua.Footer}}}=cs(),[p,g]=A.useState(!0),[m,y]=A.useState(),[S,E]=A.useState("COPY"),{totpIssuer:C="AWSCognito",totpUsername:w=s}=o??{},x=A.useCallback(async()=>{try{const R=Cee(C,w,n),M=await _ae.toDataURL(R);y(M)}catch(R){Oae.error(R)}finally{g(!1)}},[C,w,n]);A.useEffect(()=>{m||x()},[x,m]);const T=()=>{navigator.clipboard.writeText(n),E(Mae())};return A.createElement(qr,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-totp":"",method:"post",onChange:a,onSubmit:u},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:r},A.createElement(c,null),A.createElement(Fe,{direction:"column"},p?A.createElement("p",null,Pae(),"…"):A.createElement("img",{"data-amplify-qrcode":!0,src:m,alt:"qr code",width:"228",height:"228"}),A.createElement(Fe,{"data-amplify-copy":!0},A.createElement("div",null,n),A.createElement(Fe,{"data-amplify-copy-svg":!0,onClick:T},A.createElement("div",{"data-amplify-copy-tooltip":!0},S),A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z"})))),A.createElement(Mo,null),A.createElement(Wr,null)),A.createElement(Gy,null),A.createElement(f,null))))};Ua.Header=function(){return A.createElement(wr,{level:3},Nae())};Ua.Footer=function(){return null};const{getSubmitText:kae,getSubmittingText:Dae}=kn,Vy=t=>{const{cancelButtonSendType:e,cancelButtonText:n,submitButtonText:r}=t,{isPending:s,resendCode:o,skipVerification:a,toSignIn:u}=Ct(g=>[g.isPending]),c=()=>{switch(e){case"SKIP":a();break;case"RESEND":o();break;case"SIGN_IN":u();break;default:return}},f=s?z.createElement(z.Fragment,null,Dae(),"…"):z.createElement(z.Fragment,null,kae()),p=r??f;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{variation:"primary",isDisabled:s,type:"submit"},p),z.createElement(Fe,{direction:"column",alignItems:"center"},z.createElement(Jt,{onClick:c,type:"button",variation:"link",size:"small"},n)))},Lae=()=>z.createElement("svg",{"aria-label":"Apple icon",className:"amplify-icon federated-sign-in-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},z.createElement("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})),Uae=()=>z.createElement("svg",{"aria-label":"Google icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},z.createElement("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),z.createElement("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),z.createElement("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),z.createElement("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})),Fae=()=>z.createElement(F9,{className:"federated-sign-in-icon",ariaLabel:"Facebook icon",viewBox:{minX:0,minY:0,width:279,height:538},pathData:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"}),zae=()=>z.createElement("svg",{"aria-label":"Amazon icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 243 264",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},z.createElement("path",{d:"M230.826 208.039C227.468 203.683 208.551 205.982 200.056 206.998C197.471 207.321 197.076 205.042 199.407 203.405C214.475 192.665 239.201 195.766 242.082 199.364C244.966 202.982 241.337 228.071 227.173 240.049C225.001 241.888 222.93 240.904 223.898 238.468C227.077 230.431 234.205 212.419 230.826 208.039ZM123.769 264C71.0234 264 39.0764 241.955 14.7853 217.542C9.97339 212.706 3.71799 206.296 0.311513 200.691C-1.09773 198.372 2.59096 195.022 5.04421 196.844C35.239 219.268 79.1012 239.538 122.53 239.538C151.82 239.538 188.046 227.47 217.669 214.868C222.147 212.966 222.147 219.18 221.512 221.061C221.183 222.032 206.515 236.221 186.247 247.047C167.304 257.166 143.397 264 123.769 264Z",fill:"#F2541B"}),z.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M142.943 111.185C142.943 124.756 143.268 136.054 136.406 148.123C130.856 157.913 122.027 163.95 112.222 163.95C98.8288 163.95 90.9806 153.772 90.9806 138.693C90.9806 109.036 117.677 103.647 142.943 103.647V111.185ZM178.166 196.081C175.858 198.15 171.635 198.22 169.914 196.894C157.974 187.684 149.89 173.688 149.89 173.688C130.706 193.156 117.127 199 92.2879 199C62.8772 199 40 180.905 40 144.729C40 116.461 55.3552 97.2408 77.2563 87.823C96.2094 79.5256 122.684 78.0173 142.943 75.7517C142.943 75.7517 144.633 53.933 138.699 45.9806C134.098 39.8163 126.272 36.9329 119.089 36.9329C106.127 36.8829 93.61 43.9051 91.1262 57.4188C90.4136 61.2829 87.5533 64.5261 84.54 64.206L51.0823 60.5922C48.5156 60.2951 45.0381 57.6639 45.8636 53.3081C53.644 12.3684 90.7373 0 123.989 0C140.983 0 163.21 4.51651 176.608 17.3349C193.597 33.1648 191.969 54.2755 191.969 77.2722V131.51C191.969 147.835 198.768 154.987 205.151 163.775C207.376 166.953 207.886 170.714 205.04 173.032C197.902 178.999 178.166 196.081 178.166 196.081Z",fill:"#F2541B"})),Kg=t=>{const{icon:e,provider:n,text:r}=t,{toFederatedSignIn:s}=Ct(),o=u=>{u.preventDefault(),s({provider:n})};let a;return e==="facebook"?a=z.createElement(Fae,null):e==="google"?a=z.createElement(Uae,null):e==="amazon"?a=z.createElement(zae,null):e==="apple"&&(a=z.createElement(Lae,null)),z.createElement(Jt,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,z.createElement(As,{as:"span"},r))},{getSignInWithFederationText:Yg,getOrText:Bae}=kn;function oF(){const{route:t,socialProviders:e}=Ct(({route:n,socialProviders:r})=>[n,r]);return e.length===0?null:z.createElement(Fe,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},e.map(n=>{switch(n){case"amazon":return z.createElement(Kg,{icon:"amazon",key:n,provider:yc.Amazon,text:Yg(t,n)});case"apple":return z.createElement(Kg,{icon:"apple",key:n,provider:yc.Apple,text:Yg(t,n)});case"facebook":return z.createElement(Kg,{icon:"facebook",key:n,provider:yc.Facebook,text:Yg(t,n)});case"google":return z.createElement(Kg,{icon:"google",key:n,provider:yc.Google,text:Yg(t,n)});default:console.error(`Authenticator does not support ${n}. Please open an issue: https://github.com/aws-amplify/amplify-ui/issues/choose`)}}),z.createElement(OT,{size:"small",label:Bae()}))}const{getSignInText:Zg,getSigningInText:jae,getForgotPasswordText:Hae,getSignInWithEmailText:$ae,getSignInWithSmsText:qae,getSignInWithPasskeyText:Wae,getOtherSignInOptionsText:Gae,getEnterUsernameFirstText:Vae}=kn;function Si(){const{isPending:t,availableAuthMethods:e,preferredChallenge:n,toShowAuthMethods:r}=Ct(w=>[w.isPending,w.availableAuthMethods,w.preferredChallenge,w.toShowAuthMethods]),{handleChange:s,handleSubmit:o}=ds(),[a,u]=z.useState(""),{components:{SignIn:{Header:c=Si.Header,Footer:f=Si.Footer}}}=cs(),g=e&&e.length>1&&n,m=a.trim().length>0,y=z.useCallback(w=>{const{name:x,value:T}=w.target;x==="username"&&typeof T=="string"&&u(T),s(w)},[s]),S=()=>{if(!n)return Zg();switch(n){case"EMAIL_OTP":return $ae();case"SMS_OTP":return qae();case"WEB_AUTHN":return Wae();default:return Zg()}},E=w=>{w.preventDefault(),o(w)},C=w=>{w.preventDefault(),r()};return z.createElement($e,null,z.createElement(c,null),z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signin":"",method:"post",onSubmit:g?E:o,onChange:y},z.createElement(oF,null),z.createElement(Fe,{direction:"column"},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:t},z.createElement(qy,null,z.createElement("legend",null,Zg())),z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:jae()},g?S():Zg()),g&&z.createElement(Jt,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:Vae()},Gae()),z.createElement(f,null))))}const Kae=()=>{const{toForgotPassword:t}=Ct(e=>[e.toForgotPassword]);return z.createElement($e,{"data-amplify-footer":""},z.createElement(Jt,{onClick:t,size:"small",variation:"link"},Hae()))};Si.Footer=Kae;Si.Header=function(){return null};const{getCreateAccountText:dL,getCreatingAccountText:Yae,getCreateAccountWithEmailText:Zae,getCreateAccountWithPasswordText:Xae,getCreateAccountWithSmsText:Qae,getOrText:Jae}=kn;function Zs(){const{hasValidationErrors:t,isPending:e,availableAuthMethods:n,preferredChallenge:r,selectedAuthMethod:s}=Ct(T=>[T.hasValidationErrors,T.isPending,T.availableAuthMethods,T.preferredChallenge,T.selectedAuthMethod]),{handleChange:o,handleBlur:a,handleSubmit:u}=ds(),{components:{SignUp:{Header:c=Zs.Header,FormFields:f=Zs.FormFields,Footer:p=Zs.Footer}}}=cs(),g=n?.filter(T=>T!=="WEB_AUTHN"),m=g&&g.length>1,y=r&&r!=="WEB_AUTHN"?r:"PASSWORD",S=g?.filter(T=>T!==y)??[],C=(s??y)!=="PASSWORD",w=T=>{switch(T){case"EMAIL_OTP":return Zae();case"SMS_OTP":return Qae();case"PASSWORD":return m?Xae():dL();default:return dL()}},x=T=>R=>{R.preventDefault();const M=R.target.closest("form");if(M){if(!M.__authMethod){const O=document.createElement("input");O.name="__authMethod",M.appendChild(O)}M.__authMethod.type="hidden",M.__authMethod.value=T,M.requestSubmit()}};return z.createElement($e,null,z.createElement(c,null),z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signup":"",method:"post",onChange:o,onSubmit:u,onBlur:a},z.createElement(oF,null),z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:e},z.createElement(Fe,{direction:"column"},z.createElement(f,{includePassword:!C}),z.createElement(Wr,null)),z.createElement(Jt,{isDisabled:(!m||S.length==0)&&t||e,isFullWidth:!0,type:"submit",variation:"primary",isLoading:e,loadingText:Yae(),onClick:x(y)},w(y)),m&&S.length>0&&z.createElement(z.Fragment,null,z.createElement(Fe,{justifyContent:"center",padding:"medium 0"},Jae()),S.map(T=>z.createElement(Jt,{key:T,isDisabled:e,isFullWidth:!0,type:"button",variation:"primary",onClick:x(T)},w(T)))),z.createElement(p,null))))}Zs.Header=function(){return null};Zs.FormFields=function(){return z.createElement(Mo,null)};Zs.Footer=function(){return null};const{getSignInTabText:ele,getSignUpTabText:tle}=kn,nle=({className:t,hideSignUp:e,variation:n})=>{const{route:r,toSignIn:s,toSignUp:o}=Ct(a=>[a.route,a.toSignIn,a.toSignUp]);return z.createElement(qr,{className:t,variation:n},e?z.createElement($e,{"data-amplify-router-content":""},r==="signIn"&&z.createElement(Si,null)):z.createElement(Sl.Container,{value:r,isLazy:!0,onValueChange:a=>{a!==r&&(a==="signIn"?s():o())}},z.createElement(Sl.List,{spacing:"equal",indicatorPosition:"top"},z.createElement(Sl.Item,{value:"signIn"},ele()),z.createElement(Sl.Item,{value:"signUp"},tle())),z.createElement(Sl.Panel,{value:"signIn","data-amplify-router-content":""},z.createElement(Si,null)),z.createElement(Sl.Panel,{value:"signUp","data-amplify-router-content":""},z.createElement(Zs,null))))},{getAccountRecoveryInfoText:rle,getSkipText:sle}=kn,Bl=({className:t,variation:e})=>{const{isPending:n}=Ct(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ConfirmVerifyUser:{Header:o=Bl.Header,Footer:a=Bl.Footer}}}=cs();return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmverifyuser":"",method:"post",onChange:r,onSubmit:s},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(o,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(Vy,{cancelButtonText:sle(),cancelButtonSendType:"SKIP"}),z.createElement(a,null))))};Bl.Header=function(){return z.createElement(wr,{level:3},rle())};Bl.Footer=function(){return null};const{getSkipText:ole,getVerifyText:ile,getVerifyContactText:ale,getAccountRecoveryInfoText:lle}=kn,ule=t=>Object.entries(t).map(([e,n],r)=>{const s=Py[e].label;return z.createElement(MT,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",See(s,n))}),jl=({className:t,variation:e})=>{const{components:{VerifyUser:{Header:n=jl.Header,Footer:r=jl.Footer}}}=cs(),{isPending:s,unverifiedUserAttributes:o}=Ct(({isPending:p,unverifiedUserAttributes:g})=>[p,g]),{handleChange:a,handleSubmit:u}=ds(),c=s?z.createElement(z.Fragment,null,"Verifying…"):z.createElement(z.Fragment,null,ile()),f=z.createElement(PT,{legend:ale(),name:"verify_context",isDisabled:s,legendHidden:!0},ule(o));return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-verifyuser":"",method:"post",onChange:a,onSubmit:u},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:s},z.createElement(n,null),f,z.createElement(Wr,null),z.createElement(Vy,{cancelButtonText:ole(),cancelButtonSendType:"SKIP",submitButtonText:c}),z.createElement(r,null))))};jl.Header=function(){return z.createElement(wr,{level:3},lle())};jl.Footer=function(){return null};const{getChallengeText:cle,getDeliveryMessageText:dle,getDeliveryMethodText:fle}=kn,Hl=({className:t,variation:e})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:s}=Ct(p=>[p.isPending,p.challengeName,p.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=ds(),{components:{ConfirmSignIn:{Header:u=Hl.Header,Footer:c=Hl.Footer}}}=cs(),f=zT(r)&&s;return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignin":"",method:"post",onChange:o,onSubmit:a},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(u,null),z.createElement(Fe,{direction:"column"},f&&z.createElement(As,{className:"amplify-authenticator__subtitle"},dle(s)),z.createElement(Mo,null),z.createElement(Wr,null)),z.createElement(Gy,null),z.createElement(c,null))))};function hle(){const{challengeName:t,codeDeliveryDetails:e}=Ct(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=zT(t)&&e;return z.createElement(z.Fragment,null,z.createElement(wr,{level:3},cle(t)),n&&z.createElement(wr,{level:5},fle(e)))}Hl.Header=hle;Hl.Footer=function(){return null};const{getResendCodeText:ple,getResetYourPasswordText:gle}=kn,$l=({className:t,variation:e})=>{const{isPending:n}=Ct(c=>[c.isPending]),{handleBlur:r,handleChange:s,handleSubmit:o}=ds(),{components:{ConfirmResetPassword:{Header:a=$l.Header,Footer:u=$l.Footer}}}=cs();return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmresetpassword":"",method:"post",onSubmit:o,onChange:s,onBlur:r},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(a,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(Vy,{cancelButtonSendType:"RESEND",cancelButtonText:ple()}),z.createElement(u,null))))};$l.Header=function(){const e=gle();return z.createElement(wr,{level:3},e)};$l.Footer=function(){return null};const{getBackToSignInText:mle,getSendingText:vle,getSendCodeText:yle,getResetYourPasswordText:ble}=kn,Fa=({className:t,variation:e})=>{const{isPending:n}=Ct(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ForgotPassword:{Header:o=Fa.Header,Footer:a=Fa.Footer}}}=cs();return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forgotpassword":"",method:"post",onChange:r,onSubmit:s},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(o,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(Vy,{cancelButtonText:mle(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?z.createElement(z.Fragment,null,vle(),"…"):z.createElement(z.Fragment,null,yle())}),z.createElement(a,null))))};Fa.Header=function(){return z.createElement(wr,{level:3},ble())};Fa.Footer=function(){return null};const{getMfaTypeLabelByValue:Sle,getSelectMfaTypeByChallengeName:Ele,getSelectMfaTypeText:Cle}=kn,za=({className:t,variation:e})=>{const{isPending:n,allowedMfaTypes:r=[]}=Ct(c=>[c.isPending,c.allowedMfaTypes]),{handleChange:s,handleSubmit:o}=ds(),{components:{SelectMfaType:{Header:a=za.Header,Footer:u=za.Footer}}}=cs();return A.createElement(qr,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-select-mfa-type":"",method:"post",onChange:s,onSubmit:o},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},A.createElement(a,null),A.createElement(Fe,{direction:"column"},A.createElement(PT,{name:"mfa_type",legend:Cle(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>A.createElement(MT,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},Sle(c)))),A.createElement(Wr,null)),A.createElement(Gy,null),A.createElement(u,null))))};za.Header=function(){const{challengeName:e}=Ct(n=>[n.challengeName]);return A.createElement(wr,{level:3},Ele(e))};za.Footer=function(){return null};const{getSetupEmailText:wle}=kn,Ba=({className:t,variation:e})=>{const{isPending:n}=Ct(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{SetupEmail:{Header:o=Ba.Header,Footer:a=Ba.Footer}}}=cs();return A.createElement(qr,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-email":"",method:"post",onChange:r,onSubmit:s},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},A.createElement(o,null),A.createElement(Fe,{direction:"column"},A.createElement(Mo,null),A.createElement(Wr,null)),A.createElement(Gy,null),A.createElement(a,null))))};Ba.Header=function(){return A.createElement(wr,{level:3},wle())};Ba.Footer=function(){return null};const{getSignInWithPasswordText:nx,getSignInWithEmailText:_le,getSignInWithSmsText:xle,getSignInWithPasskeyText:Ale,getSigningInText:Tle,getBackToSignInText:Rle,getOrText:Ile,getUsernameLabelByLoginMechanism:Ole}=kn,Nle=t=>{switch(t){case"EMAIL_OTP":return _le();case"SMS_OTP":return xle();case"WEB_AUTHN":return Ale();case"PASSWORD":return nx();default:return nx()}},Mle=({className:t,variation:e})=>{const{isPending:n,username:r,availableAuthMethods:s,toSignIn:o,selectAuthMethod:a,loginMechanism:u}=Ct(E=>[E.isPending,E.username,E.availableAuthMethods,E.toSignIn,E.selectAuthMethod,E.loginMechanism]),{handleChange:c,handleSubmit:f}=ds(),p=s??[],g=p.includes("PASSWORD"),m=p.filter(E=>E!=="PASSWORD"),y=E=>{a({method:E})},S=Ole(u);return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":!0,"data-amplify-authenticator-signinselect":!0,method:"post",onSubmit:f,onChange:c},z.createElement(Fe,{direction:"column"},z.createElement(np,{label:S,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),g&&z.createElement(z.Fragment,null,z.createElement(NT,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),z.createElement(Jt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:Tle()},nx())),g&&m.length>0&&z.createElement(OT,{label:Ile()}),m.length>0&&z.createElement(Fe,{direction:"column",gap:"0.5rem"},m.map(E=>z.createElement(Jt,{key:E,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>y(E)},Nle(E)))),z.createElement(Wr,null),z.createElement(Jt,{onClick:o,size:"small",variation:"link",isDisabled:n},Rle()))))},Ple=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M22.9333 38.9333L41.7333 20.1333L38 16.4L22.9333 31.4667L15.3333 23.8667L11.6 27.6L22.9333 38.9333ZM26.6667 53.3333C22.9778 53.3333 19.5111 52.6333 16.2667 51.2333C13.0222 49.8333 10.2 47.9333 7.8 45.5333C5.4 43.1333 3.5 40.3111 2.1 37.0667C0.7 33.8222 0 30.3556 0 26.6667C0 22.9778 0.7 19.5111 2.1 16.2667C3.5 13.0222 5.4 10.2 7.8 7.8C10.2 5.4 13.0222 3.5 16.2667 2.1C19.5111 0.7 22.9778 0 26.6667 0C30.3556 0 33.8222 0.7 37.0667 2.1C40.3111 3.5 43.1333 5.4 45.5333 7.8C47.9333 10.2 49.8333 13.0222 51.2333 16.2667C52.6333 19.5111 53.3333 22.9778 53.3333 26.6667C53.3333 30.3556 52.6333 33.8222 51.2333 37.0667C49.8333 40.3111 47.9333 43.1333 45.5333 45.5333C43.1333 47.9333 40.3111 49.8333 37.0667 51.2333C33.8222 52.6333 30.3556 53.3333 26.6667 53.3333Z",fill:"currentColor"})))},kle=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"195",height:"128",viewBox:"0 0 195 128",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("circle",{cx:"60",cy:"36",r:"31",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M60 69C84.4313 69 105.396 83.8504 114.357 105.021C116.774 110.729 115.382 116.168 111.798 120.23C108.191 124.319 102.358 127 96 127H24C17.6416 127 11.8094 124.319 8.20215 120.23C4.61836 116.168 3.22626 110.729 5.64258 105.021C14.6036 83.8504 35.5687 69 60 69Z",stroke:"#00404D",strokeWidth:"2"}),A.createElement("circle",{cx:"122",cy:"26",r:"25",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),A.createElement("mask",{id:"path-4-inside-1_4178_10171",fill:"white"},A.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z"})),A.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z",fill:"#00404D",stroke:"#00404D",strokeWidth:"4",mask:"url(#path-4-inside-1_4178_10171)"}),A.createElement("circle",{cx:"167.5",cy:"49.5",r:"19.5",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M167.89 43.65L161.26 54.18H167.89",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M167.5 60.42C173.316 60.42 178.03 55.7056 178.03 49.89V48.72",stroke:"#00404D",strokeWidth:"2"}),A.createElement("circle",{cx:"173.74",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),A.createElement("circle",{cx:"160.48",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M104 112C116.129 112 126.457 104.288 130.347 93.5H147.5L155.5 101.5L168 89L180.5 101.5L193 89L180.5 76.5H130.984C127.705 64.6779 116.866 56 104 56C88.536 56 76 68.536 76 84C76 99.464 88.536 112 104 112ZM104 98C111.732 98 118 91.732 118 84C118 76.268 111.732 70 104 70C96.268 70 90 76.268 90 84C90 91.732 96.268 98 104 98Z",fill:"#BCECF5"}),A.createElement("path",{d:"M130.347 93.5V92.5H129.645L129.407 93.1608L130.347 93.5ZM147.5 93.5L148.207 92.7929L147.914 92.5H147.5V93.5ZM155.5 101.5L154.793 102.207L155.5 102.914L156.207 102.207L155.5 101.5ZM168 89L168.707 88.2929L168 87.5858L167.293 88.2929L168 89ZM180.5 101.5L179.793 102.207L180.5 102.914L181.207 102.207L180.5 101.5ZM193 89L193.707 89.7071L194.414 89L193.707 88.2929L193 89ZM180.5 76.5L181.207 75.7929L180.914 75.5H180.5V76.5ZM130.984 76.5L130.021 76.7673L130.224 77.5H130.984V76.5ZM129.407 93.1608C125.655 103.565 115.694 111 104 111V113C116.564 113 127.259 105.011 131.288 93.8392L129.407 93.1608ZM147.5 92.5H130.347V94.5H147.5V92.5ZM156.207 100.793L148.207 92.7929L146.793 94.2071L154.793 102.207L156.207 100.793ZM167.293 88.2929L154.793 100.793L156.207 102.207L168.707 89.7071L167.293 88.2929ZM181.207 100.793L168.707 88.2929L167.293 89.7071L179.793 102.207L181.207 100.793ZM192.293 88.2929L179.793 100.793L181.207 102.207L193.707 89.7071L192.293 88.2929ZM179.793 77.2071L192.293 89.7071L193.707 88.2929L181.207 75.7929L179.793 77.2071ZM130.984 77.5H180.5V75.5H130.984V77.5ZM104 57C116.405 57 126.859 65.3669 130.021 76.7673L131.948 76.2327C128.552 63.9889 117.327 55 104 55V57ZM77 84C77 69.0883 89.0883 57 104 57V55C87.9837 55 75 67.9837 75 84H77ZM104 111C89.0883 111 77 98.9117 77 84H75C75 100.016 87.9837 113 104 113V111ZM117 84C117 91.1797 111.18 97 104 97V99C112.284 99 119 92.2843 119 84H117ZM104 71C111.18 71 117 76.8203 117 84H119C119 75.7157 112.284 69 104 69V71ZM91 84C91 76.8203 96.8203 71 104 71V69C95.7157 69 89 75.7157 89 84H91ZM104 97C96.8203 97 91 91.1797 91 84H89C89 92.2843 95.7157 99 104 99V97Z",fill:"#00404D"}),A.createElement("path",{d:"M138.5 57V66",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M139 104V124",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M134 61.5L143 61.5",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M129 114L149 114",stroke:"#00404D",strokeWidth:"2"})))},{getPasskeyPromptHeadingText:Dle,getPasskeyPromptDescriptionText:Lle,getCreatePasskeyText:Ule,getRegisteringText:Fle,getContinueWithoutPasskeyText:zle,getPasskeyCreatedSuccessText:Ble,getPasskeyRegisteredText:jle,getPasskeyRegistrationFailedText:Hle,getPasskeyLabelText:$le,getExistingPasskeysText:qle,getSetupAnotherPasskeyText:Wle,getContinueText:Gle}=kn;function Vle({className:t,variation:e}){const[n,r]=z.useState(!1),[s,o]=z.useState(null),[a,u]=z.useState(!1),[c,f]=z.useState([]),{submitForm:p,isPending:g}=Ct(w=>[w.submitForm,w.isPending]),m=z.useCallback(async()=>{try{const w=await uT();f(w.credentials||[])}catch{}},[]);z.useEffect(()=>{n&&m()},[n,m]);const y=z.useCallback(()=>{p({type:"SKIP"})},[p]),S=z.useCallback(()=>{p({type:"SUBMIT"})},[p]),E=z.useCallback(async()=>{try{o(null),u(!0),await jJ(),r(!0)}catch(w){const x=w,T=x.name??"",R=x.message??"";if(T==="PasskeyRegistrationCanceled"||T==="NotAllowedError"||R.includes("canceled")||R.includes("cancelled")||R.includes("ceremony has been canceled")||R.includes("not allowed")){y();return}o(Hle())}finally{u(!1)}},[y]);if(n)return z.createElement(qr,{className:t,variation:e},z.createElement(Fe,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"xs"},z.createElement(Ple,{className:"amplify-authenticator__passkey-success-icon"}),z.createElement(wr,{level:4},Ble()),z.createElement(As,null,jle())),c.length>0&&z.createElement($e,{marginTop:"large"},z.createElement(wr,{level:5},qle()),z.createElement(Fe,{direction:"column",gap:"xs",marginTop:"xs"},c.map((w,x)=>z.createElement($e,{key:w.credentialId,className:"amplify-authenticator__passkey-credential-item"},z.createElement(As,{fontSize:"small"},w.friendlyCredentialName??`${$le()} ${x+1}`))))),z.createElement(Fe,{direction:"column",gap:"medium",marginTop:"large"},z.createElement(Jt,{onClick:()=>{r(!1),E()},variation:"link"},Wle()),z.createElement(Jt,{onClick:()=>S(),variation:"primary",isFullWidth:!0},Gle()))));const C=g||a;return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(wr,{level:4},Dle()),z.createElement(As,null,Lle()),z.createElement(Fe,{justifyContent:"center"},z.createElement(kle,{className:"amplify-authenticator__passkey-icon"})),z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(Jt,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:Fle()},Ule()),z.createElement(Jt,{onClick:y,variation:"link",isDisabled:C},zle()),s&&z.createElement(As,{className:"amplify-authenticator__passkey-error"},s),z.createElement(Wr,null)))))}function fL(){return null}const Kle=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return fL;case"confirmSignUp":return zl;case"confirmSignIn":return Hl;case"selectMfaType":return za;case"setupEmail":return Ba;case"setupTotp":return Ua;case"signIn":case"signUp":return nle;case"signInSelectAuthFactor":return Mle;case"passkeyPrompt":return Vle;case"forceNewPassword":return Ys;case"forgotPassword":return Fa;case"confirmResetPassword":return $l;case"verifyUser":return jl;case"confirmVerifyUser":return Bl;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${t}`),fL}};function Yle({className:t,hideSignUp:e,variation:n}){const{route:r}=Ct(({route:o})=>[o]),s=A.useMemo(()=>Kle(r),[r]);return z.createElement(s,{className:t,hideSignUp:xae(r)?e:void 0,variation:n})}const Zle={Header:()=>null,SignIn:{Header:Si.Header,Footer:Si.Footer},SignUp:{Header:Zs.Header,FormFields:Zs.FormFields,Footer:Zs.Footer},ConfirmSignUp:{Header:zl.Header,Footer:zl.Footer},SelectMfaType:{Header:za.Header,Footer:za.Footer},SetupEmail:{Header:Ba.Header,Footer:Ba.Footer},SetupTotp:{Header:Ua.Header,Footer:Ua.Footer},ConfirmResetPassword:{Header:$l.Header,Footer:$l.Footer},ConfirmSignIn:{Header:Hl.Header,Footer:Hl.Footer},VerifyUser:{Header:jl.Header,Footer:jl.Footer},ConfirmVerifyUser:{Header:Bl.Header,Footer:Bl.Footer},ForceNewPassword:{Header:Ys.Header,Footer:Ys.Footer,FormFields:Ys.FormFields},ForgotPassword:{Header:Fa.Header,Footer:Fa.Footer},Footer:()=>null};function Xle({children:t,className:e,components:n,formFields:r,hideSignUp:s,initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,signUpAttributes:f,services:p,socialProviders:g,variation:m}){Wie({message:"The `passwordSettings` prop has been deprecated and will be removed in a future major version of Amplify UI.",shouldWarn:!1});const{route:y,signOut:S,user:E}=Ct(({route:x,signOut:T,user:R})=>[x,T,R]);Coe({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:p,signUpAttributes:f,socialProviders:g,formFields:r});const C=A.useMemo(()=>({components:{...Zle,...n}}),[n]);return y==="authenticated"||y==="signOut"?t?A.createElement(A.Fragment,null,yi(t)?t({signOut:S,user:E}):t):null:A.createElement(J9.Provider,{value:C},A.createElement(Yle,{className:e,hideSignUp:s,variation:m}))}function Po(t){return _oe({componentName:"Authenticator",packageName:"react",version:qie}),A.createElement(D9,null,A.createElement(Xle,{...t}))}Po.Provider=D9;Po.ForgotPassword=Fa;Po.SetupTotp=Ua;Po.SignIn=Si;Po.SignUp=Zs;Po.ForceNewPassword=Ys;Po.SelectMfaType=za;Po.SetupEmail=Ba;const iF=({cssText:t,...e})=>t===void 0||/<\/style/i.test(t)?null:A.createElement("style",{...e,dangerouslySetInnerHTML:{__html:t}});iF.displayName="Style";const aF=({theme:t,...e})=>{if(!t)return null;const{name:n,cssText:r}=t;return A.createElement(iF,{...e,cssText:r,id:`amplify-theme-${n}`})};aF.displayName="ThemeStyle";function Qle({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=A.useMemo(()=>({theme:zy(s),colorMode:e}),[s,e]);return A.createElement(L9.Provider,{value:o},A.createElement(Eie,{dir:n},A.createElement("div",{"data-amplify-theme":o.theme.name,"data-amplify-color-mode":e,dir:n},t),s?A.createElement(aF,{theme:o.theme,nonce:r}):null))}const Jle=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lF=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();var eue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const tue=A.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...u},c)=>A.createElement("svg",{ref:c,...eue,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:lF("lucide",s),...u},[...a.map(([f,p])=>A.createElement(f,p)),...Array.isArray(o)?o:[o]]));const Ns=(t,e)=>{const n=A.forwardRef(({className:r,...s},o)=>A.createElement(tue,{ref:o,iconNode:e,className:lF(`lucide-${Jle(t)}`,r),...s}));return n.displayName=`${t}`,n};const hL=Ns("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const nue=Ns("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const rue=Ns("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);const sue=Ns("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);const oue=Ns("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);const iue=Ns("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const aue=Ns("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const lue=Ns("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);const uue=Ns("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const cue=Ns("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const due=Ns("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);const rx=Ns("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function uF(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=uF(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function cF(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=uF(t))&&(r&&(r+=" "),r+=e);return r}const BT="-",fue=t=>{const e=pue(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const u=a.split(BT);return u[0]===""&&u.length!==1&&u.shift(),dF(u,e)||hue(a)},getConflictingClassGroupIds:(a,u)=>{const c=n[a]||[];return u&&r[a]?[...c,...r[a]]:c}}},dF=(t,e)=>{if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?dF(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const o=t.join(BT);return e.validators.find(({validator:a})=>a(o))?.classGroupId},pL=/^\[(.+)\]$/,hue=t=>{if(pL.test(t)){const e=pL.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},pue=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return mue(Object.entries(t.classGroups),n).forEach(([o,a])=>{sx(a,r,o,e)}),r},sx=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const o=s===""?e:gL(e,s);o.classGroupId=n;return}if(typeof s=="function"){if(gue(s)){sx(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,a])=>{sx(a,gL(e,o),n,r)})})},gL=(t,e)=>{let n=t;return e.split(BT).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},gue=t=>t.isThemeGetter,mue=(t,e)=>e?t.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,u])=>[e+a,u])):o);return[n,s]}):t,vue=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(o,a)=>{n.set(o,a),e++,e>t&&(e=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return s(o,a),a},set(o,a){n.has(o)?n.set(o,a):s(o,a)}}},fF="!",yue=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],o=e.length,a=u=>{const c=[];let f=0,p=0,g;for(let C=0;C<u.length;C++){let w=u[C];if(f===0){if(w===s&&(r||u.slice(C,C+o)===e)){c.push(u.slice(p,C)),p=C+o;continue}if(w==="/"){g=C;continue}}w==="["?f++:w==="]"&&f--}const m=c.length===0?u:u.substring(p),y=m.startsWith(fF),S=y?m.substring(1):m,E=g&&g>p?g-p:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:E}};return n?u=>n({className:u,parseClassName:a}):a},bue=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},Sue=t=>({cache:vue(t.cacheSize),parseClassName:yue(t),...fue(t)}),Eue=/\s+/,Cue=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,o=[],a=t.trim().split(Eue);let u="";for(let c=a.length-1;c>=0;c-=1){const f=a[c],{modifiers:p,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:y}=n(f);let S=!!y,E=r(S?m.substring(0,y):m);if(!E){if(!S){u=f+(u.length>0?" "+u:u);continue}if(E=r(m),!E){u=f+(u.length>0?" "+u:u);continue}S=!1}const C=bue(p).join(":"),w=g?C+fF:C,x=w+E;if(o.includes(x))continue;o.push(x);const T=s(E,S);for(let R=0;R<T.length;++R){const M=T[R];o.push(w+M)}u=f+(u.length>0?" "+u:u)}return u};function wue(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=hF(e))&&(r&&(r+=" "),r+=n);return r}const hF=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=hF(t[r]))&&(n&&(n+=" "),n+=e);return n};function _ue(t,...e){let n,r,s,o=a;function a(c){const f=e.reduce((p,g)=>g(p),t());return n=Sue(f),r=n.cache.get,s=n.cache.set,o=u,u(c)}function u(c){const f=r(c);if(f)return f;const p=Cue(c,n);return s(c,p),p}return function(){return o(wue.apply(null,arguments))}}const Yt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},pF=/^\[(?:([a-z-]+):)?(.+)\]$/i,xue=/^\d+\/\d+$/,Aue=new Set(["px","full","screen"]),Tue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rue=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Iue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Oue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ti=t=>Ac(t)||Aue.has(t)||xue.test(t),da=t=>ld(t,"length",zue),Ac=t=>!!t&&!Number.isNaN(Number(t)),yw=t=>ld(t,"number",Ac),_f=t=>!!t&&Number.isInteger(Number(t)),Mue=t=>t.endsWith("%")&&Ac(t.slice(0,-1)),et=t=>pF.test(t),fa=t=>Tue.test(t),Pue=new Set(["length","size","percentage"]),kue=t=>ld(t,Pue,gF),Due=t=>ld(t,"position",gF),Lue=new Set(["image","url"]),Uue=t=>ld(t,Lue,jue),Fue=t=>ld(t,"",Bue),xf=()=>!0,ld=(t,e,n)=>{const r=pF.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},zue=t=>Rue.test(t)&&!Iue.test(t),gF=()=>!1,Bue=t=>Oue.test(t),jue=t=>Nue.test(t),Hue=()=>{const t=Yt("colors"),e=Yt("spacing"),n=Yt("blur"),r=Yt("brightness"),s=Yt("borderColor"),o=Yt("borderRadius"),a=Yt("borderSpacing"),u=Yt("borderWidth"),c=Yt("contrast"),f=Yt("grayscale"),p=Yt("hueRotate"),g=Yt("invert"),m=Yt("gap"),y=Yt("gradientColorStops"),S=Yt("gradientColorStopPositions"),E=Yt("inset"),C=Yt("margin"),w=Yt("opacity"),x=Yt("padding"),T=Yt("saturate"),R=Yt("scale"),M=Yt("sepia"),O=Yt("skew"),I=Yt("space"),P=Yt("translate"),k=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",et,e],B=()=>[et,e],W=()=>["",ti,da],Y=()=>["auto",Ac,et],ne=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>["start","end","center","between","around","evenly","stretch"],de=()=>["","0",et],Ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[Ac,et];return{cacheSize:500,separator:":",theme:{colors:[xf],spacing:[ti,da],blur:["none","",fa,et],brightness:D(),borderColor:[t],borderRadius:["none","","full",fa,et],borderSpacing:B(),borderWidth:W(),contrast:D(),grayscale:de(),hueRotate:D(),invert:de(),gap:B(),gradientColorStops:[t],gradientColorStopPositions:[Mue,da],inset:U(),margin:U(),opacity:D(),padding:B(),saturate:D(),scale:D(),sepia:de(),skew:D(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",et]}],container:["container"],columns:[{columns:[fa]}],"break-after":[{"break-after":Ae()}],"break-before":[{"break-before":Ae()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ne(),et]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_f,et]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",et]}],grow:[{grow:de()}],shrink:[{shrink:de()}],order:[{order:["first","last","none",_f,et]}],"grid-cols":[{"grid-cols":[xf]}],"col-start-end":[{col:["auto",{span:["full",_f,et]},et]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[xf]}],"row-start-end":[{row:["auto",{span:[_f,et]},et]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",et]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",et]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...fe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...fe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...fe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",et,e]}],"min-w":[{"min-w":[et,e,"min","max","fit"]}],"max-w":[{"max-w":[et,e,"none","full","min","max","fit","prose",{screen:[fa]},fa]}],h:[{h:[et,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[et,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[et,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[et,e,"auto","min","max","fit"]}],"font-size":[{text:["base",fa,da]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",yw]}],"font-family":[{font:[xf]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",et]}],"line-clamp":[{"line-clamp":["none",Ac,yw]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ti,et]}],"list-image":[{"list-image":["none",et]}],"list-style-type":[{list:["none","disc","decimal",et]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ti,da]}],"underline-offset":[{"underline-offset":["auto",ti,et]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",et]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",et]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ne(),Due]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Uue]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:$()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[ti,et]}],"outline-w":[{outline:[ti,da]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[ti,da]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",fa,Fue]}],"shadow-color":[{shadow:[xf]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",fa,et]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[T]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",et]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",et]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",et]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[_f,et]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",et]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",et]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",et]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ti,da,yw]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},mF=_ue(Hue);function Pn(...t){return mF(cF(t))}const $ue=1024,que=1280;function Wue(t,e=$ue,n=que){const r=t>=e;return{nav:r,reading:r,intelligence:t>=n}}function Gue(t){const e=A.useRef(null),[n,r]=A.useState(t??null);return A.useEffect(()=>{const s=e.current;if(!s||typeof ResizeObserver>"u")return;const o=new ResizeObserver(a=>{const u=a[0];u&&r(u.contentRect.width)});return o.observe(s),r(s.getBoundingClientRect().width),()=>o.disconnect()},[]),[e,n]}const Vue=[{id:"all",label:"All"},{id:"personal",label:"Personal"},{id:"newsletter",label:"Newsletters"},{id:"marketing",label:"Marketing"},{id:"automated",label:"Automated"},{id:"transactional",label:"Transactional"},{id:"social",label:"Social"}],Kue={personal:"accent",newsletter:"neutral",marketing:"neutral",automated:"neutral",transactional:"positive",social:"warning"};function Yue({open:t,onClose:e,title:n,titleId:r="dialog-title",children:s,className:o,anchor:a="center"}){const u=A.useRef(null),c=A.useCallback(m=>{m.key==="Escape"&&(m.preventDefault(),m.stopImmediatePropagation(),e())},[e]);if(A.useEffect(()=>{if(t)return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[t,c]),A.useEffect(()=>{if(!t)return;const m=u.current;if(!m)return;m.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')[0]?.focus()},[t]),!t)return null;const f=a==="left",p=a==="right",g=f||p;return F.jsxs("div",{className:Pn("fixed inset-0 z-50 flex",f?"items-stretch justify-start":p?"items-stretch justify-end":"items-center justify-center px-4"),role:"presentation",onClick:e,children:[F.jsx("div",{className:Pn("absolute inset-0",!g&&"bg-canvas/80")}),F.jsxs("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":r,className:Pn("relative z-10 overflow-hidden border-line bg-surface shadow-xl",f?"h-full w-72 max-w-[85vw] border-r":p?"h-full w-[80vw] max-w-[320px] border-l":"w-full max-w-lg rounded-md border",o),onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),children:[F.jsx("h2",{id:r,className:"sr-only",children:n}),s]})]})}const Ky=A.createContext(null);Ky.displayName="PanelGroupContext";const gn={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},jT=10,Pl=A.useLayoutEffect,mL=H5.useId,Zue=typeof mL=="function"?mL:()=>null;let Xue=0;function HT(t=null){const e=Zue(),n=A.useRef(t||e||null);return n.current===null&&(n.current=""+Xue++),t??n.current}function vF({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:o,id:a,maxSize:u,minSize:c,onCollapse:f,onExpand:p,onResize:g,order:m,style:y,tagName:S="div",...E}){const C=A.useContext(Ky);if(C===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:x,getPanelSize:T,getPanelStyle:R,groupId:M,isPanelCollapsed:O,reevaluatePanelConstraints:I,registerPanel:P,resizePanel:k,unregisterPanel:H}=C,U=HT(a),B=A.useRef({callbacks:{onCollapse:f,onExpand:p,onResize:g},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:u,minSize:c},id:U,idIsFromProps:a!==void 0,order:m});A.useRef({didLogMissingDefaultSizeWarning:!1}),Pl(()=>{const{callbacks:Y,constraints:ne}=B.current,$={...ne};B.current.id=U,B.current.idIsFromProps=a!==void 0,B.current.order=m,Y.onCollapse=f,Y.onExpand=p,Y.onResize=g,ne.collapsedSize=n,ne.collapsible=r,ne.defaultSize=s,ne.maxSize=u,ne.minSize=c,($.collapsedSize!==ne.collapsedSize||$.collapsible!==ne.collapsible||$.maxSize!==ne.maxSize||$.minSize!==ne.minSize)&&I(B.current,$)}),Pl(()=>{const Y=B.current;return P(Y),()=>{H(Y)}},[m,U,P,H]),A.useImperativeHandle(o,()=>({collapse:()=>{w(B.current)},expand:Y=>{x(B.current,Y)},getId(){return U},getSize(){return T(B.current)},isCollapsed(){return O(B.current)},isExpanded(){return!O(B.current)},resize:Y=>{k(B.current,Y)}}),[w,x,T,O,U,k]);const W=R(B.current,s);return A.createElement(S,{...E,children:t,className:e,id:U,style:{...W,...y},[gn.groupId]:M,[gn.panel]:"",[gn.panelCollapsible]:r||void 0,[gn.panelId]:U,[gn.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const yF=A.forwardRef((t,e)=>A.createElement(vF,{...t,forwardedRef:e}));vF.displayName="Panel";yF.displayName="forwardRef(Panel)";let ox=null,Ym=-1,Ca=null;function Que(t,e){if(e){const n=(e&wF)!==0,r=(e&_F)!==0,s=(e&xF)!==0,o=(e&AF)!==0;if(n)return s?"se-resize":o?"ne-resize":"e-resize";if(r)return s?"sw-resize":o?"nw-resize":"w-resize";if(s)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Jue(){Ca!==null&&(document.head.removeChild(Ca),ox=null,Ca=null,Ym=-1)}function bw(t,e){var n,r;const s=Que(t,e);if(ox!==s){if(ox=s,Ca===null&&(Ca=document.createElement("style"),document.head.appendChild(Ca)),Ym>=0){var o;(o=Ca.sheet)===null||o===void 0||o.removeRule(Ym)}Ym=(n=(r=Ca.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function bF(t){return t.type==="keydown"}function SF(t){return t.type.startsWith("pointer")}function EF(t){return t.type.startsWith("mouse")}function Yy(t){if(SF(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(EF(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function ece(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function tce(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function nce(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:bL(t),b:bL(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;tt(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:yL(vL(n.a)),b:yL(vL(n.b))};if(s.a===s.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let u=o.length;for(;u--;){const c=o[u];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(s.a-s.b)}const rce=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function sce(t){var e;const n=getComputedStyle((e=CF(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function oce(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||sce(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||rce.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function vL(t){let e=t.length;for(;e--;){const n=t[e];if(tt(n,"Missing node"),oce(n))return n}return null}function yL(t){return t&&Number(getComputedStyle(t).zIndex)||0}function bL(t){const e=[];for(;t;)e.push(t),t=CF(t);return e}function CF(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const wF=1,_F=2,xF=4,AF=8,ice=ece()==="coarse";let Xs=[],Tc=!1,El=new Map,Zy=new Map;const _h=new Set;function ace(t,e,n,r,s){var o;const{ownerDocument:a}=e,u={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(o=El.get(a))!==null&&o!==void 0?o:0;return El.set(a,c+1),_h.add(u),Av(),function(){var p;Zy.delete(t),_h.delete(u);const g=(p=El.get(a))!==null&&p!==void 0?p:1;if(El.set(a,g-1),Av(),g===1&&El.delete(a),Xs.includes(u)){const m=Xs.indexOf(u);m>=0&&Xs.splice(m,1),qT(),s("up",!0,null)}}}function lce(t){const{target:e}=t,{x:n,y:r}=Yy(t);Tc=!0,$T({target:e,x:n,y:r}),Av(),Xs.length>0&&(Tv("down",t),t.preventDefault(),TF(e)||t.stopImmediatePropagation())}function Sw(t){const{x:e,y:n}=Yy(t);if(Tc&&t.buttons===0&&(Tc=!1,Tv("up",t)),!Tc){const{target:r}=t;$T({target:r,x:e,y:n})}Tv("move",t),qT(),Xs.length>0&&t.preventDefault()}function Ew(t){const{target:e}=t,{x:n,y:r}=Yy(t);Zy.clear(),Tc=!1,Xs.length>0&&(t.preventDefault(),TF(e)||t.stopImmediatePropagation()),Tv("up",t),$T({target:e,x:n,y:r}),qT(),Av()}function TF(t){let e=t;for(;e;){if(e.hasAttribute(gn.resizeHandle))return!0;e=e.parentElement}return!1}function $T({target:t,x:e,y:n}){Xs.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),_h.forEach(s=>{const{element:o,hitAreaMargins:a}=s,u=o.getBoundingClientRect(),{bottom:c,left:f,right:p,top:g}=u,m=ice?a.coarse:a.fine;if(e>=f-m&&e<=p+m&&n>=g-m&&n<=c+m){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&nce(r,o)>0){let S=r,E=!1;for(;S&&!S.contains(o);){if(tce(S.getBoundingClientRect(),u)){E=!0;break}S=S.parentElement}if(E)return}Xs.push(s)}})}function Cw(t,e){Zy.set(t,e)}function qT(){let t=!1,e=!1;Xs.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;Zy.forEach(r=>{n|=r}),t&&e?bw("intersection",n):t?bw("horizontal",n):e?bw("vertical",n):Jue()}let ww=new AbortController;function Av(){ww.abort(),ww=new AbortController;const t={capture:!0,signal:ww.signal};_h.size&&(Tc?(Xs.length>0&&El.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",Ew,t),r.addEventListener("pointerleave",Sw,t),r.addEventListener("pointermove",Sw,t))}),window.addEventListener("pointerup",Ew,t),window.addEventListener("pointercancel",Ew,t)):El.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",lce,t),r.addEventListener("pointermove",Sw,t))}))}function Tv(t,e){_h.forEach(n=>{const{setResizeHandlerState:r}=n,s=Xs.includes(n);r(t,s,e)})}function uce(){const[t,e]=A.useState(0);return A.useCallback(()=>e(n=>n+1),[])}function tt(t,e){if(!t)throw console.error(e),Error(e)}function ql(t,e,n=jT){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function ui(t,e,n=jT){return ql(t,e,n)===0}function ss(t,e,n){return ql(t,e,n)===0}function cce(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const s=t[r],o=e[r];if(!ss(s,o,n))return!1}return!0}function bc({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];tt(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:s=0,collapsible:o,maxSize:a=100,minSize:u=0}=r;if(ql(n,u)<0)if(o){const c=(s+u)/2;ql(n,c)<0?n=s:n=u}else n=u;return n=Math.min(a,n),n=parseFloat(n.toFixed(jT)),n}function qf({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:o}){if(ss(t,0))return e;const a=[...e],[u,c]=r;tt(u!=null,"Invalid first pivot index"),tt(c!=null,"Invalid second pivot index");let f=0;if(o==="keyboard"){{const g=t<0?c:u,m=n[g];tt(m,`Panel constraints not found for index ${g}`);const{collapsedSize:y=0,collapsible:S,minSize:E=0}=m;if(S){const C=e[g];if(tt(C!=null,`Previous layout not found for panel index ${g}`),ss(C,y)){const w=E-C;ql(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}{const g=t<0?u:c,m=n[g];tt(m,`No panel constraints found for index ${g}`);const{collapsedSize:y=0,collapsible:S,minSize:E=0}=m;if(S){const C=e[g];if(tt(C!=null,`Previous layout not found for panel index ${g}`),ss(C,E)){const w=C-y;ql(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}}{const g=t<0?1:-1;let m=t<0?c:u,y=0;for(;;){const E=e[m];tt(E!=null,`Previous layout not found for panel index ${m}`);const w=bc({panelConstraints:n,panelIndex:m,size:100})-E;if(y+=w,m+=g,m<0||m>=n.length)break}const S=Math.min(Math.abs(t),Math.abs(y));t=t<0?0-S:S}{let m=t<0?u:c;for(;m>=0&&m<n.length;){const y=Math.abs(t)-Math.abs(f),S=e[m];tt(S!=null,`Previous layout not found for panel index ${m}`);const E=S-y,C=bc({panelConstraints:n,panelIndex:m,size:E});if(!ss(S,C)&&(f+=S-C,a[m]=C,f.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?m--:m++}}if(cce(s,a))return s;{const g=t<0?c:u,m=e[g];tt(m!=null,`Previous layout not found for panel index ${g}`);const y=m+f,S=bc({panelConstraints:n,panelIndex:g,size:y});if(a[g]=S,!ss(S,y)){let E=y-S,w=t<0?c:u;for(;w>=0&&w<n.length;){const x=a[w];tt(x!=null,`Previous layout not found for panel index ${w}`);const T=x+E,R=bc({panelConstraints:n,panelIndex:w,size:T});if(ss(x,R)||(E-=R-x,a[w]=R),ss(E,0))break;t>0?w--:w++}}}const p=a.reduce((g,m)=>m+g,0);return ss(p,100)?a:s}function dce({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,o=0,a=0;const u=n[0];tt(u!=null,"No pivot index found"),e.forEach((g,m)=>{const{constraints:y}=g,{maxSize:S=100,minSize:E=0}=y;m===u?(r=E,s=S):(o+=E,a+=S)});const c=Math.min(s,100-o),f=Math.max(r,100-a),p=t[u];return{valueMax:c,valueMin:f,valueNow:p}}function xh(t,e=document){return Array.from(e.querySelectorAll(`[${gn.resizeHandleId}][data-panel-group-id="${t}"]`))}function RF(t,e,n=document){const s=xh(t,n).findIndex(o=>o.getAttribute(gn.resizeHandleId)===e);return s??null}function IF(t,e,n){const r=RF(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function OF(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Xy(t,e=document){const n=e.querySelector(`[${gn.resizeHandleId}="${t}"]`);return n||null}function fce(t,e,n,r=document){var s,o,a,u;const c=Xy(e,r),f=xh(t,r),p=c?f.indexOf(c):-1,g=(s=(o=n[p])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,m=(a=(u=n[p+1])===null||u===void 0?void 0:u.id)!==null&&a!==void 0?a:null;return[g,m]}function hce({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:o,setLayout:a}){A.useRef({didWarnAboutMissingResizeHandle:!1}),Pl(()=>{if(!o)return;const u=xh(n,o);for(let c=0;c<s.length-1;c++){const{valueMax:f,valueMin:p,valueNow:g}=dce({layout:r,panelsArray:s,pivotIndices:[c,c+1]}),m=u[c];if(m!=null){const y=s[c];tt(y,`No panel data found for index "${c}"`),m.setAttribute("aria-controls",y.id),m.setAttribute("aria-valuemax",""+Math.round(f)),m.setAttribute("aria-valuemin",""+Math.round(p)),m.setAttribute("aria-valuenow",g!=null?""+Math.round(g):"")}}return()=>{u.forEach((c,f)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,o]),A.useEffect(()=>{if(!o)return;const u=e.current;tt(u,"Eager values not found");const{panelDataArray:c}=u,f=OF(n,o);tt(f!=null,`No group found for id "${n}"`);const p=xh(n,o);tt(p,`No resize handles found for group id "${n}"`);const g=p.map(m=>{const y=m.getAttribute(gn.resizeHandleId);tt(y,"Resize handle element has no handle id attribute");const[S,E]=fce(n,y,c,o);if(S==null||E==null)return()=>{};const C=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const x=c.findIndex(T=>T.id===S);if(x>=0){const T=c[x];tt(T,`No panel data found for index ${x}`);const R=r[x],{collapsedSize:M=0,collapsible:O,minSize:I=0}=T.constraints;if(R!=null&&O){const P=qf({delta:ss(R,M)?I-M:M-R,initialLayout:r,panelConstraints:c.map(k=>k.constraints),pivotIndices:IF(n,y,o),prevLayout:r,trigger:"keyboard"});r!==P&&a(P)}}break}}};return m.addEventListener("keydown",C),()=>{m.removeEventListener("keydown",C)}});return()=>{g.forEach(m=>m())}},[o,t,e,n,r,s,a])}function SL(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function NF(t,e){const n=t==="horizontal",{x:r,y:s}=Yy(e);return n?r:s}function pce(t,e,n,r,s){const o=n==="horizontal",a=Xy(e,s);tt(a,`No resize handle element found for id "${e}"`);const u=a.getAttribute(gn.groupId);tt(u,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const f=NF(n,t),p=OF(u,s);tt(p,`No group element found for id "${u}"`);const g=p.getBoundingClientRect(),m=o?g.width:g.height;return(f-c)/m*100}function gce(t,e,n,r,s,o){if(bF(t)){const a=n==="horizontal";let u=0;t.shiftKey?u=100:s!=null?u=s:u=10;let c=0;switch(t.key){case"ArrowDown":c=a?0:u;break;case"ArrowLeft":c=a?-u:0;break;case"ArrowRight":c=a?u:0;break;case"ArrowUp":c=a?0:-u;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return r==null?0:pce(t,e,n,r,o)}function mce({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,s=100;for(let o=0;o<t.length;o++){const a=n[o];tt(a,`Panel constraints not found for index ${o}`);const{defaultSize:u}=a;u!=null&&(r++,e[o]=u,s-=u)}for(let o=0;o<t.length;o++){const a=n[o];tt(a,`Panel constraints not found for index ${o}`);const{defaultSize:u}=a;if(u!=null)continue;const c=t.length-r,f=s/c;r++,e[o]=f,s-=f}return e}function Qu(t,e,n){e.forEach((r,s)=>{const o=t[s];tt(o,`Panel data not found for index ${s}`);const{callbacks:a,constraints:u,id:c}=o,{collapsedSize:f=0,collapsible:p}=u,g=n[c];if(g==null||r!==g){n[c]=r;const{onCollapse:m,onExpand:y,onResize:S}=a;S&&S(r,g),p&&(m||y)&&(y&&(g==null||ui(g,f))&&!ui(r,f)&&y(),m&&(g==null||!ui(g,f))&&ui(r,f)&&m())}})}function Xg(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function vce({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:s,precision:o=3}){const a=n[s];let u;return a==null?u=t!=null?t.toPrecision(o):"1":r.length===1?u="1":u=a.toPrecision(o),{flexBasis:0,flexGrow:u,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function yce(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function EL(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function MF(t){return`react-resizable-panels:${t}`}function PF(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:o}=e;return s?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function kF(t,e){try{const n=MF(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function bce(t,e,n){var r,s;const o=(r=kF(t,n))!==null&&r!==void 0?r:{},a=PF(e);return(s=o[a])!==null&&s!==void 0?s:null}function Sce(t,e,n,r,s){var o;const a=MF(t),u=PF(e),c=(o=kF(t,s))!==null&&o!==void 0?o:{};c[u]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(a,JSON.stringify(c))}catch(f){console.error(f)}}function CL({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,a)=>o+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!ss(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=100/r*a;n[o]=u}let s=0;for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=bc({panelConstraints:e,panelIndex:o,size:a});a!=u&&(s+=a-u,n[o]=u)}if(!ss(s,0))for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=a+s,c=bc({panelConstraints:e,panelIndex:o,size:u});if(a!==c&&(s-=c-a,n[o]=c,ss(s,0)))break}return n}const Ece=100,Wf={getItem:t=>(EL(Wf),Wf.getItem(t)),setItem:(t,e)=>{EL(Wf),Wf.setItem(t,e)}},wL={};function DF({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:o=null,onLayout:a=null,keyboardResizeBy:u=null,storage:c=Wf,style:f,tagName:p="div",...g}){const m=HT(o),y=A.useRef(null),[S,E]=A.useState(null),[C,w]=A.useState([]),x=uce(),T=A.useRef({}),R=A.useRef(new Map),M=A.useRef(0),O=A.useRef({autoSaveId:t,direction:r,dragState:S,id:m,keyboardResizeBy:u,onLayout:a,storage:c}),I=A.useRef({layout:C,panelDataArray:[],panelDataArrayChanged:!1});A.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),A.useImperativeHandle(s,()=>({getId:()=>O.current.id,getLayout:()=>{const{layout:K}=I.current;return K},setLayout:K=>{const{onLayout:J}=O.current,{layout:oe,panelDataArray:he}=I.current,ue=CL({layout:K,panelConstraints:he.map(ve=>ve.constraints)});SL(oe,ue)||(w(ue),I.current.layout=ue,J&&J(ue),Qu(he,ue,T.current))}}),[]),Pl(()=>{O.current.autoSaveId=t,O.current.direction=r,O.current.dragState=S,O.current.id=m,O.current.onLayout=a,O.current.storage=c}),hce({committedValuesRef:O,eagerValuesRef:I,groupId:m,layout:C,panelDataArray:I.current.panelDataArray,setLayout:w,panelGroupElement:y.current}),A.useEffect(()=>{const{panelDataArray:K}=I.current;if(t){if(C.length===0||C.length!==K.length)return;let J=wL[t];J==null&&(J=yce(Sce,Ece),wL[t]=J);const oe=[...K],he=new Map(R.current);J(t,oe,he,C,c)}},[t,C,c]),A.useEffect(()=>{});const P=A.useCallback(K=>{const{onLayout:J}=O.current,{layout:oe,panelDataArray:he}=I.current;if(K.constraints.collapsible){const ue=he.map(Ee=>Ee.constraints),{collapsedSize:ve=0,panelSize:_e,pivotIndices:Xe}=ml(he,K,oe);if(tt(_e!=null,`Panel size not found for panel "${K.id}"`),!ui(_e,ve)){R.current.set(K.id,_e);const pt=dc(he,K)===he.length-1?_e-ve:ve-_e,Ce=qf({delta:pt,initialLayout:oe,panelConstraints:ue,pivotIndices:Xe,prevLayout:oe,trigger:"imperative-api"});Xg(oe,Ce)||(w(Ce),I.current.layout=Ce,J&&J(Ce),Qu(he,Ce,T.current))}}},[]),k=A.useCallback((K,J)=>{const{onLayout:oe}=O.current,{layout:he,panelDataArray:ue}=I.current;if(K.constraints.collapsible){const ve=ue.map(ze=>ze.constraints),{collapsedSize:_e=0,panelSize:Xe=0,minSize:Ee=0,pivotIndices:pt}=ml(ue,K,he),Ce=J??Ee;if(ui(Xe,_e)){const ze=R.current.get(K.id),Be=ze!=null&&ze>=Ce?ze:Ce,pr=dc(ue,K)===ue.length-1?Xe-Be:Be-Xe,St=qf({delta:pr,initialLayout:he,panelConstraints:ve,pivotIndices:pt,prevLayout:he,trigger:"imperative-api"});Xg(he,St)||(w(St),I.current.layout=St,oe&&oe(St),Qu(ue,St,T.current))}}},[]),H=A.useCallback(K=>{const{layout:J,panelDataArray:oe}=I.current,{panelSize:he}=ml(oe,K,J);return tt(he!=null,`Panel size not found for panel "${K.id}"`),he},[]),U=A.useCallback((K,J)=>{const{panelDataArray:oe}=I.current,he=dc(oe,K);return vce({defaultSize:J,dragState:S,layout:C,panelData:oe,panelIndex:he})},[S,C]),B=A.useCallback(K=>{const{layout:J,panelDataArray:oe}=I.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=ml(oe,K,J);return tt(ve!=null,`Panel size not found for panel "${K.id}"`),ue===!0&&ui(ve,he)},[]),W=A.useCallback(K=>{const{layout:J,panelDataArray:oe}=I.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=ml(oe,K,J);return tt(ve!=null,`Panel size not found for panel "${K.id}"`),!ue||ql(ve,he)>0},[]),Y=A.useCallback(K=>{const{panelDataArray:J}=I.current;J.push(K),J.sort((oe,he)=>{const ue=oe.order,ve=he.order;return ue==null&&ve==null?0:ue==null?-1:ve==null?1:ue-ve}),I.current.panelDataArrayChanged=!0,x()},[x]);Pl(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:K,onLayout:J,storage:oe}=O.current,{layout:he,panelDataArray:ue}=I.current;let ve=null;if(K){const Xe=bce(K,ue,oe);Xe&&(R.current=new Map(Object.entries(Xe.expandToSizes)),ve=Xe.layout)}ve==null&&(ve=mce({panelDataArray:ue}));const _e=CL({layout:ve,panelConstraints:ue.map(Xe=>Xe.constraints)});SL(he,_e)||(w(_e),I.current.layout=_e,J&&J(_e),Qu(ue,_e,T.current))}}),Pl(()=>{const K=I.current;return()=>{K.layout=[]}},[]);const ne=A.useCallback(K=>{let J=!1;const oe=y.current;return oe&&window.getComputedStyle(oe,null).getPropertyValue("direction")==="rtl"&&(J=!0),function(ue){ue.preventDefault();const ve=y.current;if(!ve)return()=>null;const{direction:_e,dragState:Xe,id:Ee,keyboardResizeBy:pt,onLayout:Ce}=O.current,{layout:ze,panelDataArray:Be}=I.current,{initialLayout:He}=Xe??{},pr=IF(Ee,K,ve);let St=gce(ue,K,_e,Xe,pt,ve);const Gr=_e==="horizontal";Gr&&J&&(St=-St);const Wn=Be.map(xr=>xr.constraints),_r=qf({delta:St,initialLayout:He??ze,panelConstraints:Wn,pivotIndices:pr,prevLayout:ze,trigger:bF(ue)?"keyboard":"mouse-or-touch"}),to=!Xg(ze,_r);(SF(ue)||EF(ue))&&M.current!=St&&(M.current=St,!to&&St!==0?Gr?Cw(K,St<0?wF:_F):Cw(K,St<0?xF:AF):Cw(K,0)),to&&(w(_r),I.current.layout=_r,Ce&&Ce(_r),Qu(Be,_r,T.current))}},[]),$=A.useCallback((K,J)=>{const{onLayout:oe}=O.current,{layout:he,panelDataArray:ue}=I.current,ve=ue.map(ze=>ze.constraints),{panelSize:_e,pivotIndices:Xe}=ml(ue,K,he);tt(_e!=null,`Panel size not found for panel "${K.id}"`);const pt=dc(ue,K)===ue.length-1?_e-J:J-_e,Ce=qf({delta:pt,initialLayout:he,panelConstraints:ve,pivotIndices:Xe,prevLayout:he,trigger:"imperative-api"});Xg(he,Ce)||(w(Ce),I.current.layout=Ce,oe&&oe(Ce),Qu(ue,Ce,T.current))},[]),ee=A.useCallback((K,J)=>{const{layout:oe,panelDataArray:he}=I.current,{collapsedSize:ue=0,collapsible:ve}=J,{collapsedSize:_e=0,collapsible:Xe,maxSize:Ee=100,minSize:pt=0}=K.constraints,{panelSize:Ce}=ml(he,K,oe);Ce!=null&&(ve&&Xe&&ui(Ce,ue)?ui(ue,_e)||$(K,_e):Ce<pt?$(K,pt):Ce>Ee&&$(K,Ee))},[$]),fe=A.useCallback((K,J)=>{const{direction:oe}=O.current,{layout:he}=I.current;if(!y.current)return;const ue=Xy(K,y.current);tt(ue,`Drag handle element not found for id "${K}"`);const ve=NF(oe,J);E({dragHandleId:K,dragHandleRect:ue.getBoundingClientRect(),initialCursorPosition:ve,initialLayout:he})},[]),de=A.useCallback(()=>{E(null)},[]),Ae=A.useCallback(K=>{const{panelDataArray:J}=I.current,oe=dc(J,K);oe>=0&&(J.splice(oe,1),delete T.current[K.id],I.current.panelDataArrayChanged=!0,x())},[x]),D=A.useMemo(()=>({collapsePanel:P,direction:r,dragState:S,expandPanel:k,getPanelSize:H,getPanelStyle:U,groupId:m,isPanelCollapsed:B,isPanelExpanded:W,reevaluatePanelConstraints:ee,registerPanel:Y,registerResizeHandle:ne,resizePanel:$,startDragging:fe,stopDragging:de,unregisterPanel:Ae,panelGroupElement:y.current}),[P,S,r,k,H,U,m,B,W,ee,Y,ne,$,fe,de,Ae]),V={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return A.createElement(Ky.Provider,{value:D},A.createElement(p,{...g,children:e,className:n,id:o,ref:y,style:{...V,...f},[gn.group]:"",[gn.groupDirection]:r,[gn.groupId]:m}))}const LF=A.forwardRef((t,e)=>A.createElement(DF,{...t,forwardedRef:e}));DF.displayName="PanelGroup";LF.displayName="forwardRef(PanelGroup)";function dc(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function ml(t,e,n){const r=dc(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function Cce({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){A.useEffect(()=>{if(t||n==null||r==null)return;const s=Xy(e,r);if(s==null)return;const o=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const u=s.getAttribute(gn.groupId);tt(u,`No group element found for id "${u}"`);const c=xh(u,r),f=RF(u,e,r);tt(f!==null,`No resize element found for id "${e}"`);const p=a.shiftKey?f>0?f-1:c.length-1:f+1<c.length?f+1:0;c[p].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[r,t,e,n])}function UF({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:o,onClick:a,onDragging:u,onFocus:c,onPointerDown:f,onPointerUp:p,style:g={},tabIndex:m=0,tagName:y="div",...S}){var E,C;const w=A.useRef(null),x=A.useRef({onClick:a,onDragging:u,onPointerDown:f,onPointerUp:p});A.useEffect(()=>{x.current.onClick=a,x.current.onDragging=u,x.current.onPointerDown=f,x.current.onPointerUp=p});const T=A.useContext(Ky);if(T===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:R,groupId:M,registerResizeHandle:O,startDragging:I,stopDragging:P,panelGroupElement:k}=T,H=HT(s),[U,B]=A.useState("inactive"),[W,Y]=A.useState(!1),[ne,$]=A.useState(null),ee=A.useRef({state:U});Pl(()=>{ee.current.state=U}),A.useEffect(()=>{if(n)$(null);else{const D=O(H);$(()=>D)}},[n,H,O]);const fe=(E=r?.coarse)!==null&&E!==void 0?E:15,de=(C=r?.fine)!==null&&C!==void 0?C:5;A.useEffect(()=>{if(n||ne==null)return;const D=w.current;tt(D,"Element ref not attached");let V=!1;return ace(H,D,R,{coarse:fe,fine:de},(J,oe,he)=>{if(!oe){B("inactive");return}switch(J){case"down":{B("drag"),V=!1,tt(he,'Expected event to be defined for "down" action'),I(H,he);const{onDragging:ue,onPointerDown:ve}=x.current;ue?.(!0),ve?.();break}case"move":{const{state:ue}=ee.current;V=!0,ue!=="drag"&&B("hover"),tt(he,'Expected event to be defined for "move" action'),ne(he);break}case"up":{B("hover"),P();const{onClick:ue,onDragging:ve,onPointerUp:_e}=x.current;ve?.(!1),_e?.(),V||ue?.();break}}})},[fe,R,n,de,O,H,ne,I,P]),Cce({disabled:n,handleId:H,resizeHandler:ne,panelGroupElement:k});const Ae={touchAction:"none",userSelect:"none"};return A.createElement(y,{...S,children:t,className:e,id:s,onBlur:()=>{Y(!1),o?.()},onFocus:()=>{Y(!0),c?.()},ref:w,role:"separator",style:{...Ae,...g},tabIndex:m,[gn.groupDirection]:R,[gn.groupId]:M,[gn.resizeHandle]:"",[gn.resizeHandleActive]:U==="drag"?"pointer":W?"keyboard":void 0,[gn.resizeHandleEnabled]:!n,[gn.resizeHandleId]:H,[gn.resizeHandleState]:U})}UF.displayName="PanelResizeHandle";function wce({className:t,...e}){return F.jsx(LF,{className:Pn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e})}const Qg=yF;function _w({className:t,...e}){return F.jsx(UF,{className:Pn("relative w-px shrink-0 bg-line transition-colors cursor-col-resize","after:absolute after:inset-y-0 after:left-1/2 after:w-1.5 after:-translate-x-1/2","data-[resize-handle-state=hover]:bg-line-strong","data-[resize-handle-state=drag]:bg-accent","focus-visible:outline-none focus-visible:bg-accent",t),...e})}const FF=A.createContext(null);function fxe(){return A.useContext(FF)}function hxe({nav:t,list:e,reading:n,intelligence:r,intelligenceOpen:s=!0,hasThread:o=!0,density:a="comfortable",header:u,overlay:c,skeleton:f,isLoading:p=!1,initialWidth:g,navOpen:m,onOpenNav:y,onCloseNav:S}){const[E,C]=Gue(g),w=Wue(C??0),x=w.nav,T=w.reading&&!!n,R=w.intelligence,[M,O]=A.useState(!1),I=m!==void 0,P=I?m:M,k=()=>{I||O(!0),y?.()},H=()=>{I||O(!1),S?.()},U=R&&s&&o&&!!r,B={panes:w,containerWidth:C,showNavPane:x,openNav:k,showReadingPane:T,showIntelligencePane:R};return F.jsx(FF.Provider,{value:B,children:F.jsx("div",{ref:E,className:"@container flex h-dvh w-full flex-col overflow-hidden bg-canvas font-sans text-fg",children:p&&f?f:F.jsxs(F.Fragment,{children:[!x&&u&&F.jsx("div",{className:"shrink-0",children:u}),F.jsxs(wce,{direction:"horizontal",className:"min-h-0 flex-1",children:[x&&F.jsxs(F.Fragment,{children:[F.jsx(Qg,{id:"nav",order:1,defaultSize:17,minSize:12,maxSize:24,className:"min-w-0",children:t}),F.jsx(_w,{})]}),F.jsx(Qg,{id:"list",order:2,defaultSize:T?a==="compact"?36:27:83,minSize:18,maxSize:T?48:88,className:"min-w-0",children:e}),T&&F.jsxs(F.Fragment,{children:[F.jsx(_w,{}),F.jsx(Qg,{id:"reading",order:3,minSize:24,className:"min-w-0",children:n})]}),U&&F.jsxs(F.Fragment,{children:[F.jsx(_w,{}),F.jsx(Qg,{id:"intelligence",order:4,defaultSize:21,minSize:15,maxSize:32,className:"min-w-0",children:r})]})]}),!x&&F.jsx(Yue,{open:P,onClose:H,title:"Folders",anchor:"left",children:t}),c]})})})}const _ce="inline-flex items-center justify-center gap-2 rounded-md font-medium whitespace-nowrap transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface disabled:opacity-50 disabled:pointer-events-none",xce={primary:"bg-accent text-accent-fg hover:bg-accent-hover",secondary:"bg-surface text-fg border border-line hover:bg-surface-sunken hover:border-line-strong",ghost:"text-fg-muted hover:bg-surface-sunken hover:text-fg",danger:"bg-danger text-accent-fg hover:opacity-90"},Ace={sm:"h-7 px-2.5 text-xs",md:"h-9 px-3.5 text-sm"};function Zm({variant:t="primary",size:e="md",icon:n,className:r,children:s,...o}){return F.jsxs("button",{type:"button",className:Pn(_ce,xce[t],Ace[e],r),...o,children:[n,s]})}const Tce={neutral:"bg-surface-sunken text-fg-muted",accent:"bg-accent-2-soft text-accent-2",positive:"bg-surface-sunken text-positive",warning:"bg-surface-sunken text-warning",danger:"bg-danger-soft text-danger"},Rce={neutral:"bg-fg-subtle",accent:"bg-accent-2",positive:"bg-positive",warning:"bg-warning",danger:"bg-danger"};function _L({tone:t="neutral",dot:e,className:n,children:r,...s}){return F.jsxs("span",{className:Pn("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-2xs font-medium",Tce[t],n),...s,children:[e&&F.jsx("span",{className:Pn("size-1.5 rounded-full",Rce[t])}),r]})}const xL=10;function Ice({section:t,Row:e,selectedThreadId:n,initialExpanded:r=!1,initialCollapsed:s=!1,onSelectThread:o}){const[a,u]=A.useState(r),[c,f]=A.useState(s),p=t.threads.length>xL,m=!a&&p?t.threads.slice(0,xL):t.threads,y=t.threads.length-m.length;return F.jsxs("div",{children:[t.label&&F.jsxs("button",{type:"button","aria-expanded":!c,onClick:()=>f(S=>!S),className:"sticky top-0 z-10 flex h-section-row w-full items-center gap-1.5 border-b border-line bg-surface-sunken px-row-inset text-left transition-colors hover:bg-surface",children:[F.jsx("span",{className:"flex-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:t.label}),F.jsx("span",{className:"text-2xs text-fg-subtle tabular-nums",children:t.threads.length}),F.jsx(hL,{className:Pn("size-3 shrink-0 text-fg-subtle transition-transform duration-200",c?"rotate-0":"rotate-180")})]}),!c&&F.jsxs(F.Fragment,{children:[F.jsx("div",{className:"divide-y divide-line",children:m.map(S=>F.jsx(e,{thread:S,active:S.id===n,onClick:()=>o?.(S.id)},S.id))}),p&&F.jsxs("button",{type:"button",onClick:()=>u(S=>!S),className:"flex w-full items-center justify-center border-b border-line px-row-inset py-1.5 text-2xs font-medium text-accent transition-colors hover:bg-surface",children:[a?"Show less":`Show ${y} more`,!a&&F.jsx(hL,{className:"ml-1 size-3"})]})]})]})}function Oce(t){return t.target!==t.currentTarget?!1:t.key==="Enter"||t.key===" "}function Nce({className:t}){return F.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:F.jsx("path",{d:"M2 4l4 4 4-4"})})}function AL({className:t}){return F.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:F.jsx("path",{d:"M3 3l6 6M9 3l-6 6"})})}function Mce({categories:t,filters:e,sources:n,sourcesNote:r,selectedCategory:s,activeFilters:o,expanded:a,onSelectCategory:u,onSelectSource:c,onToggleFilter:f,onClear:p,onExpandedChange:g,children:m}){const y=a!==void 0,[S,E]=A.useState(!1),C=y?a:S,w=A.useCallback(ne=>{y||E(ne),g?.(ne)},[y,g]),x=t[0],T=x!==void 0&&s===x.id,R=n?.[0],M=n?.find(ne=>ne.active),O=R===void 0||M?.id===R.id,I=!T||o.size>0||!O&&!!M,P=A.useCallback(()=>{R&&c?.(R.id)},[R,c]),k=A.useCallback(()=>{p(),P()},[p,P]),H=t.find(ne=>ne.id===s),U=I?F.jsxs(F.Fragment,{children:[!O&&M&&F.jsx("span",{className:"inline-flex items-center rounded-full border border-accent-2 bg-accent-2-soft px-2 py-0.5 text-2xs font-medium text-accent-2",children:M.label}),!T&&H&&F.jsx(_L,{tone:H.tone??"neutral",children:H.label}),e.filter(ne=>o.has(ne.id)).map(ne=>F.jsx("span",{className:"inline-flex items-center rounded-full border border-accent-2 bg-accent-2-soft px-2 py-0.5 text-2xs font-medium text-accent-2",children:ne.label},ne.id))]}):F.jsx("span",{className:"text-2xs text-fg-subtle",children:"Filters"}),B=n&&n.length>1&&F.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-2 pt-2",children:[n.map(ne=>F.jsxs("button",{type:"button",onClick:()=>c?.(ne.id),className:Pn("flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-2xs transition-colors",ne.active?"border-accent-2 bg-accent-2-soft font-medium text-accent-2":"border-line text-fg-muted hover:border-line-strong"),children:[ne.label,ne.count!=null&&ne.count>0&&F.jsx("span",{className:"tabular-nums opacity-70",children:ne.count})]},ne.id)),r&&F.jsx("span",{className:"ml-auto shrink-0 text-2xs text-fg-subtle",children:r})]}),W=F.jsx("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-1.5 pt-1.5",children:t.map(ne=>{const $=s===ne.id;return F.jsx("button",{type:"button",onClick:()=>u(ne.id),className:Pn("shrink-0 rounded-full transition-opacity",$?"opacity-100 ring-1 ring-accent-2":"opacity-60 hover:opacity-100"),children:F.jsx(_L,{tone:ne.tone??"neutral",children:ne.label})},ne.id)})}),Y=F.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-2 pt-1.5",children:[e.map(ne=>{const $=o.has(ne.id);return F.jsx("button",{type:"button",onClick:()=>f(ne.id),className:Pn("shrink-0 rounded-full border px-2.5 py-0.5 text-2xs transition-colors",$?"border-accent-2 bg-accent-2-soft font-medium text-accent-2":"border-line text-fg-muted hover:border-line-strong"),children:ne.label},ne.id)}),I&&F.jsxs("button",{type:"button",onClick:k,className:"ml-auto flex items-center gap-1 px-1 text-2xs text-fg-subtle hover:text-fg-muted",children:[F.jsx(AL,{className:"size-3"}),"Clear"]})]});return F.jsxs("div",{className:"flex h-full w-full flex-col overflow-hidden",children:[F.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":C,"aria-label":C?"Collapse filters":"Expand filters",onClick:()=>w(!C),onKeyDown:ne=>{Oce(ne)&&(ne.preventDefault(),w(!C))},className:"flex h-section-row w-full shrink-0 cursor-pointer items-center gap-1.5 overflow-x-hidden border-b border-line bg-surface-sunken px-row-inset text-left hover:bg-surface",children:[U,I&&F.jsx("button",{type:"button","aria-label":"Clear filters",onClick:ne=>{ne.stopPropagation(),k()},className:"flex size-6 items-center justify-center text-fg-subtle hover:text-fg-muted",children:F.jsx(AL,{className:"size-3"})}),F.jsx(Nce,{className:Pn("ml-auto size-3 shrink-0 text-fg-subtle transition-transform duration-200",C?"rotate-180":"rotate-0")})]}),C&&F.jsxs("div",{className:"shrink-0",children:[B,W,Y]}),F.jsx("div",{className:"flex-1 overflow-y-auto",children:m})]})}function Pce(t){return t.sentDate!=null?new Date(t.sentDate).toDateString()===new Date().toDateString():/^\d{1,2}:\d{2}$/.test(t.timeLabel)}const zF=[{id:"unread",label:"Unread",match:t=>!t.isRead},{id:"attachment",label:"Has attachment",match:t=>!!t.hasAttachment},{id:"contacts",label:"From contacts",match:t=>t.trust==="vip"||t.trust==="wellknown"},{id:"today",label:"Today",match:Pce}],kce=zF.map(({id:t,label:e})=>({id:t,label:e}));function pxe({sections:t,briefCategory:e="all",selectedThreadId:n,Row:r,onSelectThread:s,onSelectBriefCategory:o,sources:a,sourcesNote:u,onSelectSource:c,defaultExpanded:f=!1}){const[p,g]=A.useState(new Set),[m,y]=A.useState(f),S=k=>{g(H=>{const U=new Set(H);return U.has(k)?U.delete(k):U.add(k),U})},E=zF.filter(k=>p.has(k.id)),C=k=>(e==="all"||k.category===e)&&E.every(H=>H.match(k)),w=e==="all",x=t.map(k=>({...k,threads:k.threads.filter(C)})).filter(k=>k.threads.length>0),T=t.flatMap(k=>k.threads).filter(C),R=Vue.map(k=>({id:k.id,label:k.label,tone:k.id==="all"?"neutral":Kue[k.id]})),M=kce,O=()=>{o?.("all"),g(new Set)},I=w?x.length===0:T.length===0,P=F.jsxs(F.Fragment,{children:[w?x.map(k=>F.jsx(Ice,{section:k,Row:r,selectedThreadId:n,onSelectThread:s},k.id)):F.jsx("div",{className:"divide-y divide-line",children:T.map(k=>F.jsx(r,{thread:k,active:k.id===n,onClick:()=>s?.(k.id)},k.id))}),I&&F.jsx("div",{className:"px-row-inset py-6 text-center text-2xs text-fg-subtle",children:"No threads match these filters."})]});return F.jsx(Mce,{categories:R,filters:M,sources:a,sourcesNote:u,selectedCategory:e,activeFilters:p,expanded:m,onExpandedChange:y,onSelectCategory:k=>o?.(k),onSelectSource:c,onToggleFilter:k=>S(k),onClear:O,children:P})}const Dce={default:Pn("flex h-9 items-center gap-2 rounded-md border border-line bg-surface-sunken px-3 text-sm","focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors"),inline:"flex items-center gap-2 bg-transparent text-sm"};function xw({icon:t,className:e,variant:n="default",ref:r,...s}){return F.jsxs("div",{className:Pn(Dce[n],e),children:[t&&F.jsx("span",{className:"text-fg-subtle shrink-0",children:t}),F.jsx("input",{ref:r,className:"min-w-0 flex-1 bg-transparent text-fg placeholder:text-fg-subtle outline-none",...s})]})}function TL(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Lce(t){if(Array.isArray(t))return t}function Uce(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,o,a,u=[],c=!0,f=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(p){f=!0,s=p}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw s}}return u}}function Fce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
84
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zce(t,e){return Lce(t)||Uce(t,e)||Bce(t,e)||Fce()}function Bce(t,e){if(t){if(typeof t=="string")return TL(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?TL(t,e):void 0}}const BF=Object.entries,RL=Object.setPrototypeOf,jce=Object.isFrozen,Hce=Object.getPrototypeOf,$ce=Object.getOwnPropertyDescriptor;let tr=Object.freeze,sr=Object.seal,fc=Object.create,jF=typeof Reflect<"u"&&Reflect,ix=jF.apply,ax=jF.construct;tr||(tr=function(e){return e});sr||(sr=function(e){return e});ix||(ix=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];return e.apply(n,s)});ax||(ax=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new e(...r)});const Ju=An(Array.prototype.forEach),qce=An(Array.prototype.lastIndexOf),IL=An(Array.prototype.pop),ec=An(Array.prototype.push),Wce=An(Array.prototype.splice),wa=Array.isArray,Gf=An(String.prototype.toLowerCase),Aw=An(String.prototype.toString),OL=An(String.prototype.match),Af=An(String.prototype.replace),NL=An(String.prototype.indexOf),Gce=An(String.prototype.trim),Vce=An(Number.prototype.toString),Kce=An(Boolean.prototype.toString),ML=typeof BigInt>"u"?null:An(BigInt.prototype.toString),PL=typeof Symbol>"u"?null:An(Symbol.prototype.toString),zn=An(Object.prototype.hasOwnProperty),Tf=An(Object.prototype.toString),Un=An(RegExp.prototype.test),vl=Yce(TypeError);function An(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return ix(t,e,r)}}function Yce(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ax(t,n)}}function mt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Gf;if(RL&&RL(t,null),!wa(e))return t;let r=e.length;for(;r--;){let s=e[r];if(typeof s=="string"){const o=n(s);o!==s&&(jce(e)||(e[r]=o),s=o)}t[s]=!0}return t}function Zce(t){for(let e=0;e<t.length;e++)zn(t,e)||(t[e]=null);return t}function br(t){const e=fc(null);for(const r of BF(t)){var n=zce(r,2);const s=n[0],o=n[1];zn(t,s)&&(wa(o)?e[s]=Zce(o):o&&typeof o=="object"&&o.constructor===Object?e[s]=br(o):e[s]=o)}return e}function Xce(t){switch(typeof t){case"string":return t;case"number":return Vce(t);case"boolean":return Kce(t);case"bigint":return ML?ML(t):"0";case"symbol":return PL?PL(t):"Symbol()";case"undefined":return Tf(t);case"function":case"object":{if(t===null)return Tf(t);const e=t,n=mo(e,"toString");if(typeof n=="function"){const r=n(e);return typeof r=="string"?r:Tf(r)}return Tf(t)}default:return Tf(t)}}function mo(t,e){for(;t!==null;){const r=$ce(t,e);if(r){if(r.get)return An(r.get);if(typeof r.value=="function")return An(r.value)}t=Hce(t)}function n(){return null}return n}function Qce(t){try{return Un(t,""),!0}catch{return!1}}const kL=tr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Tw=tr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Rw=tr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Jce=tr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Iw=tr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ede=tr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),DL=tr(["#text"]),LL=tr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ow=tr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),UL=tr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Jg=tr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),tde=sr(/{{[\w\W]*|^[\w\W]*}}/g),nde=sr(/<%[\w\W]*|^[\w\W]*%>/g),rde=sr(/\${[\w\W]*/g),sde=sr(/^data-[\-\w.\u00B7-\uFFFF]+$/),ode=sr(/^aria-[\-\w]+$/),FL=sr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ide=sr(/^(?:\w+script|data):/i),ade=sr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),lde=sr(/^html$/i),ude=sr(/^[a-z][.\w]*(-[.\w]+)+$/i),zL=sr(/<[/\w!]/g),BL=sr(/<[/\w]/g),cde=sr(/<\/no(script|embed|frames)/i),dde=sr(/\/>/i),ns={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},fde=function(){return typeof window>"u"?null:window},hde=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},jL=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ha=function(e,n,r,s){return zn(e,n)&&wa(e[n])?mt(s.base?br(s.base):{},e[n],s.transform):r};function HF(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fde();const e=pe=>HF(pe);if(e.version="3.4.12",e.removed=[],!t||!t.document||t.document.nodeType!==ns.document||!t.Element)return e.isSupported=!1,e;let n=t.document;const r=n,s=r.currentScript;t.DocumentFragment;const o=t.HTMLTemplateElement,a=t.Node,u=t.Element,c=t.NodeFilter,f=t.NamedNodeMap;f===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const p=t.DOMParser,g=t.trustedTypes,m=u.prototype,y=mo(m,"cloneNode"),S=mo(m,"remove"),E=mo(m,"nextSibling"),C=mo(m,"childNodes"),w=mo(m,"parentNode"),x=mo(m,"shadowRoot"),T=mo(m,"attributes"),R=a&&a.prototype?mo(a.prototype,"nodeType"):null,M=a&&a.prototype?mo(a.prototype,"nodeName"):null;if(typeof o=="function"){const pe=n.createElement("template");pe.content&&pe.content.ownerDocument&&(n=pe.content.ownerDocument)}let O,I="",P,k=!1,H=0;const U=function(){if(H>0)throw vl('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},B=function(L){U(),H++;try{return O.createHTML(L)}finally{H--}},W=function(L){U(),H++;try{return O.createScriptURL(L)}finally{H--}},Y=function(){return k||(P=hde(g,s),k=!0),P},ne=n,$=ne.implementation,ee=ne.createNodeIterator,fe=ne.createDocumentFragment,de=ne.getElementsByTagName,Ae=r.importNode;let D=jL();e.isSupported=typeof BF=="function"&&typeof w=="function"&&$&&$.createHTMLDocument!==void 0;const V=tde,K=nde,J=rde,oe=sde,he=ode,ue=ide,ve=ade,_e=ude;let Xe=FL,Ee=null;const pt=mt({},[...kL,...Tw,...Rw,...Iw,...DL]);let Ce=null;const ze=mt({},[...LL,...Ow,...UL,...Jg]);let Be=Object.seal(fc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),He=null,pr=null;const St=Object.seal(fc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Gr=!0,Wn=!0,_r=!1,to=!0,xr=!1,Gt=!0,gt=!1,mn=!1,Ar=null,no=null,fd=!1,ko=!1,uu=!1,cu=!1,Mi=!0,ir=!1;const Ps="user-content-";let Gn=!0,hd=!1,Pi={},hs=null;const ki=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Va=null;const Ka=mt({},["audio","video","img","source","image","track"]);let ks=null;const Ya=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ro="http://www.w3.org/1998/Math/MathML",du="http://www.w3.org/2000/svg",Vr="http://www.w3.org/1999/xhtml";let so=Vr,Do=!1,pd=null;const fp=mt({},[ro,du,Vr],Aw),gd=tr(["mi","mo","mn","ms","mtext"]);let fu=mt({},gd);const hu=tr(["annotation-xml"]);let Za=mt({},hu);const hp=mt({},["title","style","font","a","script"]);let Di=null;const oo=["application/xhtml+xml","text/html"],Rn="text/html";let nt=null,Kr=null;const md=n.createElement("form"),pp=function(L){return L instanceof RegExp||L instanceof Function},vd=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Kr&&Kr===L)return;(!L||typeof L!="object")&&(L={}),L=br(L),Di=oo.indexOf(L.PARSER_MEDIA_TYPE)===-1?Rn:L.PARSER_MEDIA_TYPE,nt=Di==="application/xhtml+xml"?Aw:Gf,Ee=ha(L,"ALLOWED_TAGS",pt,{transform:nt}),Ce=ha(L,"ALLOWED_ATTR",ze,{transform:nt}),pd=ha(L,"ALLOWED_NAMESPACES",fp,{transform:Aw}),ks=ha(L,"ADD_URI_SAFE_ATTR",Ya,{transform:nt,base:Ya}),Va=ha(L,"ADD_DATA_URI_TAGS",Ka,{transform:nt,base:Ka}),hs=ha(L,"FORBID_CONTENTS",ki,{transform:nt}),He=ha(L,"FORBID_TAGS",br({}),{transform:nt}),pr=ha(L,"FORBID_ATTR",br({}),{transform:nt}),Pi=zn(L,"USE_PROFILES")?L.USE_PROFILES&&typeof L.USE_PROFILES=="object"?br(L.USE_PROFILES):L.USE_PROFILES:!1,Gr=L.ALLOW_ARIA_ATTR!==!1,Wn=L.ALLOW_DATA_ATTR!==!1,_r=L.ALLOW_UNKNOWN_PROTOCOLS||!1,to=L.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xr=L.SAFE_FOR_TEMPLATES||!1,Gt=L.SAFE_FOR_XML!==!1,gt=L.WHOLE_DOCUMENT||!1,ko=L.RETURN_DOM||!1,uu=L.RETURN_DOM_FRAGMENT||!1,cu=L.RETURN_TRUSTED_TYPE||!1,fd=L.FORCE_BODY||!1,Mi=L.SANITIZE_DOM!==!1,ir=L.SANITIZE_NAMED_PROPS||!1,Gn=L.KEEP_CONTENT!==!1,hd=L.IN_PLACE||!1,Xe=Qce(L.ALLOWED_URI_REGEXP)?L.ALLOWED_URI_REGEXP:FL,so=typeof L.NAMESPACE=="string"?L.NAMESPACE:Vr,fu=zn(L,"MATHML_TEXT_INTEGRATION_POINTS")&&L.MATHML_TEXT_INTEGRATION_POINTS&&typeof L.MATHML_TEXT_INTEGRATION_POINTS=="object"?br(L.MATHML_TEXT_INTEGRATION_POINTS):mt({},gd),Za=zn(L,"HTML_INTEGRATION_POINTS")&&L.HTML_INTEGRATION_POINTS&&typeof L.HTML_INTEGRATION_POINTS=="object"?br(L.HTML_INTEGRATION_POINTS):mt({},hu);const Z=zn(L,"CUSTOM_ELEMENT_HANDLING")&&L.CUSTOM_ELEMENT_HANDLING&&typeof L.CUSTOM_ELEMENT_HANDLING=="object"?br(L.CUSTOM_ELEMENT_HANDLING):fc(null);if(Be=fc(null),zn(Z,"tagNameCheck")&&pp(Z.tagNameCheck)&&(Be.tagNameCheck=Z.tagNameCheck),zn(Z,"attributeNameCheck")&&pp(Z.attributeNameCheck)&&(Be.attributeNameCheck=Z.attributeNameCheck),zn(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(Be.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),sr(Be),xr&&(Wn=!1),uu&&(ko=!0),Pi&&(Ee=mt({},DL),Ce=fc(null),Pi.html===!0&&(mt(Ee,kL),mt(Ce,LL)),Pi.svg===!0&&(mt(Ee,Tw),mt(Ce,Ow),mt(Ce,Jg)),Pi.svgFilters===!0&&(mt(Ee,Rw),mt(Ce,Ow),mt(Ce,Jg)),Pi.mathMl===!0&&(mt(Ee,Iw),mt(Ce,UL),mt(Ce,Jg))),St.tagCheck=null,St.attributeCheck=null,zn(L,"ADD_TAGS")&&(typeof L.ADD_TAGS=="function"?St.tagCheck=L.ADD_TAGS:wa(L.ADD_TAGS)&&(Ee===pt&&(Ee=br(Ee)),mt(Ee,L.ADD_TAGS,nt))),zn(L,"ADD_ATTR")&&(typeof L.ADD_ATTR=="function"?St.attributeCheck=L.ADD_ATTR:wa(L.ADD_ATTR)&&(Ce===ze&&(Ce=br(Ce)),mt(Ce,L.ADD_ATTR,nt))),zn(L,"ADD_URI_SAFE_ATTR")&&wa(L.ADD_URI_SAFE_ATTR)&&mt(ks,L.ADD_URI_SAFE_ATTR,nt),zn(L,"FORBID_CONTENTS")&&wa(L.FORBID_CONTENTS)&&(hs===ki&&(hs=br(hs)),mt(hs,L.FORBID_CONTENTS,nt)),zn(L,"ADD_FORBID_CONTENTS")&&wa(L.ADD_FORBID_CONTENTS)&&(hs===ki&&(hs=br(hs)),mt(hs,L.ADD_FORBID_CONTENTS,nt)),Gn&&(Ee["#text"]=!0),gt&&mt(Ee,["html","head","body"]),Ee.table&&(mt(Ee,["tbody"]),delete He.tbody),L.TRUSTED_TYPES_POLICY){if(typeof L.TRUSTED_TYPES_POLICY.createHTML!="function")throw vl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof L.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw vl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const ce=O;O=L.TRUSTED_TYPES_POLICY;try{I=B("")}catch(Te){throw O=ce,Te}}else L.TRUSTED_TYPES_POLICY===null?(O=void 0,I=""):(O===void 0&&(O=Y()),O&&typeof I=="string"&&(I=B("")));tr&&tr(L),Kr=L},yd=mt({},[...Tw,...Rw,...Jce]),Li=mt({},[...Iw,...ede]),bd=function(L,Z,ce){return Z.namespaceURI===Vr?L==="svg":Z.namespaceURI===ro?L==="svg"&&(ce==="annotation-xml"||fu[ce]):!!yd[L]},Ui=function(L,Z,ce){return Z.namespaceURI===Vr?L==="math":Z.namespaceURI===du?L==="math"&&Za[ce]:!!Li[L]},Fi=function(L,Z,ce){return Z.namespaceURI===du&&!Za[ce]||Z.namespaceURI===ro&&!fu[ce]?!1:!Li[L]&&(hp[L]||!yd[L])},Xa=function(L){let Z=w(L);(!Z||!Z.tagName)&&(Z={namespaceURI:so,tagName:"template"});const ce=Gf(L.tagName),Te=Gf(Z.tagName);return pd[L.namespaceURI]?L.namespaceURI===du?bd(ce,Z,Te):L.namespaceURI===ro?Ui(ce,Z,Te):L.namespaceURI===Vr?Fi(ce,Z,Te):!!(Di==="application/xhtml+xml"&&pd[L.namespaceURI]):!1},gr=function(L){ec(e.removed,{element:L});try{w(L).removeChild(L)}catch{if(S(L),!w(L))throw vl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},an=function(L){Ds(L);const Z=C(L);if(Z){const Te=[];Ju(Z,ke=>{ec(Te,ke)}),Ju(Te,ke=>{try{S(ke)}catch{}})}const ce=T(L);if(ce)for(let Te=ce.length-1;Te>=0;--Te){const ke=ce[Te],Ue=ke&&ke.name;if(typeof Ue=="string")try{L.removeAttribute(Ue)}catch{}}},io=function(L,Z){try{ec(e.removed,{attribute:Z.getAttributeNode(L),from:Z})}catch{ec(e.removed,{attribute:null,from:Z})}if(Z.removeAttribute(L),L==="is")if(ko||uu)try{gr(Z)}catch{}else try{Z.setAttribute(L,"")}catch{}},gp=function(L){const Z=T(L);if(Z)for(let ce=Z.length-1;ce>=0;--ce){const Te=Z[ce],ke=Te&&Te.name;if(!(typeof ke!="string"||Ce[nt(ke)]))try{L.removeAttribute(ke)}catch{}}},Ds=function(L){const Z=[L];for(;Z.length>0;){const ce=Z.pop();(R?R(ce):ce.nodeType)===ns.element&&gp(ce);const ke=C(ce);if(ke)for(let Ue=ke.length-1;Ue>=0;--Ue)Z.push(ke[Ue])}},zi=function(L){if(!Gt)return;const Z=[L];for(;Z.length>0;){const ce=Z.pop(),Te=R?R(ce):ce.nodeType;if(Te===ns.processingInstruction||Te===ns.comment&&Un(BL,ce.data)){try{S(ce)}catch{}continue}if(Te===ns.element){const Ue=ce,en=nt(M?M(ce):ce.nodeName);try{Ue.hasAttribute&&Ue.hasAttribute("patchsrc")&&Ue.removeAttribute("patchsrc"),Ue.hasAttribute&&Ue.hasAttribute("for")&&en!=="label"&&en!=="output"&&Ue.removeAttribute("for")}catch{}}const ke=C(ce);if(ke)for(let Ue=ke.length-1;Ue>=0;--Ue)Z.push(ke[Ue])}},mp=function(L){let Z=null,ce=null;if(fd)L="<remove></remove>"+L;else{const Ue=OL(L,/^[\r\n\t ]+/);ce=Ue&&Ue[0]}Di==="application/xhtml+xml"&&so===Vr&&(L='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+L+"</body></html>");const Te=O?B(L):L;if(so===Vr)try{Z=new p().parseFromString(Te,Di)}catch{}if(!Z||!Z.documentElement){Z=$.createDocument(so,"template",null);try{Z.documentElement.innerHTML=Do?I:Te}catch{}}const ke=Z.body||Z.documentElement;return L&&ce&&ke.insertBefore(n.createTextNode(ce),ke.childNodes[0]||null),so===Vr?de.call(Z,gt?"html":"body")[0]:gt?Z.documentElement:ke},Sd=function(L){return ee.call(L.ownerDocument||L,L,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Qa=function(L){return L=Af(L,V," "),L=Af(L,K," "),L=Af(L,J," "),L},Ed=function(L){var Z;L.normalize();const ce=ee.call(L.ownerDocument||L,L,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Te=ce.nextNode();for(;Te;)Te.data=Qa(Te.data),Te=ce.nextNode();const ke=(Z=L.querySelectorAll)===null||Z===void 0?void 0:Z.call(L,"template");ke&&Ju(ke,Ue=>{Ls(Ue.content)&&Ed(Ue.content)})},Lo=function(L){const Z=M?M(L):null;return typeof Z!="string"||nt(Z)!=="form"?!1:typeof L.nodeName!="string"||typeof L.textContent!="string"||typeof L.removeChild!="function"||L.attributes!==T(L)||typeof L.removeAttribute!="function"||typeof L.setAttribute!="function"||typeof L.namespaceURI!="string"||typeof L.insertBefore!="function"||typeof L.hasChildNodes!="function"||L.nodeType!==R(L)||L.childNodes!==C(L)},Ls=function(L){if(!R||typeof L!="object"||L===null)return!1;try{return R(L)===ns.documentFragment}catch{return!1}},mr=function(L){if(!R||typeof L!="object"||L===null)return!1;try{return typeof R(L)=="number"}catch{return!1}};function ln(pe,L,Z){pe.length!==0&&Ju(pe,ce=>{ce.call(e,L,Z,Kr)})}const vp=function(L,Z){return!!(Gt&&L.hasChildNodes()&&!mr(L.firstElementChild)&&Un(zL,L.textContent)&&Un(zL,L.innerHTML)||Gt&&L.namespaceURI===Vr&&Z==="style"&&mr(L.firstElementChild)||L.nodeType===ns.processingInstruction||Gt&&L.nodeType===ns.comment&&Un(BL,L.data))},Cb=function(L,Z){if(!He[Z]&&yp(Z)&&(Be.tagNameCheck instanceof RegExp&&Un(Be.tagNameCheck,Z)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(Z)))return!1;if(Gn&&!hs[Z]){const ce=w(L),Te=C(L);if(Te&&ce){const ke=Te.length;for(let Ue=ke-1;Ue>=0;--Ue){const en=hd?Te[Ue]:y(Te[Ue],!0);ce.insertBefore(en,E(L))}}}return gr(L),!0},pu=function(L,Z){if(ln(D.beforeSanitizeElements,L,null),L!==Z&&w(L)===null)return!0;if(Lo(L))return gr(L),!0;const ce=nt(M?M(L):L.nodeName);if(ln(D.uponSanitizeElement,L,{tagName:ce,allowedTags:Ee}),L!==Z&&w(L)===null)return!0;if(vp(L,ce))return gr(L),!0;if(He[ce]||!(St.tagCheck instanceof Function&&St.tagCheck(ce))&&!Ee[ce]){const ke=Cb(L,ce);return ke===!1&&ln(D.afterSanitizeElements,L,null),ke}if((R?R(L):L.nodeType)===ns.element&&!Xa(L)||(ce==="noscript"||ce==="noembed"||ce==="noframes")&&Un(cde,L.innerHTML))return gr(L),!0;if(xr&&L.nodeType===ns.text){const ke=Qa(L.textContent);L.textContent!==ke&&(ec(e.removed,{element:L.cloneNode()}),L.textContent=ke)}return ln(D.afterSanitizeElements,L,null),!1},Cd=function(L,Z,ce){if(pr[Z]||Gt&&Z==="patchsrc"||Gt&&Z==="for"&&L!=="label"&&L!=="output"||Mi&&(Z==="id"||Z==="name")&&(ce in n||ce in md))return!1;const Te=Ce[Z]||St.attributeCheck instanceof Function&&St.attributeCheck(Z,L);if(!(Wn&&Un(oe,Z))){if(!(Gr&&Un(he,Z))){if(Te){if(!ks[Z]){if(!Un(Xe,Af(ce,ve,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&L!=="script"&&NL(ce,"data:")===0&&Va[L])){if(!(_r&&!Un(ue,Af(ce,ve,"")))){if(ce)return!1}}}}}else if(!(yp(L)&&(Be.tagNameCheck instanceof RegExp&&Un(Be.tagNameCheck,L)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(L))&&(Be.attributeNameCheck instanceof RegExp&&Un(Be.attributeNameCheck,Z)||Be.attributeNameCheck instanceof Function&&Be.attributeNameCheck(Z,L))||Z==="is"&&Be.allowCustomizedBuiltInElements&&(Be.tagNameCheck instanceof RegExp&&Un(Be.tagNameCheck,ce)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(ce))))return!1}}return!0},gu=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),yp=function(L){return!gu[Gf(L)]&&Un(_e,L)},Tr=function(L,Z,ce,Te){if(O&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ce)switch(g.getAttributeType(L,Z)){case"TrustedHTML":return B(Te);case"TrustedScriptURL":return W(Te)}return Te},wd=function(L,Z,ce,Te){try{ce?L.setAttributeNS(ce,Z,Te):L.setAttribute(Z,Te),Lo(L)?gr(L):IL(e.removed)}catch{io(Z,L)}},_d=function(L){ln(D.beforeSanitizeAttributes,L,null);const Z=L.attributes;if(!Z||Lo(L))return;const ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce,forceKeepAttr:void 0};let Te=Z.length;const ke=nt(L.nodeName);for(;Te--;){const Ue=Z[Te],en=Ue.name,Dn=Ue.namespaceURI,ar=Ue.value,tn=nt(en),vr=ar;let In=en==="value"?vr:Gce(vr);if(ce.attrName=tn,ce.attrValue=In,ce.keepAttr=!0,ce.forceKeepAttr=void 0,ln(D.uponSanitizeAttribute,L,ce),In=ce.attrValue,ir&&(tn==="id"||tn==="name")&&NL(In,Ps)!==0&&(io(en,L),In=Ps+In),Gt&&Un(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,In)){io(en,L);continue}if(tn==="attributename"&&OL(In,"href")){io(en,L);continue}if(!ce.forceKeepAttr){if(!ce.keepAttr){io(en,L);continue}if(!to&&Un(dde,In)){io(en,L);continue}if(xr&&(In=Qa(In)),!Cd(ke,tn,In)){io(en,L);continue}In=Tr(ke,tn,Dn,In),In!==vr&&wd(L,en,Dn,In)}}ln(D.afterSanitizeAttributes,L,null)},Bi=function(L){let Z=null;const ce=Sd(L);for(ln(D.beforeSanitizeShadowDOM,L,null);Z=ce.nextNode();)if(ln(D.uponSanitizeShadowNode,Z,null),pu(Z,L),_d(Z),Ls(Z.content)&&Bi(Z.content),(R?R(Z):Z.nodeType)===ns.element){const ke=x(Z);Ls(ke)&&(ao(ke),Bi(ke))}ln(D.afterSanitizeShadowDOM,L,null)},ao=function(L){const Z=[{node:L,shadow:null}];for(;Z.length>0;){const ce=Z.pop();if(ce.shadow){Bi(ce.shadow);continue}const Te=ce.node,Ue=(R?R(Te):Te.nodeType)===ns.element,en=C(Te);if(en)for(let Dn=en.length-1;Dn>=0;--Dn)Z.push({node:en[Dn],shadow:null});if(Ue){const Dn=M?M(Te):null;if(typeof Dn=="string"&&nt(Dn)==="template"){const ar=Te.content;Ls(ar)&&Z.push({node:ar,shadow:null})}}if(Ue){const Dn=x(Te);Ls(Dn)&&Z.push({node:null,shadow:Dn},{node:Dn,shadow:null})}}};return e.sanitize=function(pe){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,ce=null,Te=null,ke=null;if(Do=!pe,Do&&(pe="<!-->"),typeof pe!="string"&&!mr(pe)&&(pe=Xce(pe),typeof pe!="string"))throw vl("dirty is not a string, aborting");if(!e.isSupported)return pe;mn?(Ee=Ar,Ce=no):vd(L),(D.uponSanitizeElement.length>0||D.uponSanitizeAttribute.length>0)&&(Ee=br(Ee)),D.uponSanitizeAttribute.length>0&&(Ce=br(Ce)),e.removed=[];const Ue=hd&&typeof pe!="string"&&mr(pe);if(Ue){zi(pe);const tn=M?M(pe):pe.nodeName;if(typeof tn=="string"){const vr=nt(tn);if(!Ee[vr]||He[vr])throw an(pe),vl("root node is forbidden and cannot be sanitized in-place")}if(Lo(pe))throw an(pe),vl("root node is clobbered and cannot be sanitized in-place");try{ao(pe)}catch(vr){throw an(pe),vr}}else if(mr(pe))Z=mp("<!---->"),ce=Z.ownerDocument.importNode(pe,!0),ce.nodeType===ns.element&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?Z=ce:Z.appendChild(ce),ao(ce);else{if(!ko&&!xr&&!gt&&pe.indexOf("<")===-1)return O&&cu?B(pe):pe;if(Z=mp(pe),!Z)return ko?null:cu?I:""}Z&&fd&&gr(Z.firstChild);const en=Ue?pe:Z,Dn=Sd(en);try{for(;Te=Dn.nextNode();)pu(Te,en),_d(Te),Ls(Te.content)&&Bi(Te.content)}catch(tn){throw Ue&&(an(pe),Ju(e.removed,vr=>{vr.element&&Ds(vr.element)})),tn}if(Ue)return Ju(e.removed,tn=>{tn.element&&Ds(tn.element)}),xr&&Ed(pe),pe;if(ko){if(xr&&Ed(Z),uu)for(ke=fe.call(Z.ownerDocument);Z.firstChild;)ke.appendChild(Z.firstChild);else ke=Z;return(Ce.shadowroot||Ce.shadowrootmode)&&(ke=Ae.call(r,ke,!0)),ke}let ar=gt?Z.outerHTML:Z.innerHTML;return gt&&Ee["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&Un(lde,Z.ownerDocument.doctype.name)&&(ar="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
85
- `+ar),xr&&(ar=Qa(ar)),O&&cu?B(ar):ar},e.setConfig=function(){let pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vd(pe),mn=!0,Ar=Ee,no=Ce},e.clearConfig=function(){Kr=null,mn=!1,Ar=null,no=null,O=P,I=""},e.isValidAttribute=function(pe,L,Z){Kr||vd({});const ce=nt(pe),Te=nt(L);return Cd(ce,Te,Z)},e.addHook=function(pe,L){typeof L=="function"&&zn(D,pe)&&ec(D[pe],L)},e.removeHook=function(pe,L){if(zn(D,pe)){if(L!==void 0){const Z=qce(D[pe],L);return Z===-1?void 0:Wce(D[pe],Z,1)[0]}return IL(D[pe])}},e.removeHooks=function(pe){zn(D,pe)&&(D[pe]=[])},e.removeAllHooks=function(){D=jL()},e}var gxe=HF();function $F({children:t,className:e}){return F.jsx("div",{"data-auth-page":!0,className:Pn("flex min-h-dvh w-full flex-col items-center justify-center overflow-y-auto bg-surface-sunken px-4 py-8 text-fg",e),style:{backgroundImage:"radial-gradient(at 20% 0%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%), radial-gradient(at 80% 100%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%)"},children:F.jsx("div",{className:"w-full max-w-[26rem]",children:t})})}const pde="Secure sign-in powered by AWS Cognito";function qF(t){const e=t?.note??"Secure sign-in";return F.jsx("div",{className:"text-center pt-5",children:F.jsx("p",{className:"text-xs text-fg-muted",children:e})})}const gde=()=>F.jsxs("svg",{width:"36",height:"36",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"text-accent",children:[F.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),F.jsx("path",{d:"M3 7l9 6 9-6"})]});function WF({wordmark:t="remit,",tagline:e="your email client in the cloud.",mark:n=F.jsx(gde,{})}){return F.jsxs("div",{className:"text-center pb-6",children:[F.jsx("div",{className:"flex items-center justify-center pb-3",children:n}),F.jsx("h1",{className:"text-[1.75rem] font-semibold tracking-[-0.01em] text-fg",children:t}),F.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:e})]})}const mde={info:"bg-accent-2/15 text-accent-2 border-accent-2/40",success:"bg-positive/15 text-positive border-positive/40",warning:"bg-warning/15 text-warning border-warning/40",danger:"bg-danger/15 text-danger border-danger/40"},vde={info:"bg-surface-sunken text-fg-muted",success:"bg-positive/10 text-positive",warning:"bg-warning/10 text-warning",danger:"bg-danger-soft text-danger"},yde={info:"status",success:"status",warning:"alert",danger:"alert"};function lx({tone:t="info",variant:e="framed",onDismiss:n,role:r,className:s,children:o,...a}){const u=e==="soft";return F.jsxs("div",{role:r??yde[t],className:Pn("flex gap-2 px-3 py-2 text-sm",u?Pn("items-start rounded-md",vde[t]):Pn("items-center border",mde[t]),s),...a,children:[F.jsx("div",{className:"flex-1 min-w-0",children:o}),n&&(u?F.jsx(Zm,{variant:"ghost",size:"sm",icon:F.jsx(rx,{className:"size-3.5"}),onClick:n,"aria-label":"Dismiss",className:"-mr-1 shrink-0"}):F.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"shrink-0 rounded-md p-1 hover:bg-fg/10 transition-colors",children:F.jsx(rx,{className:"size-4","aria-hidden":"true"})}))]})}var Ah;(function(t){t[t.UP=-1]="UP",t[t.DOWN=1]="DOWN"})(Ah||(Ah={}));function bde(t){var e=getComputedStyle(t).overflowY;return t===document.scrollingElement&&e==="visible"?!0:!(e!=="scroll"&&e!=="auto")}function Sde(t,e){if(!bde(t))return!1;if(e===Ah.DOWN){var n=t.scrollTop+t.clientHeight;return n<t.scrollHeight}if(e===Ah.UP)return t.scrollTop>0;throw new Error("unsupported direction")}function GF(t,e){return Sde(t,e)?!0:t.parentElement==null?!1:GF(t.parentElement,e)}function VF(t,e){e===void 0&&(e={});var n=e.insertAt;if(!(!t||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",n==="top"&&r.firstChild?r.insertBefore(s,r.firstChild):r.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}}var Ede=`.lds-ellipsis {
86
- display: inline-block;
87
- position: relative;
88
- width: 64px;
89
- height: 64px;
90
- }
91
-
92
- .lds-ellipsis div {
93
- position: absolute;
94
- top: 27px;
95
- width: 11px;
96
- height: 11px;
97
- border-radius: 50%;
98
- background: rgb(54, 54, 54);
99
- animation-timing-function: cubic-bezier(0, 1, 1, 0);
100
- }
101
-
102
- .lds-ellipsis div:nth-child(1) {
103
- left: 6px;
104
- animation: lds-ellipsis1 0.6s infinite;
105
- }
106
-
107
- .lds-ellipsis div:nth-child(2) {
108
- left: 6px;
109
- animation: lds-ellipsis2 0.6s infinite;
110
- }
111
-
112
- .lds-ellipsis div:nth-child(3) {
113
- left: 26px;
114
- animation: lds-ellipsis2 0.6s infinite;
115
- }
116
-
117
- .lds-ellipsis div:nth-child(4) {
118
- left: 45px;
119
- animation: lds-ellipsis3 0.6s infinite;
120
- }
121
-
122
- @keyframes lds-ellipsis1 {
123
- 0% {
124
- transform: scale(0);
125
- }
126
- 100% {
127
- transform: scale(1);
128
- }
129
- }
130
- @keyframes lds-ellipsis3 {
131
- 0% {
132
- transform: scale(1);
133
- }
134
- 100% {
135
- transform: scale(0);
136
- }
137
- }
138
- @keyframes lds-ellipsis2 {
139
- 0% {
140
- transform: translate(0, 0);
141
- }
142
- 100% {
143
- transform: translate(19px, 0);
144
- }
145
- }`;VF(Ede);var Cde=function(){return z.createElement("div",{className:"lds-ellipsis"},z.createElement("div",null),z.createElement("div",null),z.createElement("div",null),z.createElement("div",null))},wde=function(){return z.createElement("div",null,z.createElement("p",null,"↧  pull to refresh  ↧"))},_de=`.ptr,
146
- .ptr__children {
147
- height: 100%;
148
- width: 100%;
149
- overflow: hidden;
150
- -webkit-overflow-scrolling: touch;
151
- position: relative;
152
- }
153
-
154
- .ptr.ptr--fetch-more-treshold-breached .ptr__fetch-more {
155
- display: block;
156
- }
157
-
158
- .ptr__fetch-more {
159
- display: none;
160
- }
161
-
162
- /**
163
- * Pull down transition
164
- */
165
- .ptr__children,
166
- .ptr__pull-down {
167
- transition: transform 0.2s cubic-bezier(0, 0, 0.31, 1);
168
- }
169
-
170
- .ptr__pull-down {
171
- position: absolute;
172
- overflow: hidden;
173
- left: 0;
174
- right: 0;
175
- top: 0;
176
- visibility: hidden;
177
- }
178
- .ptr__pull-down > div {
179
- display: none;
180
- }
181
-
182
- .ptr--dragging {
183
- /**
184
- * Hide PullMore content is treshold breached
185
- */
186
- }
187
- .ptr--dragging.ptr--pull-down-treshold-breached .ptr__pull-down--pull-more {
188
- display: none;
189
- }
190
- .ptr--dragging {
191
- /**
192
- * Otherwize, display content
193
- */
194
- }
195
- .ptr--dragging .ptr__pull-down--pull-more {
196
- display: block;
197
- }
198
-
199
- .ptr--pull-down-treshold-breached {
200
- /**
201
- * Force opacity to 1 is pull down trashold breached
202
- */
203
- }
204
- .ptr--pull-down-treshold-breached .ptr__pull-down {
205
- opacity: 1 !important;
206
- }
207
- .ptr--pull-down-treshold-breached {
208
- /**
209
- * And display loader
210
- */
211
- }
212
- .ptr--pull-down-treshold-breached .ptr__pull-down--loading {
213
- display: block;
214
- }
215
-
216
- .ptr__loader {
217
- margin: 0 auto;
218
- text-align: center;
219
- }`;VF(_de);var mxe=function(t){var e=t.isPullable,n=e===void 0?!0:e,r=t.canFetchMore,s=r===void 0?!1:r,o=t.onRefresh,a=t.onFetchMore,u=t.refreshingContent,c=u===void 0?z.createElement(Cde,null):u,f=t.pullingContent,p=f===void 0?z.createElement(wde,null):f,g=t.children,m=t.pullDownThreshold,y=m===void 0?67:m,S=t.fetchMoreThreshold,E=S===void 0?100:S,C=t.maxPullDownDistance,w=C===void 0?95:C,x=t.resistance,T=x===void 0?1:x,R=t.backgroundColor,M=t.className,O=M===void 0?"":M,I=A.useRef(null),P=A.useRef(null),k=A.useRef(null),H=A.useRef(null),U=!1,B=!1,W=!1,Y=0,ne=0;A.useEffect(function(){if(!(!n||!P||!P.current)){var V=P.current;return V.addEventListener("touchstart",fe,{passive:!0}),V.addEventListener("mousedown",fe),V.addEventListener("touchmove",de,{passive:!1}),V.addEventListener("mousemove",de),window.addEventListener("scroll",Ae),V.addEventListener("touchend",D),V.addEventListener("mouseup",D),document.body.addEventListener("mouseleave",D),function(){V.removeEventListener("touchstart",fe),V.removeEventListener("mousedown",fe),V.removeEventListener("touchmove",de),V.removeEventListener("mousemove",de),window.removeEventListener("scroll",Ae),V.removeEventListener("touchend",D),V.removeEventListener("mouseup",D),document.body.removeEventListener("mouseleave",D)}}},[g,n,o,y,w,s,E]),A.useEffect(function(){var V;if(!((V=I)===null||V===void 0)&&V.current){var K=I.current.classList.contains("ptr--fetch-more-treshold-breached");K||s&&$()<E&&a&&(I.current.classList.add("ptr--fetch-more-treshold-breached"),B=!0,a().then(ee).catch(ee))}},[s,g]);var $=function(){if(!P||!P.current)return-1;var V=window.scrollY,K=P.current.scrollHeight;return K-V-window.innerHeight},ee=function(){requestAnimationFrame(function(){P.current&&(P.current.style.overflowX="hidden",P.current.style.overflowY="auto",P.current.style.transform="unset"),k.current&&(k.current.style.opacity="0"),I.current&&(I.current.classList.remove("ptr--pull-down-treshold-breached"),I.current.classList.remove("ptr--dragging"),I.current.classList.remove("ptr--fetch-more-treshold-breached")),U&&(U=!1),B&&(B=!1)})},fe=function(V){W=!1,V instanceof MouseEvent&&(Y=V.pageY),window.TouchEvent&&V instanceof TouchEvent&&(Y=V.touches[0].pageY),ne=Y,!(V.type==="touchstart"&&GF(V.target,Ah.UP))&&(P.current.getBoundingClientRect().top<0||(W=!0))},de=function(V){if(W){if(window.TouchEvent&&V instanceof TouchEvent?ne=V.touches[0].pageY:ne=V.pageY,I.current.classList.add("ptr--dragging"),ne<Y){W=!1;return}V.cancelable&&V.preventDefault();var K=Math.min((ne-Y)/T,w);K>=y&&(W=!0,U=!0,I.current.classList.remove("ptr--dragging"),I.current.classList.add("ptr--pull-down-treshold-breached")),!(K>=w)&&(k.current.style.opacity=(K/65).toString(),P.current.style.overflow="visible",P.current.style.transform="translate(0px, "+K+"px)",k.current.style.visibility="visible")}},Ae=function(V){B||s&&$()<E&&a&&(B=!0,I.current.classList.add("ptr--fetch-more-treshold-breached"),a().then(ee).catch(ee))},D=function(){if(W=!1,Y=0,ne=0,!U){k.current&&(k.current.style.visibility="hidden"),ee();return}P.current&&(P.current.style.overflow="visible",P.current.style.transform="translate(0px, "+y+"px)"),o().then(ee).catch(ee)};return z.createElement("div",{className:"ptr "+O,style:{backgroundColor:R},ref:I},z.createElement("div",{className:"ptr__pull-down",ref:k},z.createElement("div",{className:"ptr__loader ptr__pull-down--loading"},c),z.createElement("div",{className:"ptr__pull-down--pull-more"},p)),z.createElement("div",{className:"ptr__children",ref:P},g,z.createElement("div",{className:"ptr__fetch-more",ref:H},z.createElement("div",{className:"ptr__loader ptr__fetch-more--loading"},c))))};const xde=()=>F.jsxs("div",{className:"hidden h-full w-[17%] min-w-40 max-w-64 shrink-0 flex-col gap-1 border-r border-line p-3 md:flex",children:[F.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((t,e)=>F.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[F.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),F.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},e))]}),Ade=()=>F.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((t,e)=>F.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[F.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),F.jsxs("div",{className:"flex-1 space-y-1.5",children:[F.jsxs("div",{className:"flex justify-between gap-2",children:[F.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),F.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),F.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),F.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},e))}),WT=()=>F.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[F.jsx(xde,{}),F.jsx(Ade,{})]}),Tde=({betterAuthEnabled:t,cognitoConfigured:e})=>t?"betterAuth":e?"cognito":"none",KF=t=>Tde(t)==="cognito"?pde:void 0,Qy=()=>{const t=globalThis.__REMIT_CONFIG__??{};return{apiUrl:t.apiUrl??"/api",appOrigin:t.appOrigin??"",betterAuthEnabled:t.betterAuthEnabled??!1,cognito:{userPoolId:t.cognito?.userPoolId??"",clientId:t.cognito?.clientId??"",domain:t.cognito?.domain??"",region:t.cognito?.region??""},rum:{appMonitorId:t.rum?.appMonitorId??"",identityPoolId:t.rum?.identityPoolId??"",region:t.rum?.region??"eu-west-1"},mailboxPollIntervalSeconds:t.mailboxPollIntervalSeconds!=null?String(t.mailboxPollIntervalSeconds):void 0,disableDevtools:t.disableDevtools??!1}},Rde=()=>{const t=Qy(),{userPoolId:e,clientId:n,domain:r,region:s}=t.cognito;return!e||!n?null:{userPoolId:e,userPoolClientId:n,domain:r,region:s,appOrigin:t.appOrigin}},ux=Rde(),Jy=()=>ux!==null,Ide=()=>{if(!ux){console.warn("[auth] Cognito user pool is not configured. Running in local dev mode without Cognito auth.");return}const{userPoolId:t,userPoolClientId:e,domain:n,appOrigin:r}=ux;E9.configure({Auth:{Cognito:{userPoolId:t,userPoolClientId:e,loginWith:n?{oauth:{domain:n,scopes:["openid","email","profile"],redirectSignIn:r?[r]:[],redirectSignOut:r?[r]:[],responseType:"code"}}:void 0}}})},GT="1ec5ed3883ccb8af0cdcc2b5a9f13e7525fb72b5",Ode="2026-07-19T13:45:06.794Z",Nde=GT.slice(0,7),vxe=`https://github.com/remit-mail/remit/commit/${GT}`,Mde="https://github.com/remit-mail/remit/issues/new";class cx extends Error{constructor(e,n,r){super(e),this.status=n,this.body=r,this.name="ApiError"}status;body}const ud=t=>{if(t instanceof cx)return t.status;if(t&&typeof t=="object"){const e=t;if(typeof e.status=="number")return e.status;if(typeof e.statusCode=="number")return e.statusCode}},Pde=t=>ud(t)!==void 0,VT=t=>{const e=ud(t);return e!==void 0&&e>=500&&e<=599},KT=t=>!!(typeof DOMException<"u"&&t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"),kde=t=>!KT(t)&&!Pde(t),Dde=t=>t?.softError===!0,YF=(t,e)=>VT(t)?!0:!(KT(t)||kde(t)||Dde(e)),Lde=t=>VT(t),dx=new Set;let ZF=null,XF=null;const Ude=t=>{XF=t},Fde=t=>t instanceof Error?t:new Error(QF(t)),QF=t=>t instanceof Error?t.message||t.name:typeof t=="string"?t:t&&typeof t=="object"&&"message"in t&&typeof t.message=="string"?t.message:"An unexpected server error occurred.",zde=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,Lc=(t,e)=>{const n={error:t,message:QF(t),correlationId:zde(),at:Date.now(),recoverable:e?.recoverable??Lde(t),stack:t instanceof Error?t.stack:void 0,componentStack:e?.componentStack};ZF=n,Wde(`Fatal: ${n.message} [${n.correlationId}]`),XF?.recordError(Fde(t),{fatal:"true",correlationId:n.correlationId});for(const r of dx)r(n);return n},Bde=t=>(dx.add(t),()=>{dx.delete(t)}),jde=()=>ZF,Hde=20,Xm=[],$de=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function qde(t){return typeof t!="string"?!1:$de.has(t.replace(/\.\s*$/,""))}function Qm(t){Xm.push(t),Xm.length>Hde&&Xm.shift()}function Wde(t){Qm(t)}function Gde(t){return t.map(e=>{if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}).join(" ")}function Vde(){const t=console.error.bind(console);console.error=(...e)=>{Qm(Gde(e)),t(...e)},window.addEventListener("error",e=>{qde(e.message)||(Qm(`Uncaught ${e.error instanceof Error?`${e.error.name}: ${e.error.message}`:String(e.message)} (${e.filename}:${e.lineno})`),Lc(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{const n=e.reason,r=n instanceof Error?`${n.name}: ${n.message}`:String(n);Qm(`Unhandled rejection: ${r}`),Lc(n)})}function Kde(){return Xm.slice()}const HL=7500,$L=`
220
- … (truncated — use “Copy full details” for the full stacktrace)`;function qL(t){return{appSha:GT,appShortSha:Nde,appBuildTime:Ode,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:Kde(),errorMessage:t?.errorMessage,stack:t?.stack,componentStack:t?.componentStack}}function WL(t){return["```",t,"```"].join(`
221
- `)}function JF(t,e){const n=t.recentErrors.length>0?t.recentErrors.map(o=>` - ${o}`).join(`
222
- `):" (none)",r=["## Environment",`- **Version**: [\`${t.appShortSha}\`](https://github.com/remit-mail/remit/commit/${t.appSha}) built ${t.appBuildTime}`,`- **Browser**: ${t.userAgent}`,`- **Viewport**: ${t.viewport}`,`- **Time**: ${t.timestamp} (${t.timezone})`,"","## URL",t.href,""];t.errorMessage&&r.push("## Error",t.errorMessage,"");const s=e??t.stack;return s&&r.push("## Stacktrace",WL(s),""),t.componentStack&&r.push("## Component stack",WL(t.componentStack),""),r.push("## Recent console errors",n,"","## Steps to reproduce","1. ","","## Expected behaviour","","## Actual behaviour",""),r.join(`
223
- `)}function Yde(t){if(!t.errorMessage)return"Bug: ";const e=t.errorMessage.split(`
224
- `)[0].trim();return`Bug: ${e.length>120?`${e.slice(0,117)}…`:e}`}function Nw(t,e){const n=new URLSearchParams({title:Yde(t),body:JF(t,e)});return`${Mde}?${n.toString()}`}function Zde(t){return JF(t)}function Xde(t){const e=Nw(t);if(e.length<=HL)return e;const n=t.stack??"",r={...t,componentStack:void 0};let s=0,o=n.length,a=0;for(;s<=o;){const u=s+o>>1;Nw(r,n.slice(0,u)+$L).length<=HL?(a=u,s=u+1):o=u-1}return Nw(r,n.slice(0,a)+$L)}const Qde="/mail",e7=()=>{const[t,e]=A.useState(()=>jde());return A.useEffect(()=>Bde(e),[]),t?F.jsx(t7,{fatal:t}):null},GL=t=>({errorMessage:t.message,stack:t.stack,componentStack:t.componentStack}),t7=({fatal:t,onRetry:e})=>{const[n,r]=A.useState(!1),s=()=>{window.location.reload()},o=()=>{if(e){e();return}s()},a=()=>{const f=Xde(qL(GL(t)));window.open(f,"_blank","noopener,noreferrer")},u=async()=>{const f=Zde(qL(GL(t)));await navigator.clipboard.writeText(f),r(!0),window.setTimeout(()=>r(!1),2e3)},c=t.recoverable?"The server returned an unexpected error. This is not your fault — nothing was saved or sent. Retry, or report a bug so we can fix it.":"Something went wrong and this page can't recover. This is not your fault — nothing was saved or sent. Go to your inbox, or report a bug so we can fix it.";return F.jsxs("div",{role:"alert","aria-live":"assertive","data-testid":"fatal-error-overlay",className:"fixed inset-0 z-[1000] flex flex-col items-center justify-center gap-6 bg-red-700 p-6 text-center text-white",children:[F.jsx(aue,{className:"size-16 shrink-0","aria-hidden":"true"}),F.jsxs("div",{className:"max-w-lg space-y-3",children:[F.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Something broke"}),F.jsx("p",{className:"text-base text-red-50",children:c}),F.jsx("p",{className:"break-words font-mono text-sm text-red-100",children:t.message}),F.jsxs("p",{className:"font-mono text-xs text-red-200",children:["Reference: ",t.correlationId]})]}),F.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[t.recoverable?F.jsx("button",{type:"button",onClick:o,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Retry"}):F.jsx("a",{href:Qde,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Go to inbox"}),F.jsx("button",{type:"button",onClick:a,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:"Report a bug"}),F.jsx("button",{type:"button",onClick:u,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:n?"Copied":"Copy full details"})]})]})},Jde="Fetch Error",YT=(t,e)=>{if(t&&typeof t=="object"&&e in t){const n=t[e];if(typeof n=="string"&&n.trim().length>0)return n}},ZT=t=>YT(t,"message"),efe=t=>KT(t)?!1:YT(t,"statusText")===Jde?!0:ud(t)===void 0,tfe=t=>{if(efe(t))return"network";const e=ud(t);return e===void 0||e===404||e>=500?"fatal":ZT(t)?"validation":"fatal"},nfe="Can't reach the server. You may be offline — check your connection and try again.",rfe=(t,e)=>e==="network"?nfe:ZT(t)??"Please check your details and try again.",sfe=t=>{const e=ud(t);if(e===void 0)return"no response";const n=YT(t,"statusText");return n?`${e} ${n}`:String(e)},ofe=(t,e)=>{const n=sfe(t),r=ud(t)===404?"The endpoint did not respond as expected — check that the backend is running and up to date (see the deployment guide's troubleshooting section).":"The server returned an unexpected response.",s=ZT(t),o=s?` Server said: ${s}.`:"";return`${e.method} ${e.path} failed: ${n}. ${r}${o}`},ife=(t,e)=>{Lc(new Error(ofe(t,e)),{recoverable:!1})};var afe={};const Jm=Object.create(null),Rf=t=>afe||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?Jm:globalThis),ga=new Proxy(Jm,{get(t,e){return Rf()[e]??Jm[e]},has(t,e){return e in Rf()||e in Jm},set(t,e,n){const r=Rf(!0);return r[e]=n,!0},deleteProperty(t,e){if(!e)return!1;const n=Rf(!0);return delete n[e],!0},ownKeys(){const t=Rf(!0);return Object.keys(t)}});ga.NODE_ENV;var ev=class extends Error{constructor(t,e){super(t,e),this.name="BetterAuthError",this.message=t,this.stack=""}};const lfe=47;function n7(t){let e=t.length;for(;e>0&&t.charCodeAt(e-1)===lfe;)e--;return e===t.length?t:t.slice(0,e)}function ufe(t){try{return(n7(new URL(t).pathname)||"/")!=="/"}catch{throw new ev(`Invalid base URL: ${t}. Please provide a valid base URL.`)}}function cfe(t){try{const e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new ev(`Invalid base URL: ${t}. URL must include 'http://' or 'https://'`)}catch(e){throw e instanceof ev?e:new ev(`Invalid base URL: ${t}. Please provide a valid base URL.`,{cause:e})}}function VL(t,e="/api/auth"){if(cfe(t),ufe(t))return t;const n=n7(t);return!e||e==="/"?n:(e=e.startsWith("/")?e:`/${e}`,`${n}${e}`)}function dfe(t,e,n,r,s){{const o=ga.BETTER_AUTH_URL||ga.NEXT_PUBLIC_BETTER_AUTH_URL||ga.PUBLIC_BETTER_AUTH_URL||ga.NUXT_PUBLIC_BETTER_AUTH_URL||ga.NUXT_PUBLIC_AUTH_URL||(ga.BASE_URL!=="/"?ga.BASE_URL:void 0);if(o)return VL(o,e)}if(typeof window<"u"&&window.location)return VL(window.location.origin,e)}const ffe={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},hfe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,KL={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},pfe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function gfe(t){return t instanceof Date&&!isNaN(t.getTime())}function mfe(t){const e=pfe.exec(t);if(!e)return null;const[,n,r,s,o,a,u,c,f,p,g]=e,m=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(s,10),parseInt(o,10),parseInt(a,10),parseInt(u,10),c?parseInt(c.padEnd(3,"0"),10):0));if(f){const y=(parseInt(p,10)*60+parseInt(g,10))*(f==="+"?-1:1);m.setUTCMinutes(m.getUTCMinutes()+y)}return gfe(m)?m:null}function vfe(t,e={}){const{strict:n=!1,warnings:r=!1,reviver:s,parseDates:o=!0}=e;if(typeof t!="string")return t;const a=t.trim(),u=a.toLowerCase();if(u.length<=9&&u in KL)return KL[u];if(!hfe.test(a)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return t}if(Object.entries(ffe).some(([c,f])=>{const p=f.test(a);return p&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${c} pattern`),p})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(a,(f,p)=>{if(f==="__proto__"||f==="constructor"&&p&&typeof p=="object"&&"prototype"in p){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(o&&typeof p=="string"){const g=mfe(p);if(g)return g}return s?s(f,p):p})}catch(c){if(n)throw c;return t}}function yfe(t,e={strict:!0}){return vfe(t,e)}const bfe=["javascript:","data:","vbscript:"];function Sfe(t){let e;try{e=new URL(t)}catch{return!0}return!bfe.includes(e.protocol)}const Efe={id:"redirect",name:"Redirect",hooks:{onSuccess(t){if(t.data?.url&&t.data?.redirect&&Sfe(t.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=t.data.url}catch{}}}};let Vs=[],ma=0;const tv=4,Cfe=globalThis.nanostoresGlobal||={epoch:0};let wfe=()=>{for(ma=0;ma<Vs.length;ma+=tv)Vs[ma](Vs[ma+1].value,Vs[ma+2],Vs[ma+3]);Vs.length=0};const YL=t=>{let e=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:t,lc:0,listen(r){return n.lc=e.push(r),()=>{for(let o=ma+tv;o<Vs.length;)Vs[o]===r?Vs.splice(o,tv):o+=tv;let s=e.indexOf(r);~s&&(e.splice(s,1),--n.lc||n.off())}},notify(r,s){Cfe.epoch++;let o=!Vs.length&&!0;for(let a of e)Vs.push(a,n,r,s);o&&wfe()},off(){},set(r){let s=n.value;s!==r&&(n.value=r,n.notify(s))},subscribe(r){let s=n.listen(r);return r(n.value),s},value:t};return n},_fe=2,xfe=5,em=6,tm=10;let r7=(t,e,n,r)=>(t.events=t.events||{},t.events[n+tm]||(t.events[n+tm]=r(s=>{t.events[n].reduceRight((o,a)=>(a(o),o),{shared:{},...s})})),t.events[n]=t.events[n]||[],t.events[n].push(e),()=>{let s=t.events[n],o=s.indexOf(e);s.splice(o,1),s.length||(delete t.events[n],t.events[n+tm](),delete t.events[n+tm])}),Afe=(t,e)=>r7(t,e,_fe,n=>{let r=t.set,s=t.setKey;return t.setKey&&(t.setKey=(o,a)=>{let u;if(n({abort:()=>{u=!0},changed:o,newValue:{...t.value,[o]:a}}),!u)return s(o,a)}),t.set=o=>{let a;if(n({abort:()=>{a=!0},newValue:o}),!a)return r(o)},()=>{t.set=r,t.setKey=s}});const Tfe=1e3;let Rfe=(t,e)=>r7(t,r=>{let s=e(r);s&&t.events[em].push(s)},xfe,r=>{let s=t.listen;t.listen=(...a)=>(!t.lc&&!t.active&&(t.active=!0,r()),s(...a));let o=t.off;return t.events[em]=[],t.off=()=>{o(),setTimeout(()=>{if(t.active&&!t.lc){t.active=!1;for(let a of t.events[em])a();t.events[em]=[]}},Tfe)},()=>{t.listen=s,t.off=o}});function Ife(t,e,n){let r=new Set(e);return t.listen((s,o,a)=>{(a===void 0?e.some(u=>s[u]!==o[u]):r.has(a)||r.has(a.split(/\.|\[/)[0]))&&n(s,o,a)})}function ZL(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Rv(t,e){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!Rv(t[n],e[n]))return!1;return!0}if(ZL(t)&&ZL(e)){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const s of n)if(!(s in e)||!Rv(t[s],e[s]))return!1;return!0}return!1}function Ofe(t,e){return Afe(t,({newValue:n,abort:r})=>{e(t.value,n)&&r()})}const Mw=Symbol.for("better-auth:broadcast-channel"),Nfe=()=>Math.floor(Date.now()/1e3);var Mfe=class{listeners=new Set;name;constructor(t="better-auth.message"){this.name=t}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}post(t){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...t,timestamp:Nfe()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const t=e=>{if(e.key!==this.name)return;const n=JSON.parse(e.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}};function Pw(t="better-auth.message"){return globalThis[Mw]||(globalThis[Mw]=new Mfe(t)),globalThis[Mw]}const kw=Symbol.for("better-auth:focus-manager");var Pfe=class{listeners=new Set;subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setFocused(t){this.listeners.forEach(e=>e(t))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const t=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",t,!1),()=>{document.removeEventListener("visibilitychange",t,!1)}}};function XL(){return globalThis[kw]||(globalThis[kw]=new Pfe),globalThis[kw]}const Dw=Symbol.for("better-auth:online-manager");var kfe=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setOnline(t){this.isOnline=t,this.listeners.forEach(e=>e(t))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const t=()=>this.setOnline(!0),e=()=>this.setOnline(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",e,!1),()=>{window.removeEventListener("online",t,!1),window.removeEventListener("offline",e,!1)}}};function Lw(){return globalThis[Dw]||(globalThis[Dw]=new kfe),globalThis[Dw]}const Uw=()=>Math.floor(Date.now()/1e3),Dfe=5;function Lfe(t){const{fetchSession:e,shouldPollSession:n=()=>!0,sessionSignal:r,options:s={}}=t,o=s.sessionOptions?.refetchInterval??0,a=s.sessionOptions?.refetchOnWindowFocus??!0,u=s.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},f=()=>u||Lw().isOnline,p=T=>{if(f()){if(T?.event==="storage"){e();return}if(T?.event==="poll"){c.lastSessionRequest=Uw(),e();return}if(T?.event==="visibilitychange"){if(Uw()-c.lastSessionRequest<Dfe)return;c.lastSessionRequest=Uw(),e();return}e()}},g=T=>{Pw().post({event:"session",data:{trigger:T},clientId:Math.random().toString(36).substring(7)})},m=()=>{o&&o>0&&(c.pollInterval=setInterval(()=>{n()&&p({event:"poll"})},o*1e3))},y=()=>{c.unsubscribeBroadcast=Pw().subscribe(()=>{p({event:"storage"})})},S=()=>{a&&(c.unsubscribeFocus=XL().subscribe(()=>{p({event:"visibilitychange"})}))},E=()=>{c.unsubscribeOnline=Lw().subscribe(T=>{T&&p({event:"visibilitychange"})})},C=()=>{c.unsubscribeSignal=r.listen(()=>{e()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,m(),y(),S(),E(),C(),c.cleanupBroadcastSetup=Pw().setup(),c.cleanupFocusSetup=XL().setup(),c.cleanupOnlineSetup=Lw().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&(clearInterval(c.pollInterval),c.pollInterval=void 0),c.unsubscribeBroadcast&&(c.unsubscribeBroadcast(),c.unsubscribeBroadcast=void 0),c.unsubscribeFocus&&(c.unsubscribeFocus(),c.unsubscribeFocus=void 0),c.unsubscribeOnline&&(c.unsubscribeOnline(),c.unsubscribeOnline=void 0),c.unsubscribeSignal&&(c.unsubscribeSignal(),c.unsubscribeSignal=void 0),c.cleanupBroadcastSetup&&(c.cleanupBroadcastSetup(),c.cleanupBroadcastSetup=void 0),c.cleanupFocusSetup&&(c.cleanupFocusSetup(),c.cleanupFocusSetup=void 0),c.cleanupOnlineSetup&&(c.cleanupOnlineSetup(),c.cleanupOnlineSetup=void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:p,broadcastSessionUpdate:g}}const Ufe=()=>typeof window>"u";function QL(t){return typeof t=="object"&&t!==null&&"data"in t&&"error"in t?t:{data:t,error:null}}function Ffe(t){return!t||t.session===null&&t.user===null?null:t}function zfe(t,e){return Rv(t.data,e.data)&&t.error===e.error&&t.isPending===e.isPending&&t.isRefetching===e.isRefetching&&t.refetch===e.refetch}function Bfe(t,e){const n=YL(!1);let r;const s=f=>u(f),o=YL({data:null,error:null,isPending:!0,isRefetching:!1,refetch:s});Ofe(o,zfe);const a=f=>{if(r!==f)return;const p=o.get();r=void 0,!(!p.isPending&&!p.isRefetching)&&o.set({...p,isPending:!1,isRefetching:!1,refetch:s})},u=async f=>{r?.abort();const p=new AbortController;r=p;const g=o.get();o.set({...g,isPending:g.data===null,isRefetching:!0,error:null,refetch:s});try{const m=await t("/get-session",{method:"GET",query:f?.query,signal:p.signal});if(p.signal.aborted){a(p);return}let{data:y,error:S}=QL(m);if(y?.needsRefresh)try{const x=await t("/get-session",{method:"POST",signal:p.signal});if(p.signal.aborted){a(p);return}({data:y,error:S}=QL(x))}catch{if(p.signal.aborted){a(p);return}}if(S){const x=o.get(),T=S?.status===401;o.set({data:T?null:x.data,error:S,isPending:!1,isRefetching:!1,refetch:s});return}const E=Ffe(y),C=o.get(),w=C.data!=null&&E!=null&&Rv(C.data,E)?C.data:E;o.set({data:w,error:null,isPending:!1,isRefetching:!1,refetch:s})}catch(m){if(p.signal.aborted){a(p);return}const y=o.get();o.set({data:y.data,error:m,isPending:!1,isRefetching:!1,refetch:s})}};let c=()=>{};return Rfe(o,()=>{let f;Ufe()||(f=setTimeout(()=>{u()},0));const p=Lfe({fetchSession:u,shouldPollSession:()=>o.get().data!=null,sessionSignal:n,options:e});return p.init(),c=p.broadcastSessionUpdate,()=>{f&&clearTimeout(f);const g=r;g?.abort(),g&&a(g),p.cleanup()}}),{session:o,$sessionSignal:n,broadcastSessionUpdate:f=>c(f)}}function Fw(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function fx(t,e,n=".",r){if(!Fw(e))return fx(t,{},n,r);const s={...e};for(const o of Object.keys(t)){if(o==="__proto__"||o==="constructor")continue;const a=t[o];a!=null&&(r&&r(s,o,a,n)||(Array.isArray(a)&&Array.isArray(s[o])?s[o]=[...a,...s[o]]:Fw(a)&&Fw(s[o])?s[o]=fx(a,s[o],(n?`${n}.`:"")+o.toString(),r):s[o]=a))}return s}function jfe(t){return(...e)=>e.reduce((n,r)=>fx(n,r,"",t),{})}const Hfe=jfe();var $fe=Object.defineProperty,qfe=Object.defineProperties,Wfe=Object.getOwnPropertyDescriptors,JL=Object.getOwnPropertySymbols,Gfe=Object.prototype.hasOwnProperty,Vfe=Object.prototype.propertyIsEnumerable,eU=(t,e,n)=>e in t?$fe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ws=(t,e)=>{for(var n in e||(e={}))Gfe.call(e,n)&&eU(t,n,e[n]);if(JL)for(var n of JL(e))Vfe.call(e,n)&&eU(t,n,e[n]);return t},So=(t,e)=>qfe(t,Wfe(e)),Kfe=class extends Error{constructor(t,e,n){super(e||t.toString(),{cause:n}),this.status=t,this.statusText=e,this.error=n,Error.captureStackTrace(this,this.constructor)}},Yfe=async(t,e)=>{var n,r,s,o,a,u;let c=e||{};const f={onRequest:[e?.onRequest],onResponse:[e?.onResponse],onSuccess:[e?.onSuccess],onError:[e?.onError],onRetry:[e?.onRetry]};if(!e||!e?.plugins)return{url:t,options:c,hooks:f};for(const p of e?.plugins||[]){if(p.init){const g=await((n=p.init)==null?void 0:n.call(p,t.toString(),e));c=g.options||c,t=g.url}f.onRequest.push((r=p.hooks)==null?void 0:r.onRequest),f.onResponse.push((s=p.hooks)==null?void 0:s.onResponse),f.onSuccess.push((o=p.hooks)==null?void 0:o.onSuccess),f.onError.push((a=p.hooks)==null?void 0:a.onError),f.onRetry.push((u=p.hooks)==null?void 0:u.onRetry)}return{url:t,options:c,hooks:f}},tU=class{constructor(t){this.options=t}shouldAttemptRetry(t,e){return this.options.shouldRetry?Promise.resolve(t<this.options.attempts&&this.options.shouldRetry(e)):Promise.resolve(t<this.options.attempts)}getDelay(){return this.options.delay}},Zfe=class{constructor(t){this.options=t}shouldAttemptRetry(t,e){return this.options.shouldRetry?Promise.resolve(t<this.options.attempts&&this.options.shouldRetry(e)):Promise.resolve(t<this.options.attempts)}getDelay(t){return Math.min(this.options.maxDelay,this.options.baseDelay*2**t)}};function Xfe(t){if(typeof t=="number")return new tU({type:"linear",attempts:t,delay:1e3});switch(t.type){case"linear":return new tU(t);case"exponential":return new Zfe(t);default:throw new Error("Invalid retry strategy")}}var Qfe=async t=>{const e={},n=async r=>typeof r=="function"?await r():r;if(t?.auth){if(t.auth.type==="Bearer"){const r=await n(t.auth.token);if(!r)return e;e.authorization=`Bearer ${r}`}else if(t.auth.type==="Basic"){const[r,s]=await Promise.all([n(t.auth.username),n(t.auth.password)]);if(!r||!s)return e;e.authorization=`Basic ${btoa(`${r}:${s}`)}`}else if(t.auth.type==="Custom"){const[r,s]=await Promise.all([n(t.auth.prefix),n(t.auth.value)]);if(!s)return e;e.authorization=`${r??""} ${s}`}}return e},Jfe=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function ehe(t){const e=t.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!e)return"json";const r=e.split(";").shift()||"";return Jfe.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function the(t){try{return JSON.parse(t),!0}catch{return!1}}function s7(t){if(t===void 0)return!1;const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(t)?!0:t.buffer?!1:t.constructor&&t.constructor.name==="Object"||typeof t.toJSON=="function"}function nU(t){try{return JSON.parse(t)}catch{return t}}function rU(t){return typeof t=="function"}function nhe(t){if(t?.customFetchImpl)return t.customFetchImpl;if(typeof globalThis<"u"&&rU(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&rU(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function o7(...t){const e={};for(const n of t)if(n)if(n instanceof Headers)n.forEach((r,s)=>{e[s]=r});else{const r=Array.isArray(n)?n:Object.entries(n);for(const[s,o]of r)o!=null&&(e[s]=o)}return e}async function rhe(t){const e=new Headers(o7(t?.headers,await Qfe(t)));if(!e.has("content-type")){const n=she(t?.body);n&&e.set("content-type",n)}return e}function she(t){return s7(t)?"application/json":null}function ohe(t){const e=t.get("content-type");return e?e.split(";")[0].trim().toLowerCase():null}function ihe(t,e){const{body:n}=t;return n?!s7(n)||typeof n=="string"?n:ohe(e)==="application/x-www-form-urlencoded"?new URLSearchParams(n).toString():JSON.stringify(n):null}function ahe(t,e){var n;if(e?.method)return e.method.toUpperCase();if(t.startsWith("@")){const r=(n=t.split("@")[1])==null?void 0:n.split("/")[0];return a7.includes(r)?r.toUpperCase():e?.body?"POST":"GET"}return e?.body?"POST":"GET"}function lhe(t,e){let n;return!t?.signal&&t?.timeout&&(n=setTimeout(()=>e?.abort(),t?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var uhe=class i7 extends Error{constructor(e,n){super(n||JSON.stringify(e,null,2)),this.issues=e,Object.setPrototypeOf(this,i7.prototype)}};async function Vf(t,e){const n=await t["~standard"].validate(e);if(n.issues)throw new uhe(n.issues);return n.value}var a7=["get","post","put","patch","delete"],che=t=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(e,n){var r,s,o,a;const u=((s=(r=t.plugins)==null?void 0:r.find(c=>{var f;return(f=c.schema)!=null&&f.config?e.startsWith(c.schema.config.baseURL||"")||e.startsWith(c.schema.config.prefix||""):!1}))==null?void 0:s.schema)||t.schema;if(u){let c=e;(o=u.config)!=null&&o.prefix&&c.startsWith(u.config.prefix)&&(c=c.replace(u.config.prefix,""),u.config.baseURL&&(e=e.replace(u.config.prefix,u.config.baseURL))),(a=u.config)!=null&&a.baseURL&&c.startsWith(u.config.baseURL)&&(c=c.replace(u.config.baseURL,"")),c.startsWith("/")&&c.charAt(1)==="@"&&(c=c.substring(1));const f=u.schema[c];if(f){let p=n?.headers;if(f.headers&&!n?.disableValidation){const m={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((E,C)=>{m[C.toLowerCase()]=E});else if(typeof n.headers=="object")for(const[E,C]of Object.entries(n.headers))C!=null&&(m[E.toLowerCase()]=C)}const y=await Vf(f.headers,m),S={};for(const[E,C]of Object.entries(y))S[E.toLowerCase()]=C;p=S}let g=So(Ws({},n),{method:f.method,output:f.output,headers:p});return n?.disableValidation||(g=So(Ws({},g),{body:f.input?await Vf(f.input,n?.body):n?.body,params:f.params?await Vf(f.params,n?.params):n?.params,query:f.query?await Vf(f.query,n?.query):n?.query})),{url:e,options:g}}}return{url:e,options:n}}}),dhe=t=>{async function e(n,r){const s=So(Ws(Ws({},t),r),{headers:o7(t?.headers,r?.headers),plugins:[...t?.plugins||[],che(t||{}),...r?.plugins||[]]});if(t?.catchAllError)try{return await hx(n,s)}catch(o){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:o}}}return await hx(n,s)}return e},fhe=t=>t==="."||t==="..";function hhe(t,e){let n=t;for(const[r,s]of e)n=n.replace(r,s);if(fhe(n))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)}function phe(t,e){const{baseURL:n,params:r,query:s}=e||{query:{},params:{},baseURL:""};let o=t.startsWith("http")?t.split("/").slice(0,3).join("/"):n||"";if(t.startsWith("@")){const m=t.toString().split("@")[1].split("/")[0];a7.includes(m)&&(t=t.replace(`@${m}/`,"/"))}o.endsWith("/")||(o+="/");let[a,u]=t.replace(o,"").split("?");const c=new URLSearchParams(u);for(const[m,y]of Object.entries(s||{})){if(y==null)continue;let S;if(typeof y=="string")S=y;else if(Array.isArray(y)){for(const E of y)c.append(m,E);continue}else S=JSON.stringify(y);c.set(m,S)}const f=new Map;if(r)if(Array.isArray(r)){const m=a.split("/").filter(y=>y.startsWith(":"));for(const[y,S]of m.entries()){const E=r[y];f.set(S,String(E))}}else for(const[m,y]of Object.entries(r))f.set(`:${m}`,String(y));a=a.split("/").map(m=>hhe(m,f)).join("/"),a=a.replace(/^\/+/,"");let p=c.toString();return p=p.length>0?`?${p}`.replace(/\+/g,"%20"):"",o.startsWith("http")?new URL(`${a}${p}`,o):`${o}${a}${p}`}var hx=async(t,e)=>{var n,r,s,o,a,u,c,f;const{hooks:p,url:g,options:m}=await Yfe(t,e),y=nhe(m),S=new AbortController,E=(n=m.signal)!=null?n:S.signal,C=phe(g,m),w=await rhe(m),x=ihe(m,w),T=ahe(g,m),R=So(Ws({},m),{url:C,headers:w,body:x,method:T,signal:E});for(const W of p.onRequest)if(W){const Y=await W(R);typeof Y=="object"&&Y!==null&&Object.assign(R,Y)}("pipeTo"in R&&typeof R.pipeTo=="function"||typeof((r=e?.body)==null?void 0:r.pipe)=="function")&&("duplex"in R||(R.duplex="half"));const{clearTimeout:M}=lhe(m,S);let O=await y(R.url,R);M();const I={response:O,request:R};for(const W of p.onResponse)if(W){const Y=await W(So(Ws({},I),{response:(s=e?.hookOptions)!=null&&s.cloneResponse?O.clone():O}));Y instanceof Response?O=Y:typeof Y=="object"&&Y!==null&&(O=Y.response)}if(O.ok){if(!(R.method!=="HEAD"))return{data:"",error:null};const Y=ehe(O),ne={data:null,response:O,request:R};if(Y==="json"||Y==="text"){const $=await O.text(),ee=(o=R.jsonParser)!=null?o:nU;ne.data=await ee($)}else ne.data=await O[Y]();R?.output&&R.output&&!R.disableValidation&&(ne.data=await Vf(R.output,ne.data));for(const $ of p.onSuccess)$&&await $(So(Ws({},ne),{response:(a=e?.hookOptions)!=null&&a.cloneResponse?O.clone():O}));return e?.throw?ne.data:{data:ne.data,error:null}}const P=(u=e?.jsonParser)!=null?u:nU,k=await O.text(),H=the(k),U=H?await P(k):null,B={response:O,responseText:k,request:R,error:So(Ws({},U),{status:O.status,statusText:O.statusText})};for(const W of p.onError)W&&await W(So(Ws({},B),{response:(c=e?.hookOptions)!=null&&c.cloneResponse?O.clone():O}));if(e?.retry){const W=Xfe(e.retry),Y=(f=e.retryAttempt)!=null?f:0;if(await W.shouldAttemptRetry(Y,O)){for(const $ of p.onRetry)$&&await $(I);const ne=W.getDelay(Y);return await new Promise($=>setTimeout($,ne)),await hx(t,So(Ws({},e),{retryAttempt:Y+1}))}}if(e?.throw)throw new Kfe(O.status,O.statusText,H?U:k);return{data:null,error:So(Ws({},U),{status:O.status,statusText:O.statusText})}},yl={};const ghe=t=>{if(typeof process>"u")return;const e="/api/auth";if(yl.NEXT_PUBLIC_AUTH_URL)return yl.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(yl.NEXTAUTH_URL)try{return yl.NEXTAUTH_URL}catch{}if(yl.VERCEL_URL)try{const n=yl.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${n}${yl.VERCEL_URL}`).origin}${e}`}catch{}}},mhe=(t,e)=>{const n="credentials"in Request.prototype,r=dfe(t?.baseURL,t?.basePath)??ghe()??"/api/auth",s=[],o={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:t?.fetchOptions?.onSuccess,onError:t?.fetchOptions?.onError,onRequest:t?.fetchOptions?.onRequest,onResponse:t?.fetchOptions?.onResponse}},{onSuccess:a,onError:u,onRequest:c,onResponse:f,...p}={},g=dhe({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(M){return M?yfe(M,{strict:!1}):null},customFetchImpl:fetch,...p,plugins:[o,...p.plugins||[],Efe,...s]}),{$sessionSignal:m,session:y,broadcastSessionUpdate:S}=Bfe(g,t),E=[];let C={};const w={$sessionSignal:m,session:y},x={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},T=[{signal:"$sessionSignal",matcher(M){return M==="/sign-out"||M==="/update-user"||M==="/update-session"||M==="/sign-up/email"||M==="/sign-in/email"||M==="/delete-user"||M==="/verify-email"||M==="/revoke-sessions"||M==="/revoke-session"||M==="/revoke-other-sessions"||M==="/change-email"||M==="/change-password"},callback(M){M==="/sign-out"?S("signout"):(M==="/update-user"||M==="/update-session")&&S("updateUser")}}];for(const M of E)M.getAtoms&&Object.assign(w,M.getAtoms?.(g)),M.pathMethods&&Object.assign(x,M.pathMethods),M.atomListeners&&T.push(...M.atomListeners);const R={notify:M=>{w[M].set(!w[M].get())},listen:(M,O)=>{w[M].subscribe(O)},atoms:w};for(const M of E)M.getActions&&(C=Hfe(M.getActions?.(g,R,t)??{},C));return{get baseURL(){return r},pluginsActions:C,pluginsAtoms:w,pluginPathMethods:x,atomListeners:T,$fetch:g,$store:R}};function vhe(t){return typeof t=="object"&&t!==null&&"get"in t&&typeof t.get=="function"&&"lc"in t&&typeof t.lc=="number"}function yhe(t){return t.charAt(0).toUpperCase()+t.slice(1)}const bhe=new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+","gu"),She=/['\u2019]/g;function Ehe(t){return t.replace(She,"").match(bhe)??[]}function Che(t){return Ehe(t).map(e=>e.toLowerCase()).join("-")}function whe(t,e,n){const r=e[t],{fetchOptions:s,query:o,...a}=n||{};return r||(s?.method?s.method:a&&Object.keys(a).length>0?"POST":"GET")}function _he(t,e,n,r,s){function o(a=[]){return new Proxy(function(){},{get(u,c){if(typeof c!="string"||c==="then"||c==="catch"||c==="finally")return;const f=[...a,c];let p=t;for(const g of f)if(p&&typeof p=="object"&&g in p)p=p[g];else{p=void 0;break}return typeof p=="function"||vhe(p)?p:o(f)},apply:async(u,c,f)=>{const p="/"+a.map(Che).join("/"),g=f[0]||{},m=f[1]||{},{query:y,fetchOptions:S,...E}=g,C={...m,...S},w=whe(p,n,g);return await e(p,{...C,body:w==="GET"?void 0:{...E,...C?.body||{}},query:y||C?.query,method:w,async onSuccess(x){if(await C?.onSuccess?.(x),!s||C.disableSignal)return;const T=s.filter(M=>M.matcher(p));if(!T.length)return;const R=new Set;for(const M of T){const O=r[M.signal];if(!O)return;if(R.has(M.signal))continue;R.add(M.signal);const I=O.get();setTimeout(()=>{O.set(!I)},10),M.callback?.(p)}}})}})}return o()}function xhe(t,e={}){const n=A.useRef(t.get()),{keys:r,deps:s=[t,r]}=e,o=A.useCallback(u=>{const c=f=>{n.current!==f&&(n.current=f,u())};return c(t.value),r?.length?Ife(t,r,c):t.listen(c)},s),a=()=>n.current;return A.useSyncExternalStore(o,a,a)}function Ahe(t){return`use${yhe(t)}`}function The(t){const{pluginPathMethods:e,pluginsActions:n,pluginsAtoms:r,$fetch:s,$store:o,atomListeners:a}=mhe(t),u={};for(const[c,f]of Object.entries(r))u[Ahe(c)]=()=>xhe(f);return _he({...n,...u,$fetch:s,$store:o},s,e,r,a)}const eb=()=>Qy().betterAuthEnabled,Rhe="EMAIL_PASSWORD_SIGN_UP_DISABLED",Ihe=t=>typeof t=="object"&&t!==null&&t.code===Rhe,px=The(),Ohe=60;let Kf=null;const nv=()=>Math.floor(Date.now()/1e3),Nhe=t=>{const[,e]=t.split(".");if(!e)return nv();try{const n=JSON.parse(atob(e.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp=="number"?n.exp:nv()}catch{return nv()}},Mhe=async()=>{const t=await fetch("/api/auth/token",{credentials:"include"});if(!t.ok)return null;const e=await t.json();return e&&typeof e=="object"&&"token"in e&&typeof e.token=="string"?e.token:null},Phe=async()=>{if(Kf&&Kf.expiresAt-Ohe>nv())return Kf.value;const t=await Mhe();return Kf=t?{value:t,expiresAt:Nhe(t)}:null,t},yxe=()=>{Kf=null},khe={method:"POST",path:"/api/auth/sign-up/email"},Dhe={method:"POST",path:"/api/auth/sign-in/email"},Lhe=()=>{const[t,e]=A.useState("signIn"),[n,r]=A.useState(""),[s,o]=A.useState(""),[a,u]=A.useState(""),[c,f]=A.useState(null),[p,g]=A.useState(!1),[m,y]=A.useState(!1),S=m?"signIn":t,E=(w,x)=>{if(Ihe(w)){y(!0),e("signIn");return}const T=tfe(w);if(T==="fatal"){ife(w,x);return}f(rfe(w,T))},C=async w=>{if(w.preventDefault(),p)return;f(null),g(!0);const x=S==="signUp"?khe:Dhe,T=await(S==="signUp"?px.signUp.email({email:s,password:a,name:n}):px.signIn.email({email:s,password:a})).then(R=>R.error??null,R=>R);g(!1),T&&E(T,x)};return F.jsxs(F.Fragment,{children:[F.jsx(e7,{}),F.jsxs($F,{children:[F.jsx(WF,{}),F.jsxs("form",{onSubmit:C,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[m?F.jsx(lx,{tone:"info",children:"New signups are currently closed. Sign in with an existing account, or contact your administrator for access."}):F.jsxs("div",{className:"flex gap-1",children:[F.jsx(Zm,{size:"sm",variant:S==="signIn"?"secondary":"ghost","aria-pressed":S==="signIn",onClick:()=>e("signIn"),children:"Sign in"}),F.jsx(Zm,{size:"sm",variant:S==="signUp"?"secondary":"ghost","aria-pressed":S==="signUp",onClick:()=>e("signUp"),children:"Create account"})]}),c&&F.jsx(lx,{tone:"danger",children:c}),S==="signUp"&&F.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[F.jsx("label",{htmlFor:"ba-name",className:"text-fg-muted",children:"Name"}),F.jsx(xw,{id:"ba-name",type:"text",autoComplete:"name",value:n,onChange:w=>r(w.target.value),placeholder:"Your name",required:!0})]}),F.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[F.jsx("label",{htmlFor:"ba-email",className:"text-fg-muted",children:"Email"}),F.jsx(xw,{id:"ba-email",type:"email",autoComplete:"email",value:s,onChange:w=>o(w.target.value),placeholder:"you@example.com",required:!0})]}),F.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[F.jsx("label",{htmlFor:"ba-password",className:"text-fg-muted",children:"Password"}),F.jsx(xw,{id:"ba-password",type:"password",autoComplete:S==="signUp"?"new-password":"current-password",value:a,onChange:w=>u(w.target.value),placeholder:"Your password",required:!0})]}),F.jsx(Zm,{type:"submit",children:S==="signUp"?"Create account":"Sign in"})]}),F.jsx(qF,{note:KF({betterAuthEnabled:eb(),cognitoConfigured:Jy()})})]})]})},Uhe=({children:t})=>{const{data:e,isPending:n}=px.useSession();return n?F.jsx(WT,{}):e?F.jsx(F.Fragment,{children:t}):F.jsx(Lhe,{})},sU='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ri=t=>`var(${t})`,un=Ri("--accent"),Fhe=Ri("--accent-hover"),oU=Ri("--accent-soft"),If=Ri("--accent-fg"),iU=Ri("--surface"),tc=Ri("--fg"),zhe=Ri("--surface-sunken"),nm=Ri("--fg-muted"),Of=Ri("--line"),Bhe=zy({name:"remit",tokens:{colors:{brand:{primary:{10:{value:oU},20:{value:oU},40:{value:un},60:{value:un},80:{value:un},90:{value:un},100:{value:un}}},background:{primary:{value:iU},secondary:{value:zhe}},font:{primary:{value:tc},secondary:{value:nm},tertiary:{value:nm},interactive:{value:un},inverse:{value:If},hover:{value:un},focus:{value:un},active:{value:un}},border:{primary:{value:Of},secondary:{value:Of},focus:{value:un}}},fonts:{default:{variable:{value:sU},static:{value:sU}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Of},borderWidth:{value:"1px"},boxShadow:{value:"0 10px 30px -10px rgb(15 23 42 / 0.18), 0 4px 12px -6px rgb(15 23 42 / 0.1)"},backgroundColor:{value:iU}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:nm}}},button:{color:{value:tc},primary:{backgroundColor:{value:un},color:{value:If},_hover:{backgroundColor:{value:Fhe},color:{value:If}},_focus:{backgroundColor:{value:un},color:{value:If}},_active:{backgroundColor:{value:un},color:{value:If}}},link:{color:{value:un},_hover:{color:{value:un},backgroundColor:{value:"transparent"}},_focus:{color:{value:un},backgroundColor:{value:"transparent"}},_active:{color:{value:un},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:tc},borderColor:{value:Of},_focus:{borderColor:{value:un},boxShadow:{value:`0 0 0 2px ${un}`}}},field:{label:{color:{value:tc}}},tabs:{borderColor:{value:Of},item:{color:{value:nm},backgroundColor:{value:"transparent"},_active:{color:{value:un},borderColor:{value:un},backgroundColor:{value:"transparent"}},_hover:{color:{value:un}},_focus:{color:{value:un}}}},heading:{color:{value:tc}},text:{color:{value:tc}}}}}),jhe={signIn:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"}},signUp:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"},confirm_password:{placeholder:"Confirm your password"}}},Hhe=()=>F.jsx(lx,{tone:"warning",className:"fixed top-0 left-0 right-0 z-50 h-7 sm:h-10 overflow-hidden border-x-0 border-t-0",children:F.jsxs("span",{className:"flex items-center gap-2",children:[F.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),F.jsx("span",{className:"truncate hidden sm:inline",children:"— Cognito not configured. Set VITE_COGNITO_USER_POOL_ID and VITE_COGNITO_CLIENT_ID in .env.local to enable sign-in."}),F.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),$he=()=>F.jsx(qF,{note:KF({betterAuthEnabled:eb(),cognitoConfigured:Jy()})}),qhe=({children:t})=>{const{authStatus:e}=Ct(n=>[n.authStatus]);return e==="authenticated"?F.jsx(F.Fragment,{children:t}):e==="configuring"?F.jsx(WT,{}):F.jsx(Qle,{theme:Bhe,children:F.jsxs($F,{children:[F.jsx(WF,{}),F.jsx(Po,{hideSignUp:!1,formFields:jhe,components:{Footer:$he}})]})})},Whe=({children:t})=>eb()?F.jsx(Uhe,{children:t}):Jy()?F.jsx(Po.Provider,{children:F.jsx(qhe,{children:t})}):F.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[F.jsx(Hhe,{}),t]}),Ghe={bodySerializer:t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString():n)},Vhe=({onRequest:t,onSseError:e,onSseEvent:n,responseTransformer:r,responseValidator:s,sseDefaultRetryDelay:o,sseMaxRetryAttempts:a,sseMaxRetryDelay:u,sseSleepFn:c,url:f,...p})=>{let g;const m=c??(E=>new Promise(C=>setTimeout(C,E)));return{stream:async function*(){let E=o??3e3,C=0;const w=p.signal??new AbortController().signal;for(;!w.aborted;){C++;const x=p.headers instanceof Headers?p.headers:new Headers(p.headers);g!==void 0&&x.set("Last-Event-ID",g);try{const T={redirect:"follow",...p,body:p.serializedBody,headers:x,signal:w};let R=new Request(f,T);t&&(R=await t(f,T));const O=await(p.fetch??globalThis.fetch)(R);if(!O.ok)throw new Error(`SSE failed: ${O.status} ${O.statusText}`);if(!O.body)throw new Error("No body in SSE response");const I=O.body.pipeThrough(new TextDecoderStream).getReader();let P="";const k=()=>{try{I.cancel()}catch{}};w.addEventListener("abort",k);try{for(;;){const{done:H,value:U}=await I.read();if(H)break;P+=U,P=P.replace(/\r\n/g,`
225
- `).replace(/\r/g,`
226
- `);const B=P.split(`
227
-
228
- `);P=B.pop()??"";for(const W of B){const Y=W.split(`
229
- `),ne=[];let $;for(const de of Y)if(de.startsWith("data:"))ne.push(de.replace(/^data:\s*/,""));else if(de.startsWith("event:"))$=de.replace(/^event:\s*/,"");else if(de.startsWith("id:"))g=de.replace(/^id:\s*/,"");else if(de.startsWith("retry:")){const Ae=Number.parseInt(de.replace(/^retry:\s*/,""),10);Number.isNaN(Ae)||(E=Ae)}let ee,fe=!1;if(ne.length){const de=ne.join(`
230
- `);try{ee=JSON.parse(de),fe=!0}catch{ee=de}}fe&&(s&&await s(ee),r&&(ee=await r(ee))),n?.({data:ee,event:$,id:g,retry:E}),ne.length&&(yield ee)}}}finally{w.removeEventListener("abort",k),I.releaseLock()}break}catch(T){if(e?.(T),a!==void 0&&C>=a)break;const R=Math.min(E*2**(C-1),u??3e4);await m(R)}}}()}},Khe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Yhe=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Zhe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},l7=({allowReserved:t,explode:e,name:n,style:r,value:s})=>{if(!e){const u=(t?s:s.map(c=>encodeURIComponent(c))).join(Yhe(r));switch(r){case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;case"simple":return u;default:return`${n}=${u}`}}const o=Khe(r),a=s.map(u=>r==="label"||r==="simple"?t?u:encodeURIComponent(u):tb({allowReserved:t,name:n,value:u})).join(o);return r==="label"||r==="matrix"?o+a:a},tb=({allowReserved:t,name:e,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${t?n:encodeURIComponent(n)}`},u7=({allowReserved:t,explode:e,name:n,style:r,value:s,valueOnly:o})=>{if(s instanceof Date)return o?s.toISOString():`${n}=${s.toISOString()}`;if(r!=="deepObject"&&!e){let c=[];Object.entries(s).forEach(([p,g])=>{c=[...c,p,t?g:encodeURIComponent(g)]});const f=c.join(",");switch(r){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}const a=Zhe(r),u=Object.entries(s).map(([c,f])=>tb({allowReserved:t,name:r==="deepObject"?`${n}[${c}]`:c,value:f})).join(a);return r==="label"||r==="matrix"?a+u:u},Xhe=/\{[^{}]+\}/g,Qhe=({path:t,url:e})=>{let n=e;const r=e.match(Xhe);if(r)for(const s of r){let o=!1,a=s.substring(1,s.length-1),u="simple";a.endsWith("*")&&(o=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),u="label"):a.startsWith(";")&&(a=a.substring(1),u="matrix");const c=t[a];if(c==null)continue;if(Array.isArray(c)){n=n.replace(s,l7({explode:o,name:a,style:u,value:c}));continue}if(typeof c=="object"){n=n.replace(s,u7({explode:o,name:a,style:u,value:c,valueOnly:!0}));continue}if(u==="matrix"){n=n.replace(s,`;${tb({name:a,value:c})}`);continue}const f=encodeURIComponent(u==="label"?`.${c}`:c);n=n.replace(s,f)}return n},Jhe=({baseUrl:t,path:e,query:n,querySerializer:r,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let a=(t??"")+o;e&&(a=Qhe({path:e,url:a}));let u=n?r(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(a+=`?${u}`),a};function aU(t){const e=t.body!==void 0;if(e&&t.bodySerializer)return"serializedBody"in t?t.serializedBody!==void 0&&t.serializedBody!==""?t.serializedBody:null:t.body!==""?t.body:null;if(e)return t.body}const epe=async(t,e)=>{const n=typeof e=="function"?await e(t):e;if(n)return t.scheme==="bearer"?`Bearer ${n}`:t.scheme==="basic"?`Basic ${btoa(n)}`:n},c7=({parameters:t={},...e}={})=>r=>{const s=[];if(r&&typeof r=="object")for(const o in r){const a=r[o];if(a==null)continue;const u=t[o]||e;if(Array.isArray(a)){const c=l7({allowReserved:u.allowReserved,explode:!0,name:o,style:"form",value:a,...u.array});c&&s.push(c)}else if(typeof a=="object"){const c=u7({allowReserved:u.allowReserved,explode:!0,name:o,style:"deepObject",value:a,...u.object});c&&s.push(c)}else{const c=tb({allowReserved:u.allowReserved,name:o,value:a});c&&s.push(c)}}return s.join("&")},tpe=t=>{if(!t)return"stream";const e=t.split(";")[0]?.trim();if(e){if(e.startsWith("application/json")||e.endsWith("+json"))return"json";if(e==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>e.startsWith(n)))return"blob";if(e.startsWith("text/"))return"text"}},npe=(t,e)=>e?!!(t.headers.has(e)||t.query?.[e]||t.headers.get("Cookie")?.includes(`${e}=`)):!1,rpe=async({security:t,...e})=>{for(const n of t){if(npe(e,n.name))continue;const r=await epe(n,e.auth);if(!r)continue;const s=n.name??"Authorization";switch(n.in){case"query":e.query||(e.query={}),e.query[s]=r;break;case"cookie":e.headers.append("Cookie",`${s}=${r}`);break;default:e.headers.set(s,r);break}}},lU=t=>Jhe({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:c7(t.querySerializer),url:t.url}),uU=(t,e)=>{const n={...t,...e};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=d7(t.headers,e.headers),n},spe=t=>{const e=[];return t.forEach((n,r)=>{e.push([r,n])}),e},d7=(...t)=>{const e=new Headers;for(const n of t){if(!n)continue;const r=n instanceof Headers?spe(n):Object.entries(n);for(const[s,o]of r)if(o===null)e.delete(s);else if(Array.isArray(o))for(const a of o)e.append(s,a);else o!==void 0&&e.set(s,typeof o=="object"?JSON.stringify(o):o)}return e};class zw{fns=[];clear(){this.fns=[]}eject(e){const n=this.getInterceptorIndex(e);this.fns[n]&&(this.fns[n]=null)}exists(e){const n=this.getInterceptorIndex(e);return!!this.fns[n]}getInterceptorIndex(e){return typeof e=="number"?this.fns[e]?e:-1:this.fns.indexOf(e)}update(e,n){const r=this.getInterceptorIndex(e);return this.fns[r]?(this.fns[r]=n,e):!1}use(e){return this.fns.push(e),this.fns.length-1}}const ope=()=>({error:new zw,request:new zw,response:new zw}),ipe=c7({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),ape={"Content-Type":"application/json"},f7=(t={})=>({...Ghe,headers:ape,parseAs:"auto",querySerializer:ipe,...t}),lpe=(t={})=>{let e=uU(f7(),t);const n=()=>({...e}),r=f=>(e=uU(e,f),n()),s=ope(),o=async f=>{const p={...e,...f,fetch:f.fetch??e.fetch??globalThis.fetch,headers:d7(e.headers,f.headers),serializedBody:void 0};p.security&&await rpe({...p,security:p.security}),p.requestValidator&&await p.requestValidator(p),p.body!==void 0&&p.bodySerializer&&(p.serializedBody=p.bodySerializer(p.body)),(p.body===void 0||p.serializedBody==="")&&p.headers.delete("Content-Type");const g=lU(p);return{opts:p,url:g}},a=async f=>{const{opts:p,url:g}=await o(f),m={redirect:"follow",...p,body:aU(p)};let y=new Request(g,m);for(const M of s.request.fns)M&&(y=await M(y,p));const S=p.fetch;let E;try{E=await S(y)}catch(M){let O=M;for(const I of s.error.fns)I&&(O=await I(M,void 0,y,p));if(O=O||{},p.throwOnError)throw O;return p.responseStyle==="data"?void 0:{error:O,request:y,response:void 0}}for(const M of s.response.fns)M&&(E=await M(E,y,p));const C={request:y,response:E};if(E.ok){const M=(p.parseAs==="auto"?tpe(E.headers.get("Content-Type")):p.parseAs)??"json";if(E.status===204||E.headers.get("Content-Length")==="0"){let I;switch(M){case"arrayBuffer":case"blob":case"text":I=await E[M]();break;case"formData":I=new FormData;break;case"stream":I=E.body;break;default:I={};break}return p.responseStyle==="data"?I:{data:I,...C}}let O;switch(M){case"arrayBuffer":case"blob":case"formData":case"text":O=await E[M]();break;case"json":{const I=await E.text();O=I?JSON.parse(I):{};break}case"stream":return p.responseStyle==="data"?E.body:{data:E.body,...C}}return M==="json"&&(p.responseValidator&&await p.responseValidator(O),p.responseTransformer&&(O=await p.responseTransformer(O))),p.responseStyle==="data"?O:{data:O,...C}}const w=await E.text();let x;try{x=JSON.parse(w)}catch{}const T=x??w;let R=T;for(const M of s.error.fns)M&&(R=await M(T,E,y,p));if(R=R||{},p.throwOnError)throw R;return p.responseStyle==="data"?void 0:{error:R,...C}},u=f=>p=>a({...p,method:f}),c=f=>async p=>{const{opts:g,url:m}=await o(p);return Vhe({...g,body:g.body,headers:g.headers,method:f,onRequest:async(y,S)=>{let E=new Request(y,S);for(const C of s.request.fns)C&&(E=await C(E,g));return E},serializedBody:aU(g),url:m})};return{buildUrl:lU,connect:u("CONNECT"),delete:u("DELETE"),get:u("GET"),getConfig:n,head:u("HEAD"),interceptors:s,options:u("OPTIONS"),patch:u("PATCH"),post:u("POST"),put:u("PUT"),request:a,setConfig:r,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:u("TRACE")}},Ze=lpe(f7({baseUrl:"https://api.remit.example.com"})),h7=60;let rh=null;const p7=()=>Math.floor(Date.now()/1e3),upe=t=>t!==null&&t.expiresAt-h7>p7(),cpe=async()=>{const e=(await Ry()).tokens?.idToken;return e?(rh={value:e.toString(),expiresAt:e.payload.exp??p7()+h7},rh.value):(rh=null,null)},dpe=async()=>upe(rh)?rh.value:cpe(),fpe=async()=>eb()?Phe():Jy()?dpe():null;let cU=!1;const hpe=()=>{cU||(Ze.interceptors.request.use(async t=>{const e=await fpe();return e&&t.headers.set("Authorization",`Bearer ${e}`),t}),cU=!0)},ppe=(t,e)=>{YF(t,e.meta)&&Lc(t)},gpe=(t,e,n,r)=>{YF(t,r.meta)&&Lc(t)},gx=t=>new TextEncoder().encode(t),g7={},mx={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),g7[t]=e,mx[e]=t}function mpe(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2){const r=t.slice(n,n+2).toLowerCase();if(r in mx)e[n/2]=mx[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e}function kl(t){let e="";for(let n=0;n<t.byteLength;n++)e+=g7[t[n]];return e}const Th=t=>t instanceof Uint8Array?t:typeof t=="string"?gx(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),vpe=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";class Ei{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const n=new Ei({...e,headers:{...e.headers}});return n.query&&(n.query=ype(n.query)),n}static isInstance(e){if(!e)return!1;const n=e;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Ei.clone(this)}}function ype(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return{...e,[n]:Array.isArray(r)?[...r]:r}},{})}class Rh{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const n=e;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const dU=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},Dl=t=>encodeURIComponent(t).replace(/[!'()*]/g,bpe),bpe=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function XT(t){const e=[];for(let n of Object.keys(t).sort()){const r=t[n];if(n=Dl(n),Array.isArray(r))for(let s=0,o=r.length;s<o;s++)e.push(`${n}=${Dl(r[s])}`);else{let s=n;(r||typeof r=="string")&&(s+=`=${Dl(r)}`),e.push(s)}}return e.join("&")}const rm="[aws-rum-web:unknown.unknown]";class be{static configure(e){be.debugEnabled=e}static getCallerInfo(){var e,n;try{const r=new Error().stack;if(!r)return rm;const s=r.split(`
231
- `);if(s.length<4)return rm;const o=s[3];if(!o)return rm;const a=o.match(/at (?:(.+?)\s+\()?/);if(a&&a.length>=2){const u=a[1].trim(),c=u.split(".");if(c.length>=2){const f=(e=c[c.length-2])!==null&&e!==void 0?e:"unknown",p=(n=c[c.length-1])!==null&&n!==void 0?n:"unknown";return`[aws-rum-web:${f}.${p}]`}return`[aws-rum-web:${u}]`}}catch{}return rm}static info(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.info(r,e,...n)}static debug(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.debug(r,e,...n)}static warn(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.warn(r,e,...n)}static error(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.error(r,e,...n)}}be.debugEnabled=!1;const fU=2048,hU=.2,Spe=()=>typeof CompressionStream<"u",Epe=async t=>{const e=new Blob([t]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())},Cpe=async t=>{const e=t.length;if(be.debug(`compressIfBeneficial called, payload size: ${e}B`),!Spe())return be.debug("CompressionStream not supported, skipping compression"),{body:t,compressed:!1};if(e<fU)return be.debug(`Payload size ${e}B below threshold ${fU}B, skipping compression`),{body:t,compressed:!1};const n=await Epe(t),r=1-n.length/e;return r>=hU?(be.debug(`Compressed ${e}B -> ${n.length}B (${(r*100).toFixed(1)}% reduction)`),{body:n,compressed:!0}):(be.debug(`Compression ratio ${(r*100).toFixed(1)}% below threshold ${hU*100}%, skipping`),{body:t,compressed:!1})},wpe="POST",_pe="application/json",xpe="text/plain;charset=UTF-8",Ape=64e3;class Tpe{constructor(e,n){this.sendFetch=async r=>{var s,o;const a=JSON.stringify(pU(r)),u=(o=(s=this.config.compressionStrategy)===null||s===void 0?void 0:s.enabled)!==null&&o!==void 0?o:!1,{body:c,compressed:f}=u?await Cpe(a):{body:a,compressed:!1},p=await this.getHttpRequestOptions(r,c,_pe,f);let g=new Ei(p);return this.signing&&(g=await this.signing.sign(g)),this.config.fetchRequestHandler.handle(g)},this.sendBeacon=async r=>{const s=JSON.stringify(pU(r));if(s.length>Ape)throw new Error("Payload too large for sendBeacon");const o=await this.getHttpRequestOptions(r,s,xpe,!1);let a=new Ei(o);return this.signing&&(a=await this.signing.presign(a)),this.config.beaconRequestHandler.handle(a)},this.getHttpRequestOptions=async(r,s,o,a)=>{const u=this.config.endpoint.pathname.replace(/\/$/,""),c=Object.assign({"content-type":o,host:this.config.endpoint.host},this.config.headers);a&&(c["Content-Encoding"]="gzip");const f={method:wpe,protocol:this.config.endpoint.protocol,port:Number(this.config.endpoint.port)||void 0,headers:c,hostname:this.config.endpoint.hostname,path:`${u}/appmonitors/${r.AppMonitorDetails.id}`,body:s};return this.signing?Object.assign(Object.assign({},f),{headers:Object.assign(Object.assign({},f.headers),{"X-Amz-Content-Sha256":await this.signing.hashAndEncode(s)})}):f},this.config=e,this.signing=n}}const pU=t=>{const e=[];t.RumEvents.forEach(r=>e.push(Rpe(r)));let n={BatchId:t.BatchId,AppMonitorDetails:t.AppMonitorDetails,UserDetails:t.UserDetails,RumEvents:e};return t.SessionMetadata&&(n=Object.assign(Object.assign({},n),{SessionMetadata:t.SessionMetadata})),t.Alias&&(n=Object.assign(Object.assign({},n),{Alias:t.Alias})),n},Rpe=t=>({id:t.id,timestamp:Math.round(t.timestamp.getTime()/1e3),type:t.type,metadata:t.metadata,details:t.details});class Ipe{handle(e){const n=this.sendBeacon(e);return new Promise((r,s)=>{n?r({response:new Rh({statusCode:200})}):s()})}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}sendBeacon(e){let n=e.path;if(e.query){const o=XT(e.query);o&&(n+=`?${o}`)}const{port:r}=e,s=`${e.protocol}//${e.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(s,e.body)}}const Ope=(t=0)=>new Promise((e,n)=>{t&&setTimeout(()=>{const r=new Error(`Request did not complete within ${t} ms`);r.name="TimeoutError",n(r)},t)});let Npe=class{constructor({fetchFunction:e,requestTimeout:n}={}){this.requestTimeout=n,this.fetchFunction=e}destroy(){}handle(e,{abortSignal:n}={}){const r=this.requestTimeout;if(n?.aborted){const m=new Error("Request aborted");return m.name="AbortError",Promise.reject(m)}let s=e.path;if(e.query){const m=XT(e.query);m&&(s+=`?${m}`)}const{port:o,method:a}=e,u=`${e.protocol}//${e.hostname}${o?`:${o}`:""}${s}`,f={body:a==="GET"||a==="HEAD"?void 0:e.body,headers:new Headers(e.headers),method:a};typeof AbortController<"u"&&(f.signal=n);const p=new Request(u,f),g=[this.fetchFunction.apply(window,[p]).then(m=>{const y=m.headers,S={};for(const C of y.entries())S[C[0]]=C[1];return m.body!==void 0?{response:new Rh({headers:S,statusCode:m.status,body:m.body})}:m.blob().then(C=>({response:new Rh({headers:S,statusCode:m.status,body:C})}))}),Ope(r)];return n&&g.push(new Promise((m,y)=>{n.onabort=()=>{const S=new Error("Request aborted");S.name="AbortError",y(S)}})),Promise.race(g)}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}},sm;const Mpe=new Uint8Array(16);function Ppe(){if(!sm&&(sm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!sm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return sm(Mpe)}const Qn=[];for(let t=0;t<256;++t)Qn.push((t+256).toString(16).slice(1));function kpe(t,e=0){return Qn[t[e+0]]+Qn[t[e+1]]+Qn[t[e+2]]+Qn[t[e+3]]+"-"+Qn[t[e+4]]+Qn[t[e+5]]+"-"+Qn[t[e+6]]+Qn[t[e+7]]+"-"+Qn[t[e+8]]+Qn[t[e+9]]+"-"+Qn[t[e+10]]+Qn[t[e+11]]+Qn[t[e+12]]+Qn[t[e+13]]+Qn[t[e+14]]+Qn[t[e+15]]}const Dpe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),gU={randomUUID:Dpe};function sh(t,e,n){if(gU.randomUUID&&!t)return gU.randomUUID();t=t||{};const r=t.random||(t.rng||Ppe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,kpe(r)}const QT=t=>{if(crypto)return crypto.getRandomValues(t);if(msCrypto)return msCrypto.getRandomValues(t);throw new Error("No crypto library found.")},m7=[];for(let t=0;t<256;t++)m7[t]=(t+256).toString(16).substr(1);const nb="X-Amzn-Trace-Id",rb="traceparent",Lpe=2,Upe=32,Fpe=16,zpe=4,v7=(t,e)=>Array.isArray(e)?e.some(n=>n.test(t)):e,y7={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},Bpe=t=>200<=t&&t<300,b7=t=>Math.floor(t/100)===4,JT=t=>Math.floor(t/100)===5,eR=t=>t===429,S7=(t,e)=>{const n=e.urlsToInclude.some(s=>s.test(t)),r=e.urlsToExclude.some(s=>s.test(t));return n&&!r},Sc=()=>Date.now()/1e3,jpe=(t,e,n)=>{const r={request:{}};return r.request.method=e?.method?e.method:"GET",r.request.traced=n,r.request.url=rv(t),r},E7=(t,e,n,r)=>({version:"1.0.0",name:t,origin:"AWS::RUM::AppMonitor",id:_7(),start_time:e,trace_id:n?Vpe():Gpe(),end_time:void 0,subsegments:[],in_progress:!1}),C7=(t,e,n)=>{const r={id:_7(),name:t,start_time:e,end_time:void 0,in_progress:!1,namespace:t.endsWith(".amazonaws.com")?"aws":"remote"};return n&&(r.http=n),r},w7=t=>{try{return t.hostname?t.hostname:t.url?new URL(t.url).hostname:new URL(t.toString()).hostname}catch{return window.location.hostname}},Hpe=(t,e,n,r)=>{t.headers||(t.headers={}),r?t.headers[rb]=nR(e,n):t.headers[nb]=tR(e,n)},$pe=(t,e,n,r)=>{r?t.set(rb,nR(e,n)):t.set(nb,tR(e,n))},tR=(t,e)=>"Root="+t+";Parent="+e+";Sampled=1",nR=(t,e)=>"00-"+t+"-"+e+"-01",qpe=t=>t?.length===zpe&&t[0].length===Lpe&&t[1].length===Upe&&t[2].length===Fpe&&(t[3]==="00"||t[3]==="01"),Wpe=(t,e)=>{var n,r;const s={};if(t)if(e){const o=(n=t.get(rb))===null||n===void 0?void 0:n.split("-");o&&qpe(o)&&(s.traceId=o[1],s.segmentId=o[2])}else{const o=(r=t.get(nb))===null||r===void 0?void 0:r.split(";");o?.length===3&&(s.traceId=o[0].split("Root=")[1],s.segmentId=o[1].split("Parent=")[1])}return s},rv=t=>t.url?t.url:t.toString(),Gpe=()=>`1-${Kpe()}-${Ype()}`,Vpe=()=>{const t=new Uint8Array(16);return QT(t),`${rR(t)}`},_7=()=>{const t=new Uint8Array(8);return QT(t),rR(t)},Kpe=()=>Math.floor(Date.now()/1e3).toString(16),Ype=()=>{const t=new Uint8Array(12);return QT(t),rR(t)},rR=t=>{let e="";for(let n=0;n<t.length;n++)e+=m7[t[n]];return e};class Zpe{constructor(e,n,r=s=>2e3*Math.pow(2,s-1)){this.handler=e,this.retries=n,this.backoff=r}async handle(e){let n=this.retries;for(;;)try{const r=await this.handler.handle(e);if(Bpe(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!eR(r)&&!JT(r))throw new Error(`${r}`);if(n<=0)throw r;n--,await this.sleep(this.backoff(this.retries-n))}}async sleep(e){return new Promise(n=>setTimeout(n,e))}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}}const Uc="cwr_c",Iv="cwr_i",Ov="cwr_s",Nv="cwr_u",Xpe=3e4,Qpe="arw-module",mU="CWR: Cannot dispatch; no AWS credentials.";class Jpe{constructor(e,n,r,s,o){this.disableCodes=["403","404"],this.shouldPurgeCredentials=!0,this.dispatchFetch=async()=>{if(this.doRequest()){const a=this.createRequest();return be.info(`Dispatching ${a.RumEvents.length} events via fetch`),this.rum.sendFetch(a).catch(this.handleReject)}},this.dispatchBeacon=async()=>{if(this.doRequest()){const a=this.createRequest();return be.info(`Dispatching ${a.RumEvents.length} events via beacon`),this.rum.sendBeacon(a).catch(()=>this.rum.sendFetch(a))}},this.dispatchFetchFailSilent=async()=>this.dispatchFetch().catch(a=>{be.error("Dispatch fetch failed silently:",a)}),this.dispatchBeaconFailSilent=async()=>this.dispatchBeacon().catch(a=>{be.error("Dispatch beacon failed silently:",a)}),this.flushSync=()=>{if(document.visibilityState==="hidden"&&this.doRequest(!0)){let a=this.rum.sendBeacon,u=this.rum.sendFetch;this.config.useBeacon||([a,u]=[u,a]);const c=this.createRequest(!0);be.debug(`Flushing ${c.RumEvents.length} events on page hide`),a(c).catch(()=>u(c)).catch(f=>{be.error("Page hide flush failed:",f)})}},this.handleReject=a=>{throw a instanceof Error&&(a.message==="403"&&this.config.signing&&this.shouldPurgeCredentials?(this.shouldPurgeCredentials=!1,this.forceRebuildClient()):this.disableCodes.includes(a.message)&&(be.error("Dispatch failed with status code:",a.message),this.disable())),a},this.defaultClientBuilder=(a,u,c,f)=>{const p=c&&this.signingConfigFactory?this.signingConfigFactory(c,u):void 0;return new Tpe({fetchRequestHandler:new Zpe(new Npe({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new Ipe,endpoint:a,region:u,credentials:c,headers:this.headers,compressionStrategy:f},p)},this.applicationId=e,this.region=n,this.endpoint=r,this.eventCache=s,this.enabled=!0,this.buildClient=o.clientBuilder||this.defaultClientBuilder,this.config=o,this.headers=o.headers,this.startDispatchTimer(),o.signing?this.rum={sendFetch:()=>Promise.reject(new Error(mU)),sendBeacon:()=>Promise.reject(new Error(mU))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Uc}_${e}`:Uc,this.identityStorageKey=this.config.cookieAttributes.unique?`${Iv}_${e}`:Iv}enable(){this.enabled=!0,this.startDispatchTimer()}disable(){this.stopDispatchTimer(),this.enabled=!1,be.warn("Dispatch disabled")}setAwsCredentials(e){this.credentialProvider=e,this.rum=this.buildClient(this.endpoint,this.region,e,this.config.compressionStrategy),typeof e=="function"&&e()}setCognitoCredentialProviderFactory(e){this.cognitoCredentialProviderFactory=e}setSigningConfigFactory(e){this.signingConfigFactory=e}setCognitoCredentials(e,n){this.identityPoolId=e,this.guestRoleArn=n,this.cognitoCredentialProviderFactory&&this.setAwsCredentials(this.cognitoCredentialProviderFactory(this.config,this.applicationId,e,n))}startDispatchTimer(){document.addEventListener("visibilitychange",this.flushSync),document.addEventListener("pagehide",this.flushSync),!(this.config.dispatchInterval<=0||this.dispatchTimerId)&&(this.dispatchTimerId=window.setInterval(this.dispatchFetchFailSilent,this.config.dispatchInterval))}stopDispatchTimer(){document.removeEventListener("visibilitychange",this.flushSync),document.removeEventListener("pagehide",this.flushSync),this.dispatchTimerId&&(window.clearInterval(this.dispatchTimerId),this.dispatchTimerId=void 0)}doRequest(e=!1){return this.enabled?e&&this.eventCache.hasCandidates()?!0:this.eventCache.hasEvents():!1}createRequest(e=!1){return{BatchId:sh(),AppMonitorDetails:this.eventCache.getAppMonitorDetails(),UserDetails:this.eventCache.getUserDetails(),SessionMetadata:JSON.stringify(this.eventCache.getCommonMetadata()),RumEvents:this.eventCache.getEventBatch(e),Alias:this.config.alias}}forceRebuildClient(){be.warn("Removing credentials from local storage"),localStorage.removeItem(this.credentialStorageKey),this.identityPoolId?(be.info("Rebuilding client with fresh cognito credentials"),localStorage.removeItem(this.identityStorageKey),this.setCognitoCredentials(this.identityPoolId,this.guestRoleArn)):this.credentialProvider&&(be.info("Rebuilding client with most recently passed provider"),this.setAwsCredentials(this.credentialProvider))}}const x7={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),x7[t]=e}function ege(t){let e="";for(let n=0;n<t.byteLength;n++)e+=x7[t[n]];return e}class tge{format(e){const n=[];for(const o of Object.keys(e)){const a=gx(o);n.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(e[o]))}const r=new Uint8Array(n.reduce((o,a)=>o+a.byteLength,0));let s=0;for(const o of n)r.set(o,s),s+=o.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?ws.boolTrue:ws.boolFalse]);case"byte":return Uint8Array.from([ws.byte,e.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,ws.short),n.setInt16(1,e.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,ws.integer),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const s=new Uint8Array(9);return s[0]=ws.long,s.set(e.value.bytes,1),s;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,ws.byteArray),o.setUint16(1,e.value.byteLength,!1);const a=new Uint8Array(o.buffer);return a.set(e.value,3),a;case"string":const u=gx(e.value),c=new DataView(new ArrayBuffer(3+u.byteLength));c.setUint8(0,ws.string),c.setUint16(1,u.byteLength,!1);const f=new Uint8Array(c.buffer);return f.set(u,3),f;case"timestamp":const p=new Uint8Array(9);return p[0]=ws.timestamp,p.set(sR.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!nge.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=ws.uuid,g.set(mpe(e.value.replace(/-/g,"")),1),g}}}var ws;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(ws||(ws={}));const nge=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class sR{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,s=Math.abs(Math.round(e));r>-1&&s>0;r--,s/=256)n[r]=s;return e<0&&vU(n),new sR(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&vU(e),parseInt(kl(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function vU(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const rge="X-Amz-Algorithm",sge="X-Amz-Credential",A7="X-Amz-Date",oge="X-Amz-SignedHeaders",ige="X-Amz-Expires",T7="X-Amz-Signature",R7="X-Amz-Security-Token",I7="authorization",O7=A7.toLowerCase(),age="date",lge=[I7,O7,age],uge=T7.toLowerCase(),vx="x-amz-content-sha256",cge=R7.toLowerCase(),dge={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},fge=/^proxy-/,hge=/^sec-/,Bw="AWS4-HMAC-SHA256",pge="AWS4-HMAC-SHA256-PAYLOAD",gge="UNSIGNED-PAYLOAD",mge=50,N7="aws4_request",vge=3600*24*7,yge=({query:t={}})=>{const e=[],n={};for(const r of Object.keys(t)){if(r.toLowerCase()===uge)continue;const s=Dl(r);e.push(s);const o=t[r];typeof o=="string"?n[s]=`${s}=${Dl(o)}`:Array.isArray(o)&&(n[s]=o.slice(0).reduce((a,u)=>a.concat([`${s}=${Dl(u)}`]),[]).sort().join("&"))}return e.sort().map(r=>n[r]).filter(r=>r).join("&")},bge=t=>Sge(t).toISOString().replace(/\.\d{3}Z$/,"Z"),Sge=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class Ege{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:n,region:r,service:s,sha256:o,uriEscapePath:a=!0}){this.service=s,this.sha256=o,this.uriEscapePath=a,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=dU(r),this.credentialProvider=dU(n)}createCanonicalRequest(e,n,r){const s=Object.keys(n).sort();return`${e.method}
232
- ${this.getCanonicalPath(e)}
233
- ${yge(e)}
234
- ${s.map(o=>`${o}:${n[o]}`).join(`
235
- `)}
236
-
237
- ${s.join(";")}
238
- ${r}`}async createStringToSign(e,n,r,s){const o=new this.sha256;o.update(Th(r));const a=await o.digest();return`${s}
239
- ${e}
240
- ${n}
241
- ${kl(a)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const n=[];for(const o of e.split("/"))o?.length!==0&&o!=="."&&(o===".."?n.pop():n.push(o));const r=`${e?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&e?.endsWith("/")?"/":""}`;return Dl(r).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){const n=bge(e).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}const om={},jw=[],Hw=(t,e,n)=>`${t}/${e}/${n}/${N7}`,Cge=async(t,e,n,r,s)=>{const o=await yU(t,e.secretAccessKey,e.accessKeyId),a=`${n}:${r}:${s}:${kl(o)}:${e.sessionToken}`;if(a in om)return om[a];for(jw.push(a);jw.length>mge;)delete om[jw.shift()];let u=`AWS4${e.secretAccessKey}`;for(const c of[n,r,s,N7])u=await yU(t,u,c);return om[a]=u},yU=(t,e,n)=>{const r=new t(e);return r.update(Th(n)),r.digest()},bU=({headers:t},e,n)=>{const r={};for(const s of Object.keys(t).sort()){if(t[s]==null)continue;const o=s.toLowerCase();(o in dge||e?.has(o)||fge.test(o)||hge.test(o))&&(!n||n&&!n.has(o))||(r[o]=t[s].trim().replace(/\s+/g," "))}return r},$w=async({headers:t,body:e},n)=>{for(const r of Object.keys(t))if(r.toLowerCase()===vx)return t[r];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||vpe(e)){const r=new n;return r.update(Th(e)),kl(await r.digest())}return gge},wge=(t,e)=>{t=t.toLowerCase();for(const n of Object.keys(e))if(t===n.toLowerCase())return!0;return!1},_ge=(t,e={})=>{const{headers:n,query:r={}}=Ei.clone(t);for(const s of Object.keys(n)){const o=s.toLowerCase();(o.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(o)||e.hoistableHeaders?.has(o))&&(r[s]=n[s],delete n[s])}return{...t,headers:n,query:r}},SU=t=>{t=Ei.clone(t);for(const e of Object.keys(t.headers))lge.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t};class xge extends Ege{headerFormatter=new tge;constructor({applyChecksum:e,credentials:n,region:r,service:s,sha256:o,uriEscapePath:a=!0}){super({applyChecksum:e,credentials:n,region:r,service:s,sha256:o,uriEscapePath:a})}async presign(e,n={}){const{signingDate:r=new Date,expiresIn:s=3600,unsignableHeaders:o,unhoistableHeaders:a,signableHeaders:u,hoistableHeaders:c,signingRegion:f,signingService:p}=n,g=await this.credentialProvider();this.validateResolvedCredentials(g);const m=f??await this.regionProvider(),{longDate:y,shortDate:S}=this.formatDate(r);if(s>vge)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=Hw(S,m,p??this.service),C=_ge(SU(e),{unhoistableHeaders:a,hoistableHeaders:c});g.sessionToken&&(C.query[R7]=g.sessionToken),C.query[rge]=Bw,C.query[sge]=`${g.accessKeyId}/${E}`,C.query[A7]=y,C.query[ige]=s.toString(10);const w=bU(C,o,u);return C.query[oge]=this.getCanonicalHeaderList(w),C.query[T7]=await this.getSignature(y,E,this.getSigningKey(g,m,S,p),this.createCanonicalRequest(C,w,await $w(e,this.sha256))),C}async sign(e,n){return typeof e=="string"?this.signString(e,n):e.headers&&e.payload?this.signEvent(e,n):e.message?this.signMessage(e,n):this.signRequest(e,n)}async signEvent({headers:e,payload:n},{signingDate:r=new Date,priorSignature:s,signingRegion:o,signingService:a,eventStreamCredentials:u}){const c=o??await this.regionProvider(),{shortDate:f,longDate:p}=this.formatDate(r),g=Hw(f,c,a??this.service),m=await $w({headers:{},body:n},this.sha256),y=new this.sha256;y.update(e);const S=kl(await y.digest()),E=[pge,p,g,s,S,m].join(`
242
- `);return this.signString(E,{signingDate:r,signingRegion:c,signingService:a,eventStreamCredentials:u})}async signMessage(e,{signingDate:n=new Date,signingRegion:r,signingService:s,eventStreamCredentials:o}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:n,signingRegion:r,signingService:s,priorSignature:e.priorSignature,eventStreamCredentials:o}).then(u=>({message:e.message,signature:u}))}async signString(e,{signingDate:n=new Date,signingRegion:r,signingService:s,eventStreamCredentials:o}={}){const a=o??await this.credentialProvider();this.validateResolvedCredentials(a);const u=r??await this.regionProvider(),{shortDate:c}=this.formatDate(n),f=new this.sha256(await this.getSigningKey(a,u,c,s));return f.update(Th(e)),kl(await f.digest())}async signRequest(e,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:s,signingRegion:o,signingService:a}={}){const u=await this.credentialProvider();this.validateResolvedCredentials(u);const c=o??await this.regionProvider(),f=SU(e),{longDate:p,shortDate:g}=this.formatDate(n),m=Hw(g,c,a??this.service);f.headers[O7]=p,u.sessionToken&&(f.headers[cge]=u.sessionToken);const y=await $w(f,this.sha256);!wge(vx,f.headers)&&this.applyChecksum&&(f.headers[vx]=y);const S=bU(f,s,r),E=await this.getSignature(p,m,this.getSigningKey(u,c,g,a),this.createCanonicalRequest(f,S,y));return f.headers[I7]=`${Bw} Credential=${u.accessKeyId}/${m}, SignedHeaders=${this.getCanonicalHeaderList(S)}, Signature=${E}`,f}async getSignature(e,n,r,s){const o=await this.createStringToSign(e,n,s,Bw),a=new this.sha256(await r);return a.update(Th(o)),kl(await a.digest())}getSigningKey(e,n,r,s){return Cge(this.sha256,e,r,n,s||this.service)}}const Age="rum",Tge={expiresIn:60},Rge=(t,e)=>{const n=new xge({applyChecksum:!0,credentials:t,region:e,service:Age,uriEscapePath:!0,sha256:Fl});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,Tge),hashAndEncode:async r=>{const s=new Fl;return s.update(r),ege(await s.digest()).toLowerCase()}}};function EU(t,e){return new Request(t,e)}function Ige(t=0){return new Promise((e,n)=>{t&&setTimeout(()=>{const r=new Error(`Request did not complete within ${t} ms`);r.name="TimeoutError",n(r)},t)})}const qw={supported:void 0};class sb{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new sb(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(n=>n||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),qw.supported===void 0&&(qw.supported=typeof Request<"u"&&"keepalive"in EU("https://[::1]"))}destroy(){}async handle(e,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const s=r??this.config.requestTimeout,o=this.config.keepAlive===!0,a=this.config.credentials;if(n?.aborted){const x=CU(n);return Promise.reject(x)}let u=e.path;const c=XT(e.query||{});c&&(u+=`?${c}`),e.fragment&&(u+=`#${e.fragment}`);let f="";if(e.username!=null||e.password!=null){const x=e.username??"",T=e.password??"";f=`${x}:${T}@`}const{port:p,method:g}=e,m=`${e.protocol}//${f}${e.hostname}${p?`:${p}`:""}${u}`,y=g==="GET"||g==="HEAD"?void 0:e.body,S={body:y,headers:new Headers(e.headers),method:g,credentials:a};this.config?.cache&&(S.cache=this.config.cache),y&&(S.duplex="half"),typeof AbortController<"u"&&(S.signal=n),qw.supported&&(S.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(S,this.config.requestInit(e));let E=()=>{};const C=EU(m,S),w=[fetch(C).then(x=>{const T=x.headers,R={};for(const O of T.entries())R[O[0]]=O[1];return x.body!=null?{response:new Rh({headers:R,reason:x.statusText,statusCode:x.status,body:x.body})}:x.blob().then(O=>({response:new Rh({headers:R,reason:x.statusText,statusCode:x.status,body:O})}))}),Ige(s)];return n&&w.push(new Promise((x,T)=>{const R=()=>{const M=CU(n);T(M)};if(typeof n.addEventListener=="function"){const M=n;M.addEventListener("abort",R,{once:!0}),E=()=>M.removeEventListener("abort",R)}else n.onabort=R})),Promise.race(w).finally(E)}updateHttpClientConfig(e,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[e]=n,r))}httpHandlerConfigs(){return this.config??{}}}function CU(t){const e=t&&typeof t=="object"&&"reason"in t?t.reason:void 0;if(e){if(e instanceof Error){const s=new Error("Request aborted");return s.name="AbortError",s.cause=e,s}const r=new Error(String(e));return r.name="AbortError",r}const n=new Error("Request aborted");return n.name="AbortError",n}const Ww=async t=>{const{value:e}=await t.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,e))},Oge=async t=>{const{value:e}=await t.body.getReader().read();return String.fromCharCode.apply(null,e)},Nge="POST",Mge="application/x-www-form-urlencoded",Pge="https:",kge="AssumeRoleWithWebIdentity",Dge="2011-06-15";class Lge{constructor(e){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:kge,Version:Dge}),s=new URLSearchParams(Object.entries(r)).toString(),o=new Ei({method:Nge,headers:{"content-type":Mge,host:this.hostname},protocol:Pge,hostname:this.hostname,body:s}),{response:a}=await this.fetchRequestHandler.handle(o),u=await Oge(a);return{accessKeyId:u.split("<AccessKeyId>")[1].split("</AccessKeyId>")[0],secretAccessKey:u.split("<SecretAccessKey>")[1].split("</SecretAccessKey>")[0],sessionToken:u.split("<SessionToken>")[1].split("</SessionToken>")[0],expiration:new Date(u.split("<Expiration>")[1].split("</Expiration>")[0])}}catch(r){throw new Error(`CWR: Failed to retrieve credentials from STS: ${r}`)}},this.hostname=`sts.${e.region}.amazonaws.com`,this.fetchRequestHandler=e.fetchRequestHandler}}const Uge="POST",Fge="application/x-amz-json-1.1",zge="https:",Bge="AWSCognitoIdentityService.GetId",jge="AWSCognitoIdentityService.GetOpenIdToken",Hge="AWSCognitoIdentityService.GetCredentialsForIdentity";class $ge{constructor(e){var n;this.getId=async r=>{var s;let o=null;try{o=JSON.parse(localStorage.getItem(this.identityStorageKey))}catch(a){!((s=this.config)===null||s===void 0)&&s.debug&&be.error("Failed to parse stored identity:",a)}if(o&&o.IdentityId)return Promise.resolve(o);try{const a=JSON.stringify(r),u=this.getHttpRequest(Bge,a),c=await Ww((await this.fetchRequestHandler.handle(u)).response);try{localStorage.setItem(this.identityStorageKey,JSON.stringify({IdentityId:c.IdentityId}))}catch(f){be.error("Failed to store identity:",f)}return c}catch(a){throw new Error(`CWR: Failed to retrieve Cognito identity: ${a}`)}},this.getOpenIdToken=async r=>{try{const s=JSON.stringify(r),o=this.getHttpRequest(jge,s),{response:a}=await this.fetchRequestHandler.handle(o);return this.validateOpenIdTokenResponse(await Ww(a))}catch(s){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve Cognito OpenId token: ${s}`)}},this.getCredentialsForIdentity=async r=>{try{const s=JSON.stringify({IdentityId:r}),o=this.getHttpRequest(Hge,s),{response:a}=await this.fetchRequestHandler.handle(o),{AccessKeyId:u,Expiration:c,SecretKey:f,SessionToken:p}=this.validateCredenentialsResponse(await Ww(a));return{accessKeyId:u,secretAccessKey:f,sessionToken:p,expiration:new Date(c*1e3)}}catch(s){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve credentials for Cognito identity: ${s}`)}},this.validateOpenIdTokenResponse=r=>{if("IdentityId"in r&&"Token"in r)return r;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown OpenIdToken response")},this.validateCredenentialsResponse=r=>{if("IdentityId"in r&&"Credentials"in r)return r.Credentials;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown Credentials response")},this.getHttpRequest=(r,s)=>new Ei({method:Uge,headers:{"content-type":Fge,"x-amz-target":r},protocol:zge,hostname:this.hostname,body:s}),this.hostname=`cognito-identity.${e.region}.amazonaws.com`,this.fetchRequestHandler=e.fetchRequestHandler,this.config=e.clientConfig,this.identityStorageKey=!((n=e.clientConfig)===null||n===void 0)&&n.cookieAttributes.unique?`${Iv}_${e.applicationId}`:Iv}}class M7{constructor(e,n){this.ChainAnonymousCredentialsProvider=async()=>this.AnonymousCredentialsProvider().catch(this.AnonymousStorageCredentialsProvider).catch(this.AnonymousCognitoCredentialsProvider),this.AnonymousCredentialsProvider=async()=>new Promise((s,o)=>{if(this.renewCredentials())return o();s(this.credentials)}),this.AnonymousStorageCredentialsProvider=async()=>new Promise((s,o)=>{let a;try{a=JSON.parse(localStorage.getItem(this.credentialStorageKey))}catch{return o()}if(this.credentials=Object.assign(Object.assign({},a),{expiration:new Date(a.expiration)}),this.renewCredentials())return o();s(this.credentials)});const r=e.identityPoolId.split(":")[0];this.config=e,this.cognitoIdentityClient=new $ge({fetchRequestHandler:new sb,region:r,clientConfig:e,applicationId:n}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Uc}_${n}`:Uc}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;const e=new Date(this.credentials.expiration.getTime()-Xpe);return new Date>e}}class qge extends M7{constructor(e,n){super(e,n),this.AnonymousCognitoCredentialsProvider=async()=>{let s=1;for(;;)try{const o=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),a=await this.cognitoIdentityClient.getOpenIdToken(o),u=await this.stsClient.assumeRoleWithWebIdentity({RoleArn:this.config.guestRoleArn,RoleSessionName:"cwr",WebIdentityToken:a.Token});this.credentials=u;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(u))}catch{}return be.debug("AWS credentials fetched successfully"),u}catch(o){if(s)s--,be.warn("AWS credential fetch failed, retrying");else throw be.error("AWS credential fetch failed:",o),o}};const r=e.identityPoolId.split(":")[0];this.stsClient=new Lge({fetchRequestHandler:new sb,region:r})}}class Wge extends M7{constructor(e,n){super(e,n),this.AnonymousCognitoCredentialsProvider=async()=>{let r=1;for(;;)try{const s=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),o=await this.cognitoIdentityClient.getCredentialsForIdentity(s.IdentityId);this.credentials=o;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(o))}catch{}return be.debug("AWS credentials fetched successfully"),o}catch(s){if(r)r--,be.warn("AWS credential fetch failed, retrying");else throw be.error("AWS credential fetch failed:",s),s}}}}const fs="com.amazon.rum",Gge="com.amazonaws.rum",Mv=`${fs}.http_event`,P7=`${fs}.xray_trace_event`,Vge=`${fs}.largest_contentful_paint_event`,Kge=`${fs}.first_input_delay_event`,Yge=`${fs}.cumulative_layout_shift_event`,Zge=`${fs}.interaction_to_next_paint_event`,yx=`${fs}.performance_navigation_event`,k7=`${fs}.performance_resource_event`,Xge=`${fs}.dom_event`,Qge=`${fs}.js_error_event`,Jge=`${fs}.page_view_event`,bx=`${fs}.session_start_event`,wU=`${fs}.rrweb_event`;class Os{constructor(e){this.enabled=!0,this.pluginId=Os.generatePluginId(e)}static generatePluginId(e){return`${Os.idPrefix}.${e}`}load(e){var n;this.context=e,(n=this.onload)===null||n===void 0||n.call(this)}getPluginId(){return this.pluginId}}Os.idPrefix=Gge;class eme{constructor(e){this.context=e,this.plugins=new Map}addPlugin(e){const n=e.getPluginId();if(this.hasPlugin(n))throw new Error(`Plugin "${n}" already defined in the PluginManager`);this.plugins.set(n,e),e.load(this.context),be.debug(`Plugin loaded: ${n}`)}updatePlugin(e,n){var r;const s=this.getPlugin(e);(r=s?.update)===null||r===void 0||r.call(s,n)}enable(){this.plugins.forEach(e=>e.enable())}disable(){this.plugins.forEach(e=>e.disable())}flush(){this.plugins.forEach(e=>{var n;return(n=e.flush)===null||n===void 0?void 0:n.call(e)})}hasPlugin(e){return!!this.getPlugin(e)}record(e,n){const r=this.getPlugin(e);if(r?.record instanceof Function)r.record(n);else throw new Error("AWS RUM Client record: Invalid plugin ID")}getPlugin(e){var n;return(n=this.plugins.get(e))!==null&&n!==void 0?n:this.plugins.get(Os.generatePluginId(e))}}const _U=(t,e,n,r,s)=>{let o=t+"=";o+=e||"",s!==void 0&&(o+=`; Expires=${s.toUTCString()}`),o+=`; Domain=${n.domain}`,o+=`; Path=${n.path}`,o+=`; SameSite=${n.sameSite}`,o+=n.secure?"; Secure":"",document.cookie=o},tme=(t,e)=>{let n=t+"=";n+=`; Expires=${new Date(0)}`,n+=`; Domain=${e.domain}`,n+=`; Path=${e.path}`,n+=`; SameSite=${e.sameSite}`,n+=e.secure?"Secure":"",document.cookie=n},xU=t=>{const e=document.cookie.split("; ");for(const n of e){const r=n.split("=");if(r[0]===t)return r[1]}return""};var oh;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(oh||(oh={}));const nme=()=>{var t,e;const n=navigator.userAgentData;if(!n)return;const r=(t=n.brands)!==null&&t!==void 0?t:[],s=(e=r.find(o=>o.brand!=="Chromium"&&!o.brand.startsWith("Not")))!==null&&e!==void 0?e:r[0];return{browserName:s?.brand,browserVersion:s?.version,osName:n.platform,deviceType:n.mobile?"mobile":"desktop"}},im="00000000-0000-0000-0000-000000000000",rme="desktop",sme="web";class ome{constructor(e,n,r,s){this.isSessionIdManual=!1,this.isUserIdManual=!1,this.appMonitorDetails=e,this.config=n,this.recordEvent=r,this.pageManager=s,this.sessionCookieName=this.config.cookieAttributes.unique?`${Ov}_${this.appMonitorDetails.id}`:Ov,this.session={sessionId:im,record:this.sample(),eventCount:0},this.config.userId||this.initializeUser(),this.collectAttributes(),this.addSessionAttributes(this.config.sessionAttributes),this.getSessionFromCookie(),this.config.userId&&(this.isUserIdManual=!0,this.adoptUser(this.config.userId)),this.config.sessionId&&(this.isSessionIdManual=!0,this.adoptSession(this.config.sessionId))}isSampled(){return this.session.record}getSession(){return this.isSessionIdManual?(new Date>=this.sessionExpiry&&(this.session.eventCount=0,this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie()),this.session):(this.session.sessionId===im?this.createSession():new Date>=this.sessionExpiry&&this.createSession(),this.session)}getAttributes(){return this.attributes}addSessionAttributes(e){this.attributes=Object.assign(Object.assign({},this.attributes),e)}pinSessionId(e){if(!e){be.warn("pinSessionId called with empty value; ignoring.");return}this.isSessionIdManual=!0,e!==this.session.sessionId&&this.adoptSession(e)}startSession(e){return e?.userId!==void 0&&(e.userId?(this.isUserIdManual=!0,e.userId!==this.userId&&this.adoptUser(e.userId)):be.warn("startSession called with empty userId; ignoring user rotation.")),e?.sessionId!==void 0?e.sessionId?(this.isSessionIdManual=!0,this.adoptSession(e.sessionId),this.config.suppressSessionStartEvent||this.recordEvent(bx,{version:"1.0.0"})):(be.warn("startSession called with empty sessionId; minting a fresh session."),this.isSessionIdManual=!1,this.createSession()):(this.isSessionIdManual=!1,this.createSession()),this.session.sessionId}getUserId(){return this.isUserIdManual?this.userId:this.useCookies()?this.userId:im}pinUserId(e){if(!e){be.warn("pinUserId called with empty value; ignoring.");return}this.isUserIdManual=!0,e!==this.userId&&this.adoptUser(e)}incrementSessionEventCount(){this.session.eventCount++,this.renewSession()}isLimitExceeded(){return this.session.eventCount>=this.config.sessionEventLimit&&this.config.sessionEventLimit>0}canRecord(){return this.session.record&&!this.isLimitExceeded()}initializeUser(){let e="";this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.config.userIdRetentionDays<=0?this.userId="00000000-0000-0000-0000-000000000000":this.useCookies()?(e=this.getUserIdCookie(),this.userId=e||sh(),this.createOrRenewUserCookie(e,this.userExpiry)):this.userId=sh()}createOrRenewSessionCookie(e,n){btoa&&_U(this.sessionCookieName,btoa(JSON.stringify(e)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(e,n){_U(Nv,e,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return xU(Nv)}getSessionFromCookie(){if(this.useCookies()){const e=xU(this.sessionCookieName);if(e&&atob)try{this.session=JSON.parse(atob(e)),this.pageManager.resumeSession(this.session.page),be.info(`Restored session: ${this.session.sessionId}`)}catch(n){be.error("Failed to restore session",n)}}}storeSessionAsCookie(){this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),this.useCookies()&&this.createOrRenewSessionCookie(this.session,this.sessionExpiry)}createSession(){this.session={sessionId:sh(),record:this.session.sessionId===im?this.session.record:this.sample(),eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),be.info(`Session start: ${this.session.sessionId}`),this.session.record||be.warn(`Session is NOT sampled. Consider increasing sessionSampleRate to avoid data loss (currently ${this.config.sessionSampleRate})`),this.config.suppressSessionStartEvent||this.recordEvent(bx,{version:"1.0.0"})}adoptSession(e){this.session={sessionId:e,record:this.session.record,eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),be.info(`Adopted session: ${e}`)}adoptUser(e){this.userId=e,this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),be.info(`Adopted user: ${e}`)}renewSession(){this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.session.page=this.pageManager.getPage(),this.storeSessionAsCookie()}collectAttributes(){var e;const n=nme();this.attributes={browserLanguage:navigator.language,browserName:n?.browserName,browserVersion:n?.browserVersion,osName:n?.osName,osVersion:n?.osVersion,deviceType:(e=n?.deviceType)!==null&&e!==void 0?e:rme,platformType:sme,domain:window.location.hostname,"aws:releaseId":this.config.releaseId},n||(this.attributes["aws:userAgent"]=navigator.userAgent)}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}sample(){return Math.random()<this.config.sessionSampleRate}}class ime{constructor(e,n){this.config=e,this.record=n,this.page=void 0,this.resumed=!1,this.recordInteraction=!1}getPage(){return this.page}getAttributes(){return this.attributes}resumeSession(e){this.recordInteraction=!0,e&&(this.page=e,this.resumed=!0)}recordPageView(e){let n;if(typeof e=="string"?n=e:n=e.pageId,be.debug(`recordPageView called with pageId: ${n}`),this.useCookies()&&(this.recordInteraction=!0),!this.page)this.createLandingPage(n),be.info(`Landing page created: ${n}`);else if(this.page.pageId!==n)this.createNextPage(this.page,n),be.debug(`Navigation to new page: ${n}`);else if(this.resumed){be.info(`Resumed session for page: ${n}`),this.collectAttributes(this.page,typeof e=="object"?e:void 0);return}else{be.debug(`No page change detected for: ${n}`);return}this.collectAttributes(this.page,typeof e=="object"?e:void 0),this.recordPageViewEvent(this.page)}createNextPage(e,n){const r=Date.now();be.debug(`Creating next page ${n}, interaction: ${e.interaction+1}`),this.timeOnParentPage=r-e.start,this.resumed=!1,this.page={pageId:n,parentPageId:e.pageId,interaction:e.interaction+1,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:r}}createLandingPage(e){this.page={pageId:e,interaction:0,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:Date.now()}}collectAttributes(e,n){var r;this.attributes={title:!((r=n?.pageAttributes)===null||r===void 0)&&r.title?n.pageAttributes.title:document.title,pageId:e.pageId},this.recordInteraction&&(this.attributes.interaction=e.interaction,e.parentPageId!==void 0&&(this.attributes.parentPageId=e.parentPageId)),n?.pageTags&&(this.attributes.pageTags=n.pageTags),n?.pageAttributes&&(this.attributes=Object.assign(Object.assign({},n.pageAttributes),this.attributes))}createPageViewEvent(e){const n={version:"1.0.0",pageId:e.pageId};return this.recordInteraction&&(n.interaction=e.interaction,n.pageInteractionId=e.pageId+"-"+e.interaction,e.parentPageId!==void 0&&(n.parentPageInteractionId=e.parentPageId+"-"+(e.interaction-1),n.timeOnParentPage=this.timeOnParentPage),n.referrer=document.referrer,n.referrerDomain=this.getDomainFromReferrer()),n}recordPageViewEvent(e){this.record(Jge,this.createPageViewEvent(e))}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}getDomainFromReferrer(){try{return new URL(document.referrer).hostname}catch{return document.referrer==="localhost"?document.referrer:""}}}var Ih;(function(t){t.EVENT="event"})(Ih||(Ih={}));class D7{constructor(){this.subscribers=new Map}subscribe(e,n){var r;const s=(r=this.subscribers.get(e))!==null&&r!==void 0?r:[];s.length||this.subscribers.set(e,s),s.push(n)}unsubscribe(e,n){const r=this.subscribers.get(e);if(r){for(let s=0;s<r.length;s++)if(r[s]===n)return r.splice(s,1),!0}return!1}dispatch(e,n){const r=this.subscribers.get(e);if(r)for(const s of r)s(n)}}const ame="3.1.0",lme=new Set(["pageId","parentPageId","interaction","pageTags","title"]),Gw=(t,e)=>{if(!t)return{};const n={};for(const[r,s]of Object.entries(t)){if(r.startsWith("aws:")){be.warn(`Dropping ${e} metadata key "${r}": "aws:" namespace is reserved.`);continue}if((e==="event"||e==="hook")&&lme.has(r)){be.warn(`Dropping ${e} metadata key "${r}": owned by page state.`);continue}const o=typeof s;if(o!=="string"&&o!=="number"&&o!=="boolean"){be.warn(`Dropping ${e} metadata key "${r}": value must be string|number|boolean.`);continue}n[r]=s}return n};class ume{constructor(e,n,r=new D7){this.eventBus=r,this.events=[],this.candidates=new Map,this.droppedEvent=0,this.sessionLimitExceeded=0,this.recordPageView=s=>{this.isCurrentUrlAllowed()&&this.pageManager.recordPageView(s)},this.recordEvent=(s,o,a)=>{this.enabled&&this.isCurrentUrlAllowed()&&(s!==bx&&this.sessionManager.getSession(),this.sessionManager.canRecord()?(this.sessionManager.incrementSessionEventCount(),this.addRecordToCache(s,o,a)):this.sessionLimitExceeded++)},this.recordCandidate=(s,o,a)=>{const u=this.sessionManager.getSession();if(!this.enabled||!this.isCurrentUrlAllowed()||!u.record)return;const[c]=this.createEvent(s,o,a);if(this.candidates.has(s)){this.candidates.set(s,c);return}this.candidates.size<this.config.candidatesCacheSize&&!this.sessionManager.isLimitExceeded()&&(this.candidates.set(s,c),this.sessionManager.incrementSessionEventCount())},this.getSession=()=>{if(this.isCurrentUrlAllowed())return this.sessionManager.getSession()},this.getSessionId=()=>this.sessionManager.getSession().sessionId,this.pinSessionId=s=>{this.sessionManager.pinSessionId(s)},this.startSession=s=>this.sessionManager.startSession(s),this.getUserId=()=>this.sessionManager.getUserId(),this.pinUserId=s=>{this.sessionManager.pinUserId(s)},this.addRecordToCache=(s,o,a)=>{if(!this.enabled)return;if(this.events.length>=this.config.eventCacheSize){this.droppedEvent+=1;return}const[u,c]=this.createEvent(s,o,a);this.eventBus.dispatch(Ih.EVENT,c),this.events.push(u)},this.createEvent=(s,o,a)=>{var u;const c=(u=this.pageManager.getAttributes())!==null&&u!==void 0?u:{},f=Gw(a,"event");let p={};if(this.eventMetadataHook)try{const y=Object.freeze(Object.assign({},c)),S=this.eventMetadataHook(s,o,y);S&&(p=Gw(S,"hook"))}catch(y){be.warn(`eventMetadataHook threw for type "${s}"; dropping hook output for this event.`,y)}const g=Object.assign(Object.assign(Object.assign({},c),p),f),m={id:sh(),timestamp:new Date,type:s};return[Object.assign(Object.assign({},m),{details:JSON.stringify(o),metadata:JSON.stringify(g)}),Object.assign(Object.assign({},m),{details:o,metadata:g})]},this.appMonitorDetails=e,this.config=n,this.enabled=!0,this.pageManager=new ime(n,this.recordEvent),this.sessionManager=new ome(e,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(Gw(n.applicationAttributes,"application"))}enable(){this.enabled=!0}disable(){this.enabled=!1}setPluginFlushHook(e){this.pluginFlushHook=e}isSessionSampled(){return this.sessionManager.isSampled()}hasEvents(){if(this.sessionLimitExceeded>0){const e=this.events.length+this.sessionLimitExceeded;this.sessionManager.isSampled()?be.warn(`Dropped ${this.sessionLimitExceeded} of ${e} recently observed events (${(this.sessionLimitExceeded/e*100).toFixed(2)}%) because the session limit has exceeded. Consider increasing sessionEventLimit (currently ${this.config.sessionEventLimit}) to ${e} or more to avoid data loss.`):be.warn(`Dropped ${this.sessionLimitExceeded} of ${e} recently observed events (${(this.sessionLimitExceeded/e*100).toFixed(2)}%) because current session is not sampled. Consider increasing sessionSampleRate (currently ${this.config.sessionSampleRate}) to capture more user sessions.`),this.sessionLimitExceeded=0}return this.events.length!==0}hasCandidates(){return this.candidates.size!==0}getEventBatch(e=!1){var n;if(this.droppedEvent>0){const s=this.events.length+this.droppedEvent;be.warn(`Dropped ${this.droppedEvent} of ${s} recently observed events (${(this.droppedEvent/s*100).toFixed(2)}%) due to insufficient in-memory queue. Increase eventCacheSize to ${s} (currently ${this.config.eventCacheSize}) to avoid data loss.`),this.droppedEvent=0}let r=[];if(e&&((n=this.pluginFlushHook)===null||n===void 0||n.call(this)),e&&this.hasCandidates())if(this.candidates.size<=this.config.batchLimit)r=Array.from(this.candidates.values()),this.candidates.clear();else{let s=0;for(const o of Array.from(this.candidates.keys())){if(s++>=this.config.batchLimit)break;const a=this.candidates.get(o);a&&(r.push(a),this.candidates.delete(o))}}return this.events.length&&(this.events.length<=this.config.batchLimit-r.length?(r.push(...this.events),this.events=[]):r.push(...this.events.splice(0,this.config.batchLimit-r.length))),r}getAppMonitorDetails(){return this.appMonitorDetails}getUserDetails(){return{userId:this.sessionManager.getUserId(),sessionId:this.sessionManager.getSession().sessionId}}addSessionAttributes(e){this.sessionManager.addSessionAttributes(e)}getCommonMetadata(){return Object.assign(Object.assign(Object.assign({},this.sessionManager.getAttributes()),this.applicationAttributes),{version:"1.0.0","aws:client":this.installationMethod,"aws:clientVersion":ame})}setEventMetadataHook(e){this.eventMetadataHook=e}clearEventMetadataHook(){this.eventMetadataHook=void 0}isCurrentUrlAllowed(){const e=document.location.toString(),n=this.config.pagesToExclude.some(s=>s.test(e));return this.config.pagesToInclude.some(s=>s.test(e))&&!n}}var xn;(function(t){t.OTHER="other",t.STYLESHEET="stylesheet",t.DOCUMENT="document",t.SCRIPT="script",t.IMAGE="image",t.FONT="font"})(xn||(xn={}));var ai;(function(t){t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.FRAME="frame",t.SCRIPT="script",t.CSS="css"})(ai||(ai={}));const AU=t=>[t.startTime,t.duration].join("#"),cme=[{name:xn.STYLESHEET,list:["css","less"]},{name:xn.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:xn.SCRIPT,list:["js"]},{name:xn.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:xn.FONT,list:["fnt","fon","otf","ttf","woff"]}],TU=(t,e)=>{let n=xn.OTHER;if(t){const r=t.substring(t.lastIndexOf("/")+1),s=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];cme.forEach(o=>{o.list.indexOf(s)>-1&&(n=o.name)})}if(e&&n===xn.OTHER)switch(e){case ai.IMAGE:case ai.IMG:case ai.INPUT:n=xn.IMAGE;break;case ai.IFRAME:case ai.FRAME:n=xn.DOCUMENT;break;case ai.SCRIPT:n=xn.SCRIPT;break;case ai.CSS:n=xn.STYLESHEET;break}return n},dme=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),fme=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,hme=(t,e)=>{try{return new URL(t).hostname===e&&fme.test(t)}catch{return!1}},L7="dom-event",pme={interactionId:()=>"",enableMutationObserver:!1,events:[]};class oR extends Os{constructor(e){super(L7),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},pme),e)}static getElementInfo(e){const n={name:"UNKNOWN"};return e.target instanceof Node&&(n.name=e.target.nodeName),e.target instanceof Element&&e.target.id&&(n.id=e.target.id),n}enable(){if(document.readyState!=="complete"){window.addEventListener("load",()=>this.enable());return}this.enabled||(this.addListeners(),this.config.enableMutationObserver&&this.observeDOMMutation(),this.enabled=!0)}disable(){this.enabled&&(this.removeListeners(),this.observer&&this.observer.disconnect(),this.enabled=!1)}update(e){e.forEach(n=>{this.addEventHandler(n),this.config.events.push(n)})}onload(){this.enable()}removeListeners(){this.config.events.forEach(e=>this.removeEventHandler(e))}addListeners(){this.config.events.forEach(e=>this.addEventHandler(e))}getEventListener(e){return n=>{var r;const s=oR.getElementInfo(n),o=this.config.interactionId(n),a=Object.assign(Object.assign(Object.assign({version:"1.1.0",event:n.type,element:s.name},s.id?{elementId:s.id}:{}),o?{interactionId:o}:{}),e?{cssLocator:e}:{});!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(Xge,a)}}addEventHandler(e){const n=e.event,r=this.getEventListener(e.cssLocator),s=[],o=this.eventListenerMap.has(e)?this.eventListenerMap.get(e):[];if(e.cssLocator)document.querySelectorAll(e.cssLocator).forEach(u=>{s.push(u)});else if(e.elementId){const a=document.getElementById(e.elementId);a&&s.push(a)}else e.element&&s.push(e.element);s.forEach(a=>{a.addEventListener(n,r),o.push({element:a,eventListener:r})}),this.eventListenerMap.set(e,o)}removeEventHandler(e){const n=this.eventListenerMap.get(e);n&&(n.forEach(r=>{const s=r.element,o=r.eventListener;s.removeEventListener(e.event,o)}),this.eventListenerMap.delete(e))}observeDOMMutation(){this.observer=new MutationObserver(()=>{this.removeListeners(),this.addListeners()}),this.observer.observe(document,{childList:!0,subtree:!0})}}const gme=t=>{const e=typeof t;return(e==="object"||e==="function")&&!!t},mme=t=>{const e={version:"1.0.0",type:"undefined",message:"undefined"};return t.type!==void 0&&(e.type=t.type),t.message!==void 0&&(e.message=t.message),t.filename!==void 0&&(e.filename=t.filename),t.lineno!==void 0&&(e.lineno=t.lineno),t.colno!==void 0&&(e.colno=t.colno),e},vme=(t,e)=>{t.type!=="unhandledrejection"&&(t.type=e.toString()),t.message=e.toString()},yme=(t,e,n)=>{e.name&&(t.type=e.name),e.message&&(t.message=e.message),e.fileName&&(t.filename=e.fileName),e.lineNumber&&(t.lineno=e.lineNumber),e.columnNumber&&(t.colno=e.columnNumber),n&&e.stack&&(t.stack=e.stack.length>n?e.stack.substring(0,n)+"...":e.stack)},U7=t=>t!==Object(t)&&t!==void 0&&t!==null,iR=(t,e)=>{const n=mme(t),r=t.error;return gme(r)?yme(n,r,e):U7(r)&&vme(n,r),n},F7="js-error",bme={stackTraceLength:1e3,ignore:()=>!1};class Sme extends Os{constructor(e){super(F7),this.eventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent(n)},this.promiseRejectEventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent({type:n.type,error:n.reason})},this.config=Object.assign(Object.assign({},bme),e)}enable(){this.enabled||(this.addEventHandler(),this.enabled=!0)}disable(){this.enabled&&(this.removeEventHandler(),this.enabled=!1)}record(e){e instanceof ErrorEvent?this.recordJsErrorEvent(e):this.recordJsErrorEvent({type:"error",error:e})}onload(){this.addEventHandler()}recordJsErrorEvent(e){var n;(n=this.context)===null||n===void 0||n.record(Qge,iR(e,this.config.stackTraceLength))}addEventHandler(){window.addEventListener("error",this.eventHandler),window.addEventListener("unhandledrejection",this.promiseRejectEventHandler)}removeEventHandler(){window.removeEventListener("error",this.eventHandler),window.removeEventListener("unhandledrejection",this.promiseRejectEventHandler)}}const Eme=t=>t.entryType==="resource"&&(!/^https?:/.test(t.name)||/^(fetch|xmlhttprequest)$/.test(t.initiatorType)),aR={eventLimit:10,ignore:Eme,recordAllTypes:[xn.DOCUMENT,xn.SCRIPT,xn.STYLESHEET,xn.FONT],sampleTypes:[xn.IMAGE,xn.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},Cme="navigation",nc="navigation",Vw="load";class wme extends Os{constructor(e){super(Cme),this.eventListener=()=>{performance.getEntriesByType(nc).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(s=>s.entryType===nc).filter(s=>!this.config.ignore(s)).forEach(s=>{this.performanceNavigationEventHandlerTimingLevel2(s)})}).observe({entryTypes:[nc]})},this.performanceNavigationEventHandlerTimingLevel1=()=>{setTimeout(()=>{var r;const s=performance.timing,o=s.navigationStart,a={version:"1.0.0",initiatorType:"navigation",startTime:0,unloadEventStart:s.unloadEventStart>0?s.unloadEventStart-o:0,promptForUnload:s.unloadEventEnd-s.unloadEventStart,redirectStart:s.redirectStart>0?s.redirectStart-o:0,redirectTime:s.redirectEnd-s.redirectStart,fetchStart:s.fetchStart>0?s.fetchStart-o:0,domainLookupStart:s.domainLookupStart>0?s.domainLookupStart-o:0,dns:s.domainLookupEnd-s.domainLookupStart,connectStart:s.connectStart>0?s.connectStart-o:0,connect:s.connectEnd-s.connectStart,secureConnectionStart:s.secureConnectionStart>0?s.secureConnectionStart-o:0,tlsTime:s.secureConnectionStart>0?s.connectEnd-s.secureConnectionStart:0,requestStart:s.requestStart>0?s.requestStart-o:0,timeToFirstByte:s.responseStart-s.requestStart,responseStart:s.responseStart>0?s.responseStart-o:0,responseTime:s.responseStart>0?s.responseEnd-s.responseStart:0,domInteractive:s.domInteractive>0?s.domInteractive-o:0,domContentLoadedEventStart:s.domContentLoadedEventStart>0?s.domContentLoadedEventStart-o:0,domContentLoaded:s.domContentLoadedEventEnd-s.domContentLoadedEventStart,domComplete:s.domComplete>0?s.domComplete-o:0,domProcessingTime:s.loadEventStart-s.responseEnd,loadEventStart:s.loadEventStart>0?s.loadEventStart-o:0,loadEventTime:s.loadEventEnd-s.loadEventStart,duration:s.loadEventEnd-s.navigationStart,navigationTimingLevel:1};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(yx,a)},0)},this.performanceNavigationEventHandlerTimingLevel2=n=>{var r;const s={version:"1.0.0",initiatorType:n.initiatorType,navigationType:n.type,startTime:n.startTime,unloadEventStart:n.unloadEventStart,promptForUnload:n.unloadEventEnd-n.unloadEventStart,redirectCount:n.redirectCount,redirectStart:n.redirectStart,redirectTime:n.redirectEnd-n.redirectStart,workerStart:n.workerStart,workerTime:n.workerStart>0?n.fetchStart-n.workerStart:0,fetchStart:n.fetchStart,domainLookupStart:n.domainLookupStart,dns:n.domainLookupEnd-n.domainLookupStart,nextHopProtocol:n.nextHopProtocol,connectStart:n.connectStart,connect:n.connectEnd-n.connectStart,secureConnectionStart:n.secureConnectionStart,tlsTime:n.secureConnectionStart>0?n.connectEnd-n.secureConnectionStart:0,requestStart:n.requestStart,timeToFirstByte:n.responseStart-n.requestStart,responseStart:n.responseStart,responseTime:n.responseStart>0?n.responseEnd-n.responseStart:0,domInteractive:n.domInteractive,domContentLoadedEventStart:n.domContentLoadedEventStart,domContentLoaded:n.domContentLoadedEventEnd-n.domContentLoadedEventStart,domComplete:n.domComplete,domProcessingTime:n.loadEventStart-n.responseEnd,loadEventStart:n.loadEventStart,loadEventTime:n.loadEventEnd-n.loadEventStart,duration:n.duration,headerSize:n.transferSize>0?n.transferSize-n.encodedBodySize:0,transferSize:n.transferSize,compressionRatio:n.encodedBodySize>0?n.decodedBodySize/n.encodedBodySize:0,navigationTimingLevel:2};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(yx,s)},this.config=Object.assign(Object.assign({},aR),e)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(Vw,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(Vw,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(nc).length?!!window.performance.getEntriesByType(nc)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(nc).filter(e=>!this.config.ignore(e)).forEach(e=>this.performanceNavigationEventHandlerTimingLevel2(e)):window.addEventListener(Vw,this.eventListener))}}var Kw,RU;function _me(){if(RU)return Kw;RU=1;function t(c){return typeof c=="function"}var e=console.error.bind(console);function n(c,f,p){var g=!!c[f]&&c.propertyIsEnumerable(f);Object.defineProperty(c,f,{configurable:!0,enumerable:g,writable:!0,value:p})}function r(c){c&&c.logger&&(t(c.logger)?e=c.logger:e("new logger isn't a function, not replacing"))}function s(c,f,p){if(!c||!c[f]){e("no original function "+f+" to wrap");return}if(!p){e("no wrapper function"),e(new Error().stack);return}if(!t(c[f])||!t(p)){e("original object and wrapper must be functions");return}var g=c[f],m=p(g,f);return n(m,"__original",g),n(m,"__unwrap",function(){c[f]===m&&n(c,f,g)}),n(m,"__wrapped",!0),n(c,f,m),m}function o(c,f,p){if(c)Array.isArray(c)||(c=[c]);else{e("must provide one or more modules to patch"),e(new Error().stack);return}if(!(f&&Array.isArray(f))){e("must provide one or more functions to wrap on modules");return}c.forEach(function(g){f.forEach(function(m){s(g,m,p)})})}function a(c,f){if(!c||!c[f]){e("no function to unwrap."),e(new Error().stack);return}if(!c[f].__unwrap)e("no original to unwrap to -- has "+f+" already been unwrapped?");else return c[f].__unwrap()}function u(c,f){if(c)Array.isArray(c)||(c=[c]);else{e("must provide one or more modules to patch"),e(new Error().stack);return}if(!(f&&Array.isArray(f))){e("must provide one or more functions to unwrap on modules");return}c.forEach(function(p){f.forEach(function(g){a(p,g)})})}return r.wrap=s,r.massWrap=o,r.unwrap=a,r.massUnwrap=u,Kw=r,Kw}var Pv=_me();const xme=qa(Pv),IU=O5({__proto__:null,default:xme},[Pv]);class lR extends Os{constructor(){super(...arguments),this.enable=this.patch.bind(this,!0),this.disable=this.patch.bind(this,!1),this.enabled=!1}patchAll(){const e=Pv.wrap.bind(IU);for(const n of this.patches)e(n.nodule,n.name,n.wrapper())}unpatchAll(){const e=Pv.unwrap.bind(IU);for(const n of this.patches)e(n.nodule,n.name)}patch(e=!0){this.enabled!==e&&(this.enabled=e,e?this.patchAll():this.unpatchAll())}}const Ame="page-view";class Tme extends lR{constructor(){super(Ame),this.pushState=()=>{const e=this;return n=>function(r,s,o){const a=n.apply(this,arguments);return e.recordPageView(),a}},this.replaceState=()=>{const e=this;return n=>function(r,s,o){const a=n.apply(this,arguments);return e.recordPageView(),a}},this.popstateListener=e=>{this.recordPageView()},this.recordPageView=()=>{this.context.recordPageView(this.createIdForCurrentPage())},this.enable()}onload(){this.addListener(),this.recordPageView()}get patches(){return[{nodule:History.prototype,name:"pushState",wrapper:this.pushState},{nodule:History.prototype,name:"replaceState",wrapper:this.replaceState}]}addListener(){window.addEventListener("popstate",this.popstateListener)}createIdForCurrentPage(){const e=window.location.pathname,n=window.location.hash;switch(this.context.config.pageIdFormat){case oh.PathAndHash:return e&&n?e+n:e||n||"";case oh.Hash:return n||"";case oh.Path:default:return e||""}}}const Rme="resource",Yw="resource";class Ime extends Os{constructor(e){super(Rme),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==Yw||this.config.ignore(r))return;const{name:s,initiatorType:o}=r,a=TU(s,o);this.config.recordAllTypes.includes(a)?this.recordResourceEvent(r):this.config.sampleTypes.includes(a)&&this.eventCount<this.config.eventLimit&&(this.recordResourceEvent(r),this.eventCount++)})},this.recordResourceEvent=({name:n,startTime:r,initiatorType:s,duration:o,transferSize:a})=>{var u;if(!hme(n,this.context.config.endpointUrl.hostname)&&!((u=this.context)===null||u===void 0)&&u.record){const c={version:"1.0.0",initiatorType:s,startTime:r,duration:o,fileType:TU(n,s),transferSize:a};this.context.config.recordResourceUrl&&(c.targetUrl=n),this.context.record(k7,c)}},this.config=Object.assign(Object.assign({},aR),e),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:Yw,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:Yw,buffered:!0})}}var Sx,OU,ob=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},uR=function(t){if(document.readyState==="loading")return"loading";var e=ob();if(e){if(t<e.domInteractive)return"loading";if(e.domContentLoadedEventStart===0||t<e.domContentLoadedEventStart)return"dom-interactive";if(e.domComplete===0||t<e.domComplete)return"dom-content-loaded"}return"complete"},Ome=function(t){var e=t.nodeName;return t.nodeType===1?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},ib=function(t,e){var n="";try{for(;t&&t.nodeType!==9;){var r=t,s=r.id?"#"+r.id:Ome(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+s.length>(e||100)-1)return n||s;if(n=n?s+">"+n:s,r.id)break;t=r.parentNode}}catch{}return n},z7=-1,Nme=function(){return z7},cd=function(t){addEventListener("pageshow",(function(e){e.persisted&&(z7=e.timeStamp,t(e))}),!0)},cR=function(){var t=ob();return t&&t.activationStart||0},Io=function(t,e){var n=ob(),r="navigate";return Nme()>=0?r="back-forward-cache":n&&(document.prerendering||cR()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},ou=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(s){Promise.resolve().then((function(){e(s.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},Oo=function(t,e,n,r){var s,o;return function(a){e.value>=0&&(a||r)&&((o=e.value-(s||0))||s===void 0)&&(s=e.value,e.delta=o,e.rating=(function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"})(e.value,n),t(e))}},dR=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},rp=function(t){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&t()}))},ab=function(t){var e=!1;return function(){e||(t(),e=!0)}},Ec=-1,NU=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},kv=function(t){document.visibilityState==="hidden"&&Ec>-1&&(Ec=t.type==="visibilitychange"?t.timeStamp:0,Mme())},MU=function(){addEventListener("visibilitychange",kv,!0),addEventListener("prerenderingchange",kv,!0)},Mme=function(){removeEventListener("visibilitychange",kv,!0),removeEventListener("prerenderingchange",kv,!0)},fR=function(){return Ec<0&&(Ec=NU(),MU(),cd((function(){setTimeout((function(){Ec=NU(),MU()}),0)}))),{get firstHiddenTime(){return Ec}}},lb=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},PU=[1800,3e3],Pme=function(t,e){e=e||{},lb((function(){var n,r=fR(),s=Io("FCP"),o=ou("paint",(function(a){a.forEach((function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(s.value=Math.max(u.startTime-cR(),0),s.entries.push(u),n(!0)))}))}));o&&(n=Oo(t,s,PU,e.reportAllChanges),cd((function(a){s=Io("FCP"),n=Oo(t,s,PU,e.reportAllChanges),dR((function(){s.value=performance.now()-a.timeStamp,n(!0)}))})))}))},kU=[.1,.25],kme=function(t,e){(function(n,r){r=r||{},Pme(ab((function(){var s,o=Io("CLS",0),a=0,u=[],c=function(p){p.forEach((function(g){if(!g.hadRecentInput){var m=u[0],y=u[u.length-1];a&&g.startTime-y.startTime<1e3&&g.startTime-m.startTime<5e3?(a+=g.value,u.push(g)):(a=g.value,u=[g])}})),a>o.value&&(o.value=a,o.entries=u,s())},f=ou("layout-shift",c);f&&(s=Oo(n,o,kU,r.reportAllChanges),rp((function(){c(f.takeRecords()),s(!0)})),cd((function(){a=0,o=Io("CLS",0),s=Oo(n,o,kU,r.reportAllChanges),dR((function(){return s()}))})),setTimeout(s,0))})))})((function(n){var r=(function(s){var o,a={};if(s.entries.length){var u=s.entries.reduce((function(f,p){return f&&f.value>p.value?f:p}));if(u&&u.sources&&u.sources.length){var c=(o=u.sources).find((function(f){return f.node&&f.node.nodeType===1}))||o[0];c&&(a={largestShiftTarget:ib(c.node),largestShiftTime:u.startTime,largestShiftValue:u.value,largestShiftSource:c,largestShiftEntry:u,loadState:uR(u.startTime)})}}return Object.assign(s,{attribution:a})})(n);t(r)}),e)},B7=0,Zw=1/0,am=0,Dme=function(t){t.forEach((function(e){e.interactionId&&(Zw=Math.min(Zw,e.interactionId),am=Math.max(am,e.interactionId),B7=am?(am-Zw)/7+1:0)}))},j7=function(){return Sx?B7:performance.interactionCount||0},Lme=function(){"interactionCount"in performance||Sx||(Sx=ou("event",Dme,{type:"event",buffered:!0,durationThreshold:0}))},Gs=[],ih=new Map,H7=0,Ume=function(){var t=Math.min(Gs.length-1,Math.floor((j7()-H7)/50));return Gs[t]},$7=[],Fme=function(t){if($7.forEach((function(s){return s(t)})),t.interactionId||t.entryType==="first-input"){var e=Gs[Gs.length-1],n=ih.get(t.interactionId);if(n||Gs.length<10||t.duration>e.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};ih.set(r.id,r),Gs.push(r)}Gs.sort((function(s,o){return o.latency-s.latency})),Gs.length>10&&Gs.splice(10).forEach((function(s){return ih.delete(s.id)}))}}},hR=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=ab(t),document.visibilityState==="hidden"?t():(n=e(t),rp(t)),n},DU=[200,500],zme=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},lb((function(){var n;Lme();var r,s=Io("INP"),o=function(u){hR((function(){u.forEach(Fme);var c=Ume();c&&c.latency!==s.value&&(s.value=c.latency,s.entries=c.entries,r())}))},a=ou("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=Oo(t,s,DU,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),rp((function(){o(a.takeRecords()),r(!0)})),cd((function(){H7=j7(),Gs.length=0,ih.clear(),s=Io("INP"),r=Oo(t,s,DU,e.reportAllChanges)})))})))},Rc=[],_a=[],Ex=0,pR=new WeakMap,Ic=new Map,Cx=-1,Bme=function(t){Rc=Rc.concat(t),q7()},q7=function(){Cx<0&&(Cx=hR(jme))},jme=function(){Ic.size>10&&Ic.forEach((function(a,u){ih.has(u)||Ic.delete(u)}));var t=Gs.map((function(a){return pR.get(a.entries[0])})),e=_a.length-50;_a=_a.filter((function(a,u){return u>=e||t.includes(a)}));for(var n=new Set,r=0;r<_a.length;r++){var s=_a[r];G7(s.startTime,s.processingEnd).forEach((function(a){n.add(a)}))}var o=Rc.length-1-50;Rc=Rc.filter((function(a,u){return a.startTime>Ex&&u>o||n.has(a)})),Cx=-1};$7.push((function(t){t.interactionId&&t.target&&!Ic.has(t.interactionId)&&Ic.set(t.interactionId,t.target)}),(function(t){var e,n=t.startTime+t.duration;Ex=Math.max(Ex,t.processingEnd);for(var r=_a.length-1;r>=0;r--){var s=_a[r];if(Math.abs(n-s.renderTime)<=8){(e=s).startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd),e.entries.push(t);break}}e||(e={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:n,entries:[t]},_a.push(e)),(t.interactionId||t.entryType==="first-input")&&pR.set(t,e),q7()}));var xa,ah,W7,Dv,G7=function(t,e){for(var n,r=[],s=0;n=Rc[s];s++)if(!(n.startTime+n.duration<t)){if(n.startTime>e)break;r.push(n)}return r},Hme=function(t,e){OU||(OU=ou("long-animation-frame",Bme)),zme((function(n){var r=(function(s){var o=s.entries[0],a=pR.get(o),u=o.processingStart,c=a.processingEnd,f=a.entries.sort((function(C,w){return C.processingStart-w.processingStart})),p=G7(o.startTime,c),g=s.entries.find((function(C){return C.target})),m=g&&g.target||Ic.get(o.interactionId),y=[o.startTime+o.duration,c].concat(p.map((function(C){return C.startTime+C.duration}))),S=Math.max.apply(Math,y),E={interactionTarget:ib(m),interactionTargetElement:m,interactionType:o.name.startsWith("key")?"keyboard":"pointer",interactionTime:o.startTime,nextPaintTime:S,processedEventEntries:f,longAnimationFrameEntries:p,inputDelay:u-o.startTime,processingDuration:c-u,presentationDelay:Math.max(S-c,0),loadState:uR(o.startTime)};return Object.assign(s,{attribution:E})})(n);t(r)}),e)},LU=[2500,4e3],Xw={},$me=function(t,e){(function(n,r){r=r||{},lb((function(){var s,o=fR(),a=Io("LCP"),u=function(p){r.reportAllChanges||(p=p.slice(-1)),p.forEach((function(g){g.startTime<o.firstHiddenTime&&(a.value=Math.max(g.startTime-cR(),0),a.entries=[g],s())}))},c=ou("largest-contentful-paint",u);if(c){s=Oo(n,a,LU,r.reportAllChanges);var f=ab((function(){Xw[a.id]||(u(c.takeRecords()),c.disconnect(),Xw[a.id]=!0,s(!0))}));["keydown","click"].forEach((function(p){addEventListener(p,(function(){return hR(f)}),{once:!0,capture:!0})})),rp(f),cd((function(p){a=Io("LCP"),s=Oo(n,a,LU,r.reportAllChanges),dR((function(){a.value=performance.now()-p.timeStamp,Xw[a.id]=!0,s(!0)}))}))}}))})((function(n){var r=(function(s){var o={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:s.value};if(s.entries.length){var a=ob();if(a){var u=a.activationStart||0,c=s.entries[s.entries.length-1],f=c.url&&performance.getEntriesByType("resource").filter((function(S){return S.name===c.url}))[0],p=Math.max(0,a.responseStart-u),g=Math.max(p,f?(f.requestStart||f.startTime)-u:0),m=Math.max(g,f?f.responseEnd-u:0),y=Math.max(m,c.startTime-u);o={element:ib(c.element),timeToFirstByte:p,resourceLoadDelay:g-p,resourceLoadDuration:m-g,elementRenderDelay:y-m,navigationEntry:a,lcpEntry:c},c.url&&(o.url=c.url),f&&(o.lcpResourceEntry=f)}}return Object.assign(s,{attribution:o})})(n);t(r)}),e)},Yf={passive:!0,capture:!0},qme=new Date,UU=function(t,e){xa||(xa=e,ah=t,W7=new Date,K7(removeEventListener),V7())},V7=function(){if(ah>=0&&ah<W7-qme){var t={entryType:"first-input",name:xa.type,target:xa.target,cancelable:xa.cancelable,startTime:xa.timeStamp,processingStart:xa.timeStamp+ah};Dv.forEach((function(e){e(t)})),Dv=[]}},Wme=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?(function(n,r){var s=function(){UU(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",s,Yf),removeEventListener("pointercancel",o,Yf)};addEventListener("pointerup",s,Yf),addEventListener("pointercancel",o,Yf)})(e,t):UU(e,t)}},K7=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,Wme,Yf)}))},FU=[100,300],Gme=function(t,e){e=e||{},lb((function(){var n,r=fR(),s=Io("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(s.value=c.processingStart-c.startTime,s.entries.push(c),n(!0))},a=function(c){c.forEach(o)},u=ou("first-input",a);n=Oo(t,s,FU,e.reportAllChanges),u&&(rp(ab((function(){a(u.takeRecords()),u.disconnect()}))),cd((function(){var c;s=Io("FID"),n=Oo(t,s,FU,e.reportAllChanges),Dv=[],ah=-1,xa=null,K7(addEventListener),c=o,Dv.push(c),V7()})))}))},Vme=function(t,e){Gme((function(n){var r=(function(s){var o=s.entries[0],a={eventTarget:ib(o.target),eventType:o.name,eventTime:o.startTime,eventEntry:o,loadState:uR(o.startTime)};return Object.assign(s,{attribution:a})})(n);t(r)}),e)};const Kme="web-vitals";class Yme extends Os{constructor(e){super(Kme),this.resourceEventIds=new Map,this.cacheLCPCandidates=dme(),this.handleEvent=n=>{switch(n.type){case k7:const r=n.details;this.cacheLCPCandidates&&r.fileType===xn.IMAGE&&this.resourceEventIds.set(AU(n.details),n.id);break;case yx:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},aR),e)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(Ih.EVENT,this.handleEvent),$me(e=>this.handleLCP(e),{reportAllChanges:this.config.reportAllLCP}),Vme(e=>this.handleFID(e)),kme(e=>this.handleCLS(e),{reportAllChanges:!0}),Hme(e=>this.handleINP(e),{reportAllChanges:!0})}handleLCP(e){var n,r;const s=e.attribution,o={element:s?.element,url:s?.url,timeToFirstByte:s?.timeToFirstByte,resourceLoadDelay:s?.resourceLoadDelay,resourceLoadTime:s?.resourceLoadDuration,elementRenderDelay:s?.elementRenderDelay};if(s?.lcpResourceEntry){const a=AU(s?.lcpResourceEntry);o.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(o.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record(Vge,{version:"1.0.0",value:e.value,attribution:o}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(Ih.EVENT,this.handleEvent),this.resourceEventIds.clear(),this.navigationEventId=void 0}handleCLS(e){const n=e.attribution,{record:r,recordCandidate:s}=this.context;(this.config.reportAllCLS?r:s)(Yge,{version:"1.0.0",value:e.value,attribution:{largestShiftTarget:n?.largestShiftTarget,largestShiftValue:n?.largestShiftValue,largestShiftTime:n?.largestShiftTime,loadState:n?.loadState}})}handleFID(e){var n;const r=e.attribution;(n=this.context)===null||n===void 0||n.record(Kge,{version:"1.0.0",value:e.value,attribution:{eventTarget:r?.eventTarget,eventType:r?.eventType,eventTime:r?.eventTime,loadState:r?.loadState}})}handleINP(e){const n=e.attribution,{record:r,recordCandidate:s}=this.context;(this.config.reportAllINP?r:s)(Zge,{version:"1.0.0",value:e.value,attribution:{interactionTarget:n?.interactionTarget,interactionTime:n?.interactionTime,nextPaintTime:n?.nextPaintTime,interactionType:n?.interactionType,inputDelay:n?.inputDelay,processingDuration:n?.processingDuration,presentationDelay:n?.presentationDelay,loadState:n?.loadState}})}}const Zme="fetch";class Xme extends lR{constructor(e){super(Zme),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.beginTrace=(n,r,s)=>{const o=Sc(),a=jpe(n,r,!0),u=E7(this.config.logicalServiceName,o,this.context.config.enableW3CTraceId),c=C7(w7(n),o,a);return u.subsegments.push(c),this.isTraceIdHeaderEnabled(n)&&this.addXRayTraceIdHeader(n,r,s,u),u},this.addXRayTraceIdHeader=(n,r,s,o)=>{if(n.headers)return $pe(n.headers,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(s,r)),Hpe(r,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,s)=>{if(n){const o=Sc();if(n.subsegments[0].end_time=o,n.end_time=o,r){n.subsegments[0].http.response={status:r.status},eR(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):b7(r.status)?(n.subsegments[0].error=!0,n.error=!0):JT(r.status)&&(n.subsegments[0].fault=!0,n.fault=!0);const a=r.headers.get("Content-Length"),u=a?parseInt(a,10):NaN;isNaN(u)||(n.subsegments[0].http.response.content_length=u)}s&&(n.fault=!0,n.subsegments[0].fault=!0,s instanceof Object?this.appendErrorCauseFromObject(n.subsegments[0],s):U7(s)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],s.toString())),this.context.record(P7,n)}},this.createHttpEvent=(n,r)=>{const s=n;return{version:"1.0.0",request:{url:rv(n),method:r?.method?r.method:s.method?s.method:"GET"}}},this.recordHttpEventWithResponse=(n,r)=>{(this.config.recordAllRequests||!r.ok)&&(n.response={status:r.status,statusText:r.statusText},this.context.record(Mv,n))},this.recordHttpEventWithError=(n,r)=>{n.error=iR({type:"error",error:r},this.config.stackTraceLength),this.context.record(Mv,n)},this.fetch=(n,r,s,o,a)=>{const u=this.createHttpEvent(o,a);let c;if(!S7(rv(o),this.config))return n.apply(r,s);const f=Wpe(o.headers,this.context.config.enableW3CTraceId);return f.traceId&&f.segmentId?(u.trace_id=f.traceId,u.segment_id=f.segmentId):this.isTracingEnabled()&&this.isSessionRecorded()&&(c=this.beginTrace(o,a,s),u.trace_id=c.trace_id,u.segment_id=c.subsegments[0].id),n.apply(r,s).then(p=>(this.endTrace(c,p,void 0),this.recordHttpEventWithResponse(u,p),p)).catch(p=>{throw this.endTrace(c,void 0,p),this.recordHttpEventWithError(u,p),p})},this.fetchWrapper=()=>{const n=this;return r=>function(s,o){return n.fetch(r,this,arguments,s,o)}},this.config=Object.assign(Object.assign({},y7),e)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(e){const n=rv(e);return v7(n,this.config.addXRayTraceIdHeader)}appendErrorCauseFromPrimitive(e,n){e.cause={exceptions:[{type:n}]}}appendErrorCauseFromObject(e,n){e.cause={exceptions:[{type:n.name,message:n.message}]}}}class Qme extends Error{constructor(e){super(e),this.name="XMLHttpRequest error"}}const Jme="xhr";class eve extends lR{constructor(e){super(Jme),this.addXRayTraceIdHeader=n=>v7(n,this.config.addXRayTraceIdHeader),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.handleXhrLoadEvent=n=>{const r=n.target,s=this.xhrMap.get(r);if(s){const o=Sc();s.trace.end_time=o,s.trace.subsegments[0].end_time=o,s.trace.subsegments[0].http.response={status:r.status},eR(r.status)?(s.trace.subsegments[0].throttle=!0,s.trace.throttle=!0):b7(r.status)?(s.trace.subsegments[0].error=!0,s.trace.error=!0):JT(r.status)&&(s.trace.subsegments[0].fault=!0,s.trace.fault=!0);const a=r.getResponseHeader("Content-Length"),u=a?parseInt(a,10):NaN;isNaN(u)||(s.trace.subsegments[0].http.response.content_length=u),this.recordTraceEvent(s.trace),this.recordHttpEventWithResponse(s,r)}},this.handleXhrErrorEvent=n=>{const r=n.target,s=this.xhrMap.get(r),o="XMLHttpRequest error",a=r.statusText?r.status.toString()+": "+r.statusText:r.status.toString();if(s){const u=Sc();s.trace.fault=!0,s.trace.end_time=u,s.trace.subsegments[0].end_time=u,s.trace.subsegments[0].fault=!0,s.trace.subsegments[0].cause={exceptions:[{type:o,message:a}]},this.recordTraceEvent(s.trace),this.recordHttpEventWithError(s,r,new Qme(a))}},this.handleXhrAbortEvent=n=>{const r=n.target,s=this.xhrMap.get(r);s&&this.handleXhrDetailsOnError(s,r,"XMLHttpRequest abort")},this.handleXhrTimeoutEvent=n=>{const r=n.target,s=this.xhrMap.get(r);this.handleXhrDetailsOnError(s,r,"XMLHttpRequest timeout")},this.initializeTrace=n=>{const r=Sc();n.trace=E7(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push(C7(w7(n.url),r,{request:{method:n.method,url:n.url,traced:!0}}))},this.sendWrapper=()=>{const n=this;return r=>function(){const s=n.xhrMap.get(this);return s&&(this.addEventListener("load",n.handleXhrLoadEvent),this.addEventListener("error",n.handleXhrErrorEvent),this.addEventListener("abort",n.handleXhrAbortEvent),this.addEventListener("timeout",n.handleXhrTimeoutEvent),n.initializeTrace(s),!n.isSyntheticsUA&&n.isTracingEnabled()&&n.addXRayTraceIdHeader(s.url)&&n.isSessionRecorded()&&(n.context.config.enableW3CTraceId?this.setRequestHeader(rb,nR(s.trace.trace_id,s.trace.subsegments[0].id)):this.setRequestHeader(nb,tR(s.trace.trace_id,s.trace.subsegments[0].id)))),r.apply(this,arguments)}},this.openWrapper=()=>{const n=this;return r=>function(s,o,a){return S7(o,n.config)&&n.xhrMap.set(this,{url:o,method:s,async:a}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},y7),e),this.xhrMap=new Map,this.isSyntheticsUA=navigator.userAgent.includes("CloudWatchSynthetics")}onload(){this.enable()}get patches(){return[{nodule:XMLHttpRequest.prototype,name:"send",wrapper:this.sendWrapper},{nodule:XMLHttpRequest.prototype,name:"open",wrapper:this.openWrapper}]}handleXhrDetailsOnError(e,n,r){if(e){const s=Sc();e.trace.end_time=s,e.trace.subsegments[0].end_time=s,e.trace.subsegments[0].error=!0,e.trace.subsegments[0].cause={exceptions:[{type:r}]},this.recordTraceEvent(e.trace),this.recordHttpEventWithError(e,n,r)}}statusOk(e){return e>=200&&e<300}recordHttpEventWithResponse(e,n){this.xhrMap.delete(n);const r={version:"1.0.0",request:{method:e.method,url:e.url},response:{status:n.status,statusText:n.statusText}};this.isTracingEnabled()&&(r.trace_id=e.trace.trace_id,r.segment_id=e.trace.subsegments[0].id),(this.config.recordAllRequests||!this.statusOk(n.status))&&this.context.record(Mv,r)}recordHttpEventWithError(e,n,r){this.xhrMap.delete(n);const s={version:"1.0.0",request:{method:e.method,url:e.url},error:iR({type:"error",error:r},this.config.stackTraceLength)};this.isTracingEnabled()&&(s.trace_id=e.trace.trace_id,s.segment_id=e.trace.subsegments[0].id),this.context.record(Mv,s)}recordTraceEvent(e){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(P7,e)}}var Lv={},tve=Object.defineProperty,nve=(t,e,n)=>e in t?tve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e,n)=>nve(t,typeof e!="symbol"?e+"":e,n),zU,rve=Object.defineProperty,sve=(t,e,n)=>e in t?rve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,BU=(t,e,n)=>sve(t,typeof e!="symbol"?e+"":e,n),Mn=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Mn||{});const jU={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},HU={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},lm={},ove=()=>!!globalThis.Zone;function gR(t){if(lm[t])return lm[t];const e=globalThis[t],n=e.prototype,r=t in jU?jU[t]:void 0,s=!!(r&&r.every(u=>{var c,f;return!!((f=(c=Object.getOwnPropertyDescriptor(n,u))==null?void 0:c.get)!=null&&f.toString().includes("[native code]"))})),o=t in HU?HU[t]:void 0,a=!!(o&&o.every(u=>{var c;return typeof n[u]=="function"&&((c=n[u])==null?void 0:c.toString().includes("[native code]"))}));if(s&&a&&!ove())return lm[t]=e.prototype,e.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const c=u.contentWindow;if(!c)return e.prototype;const f=c[t].prototype;return document.body.removeChild(u),f?lm[t]=f:n}catch{return n}}const Qw={};function Ii(t,e,n){var r;const s=`${t}.${String(n)}`;if(Qw[s])return Qw[s].call(e);const o=gR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(Qw[s]=a,a.call(e)):e[n]}const Jw={};function Y7(t,e,n){const r=`${t}.${String(n)}`;if(Jw[r])return Jw[r].bind(e);const o=gR(t)[n];return typeof o!="function"?e[n]:(Jw[r]=o,o.bind(e))}function ive(t){return Ii("Node",t,"ownerDocument")}function ave(t){return Ii("Node",t,"childNodes")}function lve(t){return Ii("Node",t,"parentNode")}function uve(t){return Ii("Node",t,"parentElement")}function cve(t){return Ii("Node",t,"textContent")}function dve(t,e){return Y7("Node",t,"contains")(e)}function fve(t){return Y7("Node",t,"getRootNode")()}function hve(t){return!t||!("host"in t)?null:Ii("ShadowRoot",t,"host")}function pve(t){return t.styleSheets}function gve(t){return!t||!("shadowRoot"in t)?null:Ii("Element",t,"shadowRoot")}function mve(t,e){return Ii("Element",t,"querySelector")(e)}function vve(t,e){return Ii("Element",t,"querySelectorAll")(e)}function yve(){return gR("MutationObserver").constructor}function bve(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}const ur={ownerDocument:ive,childNodes:ave,parentNode:lve,parentElement:uve,textContent:cve,contains:dve,getRootNode:fve,host:hve,styleSheets:pve,shadowRoot:gve,querySelector:mve,querySelectorAll:vve,mutationObserver:yve,patch:bve};function Z7(t){return t.nodeType===t.ELEMENT_NODE}function lh(t){const e=t&&"host"in t&&"mode"in t&&ur.host(t)||null;return!!(e&&"shadowRoot"in e&&ur.shadowRoot(e)===t)}function uh(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function Sve(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function Eve(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function wx(t){try{const e=t.rules||t.cssRules;if(!e)return null;let n=t.href;!n&&t.ownerNode&&(n=t.ownerNode.baseURI);const r=Array.from(e,s=>X7(s,n)).join("");return Sve(r)}catch{return null}}function X7(t,e){if(wve(t)){let n;try{n=wx(t.styleSheet)||Eve(t)}catch{n=t.cssText}return t.styleSheet.href?zv(n,t.styleSheet.href):n}else{let n=t.cssText;return _ve(t)&&t.selectorText.includes(":")&&(n=Cve(n)),e?zv(n,e):n}}function Cve(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function wve(t){return"styleSheet"in t}function _ve(t){return"selectorText"in t}class Q7{constructor(){BU(this,"idNodeMap",new Map),BU(this,"nodeMetaMap",new WeakMap)}getId(e){var n;return e?((n=this.getMeta(e))==null?void 0:n.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){const r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){const r=this.getNode(e);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function xve(){return new Q7}function Uv({element:t,maskInputOptions:e,tagName:n,type:r,value:s,maskInputFn:o}){let a=s||"";const u=r&&Wl(r);return(e[n.toLowerCase()]||u&&e[u])&&(o?a=o(a,t):a="*".repeat(a.length)),a}function Wl(t){return t.toLowerCase()}const $U="__rrweb_original__";function Ave(t){const e=t.getContext("2d");if(!e)return!0;const n=50;for(let r=0;r<t.width;r+=n)for(let s=0;s<t.height;s+=n){const o=e.getImageData,a=$U in o?o[$U]:o;if(new Uint32Array(a.call(e,r,s,Math.min(n,t.width-r),Math.min(n,t.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function Fv(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Wl(e):null}function J7(t,e){let n;try{n=new URL(t,e??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return s?.[1]??null}function Tve(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const Rve=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ive=/^(?:[a-z+]+:)?\/\//i,Ove=/^www\..*/i,Nve=/^(data:)([^,]*),(.*)/i;function zv(t,e){return(t||"").replace(Rve,(n,r,s,o,a,u)=>{const c=s||a||u,f=r||o||"";if(!c)return n;if(Ive.test(c)||Ove.test(c))return`url(${f}${c}${f})`;if(Nve.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${Tve(e)+c}${f})`;const p=e.split("/"),g=c.split("/");p.pop();for(const m of g)m!=="."&&(m===".."?p.pop():p.push(m));return`url(${f}${p.join("/")}${f})`})}function um(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Mve(t,e,n=!1){const r=Array.from(e.childNodes),s=[];let o=0;if(r.length>1&&t&&typeof t=="string"){let a=um(t,n);const u=a.length/t.length;for(let c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent=="string"){const f=um(r[c].textContent,n),p=100;let g=3;for(;g<f.length&&(f[g].match(/[a-zA-Z0-9]/)||f.indexOf(f.substring(0,g),1)!==-1);g++);for(;g<f.length;g++){let m=f.substring(0,g),y=a.split(m),S=-1;if(y.length===2)S=y[0].length;else if(y.length>2&&y[0]===""&&r[c-1].textContent!=="")S=a.indexOf(m,1);else if(y.length===1){if(m=m.substring(0,m.length-1),y=a.split(m),y.length<=1)return s.push(t),s;g=p+1}else g===f.length-1&&(S=a.indexOf(m));if(y.length>=2&&g>p){const E=r[c-1].textContent;if(E&&typeof E=="string"){const C=um(E).length;S=a.indexOf(m,C)}S===-1&&(S=y[0].length)}if(S!==-1){let E=Math.floor(S/u);for(;E>0&&E<t.length;){if(o+=1,o>50*r.length)return s.push(t),s;const C=um(t.substring(0,E),n);if(C.length===S){s.push(t.substring(0,E)),t=t.substring(E),a=a.substring(S);break}else C.length<S?E+=Math.max(1,Math.floor((S-C.length)/u)):E-=Math.max(1,Math.floor((C.length-S)*u))}break}}}}return s.push(t),s}function Pve(t,e){return Mve(t,e).join("/* rr_split */")}let kve=1;const Dve=new RegExp("[^a-z0-9-_:]"),Oh=-2;function ez(){return kve++}function Lve(t){if(t instanceof HTMLFormElement)return"form";const e=Wl(t.tagName);return Dve.test(e)?"div":e}let rc,qU;const Uve=/^[^ \t\n\r\u000c]+/,Fve=/^[, \t\n\r\u000c]+/;function zve(t,e){if(e.trim()==="")return e;let n=0;function r(o){let a;const u=o.exec(e.substring(n));return u?(a=u[0],n+=a.length,a):""}const s=[];for(;r(Fve),!(n>=e.length);){let o=r(Uve);if(o.slice(-1)===",")o=Cc(t,o.substring(0,o.length-1)),s.push(o);else{let a="";o=Cc(t,o);let u=!1;for(;;){const c=e.charAt(n);if(c===""){s.push((o+a).trim());break}else if(u)c===")"&&(u=!1);else if(c===","){n+=1,s.push((o+a).trim());break}else c==="("&&(u=!0);a+=c,n+=1}}}return s.join(", ")}const WU=new WeakMap;function Cc(t,e){return!e||e.trim()===""?e:mR(t,e)}function Bve(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function mR(t,e){let n=WU.get(t);if(n||(n=t.createElement("a"),WU.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function tz(t,e,n,r){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&["table","td","th"].includes(e)?Cc(t,r):n==="srcset"?zve(t,r):n==="style"?zv(r,mR(t)):e==="object"&&n==="data"?Cc(t,r):r)}function nz(t,e,n){return["video","audio"].includes(t)&&e==="autoplay"}function jve(t,e,n){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=t.classList.length;r--;){const s=t.classList[r];if(e.test(s))return!0}if(n)return t.matches(n)}catch{}return!1}function Bv(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?Bv(ur.parentNode(t),e,n):!1;for(let r=t.classList.length;r--;){const s=t.classList[r];if(e.test(s))return!0}return n?Bv(ur.parentNode(t),e,n):!1}function rz(t,e,n,r){let s;if(Z7(t)){if(s=t,!ur.childNodes(s).length)return!1}else{if(ur.parentElement(t)===null)return!1;s=ur.parentElement(t)}try{if(typeof e=="string"){if(r){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(Bv(s,e,r))return!0;if(n){if(r){if(s.closest(n))return!0}else if(s.matches(n))return!0}}catch{}return!1}function Hve(t,e,n){const r=t.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const u=setTimeout(()=>{s||(e(),s=!0)},n);t.addEventListener("load",()=>{clearTimeout(u),s=!0,e()});return}const a="about:blank";if(r.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function $ve(t,e,n){let r=!1,s;try{s=t.sheet}catch{return}if(s)return;const o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function qve(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:f,maskInputFn:p,dataURLOptions:g={},inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E=!1,cssCaptured:C=!1}=e,w=Wve(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Mn.Document,childNodes:[],compatMode:t.compatMode}:{type:Mn.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Mn.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:w};case t.ELEMENT_NODE:return Vve(t,{doc:n,blockClass:s,blockSelector:o,inlineStylesheet:u,maskInputOptions:c,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E,rootId:w});case t.TEXT_NODE:return Gve(t,{doc:n,needsMask:a,maskTextFn:f,rootId:w,cssCaptured:C});case t.CDATA_SECTION_NODE:return{type:Mn.CDATA,textContent:"",rootId:w};case t.COMMENT_NODE:return{type:Mn.Comment,textContent:ur.textContent(t)||"",rootId:w};default:return!1}}function Wve(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function Gve(t,e){const{needsMask:n,maskTextFn:r,rootId:s,cssCaptured:o}=e,a=ur.parentNode(t),u=a&&a.tagName;let c="";const f=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?c="SCRIPT_PLACEHOLDER":o||(c=ur.textContent(t),f&&c&&(c=zv(c,mR(e.doc)))),!f&&!p&&c&&n&&(c=r?r(c,ur.parentElement(t)):c.replace(/[\S]/g,"*")),{type:Mn.Text,textContent:c||"",rootId:s}}function Vve(t,e){const{doc:n,blockClass:r,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:c={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:y}=e,S=jve(t,r,s),E=Lve(t);let C={};const w=t.attributes.length;for(let T=0;T<w;T++){const R=t.attributes[T];nz(E,R.name,R.value)||(C[R.name]=tz(n,E,Wl(R.name),R.value))}if(E==="link"&&o){const T=Array.from(n.styleSheets).find(M=>M.href===t.href);let R=null;T&&(R=wx(T)),R&&(delete C.rel,delete C.href,C._cssText=R)}if(E==="style"&&t.sheet){let T=wx(t.sheet);T&&(t.childNodes.length>1&&(T=Pve(T,t)),C._cssText=T)}if(["input","textarea","select"].includes(E)){const T=t.value,R=t.checked;C.type!=="radio"&&C.type!=="checkbox"&&C.type!=="submit"&&C.type!=="button"&&T?C.value=Uv({element:t,type:Fv(t),tagName:E,value:T,maskInputOptions:a,maskInputFn:u}):R&&(C.checked=R)}if(E==="option"&&(t.selected&&!a.select?C.selected=!0:delete C.selected),E==="dialog"&&t.open&&(C.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(t.__context==="2d")Ave(t)||(C.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){const T=t.toDataURL(c.type,c.quality),R=n.createElement("canvas");R.width=t.width,R.height=t.height;const M=R.toDataURL(c.type,c.quality);T!==M&&(C.rr_dataURL=T)}}if(E==="img"&&f){rc||(rc=n.createElement("canvas"),qU=rc.getContext("2d"));const T=t,R=T.currentSrc||T.getAttribute("src")||"<unknown-src>",M=T.crossOrigin,O=()=>{T.removeEventListener("load",O);try{rc.width=T.naturalWidth,rc.height=T.naturalHeight,qU.drawImage(T,0,0),C.rr_dataURL=rc.toDataURL(c.type,c.quality)}catch(I){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${R}! Error: ${I}`)}T.crossOrigin==="anonymous"&&(M?C.crossOrigin=M:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O)}if(["audio","video"].includes(E)){const T=C;T.rr_mediaState=t.paused?"paused":"played",T.rr_mediaCurrentTime=t.currentTime,T.rr_mediaPlaybackRate=t.playbackRate,T.rr_mediaMuted=t.muted,T.rr_mediaLoop=t.loop,T.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(C.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(C.rr_scrollTop=t.scrollTop)),S){const{width:T,height:R}=t.getBoundingClientRect();C={class:C.class,rr_width:`${T}px`,rr_height:`${R}px`}}E==="iframe"&&!g(C.src)&&(t.contentDocument||(C.rr_src=C.src),delete C.src);let x;try{customElements.get(E)&&(x=!0)}catch{}return{type:Mn.Element,tagName:E,attributes:C,childNodes:[],isSVG:Bve(t)||void 0,needBlock:S,rootId:y,isCustom:x}}function Wt(t){return t==null?"":t.toLowerCase()}function sz(t){return t===!0||t==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:t==="all",headMetaDescKeywords:t==="all",headTitleMutations:t==="all"}:t||{}}function Kve(t,e){if(e.comment&&t.type===Mn.Comment)return!0;if(t.type===Mn.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&J7(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Wt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Wt(t.attributes.name)==="application-name"||Wt(t.attributes.rel)==="icon"||Wt(t.attributes.rel)==="apple-touch-icon"||Wt(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Wt(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Wt(t.attributes.property).match(/^(og|twitter|fb):/)||Wt(t.attributes.name).match(/^(og|twitter):/)||Wt(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Wt(t.attributes.name)==="robots"||Wt(t.attributes.name)==="googlebot"||Wt(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Wt(t.attributes.name)==="author"||Wt(t.attributes.name)==="generator"||Wt(t.attributes.name)==="framework"||Wt(t.attributes.name)==="publisher"||Wt(t.attributes.name)==="progid"||Wt(t.attributes.property).match(/^article:/)||Wt(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Wt(t.attributes.name)==="google-site-verification"||Wt(t.attributes.name)==="yandex-verification"||Wt(t.attributes.name)==="csrf-token"||Wt(t.attributes.name)==="p:domain_verify"||Wt(t.attributes.name)==="verify-v1"||Wt(t.attributes.name)==="verification"||Wt(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function wc(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:c=!1,inlineStylesheet:f=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S={},inlineImages:E=!1,recordCanvas:C=!1,onSerialize:w,onIframeLoad:x,iframeLoadTimeout:T=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:I=!1,cssCaptured:P=!1}=e;let{needsMask:k}=e,{preserveWhiteSpace:H=!0}=e;k||(k=rz(t,a,u,k===void 0));const U=qve(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:S,inlineImages:E,recordCanvas:C,keepIframeSrcFn:O,newlyAddedElement:I,cssCaptured:P});if(!U)return console.warn(t,"not serialized"),null;let B;r.hasNode(t)?B=r.getId(t):Kve(U,y)||!H&&U.type===Mn.Text&&!U.textContent.replace(/^\s+|\s+$/gm,"").length?B=Oh:B=ez();const W=Object.assign(U,{id:B});if(r.add(t,W),B===Oh)return null;w&&w(t);let Y=!c;if(W.type===Mn.Element){Y=Y&&!W.needBlock,delete W.needBlock;const $=ur.shadowRoot(t);$&&uh($)&&(W.isShadowHost=!0)}if((W.type===Mn.Document||W.type===Mn.Element)&&Y){y.headWhitespace&&W.type===Mn.Element&&W.tagName==="head"&&(H=!1);const $={doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:c,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:x,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O,cssCaptured:!1};if(!(W.type===Mn.Element&&W.tagName==="textarea"&&W.attributes.value!==void 0)){W.type===Mn.Element&&W.attributes._cssText!==void 0&&typeof W.attributes._cssText=="string"&&($.cssCaptured=!0);for(const fe of Array.from(ur.childNodes(t))){const de=wc(fe,$);de&&W.childNodes.push(de)}}let ee=null;if(Z7(t)&&(ee=ur.shadowRoot(t)))for(const fe of Array.from(ur.childNodes(ee))){const de=wc(fe,$);de&&(uh(ee)&&(de.isShadow=!0),W.childNodes.push(de))}}const ne=ur.parentNode(t);return ne&&lh(ne)&&uh(ne)&&(W.isShadow=!0),W.type===Mn.Element&&W.tagName==="iframe"&&Hve(t,()=>{const $=t.contentDocument;if($&&x){const ee=wc($,{doc:$,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:x,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O});ee&&x(t,ee)}},T),W.type===Mn.Element&&W.tagName==="link"&&typeof W.attributes.rel=="string"&&(W.attributes.rel==="stylesheet"||W.attributes.rel==="preload"&&typeof W.attributes.href=="string"&&J7(W.attributes.href)==="css")&&$ve(t,()=>{if(R){const $=wc(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:x,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O});$&&R(t,$)}},M),W}function Yve(t,e){const{mirror:n=new Q7,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:m,slimDOM:y=!1,dataURLOptions:S,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M=()=>!1}=e||{},O=p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p===!1?{password:!0}:p,I=sz(y);return wc(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:O,maskTextFn:g,maskInputFn:m,slimDOMOptions:I,dataURLOptions:S,inlineImages:c,recordCanvas:f,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M,newlyAddedElement:!1})}function Zve(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Xve(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var vR={exports:{}},Zt=String,oz=function(){return{isColorSupported:!1,reset:Zt,bold:Zt,dim:Zt,italic:Zt,underline:Zt,inverse:Zt,hidden:Zt,strikethrough:Zt,black:Zt,red:Zt,green:Zt,yellow:Zt,blue:Zt,magenta:Zt,cyan:Zt,white:Zt,gray:Zt,bgBlack:Zt,bgRed:Zt,bgGreen:Zt,bgYellow:Zt,bgBlue:Zt,bgMagenta:Zt,bgCyan:Zt,bgWhite:Zt}};vR.exports=oz();vR.exports.createColors=oz;var Qve=vR.exports;const Jve={},eye=Object.freeze(Object.defineProperty({__proto__:null,default:Jve},Symbol.toStringTag,{value:"Module"})),Js=Xve(eye);let GU=Qve,VU=Js,_x=class iz extends Error{constructor(e,n,r,s,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,iz)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=GU.isColorSupported),VU&&e&&(n=VU(n));let r=n.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,c;if(e){let{bold:f,gray:p,red:g}=GU.createColors(!0);u=m=>f(g(m)),c=m=>p(m)}else u=c=f=>f;return r.slice(s,o).map((f,p)=>{let g=s+1+p,m=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let y=c(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+c(m)+f+`
243
- `+y+u("^")}return" "+c(m)+f}).join(`
244
- `)}toString(){let e=this.showSourceCode();return e&&(e=`
245
-
246
- `+e+`
247
- `),this.name+": "+this.message+e}};var yR=_x;_x.default=_x;var sp={};sp.isClean=Symbol("isClean");sp.my=Symbol("my");const KU={after:`
248
- `,beforeClose:`
249
- `,beforeComment:`
250
- `,beforeDecl:`
251
- `,beforeOpen:" ",beforeRule:`
252
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function tye(t){return t[0].toUpperCase()+t.slice(1)}let xx=class{constructor(e){this.builder=e}atrule(e,n){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(n?";":"");this.builder(r+s+o,e)}}beforeAfter(e,n){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):n==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(`
253
- `)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,n){let r=this.raw(e,"between","beforeOpen");this.builder(n+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let n=e.nodes.length-1;for(;n>0&&e.nodes[n].type==="comment";)n-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,n!==s||r)}}comment(e){let n=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+n+e.text+r+"*/",e)}decl(e,n){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),n&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,n,r){let s;if(r||(r=n),n&&(s=e.raws[n],typeof s<"u"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return KU[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+tye(r);this[u]?s=this[u](a,e):a.walk(c=>{if(s=c.raws[n],typeof s<"u")return!1})}return typeof s>"u"&&(s=KU[r]),a.rawCache[r]=s,s}rawBeforeClose(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
254
- `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(e,n){let r;return e.walkComments(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
255
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,n){let r;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
256
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let n;return e.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(e){let n;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
257
- `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(e){let n;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(e){if(e.raws.indent)return e.raws.indent;let n;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
258
- `);return n=o[o.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(e,n){let r=e[n],s=e.raws[n];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,n){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,n)}};var az=xx;xx.default=xx;let nye=az;function Ax(t,e){new nye(e).stringify(t)}var ub=Ax;Ax.default=Ax;let{isClean:cm,my:rye}=sp,sye=yR,oye=az,iye=ub;function Tx(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let s=t[r],o=typeof s;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=s:Array.isArray(s)?n[r]=s.map(a=>Tx(a,n)):(o==="object"&&s!==null&&(s=Tx(s)),n[r]=s)}return n}let Rx=class{constructor(e={}){this.raws={},this[cm]=!1,this[rye]=!0;for(let n in e)if(n==="nodes"){this.nodes=[];for(let r of e[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=e[n]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let n=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let n in e)this[n]=e[n];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let n=Tx(this);for(let r in e)n[r]=e[r];return n}cloneAfter(e={}){let n=this.clone(e);return this.parent.insertAfter(this,n),n}cloneBefore(e={}){let n=this.clone(e);return this.parent.insertBefore(this,n),n}error(e,n={}){if(this.source){let{end:r,start:s}=this.rangeBy(n);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},n)}return new sye(e)}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:n==="root"?()=>e.root().toProxy():e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&e.markDirty()),!0}}}markDirty(){if(this[cm]){this[cm]=!1;let e=this;for(;e=e.parent;)e[cm]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,n){let r=this.source.start;if(e.index)r=this.positionInside(e.index,n);else if(e.word){n=this.toString();let s=n.indexOf(e.word);s!==-1&&(r=this.positionInside(s,n))}return r}positionInside(e,n){let r=n||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let a=0;a<e;a++)r[a]===`
259
- `?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(n=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?n={column:e.start.column,line:e.start.line}:e.index&&(n=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(e,n){return new oye().raw(this,e,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let n=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(n,s),n=s):this.parent.insertBefore(n,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,n){let r={},s=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))r[a]=u.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,n):c);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,n);else if(a==="source"){let c=n.get(u.input);c==null&&(c=o,n.set(u.input,o),o++),r[a]={end:u.end,inputId:c,start:u.start}}else r[a]=u}return s&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=iye){e.stringify&&(e=e.stringify);let n="";return e(this,r=>{n+=r}),n}warn(e,n,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(n,s)}get proxyOf(){return this}};var cb=Rx;Rx.default=Rx;let aye=cb,Ix=class extends aye{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var db=Ix;Ix.default=Ix;let lye="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",uye=(t=21)=>{let e="",n=t;for(;n--;)e+=lye[Math.random()*64|0];return e};var cye={nanoid:uye};let{SourceMapConsumer:YU,SourceMapGenerator:ZU}=Js,{existsSync:dye,readFileSync:fye}=Js,{dirname:e_,join:hye}=Js;function pye(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let Ox=class{constructor(e,n){if(n.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,s=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=e_(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new YU(this.text)),this.consumerCache}decodeInline(e){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(n.test(e)||r.test(e))return pye(e.substr(RegExp.lastMatch.length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let n=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=e.lastIndexOf(n.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=e_(e),dye(e))return this.mapFile=e,fye(e,"utf-8").toString().trim()}loadMap(e,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(n instanceof YU)return ZU.fromSourceMap(n).toString();if(n instanceof ZU)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=hye(e_(e),r)),this.loadFile(r)}}}startWith(e,n){return e?e.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var lz=Ox;Ox.default=Ox;let{SourceMapConsumer:gye,SourceMapGenerator:mye}=Js,{fileURLToPath:XU,pathToFileURL:dm}=Js,{isAbsolute:Nx,resolve:Mx}=Js,{nanoid:vye}=cye,t_=Js,QU=yR,yye=lz,n_=Symbol("fromOffsetCache"),bye=!!(gye&&mye),JU=!!(Mx&&Nx),jv=class{constructor(e,n={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!JU||/^\w+:\/\//.test(n.from)||Nx(n.from)?this.file=n.from:this.file=Mx(n.from)),JU&&bye){let r=new yye(this.css,n);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+vye(6)+">"),this.map&&(this.map.file=this.from)}error(e,n,r,s={}){let o,a,u;if(n&&typeof n=="object"){let f=n,p=r;if(typeof f.offset=="number"){let g=this.fromOffset(f.offset);n=g.line,r=g.col}else n=f.line,r=f.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);a=g.line,u=g.col}else a=p.line,u=p.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let c=this.origin(n,r,a,u);return c?o=new QU(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):o=new QU(e,a===void 0?n:{column:r,line:n},a===void 0?r:{column:u,line:a},this.css,this.file,s.plugin),o.input={column:r,endColumn:u,endLine:a,line:n,source:this.css},this.file&&(dm&&(o.input.url=dm(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[n_])r=this[n_];else{let o=this.css.split(`
260
- `);r=new Array(o.length);let a=0;for(let u=0,c=o.length;u<c;u++)r[u]=a,a+=o[u].length+1;this[n_]=r}n=r[r.length-1];let s=0;if(e>=n)s=r.length-1;else{let o=r.length-2,a;for(;s<o;)if(a=s+(o-s>>1),e<r[a])o=a-1;else if(e>=r[a+1])s=a+1;else{s=a;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Mx(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,r,s){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n,line:e});if(!a.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:s,line:r}));let c;Nx(a.source)?c=dm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||dm(this.map.mapFile));let f={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(XU)f.file=XU(c);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(a.source);return p&&(f.source=p),f}toJSON(){let e={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(e[n]=this[n]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var fb=jv;jv.default=jv;t_&&t_.registerInput&&t_.registerInput(jv);let{SourceMapConsumer:uz,SourceMapGenerator:sv}=Js,{dirname:ov,relative:cz,resolve:dz,sep:fz}=Js,{pathToFileURL:e4}=Js,Sye=fb,Eye=!!(uz&&sv),Cye=!!(ov&&dz&&cz&&fz),wye=class{constructor(e,n,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let n=`
261
- `;this.css.includes(`\r
262
- `)&&(n=`\r
263
- `),this.css+=n+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let n=this.toUrl(this.path(e.file)),r=e.root||ov(e.file),s;this.mapOpts.sourcesContent===!1?(s=new uz(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let n=this.root.nodes.length-1;n>=0;n--)e=this.root.nodes[n],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Cye&&Eye&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,n=>{e+=n}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=sv.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new sv({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new sv({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(u,c,f)=>{if(this.css+=u,c&&f!=="end"&&(s.generated.line=e,s.generated.column=n-1,c.source&&c.source.start?(s.source=this.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=u.match(/\n/g),o?(e+=o.length,a=u.lastIndexOf(`
264
- `),n=u.length-a):n+=u.length,c&&f!=="start"){let p=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==p.last||p.raws.semicolon)&&(c.source&&c.source.end?(s.source=this.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=e,s.generated.column=n-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let n=this.memoizedPaths.get(e);if(n)return n;let r=this.opts.to?ov(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ov(dz(r,this.mapOpts.annotation)));let s=cz(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let n=e.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let e=new Sye(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let n=this.memoizedFileURLs.get(e);if(n)return n;if(e4){let r=e4(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let n=this.memoizedURLs.get(e);if(n)return n;fz==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var hz=wye;let _ye=cb,Px=class extends _ye{constructor(e){super(e),this.type="comment"}};var hb=Px;Px.default=Px;let{isClean:pz,my:gz}=sp,mz=db,vz=hb,xye=cb,yz,bR,SR,bz;function Sz(t){return t.map(e=>(e.nodes&&(e.nodes=Sz(e.nodes)),delete e.source,e))}function Ez(t){if(t[pz]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Ez(e)}let Ci=class Cz extends xye{append(...e){for(let n of e){let r=this.normalize(n,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,s;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[n]+=1;return delete this.indexes[n],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(s=>typeof s=="function"?(o,a)=>s(o.toProxy(),a):s)):n==="every"||n==="some"?r=>e[n]((s,...o)=>r(s.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),s=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of s)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+s.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=Sz(yz(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new mz(e)]}else if(e.selector)e=[new bR(e)];else if(e.name)e=[new SR(e)];else if(e.text)e=[new vz(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[gz]||Cz.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[pz]&&Ez(s),typeof s.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(s.raws.before=n.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(s=>{n.props&&!n.props.includes(s.prop)||n.fast&&!s.value.includes(n.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let s;try{s=e(n,r)}catch(o){throw n.addToError(o)}return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="atrule")return n(r,s)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="decl")return n(r,s)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="rule")return n(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ci.registerParse=t=>{yz=t};Ci.registerRule=t=>{bR=t};Ci.registerAtRule=t=>{SR=t};Ci.registerRoot=t=>{bz=t};var iu=Ci;Ci.default=Ci;Ci.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,SR.prototype):t.type==="rule"?Object.setPrototypeOf(t,bR.prototype):t.type==="decl"?Object.setPrototypeOf(t,mz.prototype):t.type==="comment"?Object.setPrototypeOf(t,vz.prototype):t.type==="root"&&Object.setPrototypeOf(t,bz.prototype),t[gz]=!0,t.nodes&&t.nodes.forEach(e=>{Ci.rebuild(e)})};let Aye=iu,wz,_z,Nh=class extends Aye{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new wz(new _z,this,e).stringify()}};Nh.registerLazyResult=t=>{wz=t};Nh.registerProcessor=t=>{_z=t};var ER=Nh;Nh.default=Nh;let kx=class{constructor(e,n={}){if(this.type="warning",this.text=e,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var xz=kx;kx.default=kx;let Tye=xz,Dx=class{constructor(e,n,r){this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new Tye(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var CR=Dx;Dx.default=Dx;const r_=39,t4=34,fm=92,n4=47,hm=10,Nf=32,pm=12,gm=9,mm=13,Rye=91,Iye=93,Oye=40,Nye=41,Mye=123,Pye=125,kye=59,Dye=42,Lye=58,Uye=64,vm=/[\t\n\f\r "#'()/;[\\\]{}]/g,ym=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Fye=/.[\r\n"'(/\\]/,r4=/[\da-f]/i;var zye=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,p,g,m,y,S,E=r.length,C=0,w=[],x=[];function T(){return C}function R(P){throw e.error("Unclosed "+P,C)}function M(){return x.length===0&&C>=E}function O(P){if(x.length)return x.pop();if(C>=E)return;let k=P?P.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case hm:case Nf:case gm:case mm:case pm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Nf||o===hm||o===gm||o===mm||o===pm);S=["space",r.slice(C,a)],C=a-1;break}case Rye:case Iye:case Mye:case Pye:case Lye:case kye:case Nye:{let H=String.fromCharCode(o);S=[H,H,C];break}case Oye:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==r_&&y!==t4&&y!==Nf&&y!==hm&&y!==gm&&y!==pm&&y!==mm){a=C;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(s||k){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===fm;)g-=1,p=!p}while(p);S=["brackets",r.slice(C,a+1),C,a],C=a}else a=r.indexOf(")",C+1),c=r.slice(C,a+1),a===-1||Fye.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case r_:case t4:{u=o===r_?"'":'"',a=C;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(s||k){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===fm;)g-=1,p=!p}while(p);S=["string",r.slice(C,a+1),C,a],C=a;break}case Uye:{vm.lastIndex=C+1,vm.test(r),vm.lastIndex===0?a=r.length-1:a=vm.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case fm:{for(a=C,f=!0;r.charCodeAt(a+1)===fm;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==n4&&o!==Nf&&o!==hm&&o!==gm&&o!==mm&&o!==pm&&(a+=1,r4.test(r.charAt(a)))){for(;r4.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Nf&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===n4&&r.charCodeAt(C+1)===Dye?(a=r.indexOf("*/",C+2)+1,a===0&&(s||k?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(ym.lastIndex=C+1,ym.test(r),ym.lastIndex===0?a=r.length-1:a=ym.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(P){x.push(P)}return{back:I,endOfFile:M,nextToken:O,position:T}};let Az=iu,Hv=class extends Az{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var wR=Hv;Hv.default=Hv;Az.registerAtRule(Hv);let Tz=iu,Rz,Iz,Fc=class extends Tz{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,n,r){let s=super.normalize(e);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of s)o.raws.before=n.raws.before}return s}removeChild(e,n){let r=this.index(e);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Rz(new Iz,this,e).stringify()}};Fc.registerLazyResult=t=>{Rz=t};Fc.registerProcessor=t=>{Iz=t};var op=Fc;Fc.default=Fc;Tz.registerRoot(Fc);let Mh={comma(t){return Mh.split(t,[","],!0)},space(t){let e=[" ",`
265
- `," "];return Mh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let p of t)f?f=!1:p==="\\"?f=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=p;return(n||s!=="")&&r.push(s.trim()),r}};var Oz=Mh;Mh.default=Mh;let Nz=iu,Bye=Oz,$v=class extends Nz{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Bye.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var _R=$v;$v.default=$v;Nz.registerRule($v);let jye=db,Hye=zye,$ye=hb,qye=wR,Wye=op,s4=_R;const o4={empty:!0,space:!0};function Gye(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let Vye=class{constructor(e){this.input=e,this.root=new Wye,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new qye;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let r,s,o,a=!1,u=!1,c=[],f=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(c.length>0){for(o=c.length-1,s=c[o];s&&s[0]==="space";)s=c[--o];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(e=c[c.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),u&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let r=0,s;for(let o=n-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let n=0,r,s,o;for(let[a,u]of e.entries()){if(r=u,s=r[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let n=new $ye;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=Hye(this.input)}decl(e,n){let r=new jye;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||Gye(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let f=e[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(o=e[f],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=f;m>0;m--){let y=p[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new s4;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,r=null,s=!1,o=null,a=[],u=e[1].startsWith("--"),c=[],f=e;for(;f;){if(r=f[0],c.push(f),r==="("||r==="[")o||(o=f),a.push(r==="("?")":"]");else if(u&&s&&r==="{")o||(o=f),a.push("}");else if(a.length===0)if(r===";")if(s){this.decl(c,u);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),n=!0;break}else r===":"&&(s=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&s){if(!u)for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,u)}else this.unknownWord(c)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,r,s){let o,a,u=r.length,c="",f=!0,p,g;for(let m=0;m<u;m+=1)o=r[m],a=o[0],a==="space"&&m===u-1&&!s?f=!1:a==="comment"?(g=r[m-1]?r[m-1][0]:"empty",p=r[m+1]?r[m+1][0]:"empty",!o4[g]&&!o4[p]?c.slice(-1)===","?f=!1:c+=o[1]:f=!1):c+=o[1];if(!f){let m=r.reduce((y,S)=>y+S[1],"");e.raws[n]={raw:m,value:c}}e[n]=c}rule(e){e.pop();let n=new s4;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let n,r="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],n==="space");)r=e.pop()[1]+r;return r}stringFrom(e,n){let r="";for(let s=n;s<e.length;s++)r+=e[s][1];return e.splice(n,e.length-n),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var Kye=Vye;let Yye=iu,Zye=Kye,Xye=fb;function qv(t,e){let n=new Xye(t,e),r=new Zye(n);try{r.parse()}catch(s){throw s}return r.root}var xR=qv;qv.default=qv;Yye.registerParse(qv);let{isClean:vo,my:Qye}=sp,Jye=hz,ebe=ub,tbe=iu,nbe=ER,i4=CR,rbe=xR,sbe=op;const obe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ibe={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},abe={Once:!0,postcssPlugin:!0,prepare:!0},zc=0;function Mf(t){return typeof t=="object"&&typeof t.then=="function"}function Mz(t){let e=!1,n=obe[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,zc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,zc,n+"Exit"]:[n,n+"Exit"]}function a4(t){let e;return t.type==="document"?e=["Document",zc,"DocumentExit"]:t.type==="root"?e=["Root",zc,"RootExit"]:e=Mz(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Lx(t){return t[vo]=!1,t.nodes&&t.nodes.forEach(e=>Lx(e)),t}let Ux={},Bc=class Pz{constructor(e,n,r){this.stringified=!1,this.processed=!1;let s;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))s=Lx(n);else if(n instanceof Pz||n instanceof i4)s=Lx(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=rbe;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(n,r)}catch(a){this.processed=!0,this.error=a}s&&!s[Qye]&&tbe.rebuild(s)}this.result=new i4(e,s,r),this.helpers={...Ux,postcss:Ux,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(n,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,s])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!ibe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!abe[r])if(typeof n[r]=="object")for(let s in n[r])s==="*"?e(n,r,n[r][s]):e(n,r+"-"+s.toLowerCase(),n[r][s]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(Mf(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[vo];){e[vo]=!0;let n=[a4(e)];for(;n.length>0;){let r=this.visitTick(n);if(Mf(r))try{await r}catch(s){let o=n[n.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Mf(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=ebe;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new Jye(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(Mf(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[vo];)e[vo]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Mf(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:s}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&n.visitorIndex<s.length){let[a,u]=s[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[vo]){u[vo]=!0,e.push(a4(u));return}n.iterator=0,delete r.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===zc){r.nodes&&r.nodes.length&&(r[vo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[vo]=!0;let n=Mz(e);for(let r of n)if(r===zc)e.nodes&&e.each(s=>{s[vo]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Bc.registerPostcss=t=>{Ux=t};var kz=Bc;Bc.default=Bc;sbe.registerLazyResult(Bc);nbe.registerLazyResult(Bc);let lbe=hz,ube=ub,cbe=xR;const dbe=CR;let Fx=class{constructor(e,n,r){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=r,this._map=void 0;let s,o=ube;this.result=new dbe(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new lbe(o,s,this._opts,n);if(u.isMap()){let[c,f]=u.generate();c&&(this.result.css=c),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=cbe;try{e=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var fbe=Fx;Fx.default=Fx;let hbe=fbe,pbe=kz,gbe=ER,mbe=op,Ph=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let n=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(e,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new hbe(this,e,n):new pbe(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var vbe=Ph;Ph.default=Ph;mbe.registerProcessor(Ph);gbe.registerProcessor(Ph);let ybe=db,bbe=lz,Sbe=hb,Ebe=wR,Cbe=fb,wbe=op,_be=_R;function kh(t,e){if(Array.isArray(t))return t.map(s=>kh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:Cbe.prototype};o.map&&(o.map={...o.map,__proto__:bbe.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>kh(s,e))),r.source){let{inputId:s,...o}=r.source;r.source=o,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new wbe(r);if(r.type==="decl")return new ybe(r);if(r.type==="rule")return new _be(r);if(r.type==="comment")return new Sbe(r);if(r.type==="atrule")return new Ebe(r);throw new Error("Unknown node type: "+t.type)}var xbe=kh;kh.default=kh;let Abe=yR,Dz=db,Tbe=kz,Rbe=iu,AR=vbe,Ibe=ub,Obe=xbe,Lz=ER,Nbe=xz,Uz=hb,Fz=wR,Mbe=CR,Pbe=fb,kbe=xR,Dbe=Oz,zz=_R,Bz=op,Lbe=cb;function Dt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new AR(t)}Dt.plugin=function(e,n){let r=!1;function s(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
266
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Lv.LANG&&Lv.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
267
- https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new AR().version,u}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(a,u,c){return Dt([s(c)]).process(a,u)},s};Dt.stringify=Ibe;Dt.parse=kbe;Dt.fromJSON=Obe;Dt.list=Dbe;Dt.comment=t=>new Uz(t);Dt.atRule=t=>new Fz(t);Dt.decl=t=>new Dz(t);Dt.rule=t=>new zz(t);Dt.root=t=>new Bz(t);Dt.document=t=>new Lz(t);Dt.CssSyntaxError=Abe;Dt.Declaration=Dz;Dt.Container=Rbe;Dt.Processor=AR;Dt.Document=Lz;Dt.Comment=Uz;Dt.Warning=Nbe;Dt.AtRule=Fz;Dt.Result=Mbe;Dt.Input=Pbe;Dt.Rule=zz;Dt.Root=Bz;Dt.Node=Lbe;Tbe.registerPostcss(Dt);var Ube=Dt;Dt.default=Dt;const sn=Zve(Ube);sn.stringify;sn.fromJSON;sn.plugin;sn.parse;sn.list;sn.document;sn.comment;sn.atRule;sn.rule;sn.decl;sn.root;sn.CssSyntaxError;sn.Declaration;sn.Container;sn.Processor;sn.Document;sn.Comment;sn.Warning;sn.AtRule;sn.Result;sn.Input;sn.Rule;sn.Root;sn.Node;var Fbe=Object.defineProperty,zbe=(t,e,n)=>e in t?Fbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cs=(t,e,n)=>zbe(t,typeof e!="symbol"?e+"":e,n);function Bbe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function jbe(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var TR={exports:{}},Xt=String,jz=function(){return{isColorSupported:!1,reset:Xt,bold:Xt,dim:Xt,italic:Xt,underline:Xt,inverse:Xt,hidden:Xt,strikethrough:Xt,black:Xt,red:Xt,green:Xt,yellow:Xt,blue:Xt,magenta:Xt,cyan:Xt,white:Xt,gray:Xt,bgBlack:Xt,bgRed:Xt,bgGreen:Xt,bgYellow:Xt,bgBlue:Xt,bgMagenta:Xt,bgCyan:Xt,bgWhite:Xt}};TR.exports=jz();TR.exports.createColors=jz;var Hbe=TR.exports;const $be={},qbe=Object.freeze(Object.defineProperty({__proto__:null,default:$be},Symbol.toStringTag,{value:"Module"})),eo=jbe(qbe);let l4=Hbe,u4=eo,zx=class Hz extends Error{constructor(e,n,r,s,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Hz)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=l4.isColorSupported),u4&&e&&(n=u4(n));let r=n.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,c;if(e){let{bold:f,gray:p,red:g}=l4.createColors(!0);u=m=>f(g(m)),c=m=>p(m)}else u=c=f=>f;return r.slice(s,o).map((f,p)=>{let g=s+1+p,m=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let y=c(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+c(m)+f+`
268
- `+y+u("^")}return" "+c(m)+f}).join(`
269
- `)}toString(){let e=this.showSourceCode();return e&&(e=`
270
-
271
- `+e+`
272
- `),this.name+": "+this.message+e}};var RR=zx;zx.default=zx;var ip={};ip.isClean=Symbol("isClean");ip.my=Symbol("my");const c4={after:`
273
- `,beforeClose:`
274
- `,beforeComment:`
275
- `,beforeDecl:`
276
- `,beforeOpen:" ",beforeRule:`
277
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Wbe(t){return t[0].toUpperCase()+t.slice(1)}let Bx=class{constructor(e){this.builder=e}atrule(e,n){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(n?";":"");this.builder(r+s+o,e)}}beforeAfter(e,n){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):n==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(`
278
- `)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,n){let r=this.raw(e,"between","beforeOpen");this.builder(n+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let n=e.nodes.length-1;for(;n>0&&e.nodes[n].type==="comment";)n-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,n!==s||r)}}comment(e){let n=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+n+e.text+r+"*/",e)}decl(e,n){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),n&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,n,r){let s;if(r||(r=n),n&&(s=e.raws[n],typeof s<"u"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return c4[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+Wbe(r);this[u]?s=this[u](a,e):a.walk(c=>{if(s=c.raws[n],typeof s<"u")return!1})}return typeof s>"u"&&(s=c4[r]),a.rawCache[r]=s,s}rawBeforeClose(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
279
- `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(e,n){let r;return e.walkComments(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
280
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,n){let r;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
281
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let n;return e.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(e){let n;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
282
- `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(e){let n;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(e){if(e.raws.indent)return e.raws.indent;let n;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
283
- `);return n=o[o.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(e,n){let r=e[n],s=e.raws[n];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,n){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,n)}};var $z=Bx;Bx.default=Bx;let Gbe=$z;function jx(t,e){new Gbe(e).stringify(t)}var pb=jx;jx.default=jx;let{isClean:bm,my:Vbe}=ip,Kbe=RR,Ybe=$z,Zbe=pb;function Hx(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let s=t[r],o=typeof s;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=s:Array.isArray(s)?n[r]=s.map(a=>Hx(a,n)):(o==="object"&&s!==null&&(s=Hx(s)),n[r]=s)}return n}let $x=class{constructor(e={}){this.raws={},this[bm]=!1,this[Vbe]=!0;for(let n in e)if(n==="nodes"){this.nodes=[];for(let r of e[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=e[n]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let n=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let n in e)this[n]=e[n];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let n=Hx(this);for(let r in e)n[r]=e[r];return n}cloneAfter(e={}){let n=this.clone(e);return this.parent.insertAfter(this,n),n}cloneBefore(e={}){let n=this.clone(e);return this.parent.insertBefore(this,n),n}error(e,n={}){if(this.source){let{end:r,start:s}=this.rangeBy(n);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},n)}return new Kbe(e)}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:n==="root"?()=>e.root().toProxy():e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&e.markDirty()),!0}}}markDirty(){if(this[bm]){this[bm]=!1;let e=this;for(;e=e.parent;)e[bm]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,n){let r=this.source.start;if(e.index)r=this.positionInside(e.index,n);else if(e.word){n=this.toString();let s=n.indexOf(e.word);s!==-1&&(r=this.positionInside(s,n))}return r}positionInside(e,n){let r=n||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let a=0;a<e;a++)r[a]===`
284
- `?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(n=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?n={column:e.start.column,line:e.start.line}:e.index&&(n=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(e,n){return new Ybe().raw(this,e,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let n=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(n,s),n=s):this.parent.insertBefore(n,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,n){let r={},s=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))r[a]=u.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,n):c);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,n);else if(a==="source"){let c=n.get(u.input);c==null&&(c=o,n.set(u.input,o),o++),r[a]={end:u.end,inputId:c,start:u.start}}else r[a]=u}return s&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Zbe){e.stringify&&(e=e.stringify);let n="";return e(this,r=>{n+=r}),n}warn(e,n,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(n,s)}get proxyOf(){return this}};var gb=$x;$x.default=$x;let Xbe=gb,qx=class extends Xbe{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var mb=qx;qx.default=qx;let Qbe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Jbe=(t=21)=>{let e="",n=t;for(;n--;)e+=Qbe[Math.random()*64|0];return e};var e0e={nanoid:Jbe};let{SourceMapConsumer:d4,SourceMapGenerator:f4}=eo,{existsSync:t0e,readFileSync:n0e}=eo,{dirname:s_,join:r0e}=eo;function s0e(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let Wx=class{constructor(e,n){if(n.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,s=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=s_(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new d4(this.text)),this.consumerCache}decodeInline(e){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(n.test(e)||r.test(e))return s0e(e.substr(RegExp.lastMatch.length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let n=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=e.lastIndexOf(n.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=s_(e),t0e(e))return this.mapFile=e,n0e(e,"utf-8").toString().trim()}loadMap(e,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(n instanceof d4)return f4.fromSourceMap(n).toString();if(n instanceof f4)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=r0e(s_(e),r)),this.loadFile(r)}}}startWith(e,n){return e?e.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var qz=Wx;Wx.default=Wx;let{SourceMapConsumer:o0e,SourceMapGenerator:i0e}=eo,{fileURLToPath:h4,pathToFileURL:Sm}=eo,{isAbsolute:Gx,resolve:Vx}=eo,{nanoid:a0e}=e0e,o_=eo,p4=RR,l0e=qz,i_=Symbol("fromOffsetCache"),u0e=!!(o0e&&i0e),g4=!!(Vx&&Gx),Wv=class{constructor(e,n={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!g4||/^\w+:\/\//.test(n.from)||Gx(n.from)?this.file=n.from:this.file=Vx(n.from)),g4&&u0e){let r=new l0e(this.css,n);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+a0e(6)+">"),this.map&&(this.map.file=this.from)}error(e,n,r,s={}){let o,a,u;if(n&&typeof n=="object"){let f=n,p=r;if(typeof f.offset=="number"){let g=this.fromOffset(f.offset);n=g.line,r=g.col}else n=f.line,r=f.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);a=g.line,u=g.col}else a=p.line,u=p.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let c=this.origin(n,r,a,u);return c?o=new p4(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):o=new p4(e,a===void 0?n:{column:r,line:n},a===void 0?r:{column:u,line:a},this.css,this.file,s.plugin),o.input={column:r,endColumn:u,endLine:a,line:n,source:this.css},this.file&&(Sm&&(o.input.url=Sm(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[i_])r=this[i_];else{let o=this.css.split(`
285
- `);r=new Array(o.length);let a=0;for(let u=0,c=o.length;u<c;u++)r[u]=a,a+=o[u].length+1;this[i_]=r}n=r[r.length-1];let s=0;if(e>=n)s=r.length-1;else{let o=r.length-2,a;for(;s<o;)if(a=s+(o-s>>1),e<r[a])o=a-1;else if(e>=r[a+1])s=a+1;else{s=a;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Vx(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,r,s){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n,line:e});if(!a.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:s,line:r}));let c;Gx(a.source)?c=Sm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||Sm(this.map.mapFile));let f={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(h4)f.file=h4(c);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(a.source);return p&&(f.source=p),f}toJSON(){let e={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(e[n]=this[n]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var vb=Wv;Wv.default=Wv;o_&&o_.registerInput&&o_.registerInput(Wv);let{SourceMapConsumer:Wz,SourceMapGenerator:iv}=eo,{dirname:av,relative:Gz,resolve:Vz,sep:Kz}=eo,{pathToFileURL:m4}=eo,c0e=vb,d0e=!!(Wz&&iv),f0e=!!(av&&Vz&&Gz&&Kz),h0e=class{constructor(e,n,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let n=`
286
- `;this.css.includes(`\r
287
- `)&&(n=`\r
288
- `),this.css+=n+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let n=this.toUrl(this.path(e.file)),r=e.root||av(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Wz(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let n=this.root.nodes.length-1;n>=0;n--)e=this.root.nodes[n],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f0e&&d0e&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,n=>{e+=n}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=iv.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new iv({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new iv({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(u,c,f)=>{if(this.css+=u,c&&f!=="end"&&(s.generated.line=e,s.generated.column=n-1,c.source&&c.source.start?(s.source=this.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=u.match(/\n/g),o?(e+=o.length,a=u.lastIndexOf(`
289
- `),n=u.length-a):n+=u.length,c&&f!=="start"){let p=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==p.last||p.raws.semicolon)&&(c.source&&c.source.end?(s.source=this.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=e,s.generated.column=n-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let n=this.memoizedPaths.get(e);if(n)return n;let r=this.opts.to?av(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=av(Vz(r,this.mapOpts.annotation)));let s=Gz(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let n=e.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let e=new c0e(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let n=this.memoizedFileURLs.get(e);if(n)return n;if(m4){let r=m4(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let n=this.memoizedURLs.get(e);if(n)return n;Kz==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Yz=h0e;let p0e=gb,Kx=class extends p0e{constructor(e){super(e),this.type="comment"}};var yb=Kx;Kx.default=Kx;let{isClean:Zz,my:Xz}=ip,Qz=mb,Jz=yb,g0e=gb,eB,IR,OR,tB;function nB(t){return t.map(e=>(e.nodes&&(e.nodes=nB(e.nodes)),delete e.source,e))}function rB(t){if(t[Zz]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)rB(e)}let wi=class sB extends g0e{append(...e){for(let n of e){let r=this.normalize(n,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,s;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[n]+=1;return delete this.indexes[n],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(s=>typeof s=="function"?(o,a)=>s(o.toProxy(),a):s)):n==="every"||n==="some"?r=>e[n]((s,...o)=>r(s.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),s=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of s)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+s.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=nB(eB(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Qz(e)]}else if(e.selector)e=[new IR(e)];else if(e.name)e=[new OR(e)];else if(e.text)e=[new Jz(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Xz]||sB.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Zz]&&rB(s),typeof s.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(s.raws.before=n.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(s=>{n.props&&!n.props.includes(s.prop)||n.fast&&!s.value.includes(n.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let s;try{s=e(n,r)}catch(o){throw n.addToError(o)}return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="atrule")return n(r,s)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="decl")return n(r,s)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="rule")return n(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};wi.registerParse=t=>{eB=t};wi.registerRule=t=>{IR=t};wi.registerAtRule=t=>{OR=t};wi.registerRoot=t=>{tB=t};var au=wi;wi.default=wi;wi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,OR.prototype):t.type==="rule"?Object.setPrototypeOf(t,IR.prototype):t.type==="decl"?Object.setPrototypeOf(t,Qz.prototype):t.type==="comment"?Object.setPrototypeOf(t,Jz.prototype):t.type==="root"&&Object.setPrototypeOf(t,tB.prototype),t[Xz]=!0,t.nodes&&t.nodes.forEach(e=>{wi.rebuild(e)})};let m0e=au,oB,iB,Dh=class extends m0e{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new oB(new iB,this,e).stringify()}};Dh.registerLazyResult=t=>{oB=t};Dh.registerProcessor=t=>{iB=t};var NR=Dh;Dh.default=Dh;let Yx=class{constructor(e,n={}){if(this.type="warning",this.text=e,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var aB=Yx;Yx.default=Yx;let v0e=aB,Zx=class{constructor(e,n,r){this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new v0e(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var MR=Zx;Zx.default=Zx;const a_=39,v4=34,Em=92,y4=47,Cm=10,Pf=32,wm=12,_m=9,xm=13,y0e=91,b0e=93,S0e=40,E0e=41,C0e=123,w0e=125,_0e=59,x0e=42,A0e=58,T0e=64,Am=/[\t\n\f\r "#'()/;[\\\]{}]/g,Tm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,R0e=/.[\r\n"'(/\\]/,b4=/[\da-f]/i;var I0e=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,p,g,m,y,S,E=r.length,C=0,w=[],x=[];function T(){return C}function R(P){throw e.error("Unclosed "+P,C)}function M(){return x.length===0&&C>=E}function O(P){if(x.length)return x.pop();if(C>=E)return;let k=P?P.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case Cm:case Pf:case _m:case xm:case wm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Pf||o===Cm||o===_m||o===xm||o===wm);S=["space",r.slice(C,a)],C=a-1;break}case y0e:case b0e:case C0e:case w0e:case A0e:case _0e:case E0e:{let H=String.fromCharCode(o);S=[H,H,C];break}case S0e:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==a_&&y!==v4&&y!==Pf&&y!==Cm&&y!==_m&&y!==wm&&y!==xm){a=C;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(s||k){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===Em;)g-=1,p=!p}while(p);S=["brackets",r.slice(C,a+1),C,a],C=a}else a=r.indexOf(")",C+1),c=r.slice(C,a+1),a===-1||R0e.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case a_:case v4:{u=o===a_?"'":'"',a=C;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(s||k){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===Em;)g-=1,p=!p}while(p);S=["string",r.slice(C,a+1),C,a],C=a;break}case T0e:{Am.lastIndex=C+1,Am.test(r),Am.lastIndex===0?a=r.length-1:a=Am.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case Em:{for(a=C,f=!0;r.charCodeAt(a+1)===Em;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==y4&&o!==Pf&&o!==Cm&&o!==_m&&o!==xm&&o!==wm&&(a+=1,b4.test(r.charAt(a)))){for(;b4.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Pf&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===y4&&r.charCodeAt(C+1)===x0e?(a=r.indexOf("*/",C+2)+1,a===0&&(s||k?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(Tm.lastIndex=C+1,Tm.test(r),Tm.lastIndex===0?a=r.length-1:a=Tm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(P){x.push(P)}return{back:I,endOfFile:M,nextToken:O,position:T}};let lB=au,Gv=class extends lB{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var PR=Gv;Gv.default=Gv;lB.registerAtRule(Gv);let uB=au,cB,dB,jc=class extends uB{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,n,r){let s=super.normalize(e);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of s)o.raws.before=n.raws.before}return s}removeChild(e,n){let r=this.index(e);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new cB(new dB,this,e).stringify()}};jc.registerLazyResult=t=>{cB=t};jc.registerProcessor=t=>{dB=t};var ap=jc;jc.default=jc;uB.registerRoot(jc);let Lh={comma(t){return Lh.split(t,[","],!0)},space(t){let e=[" ",`
290
- `," "];return Lh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let p of t)f?f=!1:p==="\\"?f=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=p;return(n||s!=="")&&r.push(s.trim()),r}};var fB=Lh;Lh.default=Lh;let hB=au,O0e=fB,Vv=class extends hB{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return O0e.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var kR=Vv;Vv.default=Vv;hB.registerRule(Vv);let N0e=mb,M0e=I0e,P0e=yb,k0e=PR,D0e=ap,S4=kR;const E4={empty:!0,space:!0};function L0e(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let U0e=class{constructor(e){this.input=e,this.root=new D0e,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new k0e;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let r,s,o,a=!1,u=!1,c=[],f=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(c.length>0){for(o=c.length-1,s=c[o];s&&s[0]==="space";)s=c[--o];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(e=c[c.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),u&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let r=0,s;for(let o=n-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let n=0,r,s,o;for(let[a,u]of e.entries()){if(r=u,s=r[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let n=new P0e;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=M0e(this.input)}decl(e,n){let r=new N0e;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||L0e(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let f=e[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(o=e[f],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=f;m>0;m--){let y=p[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new S4;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,r=null,s=!1,o=null,a=[],u=e[1].startsWith("--"),c=[],f=e;for(;f;){if(r=f[0],c.push(f),r==="("||r==="[")o||(o=f),a.push(r==="("?")":"]");else if(u&&s&&r==="{")o||(o=f),a.push("}");else if(a.length===0)if(r===";")if(s){this.decl(c,u);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),n=!0;break}else r===":"&&(s=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&s){if(!u)for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,u)}else this.unknownWord(c)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,r,s){let o,a,u=r.length,c="",f=!0,p,g;for(let m=0;m<u;m+=1)o=r[m],a=o[0],a==="space"&&m===u-1&&!s?f=!1:a==="comment"?(g=r[m-1]?r[m-1][0]:"empty",p=r[m+1]?r[m+1][0]:"empty",!E4[g]&&!E4[p]?c.slice(-1)===","?f=!1:c+=o[1]:f=!1):c+=o[1];if(!f){let m=r.reduce((y,S)=>y+S[1],"");e.raws[n]={raw:m,value:c}}e[n]=c}rule(e){e.pop();let n=new S4;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let n,r="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],n==="space");)r=e.pop()[1]+r;return r}stringFrom(e,n){let r="";for(let s=n;s<e.length;s++)r+=e[s][1];return e.splice(n,e.length-n),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var F0e=U0e;let z0e=au,B0e=F0e,j0e=vb;function Kv(t,e){let n=new j0e(t,e),r=new B0e(n);try{r.parse()}catch(s){throw s}return r.root}var DR=Kv;Kv.default=Kv;z0e.registerParse(Kv);let{isClean:yo,my:H0e}=ip,$0e=Yz,q0e=pb,W0e=au,G0e=NR,C4=MR,V0e=DR,K0e=ap;const Y0e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Z0e={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},X0e={Once:!0,postcssPlugin:!0,prepare:!0},Hc=0;function kf(t){return typeof t=="object"&&typeof t.then=="function"}function pB(t){let e=!1,n=Y0e[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Hc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Hc,n+"Exit"]:[n,n+"Exit"]}function w4(t){let e;return t.type==="document"?e=["Document",Hc,"DocumentExit"]:t.type==="root"?e=["Root",Hc,"RootExit"]:e=pB(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Xx(t){return t[yo]=!1,t.nodes&&t.nodes.forEach(e=>Xx(e)),t}let Qx={},$c=class gB{constructor(e,n,r){this.stringified=!1,this.processed=!1;let s;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))s=Xx(n);else if(n instanceof gB||n instanceof C4)s=Xx(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=V0e;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(n,r)}catch(a){this.processed=!0,this.error=a}s&&!s[H0e]&&W0e.rebuild(s)}this.result=new C4(e,s,r),this.helpers={...Qx,postcss:Qx,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(n,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,s])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!Z0e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!X0e[r])if(typeof n[r]=="object")for(let s in n[r])s==="*"?e(n,r,n[r][s]):e(n,r+"-"+s.toLowerCase(),n[r][s]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(kf(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yo];){e[yo]=!0;let n=[w4(e)];for(;n.length>0;){let r=this.visitTick(n);if(kf(r))try{await r}catch(s){let o=n[n.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return kf(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=q0e;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new $0e(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(kf(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yo];)e[yo]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(kf(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:s}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&n.visitorIndex<s.length){let[a,u]=s[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[yo]){u[yo]=!0,e.push(w4(u));return}n.iterator=0,delete r.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===Hc){r.nodes&&r.nodes.length&&(r[yo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[yo]=!0;let n=pB(e);for(let r of n)if(r===Hc)e.nodes&&e.each(s=>{s[yo]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};$c.registerPostcss=t=>{Qx=t};var mB=$c;$c.default=$c;K0e.registerLazyResult($c);G0e.registerLazyResult($c);let Q0e=Yz,J0e=pb,e1e=DR;const t1e=MR;let Jx=class{constructor(e,n,r){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=r,this._map=void 0;let s,o=J0e;this.result=new t1e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new Q0e(o,s,this._opts,n);if(u.isMap()){let[c,f]=u.generate();c&&(this.result.css=c),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=e1e;try{e=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var n1e=Jx;Jx.default=Jx;let r1e=n1e,s1e=mB,o1e=NR,i1e=ap,Uh=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let n=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(e,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new r1e(this,e,n):new s1e(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var a1e=Uh;Uh.default=Uh;i1e.registerProcessor(Uh);o1e.registerProcessor(Uh);let l1e=mb,u1e=qz,c1e=yb,d1e=PR,f1e=vb,h1e=ap,p1e=kR;function Fh(t,e){if(Array.isArray(t))return t.map(s=>Fh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:f1e.prototype};o.map&&(o.map={...o.map,__proto__:u1e.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Fh(s,e))),r.source){let{inputId:s,...o}=r.source;r.source=o,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new h1e(r);if(r.type==="decl")return new l1e(r);if(r.type==="rule")return new p1e(r);if(r.type==="comment")return new c1e(r);if(r.type==="atrule")return new d1e(r);throw new Error("Unknown node type: "+t.type)}var g1e=Fh;Fh.default=Fh;let m1e=RR,vB=mb,v1e=mB,y1e=au,LR=a1e,b1e=pb,S1e=g1e,yB=NR,E1e=aB,bB=yb,SB=PR,C1e=MR,w1e=vb,_1e=DR,x1e=fB,EB=kR,CB=ap,A1e=gb;function Lt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new LR(t)}Lt.plugin=function(e,n){let r=!1;function s(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
291
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Lv.LANG&&Lv.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
292
- https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new LR().version,u}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(a,u,c){return Lt([s(c)]).process(a,u)},s};Lt.stringify=b1e;Lt.parse=_1e;Lt.fromJSON=S1e;Lt.list=x1e;Lt.comment=t=>new bB(t);Lt.atRule=t=>new SB(t);Lt.decl=t=>new vB(t);Lt.rule=t=>new EB(t);Lt.root=t=>new CB(t);Lt.document=t=>new yB(t);Lt.CssSyntaxError=m1e;Lt.Declaration=vB;Lt.Container=y1e;Lt.Processor=LR;Lt.Document=yB;Lt.Comment=bB;Lt.Warning=E1e;Lt.AtRule=SB;Lt.Result=C1e;Lt.Input=w1e;Lt.Rule=EB;Lt.Root=CB;Lt.Node=A1e;v1e.registerPostcss(Lt);var T1e=Lt;Lt.default=Lt;const on=Bbe(T1e);on.stringify;on.fromJSON;on.plugin;on.parse;on.list;on.document;on.comment;on.atRule;on.rule;on.decl;on.root;on.CssSyntaxError;on.Declaration;on.Container;on.Processor;on.Document;on.Comment;on.Warning;on.AtRule;on.Result;on.Input;on.Rule;on.Root;on.Node;class UR{constructor(...e){Cs(this,"parentElement",null),Cs(this,"parentNode",null),Cs(this,"ownerDocument"),Cs(this,"firstChild",null),Cs(this,"lastChild",null),Cs(this,"previousSibling",null),Cs(this,"nextSibling",null),Cs(this,"ELEMENT_NODE",1),Cs(this,"TEXT_NODE",3),Cs(this,"nodeType"),Cs(this,"nodeName"),Cs(this,"RRNodeType")}get childNodes(){const e=[];let n=this.firstChild;for(;n;)e.push(n),n=n.nextSibling;return e}contains(e){if(e instanceof UR){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const _4={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},x4={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Rm={},R1e=()=>!!globalThis.Zone;function FR(t){if(Rm[t])return Rm[t];const e=globalThis[t],n=e.prototype,r=t in _4?_4[t]:void 0,s=!!(r&&r.every(u=>{var c,f;return!!((f=(c=Object.getOwnPropertyDescriptor(n,u))==null?void 0:c.get)!=null&&f.toString().includes("[native code]"))})),o=t in x4?x4[t]:void 0,a=!!(o&&o.every(u=>{var c;return typeof n[u]=="function"&&((c=n[u])==null?void 0:c.toString().includes("[native code]"))}));if(s&&a&&!R1e())return Rm[t]=e.prototype,e.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const c=u.contentWindow;if(!c)return e.prototype;const f=c[t].prototype;return document.body.removeChild(u),f?Rm[t]=f:n}catch{return n}}const l_={};function Oi(t,e,n){var r;const s=`${t}.${String(n)}`;if(l_[s])return l_[s].call(e);const o=FR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(l_[s]=a,a.call(e)):e[n]}const u_={};function wB(t,e,n){const r=`${t}.${String(n)}`;if(u_[r])return u_[r].bind(e);const o=FR(t)[n];return typeof o!="function"?e[n]:(u_[r]=o,o.bind(e))}function I1e(t){return Oi("Node",t,"ownerDocument")}function O1e(t){return Oi("Node",t,"childNodes")}function N1e(t){return Oi("Node",t,"parentNode")}function M1e(t){return Oi("Node",t,"parentElement")}function P1e(t){return Oi("Node",t,"textContent")}function k1e(t,e){return wB("Node",t,"contains")(e)}function D1e(t){return wB("Node",t,"getRootNode")()}function L1e(t){return!t||!("host"in t)?null:Oi("ShadowRoot",t,"host")}function U1e(t){return t.styleSheets}function F1e(t){return!t||!("shadowRoot"in t)?null:Oi("Element",t,"shadowRoot")}function z1e(t,e){return Oi("Element",t,"querySelector")(e)}function B1e(t,e){return Oi("Element",t,"querySelectorAll")(e)}function _B(){return FR("MutationObserver").constructor}function lu(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}const rt={ownerDocument:I1e,childNodes:O1e,parentNode:N1e,parentElement:M1e,textContent:P1e,contains:k1e,getRootNode:D1e,host:L1e,styleSheets:U1e,shadowRoot:F1e,querySelector:z1e,querySelectorAll:B1e,mutationObserver:_B,patch:lu};function Sr(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const hc=`Please stop import mirror directly. Instead of that,\r
293
- now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
294
- or you can use record.mirror to access the mirror instance during recording.`;let A4={map:{},getId(){return console.error(hc),-1},getNode(){return console.error(hc),null},removeNodeFromMap(){console.error(hc)},has(){return console.error(hc),!1},reset(){console.error(hc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(A4=new Proxy(A4,{get(t,e,n){return e==="map"&&console.error(hc),Reflect.get(t,e,n)}}));function zh(t,e,n={}){let r=null,s=0;return function(...o){const a=Date.now();!s&&n.leading===!1&&(s=a);const u=e-(a-s),c=this;u<=0||u>e?(r&&(clearTimeout(r),r=null),s=a,t.apply(c,o)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{s=n.leading===!1?0:Date.now(),r=null,t.apply(c,o)},u))}}function bb(t,e,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>bb(t,e,o||{},!0)}let Yv=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Yv=()=>new Date().getTime());function xB(t){var e,n,r,s;const o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:o.documentElement.scrollLeft||o?.body&&((e=rt.parentElement(o.body))==null?void 0:e.scrollLeft)||((n=o?.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:o?.documentElement.scrollTop||o?.body&&((r=rt.parentElement(o.body))==null?void 0:r.scrollTop)||((s=o?.body)==null?void 0:s.scrollTop)||0}}function AB(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function TB(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function RB(t){return t?t.nodeType===t.ELEMENT_NODE?t:rt.parentElement(t):null}function Er(t,e,n,r){if(!t)return!1;const s=RB(t);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(Bv(s,e,r))return!0}catch{}return!!(n&&(s.matches(n)||r&&s.closest(n)!==null))}function j1e(t,e){return e.getId(t)!==-1}function c_(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===Oh}function IB(t,e){if(lh(t))return!1;const n=e.getId(t);if(!e.has(n))return!0;const r=rt.parentNode(t);return r&&r.nodeType===t.DOCUMENT_NODE?!1:r?IB(r,e):!0}function eA(t){return!!t.changedTouches}function H1e(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function OB(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function NB(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function tA(t){return t?t instanceof UR&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class $1e{constructor(){Se(this,"id",1),Se(this,"styleIDMap",new WeakMap),Se(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function MB(t){var e;let n=null;return"getRootNode"in t&&((e=rt.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&rt.host(rt.getRootNode(t))&&(n=rt.host(rt.getRootNode(t))),n}function q1e(t){let e=t,n;for(;n=MB(e);)e=n;return e}function W1e(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=q1e(t);return rt.contains(e,n)}function PB(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||W1e(t):!1}var Et=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Et||{}),ft=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(ft||{}),kr=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(kr||{}),si=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(si||{}),qc=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(qc||{}),pc=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(pc||{}),kB=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(kB||{});function T4(t){return"__ln"in t}class G1e{constructor(){Se(this,"length",0),Se(this,"head",null),Se(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=n?.next||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&T4(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&T4(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){const n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const R4=(t,e)=>`${t}@${e}`;class V1e{constructor(){Se(this,"frozen",!1),Se(this,"locked",!1),Se(this,"texts",[]),Se(this,"attributes",[]),Se(this,"attributeMap",new WeakMap),Se(this,"removes",[]),Se(this,"mapRemoves",[]),Se(this,"movedMap",{}),Se(this,"addedSet",new Set),Se(this,"movedSet",new Set),Se(this,"droppedSet",new Set),Se(this,"removesSubTreeCache",new Set),Se(this,"mutationCb"),Se(this,"blockClass"),Se(this,"blockSelector"),Se(this,"maskTextClass"),Se(this,"maskTextSelector"),Se(this,"inlineStylesheet"),Se(this,"maskInputOptions"),Se(this,"maskTextFn"),Se(this,"maskInputFn"),Se(this,"keepIframeSrcFn"),Se(this,"recordCanvas"),Se(this,"inlineImages"),Se(this,"slimDOMOptions"),Se(this,"dataURLOptions"),Se(this,"doc"),Se(this,"mirror"),Se(this,"iframeManager"),Se(this,"stylesheetManager"),Se(this,"shadowDomManager"),Se(this,"canvasManager"),Se(this,"processedNodeManager"),Se(this,"unattachedDoc"),Se(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),Se(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],n=new Set,r=new G1e,s=c=>{let f=c,p=Oh;for(;p===Oh;)f=f&&f.nextSibling,p=f&&this.mirror.getId(f);return p},o=c=>{const f=rt.parentNode(c);if(!f||!PB(c))return;let p=!1;if(c.nodeType===Node.TEXT_NODE){const S=f.tagName;if(S==="TEXTAREA")return;S==="STYLE"&&this.addedSet.has(f)&&(p=!0)}const g=lh(f)?this.mirror.getId(MB(c)):this.mirror.getId(f),m=s(c);if(g===-1||m===-1)return r.addNode(c);const y=wc(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:S=>{OB(S,this.mirror)&&this.iframeManager.addIframe(S),NB(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),tA(c)&&this.shadowDomManager.addShadowRoot(rt.shadowRoot(c),this.doc)},onIframeLoad:(S,E)=>{this.iframeManager.attachIframe(S,E),this.shadowDomManager.observeAttachShadow(S)},onStylesheetLoad:(S,E)=>{this.stylesheetManager.attachLinkElement(S,E)},cssCaptured:p});y&&(e.push({parentId:g,nextId:m,node:y}),n.add(y.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)I4(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!O4(this.droppedSet,c)&&!I4(this.removesSubTreeCache,c,this.mirror)||O4(this.movedSet,c)?o(c):this.droppedSet.add(c);let a=null;for(;r.length;){let c=null;if(a){const f=this.mirror.getId(rt.parentNode(a.value)),p=s(a.value);f!==-1&&p!==-1&&(c=a)}if(!c){let f=r.tail;for(;f;){const p=f;if(f=f.previous,p){const g=this.mirror.getId(rt.parentNode(p.value));if(s(p.value)===-1)continue;if(g!==-1){c=p;break}else{const y=p.value,S=rt.parentNode(y);if(S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const E=rt.host(S);if(this.mirror.getId(E)!==-1){c=p;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}a=c.previous,r.removeNode(c.value),o(c.value)}const u={texts:this.texts.map(c=>{const f=c.node,p=rt.parentNode(f);return p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p),{id:this.mirror.getId(f),value:c.value}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:f}=c;if(typeof f.style=="string"){const p=JSON.stringify(c.styleDiff),g=JSON.stringify(c._unchangedStyles);p.length<f.style.length&&(p+g).split("var(").length===f.style.split("var(").length&&(f.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:f}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),Se(this,"genTextAreaValueMutation",e=>{let n=this.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e,n));const r=Array.from(rt.childNodes(e),s=>rt.textContent(s)||"").join("");n.attributes.value=Uv({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Fv(e),value:r,maskInputFn:this.maskInputFn})}),Se(this,"processMutation",e=>{if(!c_(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const n=rt.textContent(e.target);!Er(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:rz(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,RB(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if(r==="value"){const a=Fv(n);s=Uv({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:s,maskInputFn:this.maskInputFn})}if(Er(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!nz(n.tagName,r))if(o.attributes[r]=tz(this.doc,Wl(n.tagName),Wl(r),s),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const u of Array.from(n.style)){const c=n.style.getPropertyValue(u),f=n.style.getPropertyPriority(u);c!==a.style.getPropertyValue(u)||f!==a.style.getPropertyPriority(u)?f===""?o.styleDiff[u]=c:o.styleDiff[u]=[c,f]:o._unchangedStyles[u]=[c,f]}for(const u of Array.from(a.style))n.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(Er(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=lh(e.target)?this.mirror.getId(rt.host(e.target)):this.mirror.getId(e.target);Er(e.target,this.blockClass,this.blockSelector,!1)||c_(n,this.mirror,this.slimDOMOptions)||!j1e(n,this.mirror)||(this.addedSet.has(n)?(nA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||IB(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[R4(r,s)]?nA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:lh(e.target)&&uh(e.target)?!0:void 0}),K1e(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),Se(this,"genAdds",(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(c_(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[R4(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Er(e,this.blockClass,this.blockSelector,!1)||(rt.childNodes(e).forEach(r=>this.genAdds(r)),tA(e)&&rt.childNodes(rt.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function nA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>nA(t,n))}function K1e(t,e){const n=[t];for(;n.length;){const r=n.pop();e.has(r)||(e.add(r),rt.childNodes(r).forEach(s=>n.push(s)))}}function I4(t,e,n){return t.size===0?!1:Y1e(t,e)}function Y1e(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function O4(t,e){return t.size===0?!1:DB(t,e)}function DB(t,e){const n=rt.parentNode(e);return n?t.has(n)?!0:DB(t,n):!1}let ch;function Z1e(t){ch=t}function X1e(){ch=void 0}const vt=t=>ch?(...n)=>{try{return t(...n)}catch(r){if(ch&&ch(r)===!0)return;throw r}}:t,Tl=[];function lp(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function LB(t,e){const n=new V1e;Tl.push(n),n.init(t);const r=new(_B())(vt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Q1e({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const s=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],u;const c=zh(vt(g=>{const m=Date.now()-u;t(a.map(y=>(y.timeOffset-=m,y)),g),a=[],u=null}),o),f=vt(zh(vt(g=>{const m=lp(g),{clientX:y,clientY:S}=eA(g)?g.changedTouches[0]:g;u||(u=Yv()),a.push({x:y,y:S,id:r.getId(m),timeOffset:Yv()-u}),c(typeof DragEvent<"u"&&g instanceof DragEvent?ft.Drag:g instanceof MouseEvent?ft.MouseMove:ft.TouchMove)}),s,{trailing:!1})),p=[Sr("mousemove",f,n),Sr("touchmove",f,n),Sr("drag",f,n)];return vt(()=>{p.forEach(g=>g())})}function J1e({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[];let c=null;const f=p=>g=>{const m=lp(g);if(Er(m,r,s,!0))return;let y=null,S=p;if("pointerType"in g){switch(g.pointerType){case"mouse":y=si.Mouse;break;case"touch":y=si.Touch;break;case"pen":y=si.Pen;break}y===si.Touch?kr[p]===kr.MouseDown?S="TouchStart":kr[p]===kr.MouseUp&&(S="TouchEnd"):si.Pen}else eA(g)&&(y=si.Touch);y!==null?(c=y,(S.startsWith("Touch")&&y===si.Touch||S.startsWith("Mouse")&&y===si.Mouse)&&(y=null)):kr[p]===kr.Click&&(y=c,c=null);const E=eA(g)?g.changedTouches[0]:g;if(!E)return;const C=n.getId(m),{clientX:w,clientY:x}=E;vt(t)({type:kr[S],id:C,x:w,y:x,...y!==null&&{pointerType:y}})};return Object.keys(kr).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&a[p]!==!1).forEach(p=>{let g=Wl(p);const m=f(p);if(window.PointerEvent)switch(kr[p]){case kr.MouseDown:case kr.MouseUp:g=g.replace("mouse","pointer");break;case kr.TouchStart:case kr.TouchEnd:return}u.push(Sr(g,m,e))}),vt(()=>{u.forEach(p=>p())})}function UB({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){const a=vt(zh(vt(u=>{const c=lp(u);if(!c||Er(c,r,s,!0))return;const f=n.getId(c);if(c===e&&e.defaultView){const p=xB(e.defaultView);t({id:f,x:p.left,y:p.top})}else t({id:f,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Sr("scroll",a,e)}function eSe({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=vt(zh(vt(()=>{const o=AB(),a=TB();(n!==o||r!==a)&&(t({width:Number(a),height:Number(o)}),n=o,r=a)}),200));return Sr("resize",s,e)}const tSe=["INPUT","TEXTAREA","SELECT"],N4=new WeakMap;function nSe({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:p}){function g(x){let T=lp(x);const R=x.isTrusted,M=T&&T.tagName;if(T&&M==="OPTION"&&(T=rt.parentElement(T)),!T||!M||tSe.indexOf(M)<0||Er(T,r,s,!0)||T.classList.contains(o)||a&&T.matches(a))return;let O=T.value,I=!1;const P=Fv(T)||"";P==="radio"||P==="checkbox"?I=T.checked:(u[M.toLowerCase()]||u[P])&&(O=Uv({element:T,maskInputOptions:u,tagName:M,type:P,value:O,maskInputFn:c})),m(T,p?{text:O,isChecked:I,userTriggered:R}:{text:O,isChecked:I});const k=T.name;P==="radio"&&k&&I&&e.querySelectorAll(`input[type="radio"][name="${k}"]`).forEach(H=>{if(H!==T){const U=H.value;m(H,p?{text:U,isChecked:!I,userTriggered:!1}:{text:U,isChecked:!I})}})}function m(x,T){const R=N4.get(x);if(!R||R.text!==T.text||R.isChecked!==T.isChecked){N4.set(x,T);const M=n.getId(x);vt(t)({...T,id:M})}}const S=(f.input==="last"?["change"]:["input","change"]).map(x=>Sr(x,vt(g),e)),E=e.defaultView;if(!E)return()=>{S.forEach(x=>x())};const C=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),w=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&S.push(...w.map(x=>bb(x[0],x[1],{set(){vt(g)({target:this,isTrusted:!1})}},!1,E))),vt(()=>{S.forEach(x=>x())})}function Zv(t){const e=[];function n(r,s){if(Im("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Im("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Im("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Im("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(a)}return s}return n(t,e)}function ba(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function rSe({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:vt((p,g,m)=>{const[y,S]=m,{id:E,styleId:C}=ba(g,e,n.styleMirror);return(E&&E!==-1||C&&C!==-1)&&t({id:E,styleId:C,adds:[{rule:y,index:S}]}),p.apply(g,m)})}),r.CSSStyleSheet.prototype.addRule=function(p,g,m=this.cssRules.length){const y=`${p} { ${g} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[y,m])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,removes:[{index:y}]}),p.apply(g,m)})}),r.CSSStyleSheet.prototype.removeRule=function(p){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replace:y}),p.apply(g,m)})}));let u;r.CSSStyleSheet.prototype.replaceSync&&(u=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replaceSync:y}),p.apply(g,m)})}));const c={};Om("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Om("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Om("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Om("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const f={};return Object.entries(c).forEach(([p,g])=>{f[p]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(f[p].insertRule,{apply:vt((m,y,S)=>{const[E,C]=S,{id:w,styleId:x}=ba(y.parentStyleSheet,e,n.styleMirror);return(w&&w!==-1||x&&x!==-1)&&t({id:w,styleId:x,adds:[{rule:E,index:[...Zv(y),C||0]}]}),m.apply(y,S)})}),g.prototype.deleteRule=new Proxy(f[p].deleteRule,{apply:vt((m,y,S)=>{const[E]=S,{id:C,styleId:w}=ba(y.parentStyleSheet,e,n.styleMirror);return(C&&C!==-1||w&&w!==-1)&&t({id:C,styleId:w,removes:[{index:[...Zv(y),E]}]}),m.apply(y,S)})})}),vt(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,a&&(r.CSSStyleSheet.prototype.replace=a),u&&(r.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach(([p,g])=>{g.prototype.insertRule=f[p].insertRule,g.prototype.deleteRule=f[p].deleteRule})})}function FB({mirror:t,stylesheetManager:e},n){var r,s,o;let a=null;n.nodeName==="#document"?a=t.getId(n):a=t.getId(rt.host(n));const u=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(o=(s=n.ownerDocument)==null?void 0:s.defaultView)==null?void 0:o.ShadowRoot,c=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var f;return(f=c.get)==null?void 0:f.call(this)},set(f){var p;const g=(p=c.set)==null?void 0:p.call(this,f);if(a!==null&&a!==-1)try{e.adoptStyleSheets(f,a)}catch{}return g}}),vt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function sSe({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:vt((u,c,f)=>{var p;const[g,m,y]=f;if(n.has(g))return o.apply(c,[g,m,y]);const{id:S,styleId:E}=ba((p=c.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,set:{property:g,value:m,priority:y},index:Zv(c.parentRule)}),u.apply(c,f)})});const a=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:vt((u,c,f)=>{var p;const[g]=f;if(n.has(g))return a.apply(c,[g]);const{id:m,styleId:y}=ba((p=c.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||y&&y!==-1)&&t({id:m,styleId:y,remove:{property:g},index:Zv(c.parentRule)}),u.apply(c,f)})}),vt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function oSe({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:s,doc:o}){const a=vt(c=>zh(vt(f=>{const p=lp(f);if(!p||Er(p,e,n,!0))return;const{currentTime:g,volume:m,muted:y,playbackRate:S,loop:E}=p;t({type:c,id:r.getId(p),currentTime:g,volume:m,muted:y,playbackRate:S,loop:E})}),s.media||500)),u=[Sr("play",a(pc.Play),o),Sr("pause",a(pc.Pause),o),Sr("seeked",a(pc.Seeked),o),Sr("volumechange",a(pc.VolumeChange),o),Sr("ratechange",a(pc.RateChange),o)];return vt(()=>{u.forEach(c=>c())})}function iSe({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(c,f,p){const g=new o(c,f,p);return s.set(g,{family:c,buffer:typeof f!="string",descriptors:p,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),g};const a=lu(e.fonts,"add",function(u){return function(c){return setTimeout(vt(()=>{const f=s.get(c);f&&(t(f),s.delete(c))}),0),u.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(a),vt(()=>{r.forEach(u=>u())})}function aSe(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,selectionCb:o}=t;let a=!0;const u=vt(()=>{const c=e.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;const f=[],p=c.rangeCount||0;for(let g=0;g<p;g++){const m=c.getRangeAt(g),{startContainer:y,startOffset:S,endContainer:E,endOffset:C}=m;Er(y,r,s,!0)||Er(E,r,s,!0)||f.push({start:n.getId(y),startOffset:S,end:n.getId(E),endOffset:C})}o({ranges:f})});return u(),Sr("selectionchange",u)}function lSe({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:lu(n.customElements,"define",function(s){return function(o,a,u){try{e({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return s.apply(this,[o,a,u])}})}function uSe(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:c,styleSheetRuleCb:f,styleDeclarationCb:p,canvasMutationCb:g,fontCb:m,selectionCb:y,customElementCb:S}=t;t.mutationCb=(...E)=>{e.mutation&&e.mutation(...E),n(...E)},t.mousemoveCb=(...E)=>{e.mousemove&&e.mousemove(...E),r(...E)},t.mouseInteractionCb=(...E)=>{e.mouseInteraction&&e.mouseInteraction(...E),s(...E)},t.scrollCb=(...E)=>{e.scroll&&e.scroll(...E),o(...E)},t.viewportResizeCb=(...E)=>{e.viewportResize&&e.viewportResize(...E),a(...E)},t.inputCb=(...E)=>{e.input&&e.input(...E),u(...E)},t.mediaInteractionCb=(...E)=>{e.mediaInteaction&&e.mediaInteaction(...E),c(...E)},t.styleSheetRuleCb=(...E)=>{e.styleSheetRule&&e.styleSheetRule(...E),f(...E)},t.styleDeclarationCb=(...E)=>{e.styleDeclaration&&e.styleDeclaration(...E),p(...E)},t.canvasMutationCb=(...E)=>{e.canvasMutation&&e.canvasMutation(...E),g(...E)},t.fontCb=(...E)=>{e.font&&e.font(...E),m(...E)},t.selectionCb=(...E)=>{e.selection&&e.selection(...E),y(...E)},t.customElementCb=(...E)=>{e.customElement&&e.customElement(...E),S(...E)}}function cSe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};uSe(t,e);let r;t.recordDOM&&(r=LB(t,t.doc));const s=Q1e(t),o=J1e(t),a=UB(t),u=eSe(t,{win:n}),c=nSe(t),f=oSe(t);let p=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(p=rSe(t,{win:n}),g=FB(t,t.doc),m=sSe(t,{win:n}),t.collectFonts&&(y=iSe(t)));const S=aSe(t),E=lSe(t),C=[];for(const w of t.plugins)C.push(w.observer(w.callback,n,w.options));return vt(()=>{Tl.forEach(w=>w.reset()),r?.disconnect(),s(),o(),a(),u(),c(),f(),p(),g(),m(),y(),S(),E(),C.forEach(w=>w())})}function Im(t){return typeof window[t]<"u"}function Om(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class M4{constructor(e){Se(this,"iframeIdToRemoteIdMap",new WeakMap),Se(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,n,r,s){const o=r||this.getIdToRemoteIdMap(e),a=s||this.getRemoteIdToIdMap(e);let u=o.get(n);return u||(u=this.generateIdFn(),o.set(n,u),a.set(u,n)),u}getIds(e,n){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return n.map(o=>this.getId(e,o,r,s))}getRemoteId(e,n,r){const s=r||this.getRemoteIdToIdMap(e);if(typeof n!="number")return n;const o=s.get(n);return o||-1}getRemoteIds(e,n){const r=this.getRemoteIdToIdMap(e);return n.map(s=>this.getRemoteId(e,s,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}}class dSe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new M4(ez)),Se(this,"crossOriginIframeStyleMirror"),Se(this,"crossOriginIframeRootIdMap",new WeakMap),Se(this,"mirror"),Se(this,"mutationCb"),Se(this,"wrappedEmit"),Se(this,"loadListener"),Se(this,"stylesheetManager"),Se(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new M4(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const o=this.transformCrossOriginEvent(s,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){var r;switch(n.type){case Et.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);const s=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(n.data.node,s),{timestamp:n.timestamp,type:Et.IncrementalSnapshot,data:{source:ft.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Et.Meta:case Et.Load:case Et.DomContentLoaded:return!1;case Et.Plugin:return n;case Et.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case Et.IncrementalSnapshot:switch(n.data.source){case ft.Mutation:return n.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(s.node,o)}),n.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"])}),n.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"])}),n.data.texts.forEach(s=>{this.replaceIds(s,e,["id"])}),n;case ft.Drag:case ft.TouchMove:case ft.MouseMove:return n.data.positions.forEach(s=>{this.replaceIds(s,e,["id"])}),n;case ft.ViewportResize:return!1;case ft.MediaInteraction:case ft.MouseInteraction:case ft.Scroll:case ft.CanvasMutation:case ft.Input:return this.replaceIds(n.data,e,["id"]),n;case ft.StyleSheetRule:case ft.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case ft.Font:return n;case ft.Selection:return n.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"])}),n;case ft.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),(r=n.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,e,["styleId"])}),n}}return!1}replace(e,n,r,s){for(const o of s)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=e.getIds(r,n[o]):n[o]=e.getId(r,n[o]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==kB.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class fSe{constructor(e){Se(this,"shadowDoms",new WeakSet),Se(this,"mutationCb"),Se(this,"scrollCb"),Se(this,"bypassOptions"),Se(this,"mirror"),Se(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!uh(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=LB({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(UB({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(rt.host(e))),this.restoreHandlers.push(FB({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){const r=this;this.restoreHandlers.push(lu(e.prototype,"attachShadow",function(s){return function(o){const a=s.call(this,o),u=rt.shadowRoot(this);return u&&PB(this)&&r.addShadowRoot(u,n),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var _c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hSe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Nm=0;Nm<_c.length;Nm++)hSe[_c.charCodeAt(Nm)]=Nm;var pSe=function(t){var e=new Uint8Array(t),n,r=e.length,s="";for(n=0;n<r;n+=3)s+=_c[e[n]>>2],s+=_c[(e[n]&3)<<4|e[n+1]>>4],s+=_c[(e[n+1]&15)<<2|e[n+2]>>6],s+=_c[e[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const P4=new Map;function gSe(t,e){let n=P4.get(t);return n||(n=new Map,P4.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const zB=(t,e,n)=>{if(!t||!(jB(t,e)||typeof t=="object"))return;const r=t.constructor.name,s=gSe(n,r);let o=s.indexOf(t);return o===-1&&(o=s.length,s.push(t)),o};function lv(t,e,n){if(t instanceof Array)return t.map(r=>lv(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const r=t.constructor.name,s=pSe(t);return{rr_type:r,base64:s}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[lv(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const r=t.constructor.name,{src:s}=t;return{rr_type:r,src:s}}else if(t instanceof HTMLCanvasElement){const r="HTMLImageElement",s=t.toDataURL();return{rr_type:r,src:s}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[lv(t.data,e,n),t.width,t.height]};if(jB(t,e)||typeof t=="object"){const r=t.constructor.name,s=zB(t,e,n);return{rr_type:r,index:s}}}}return t}const BB=(t,e,n)=>t.map(r=>lv(r,e,n)),jB=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>t instanceof e[s]);function mSe(t,e,n,r){const s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of o)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const u=lu(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return Er(this.canvas,n,r,!0)||setTimeout(()=>{const p=BB(f,e,this);t(this.canvas,{type:qc["2D"],property:a,args:p})},0),c.apply(this,f)}});s.push(u)}catch{const u=bb(e.CanvasRenderingContext2D.prototype,a,{set(c){t(this.canvas,{type:qc["2D"],property:a,args:[c],setter:!0})}});s.push(u)}return()=>{s.forEach(a=>a())}}function vSe(t){return t==="experimental-webgl"?"webgl":t}function k4(t,e,n,r){const s=[];try{const o=lu(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!Er(this,e,n,!0)){const f=vSe(u);if("__context"in this||(this.__context=f),r&&["webgl","webgl2"].includes(f))if(c[0]&&typeof c[0]=="object"){const p=c[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[u,...c])}});s.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(o=>o())}}function D4(t,e,n,r,s,o){const a=[],u=Object.getOwnPropertyNames(t);for(const c of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;const f=lu(t,c,function(p){return function(...g){const m=p.apply(this,g);if(zB(m,o,this),"tagName"in this.canvas&&!Er(this.canvas,r,s,!0)){const y=BB(g,o,this),S={type:e,property:c,args:y};n(this.canvas,S)}return m}});a.push(f)}catch{const f=bb(t,c,{set(p){n(this.canvas,{type:e,property:c,args:[p],setter:!0})}});a.push(f)}return a}function ySe(t,e,n,r){const s=[];return s.push(...D4(e.WebGLRenderingContext.prototype,qc.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...D4(e.WebGL2RenderingContext.prototype,qc.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const HB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",bSe=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),L4=typeof window<"u"&&window.Blob&&new Blob([bSe(HB)],{type:"text/javascript;charset=utf-8"});function SSe(t){let e;try{if(e=L4&&(window.URL||window.webkitURL).createObjectURL(L4),!e)throw"";const n=new Worker(e,{name:t?.name});return n.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),n}catch{return new Worker("data:text/javascript;base64,"+HB,{name:t?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class ESe{constructor(e){Se(this,"pendingCanvasMutations",new Map),Se(this,"rafStamps",{latestId:0,invokeId:null}),Se(this,"mirror"),Se(this,"mutationCb"),Se(this,"resetObservers"),Se(this,"frozen",!1),Se(this,"locked",!1),Se(this,"processMutation",(c,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(f)});const{sampling:n="all",win:r,blockClass:s,blockSelector:o,recordCanvas:a,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&n==="all"&&this.initCanvasMutationObserver(r,s,o),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,s,o,{dataURLOptions:u})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,n,r,s,o){const a=k4(n,r,s,!0),u=new Map,c=new SSe;c.onmessage=S=>{const{id:E}=S.data;if(u.set(E,!1),!("base64"in S.data))return;const{base64:C,type:w,width:x,height:T}=S.data;this.mutationCb({id:E,type:qc["2D"],commands:[{property:"clearRect",args:[0,0,x,T]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:w}]},0,0]}]})};const f=1e3/e;let p=0,g;const m=()=>{const S=[];return n.document.querySelectorAll("canvas").forEach(E=>{Er(E,r,s,!0)||S.push(E)}),S},y=S=>{if(p&&S-p<f){g=requestAnimationFrame(y);return}p=S,m().forEach(async E=>{var C;const w=this.mirror.getId(E);if(u.get(w)||E.width===0||E.height===0)return;if(u.set(w,!0),["webgl","webgl2"].includes(E.__context)){const T=E.getContext(E.__context);((C=T?.getContextAttributes())==null?void 0:C.preserveDrawingBuffer)===!1&&T.clear(T.COLOR_BUFFER_BIT)}const x=await createImageBitmap(E);c.postMessage({id:w,bitmap:x,width:E.width,height:E.height,dataURLOptions:o.dataURLOptions},[x])}),g=requestAnimationFrame(y)};g=requestAnimationFrame(y),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=k4(e,n,r,!1),o=mSe(this.processMutation.bind(this),e,n,r),a=ySe(this.processMutation.bind(this),e,n,r);this.resetObservers=()=>{s(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;const s=r.map(a=>{const{type:u,...c}=a;return c}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:s}),this.pendingCanvasMutations.delete(e)}}class CSe{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new $1e),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;const r={id:n,styleIds:[]},s=[];for(const o of e){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),s.push({styleId:a,rules:Array.from(o.rules||CSSRule,(u,c)=>({rule:X7(u,o.href),index:c}))})),r.styleIds.push(a)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class wSe{constructor(){Se(this,"nodeMap",new WeakMap),Se(this,"active",!1)}inOtherBuffer(e,n){const r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==n)}add(e,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}}let pn,uv,d_,Xv=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((zU=t.contentWindow)==null?void 0:zU.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const js=xve();function up(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:p=!0,maskAllInputs:g,maskInputOptions:m,slimDOMOptions:y,maskInputFn:S,maskTextFn:E,hooks:C,packFn:w,sampling:x={},dataURLOptions:T={},mousemoveWait:R,recordDOM:M=!0,recordCanvas:O=!1,recordCrossOriginIframes:I=!1,recordAfter:P=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:k=!1,collectFonts:H=!1,inlineImages:U=!1,plugins:B,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:ne}=t;Z1e(ne);const $=I?window.parent===window:!0;let ee=!1;if(!$)try{window.parent.document&&(ee=!1)}catch{ee=!0}if($&&!e)throw new Error("emit function is required");if(!$&&!ee)return()=>{};R!==void 0&&x.mousemove===void 0&&(x.mousemove=R),js.reset();const fe=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:m!==void 0?m:{password:!0},de=sz(y);H1e();let Ae,D=0;const V=Ee=>{for(const pt of B||[])pt.eventProcessor&&(Ee=pt.eventProcessor(Ee));return w&&!ee&&(Ee=w(Ee)),Ee};pn=(Ee,pt)=>{var Ce;const ze=Ee;if(ze.timestamp=Yv(),(Ce=Tl[0])!=null&&Ce.isFrozen()&&ze.type!==Et.FullSnapshot&&!(ze.type===Et.IncrementalSnapshot&&ze.data.source===ft.Mutation)&&Tl.forEach(Be=>Be.unfreeze()),$)e?.(V(ze),pt);else if(ee){const Be={type:"rrweb",event:V(ze),origin:window.location.origin,isCheckout:pt};window.parent.postMessage(Be,"*")}if(ze.type===Et.FullSnapshot)Ae=ze,D=0;else if(ze.type===Et.IncrementalSnapshot){if(ze.data.source===ft.Mutation&&ze.data.isAttachIframe)return;D++;const Be=r&&D>=r,He=n&&ze.timestamp-Ae.timestamp>n;(Be||He)&&uv(!0)}};const K=Ee=>{pn({type:Et.IncrementalSnapshot,data:{source:ft.Mutation,...Ee}})},J=Ee=>pn({type:Et.IncrementalSnapshot,data:{source:ft.Scroll,...Ee}}),oe=Ee=>pn({type:Et.IncrementalSnapshot,data:{source:ft.CanvasMutation,...Ee}}),he=Ee=>pn({type:Et.IncrementalSnapshot,data:{source:ft.AdoptedStyleSheet,...Ee}}),ue=new CSe({mutationCb:K,adoptedStyleSheetCb:he}),ve=new dSe({mirror:js,mutationCb:K,stylesheetManager:ue,recordCrossOriginIframes:I,wrappedEmit:pn});for(const Ee of B||[])Ee.getMirror&&Ee.getMirror({nodeMirror:js,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const _e=new wSe;d_=new ESe({recordCanvas:O,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:js,sampling:x.canvas,dataURLOptions:T});const Xe=new fSe({mutationCb:K,scrollCb:J,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:p,maskInputOptions:fe,dataURLOptions:T,maskTextFn:E,maskInputFn:S,recordCanvas:O,inlineImages:U,sampling:x,slimDOMOptions:de,iframeManager:ve,stylesheetManager:ue,canvasManager:d_,keepIframeSrcFn:W,processedNodeManager:_e},mirror:js});uv=(Ee=!1)=>{if(!M)return;pn({type:Et.Meta,data:{href:window.location.href,width:TB(),height:AB()}},Ee),ue.reset(),Xe.init(),Tl.forEach(Ce=>Ce.lock());const pt=Yve(document,{mirror:js,blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:p,maskAllInputs:fe,maskTextFn:E,maskInputFn:S,slimDOM:de,dataURLOptions:T,recordCanvas:O,inlineImages:U,onSerialize:Ce=>{OB(Ce,js)&&ve.addIframe(Ce),NB(Ce,js)&&ue.trackLinkElement(Ce),tA(Ce)&&Xe.addShadowRoot(rt.shadowRoot(Ce),document)},onIframeLoad:(Ce,ze)=>{ve.attachIframe(Ce,ze),Xe.observeAttachShadow(Ce)},onStylesheetLoad:(Ce,ze)=>{ue.attachLinkElement(Ce,ze)},keepIframeSrcFn:W});if(!pt)return console.warn("Failed to snapshot the document");pn({type:Et.FullSnapshot,data:{node:pt,initialOffset:xB(window)}},Ee),Tl.forEach(Ce=>Ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,js.getId(document))};try{const Ee=[],pt=ze=>{var Be;return vt(cSe)({mutationCb:K,mousemoveCb:(He,pr)=>pn({type:Et.IncrementalSnapshot,data:{source:pr,positions:He}}),mouseInteractionCb:He=>pn({type:Et.IncrementalSnapshot,data:{source:ft.MouseInteraction,...He}}),scrollCb:J,viewportResizeCb:He=>pn({type:Et.IncrementalSnapshot,data:{source:ft.ViewportResize,...He}}),inputCb:He=>pn({type:Et.IncrementalSnapshot,data:{source:ft.Input,...He}}),mediaInteractionCb:He=>pn({type:Et.IncrementalSnapshot,data:{source:ft.MediaInteraction,...He}}),styleSheetRuleCb:He=>pn({type:Et.IncrementalSnapshot,data:{source:ft.StyleSheetRule,...He}}),styleDeclarationCb:He=>pn({type:Et.IncrementalSnapshot,data:{source:ft.StyleDeclaration,...He}}),canvasMutationCb:oe,fontCb:He=>pn({type:Et.IncrementalSnapshot,data:{source:ft.Font,...He}}),selectionCb:He=>{pn({type:Et.IncrementalSnapshot,data:{source:ft.Selection,...He}})},customElementCb:He=>{pn({type:Et.IncrementalSnapshot,data:{source:ft.CustomElement,...He}})},blockClass:s,ignoreClass:a,ignoreSelector:u,maskTextClass:c,maskTextSelector:f,maskInputOptions:fe,inlineStylesheet:p,sampling:x,recordDOM:M,recordCanvas:O,inlineImages:U,userTriggeredOnInput:k,collectFonts:H,doc:ze,maskInputFn:S,maskTextFn:E,keepIframeSrcFn:W,blockSelector:o,slimDOMOptions:de,dataURLOptions:T,mirror:js,iframeManager:ve,stylesheetManager:ue,shadowDomManager:Xe,processedNodeManager:_e,canvasManager:d_,ignoreCSSAttributes:Y,plugins:((Be=B?.filter(He=>He.observer))==null?void 0:Be.map(He=>({observer:He.observer,options:He.options,callback:pr=>pn({type:Et.Plugin,data:{plugin:He.name,payload:pr}})})))||[]},C)};ve.addLoadListener(ze=>{try{Ee.push(pt(ze.contentDocument))}catch(Be){console.warn(Be)}});const Ce=()=>{uv(),Ee.push(pt(document)),Xv=!0};return["interactive","complete"].includes(document.readyState)?Ce():(Ee.push(Sr("DOMContentLoaded",()=>{pn({type:Et.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&Ce()})),Ee.push(Sr("load",()=>{pn({type:Et.Load,data:{}}),P==="load"&&Ce()},window))),()=>{Ee.forEach(ze=>{try{ze()}catch(Be){String(Be).toLowerCase().includes("cross-origin")||console.warn(Be)}}),_e.destroy(),Xv=!1,X1e()}}catch(Ee){console.warn(Ee)}}up.addCustomEvent=(t,e)=>{if(!Xv)throw new Error("please add custom event after start recording");pn({type:Et.Custom,data:{tag:t,payload:e}})};up.freezePage=()=>{Tl.forEach(t=>t.freeze())};up.takeFullSnapshot=t=>{if(!Xv)throw new Error("please take full snapshot after start recording");uv(t)};up.mirror=js;var U4;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(U4||(U4={}));const _Se="rrweb",xSe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},ASe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},F4=ASe;class TSe extends Os{constructor(e){super(_Se),this.recordingEvents=[],this.isRecording=!1,this.recordingStartTime=null,this.flushTimer=null,this.stopRecording=null,this.enabled=!1;const n=Object.assign(Object.assign(Object.assign({},F4.recordOptions),e?.recordOptions),xSe);this.config=Object.assign(Object.assign(Object.assign({},F4),e),{recordOptions:n}),be.info("RRWebPlugin initialized",{additionalSampleRate:this.config.additionalSampleRate,batchSize:this.config.batchSize,flushInterval:this.config.flushInterval})}enable(){var e;if(this.enabled){be.info("RRWebPlugin already enabled");return}const n=(e=this.context)===null||e===void 0?void 0:e.getSession();if(!n||!n.record){be.warn("RRWebPlugin skipping - session not being recorded",{hasSession:!!n,sessionRecord:n?.record});return}const r=Math.random();if(r>this.config.additionalSampleRate){be.warn("RRWebPlugin skipping - session replay additionalSampleRate",{randomValue:r,samplingRate:this.config.additionalSampleRate});return}this.enabled=!0,be.info("RRWebPlugin enabled - starting recording"),this.startRecording()}disable(){if(!this.enabled){be.info("RRWebPlugin already disabled");return}be.info("RRWebPlugin disabled - stopping recording"),this.enabled=!1,this.stopCurrentRecording()}record(e){const n=e?.action;n==="start"?(be.info("RRWebPlugin manual start recording"),this.startRecording()):n==="stop"&&(be.info("RRWebPlugin manual stop recording"),this.stopCurrentRecording())}onload(){}startRecording(){this.recordingStartTime=Date.now(),this.recordingEvents=[],this.isRecording=!0,be.info("RRWebPlugin starting rrweb recording",{startTime:this.recordingStartTime});const e=up(Object.assign(Object.assign({},this.config.recordOptions),{emit:this.handleRRWebEvent.bind(this)}));e?(this.stopRecording=e,be.info("RRWebPlugin rrweb recording initialized successfully")):be.warn("RRWebPlugin failed to initialize rrweb recording"),this.flushTimer=window.setInterval(()=>{this.flush()},this.config.flushInterval)}stopCurrentRecording(){if(!this.isRecording){be.info("RRWebPlugin stopCurrentRecording called but not recording");return}be.info("RRWebPlugin stopping current recording"),this.isRecording=!1,this.stopRecording&&(this.stopRecording(),this.stopRecording=null,be.info("RRWebPlugin rrweb recording stopped")),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null,be.info("RRWebPlugin flush timer cleared")),this.flush()}handleRRWebEvent(e){this.isRecording&&(this.recordingEvents.push(e),this.recordingEvents.length>=this.config.batchSize&&(be.info("RRWebPlugin flushing events due to batch size",{eventCount:this.recordingEvents.length,batchSize:this.config.batchSize}),this.flush()))}flush(){if(this.recordingEvents.length===0){be.info("RRWebPlugin flushEvent called but no events to flush");return}be.info("RRWebPlugin flushing events",{eventCount:this.recordingEvents.length});const e=[...this.recordingEvents],n={version:"1.0.0",events:e,eventCount:e.length};this.context.record(wU,n),be.info("RRWebPlugin events sent to RUM",{eventType:wU,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var RSe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n},rA;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(rA||(rA={}));const $B="us-west-2",sA=`https://dataplane.rum.${$B}.amazonaws.com`,qB=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),WB=t=>({allowCookies:!1,batchLimit:100,client:Qpe,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:sA,endpointUrl:new URL(sA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:rA.Path,pagesToExclude:[],pagesToInclude:[/.*/],signing:!1,recordResourceUrl:!0,retries:2,routeChangeComplete:100,routeChangeTimeout:1e4,sessionAttributes:{},sessionEventLimit:200,sessionLengthSeconds:1800,sessionSampleRate:1,suppressSessionStartEvent:!1,useBeacon:!0,userIdRetentionDays:30,enableW3CTraceId:!1,candidatesCacheSize:10});let ISe=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=RSe(s,["cookieAttributes"]);this.eventBus=new D7,typeof r>"u"&&(r="us-west-2"),this.applicationId=e;const u=Object.assign(Object.assign({},qB()),o);this.config=Object.assign(Object.assign({fetchFunction:fetch},WB(u)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:sA.replace($B,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new ume({id:e,version:n},this.config,this.eventBus),this.dispatchManager=this.initDispatch(r,e),this.pluginManager=this.initPluginManager(e,n),this.eventCache.setPluginFlushHook(()=>this.pluginManager.flush()),this.config.enableRumClient?this.enable():this.disable()}setAwsCredentials(e){this.dispatchManager.setAwsCredentials(e)}setSigningConfigFactory(e){this.dispatchManager.setSigningConfigFactory(e)}addSessionAttributes(e){this.eventCache.addSessionAttributes(e)}getSessionId(){return this.eventCache.getSessionId()}pinSessionId(e){this.eventCache.pinSessionId(e)}startSession(e){return this.eventCache.startSession(e)}getUserId(){return this.eventCache.getUserId()}pinUserId(e){this.eventCache.pinUserId(e)}setEventMetadataHook(e){this.eventCache.setEventMetadataHook(e)}clearEventMetadataHook(){this.eventCache.clearEventMetadataHook()}addPlugin(e){this.pluginManager.addPlugin(e)}dispatch(){this.dispatchManager.dispatchFetch()}dispatchBeacon(){this.dispatchManager.dispatchBeacon()}enable(){this.eventCache.enable(),this.pluginManager.enable(),this.dispatchManager.enable()}disable(){this.dispatchManager.disable(),this.pluginManager.disable(),this.eventCache.disable()}allowCookies(e){this.config.allowCookies=e}clearCookies(){const e=this.config.cookieAttributes;[Ov,Nv,Uc,`${Ov}_${this.applicationId}`,`${Nv}_${this.applicationId}`,`${Uc}_${this.applicationId}`].forEach(r=>tme(r,e))}recordPageView(e){this.eventCache.recordPageView(e)}recordError(e){this.pluginManager.record("com.amazonaws.rum.js-error",e)}registerDomEvents(e){this.pluginManager.updatePlugin("com.amazonaws.rum.dom-event",e)}recordEvent(e,n,r){this.eventCache.recordEvent(e,n,r)}initDispatch(e,n){return new Jpe(n,e,this.config.endpointUrl,this.eventCache,this.config)}initPluginManager(e,n){const r={applicationId:e,applicationVersion:n,config:this.config,record:this.eventCache.recordEvent,recordCandidate:this.eventCache.recordCandidate,recordPageView:this.eventCache.recordPageView,getSession:this.eventCache.getSession,eventBus:this.eventBus},s=new eme(r);return this.config.disableAutoPageView||s.addPlugin(new Tme),this.config.eventPluginsToLoad.forEach(o=>{s.addPlugin(o)}),s}};var Ks;(function(t){t.Errors="errors",t.Performance="performance",t.Interaction="interaction",t.Http="http",t.Replay="replay"})(Ks||(Ks={}));var z4;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(z4||(z4={}));const OSe=t=>Object.assign(Object.assign({},WB(t)),{signing:!0,telemetries:[Ks.Errors,Ks.Performance,Ks.Http,Ks.Replay]});class NSe extends ISe{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},OSe(qB())),s)),be.info(`RUM client initialized for app: ${e}`),be.info(`Telemetries enabled: ${this.config.telemetries.join(", ")||"none"}`)}initDispatch(e,n){const r=super.initDispatch(e,n);return r.setSigningConfigFactory(Rge),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new qge(c,o).ChainAnonymousCredentialsProvider:new Wge(c,o).ChainAnonymousCredentialsProvider}),this.config.signing&&this.config.identityPoolId&&r.setCognitoCredentials(this.config.identityPoolId,this.config.guestRoleArn),r}initPluginManager(e,n){const r=super.initPluginManager(e,n);return this.constructBuiltinPlugins().forEach(o=>{r.addPlugin(o)}),r}recordError(e){this.pluginManager.record(F7,e)}registerDomEvents(e){this.pluginManager.updatePlugin(L7,e)}constructBuiltinPlugins(){let e=[];const n=this.telemetryFunctor();return this.config.telemetries.forEach(r=>{typeof r=="string"&&n[r.toLowerCase()]?e=[...e,...n[r.toLowerCase()]({})]:Array.isArray(r)&&n[r[0].toLowerCase()]&&(e=[...e,...n[r[0].toLowerCase()](r[1])])}),e}telemetryFunctor(){return{[Ks.Errors]:e=>[new Sme(e)],[Ks.Performance]:e=>[new wme(e),new Ime(e),new Yme(e)],[Ks.Interaction]:e=>[new oR(e)],[Ks.Http]:e=>[new eve(e),new Xme(e)],[Ks.Replay]:e=>[new TSe(e)]}}}const GB={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},MSe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function VB(t){return t.replace(MSe,"[redacted]")}function PSe(t){const e=t.indexOf("?"),n=t.indexOf("#"),r=e===-1&&n===-1?t.length:e===-1?n:n===-1?e:Math.min(e,n);return VB(t.slice(0,r))}function kSe(t){const e=VB(t.message);if(e===t.message)return t;const n=new Error(e);return n.name=t.name,n.stack=t.stack,n}function DSe(t){return{recordPageView(e){t.recordPageView(PSe(e))},recordError(e,n){t.recordError(kSe(e)),n&&t.recordEvent("telemetry.error_context",n)},recordEvent(e,n){t.recordEvent(e,n??{})},recordTiming(e,n,r){t.recordEvent("telemetry.timing",{...r,name:e,durationMs:String(n)})}}}function B4(t){return t instanceof Error?t:new Error(String(t))}function LSe(t){window.addEventListener("error",e=>{t.recordError(B4(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(B4(e.reason))})}function USe(){const{appMonitorId:t,identityPoolId:e,region:n}=Qy().rum;if(!t)return GB;const r=new NSe(t,"1.0.0",n,{sessionSampleRate:1,identityPoolId:e,endpoint:`https://dataplane.rum.${n}.amazonaws.com`,telemetries:["performance"],disableAutoPageView:!0,allowCookies:!1,enableXRay:!1}),s=DSe(r);return LSe(s),s}const KB=A.createContext(GB);function Jxe(){return A.useContext(KB)}const oA="remit.theme",FSe="dark";function j4(){return typeof localStorage>"u"?"system":localStorage.getItem(oA)??"system"}function iA(t){if(typeof document>"u")return;const e=t==="dark"||t==="system"&&typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle(FSe,e)}function eAe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(oA):localStorage.setItem(oA,t)),iA(t)}const zSe=()=>{if(typeof window>"u"||(iA(j4()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{iA(j4())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},BSe=(t,e,n,r)=>{const s=[n,{code:e,...r||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);Ll(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...s):console?.warn&&console.warn(...s)},H4={},aA=(t,e,n,r)=>{Ll(n)&&H4[n]||(Ll(n)&&(H4[n]=new Date),BSe(t,e,n,r))},YB=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},lA=(t,e,n)=>{t.loadNamespaces(e,YB(t,n))},$4=(t,e,n,r)=>{if(Ll(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return lA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,YB(t,r))},jSe=(t,e,n={})=>!e.languages||!e.languages.length?(aA(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(r,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,t))return!1}}),Ll=t=>typeof t=="string",HSe=t=>typeof t=="object"&&t!==null,$Se=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,qSe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},WSe=t=>qSe[t],GSe=t=>t.replace($Se,WSe);let uA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:GSe};const VSe=(t={})=>{uA={...uA,...t}},KSe=()=>uA;let ZB;const YSe=t=>{ZB=t},ZSe=()=>ZB,XSe={type:"3rdParty",init(t){VSe(t.options.react),YSe(t)}},QSe=A.createContext();class JSe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const eEe=(t,e)=>{const n=A.useRef();return A.useEffect(()=>{n.current=t},[t,e]),n.current},XB=(t,e,n,r)=>t.getFixedT(e,n,r),tEe=(t,e,n,r)=>A.useCallback(XB(t,e,n,r),[t,e,n,r]),nEe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=A.useContext(QSe)||{},o=n||r||ZSe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new JSe),!o){aA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(O,I)=>Ll(I)?I:HSe(I)&&Ll(I.defaultValue)?I.defaultValue:Array.isArray(O)?O[O.length-1]:O,M=[R,{},!1];return M.t=R,M.i18n={},M.ready=!1,M}o.options.react?.wait&&aA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...KSe(),...o.options.react,...e},{useSuspense:u,keyPrefix:c}=a;let f=t||s||o.options?.defaultNS;f=Ll(f)?[f]:f||["translation"],o.reportNamespaces.addUsedNamespaces?.(f);const p=(o.isInitialized||o.initializedStoreOnce)&&f.every(R=>jSe(R,o,a)),g=tEe(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),m=()=>g,y=()=>XB(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),[S,E]=A.useState(m);let C=f.join();e.lng&&(C=`${e.lng}${C}`);const w=eEe(C),x=A.useRef(!0);A.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;x.current=!0,!p&&!u&&(e.lng?$4(o,e.lng,f,()=>{x.current&&E(y)}):lA(o,f,()=>{x.current&&E(y)})),p&&w&&w!==C&&x.current&&E(y);const O=()=>{x.current&&E(y)};return R&&o?.on(R,O),M&&o?.store.on(M,O),()=>{x.current=!1,o&&R&&R?.split(" ").forEach(I=>o.off(I,O)),M&&o&&M.split(" ").forEach(I=>o.store.off(I,O))}},[o,C]),A.useEffect(()=>{x.current&&p&&E(m)},[o,c,p]);const T=[S,o,p];if(T.t=S,T.i18n=o,T.ready=p,p||!p&&!u)return T;throw new Promise(R=>{e.lng?$4(o,e.lng,f,()=>R()):lA(o,f,()=>R())})},rEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),sEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),oEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),iEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),aEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),lEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),uEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),cEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),dEe=t=>(t.client??Ze).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),fEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),hEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),pEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),gEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),mEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),vEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),yEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),bEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),SEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),EEe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),tAe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),CEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),wEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),_Ee=t=>(t?.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),xEe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),AEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),TEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),REe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),IEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),OEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),NEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),MEe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),PEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),kEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),DEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),LEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),UEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),FEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),zEe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),BEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),nAe=t=>({mutationFn:async n=>{const{data:r}=await rEe({...t,...n,throwOnError:!0});return r}}),fr=(t,e,n,r)=>{const s={_id:t,baseUrl:e?.baseUrl||(e?.client??Ze).getConfig().baseUrl};return e?.body&&(s.body=e.body),e?.headers&&(s.headers=e.headers),e?.path&&(s.path=e.path),e?.query&&(s.query=e.query),[s]},rAe=t=>({mutationFn:async n=>{const{data:r}=await sEe({...t,...n,throwOnError:!0});return r}}),sAe=t=>({mutationFn:async n=>{const{data:r}=await oEe({...t,...n,throwOnError:!0});return r}}),oAe=t=>({mutationFn:async n=>{const{data:r}=await iEe({...t,...n,throwOnError:!0});return r}}),iAe=t=>({mutationFn:async n=>{const{data:r}=await aEe({...t,...n,throwOnError:!0});return r}}),jEe=t=>fr("filterOperationsListFilters",t),aAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await lEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:jEe(t)}),lAe=t=>({mutationFn:async n=>{const{data:r}=await uEe({...t,...n,throwOnError:!0});return r}}),uAe=t=>({mutationFn:async n=>{const{data:r}=await cEe({...t,...n,throwOnError:!0});return r}}),cAe=t=>({mutationFn:async n=>{const{data:r}=await dEe({...t,...n,throwOnError:!0});return r}}),HEe=t=>fr("mailboxOperationsListMailboxes",t),dAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await fEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:HEe(t)}),fAe=t=>({mutationFn:async n=>{const{data:r}=await hEe({...t,...n,throwOnError:!0});return r}}),hAe=t=>({mutationFn:async n=>{const{data:r}=await pEe({...t,...n,throwOnError:!0});return r}}),pAe=t=>({mutationFn:async n=>{const{data:r}=await gEe({...t,...n,throwOnError:!0});return r}}),$Ee=t=>fr("organizeJobDetailOperationsGetOrganizeJob",t),gAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await mEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:$Ee(t)}),mAe=t=>({mutationFn:async n=>{const{data:r}=await vEe({...t,...n,throwOnError:!0});return r}}),qEe=t=>fr("syncOperationsGetSyncStatus",t),vAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await yEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:qEe(t)}),WEe=t=>fr("addressOperationsSearchAddresses",t),yAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await bEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:WEe(t)}),bAe=t=>({mutationFn:async n=>{const{data:r}=await SEe({...t,...n,throwOnError:!0});return r}}),GEe=t=>fr("configOperationsGetConfig",t),VEe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await EEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:GEe(t)}),SAe=t=>fr("threadOperationsListThreads",t),KEe=t=>fr("threadOperationsSearchThreads",t),EAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await CEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:KEe(t)}),CAe=t=>({mutationFn:async n=>{const{data:r}=await wEe({...t,...n,throwOnError:!0});return r}}),wAe=t=>({mutationFn:async n=>{const{data:r}=await _Ee({...t,...n,throwOnError:!0});return r}}),YEe=t=>fr("meOperationsListVipSuggestions",t),_Ae=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await xEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:YEe(t)}),xAe=t=>({mutationFn:async n=>{const{data:r}=await AEe({...t,...n,throwOnError:!0});return r}}),AAe=t=>({mutationFn:async n=>{const{data:r}=await TEe({...t,...n,throwOnError:!0});return r}}),TAe=t=>({mutationFn:async n=>{const{data:r}=await REe({...t,...n,throwOnError:!0});return r}}),ZEe=t=>fr("messageOperationsDescribeMessage",t),RAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await IEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:ZEe(t)}),IAe=t=>({mutationFn:async n=>{const{data:r}=await OEe({...t,...n,throwOnError:!0});return r}}),XEe=t=>fr("messageOperationsGetRawMessage",t),OAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await NEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:XEe(t)}),QB=t=>fr("outboxOperationsListOutboxMessages",t),NAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await MEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:QB(t)}),MAe=t=>({mutationFn:async n=>{const{data:r}=await PEe({...t,...n,throwOnError:!0});return r}}),PAe=t=>({mutationFn:async n=>{const{data:r}=await kEe({...t,...n,throwOnError:!0});return r}}),QEe=t=>fr("outboxDetailOperationsGetOutboxMessage",t),JEe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await DEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:QEe(t)}),kAe=t=>({mutationFn:async n=>{const{data:r}=await LEe({...t,...n,throwOnError:!0});return r}}),DAe=t=>({mutationFn:async n=>{const{data:r}=await UEe({...t,...n,throwOnError:!0});return r}}),eCe=t=>fr("semanticSearchOperationsSemanticSearch",t),LAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await FEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:eCe(t)}),tCe=t=>fr("unifiedThreadOperationsListAllThreads",t),nCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await zEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:tCe(t)}),rCe=t=>fr("threadDetailOperationsListThreadMessages",t),UAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await BEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:rCe(t)}),JB=A.createContext(void 0),q4={isOpen:!1,mode:"new"},sCe=2e3,oCe=6e4,iCe=({children:t})=>{const[e,n]=A.useState(q4),[r,s]=A.useState(),o=A.useRef(0),a=q5(),{data:u}=iq({...JEe({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>oCe?!1:sCe}});A.useEffect(()=>{if(!u||!r)return;(u.status==="sent"||u.status==="failed"||u.status==="blocked")&&(s(void 0),a.invalidateQueries({queryKey:QB()}))},[u,r,a]);const c=A.useCallback(y=>{n({...y,isOpen:!0})},[]),f=A.useCallback(()=>{n(q4)},[]),p=A.useCallback(y=>{n(S=>({...S,outboxMessageId:y}))},[]),g=A.useCallback(y=>{o.current=Date.now(),s(y)},[]),m=A.useMemo(()=>({state:e,openCompose:c,closeCompose:f,setOutboxMessageId:p,startSendPolling:g}),[e,c,f,p,g]);return F.jsx(JB.Provider,{value:m,children:t})},FAe=()=>{const t=A.useContext(JB);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},f_=(...t)=>mF(cF(t)),aCe={error:{container:"border-danger/50 bg-danger/10 dark:bg-danger/20",icon:"text-danger",title:"text-danger"},warning:{container:"border-warning/50 bg-warning/10",icon:"text-warning",title:"text-warning"},info:{container:"border-accent-2/50 bg-accent-2-soft",icon:"text-accent-2",title:"text-accent-2"}},lCe={error:nue,warning:uue,info:iue},uCe={error:"Error",warning:"Warning",info:"Information"},cCe=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=aCe[e],a=lCe[e];return F.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:f_("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas/80 px-3 py-2 shadow-md backdrop-blur",o.container),children:[F.jsx(a,{className:f_("size-5 shrink-0 mt-0.5",o.icon),"aria-hidden":"true"}),F.jsxs("div",{className:"flex-1 min-w-0",children:[F.jsx("p",{className:f_("text-sm font-medium",o.title),children:n}),r&&F.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r})]}),F.jsx("button",{type:"button",onClick:()=>s(t),className:"shrink-0 rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors","aria-label":`Dismiss ${uCe[e].toLowerCase()}`,children:F.jsx(rx,{className:"size-4","aria-hidden":"true"})})]})},dCe=({errors:t,onDismiss:e})=>t.length===0?null:F.jsx("section",{"aria-label":"Notifications",className:"pointer-events-none fixed inset-x-0 top-0 z-[60] flex flex-col items-center gap-2 px-4 pt-4 sm:items-end sm:pr-6",children:F.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:t.map(n=>F.jsx(cCe,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),W4=5,zAe=(t,e,n)=>({title:t,detail:ej(n)??e}),ej=t=>{if(t!=null){if(t instanceof Error)return t.message||void 0;if(typeof t=="string")return t||void 0;if(typeof t=="object"&&"message"in t&&typeof t.message=="string")return t.message||void 0}},BAe=t=>{const e=ej(t);return e?e.startsWith("Message not found"):!1},fCe=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,hCe=(t,e)=>{const r=[...t.filter(s=>!fCe(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=W4?r:r.slice(r.length-W4)},pCe=(t,e)=>t.filter(n=>n.id!==e),gCe=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),tj=A.createContext(void 0),mCe=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,vCe=({children:t})=>{const[e,n]=A.useState([]),r=A.useCallback(u=>{const c=gCe(u,mCe(),Date.now());return n(f=>hCe(f,c)),c.id},[]),s=A.useCallback(u=>{n(c=>pCe(c,u))},[]),o=A.useCallback(()=>{n([])},[]),a=A.useMemo(()=>({errors:e,pushError:r,dismissError:s,clearAll:o}),[e,r,s,o]);return F.jsxs(tj.Provider,{value:a,children:[t,F.jsx(dCe,{errors:e,onDismiss:s})]})},jAe=()=>{const t=A.useContext(tj);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},yCe=({error:t,reset:e,info:n})=>{const r=VT(t),s=Lc(t,{recoverable:r,componentStack:n?.componentStack});return F.jsx(t7,{fatal:s,onRetry:r?e:void 0})},cp=zW()({component:SCe,errorComponent:yCe}),bCe=()=>{const{t}=nEe("common",{useSuspense:!1});return F.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:z-50 focus:p-4 focus:bg-canvas focus:text-fg focus:rounded-md",children:t("accessibility.skipToContent","Skip to main content")})};function SCe(){return F.jsxs(vCe,{children:[F.jsxs(iCe,{children:[F.jsx(bCe,{}),F.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:F.jsx(A.Suspense,{fallback:F.jsx(WT,{}),children:F.jsx(_6,{})})})]}),F.jsx(e7,{})]})}const ECe=dr("/")({beforeLoad:()=>{throw n6({to:"/mail"})}});var Tt;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const o={};for(const a of s)o[a]=a;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),a={};for(const u of o)a[u]=s[u];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&o.push(a);return o},t.find=(s,o)=>{for(const a of s)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Tt||(Tt={}));var G4;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(G4||(G4={}));const Oe=Tt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Sa=t=>{switch(typeof t){case"undefined":return Oe.undefined;case"string":return Oe.string;case"number":return Number.isNaN(t)?Oe.nan:Oe.number;case"boolean":return Oe.boolean;case"function":return Oe.function;case"bigint":return Oe.bigint;case"symbol":return Oe.symbol;case"object":return Array.isArray(t)?Oe.array:t===null?Oe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Oe.promise:typeof Map<"u"&&t instanceof Map?Oe.map:typeof Set<"u"&&t instanceof Set?Oe.set:typeof Date<"u"&&t instanceof Date?Oe.date:Oe.object;default:return Oe.unknown}},ge=Tt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class _i extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let u=r,c=0;for(;c<a.path.length;){const f=a.path[c];c===a.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(a))):u[f]=u[f]||{_errors:[]},u=u[f],c++}}};return s(this),r}static assert(e){if(!(e instanceof _i))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Tt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];n[o]=n[o]||[],n[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}_i.create=t=>new _i(t);const cA=(t,e)=>{let n;switch(t.code){case ge.invalid_type:t.received===Oe.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Tt.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${Tt.joinValues(t.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Tt.joinValues(t.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${Tt.joinValues(t.options)}, received '${t.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Tt.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ge.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ge.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=e.defaultError,Tt.assertNever(t)}return{message:n}};let CCe=cA;function wCe(){return CCe}const _Ce=t=>{const{data:e,path:n,errorMaps:r,issueData:s}=t,o=[...n,...s.path||[]],a={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let u="";const c=r.filter(f=>!!f).slice().reverse();for(const f of c)u=f(a,{data:e,defaultError:u}).message;return{...s,path:o,message:u}};function xe(t,e){const n=wCe(),r=_Ce({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===cA?void 0:cA].filter(s=>!!s)});t.common.issues.push(r)}class ls{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return Ke;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const o=await s.key,a=await s.value;r.push({key:o,value:a})}return ls.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:o,value:a}=s;if(o.status==="aborted"||a.status==="aborted")return Ke;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[o.value]=a.value)}return{status:e.value,value:r}}}const Ke=Object.freeze({status:"aborted"}),Zf=t=>({status:"dirty",value:t}),Ms=t=>({status:"valid",value:t}),V4=t=>t.status==="aborted",K4=t=>t.status==="dirty",Wc=t=>t.status==="valid",Qv=t=>typeof Promise<"u"&&t instanceof Promise;var Me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Me||(Me={}));class ja{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Y4=(t,e)=>{if(Wc(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new _i(t.common.issues);return this._error=n,this._error}}};function st(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,u)=>{const{message:c}=t;return a.code==="invalid_enum_value"?{message:c??u.defaultError}:typeof u.data>"u"?{message:c??r??u.defaultError}:a.code!=="invalid_type"?{message:u.defaultError}:{message:c??n??u.defaultError}},description:s}}class wt{get description(){return this._def.description}_getType(e){return Sa(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Sa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ls,ctx:{common:e.parent.common,data:e.data,parsedType:Sa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Qv(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Y4(r,s)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return Wc(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>Wc(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)},s=this._parse({data:e,path:r.path,parent:r}),o=await(Qv(s)?s:Promise.resolve(s));return Y4(r,o)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const a=e(s),u=()=>o.addIssue({code:ge.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new Kc({schema:this,typeName:Ye.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ma.create(this,this._def)}nullable(){return Yc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _o.create(this)}promise(){return ny.create(this,this._def)}or(e){return ey.create([this,e],this._def)}and(e){return ty.create(this,e,this._def)}transform(e){return new Kc({...st(this._def),schema:this,typeName:Ye.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new fA({...st(this._def),innerType:this,defaultValue:n,typeName:Ye.ZodDefault})}brand(){return new VCe({typeName:Ye.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new hA({...st(this._def),innerType:this,catchValue:n,typeName:Ye.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return zR.create(this,e)}readonly(){return pA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const xCe=/^c[^\s-]{8,}$/i,ACe=/^[0-9a-z]+$/,TCe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,RCe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ICe=/^[a-z0-9_-]{21}$/i,OCe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,NCe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,MCe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,PCe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let h_;const kCe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,DCe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,LCe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,UCe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,FCe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,zCe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nj="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",BCe=new RegExp(`^${nj}$`);function rj(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function jCe(t){return new RegExp(`^${rj(t)}$`)}function HCe(t){let e=`${nj}T${rj(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function $Ce(t,e){return!!((e==="v4"||!e)&&kCe.test(t)||(e==="v6"||!e)&&LCe.test(t))}function qCe(t,e){if(!OCe.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function WCe(t,e){return!!((e==="v4"||!e)&&DCe.test(t)||(e==="v6"||!e)&&UCe.test(t))}class hi extends wt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Oe.string){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_type,expected:Oe.string,received:o.parsedType}),Ke}const r=new ls;let s;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=e.data.length>o.value,u=e.data.length<o.value;(a||u)&&(s=this._getOrReturnCtx(e,s),a?xe(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&xe(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")MCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"email",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")h_||(h_=new RegExp(PCe,"u")),h_.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"emoji",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")RCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"uuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")ICe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"nanoid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")xCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"cuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")ACe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"cuid2",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")TCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"ulid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),xe(s,{validation:"url",code:ge.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"regex",code:ge.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?HCe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?BCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?jCe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?NCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?$Ce(e.data,o.version)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"ip",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?qCe(e.data,o.alg)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"jwt",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?WCe(e.data,o.version)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"cidr",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?FCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?zCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"base64url",code:ge.invalid_string,message:o.message}),r.dirty()):Tt.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:ge.invalid_string,...Me.errToObj(r)})}_addCheck(e){return new hi({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Me.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Me.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Me.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Me.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Me.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Me.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Me.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Me.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Me.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Me.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Me.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Me.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Me.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Me.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Me.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Me.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Me.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Me.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Me.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Me.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Me.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Me.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Me.errToObj(n)})}nonempty(e){return this.min(1,Me.errToObj(e))}trim(){return new hi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new hi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new hi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}hi.create=t=>new hi({checks:[],typeName:Ye.ZodString,coerce:t?.coerce??!1,...st(t)});function GCe(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,o=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return o%a/10**s}class Gl extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Oe.number){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_type,expected:Oe.number,received:o.parsedType}),Ke}let r;const s=new ls;for(const o of this._def.checks)o.kind==="int"?Tt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?GCe(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.not_finite,message:o.message}),s.dirty()):Tt.assertNever(o);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Me.toString(n))}setLimit(e,n,r,s){return new Gl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Gl({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Me.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Me.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Me.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Me.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Me.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Tt.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Gl.create=t=>new Gl({checks:[],typeName:Ye.ZodNumber,coerce:t?.coerce||!1,...st(t)});class Vl extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Oe.bigint)return this._getInvalidInput(e);let r;const s=new ls;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Tt.assertNever(o);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return xe(n,{code:ge.invalid_type,expected:Oe.bigint,received:n.parsedType}),Ke}gte(e,n){return this.setLimit("min",e,!0,Me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Me.toString(n))}setLimit(e,n,r,s){return new Vl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Vl({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Me.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Vl.create=t=>new Vl({checks:[],typeName:Ye.ZodBigInt,coerce:t?.coerce??!1,...st(t)});class Jv extends wt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Oe.boolean){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.boolean,received:r.parsedType}),Ke}return Ms(e.data)}}Jv.create=t=>new Jv({typeName:Ye.ZodBoolean,coerce:t?.coerce||!1,...st(t)});class Gc extends wt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Oe.date){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_type,expected:Oe.date,received:o.parsedType}),Ke}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_date}),Ke}const r=new ls;let s;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Tt.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Gc({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Me.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Me.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Gc.create=t=>new Gc({checks:[],coerce:t?.coerce||!1,typeName:Ye.ZodDate,...st(t)});class Z4 extends wt{_parse(e){if(this._getType(e)!==Oe.symbol){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.symbol,received:r.parsedType}),Ke}return Ms(e.data)}}Z4.create=t=>new Z4({typeName:Ye.ZodSymbol,...st(t)});class X4 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.undefined,received:r.parsedType}),Ke}return Ms(e.data)}}X4.create=t=>new X4({typeName:Ye.ZodUndefined,...st(t)});class Q4 extends wt{_parse(e){if(this._getType(e)!==Oe.null){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.null,received:r.parsedType}),Ke}return Ms(e.data)}}Q4.create=t=>new Q4({typeName:Ye.ZodNull,...st(t)});class J4 extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ms(e.data)}}J4.create=t=>new J4({typeName:Ye.ZodAny,...st(t)});class e5 extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ms(e.data)}}e5.create=t=>new e5({typeName:Ye.ZodUnknown,...st(t)});class Ha extends wt{_parse(e){const n=this._getOrReturnCtx(e);return xe(n,{code:ge.invalid_type,expected:Oe.never,received:n.parsedType}),Ke}}Ha.create=t=>new Ha({typeName:Ye.ZodNever,...st(t)});class t5 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.void,received:r.parsedType}),Ke}return Ms(e.data)}}t5.create=t=>new t5({typeName:Ye.ZodVoid,...st(t)});class _o extends wt{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==Oe.array)return xe(n,{code:ge.invalid_type,expected:Oe.array,received:n.parsedType}),Ke;if(s.exactLength!==null){const a=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(a||u)&&(xe(n,{code:a?ge.too_big:ge.too_small,minimum:u?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(xe(n,{code:ge.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(xe(n,{code:ge.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,u)=>s.type._parseAsync(new ja(n,a,n.path,u)))).then(a=>ls.mergeArray(r,a));const o=[...n.data].map((a,u)=>s.type._parseSync(new ja(n,a,n.path,u)));return ls.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new _o({...this._def,minLength:{value:e,message:Me.toString(n)}})}max(e,n){return new _o({...this._def,maxLength:{value:e,message:Me.toString(n)}})}length(e,n){return new _o({...this._def,exactLength:{value:e,message:Me.toString(n)}})}nonempty(e){return this.min(1,e)}}_o.create=(t,e)=>new _o({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ye.ZodArray,...st(e)});function gc(t){if(t instanceof _n){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Ma.create(gc(r))}return new _n({...t._def,shape:()=>e})}else return t instanceof _o?new _o({...t._def,type:gc(t.element)}):t instanceof Ma?Ma.create(gc(t.unwrap())):t instanceof Yc?Yc.create(gc(t.unwrap())):t instanceof Kl?Kl.create(t.items.map(e=>gc(e))):t}class _n extends wt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Tt.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Oe.object){const f=this._getOrReturnCtx(e);return xe(f,{code:ge.invalid_type,expected:Oe.object,received:f.parsedType}),Ke}const{status:r,ctx:s}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof Ha&&this._def.unknownKeys==="strip"))for(const f in s.data)a.includes(f)||u.push(f);const c=[];for(const f of a){const p=o[f],g=s.data[f];c.push({key:{status:"valid",value:f},value:p._parse(new ja(s,g,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Ha){const f=this._def.unknownKeys;if(f==="passthrough")for(const p of u)c.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(f==="strict")u.length>0&&(xe(s,{code:ge.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const p of u){const g=s.data[p];c.push({key:{status:"valid",value:p},value:f._parse(new ja(s,g,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const p of c){const g=await p.key,m=await p.value;f.push({key:g,value:m,alwaysSet:p.alwaysSet})}return f}).then(f=>ls.mergeObjectSync(r,f)):ls.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return Me.errToObj,new _n({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{const s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Me.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new _n({...this._def,unknownKeys:"strip"})}passthrough(){return new _n({...this._def,unknownKeys:"passthrough"})}extend(e){return new _n({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new _n({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ye.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new _n({...this._def,catchall:e})}pick(e){const n={};for(const r of Tt.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new _n({...this._def,shape:()=>n})}omit(e){const n={};for(const r of Tt.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new _n({...this._def,shape:()=>n})}deepPartial(){return gc(this)}partial(e){const n={};for(const r of Tt.objectKeys(this.shape)){const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new _n({...this._def,shape:()=>n})}required(e){const n={};for(const r of Tt.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Ma;)o=o._def.innerType;n[r]=o}return new _n({...this._def,shape:()=>n})}keyof(){return sj(Tt.objectKeys(this.shape))}}_n.create=(t,e)=>new _n({shape:()=>t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});_n.strictCreate=(t,e)=>new _n({shape:()=>t,unknownKeys:"strict",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});_n.lazycreate=(t,e)=>new _n({shape:t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});class ey extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const a=o.map(u=>new _i(u.ctx.common.issues));return xe(n,{code:ge.invalid_union,unionErrors:a}),Ke}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(s);{let o;const a=[];for(const c of r){const f={...n,common:{...n.common,issues:[]},parent:null},p=c._parseSync({data:n.data,path:n.path,parent:f});if(p.status==="valid")return p;p.status==="dirty"&&!o&&(o={result:p,ctx:f}),f.common.issues.length&&a.push(f.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=a.map(c=>new _i(c));return xe(n,{code:ge.invalid_union,unionErrors:u}),Ke}}get options(){return this._def.options}}ey.create=(t,e)=>new ey({options:t,typeName:Ye.ZodUnion,...st(e)});function dA(t,e){const n=Sa(t),r=Sa(e);if(t===e)return{valid:!0,data:t};if(n===Oe.object&&r===Oe.object){const s=Tt.objectKeys(e),o=Tt.objectKeys(t).filter(u=>s.indexOf(u)!==-1),a={...t,...e};for(const u of o){const c=dA(t[u],e[u]);if(!c.valid)return{valid:!1};a[u]=c.data}return{valid:!0,data:a}}else if(n===Oe.array&&r===Oe.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const a=t[o],u=e[o],c=dA(a,u);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===Oe.date&&r===Oe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ty extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(V4(o)||V4(a))return Ke;const u=dA(o.value,a.value);return u.valid?((K4(o)||K4(a))&&n.dirty(),{status:n.value,value:u.data}):(xe(r,{code:ge.invalid_intersection_types}),Ke)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>s(o,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ty.create=(t,e,n)=>new ty({left:t,right:e,typeName:Ye.ZodIntersection,...st(n)});class Kl extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.array)return xe(r,{code:ge.invalid_type,expected:Oe.array,received:r.parsedType}),Ke;if(r.data.length<this._def.items.length)return xe(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ke;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,u)=>{const c=this._def.items[u]||this._def.rest;return c?c._parse(new ja(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>ls.mergeArray(n,a)):ls.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new Kl({...this._def,rest:e})}}Kl.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Kl({items:t,typeName:Ye.ZodTuple,rest:null,...st(e)})};class n5 extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.map)return xe(r,{code:ge.invalid_type,expected:Oe.map,received:r.parsedType}),Ke;const s=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,c],f)=>({key:s._parse(new ja(r,u,r.path,[f,"key"])),value:o._parse(new ja(r,c,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const c of a){const f=await c.key,p=await c.value;if(f.status==="aborted"||p.status==="aborted")return Ke;(f.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(f.value,p.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const c of a){const f=c.key,p=c.value;if(f.status==="aborted"||p.status==="aborted")return Ke;(f.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(f.value,p.value)}return{status:n.value,value:u}}}}n5.create=(t,e,n)=>new n5({valueType:e,keyType:t,typeName:Ye.ZodMap,...st(n)});class Bh extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.set)return xe(r,{code:ge.invalid_type,expected:Oe.set,received:r.parsedType}),Ke;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(xe(r,{code:ge.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(xe(r,{code:ge.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function a(c){const f=new Set;for(const p of c){if(p.status==="aborted")return Ke;p.status==="dirty"&&n.dirty(),f.add(p.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((c,f)=>o._parse(new ja(r,c,r.path,f)));return r.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(e,n){return new Bh({...this._def,minSize:{value:e,message:Me.toString(n)}})}max(e,n){return new Bh({...this._def,maxSize:{value:e,message:Me.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Bh.create=(t,e)=>new Bh({valueType:t,minSize:null,maxSize:null,typeName:Ye.ZodSet,...st(e)});class r5 extends wt{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}r5.create=(t,e)=>new r5({getter:t,typeName:Ye.ZodLazy,...st(e)});class s5 extends wt{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return xe(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Ke}return{status:"valid",value:e.data}}get value(){return this._def.value}}s5.create=(t,e)=>new s5({value:t,typeName:Ye.ZodLiteral,...st(e)});function sj(t,e){return new Vc({values:t,typeName:Ye.ZodEnum,...st(e)})}class Vc extends wt{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return xe(n,{expected:Tt.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Ke}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return xe(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Ke}return Ms(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Vc.create(e,{...this._def,...n})}exclude(e,n=this._def){return Vc.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Vc.create=sj;class o5 extends wt{_parse(e){const n=Tt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Oe.string&&r.parsedType!==Oe.number){const s=Tt.objectValues(n);return xe(r,{expected:Tt.joinValues(s),received:r.parsedType,code:ge.invalid_type}),Ke}if(this._cache||(this._cache=new Set(Tt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=Tt.objectValues(n);return xe(r,{received:r.data,code:ge.invalid_enum_value,options:s}),Ke}return Ms(e.data)}get enum(){return this._def.values}}o5.create=(t,e)=>new o5({values:t,typeName:Ye.ZodNativeEnum,...st(e)});class ny extends wt{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Oe.promise&&n.common.async===!1)return xe(n,{code:ge.invalid_type,expected:Oe.promise,received:n.parsedType}),Ke;const r=n.parsedType===Oe.promise?n.data:Promise.resolve(n.data);return Ms(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ny.create=(t,e)=>new ny({type:t,typeName:Ye.ZodPromise,...st(e)});class Kc extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,o={addIssue:a=>{xe(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const a=s.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async u=>{if(n.value==="aborted")return Ke;const c=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return c.status==="aborted"?Ke:c.status==="dirty"||n.value==="dirty"?Zf(c.value):c});{if(n.value==="aborted")return Ke;const u=this._def.schema._parseSync({data:a,path:r.path,parent:r});return u.status==="aborted"?Ke:u.status==="dirty"||n.value==="dirty"?Zf(u.value):u}}if(s.type==="refinement"){const a=u=>{const c=s.refinement(u,o);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Ke:(u.status==="dirty"&&n.dirty(),a(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Ke:(u.status==="dirty"&&n.dirty(),a(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Wc(a))return Ke;const u=s.transform(a.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Wc(a)?Promise.resolve(s.transform(a.value,o)).then(u=>({status:n.value,value:u})):Ke);Tt.assertNever(s)}}Kc.create=(t,e,n)=>new Kc({schema:t,typeName:Ye.ZodEffects,effect:e,...st(n)});Kc.createWithPreprocess=(t,e,n)=>new Kc({schema:e,effect:{type:"preprocess",transform:t},typeName:Ye.ZodEffects,...st(n)});class Ma extends wt{_parse(e){return this._getType(e)===Oe.undefined?Ms(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ma.create=(t,e)=>new Ma({innerType:t,typeName:Ye.ZodOptional,...st(e)});class Yc extends wt{_parse(e){return this._getType(e)===Oe.null?Ms(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Yc.create=(t,e)=>new Yc({innerType:t,typeName:Ye.ZodNullable,...st(e)});class fA extends wt{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Oe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}fA.create=(t,e)=>new fA({innerType:t,typeName:Ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class hA extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Qv(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}hA.create=(t,e)=>new hA({innerType:t,typeName:Ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class i5 extends wt{_parse(e){if(this._getType(e)!==Oe.nan){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.nan,received:r.parsedType}),Ke}return{status:"valid",value:e.data}}}i5.create=t=>new i5({typeName:Ye.ZodNaN,...st(t)});class VCe extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class zR extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ke:o.status==="dirty"?(n.dirty(),Zf(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ke:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new zR({in:e,out:n,typeName:Ye.ZodPipeline})}}class pA extends wt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(Wc(s)&&(s.value=Object.freeze(s.value)),s);return Qv(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}pA.create=(t,e)=>new pA({innerType:t,typeName:Ye.ZodReadonly,...st(e)});var Ye;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ye||(Ye={}));const Fr=hi.create;Gl.create;Vl.create;const KCe=Jv.create;Gc.create;Ha.create;_o.create;const dd=_n.create;ey.create;ty.create;Kl.create;Vc.create;ny.create;Ma.create;Yc.create;const HAe={string:(t=>hi.create({...t,coerce:!0})),number:(t=>Gl.create({...t,coerce:!0})),boolean:(t=>Jv.create({...t,coerce:!0})),bigint:(t=>Vl.create({...t,coerce:!0})),date:(t=>Gc.create({...t,coerce:!0}))},YCe=Qy().apiUrl;Ze.setConfig({baseUrl:YCe});Ze.interceptors.error.use((t,e)=>{if(t instanceof cx||!e)return t;const n=t,r=n&&typeof n=="object"&&"message"in n?String(n.message):`Request failed with status ${e.status}`;return new cx(r,e.status,n)});const ZCe=A.createContext(null),$Ae=()=>A.useContext(ZCe)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,searchQuery:"",searchInput:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},XCe=()=>Bn(()=>import("./mail-C6GmqBz5.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])),QCe=dd({q:Fr().optional()}),JCe=dr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery(VEe()),t.prefetchQuery({...nCe(),staleTime:6e4})},component:rr(XCe,"component"),validateSearch:QCe}),ewe=()=>Bn(()=>import("./onboarding-Cb5vjmx8.js"),__vite__mapDeps([15,16,1,13,7,5])),twe=dr("/onboarding")({component:rr(ewe,"component")}),nwe=()=>Bn(()=>import("./settings-Kmq-_D_z.js"),[]),qAe=[{id:"accounts",label:"Accounts",icon:F.jsx(oue,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:F.jsx(cue,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:F.jsx(sue,{className:"size-4"})},{id:"filters",label:"Filters",icon:F.jsx(rue,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:F.jsx(lue,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:F.jsx(due,{className:"size-4"})}],WAe={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",appearance:"/settings/appearance",advanced:"/settings/advanced"},rwe=dr("/settings")({component:rr(nwe,"component")}),swe=()=>Bn(()=>import("./index-CaeklzBt.js"),__vite__mapDeps([17,10])),owe=()=>Bn(()=>import("./index-DtqBFgK5.js"),[]),iwe=dd({selectedMessageId:Fr().optional(),selectedThreadId:Fr().optional(),selectedMailboxId:Fr().optional(),q:Fr().optional()}),awe=dr("/mail/")({component:rr(owe,"component"),validateSearch:iwe,errorComponent:rr(swe,"errorComponent")}),lwe=()=>Bn(()=>import("./_mailboxId-DtqBFgK5.js"),[]),uwe=dd({selectedMessageId:Fr().optional(),selectedThreadId:Fr().optional(),q:Fr().optional()}),cwe=dr("/mail/$mailboxId")({component:rr(lwe,"component"),validateSearch:uwe}),dwe=()=>Bn(()=>import("./flagged-DFXdbkZA.js"),__vite__mapDeps([18,10])),fwe=()=>Bn(()=>import("./flagged-DtqBFgK5.js"),[]),hwe=dd({selectedMessageId:Fr().optional(),q:Fr().optional()}),pwe=dr("/mail/flagged")({component:rr(fwe,"component"),validateSearch:hwe,errorComponent:rr(dwe,"errorComponent")}),gwe=()=>Bn(()=>import("./outbox-DtqBFgK5.js"),[]),mwe=dd({selectedOutboxMessageId:Fr().optional()}),vwe=dr("/mail/outbox")({component:rr(gwe,"component"),validateSearch:mwe}),ywe=()=>Bn(()=>import("./index-Czg1CqQC.js"),[]),bwe=dr("/settings/")({component:rr(ywe,"component")}),Swe=()=>Bn(()=>import("./accounts-BvhEwfb2.js"),__vite__mapDeps([19,8,5,7,20,2,16,1,13,10,11,4])),Ewe=dd({editAccountId:Fr().optional(),focusSmtp:KCe().optional(),connected:Fr().optional(),oauthError:Fr().optional()}),Cwe=dr("/settings/accounts")({component:rr(Swe,"component"),validateSearch:Ewe}),wwe=()=>Bn(()=>import("./advanced-BDJxTH_n.js"),__vite__mapDeps([21,20,2])),_we=dr("/settings/advanced")({component:rr(wwe,"component")}),xwe=()=>Bn(()=>import("./appearance-CHdDWkw_.js"),__vite__mapDeps([22,20,2])),Awe=dr("/settings/appearance")({component:rr(xwe,"component")}),Twe=()=>Bn(()=>import("./filters-DKRKo0z8.js"),__vite__mapDeps([23,20,2,14,7,4,10,12])),Rwe=dr("/settings/filters")({component:rr(Twe,"component")}),Iwe=()=>Bn(()=>import("./folders-hQiLV99A.js"),__vite__mapDeps([24,6,4,3,13,20,2,7,10,12])),Owe=dr("/settings/folders")({component:rr(Iwe,"component")}),Nwe=()=>Bn(()=>import("./senders-lAfIRRB4.js"),__vite__mapDeps([25,1,20,2,7,10,9,11,3])),Mwe=dr("/settings/senders")({component:rr(Nwe,"component")}),Pwe=()=>Bn(()=>import("./suggested-vips-CsZI5xE4.js"),[]),kwe=dr("/settings/suggested-vips")({component:rr(Pwe,"component")}),Dwe=ECe.update({id:"/",path:"/",getParentRoute:()=>cp}),dp=JCe.update({id:"/mail",path:"/mail",getParentRoute:()=>cp}),Lwe=twe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>cp}),Ni=rwe.update({id:"/settings",path:"/settings",getParentRoute:()=>cp}),Uwe=awe.update({id:"/",path:"/",getParentRoute:()=>dp}),Fwe=cwe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>dp}),zwe=pwe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>dp}),Bwe=vwe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>dp}),jwe=bwe.update({id:"/",path:"/",getParentRoute:()=>Ni}),Hwe=Cwe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Ni}),$we=_we.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Ni}),qwe=Awe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Ni}),Wwe=Rwe.update({id:"/filters",path:"/filters",getParentRoute:()=>Ni}),Gwe=Owe.update({id:"/folders",path:"/folders",getParentRoute:()=>Ni}),Vwe=Mwe.update({id:"/senders",path:"/senders",getParentRoute:()=>Ni}),Kwe=kwe.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Ni}),Ywe={MailMailboxIdRoute:Fwe,MailFlaggedRoute:zwe,MailOutboxRoute:Bwe,MailIndexRoute:Uwe},Zwe=dp._addFileChildren(Ywe),Xwe={SettingsAccountsRoute:Hwe,SettingsAdvancedRoute:$we,SettingsAppearanceRoute:qwe,SettingsFiltersRoute:Wwe,SettingsFoldersRoute:Gwe,SettingsSendersRoute:Vwe,SettingsSuggestedVipsRoute:Kwe,SettingsIndexRoute:jwe},Qwe=Ni._addFileChildren(Xwe),Jwe={IndexRoute:Dwe,MailRoute:Zwe,OnboardingRoute:Lwe,SettingsRoute:Qwe},e_e=cp._addFileChildren(Jwe)._addFileTypes(),t_e=(t,e)=>{const n=tG({routeTree:e_e,context:{queryClient:t},defaultPreload:"intent"});return n.subscribe("onResolved",r=>{e.recordPageView(r.toLocation.pathname)}),n},qe=t=>typeof t=="string",Df=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},a5=t=>t==null?"":""+t,n_e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},r_e=/###/g,l5=t=>t&&t.indexOf("###")>-1?t.replace(r_e,"."):t,u5=t=>!t||qe(t),dh=(t,e,n)=>{const r=qe(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(u5(t))return{};const o=l5(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return u5(t)?{}:{obj:t,k:l5(r[s])}},c5=(t,e,n)=>{const{obj:r,k:s}=dh(t,e,Object);if(r!==void 0||e.length===1){r[s]=n;return}let o=e[e.length-1],a=e.slice(0,e.length-1),u=dh(t,a,Object);for(;u.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),u=dh(t,a,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},s_e=(t,e,n,r)=>{const{obj:s,k:o}=dh(t,e,Object);s[o]=s[o]||[],s[o].push(n)},ry=(t,e)=>{const{obj:n,k:r}=dh(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},o_e=(t,e,n)=>{const r=ry(t,n);return r!==void 0?r:ry(e,n)},oj=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?qe(t[r])||t[r]instanceof String||qe(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):oj(t[r],e[r],n):t[r]=e[r]);return t},sc=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var i_e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const a_e=t=>qe(t)?t.replace(/[&<>"'\/]/g,e=>i_e[e]):t;class l_e{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const u_e=[" ",",","?","!",";"],c_e=new l_e(20),d_e=(t,e,n)=>{e=e||"",n=n||"";const r=u_e.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=c_e.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!s.test(t);if(!o){const a=t.indexOf(n);a>0&&!s.test(t.substring(0,a))&&(o=!0)}return o},gA=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let s=t;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let a,u="";for(let c=o;c<r.length;++c)if(c!==o&&(u+=n),u+=r[c],a=s[u],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<r.length-1)continue;o+=c-o+1;break}s=a}return s},sy=t=>t?.replace("_","-"),f_e={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class oy{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||f_e,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,s){return s&&!this.debug?null:(qe(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new oy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new oy(this.logger,e)}}var wo=new oy;class Sb{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[u,c]=a;for(let f=0;f<c;f++)u(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[u,c]=a;for(let f=0;f<c;f++)u.apply(u,[e,...r])})}}class d5 extends Sb{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;e.indexOf(".")>-1?u=e.split("."):(u=[e,n],r&&(Array.isArray(r)?u.push(...r):qe(r)&&o?u.push(...r.split(o)):u.push(r)));const c=ry(this.data,u);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=u[0],n=u[1],r=u.slice(2).join(".")),c||!a||!qe(r)?c:gA(this.data?.[e]?.[n],r,o)}addResource(e,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let u=[e,n];r&&(u=u.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(u=e.split("."),s=n,n=u[1]),this.addNamespaces(n),c5(this.data,u,s),o.silent||this.emit("added",e,n,r,s)}addResources(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(qe(r[o])||Array.isArray(r[o]))&&this.addResource(e,n,o,r[o],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[e,n];e.indexOf(".")>-1&&(u=e.split("."),s=r,r=n,n=u[1]),this.addNamespaces(n);let c=ry(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?oj(c,r,o):c={...c,...r},c5(this.data,u,c),a.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var ij={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(o=>{e=this.processors[o]?.process(e,n,r,s)??e}),e}};const f5={},h5=t=>!qe(t)&&typeof t!="boolean"&&typeof t!="number";class iy extends Sb{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),n_e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wo.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return e==null?!1:this.resolve(e,n)?.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&e.indexOf(r)>-1,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!d_e(e,r,s);if(a&&!u){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:qe(o)?[o]:o};const f=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(f[0])>-1)&&(o=f.shift()),e=f.join(s)}return{key:e,namespaces:qe(o)?[o]:o}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(e[e.length-1],n),c=u[u.length-1],f=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(p){const U=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${U}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${U}${a}`}return s?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const g=this.resolve(e,n);let m=g?.res;const y=g?.usedKey||a,S=g?.exactUsedKey||a,E=["[object Number]","[object Function]","[object RegExp]"],C=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,x=n.count!==void 0&&!qe(n.count),T=iy.hasDefaultValue(n),R=x?this.pluralResolver.getSuffix(f,n.count,n):"",M=n.ordinal&&x?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",O=x&&!n.ordinal&&n.count===0,I=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${M}`]||n.defaultValue;let P=m;w&&!m&&T&&(P=I);const k=h5(P),H=Object.prototype.toString.apply(P);if(w&&P&&k&&E.indexOf(H)<0&&!(qe(C)&&Array.isArray(P))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const U=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,P,{...n,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(g.res=U,g.usedParams=this.getUsedParamsDetails(n),g):U}if(o){const U=Array.isArray(P),B=U?[]:{},W=U?S:y;for(const Y in P)if(Object.prototype.hasOwnProperty.call(P,Y)){const ne=`${W}${o}${Y}`;T&&!m?B[Y]=this.translate(ne,{...n,defaultValue:h5(I)?I[Y]:void 0,joinArrays:!1,ns:u}):B[Y]=this.translate(ne,{...n,joinArrays:!1,ns:u}),B[Y]===ne&&(B[Y]=P[Y])}m=B}}else if(w&&qe(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,e,n,r));else{let U=!1,B=!1;!this.isValidLookup(m)&&T&&(U=!0,m=I),this.isValidLookup(m)||(B=!0,m=a);const Y=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:m,ne=T&&I!==m&&this.options.updateMissing;if(B||U||ne){if(this.logger.log(ne?"updateKey":"missingKey",f,c,a,ne?I:m),o){const de=this.resolve(a,{...n,keySeparator:!1});de&&de.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[];const ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(let de=0;de<ee.length;de++)$.push(ee[de]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(n.lng||this.language):$.push(n.lng||this.language);const fe=(de,Ae,D)=>{const V=T&&D!==m?D:Y;this.options.missingKeyHandler?this.options.missingKeyHandler(de,c,Ae,V,ne,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(de,c,Ae,V,ne,n),this.emit("missingKey",de,c,Ae,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?$.forEach(de=>{const Ae=this.pluralResolver.getSuffixes(de,n);O&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Ae.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ae.push(`${this.options.pluralSeparator}zero`),Ae.forEach(D=>{fe([de],a+D,n[`defaultValue${D}`]||I)})}):fe($,a,I))}m=this.extendTranslation(m,e,n,g,r),B&&m===a&&this.options.appendNamespaceToMissingKey&&(m=`${c}:${a}`),(B||U)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,U?m:void 0))}return s?(g.res=m,g.usedParams=this.getUsedParamsDetails(n),g):m}extendTranslation(e,n,r,s,o){var a=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=qe(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(f){const m=e.match(this.interpolator.nestingRegexp);p=m&&m.length}let g=r.replace&&!qe(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),e=this.interpolator.interpolate(e,g,r.lng||this.language||s.usedLng,r),f){const m=e.match(this.interpolator.nestingRegexp),y=m&&m.length;p<y&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var m=arguments.length,y=new Array(m),S=0;S<m;S++)y[S]=arguments[S];return o?.[0]===y[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):a.translate(...y,n)},r)),r.interpolation&&this.interpolator.reset()}const u=r.postProcess||this.options.postProcess,c=qe(u)?[u]:u;return e!=null&&c?.length&&r.applyPostProcessor!==!1&&(e=ij.handle(c,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,a,u;return qe(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(c,n),p=f.key;s=p;let g=f.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const m=n.count!==void 0&&!qe(n.count),y=m&&!n.ordinal&&n.count===0,S=n.context!==void 0&&(qe(n.context)||typeof n.context=="number")&&n.context!=="",E=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);g.forEach(C=>{this.isValidLookup(r)||(u=C,!f5[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(f5[`${E[0]}-${C}`]=!0,this.logger.warn(`key "${s}" for languages "${E.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[p];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,p,w,C,n);else{let R;m&&(R=this.pluralResolver.getSuffix(w,n.count,n));const M=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(x.push(p+R),n.ordinal&&R.indexOf(O)===0&&x.push(p+R.replace(O,this.options.pluralSeparator)),y&&x.push(p+M)),S){const I=`${p}${this.options.contextSeparator}${n.context}`;x.push(I),m&&(x.push(I+R),n.ordinal&&R.indexOf(O)===0&&x.push(I+R.replace(O,this.options.pluralSeparator)),y&&x.push(I+M))}}let T;for(;T=x.pop();)this.isValidLookup(r)||(o=T,r=this.getResource(w,C,T,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:a,usedNS:u}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!qe(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class p5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(e){if(e=sy(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=sy(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(qe(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),qe(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),s=[],o=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return qe(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):qe(e)&&o(this.formatLanguageCode(e)),r.forEach(a=>{s.indexOf(a)<0&&o(this.formatLanguageCode(a))}),s}}const g5={zero:0,one:1,two:2,few:3,many:4,other:5},m5={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class h_e{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=wo.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=sy(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),m5;if(!e.match(/-|_/))return m5;const c=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(c,n)}return this.pluralRulesCache[o]=a,a}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,o)=>g5[s]-g5[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const v5=function(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=o_e(t,e,n);return!o&&s&&qe(n)&&(o=gA(t,n,r),o===void 0&&(o=gA(e,n,r))),o},p_=t=>t.replace(/\$/g,"$$$$");class p_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:a,suffix:u,suffixEscaped:c,formatSeparator:f,unescapeSuffix:p,unescapePrefix:g,nestingPrefix:m,nestingPrefixEscaped:y,nestingSuffix:S,nestingSuffixEscaped:E,nestingOptionsSeparator:C,maxReplaces:w,alwaysFormat:x}=e.interpolation;this.escape=n!==void 0?n:a_e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?sc(o):a||"{{",this.suffix=u?sc(u):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=p?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=m?sc(m):y||sc("$t("),this.nestingSuffix=S?sc(S):E||sc(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,r,s){let o,a,u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=y=>{if(y.indexOf(this.formatSeparator)<0){const w=v5(n,c,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...s,...n,interpolationkey:y}):w}const S=y.split(this.formatSeparator),E=S.shift().trim(),C=S.join(this.formatSeparator).trim();return this.format(v5(n,c,E,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...s,...n,interpolationkey:E})};this.resetRegExp();const p=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>p_(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?p_(this.escape(y)):p_(y)}].forEach(y=>{for(u=0;o=y.regex.exec(e);){const S=o[1].trim();if(a=f(S),a===void 0)if(typeof p=="function"){const C=p(e,o,s);a=qe(C)?C:""}else if(s&&Object.prototype.hasOwnProperty.call(s,S))a="";else if(g){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${e}`),a="";else!qe(a)&&!this.useRawValueToEscape&&(a=a5(a));const E=y.safeValue(a);if(e=e.replace(o[0],E),g?(y.regex.lastIndex+=a.length,y.regex.lastIndex-=o[0].length):y.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,a;const u=(c,f)=>{const p=this.nestingOptionsSeparator;if(c.indexOf(p)<0)return c;const g=c.split(new RegExp(`${p}[ ]*{`));let m=`{${g[1]}`;c=g[0],m=this.interpolate(m,a);const y=m.match(/'/g),S=m.match(/"/g);((y?.length??0)%2===0&&!S||S.length%2!==0)&&(m=m.replace(/'/g,'"'));try{a=JSON.parse(m),f&&(a={...f,...a})}catch(E){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,E),`${c}${p}${m}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;s=this.nestingRegexp.exec(e);){let c=[];a={...r},a=a.replace&&!qe(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let f=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const p=s[1].split(this.formatSeparator).map(g=>g.trim());s[1]=p.shift(),c=p,f=!0}if(o=n(u.call(this,s[1].trim(),a),a),o&&s[0]===e&&!qe(o))return o;qe(o)||(o=a5(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),o=""),f&&(o=c.reduce((p,g)=>this.format(p,g,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),e=e.replace(s[0],o),this.regexp.lastIndex=0}return e}}const g_e=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(a=>{if(a){const[u,...c]=a.split(":"),f=c.join(":").trim().replace(/^'+|'+$/g,""),p=u.trim();n[p]||(n[p]=f),f==="false"&&(n[p]=!1),f==="true"&&(n[p]=!0),isNaN(f)||(n[p]=parseInt(f,10))}})}return{formatName:e,formatOptions:n}},oc=t=>{const e={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const a=r+JSON.stringify(o);let u=e[a];return u||(u=t(sy(r),s),e[a]=u),u(n)}};class m_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.create("formatter"),this.options=e,this.formats={number:oc((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:oc((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:oc((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:oc((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:oc((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(e)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=oc(n)}format(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(u=>u.indexOf(")")>-1)){const u=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,u)].join(this.formatSeparator)}return o.reduce((u,c)=>{const{formatName:f,formatOptions:p}=g_e(c);if(this.formats[f]){let g=u;try{const m=s?.formatParams?.[s.interpolationkey]||{},y=m.locale||m.lng||s.locale||s.lng||r;g=this.formats[f](u,y,{...p,...s,...m})}catch(m){this.logger.warn(m)}return g}else this.logger.warn(`there was no format function for ${f}`);return u},e)}}const v_e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class y_e extends Sb{constructor(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=wo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,s.backend,s)}queueLoad(e,n,r,s){const o={},a={},u={},c={};return e.forEach(f=>{let p=!0;n.forEach(g=>{const m=`${f}|${g}`;!r.reload&&this.store.hasResourceBundle(f,g)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?a[m]===void 0&&(a[m]=!0):(this.state[m]=1,p=!1,a[m]===void 0&&(a[m]=!0),o[m]===void 0&&(o[m]=!0),c[g]===void 0&&(c[g]=!0)))}),p||(u[f]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const s=e.split("|"),o=s[0],a=s[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const u={};this.queue.forEach(c=>{s_e(c.loaded,[o],a),v_e(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(f=>{u[f]||(u[f]={});const p=c.loaded[f];p.length&&p.forEach(g=>{u[f][g]===void 0&&(u[f][g]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:o,callback:a});return}this.readingCalls++;const u=(f,p)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(f&&p&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,o*2,a)},o);return}a(f,p)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const f=c(e,n);f&&typeof f.then=="function"?f.then(p=>u(null,p)).catch(u):u(null,f)}catch(f){u(f)}return}return c(e,n,u)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();qe(e)&&(e=this.languageUtils.toResolveHierarchy(e)),qe(n)&&(n=[n]);const o=this.queueLoad(e,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(a,u)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,a),!a&&u&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,u),this.loaded(e,a,u)})}saveMissing(e,n,r,s,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const c={...a,isUpdate:o},f=this.backend.create.bind(this.backend);if(f.length<6)try{let p;f.length===5?p=f(e,n,r,s,c):p=f(e,n,r,s),p&&typeof p.then=="function"?p.then(g=>u(null,g)).catch(u):u(null,p)}catch(p){u(p)}else f(e,n,r,s,u,c)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const y5=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),qe(t[1])&&(e.defaultValue=t[1]),qe(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),b5=t=>(qe(t.ns)&&(t.ns=[t.ns]),qe(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),qe(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),Mm=()=>{},b_e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class jh extends Sb{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=b5(e),this.services={},this.logger=wo,this.modules={external:[]},b_e(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(qe(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=y5();this.options={...s,...this.options,...b5(n)},this.options.interpolation={...s.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?wo.init(o(this.modules.logger),this.options):wo.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=m_e;const g=new p5(this.options);this.store=new d5(this.options.resources,this.options);const m=this.services;m.logger=wo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new h_e(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(m.formatter=o(p),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new p_e(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new y_e(o(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),C=1;C<S;C++)E[C-1]=arguments[C];e.emit(y,...E)}),this.modules.languageDetector&&(m.languageDetector=o(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=o(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new iy(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),C=1;C<S;C++)E[C-1]=arguments[C];e.emit(y,...E)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Mm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(p=>{this[p]=function(){return e.store[p](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=function(){return e.store[p](...arguments),e}});const c=Df(),f=()=>{const p=(g,m)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(m),r(g,m)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mm;const s=qe(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&o.indexOf(f)<0&&o.push(f)})};s?a(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload?.forEach?.(u=>a(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(e,n,r){const s=Df();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=Mm),this.services.backendConnector.reload(e,n,o=>{s.resolve(),r(o)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&ij.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const s=Df();this.emit("languageChanging",e);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,f)=>{f?(o(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},u=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const f=qe(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);f&&(this.language||o(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector?.cacheUserLanguage?.(f)),this.loadResources(f,p=>{a(p,f)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),s}getFixedT(e,n,r){var s=this;const o=function(a,u){let c;if(typeof u!="object"){for(var f=arguments.length,p=new Array(f>2?f-2:0),g=2;g<f;g++)p[g-2]=arguments[g];c=s.options.overloadTranslationOptionHandler([a,u].concat(p))}else c={...u};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||o.keyPrefix);const m=s.options.keySeparator||".";let y;return c.keyPrefix&&Array.isArray(a)?y=a.map(S=>`${c.keyPrefix}${m}${S}`):y=c.keyPrefix?`${c.keyPrefix}${m}${a}`:a,s.t(y,c)};return qe(e)?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=r,o}t(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.translator?.translate(...n)}exists(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.translator?.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(u,c)=>{const f=this.services.backendConnector.state[`${u}|${c}`];return f===-1||f===0||f===2};if(n.precheck){const u=n.precheck(this,a);if(u!==void 0)return u}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!s||a(o,e)))}loadNamespaces(e,n){const r=Df();return this.options.ns?(qe(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Df();qe(e)&&(e=[e]);const s=this.options.preload||[],o=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=s.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new p5(y5());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new jh(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mm;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new jh(s);if((e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(u=>{o[u]=this[u]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const u=Object.keys(this.store.data).reduce((c,f)=>(c[f]={...this.store.data[f]},Object.keys(c[f]).reduce((p,g)=>(p[g]={...c[f][g]},p),{})),{});o.store=new d5(u,s),o.services.resourceStore=o.store}return o.translator=new iy(o.services,s),o.translator.on("*",function(u){for(var c=arguments.length,f=new Array(c>1?c-1:0),p=1;p<c;p++)f[p-1]=arguments[p];o.emit(u,...f)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const hr=jh.createInstance();hr.createInstance=jh.createInstance;hr.createInstance;hr.dir;hr.init;hr.loadResources;hr.reloadResources;hr.use;hr.changeLanguage;hr.getFixedT;hr.t;hr.exists;hr.setDefaultNamespace;hr.hasLoadedNamespace;hr.loadNamespaces;hr.loadLanguages;const{slice:S_e,forEach:E_e}=[];function C_e(t){return E_e.call(S_e.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function w_e(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const S5=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,__e=function(t,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(e);let o=`${t}=${s}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!S5.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!S5.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},E5={create(t,e,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=__e(t,e,s)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var x_e={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return E5.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&E5.create(n,t,r,s,o)}},A_e={name:"querystring",lookup(t){let{lookupQuerystring:e}=t,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a<o.length;a++){const u=o[a].indexOf("=");u>0&&o[a].substring(0,u)===e&&(n=o[a].substring(u+1))}}return n}},T_e={name:"hash",lookup(t){let{lookupHash:e,lookupFromHashIndex:n}=t,r;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const o=s.substring(1);if(e){const a=o.split("&");for(let u=0;u<a.length;u++){const c=a[u].indexOf("=");c>0&&a[u].substring(0,c)===e&&(r=a[u].substring(c+1))}}if(r)return r;if(!r&&n>-1){const a=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let ic=null;const C5=()=>{if(ic!==null)return ic;try{if(ic=typeof window<"u"&&window.localStorage!==null,!ic)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{ic=!1}return ic};var R_e={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&C5())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&C5()&&window.localStorage.setItem(n,t)}};let ac=null;const w5=()=>{if(ac!==null)return ac;try{if(ac=typeof window<"u"&&window.sessionStorage!==null,!ac)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{ac=!1}return ac};var I_e={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&w5())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&w5()&&window.sessionStorage.setItem(n,t)}},O_e={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)e.push(n[o]);r&&e.push(r),s&&e.push(s)}return e.length>0?e:void 0}},N_e={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},M_e={name:"path",lookup(t){let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof e=="number"?e:0]?.replace("/",""):void 0}},P_e={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let aj=!1;try{document.cookie,aj=!0}catch{}const lj=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];aj||lj.splice(1,1);const k_e=()=>({order:lj,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class uj{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=C_e(n,this.options||{},k_e()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(x_e),this.addDetector(A_e),this.addDetector(R_e),this.addDetector(I_e),this.addDetector(O_e),this.addDetector(N_e),this.addDetector(M_e),this.addDetector(P_e),this.addDetector(T_e)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.filter(r=>r!=null&&!w_e(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}uj.type="languageDetector";function D_e(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=L_e(t))||e){n&&(t=n);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(f){throw f},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
295
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var f=n.next();return a=f.done,f},e:function(f){u=!0,o=f},f:function(){try{a||n.return==null||n.return()}finally{if(u)throw o}}}}function L_e(t,e){if(t){if(typeof t=="string")return _5(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_5(t,e):void 0}}function _5(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function mA(t){"@babel/helpers - typeof";return mA=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mA(t)}var cj=["__proto__","constructor","prototype"];function dj(t){return!(typeof t!="string"||t.length===0||t.length>128||cj.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function fj(t){return!(!dj(t)||t.indexOf("/")>-1)}function U_e(t){return dj(t)}var F_e={lng:fj,ns:U_e};function Pm(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function z_e(t){if(typeof t!="string"||t.length===0)return t;try{var e=new URL(t);return e.username||e.password?(e.username="",e.password="",e.toString()):t}catch{return t.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function hj(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":mA(XMLHttpRequest))==="object"}function B_e(t){return!!t&&typeof t.then=="function"}function j_e(t){return B_e(t)?t:Promise.resolve(t)}var H_e=/\{\{(.+?)\}\}/g;function x5(t,e){var n=!1,r=t.replace(H_e,function(s,o){var a=o.trim();if(cj.indexOf(a)>-1)return s;var u=e[a];if(u==null)return s;var c=F_e[a]||fj,f=String(u).split("+"),p=D_e(f),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;if(!c(m))return n=!0,s}}catch(y){p.e(y)}finally{p.f()}return f.join("+")});return n?null:r}function A5(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function T5(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?A5(Object(n),!0).forEach(function(r){$_e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $_e(t,e,n){return(e=q_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q_e(t){var e=W_e(t,"string");return Yl(e)=="symbol"?e:e+""}function W_e(t,e){if(Yl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yl(t){"@babel/helpers - typeof";return Yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yl(t)}var $a=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?$a=global.fetch:typeof window<"u"&&window.fetch&&($a=window.fetch);var Hh;hj()&&(typeof global<"u"&&global.XMLHttpRequest?Hh=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Hh=window.XMLHttpRequest));var ay;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?ay=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(ay=window.ActiveXObject));typeof $a!="function"&&($a=void 0);if(!$a&&!Hh&&!ay)try{Bn(()=>import("./browser-ponyfill-CMFDlVql.js").then(t=>t.b),[]).then(function(t){$a=t.default}).catch(function(){})}catch{}var pj=["__proto__","constructor","prototype"],vA=function(e,n){if(n&&Yl(n)==="object"){for(var r="",s=0,o=Object.keys(n);s<o.length;s++){var a=o[s];pj.indexOf(a)>-1||(r+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},R5=function(e,n,r,s){var o=function(c){if(!c.ok)return r(c.statusText||"Error",{status:c.status});c.text().then(function(f){r(null,{status:c.status,data:f})}).catch(r)};if(s){var a=s(e,n);if(a instanceof Promise){a.then(o).catch(r);return}}typeof fetch=="function"?fetch(e,n).then(o).catch(r):$a(e,n).then(o).catch(r)},G_e=function(e,n,r,s){e.queryStringParams&&(n=vA(n,e.queryStringParams));var o=T5({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(o["Content-Type"]="application/json");var a=typeof e.requestOptions=="function"?e.requestOptions(r):e.requestOptions,u=T5({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:o},e._omitFetchOptions?{}:a),c=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{R5(n,u,s,c)}catch(f){if(!a||Object.keys(a).length===0||!f.message||f.message.indexOf("not implemented")<0)return s(f);try{Object.keys(a).forEach(function(p){delete u[p]}),R5(n,u,s,c),e._omitFetchOptions=!0}catch(p){s(p)}}},V_e=function(e,n,r,s){r&&Yl(r)==="object"&&(r=vA("",r).slice(1)),e.queryStringParams&&(n=vA(n,e.queryStringParams));try{var o=Hh?new Hh:new ay("MSXML2.XMLHTTP.3.0");o.open(r?"POST":"GET",n,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=e.customHeaders;if(a=typeof a=="function"?a():a,a)for(var u=0,c=Object.keys(a);u<c.length;u++){var f=c[u];pj.indexOf(f)>-1||o.setRequestHeader(f,a[f])}o.onreadystatechange=function(){o.readyState>3&&s(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(p){console&&console.log(p)}},K_e=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},$a&&n.indexOf("file:")!==0)return G_e(e,n,r,s);if(hj()||typeof ActiveXObject=="function")return V_e(e,n,r,s);s(new Error("No fetch and no xhr implementation found!"))};function Zc(t){"@babel/helpers - typeof";return Zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zc(t)}function I5(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function g_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?I5(Object(n),!0).forEach(function(r){gj(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Y_e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z_e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mj(r.key),r)}}function X_e(t,e,n){return e&&Z_e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function gj(t,e,n){return(e=mj(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mj(t){var e=Q_e(t,"string");return Zc(e)=="symbol"?e:e+""}function Q_e(t,e){if(Zc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Zc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var J_e=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,s){return gj({},r,s||"")},parseLoadPayload:function(n,r){},request:K_e,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},vj=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Y_e(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return X_e(t,[{key:"init",value:function(n){var r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=g_(g_(g_({},J_e()),this.options||{}),s),this.allOptions=o,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);Zc(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,s){this._readAny(n,n,r,r,s)}},{key:"read",value:function(n,r,s){this._readAny([n],n,[r],r,s)}},{key:"_readAny",value:function(n,r,s,o,a){var u=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,s)),c=j_e(c),c.then(function(f){if(!f)return a(null,{});var p=x5(f,{lng:n.join("+"),ns:s.join("+")});if(p==null){var g=n.map(Pm).join(", "),m=s.map(Pm).join(", ");return a(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+g+"] namespaces=["+m+"]"),!1)}u.loadUrl(p,a,r,o)})}},{key:"loadUrl",value:function(n,r,s,o){var a=this,u=typeof s=="string"?[s]:s,c=typeof o=="string"?[o]:o,f=this.options.parseLoadPayload(u,c),p=Pm(z_e(n));this.options.request(this.options,n,f,function(g,m){if(m&&(m.status>=500&&m.status<600||!m.status))return r("failed loading "+p+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+p+"; status code: "+m.status,!1);if(!m&&g&&g.message){var y=g.message.toLowerCase(),S=["failed","fetch","network","load"].find(function(w){return y.indexOf(w)>-1});if(S)return r("failed loading "+p+": "+Pm(g.message),!0)}if(g)return r(g,!1);var E,C;try{typeof m.data=="string"?E=a.options.parse(m.data,s,o):E=m.data}catch{C="failed parsing "+p+" to json"}if(C)return r(C,!1);r(null,E)})}},{key:"create",value:function(n,r,s,o,a){var u=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,s,o),f=0,p=[],g=[];n.forEach(function(m){var y=u.options.addPath;typeof u.options.addPath=="function"&&(y=u.options.addPath(m,r));var S=x5(y,{lng:m,ns:r});if(S==null){f+=1,a&&f===n.length&&a(p,g);return}u.options.request(u.options,S,c,function(E,C){f+=1,p.push(E),g.push(C),f===n.length&&typeof a=="function"&&a(p,g)})})}}},{key:"reload",value:function(){var n=this,r=this.services,s=r.backendConnector,o=r.languageUtils,a=r.logger,u=s.language;if(!(u&&u.toLowerCase()==="cimode")){var c=[],f=function(g){var m=o.toResolveHierarchy(g);m.forEach(function(y){c.indexOf(y)<0&&c.push(y)})};f(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(p){return f(p)}),c.forEach(function(p){n.allOptions.ns.forEach(function(g){s.read(p,g,"read",null,null,function(m,y){m&&a.warn("loading namespace ".concat(g," for language ").concat(p," failed"),m),!m&&y&&a.log("loaded namespace ".concat(g," for language ").concat(p),y),s.loaded("".concat(p,"|").concat(g),m,y)})})})}}}])})();vj.type="backend";hr.use(vj).use(uj).use(XSe).init({fallbackLng:"en",supportedLngs:["en","nl","de","fr"],ns:["common","mail","settings","errors"],defaultNS:"common",backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},detection:{order:["navigator","htmlTag"],caches:[]},interpolation:{escapeValue:!1},react:{useSuspense:!0,bindI18n:"languageChanged loaded"}});Vde();zSe();Ide();hpe();const Eb=USe();Ude(Eb);const yj=new G$({queryCache:new j5({onError:ppe}),mutationCache:new B5({onError:gpe}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),exe=t_e(yj,Eb);Eb.recordPageView(window.location.pathname);const bj=document.getElementById("root");if(!bj)throw new Error("Root element not found");uG.createRoot(bj).render(F.jsx(A.StrictMode,{children:F.jsx(KB.Provider,{value:Eb,children:F.jsxs(K$,{client:yj,children:[F.jsx(Whe,{children:F.jsx(sG,{router:exe})}),!1]})})}));export{iq as $,_L as A,Zm as B,hL as C,nue as D,Kue as E,pxe as F,gxe as G,Oce as H,oue as I,iue as J,Yue as K,Mce as L,xw as M,lx as N,aue as O,mxe as P,j$ as Q,H5 as R,$h as S,uue as T,kce as U,FAe as V,RA as W,rx as X,f_ as Y,Jxe as Z,s3 as _,nxe as a,WT as a$,ZEe as a0,fpe as a1,MAe as a2,kAe as a3,NAe as a4,yAe as a5,VEe as a6,jAe as a7,JEe as a8,ej as a9,nCe as aA,VT as aB,WEe as aC,Lc as aD,E6 as aE,Tde as aF,eb as aG,px as aH,yxe as aI,qL as aJ,Xde as aK,QB as aL,pAe as aM,hAe as aN,gAe as aO,mAe as aP,m6 as aQ,EAe as aR,txe as aS,CEe as aT,tAe as aU,qa as aV,vEe as aW,YF as aX,Qy as aY,ZCe as aZ,hxe as a_,DAe as aa,zAe as ab,PAe as ac,Bn as ad,dAe as ae,SAe as af,KEe as ag,HEe as ah,AAe as ai,rCe as aj,IAe as ak,TAe as al,xAe as am,bAe as an,z as ao,nEe as ap,v6 as aq,Jy as ar,Ct as as,OAe as at,RAe as au,BAe as av,UAe as aw,$Ae as ax,LAe as ay,fxe as az,Y$ as b,Ql as b$,_6 as b0,GEe as b1,oxe as b2,sAe as b3,nAe as b4,iAe as b5,dd as b6,KCe as b7,Fr as b8,HAe as b9,No as bA,hT as bB,xi as bC,Yne as bD,Ai as bE,jne as bF,D6 as bG,vy as bH,C9 as bI,dte as bJ,Jne as bK,lre as bL,hte as bM,ite as bN,hy as bO,PA as bP,I6 as bQ,ore as bR,tre as bS,yte as bT,Zne as bU,ST as bV,M6 as bW,pte as bX,$ne as bY,qne as bZ,aV as b_,CAe as ba,wAe as bb,Cwe as bc,rAe as bd,oAe as be,qAe as bf,WAe as bg,vAe as bh,Nde as bi,vxe as bj,Ode as bk,j4 as bl,eAe as bm,aAe as bn,jEe as bo,uAe as bp,lAe as bq,cAe as br,fAe as bs,_Ae as bt,YEe as bu,fh as bv,W$ as bw,k5 as bx,Tg as by,L6 as bz,Q$ as c,QG as c0,XG as c1,MA as c2,A9 as c3,Hne as c4,tV as c5,vte as c6,Vne as c7,kA as c8,Wne as c9,dre as ca,N9 as cb,cF as cc,ixe as cd,qh as ce,sxe as cf,mT as cg,Dy as ch,Jh as ci,ire as cj,Wh as ck,are as cl,ere as cm,A as d,nq as e,J$ as f,eq as g,rxe as h,Dr as i,sq as j,ON as k,tq as l,oq as m,er as n,us as o,jr as p,AW as q,M5 as r,v_ as s,F as t,q5 as u,S6 as v,uxe as w,cxe as x,Ns as y,Pn as z};